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:
+2
-2
@@ -202,8 +202,8 @@ export async function handleShareRequest (req: IncomingShareRequest, res: Respon
|
||||
// This is an individual item (not a gallery)
|
||||
log('Serving link ' + req.key)
|
||||
const asset = link.assets[0]
|
||||
if (asset.type === AssetType.image && !getConfigOption('ipp.gallery.singleImage') && !req.password) {
|
||||
// For photos, output the image directly unless configured to show a gallery,
|
||||
if ((asset.type === AssetType.image || asset.type === AssetType.video) && !getConfigOption('ipp.gallery.singleImage') && !req.password) {
|
||||
// For photos and videos, output them directly unless configured to show a gallery,
|
||||
// or unless it's a password-protected link
|
||||
await assetBuffer(req, res, link.assets[0], ImageSize.preview)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user