mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
implement removing from playlists
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Playlists;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
@@ -193,13 +193,14 @@ namespace MediaBrowser.Server.Implementations.Playlists
|
||||
throw new ArgumentException("No Playlist exists with the supplied Id");
|
||||
}
|
||||
|
||||
var children = playlist.LinkedChildren.ToList();
|
||||
var children = playlist.GetManageableItems().ToList();
|
||||
|
||||
var idList = entryIds.ToList();
|
||||
|
||||
var removals = children.Where(i => idList.Contains(i.Id));
|
||||
var removals = children.Where(i => idList.Contains(i.Item1.Id));
|
||||
|
||||
playlist.LinkedChildren = children.Except(removals)
|
||||
.Select(i => i.Item1)
|
||||
.ToList();
|
||||
|
||||
await playlist.UpdateToRepository(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
||||
|
||||
Reference in New Issue
Block a user