diff options
Diffstat (limited to 'server/lib/hls.ts')
-rw-r--r-- | server/lib/hls.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/server/lib/hls.ts b/server/lib/hls.ts index a41f1ae48..053b5d326 100644 --- a/server/lib/hls.ts +++ b/server/lib/hls.ts | |||
@@ -234,13 +234,20 @@ function downloadPlaylistSegments (playlistUrl: string, destinationDir: string, | |||
234 | 234 | ||
235 | // --------------------------------------------------------------------------- | 235 | // --------------------------------------------------------------------------- |
236 | 236 | ||
237 | function injectQueryToPlaylistUrls (content: string, queryString: string) { | ||
238 | return content.replace(/\.(m3u8|ts|mp4)/gm, '.$1?' + queryString) | ||
239 | } | ||
240 | |||
241 | // --------------------------------------------------------------------------- | ||
242 | |||
237 | export { | 243 | export { |
238 | updateMasterHLSPlaylist, | 244 | updateMasterHLSPlaylist, |
239 | updateSha256VODSegments, | 245 | updateSha256VODSegments, |
240 | buildSha256Segment, | 246 | buildSha256Segment, |
241 | downloadPlaylistSegments, | 247 | downloadPlaylistSegments, |
242 | updateStreamingPlaylistsInfohashesIfNeeded, | 248 | updateStreamingPlaylistsInfohashesIfNeeded, |
243 | updatePlaylistAfterFileChange | 249 | updatePlaylistAfterFileChange, |
250 | injectQueryToPlaylistUrls | ||
244 | } | 251 | } |
245 | 252 | ||
246 | // --------------------------------------------------------------------------- | 253 | // --------------------------------------------------------------------------- |