From 7bca933af0f1b85e289306ae482db8846f94026c Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Fri, 1 Mar 2013 21:44:46 -0500 Subject: added the beginning of a service stack abstraction --- MediaBrowser.Controller/Kernel.cs | 8 -------- MediaBrowser.Controller/Library/IIntroProvider.cs | 19 +++++++++++++++++++ MediaBrowser.Controller/Library/ILibraryManager.cs | 21 +++++++++++++++------ .../MediaBrowser.Controller.csproj | 2 +- MediaBrowser.Controller/Playback/IIntroProvider.cs | 19 ------------------- 5 files changed, 35 insertions(+), 34 deletions(-) create mode 100644 MediaBrowser.Controller/Library/IIntroProvider.cs delete mode 100644 MediaBrowser.Controller/Playback/IIntroProvider.cs (limited to 'MediaBrowser.Controller') diff --git a/MediaBrowser.Controller/Kernel.cs b/MediaBrowser.Controller/Kernel.cs index 275b7868b1..145171fd83 100644 --- a/MediaBrowser.Controller/Kernel.cs +++ b/MediaBrowser.Controller/Kernel.cs @@ -7,7 +7,6 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Localization; using MediaBrowser.Controller.MediaInfo; using MediaBrowser.Controller.Persistence; -using MediaBrowser.Controller.Playback; using MediaBrowser.Controller.Plugins; using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Updates; @@ -86,12 +85,6 @@ namespace MediaBrowser.Controller /// The configuration pages. public IEnumerable PluginConfigurationPages { get; private set; } - /// - /// Gets the intro providers. - /// - /// The intro providers. - public IEnumerable IntroProviders { get; private set; } - /// /// Gets the list of currently registered weather prvoiders /// @@ -210,7 +203,6 @@ namespace MediaBrowser.Controller DisplayPreferencesRepositories = ApplicationHost.GetExports(); ItemRepositories = ApplicationHost.GetExports(); WeatherProviders = ApplicationHost.GetExports(); - IntroProviders = ApplicationHost.GetExports(); PluginConfigurationPages = ApplicationHost.GetExports(); ImageEnhancers = ApplicationHost.GetExports().OrderBy(e => e.Priority).ToArray(); StringFiles = ApplicationHost.GetExports(); diff --git a/MediaBrowser.Controller/Library/IIntroProvider.cs b/MediaBrowser.Controller/Library/IIntroProvider.cs new file mode 100644 index 0000000000..f54c3a3299 --- /dev/null +++ b/MediaBrowser.Controller/Library/IIntroProvider.cs @@ -0,0 +1,19 @@ +using MediaBrowser.Controller.Entities; +using System.Collections.Generic; + +namespace MediaBrowser.Controller.Library +{ + /// + /// Class BaseIntroProvider + /// + public interface IIntroProvider + { + /// + /// Gets the intros. + /// + /// The item. + /// The user. + /// IEnumerable{System.String}. + IEnumerable GetIntros(BaseItem item, User user); + } +} diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index 721b5c216e..64070cb834 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -1,11 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.IO; using MediaBrowser.Controller.Resolvers; using MediaBrowser.Model.Entities; +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; namespace MediaBrowser.Controller.Library { @@ -143,13 +143,22 @@ namespace MediaBrowser.Controller.Library /// BaseItem. BaseItem GetItemById(Guid id, Guid userId); + /// + /// Gets the intros. + /// + /// The item. + /// The user. + /// IEnumerable{System.String}. + IEnumerable GetIntros(BaseItem item, User user); + /// /// Adds the parts. /// /// The rules. /// The plugin folders. /// The resolvers. + /// The intro providers. void AddParts(IEnumerable rules, IEnumerable pluginFolders, - IEnumerable resolvers); + IEnumerable resolvers, IEnumerable introProviders); } } \ No newline at end of file diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 3806defe79..1e55ae78eb 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -132,7 +132,7 @@ - + diff --git a/MediaBrowser.Controller/Playback/IIntroProvider.cs b/MediaBrowser.Controller/Playback/IIntroProvider.cs deleted file mode 100644 index 1f7d12fee9..0000000000 --- a/MediaBrowser.Controller/Playback/IIntroProvider.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MediaBrowser.Controller.Entities; -using System.Collections.Generic; - -namespace MediaBrowser.Controller.Playback -{ - /// - /// Class BaseIntroProvider - /// - public interface IIntroProvider - { - /// - /// Gets the intros. - /// - /// The item. - /// The user. - /// IEnumerable{System.String}. - IEnumerable GetIntros(BaseItem item, User user); - } -} -- cgit v1.2.3