diff options
author | Chocobozzz <me@florianbigard.com> | 2020-09-25 10:04:21 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | a5cf76afa378aae81af2a9b0ce548e5d2582f832 (patch) | |
tree | 58da320232bee7c9656774c5d6811e82bbf6c696 /server/models/video/video-streaming-playlist.ts | |
parent | de6310b2fcbb8a6b79c546b23dfa1920724faaa7 (diff) | |
download | PeerTube-a5cf76afa378aae81af2a9b0ce548e5d2582f832.tar.gz PeerTube-a5cf76afa378aae81af2a9b0ce548e5d2582f832.tar.zst PeerTube-a5cf76afa378aae81af2a9b0ce548e5d2582f832.zip |
Add watch messages if live has not started
Diffstat (limited to 'server/models/video/video-streaming-playlist.ts')
-rw-r--r-- | server/models/video/video-streaming-playlist.ts | 11 |
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 | } |