From 668f864f5a50bd34ffd7c32c91bfff122118d4bf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 11 Jun 2021 16:02:26 +0200 Subject: Fix live files include --- server/models/video/sql/shared/video-model-builder.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'server/models/video/sql/shared/video-model-builder.ts') diff --git a/server/models/video/sql/shared/video-model-builder.ts b/server/models/video/sql/shared/video-model-builder.ts index 467a9378a..cc71192c0 100644 --- a/server/models/video/sql/shared/video-model-builder.ts +++ b/server/models/video/sql/shared/video-model-builder.ts @@ -108,9 +108,12 @@ export class VideoModelBuilder { if (!rowsWebTorrentFiles) return for (const row of rowsWebTorrentFiles) { + const id = row['VideoFiles.id'] + if (!id) continue + const videoModel = this.videosMemo[row.id] this.addWebTorrentFile(row, videoModel) - this.addRedundancy(row, 'VideoFiles.RedundancyVideos', this.videoFileMemo[row['VideoFiles.id']]) + this.addRedundancy(row, 'VideoFiles.RedundancyVideos', this.videoFileMemo[id]) } } @@ -118,6 +121,9 @@ export class VideoModelBuilder { if (!rowsStreamingPlaylist) return for (const row of rowsStreamingPlaylist || []) { + const id = row['VideoStreamingPlaylists.id'] + if (!id) continue + const videoModel = this.videosMemo[row.id] this.addStreamingPlaylist(row, videoModel) @@ -125,7 +131,7 @@ export class VideoModelBuilder { this.addRedundancy( row, 'VideoStreamingPlaylists.RedundancyVideos', - this.videoStreamingPlaylistMemo[row['VideoStreamingPlaylists.id']] + this.videoStreamingPlaylistMemo[id] ) } } -- cgit v1.2.3