implement removing from playlists
This commit is contained in:
parent
a9e5a73d42
commit
6f781f5a96
5 changed files with 43 additions and 11 deletions
|
@ -104,6 +104,23 @@
|
|||
});
|
||||
}
|
||||
|
||||
function removeFromPlaylist(page, ids) {
|
||||
|
||||
ApiClient.ajax({
|
||||
|
||||
url: ApiClient.getUrl('Playlists/' + currentItem.Id + '/Items', {
|
||||
EntryIds: ids.join(',')
|
||||
}),
|
||||
|
||||
type: 'DELETE'
|
||||
|
||||
}).done(function () {
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
// Reset form values using the last used query
|
||||
|
@ -159,6 +176,10 @@
|
|||
|
||||
reloadItems(page);
|
||||
|
||||
}).on('removefromplaylist', function (e, playlistItemId) {
|
||||
|
||||
removeFromPlaylist(page, [playlistItemId]);
|
||||
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', "#playlistEditorPage", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue