diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-16 09:04:35 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 89d241a79c262b9775c233b73cff080043ebb5e6 (patch) | |
tree | cb3b6cb431d25d891ef4e02f66c61d252d17048f /shared/extra-utils/videos/streaming-playlists.ts | |
parent | d23dd9fbfc4d26026352c10f81d2795ceaf2908a (diff) | |
download | PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.gz PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.tar.zst PeerTube-89d241a79c262b9775c233b73cff080043ebb5e6.zip |
Shorter server command names
Diffstat (limited to 'shared/extra-utils/videos/streaming-playlists.ts')
-rw-r--r-- | shared/extra-utils/videos/streaming-playlists.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shared/extra-utils/videos/streaming-playlists.ts b/shared/extra-utils/videos/streaming-playlists.ts index 0324c739a..e8fd2f232 100644 --- a/shared/extra-utils/videos/streaming-playlists.ts +++ b/shared/extra-utils/videos/streaming-playlists.ts | |||
@@ -13,7 +13,7 @@ async function checkSegmentHash (options: { | |||
13 | hlsPlaylist: VideoStreamingPlaylist | 13 | hlsPlaylist: VideoStreamingPlaylist |
14 | }) { | 14 | }) { |
15 | const { server, baseUrlPlaylist, baseUrlSegment, videoUUID, resolution, hlsPlaylist } = options | 15 | const { server, baseUrlPlaylist, baseUrlSegment, videoUUID, resolution, hlsPlaylist } = options |
16 | const command = server.streamingPlaylistsCommand | 16 | const command = server.streamingPlaylists |
17 | 17 | ||
18 | const playlist = await command.get({ url: `${baseUrlPlaylist}/${videoUUID}/${resolution}.m3u8` }) | 18 | const playlist = await command.get({ url: `${baseUrlPlaylist}/${videoUUID}/${resolution}.m3u8` }) |
19 | 19 | ||
@@ -43,7 +43,7 @@ async function checkLiveSegmentHash (options: { | |||
43 | hlsPlaylist: VideoStreamingPlaylist | 43 | hlsPlaylist: VideoStreamingPlaylist |
44 | }) { | 44 | }) { |
45 | const { server, baseUrlSegment, videoUUID, segmentName, hlsPlaylist } = options | 45 | const { server, baseUrlSegment, videoUUID, segmentName, hlsPlaylist } = options |
46 | const command = server.streamingPlaylistsCommand | 46 | const command = server.streamingPlaylists |
47 | 47 | ||
48 | const segmentBody = await command.getSegment({ url: `${baseUrlSegment}/${videoUUID}/${segmentName}` }) | 48 | const segmentBody = await command.getSegment({ url: `${baseUrlSegment}/${videoUUID}/${segmentName}` }) |
49 | const shaBody = await command.getSegmentSha256({ url: hlsPlaylist.segmentsSha256Url }) | 49 | const shaBody = await command.getSegmentSha256({ url: hlsPlaylist.segmentsSha256Url }) |
@@ -58,7 +58,7 @@ async function checkResolutionsInMasterPlaylist (options: { | |||
58 | }) { | 58 | }) { |
59 | const { server, playlistUrl, resolutions } = options | 59 | const { server, playlistUrl, resolutions } = options |
60 | 60 | ||
61 | const masterPlaylist = await server.streamingPlaylistsCommand.get({ url: playlistUrl }) | 61 | const masterPlaylist = await server.streamingPlaylists.get({ url: playlistUrl }) |
62 | 62 | ||
63 | for (const resolution of resolutions) { | 63 | for (const resolution of resolutions) { |
64 | const reg = new RegExp( | 64 | const reg = new RegExp( |