aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/sql/shared/video-model-builder.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/sql/shared/video-model-builder.ts')
-rw-r--r--server/models/video/sql/shared/video-model-builder.ts10
1 files changed, 8 insertions, 2 deletions
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 {
108 if (!rowsWebTorrentFiles) return 108 if (!rowsWebTorrentFiles) return
109 109
110 for (const row of rowsWebTorrentFiles) { 110 for (const row of rowsWebTorrentFiles) {
111 const id = row['VideoFiles.id']
112 if (!id) continue
113
111 const videoModel = this.videosMemo[row.id] 114 const videoModel = this.videosMemo[row.id]
112 this.addWebTorrentFile(row, videoModel) 115 this.addWebTorrentFile(row, videoModel)
113 this.addRedundancy(row, 'VideoFiles.RedundancyVideos', this.videoFileMemo[row['VideoFiles.id']]) 116 this.addRedundancy(row, 'VideoFiles.RedundancyVideos', this.videoFileMemo[id])
114 } 117 }
115 } 118 }
116 119
@@ -118,6 +121,9 @@ export class VideoModelBuilder {
118 if (!rowsStreamingPlaylist) return 121 if (!rowsStreamingPlaylist) return
119 122
120 for (const row of rowsStreamingPlaylist || []) { 123 for (const row of rowsStreamingPlaylist || []) {
124 const id = row['VideoStreamingPlaylists.id']
125 if (!id) continue
126
121 const videoModel = this.videosMemo[row.id] 127 const videoModel = this.videosMemo[row.id]
122 128
123 this.addStreamingPlaylist(row, videoModel) 129 this.addStreamingPlaylist(row, videoModel)
@@ -125,7 +131,7 @@ export class VideoModelBuilder {
125 this.addRedundancy( 131 this.addRedundancy(
126 row, 132 row,
127 'VideoStreamingPlaylists.RedundancyVideos', 133 'VideoStreamingPlaylists.RedundancyVideos',
128 this.videoStreamingPlaylistMemo[row['VideoStreamingPlaylists.id']] 134 this.videoStreamingPlaylistMemo[id]
129 ) 135 )
130 } 136 }
131 } 137 }