]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/videos/playlists-command.ts
Fix server run
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / videos / playlists-command.ts
index f77decc1a474e836bb5d1c3de3f233f175a93168..cbfc7e10f3470c40c75dc6f0b671f9949fe67ef1 100644 (file)
@@ -1,23 +1,22 @@
 import { omit, pick } from 'lodash'
+import { HttpStatusCode } from '@shared/core-utils'
 import {
   BooleanBothQuery,
   ResultList,
   VideoExistInPlaylist,
   VideoPlaylist,
+  VideoPlaylistCreate,
   VideoPlaylistCreateResult,
   VideoPlaylistElement,
+  VideoPlaylistElementCreate,
   VideoPlaylistElementCreateResult,
-  VideoPlaylistReorder
+  VideoPlaylistElementUpdate,
+  VideoPlaylistReorder,
+  VideoPlaylistType,
+  VideoPlaylistUpdate
 } from '@shared/models'
-import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes'
-import { VideoPlaylistCreate } from '../../models/videos/playlist/video-playlist-create.model'
-import { VideoPlaylistElementCreate } from '../../models/videos/playlist/video-playlist-element-create.model'
-import { VideoPlaylistElementUpdate } from '../../models/videos/playlist/video-playlist-element-update.model'
-import { VideoPlaylistType } from '../../models/videos/playlist/video-playlist-type.model'
-import { VideoPlaylistUpdate } from '../../models/videos/playlist/video-playlist-update.model'
 import { unwrapBody } from '../requests'
 import { AbstractCommand, OverrideCommandOptions } from '../shared'
-import { videoUUIDToId } from './videos'
 
 export class PlaylistsCommand extends AbstractCommand {
 
@@ -185,7 +184,7 @@ export class PlaylistsCommand extends AbstractCommand {
     const attributes = {
       ...options.attributes,
 
-      videoId: await videoUUIDToId(this.server.url, options.attributes.videoId)
+      videoId: await this.server.videos.getId({ ...options, uuid: options.attributes.videoId })
     }
 
     const path = '/api/v1/video-playlists/' + options.playlistId + '/videos'