From 41e74ec9cd6076109c91128047d8b866c36a3005 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 27 Jun 2022 10:36:16 +0200 Subject: Fix broken feeds with published live --- server/controllers/feeds.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'server/controllers') diff --git a/server/controllers/feeds.ts b/server/controllers/feeds.ts index c929a6726..ad93d700f 100644 --- a/server/controllers/feeds.ts +++ b/server/controllers/feeds.ts @@ -312,11 +312,13 @@ function addVideosToFeed (feed: Feed, videos: VideoModel[]) { torrents, // Enclosure - video: { - url: videoFiles[0].url, - length: videoFiles[0].fileSize, - type: videoFiles[0].type - }, + video: videoFiles.length !== 0 + ? { + url: videoFiles[0].url, + length: videoFiles[0].fileSize, + type: videoFiles[0].type + } + : undefined, // Media RSS videos: videoFiles, -- cgit v1.2.3