aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/video-streaming-playlist.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/models/video/video-streaming-playlist.ts b/server/models/video/video-streaming-playlist.ts
index 4643c5452..e36852cad 100644
--- a/server/models/video/video-streaming-playlist.ts
+++ b/server/models/video/video-streaming-playlist.ts
@@ -198,6 +198,15 @@ export class VideoStreamingPlaylistModel extends Model<Partial<AttributesOnly<Vi
198 return Object.assign(playlist, { videoId: video.id, Video: video }) 198 return Object.assign(playlist, { videoId: video.id, Video: video })
199 } 199 }
200 200
201 static doesOwnedHLSPlaylistExist (videoUUID: string) {
202 const query = `SELECT 1 FROM "videoStreamingPlaylist" ` +
203 `INNER JOIN "video" ON "video"."id" = "videoStreamingPlaylist"."videoId" ` +
204 `AND "video"."remote" IS FALSE AND "video"."uuid" = $videoUUID ` +
205 `AND "storage" = ${VideoStorage.FILE_SYSTEM} LIMIT 1`
206
207 return doesExist(query, { videoUUID })
208 }
209
201 assignP2PMediaLoaderInfoHashes (video: MVideo, files: unknown[]) { 210 assignP2PMediaLoaderInfoHashes (video: MVideo, files: unknown[]) {
202 const masterPlaylistUrl = this.getMasterPlaylistUrl(video) 211 const masterPlaylistUrl = this.getMasterPlaylistUrl(video)
203 212