X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fextra-utils%2Fvideos%2Fvideo-playlists.ts;h=5bcc02570984d2e211769140f3ff864f9d5ae8cc;hb=818c449b3c34e9f324ac744120c8774e724ab25e;hp=6762c59736596275560616aaaf833c92decbeea9;hpb=822c7e610d19e3320519a6ae5c90c01db971f03f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/extra-utils/videos/video-playlists.ts b/shared/extra-utils/videos/video-playlists.ts index 6762c5973..5bcc02570 100644 --- a/shared/extra-utils/videos/video-playlists.ts +++ b/shared/extra-utils/videos/video-playlists.ts @@ -123,9 +123,9 @@ function deleteVideoPlaylist (url: string, token: string, playlistId: number | s } function createVideoPlaylist (options: { - url: string, - token: string, - playlistAttrs: VideoPlaylistCreate, + url: string + token: string + playlistAttrs: VideoPlaylistCreate expectedStatus?: number }) { const path = '/api/v1/video-playlists' @@ -148,10 +148,10 @@ function createVideoPlaylist (options: { } function updateVideoPlaylist (options: { - url: string, - token: string, - playlistAttrs: VideoPlaylistUpdate, - playlistId: number | string, + url: string + token: string + playlistAttrs: VideoPlaylistUpdate + playlistId: number | string expectedStatus?: number }) { const path = '/api/v1/video-playlists/' + options.playlistId @@ -174,9 +174,9 @@ function updateVideoPlaylist (options: { } async function addVideoInPlaylist (options: { - url: string, - token: string, - playlistId: number | string, + url: string + token: string + playlistId: number | string elementAttrs: VideoPlaylistElementCreate | { videoId: string } expectedStatus?: number }) { @@ -194,11 +194,11 @@ async function addVideoInPlaylist (options: { } function updateVideoPlaylistElement (options: { - url: string, - token: string, - playlistId: number | string, - playlistElementId: number | string, - elementAttrs: VideoPlaylistElementUpdate, + url: string + token: string + playlistId: number | string + playlistElementId: number | string + elementAttrs: VideoPlaylistElementUpdate expectedStatus?: number }) { const path = '/api/v1/video-playlists/' + options.playlistId + '/videos/' + options.playlistElementId @@ -213,10 +213,10 @@ function updateVideoPlaylistElement (options: { } function removeVideoFromPlaylist (options: { - url: string, - token: string, - playlistId: number | string, - playlistElementId: number, + url: string + token: string + playlistId: number | string + playlistElementId: number expectedStatus?: number }) { const path = '/api/v1/video-playlists/' + options.playlistId + '/videos/' + options.playlistElementId @@ -230,14 +230,14 @@ function removeVideoFromPlaylist (options: { } function reorderVideosPlaylist (options: { - url: string, - token: string, - playlistId: number | string, + url: string + token: string + playlistId: number | string elementAttrs: { - startPosition: number, - insertAfterPosition: number, + startPosition: number + insertAfterPosition: number reorderLength?: number - }, + } expectedStatus?: number }) { const path = '/api/v1/video-playlists/' + options.playlistId + '/videos/reorder'