aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-08-11 19:41:11 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-08-11 19:41:11 -0400
commit9b92cc20f2a365018b349e1aba87fdd74e21f965 (patch)
tree0bef382517fd114892a5c4477b6e57e95c664020 /MediaBrowser.Server.Implementations
parent7bff6661362e4a5959eec2cab5323ca880df2ad7 (diff)
implement removing from playlists
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs2
-rw-r--r--MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs6
-rw-r--r--MediaBrowser.Server.Implementations/Playlists/ManualPlaylistsFolder.cs4
-rw-r--r--MediaBrowser.Server.Implementations/Playlists/PlaylistManager.cs5
4 files changed, 10 insertions, 7 deletions
diff --git a/MediaBrowser.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs b/MediaBrowser.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs
index ee75e4d05..c6ecfc250 100644
--- a/MediaBrowser.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs
+++ b/MediaBrowser.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs
@@ -42,7 +42,7 @@ namespace MediaBrowser.Server.Implementations.Channels
{
return new ITaskTrigger[]
{
- new StartupTrigger(),
+ new StartupTrigger{DelayMs = 10000},
new SystemEventTrigger{ SystemEvent = SystemEvent.WakeFromSleep},
diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs b/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs
index 0e18fa465..b8290fda7 100644
--- a/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs
+++ b/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs
@@ -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
});
}
}
diff --git a/MediaBrowser.Server.Implementations/Playlists/ManualPlaylistsFolder.cs b/MediaBrowser.Server.Implementations/Playlists/ManualPlaylistsFolder.cs
index a87edde7b..e7e53181c 100644
--- a/MediaBrowser.Server.Implementations/Playlists/ManualPlaylistsFolder.cs
+++ b/MediaBrowser.Server.Implementations/Playlists/ManualPlaylistsFolder.cs
@@ -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;
diff --git a/MediaBrowser.Server.Implementations/Playlists/PlaylistManager.cs b/MediaBrowser.Server.Implementations/Playlists/PlaylistManager.cs
index d46177352..3cdea0793 100644
--- a/MediaBrowser.Server.Implementations/Playlists/PlaylistManager.cs
+++ b/MediaBrowser.Server.Implementations/Playlists/PlaylistManager.cs
@@ -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);