mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 00:55:13 +01:00
implement removing from playlists
This commit is contained in:
@@ -42,7 +42,7 @@ namespace MediaBrowser.Server.Implementations.Channels
|
||||
{
|
||||
return new ITaskTrigger[]
|
||||
{
|
||||
new StartupTrigger(),
|
||||
new StartupTrigger{DelayMs = 10000},
|
||||
|
||||
new SystemEventTrigger{ SystemEvent = SystemEvent.WakeFromSleep},
|
||||
|
||||
|
||||
@@ -195,7 +195,8 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
|
||||
{
|
||||
Name = string.Format(_localization.GetLocalizedString("FailedLoginAttemptWithUserName"), e.Argument.Username),
|
||||
Type = "AuthenticationFailed",
|
||||
ShortOverview = string.Format(_localization.GetLocalizedString("LabelIpAddressValue"), e.Argument.RemoteEndPoint)
|
||||
ShortOverview = string.Format(_localization.GetLocalizedString("LabelIpAddressValue"), e.Argument.RemoteEndPoint),
|
||||
Severity = LogSeverity.Error
|
||||
});
|
||||
}
|
||||
|
||||
@@ -427,7 +428,8 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
|
||||
Name = string.Format(_localization.GetLocalizedString("ScheduledTaskFailedWithName"), task.Name),
|
||||
Type = "ScheduledTaskFailed",
|
||||
Overview = string.Join(Environment.NewLine, vals.ToArray()),
|
||||
ShortOverview = runningTime
|
||||
ShortOverview = runningTime,
|
||||
Severity = LogSeverity.Error
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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