aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-streaming-playlist.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-streaming-playlist.ts')
-rw-r--r--server/models/video/video-streaming-playlist.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/server/models/video/video-streaming-playlist.ts b/server/models/video/video-streaming-playlist.ts
index b8dc7c450..73bd89844 100644
--- a/server/models/video/video-streaming-playlist.ts
+++ b/server/models/video/video-streaming-playlist.ts
@@ -153,6 +153,17 @@ export class VideoStreamingPlaylistModel extends Model<VideoStreamingPlaylistMod
153 return VideoStreamingPlaylistModel.findByPk(id, options) 153 return VideoStreamingPlaylistModel.findByPk(id, options)
154 } 154 }
155 155
156 static loadHLSPlaylistByVideo (videoId: number) {
157 const options = {
158 where: {
159 type: VideoStreamingPlaylistType.HLS,
160 videoId
161 }
162 }
163
164 return VideoStreamingPlaylistModel.findOne(options)
165 }
166
156 static getHlsPlaylistFilename (resolution: number) { 167 static getHlsPlaylistFilename (resolution: number) {
157 return resolution + '.m3u8' 168 return resolution + '.m3u8'
158 } 169 }