From 51b01d0f6d21bf31a093cf7d8f88e31aba884288 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 23 Sep 2013 14:53:06 -0400 Subject: [PATCH] updated nuget --- .../ScheduledTasks/TaskManager.cs | 15 +++++++++++++-- .../ScheduledTasks/ITaskManager.cs | 7 +++++++ MediaBrowser.ServerApplication/ApplicationHost.cs | 2 +- .../{DotNetZipClient.cs => ZipClient.cs} | 2 +- .../MediaBrowser.ServerApplication.csproj | 2 +- Nuget/MediaBrowser.Common.Internal.nuspec | 4 ++-- Nuget/MediaBrowser.Common.nuspec | 2 +- Nuget/MediaBrowser.Server.Core.nuspec | 4 ++-- 8 files changed, 28 insertions(+), 10 deletions(-) rename MediaBrowser.ServerApplication/Implementations/{DotNetZipClient.cs => ZipClient.cs} (97%) diff --git a/MediaBrowser.Common.Implementations/ScheduledTasks/TaskManager.cs b/MediaBrowser.Common.Implementations/ScheduledTasks/TaskManager.cs index 8278c8a28..6605432fa 100644 --- a/MediaBrowser.Common.Implementations/ScheduledTasks/TaskManager.cs +++ b/MediaBrowser.Common.Implementations/ScheduledTasks/TaskManager.cs @@ -1,5 +1,4 @@ -using System.Threading.Tasks; -using MediaBrowser.Common.Configuration; +using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Events; using MediaBrowser.Common.ScheduledTasks; using MediaBrowser.Model.Logging; @@ -8,6 +7,7 @@ using MediaBrowser.Model.Tasks; using System; using System.Collections.Generic; using System.Linq; +using System.Threading.Tasks; namespace MediaBrowser.Common.Implementations.ScheduledTasks { @@ -77,6 +77,17 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks QueueScheduledTask(); } + /// + /// Cancels if running + /// + /// + public void CancelIfRunning() + where T : IScheduledTask + { + var task = ScheduledTasks.First(t => t.ScheduledTask.GetType() == typeof(T)); + ((ScheduledTaskWorker)task).CancelIfRunning(); + } + /// /// Queues the scheduled task. /// diff --git a/MediaBrowser.Common/ScheduledTasks/ITaskManager.cs b/MediaBrowser.Common/ScheduledTasks/ITaskManager.cs index ec0e7c1c9..394872783 100644 --- a/MediaBrowser.Common/ScheduledTasks/ITaskManager.cs +++ b/MediaBrowser.Common/ScheduledTasks/ITaskManager.cs @@ -21,6 +21,13 @@ namespace MediaBrowser.Common.ScheduledTasks void CancelIfRunningAndQueue() where T : IScheduledTask; + /// + /// Cancels if running. + /// + /// + void CancelIfRunning() + where T : IScheduledTask; + /// /// Queues the scheduled task. /// diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs index eeea9392c..7a99693a6 100644 --- a/MediaBrowser.ServerApplication/ApplicationHost.cs +++ b/MediaBrowser.ServerApplication/ApplicationHost.cs @@ -255,7 +255,7 @@ namespace MediaBrowser.ServerApplication RegisterSingleInstance(() => new BdInfoExaminer()); - ZipClient = new DotNetZipClient(); + ZipClient = new ZipClient(); RegisterSingleInstance(ZipClient); var mediaEncoderTask = RegisterMediaEncoder(); diff --git a/MediaBrowser.ServerApplication/Implementations/DotNetZipClient.cs b/MediaBrowser.ServerApplication/Implementations/ZipClient.cs similarity index 97% rename from MediaBrowser.ServerApplication/Implementations/DotNetZipClient.cs rename to MediaBrowser.ServerApplication/Implementations/ZipClient.cs index 4a9afac3f..e9e8645e9 100644 --- a/MediaBrowser.ServerApplication/Implementations/DotNetZipClient.cs +++ b/MediaBrowser.ServerApplication/Implementations/ZipClient.cs @@ -8,7 +8,7 @@ namespace MediaBrowser.ServerApplication.Implementations /// /// Class DotNetZipClient /// - public class DotNetZipClient : IZipClient + public class ZipClient : IZipClient { /// /// Extracts all. diff --git a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj index cc799f6ba..793489c1f 100644 --- a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj +++ b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj @@ -245,7 +245,7 @@ Code - + LibraryExplorer.xaml diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec index d3fd7a35e..eb846cd2f 100644 --- a/Nuget/MediaBrowser.Common.Internal.nuspec +++ b/Nuget/MediaBrowser.Common.Internal.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common.Internal - 3.0.207 + 3.0.208 MediaBrowser.Common.Internal Luke ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption. Copyright © Media Browser 2013 - + diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec index 5cddfbc76..ba211c3d6 100644 --- a/Nuget/MediaBrowser.Common.nuspec +++ b/Nuget/MediaBrowser.Common.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common - 3.0.207 + 3.0.208 MediaBrowser.Common Media Browser Team ebr,Luke,scottisafool diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec index 0c738ce93..c6f801a9b 100644 --- a/Nuget/MediaBrowser.Server.Core.nuspec +++ b/Nuget/MediaBrowser.Server.Core.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Server.Core - 3.0.207 + 3.0.208 Media Browser.Server.Core Media Browser Team ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains core components required to build plugins for Media Browser Server. Copyright © Media Browser 2013 - +