mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 17:44:43 +01:00
updated nuget
This commit is contained in:
@@ -334,5 +334,6 @@
|
||||
"OptionNewPlaylist": "New playlist...",
|
||||
"MessageAddedToPlaylistSuccess": "Ok",
|
||||
"ButtonViewSeriesRecording": "View series recording",
|
||||
"ValueOriginalAirDate": "Original air date: {0}"
|
||||
"ValueOriginalAirDate": "Original air date: {0}",
|
||||
"ButtonRemoveFromPlaylist": "Remove from playlist"
|
||||
}
|
||||
|
||||
@@ -190,9 +190,29 @@ namespace MediaBrowser.Server.Implementations.Playlists
|
||||
}, CancellationToken.None).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public Task RemoveFromPlaylist(string playlistId, IEnumerable<int> indeces)
|
||||
public async Task RemoveFromPlaylist(string playlistId, IEnumerable<string> entryIds)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var playlist = _libraryManager.GetItemById(playlistId) as Playlist;
|
||||
|
||||
if (playlist == null)
|
||||
{
|
||||
throw new ArgumentException("No Playlist exists with the supplied Id");
|
||||
}
|
||||
|
||||
var children = playlist.LinkedChildren.ToList();
|
||||
|
||||
var idList = entryIds.ToList();
|
||||
|
||||
var removals = children.Where(i => idList.Contains(i.Id));
|
||||
|
||||
playlist.LinkedChildren = children.Except(removals)
|
||||
.ToList();
|
||||
|
||||
await playlist.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
||||
await playlist.RefreshMetadata(new MetadataRefreshOptions
|
||||
{
|
||||
ForceSave = true
|
||||
}, CancellationToken.None).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public Folder GetPlaylistsFolder(string userId)
|
||||
|
||||
Reference in New Issue
Block a user