feat(#153): serve single video shares as direct links
This commit is contained in:
+2
-2
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user