1
0
Fork 0
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:
Chocobozzz 2024-02-28 15:55:37 +01:00
parent aff87c12ff
commit 7be401ac76
No known key found for this signature in database
GPG key ID: 583A612D890159BE
6 changed files with 85 additions and 51 deletions

View file

@ -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