From 2884df296c35d615065e6c6ce4685197a424c707 Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Sat, 8 Sep 2012 14:37:55 -0400 Subject: [PATCH] Moved Movies into the main project --- MediaBrowser.Common/Kernel/BaseKernel.cs | 24 ------ .../MediaBrowser.Controller.csproj | 4 + .../Providers/Movies}/MovieProviderFromXml.cs | 13 ++- .../Movies}/MovieSpecialFeaturesProvider.cs | 14 ++-- .../Resolvers/Movies}/BoxSetResolver.cs | 9 +-- .../Resolvers/Movies}/MovieResolver.cs | 9 +-- .../MediaBrowser.InternetProviders.csproj | 8 -- MediaBrowser.Model/Entities/Movies/BoxSet.cs | 7 ++ .../Entities/Movies}/Movie.cs | 3 +- MediaBrowser.Model/MediaBrowser.Model.csproj | 2 + MediaBrowser.Movies/Entities/BoxSet.cs | 8 -- .../MediaBrowser.Movies.csproj | 81 ------------------- MediaBrowser.Movies/Plugin.cs | 15 ---- .../Properties/AssemblyInfo.cs | 36 --------- MediaBrowser.sln | 30 +++---- 15 files changed, 46 insertions(+), 217 deletions(-) rename {MediaBrowser.Movies/Providers => MediaBrowser.Controller/Providers/Movies}/MovieProviderFromXml.cs (79%) rename {MediaBrowser.Movies/Providers => MediaBrowser.Controller/Providers/Movies}/MovieSpecialFeaturesProvider.cs (82%) rename {MediaBrowser.Movies/Resolvers => MediaBrowser.Controller/Resolvers/Movies}/BoxSetResolver.cs (77%) rename {MediaBrowser.Movies/Resolvers => MediaBrowser.Controller/Resolvers/Movies}/MovieResolver.cs (90%) create mode 100644 MediaBrowser.Model/Entities/Movies/BoxSet.cs rename {MediaBrowser.Movies/Entities => MediaBrowser.Model/Entities/Movies}/Movie.cs (85%) delete mode 100644 MediaBrowser.Movies/Entities/BoxSet.cs delete mode 100644 MediaBrowser.Movies/MediaBrowser.Movies.csproj delete mode 100644 MediaBrowser.Movies/Plugin.cs delete mode 100644 MediaBrowser.Movies/Properties/AssemblyInfo.cs diff --git a/MediaBrowser.Common/Kernel/BaseKernel.cs b/MediaBrowser.Common/Kernel/BaseKernel.cs index a4fa91976..b409ba582 100644 --- a/MediaBrowser.Common/Kernel/BaseKernel.cs +++ b/MediaBrowser.Common/Kernel/BaseKernel.cs @@ -150,10 +150,6 @@ namespace MediaBrowser.Common.Kernel /// protected virtual void OnComposablePartsLoaded() { - // This event handler will allow any plugin to reference another - AppDomain.CurrentDomain.AssemblyResolve -= new ResolveEventHandler(CurrentDomain_AssemblyResolve); - AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve); - StartPlugins(); } @@ -215,26 +211,6 @@ namespace MediaBrowser.Common.Kernel }); } - /// - /// This snippet will allow any plugin to reference another - /// - Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) - { - AssemblyName assemblyName = new AssemblyName(args.Name); - - // Look for the .dll recursively within the plugins directory - string dll = Directory.GetFiles(ApplicationPaths.PluginsPath, "*.dll", SearchOption.AllDirectories) - .FirstOrDefault(f => Path.GetFileNameWithoutExtension(f) == assemblyName.Name); - - // If we found a matching assembly, load it now - if (!string.IsNullOrEmpty(dll)) - { - return Assembly.Load(File.ReadAllBytes(dll)); - } - - return null; - } - /// /// Disposes all resources currently in use. /// diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index c5046b9c6..66da56480 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -57,6 +57,10 @@ + + + + diff --git a/MediaBrowser.Movies/Providers/MovieProviderFromXml.cs b/MediaBrowser.Controller/Providers/Movies/MovieProviderFromXml.cs similarity index 79% rename from MediaBrowser.Movies/Providers/MovieProviderFromXml.cs rename to MediaBrowser.Controller/Providers/Movies/MovieProviderFromXml.cs index 0498deb9a..6432ebee8 100644 --- a/MediaBrowser.Movies/Providers/MovieProviderFromXml.cs +++ b/MediaBrowser.Controller/Providers/Movies/MovieProviderFromXml.cs @@ -1,13 +1,12 @@ -using System.ComponentModel.Composition; -using System.IO; -using System.Threading.Tasks; -using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Providers; +using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Xml; using MediaBrowser.Model.Entities; -using MediaBrowser.Movies.Entities; +using MediaBrowser.Model.Entities.Movies; +using System.ComponentModel.Composition; +using System.IO; +using System.Threading.Tasks; -namespace MediaBrowser.Movies.Providers +namespace MediaBrowser.Controller.Providers.Movies { [Export(typeof(BaseMetadataProvider))] public class MovieProviderFromXml : BaseMetadataProvider diff --git a/MediaBrowser.Movies/Providers/MovieSpecialFeaturesProvider.cs b/MediaBrowser.Controller/Providers/Movies/MovieSpecialFeaturesProvider.cs similarity index 82% rename from MediaBrowser.Movies/Providers/MovieSpecialFeaturesProvider.cs rename to MediaBrowser.Controller/Providers/Movies/MovieSpecialFeaturesProvider.cs index a70c56747..cb028602e 100644 --- a/MediaBrowser.Movies/Providers/MovieSpecialFeaturesProvider.cs +++ b/MediaBrowser.Controller/Providers/Movies/MovieSpecialFeaturesProvider.cs @@ -1,15 +1,13 @@ -using System.Collections.Generic; +using MediaBrowser.Controller.IO; +using MediaBrowser.Controller.Library; +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Entities.Movies; +using System.Collections.Generic; using System.ComponentModel.Composition; using System.IO; using System.Threading.Tasks; -using MediaBrowser.Controller; -using MediaBrowser.Controller.IO; -using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Providers; -using MediaBrowser.Model.Entities; -using MediaBrowser.Movies.Entities; -namespace MediaBrowser.Movies.Providers +namespace MediaBrowser.Controller.Providers.Movies { [Export(typeof(BaseMetadataProvider))] public class MovieSpecialFeaturesProvider : BaseMetadataProvider diff --git a/MediaBrowser.Movies/Resolvers/BoxSetResolver.cs b/MediaBrowser.Controller/Resolvers/Movies/BoxSetResolver.cs similarity index 77% rename from MediaBrowser.Movies/Resolvers/BoxSetResolver.cs rename to MediaBrowser.Controller/Resolvers/Movies/BoxSetResolver.cs index 5e0e7488e..ad18762af 100644 --- a/MediaBrowser.Movies/Resolvers/BoxSetResolver.cs +++ b/MediaBrowser.Controller/Resolvers/Movies/BoxSetResolver.cs @@ -1,11 +1,10 @@ -using System; +using MediaBrowser.Controller.Library; +using MediaBrowser.Model.Entities.Movies; +using System; using System.ComponentModel.Composition; using System.IO; -using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Resolvers; -using MediaBrowser.Movies.Entities; -namespace MediaBrowser.Movies.Resolvers +namespace MediaBrowser.Controller.Resolvers.Movies { [Export(typeof(IBaseItemResolver))] public class BoxSetResolver : BaseFolderResolver diff --git a/MediaBrowser.Movies/Resolvers/MovieResolver.cs b/MediaBrowser.Controller/Resolvers/Movies/MovieResolver.cs similarity index 90% rename from MediaBrowser.Movies/Resolvers/MovieResolver.cs rename to MediaBrowser.Controller/Resolvers/Movies/MovieResolver.cs index ddf8ba87f..0f2e81b34 100644 --- a/MediaBrowser.Movies/Resolvers/MovieResolver.cs +++ b/MediaBrowser.Controller/Resolvers/Movies/MovieResolver.cs @@ -1,11 +1,10 @@ -using System.ComponentModel.Composition; -using MediaBrowser.Controller.IO; +using MediaBrowser.Controller.IO; using MediaBrowser.Controller.Library; -using MediaBrowser.Controller.Resolvers; using MediaBrowser.Model.Entities; -using MediaBrowser.Movies.Entities; +using MediaBrowser.Model.Entities.Movies; +using System.ComponentModel.Composition; -namespace MediaBrowser.Movies.Resolvers +namespace MediaBrowser.Controller.Resolvers.Movies { [Export(typeof(IBaseItemResolver))] public class MovieResolver : BaseVideoResolver diff --git a/MediaBrowser.InternetProviders/MediaBrowser.InternetProviders.csproj b/MediaBrowser.InternetProviders/MediaBrowser.InternetProviders.csproj index ec180c980..48453467f 100644 --- a/MediaBrowser.InternetProviders/MediaBrowser.InternetProviders.csproj +++ b/MediaBrowser.InternetProviders/MediaBrowser.InternetProviders.csproj @@ -60,14 +60,6 @@ {7eeeb4bb-f3e8-48fc-b4c5-70f0fff8329b} MediaBrowser.Model - - {92b9f802-4415-438f-90e1-44602135ea41} - MediaBrowser.Movies - - - {32dfc600-cd2f-4b2d-b39a-3b4c6c32f9b4} - MediaBrowser.TV - diff --git a/MediaBrowser.Model/Entities/Movies/BoxSet.cs b/MediaBrowser.Model/Entities/Movies/BoxSet.cs new file mode 100644 index 000000000..35097fd61 --- /dev/null +++ b/MediaBrowser.Model/Entities/Movies/BoxSet.cs @@ -0,0 +1,7 @@ + +namespace MediaBrowser.Model.Entities.Movies +{ + public class BoxSet : Folder + { + } +} diff --git a/MediaBrowser.Movies/Entities/Movie.cs b/MediaBrowser.Model/Entities/Movies/Movie.cs similarity index 85% rename from MediaBrowser.Movies/Entities/Movie.cs rename to MediaBrowser.Model/Entities/Movies/Movie.cs index 29b85f06c..23203da94 100644 --- a/MediaBrowser.Movies/Entities/Movie.cs +++ b/MediaBrowser.Model/Entities/Movies/Movie.cs @@ -1,9 +1,8 @@ using System; using System.Collections.Generic; using System.Linq; -using MediaBrowser.Model.Entities; -namespace MediaBrowser.Movies.Entities +namespace MediaBrowser.Model.Entities.Movies { public class Movie : Video { diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index 8b51f6ec4..aeb75d7f1 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -50,6 +50,8 @@ + + diff --git a/MediaBrowser.Movies/Entities/BoxSet.cs b/MediaBrowser.Movies/Entities/BoxSet.cs deleted file mode 100644 index ed6cb1401..000000000 --- a/MediaBrowser.Movies/Entities/BoxSet.cs +++ /dev/null @@ -1,8 +0,0 @@ -using MediaBrowser.Model.Entities; - -namespace MediaBrowser.Movies.Entities -{ - public class BoxSet : Folder - { - } -} diff --git a/MediaBrowser.Movies/MediaBrowser.Movies.csproj b/MediaBrowser.Movies/MediaBrowser.Movies.csproj deleted file mode 100644 index 91b97e594..000000000 --- a/MediaBrowser.Movies/MediaBrowser.Movies.csproj +++ /dev/null @@ -1,81 +0,0 @@ - - - - - Debug - AnyCPU - {92B9F802-4415-438F-90E1-44602135EA41} - Library - Properties - MediaBrowser.Movies - MediaBrowser.Movies - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - Always - - - - - - - - - - - - - - - - - - - - - - - - - {9142eefa-7570-41e1-bfcc-468bb571af2f} - MediaBrowser.Common - - - {17e1f4e6-8abd-4fe5-9ecf-43d4b6087ba2} - MediaBrowser.Controller - - - {7eeeb4bb-f3e8-48fc-b4c5-70f0fff8329b} - MediaBrowser.Model - - - - - xcopy "$(TargetPath)" "$(SolutionDir)\ProgramData\Plugins\" /y - - - \ No newline at end of file diff --git a/MediaBrowser.Movies/Plugin.cs b/MediaBrowser.Movies/Plugin.cs deleted file mode 100644 index 07dfce47b..000000000 --- a/MediaBrowser.Movies/Plugin.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.ComponentModel.Composition; -using MediaBrowser.Common.Plugins; -using MediaBrowser.Model.Plugins; - -namespace MediaBrowser.Movies -{ - [Export(typeof(BasePlugin))] - public class Plugin : BaseGenericPlugin - { - public override string Name - { - get { return "Movies"; } - } - } -} diff --git a/MediaBrowser.Movies/Properties/AssemblyInfo.cs b/MediaBrowser.Movies/Properties/AssemblyInfo.cs deleted file mode 100644 index 351928efc..000000000 --- a/MediaBrowser.Movies/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("MediaBrowser.Movies")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MediaBrowser.Movies")] -[assembly: AssemblyCopyright("Copyright © 2012")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("e7616f1d-840f-4ada-bc58-e885035fbc1b")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/MediaBrowser.sln b/MediaBrowser.sln index c97592868..fd758fedb 100644 --- a/MediaBrowser.sln +++ b/MediaBrowser.sln @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Controller", "MediaBrowser.Controller\MediaBrowser.Controller.csproj", "{17E1F4E6-8ABD-4FE5-9ECF-43D4B6087BA2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Movies", "MediaBrowser.Movies\MediaBrowser.Movies.csproj", "{92B9F802-4415-438F-90E1-44602135EA41}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.TV", "MediaBrowser.TV\MediaBrowser.TV.csproj", "{32DFC600-CD2F-4B2D-B39A-3B4C6C32F9B4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Api", "MediaBrowser.Api\MediaBrowser.Api.csproj", "{4FD51AC5-2C16-4308-A993-C3A84F3B4582}" @@ -30,10 +28,6 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {156EA256-AD2D-4D2F-B116-2ED4B9EFD869}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {156EA256-AD2D-4D2F-B116-2ED4B9EFD869}.Debug|Any CPU.Build.0 = Debug|Any CPU - {156EA256-AD2D-4D2F-B116-2ED4B9EFD869}.Release|Any CPU.ActiveCfg = Release|Any CPU - {156EA256-AD2D-4D2F-B116-2ED4B9EFD869}.Release|Any CPU.Build.0 = Release|Any CPU {17E1F4E6-8ABD-4FE5-9ECF-43D4B6087BA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {17E1F4E6-8ABD-4FE5-9ECF-43D4B6087BA2}.Debug|Any CPU.Build.0 = Debug|Any CPU {17E1F4E6-8ABD-4FE5-9ECF-43D4B6087BA2}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -46,26 +40,26 @@ Global {4FD51AC5-2C16-4308-A993-C3A84F3B4582}.Debug|Any CPU.Build.0 = Debug|Any CPU {4FD51AC5-2C16-4308-A993-C3A84F3B4582}.Release|Any CPU.ActiveCfg = Release|Any CPU {4FD51AC5-2C16-4308-A993-C3A84F3B4582}.Release|Any CPU.Build.0 = Release|Any CPU - {5624B7B5-B5A7-41D8-9F10-CC5611109619}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5624B7B5-B5A7-41D8-9F10-CC5611109619}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5624B7B5-B5A7-41D8-9F10-CC5611109619}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5624B7B5-B5A7-41D8-9F10-CC5611109619}.Release|Any CPU.Build.0 = Release|Any CPU {5758B2C7-949A-421D-B268-70A950CF8741}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5758B2C7-949A-421D-B268-70A950CF8741}.Debug|Any CPU.Build.0 = Debug|Any CPU {5758B2C7-949A-421D-B268-70A950CF8741}.Release|Any CPU.ActiveCfg = Release|Any CPU {5758B2C7-949A-421D-B268-70A950CF8741}.Release|Any CPU.Build.0 = Release|Any CPU - {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Release|Any CPU.Build.0 = Release|Any CPU {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Debug|Any CPU.Build.0 = Debug|Any CPU {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Release|Any CPU.ActiveCfg = Release|Any CPU {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Release|Any CPU.Build.0 = Release|Any CPU - {92B9F802-4415-438F-90E1-44602135EA41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {92B9F802-4415-438F-90E1-44602135EA41}.Debug|Any CPU.Build.0 = Debug|Any CPU - {92B9F802-4415-438F-90E1-44602135EA41}.Release|Any CPU.ActiveCfg = Release|Any CPU - {92B9F802-4415-438F-90E1-44602135EA41}.Release|Any CPU.Build.0 = Release|Any CPU + {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Release|Any CPU.Build.0 = Release|Any CPU + {156EA256-AD2D-4D2F-B116-2ED4B9EFD869}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {156EA256-AD2D-4D2F-B116-2ED4B9EFD869}.Debug|Any CPU.Build.0 = Debug|Any CPU + {156EA256-AD2D-4D2F-B116-2ED4B9EFD869}.Release|Any CPU.ActiveCfg = Release|Any CPU + {156EA256-AD2D-4D2F-B116-2ED4B9EFD869}.Release|Any CPU.Build.0 = Release|Any CPU + {5624B7B5-B5A7-41D8-9F10-CC5611109619}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5624B7B5-B5A7-41D8-9F10-CC5611109619}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5624B7B5-B5A7-41D8-9F10-CC5611109619}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5624B7B5-B5A7-41D8-9F10-CC5611109619}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE