feat(#153): serve single video shares as direct links

This commit is contained in:
sajalverma17
2026-07-13 14:00:18 +02:00
parent 6ca4ad1d41
commit 1194e59f43
+2 -2
View File
@@ -201,8 +201,8 @@ export async function handleShareRequest (req: IncomingShareRequest, res: Respon
// This is an individual item (not a gallery) // This is an individual item (not a gallery)
log('Serving link ' + req.key) log('Serving link ' + req.key)
const asset = link.assets[0] const asset = link.assets[0]
if (asset.type === AssetType.image && !getConfigOption('ipp.gallery.singleImage') && !req.password) { if ((asset.type === AssetType.image || asset.type === AssetType.video) && !getConfigOption('ipp.gallery.singleImage') && !req.password) {
// For photos, output the image directly unless configured to show a gallery, // For photos and videos, output them directly unless configured to show a gallery,
// or unless it's a password-protected link // or unless it's a password-protected link
await assetBuffer(req, res, link.assets[0], ImageSize.preview) await assetBuffer(req, res, link.assets[0], ImageSize.preview)
} else { } else {