aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/utils/videos/videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/utils/videos/videos.ts')
-rw-r--r--shared/utils/videos/videos.ts25
1 files changed, 24 insertions, 1 deletions
diff --git a/shared/utils/videos/videos.ts b/shared/utils/videos/videos.ts
index b3d24bc53..2c09f0086 100644
--- a/shared/utils/videos/videos.ts
+++ b/shared/utils/videos/videos.ts
@@ -223,6 +223,28 @@ function getVideoChannelVideos (
223 }) 223 })
224} 224}
225 225
226function getPlaylistVideos (
227 url: string,
228 accessToken: string,
229 playlistId: number | string,
230 start: number,
231 count: number,
232 query: { nsfw?: boolean } = {}
233) {
234 const path = '/api/v1/video-playlists/' + playlistId + '/videos'
235
236 return makeGetRequest({
237 url,
238 path,
239 query: immutableAssign(query, {
240 start,
241 count
242 }),
243 token: accessToken,
244 statusCodeExpected: 200
245 })
246}
247
226function getVideosListPagination (url: string, start: number, count: number, sort?: string) { 248function getVideosListPagination (url: string, start: number, count: number, sort?: string) {
227 const path = '/api/v1/videos' 249 const path = '/api/v1/videos'
228 250
@@ -601,5 +623,6 @@ export {
601 parseTorrentVideo, 623 parseTorrentVideo,
602 getLocalVideos, 624 getLocalVideos,
603 completeVideoCheck, 625 completeVideoCheck,
604 checkVideoFilesWereRemoved 626 checkVideoFilesWereRemoved,
627 getPlaylistVideos
605} 628}