aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos/playlists-command.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/videos/playlists-command.ts')
-rw-r--r--shared/extra-utils/videos/playlists-command.ts17
1 files changed, 8 insertions, 9 deletions
diff --git a/shared/extra-utils/videos/playlists-command.ts b/shared/extra-utils/videos/playlists-command.ts
index f77decc1a..75c8f2433 100644
--- a/shared/extra-utils/videos/playlists-command.ts
+++ b/shared/extra-utils/videos/playlists-command.ts
@@ -1,23 +1,22 @@
1import { omit, pick } from 'lodash' 1import { omit, pick } from 'lodash'
2import { HttpStatusCode } from '@shared/core-utils'
2import { 3import {
3 BooleanBothQuery, 4 BooleanBothQuery,
4 ResultList, 5 ResultList,
5 VideoExistInPlaylist, 6 VideoExistInPlaylist,
6 VideoPlaylist, 7 VideoPlaylist,
8 VideoPlaylistCreate,
7 VideoPlaylistCreateResult, 9 VideoPlaylistCreateResult,
8 VideoPlaylistElement, 10 VideoPlaylistElement,
11 VideoPlaylistElementCreate,
9 VideoPlaylistElementCreateResult, 12 VideoPlaylistElementCreateResult,
10 VideoPlaylistReorder 13 VideoPlaylistElementUpdate,
14 VideoPlaylistReorder,
15 VideoPlaylistType,
16 VideoPlaylistUpdate
11} from '@shared/models' 17} from '@shared/models'
12import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes'
13import { VideoPlaylistCreate } from '../../models/videos/playlist/video-playlist-create.model'
14import { VideoPlaylistElementCreate } from '../../models/videos/playlist/video-playlist-element-create.model'
15import { VideoPlaylistElementUpdate } from '../../models/videos/playlist/video-playlist-element-update.model'
16import { VideoPlaylistType } from '../../models/videos/playlist/video-playlist-type.model'
17import { VideoPlaylistUpdate } from '../../models/videos/playlist/video-playlist-update.model'
18import { unwrapBody } from '../requests' 18import { unwrapBody } from '../requests'
19import { AbstractCommand, OverrideCommandOptions } from '../shared' 19import { AbstractCommand, OverrideCommandOptions } from '../shared'
20import { videoUUIDToId } from './videos'
21 20
22export class PlaylistsCommand extends AbstractCommand { 21export class PlaylistsCommand extends AbstractCommand {
23 22
@@ -185,7 +184,7 @@ export class PlaylistsCommand extends AbstractCommand {
185 const attributes = { 184 const attributes = {
186 ...options.attributes, 185 ...options.attributes,
187 186
188 videoId: await videoUUIDToId(this.server.url, options.attributes.videoId) 187 videoId: await this.server.videosCommand.getId({ ...options, uuid: options.attributes.videoId })
189 } 188 }
190 189
191 const path = '/api/v1/video-playlists/' + options.playlistId + '/videos' 190 const path = '/api/v1/video-playlists/' + options.playlistId + '/videos'