mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Fix playlist elements merge on import
This commit is contained in:
parent
aff87c12ff
commit
7be401ac76
6 changed files with 85 additions and 51 deletions
|
@ -14,6 +14,7 @@ import {
|
|||
VideoPlaylistPrivacy,
|
||||
VideoPlaylistPrivacyType,
|
||||
VideoPlaylistReorder,
|
||||
VideoPlaylistType,
|
||||
VideoPlaylistType_Type,
|
||||
VideoPlaylistUpdate
|
||||
} from '@peertube/peertube-models'
|
||||
|
@ -82,6 +83,8 @@ export class PlaylistsCommand extends AbstractCommand {
|
|||
})
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
get (options: OverrideCommandOptions & {
|
||||
playlistId: number | string
|
||||
}) {
|
||||
|
@ -97,6 +100,20 @@ export class PlaylistsCommand extends AbstractCommand {
|
|||
})
|
||||
}
|
||||
|
||||
async getWatchLater (options: OverrideCommandOptions & {
|
||||
handle: string
|
||||
}) {
|
||||
const { data: playlists } = await this.listByAccount({
|
||||
...options,
|
||||
|
||||
playlistType: VideoPlaylistType.WATCH_LATER
|
||||
})
|
||||
|
||||
return playlists[0]
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
listVideos (options: OverrideCommandOptions & {
|
||||
playlistId: number | string
|
||||
start?: number
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue