Merge pull request #266 from sajalverma17/feat/153-serve-single-video-directly

feat(#153): serve single video shares as direct links
This commit is contained in:
Alan Grainger
2026-07-24 09:58:34 +12:00
committed by GitHub
+2 -2
View File
@@ -202,8 +202,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 {