1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

add show method for PlaylistEditor Class

This commit is contained in:
grafixeyehero 2024-02-11 23:32:14 +03:00
parent 675a59adc4
commit d702ad938a
7 changed files with 37 additions and 11 deletions

View file

@ -704,15 +704,20 @@ export default function () {
import('../playlisteditor/playlisteditor').then(({ default: PlaylistEditor }) => {
getSaveablePlaylistItems().then(function (items) {
const serverId = items.length ? items[0].ServerId : ApiClient.serverId();
new PlaylistEditor({
const playlistEditor = new PlaylistEditor();
playlistEditor.show({
items: items.map(function (i) {
return i.Id;
}),
serverId: serverId,
enableAddToPlayQueue: false,
defaultValue: 'new'
}).catch(() => {
// Dialog closed
});
});
}).catch(err => {
console.error('[savePlaylist] failed to load playlist editor', err);
});
}