diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-18 16:06:00 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-18 16:06:00 -0500 |
| commit | e58e34ceca52914bd2475c76ede5f7ee91964d00 (patch) | |
| tree | 963560d56662ddc2145c774ec36cc7d6458ca601 | |
| parent | c6f1bd93fc3c6aab16d5ba2c0ceeddb9303d029d (diff) | |
move classes to portable project
| -rw-r--r-- | Emby.Server.Core/ApplicationHost.cs | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Emby.Server.Implementations.csproj | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/FFMpeg/FFMpegInfo.cs (renamed from Emby.Server.Core/FFMpeg/FFMpegInfo.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/FFMpeg/FFMpegInstallInfo.cs (renamed from Emby.Server.Core/FFMpeg/FFMpegInstallInfo.cs) | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs (renamed from Emby.Server.Core/FFMpeg/FFMpegLoader.cs) | 14 | ||||
| -rw-r--r-- | Emby.Server.Implementations/StartupOptions.cs (renamed from Emby.Server.Core/StartupOptions.cs) | 9 | ||||
| -rw-r--r-- | MediaBrowser.Server.Mono/MonoAppHost.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Server.Mono/Program.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/ImageEncoderHelper.cs | 1 | ||||
| -rw-r--r-- | MediaBrowser.ServerApplication/MainStartup.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.ServerApplication/WindowsAppHost.cs | 3 |
11 files changed, 31 insertions, 17 deletions
diff --git a/Emby.Server.Core/ApplicationHost.cs b/Emby.Server.Core/ApplicationHost.cs index 6a0029db1..6073991b1 100644 --- a/Emby.Server.Core/ApplicationHost.cs +++ b/Emby.Server.Core/ApplicationHost.cs @@ -87,7 +87,7 @@ using Emby.Server.Implementations.Activity; using Emby.Server.Core.Configuration; using Emby.Server.Core.Data; using Emby.Server.Implementations.Devices; -using Emby.Server.Core.FFMpeg; +using Emby.Server.Implementations.FFMpeg; using Emby.Server.Core.IO; using Emby.Server.Core.Localization; using Emby.Server.Core.Migrations; @@ -109,7 +109,7 @@ using Emby.Server.Implementations.MediaEncoder; using Emby.Server.Implementations.Notifications; using Emby.Server.Implementations.Data; using Emby.Server.Implementations.Playlists; -using Emby.Server.Implementations.Security; +using Emby.Server.Implementations; using Emby.Server.Implementations.ServerManager; using Emby.Server.Implementations.Session; using Emby.Server.Implementations.Social; diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index b323671c1..653a6a9c1 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -69,6 +69,9 @@ <Compile Include="EntryPoints\UsageEntryPoint.cs" /> <Compile Include="EntryPoints\UsageReporter.cs" /> <Compile Include="EntryPoints\UserDataChangeNotifier.cs" /> + <Compile Include="FFMpeg\FFMpegInfo.cs" /> + <Compile Include="FFMpeg\FFMpegInstallInfo.cs" /> + <Compile Include="FFMpeg\FFMpegLoader.cs" /> <Compile Include="FileOrganization\EpisodeFileOrganizer.cs" /> <Compile Include="FileOrganization\Extensions.cs" /> <Compile Include="FileOrganization\FileOrganizationNotifier.cs" /> @@ -239,6 +242,7 @@ <Compile Include="Sorting\SortNameComparer.cs" /> <Compile Include="Sorting\StartDateComparer.cs" /> <Compile Include="Sorting\StudioComparer.cs" /> + <Compile Include="StartupOptions.cs" /> <Compile Include="Sync\AppSyncProvider.cs" /> <Compile Include="Sync\CloudSyncProfile.cs" /> <Compile Include="Sync\IHasSyncQuality.cs" /> diff --git a/Emby.Server.Core/FFMpeg/FFMpegInfo.cs b/Emby.Server.Implementations/FFMpeg/FFMpegInfo.cs index fc197cba3..e725d22f5 100644 --- a/Emby.Server.Core/FFMpeg/FFMpegInfo.cs +++ b/Emby.Server.Implementations/FFMpeg/FFMpegInfo.cs @@ -1,4 +1,4 @@ -namespace Emby.Server.Core.FFMpeg +namespace Emby.Server.Implementations.FFMpeg { /// <summary> /// Class FFMpegInfo diff --git a/Emby.Server.Core/FFMpeg/FFMpegInstallInfo.cs b/Emby.Server.Implementations/FFMpeg/FFMpegInstallInfo.cs index f1eaeb889..1d769acec 100644 --- a/Emby.Server.Core/FFMpeg/FFMpegInstallInfo.cs +++ b/Emby.Server.Implementations/FFMpeg/FFMpegInstallInfo.cs @@ -1,5 +1,5 @@ -namespace Emby.Server.Core.FFMpeg +namespace Emby.Server.Implementations.FFMpeg { public class FFMpegInstallInfo { diff --git a/Emby.Server.Core/FFMpeg/FFMpegLoader.cs b/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs index 6b090102a..2becebb3d 100644 --- a/Emby.Server.Core/FFMpeg/FFMpegLoader.cs +++ b/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs @@ -8,10 +8,10 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; -using Emby.Server.Core; -using Emby.Server.Core.FFMpeg; +using Emby.Server.Implementations; +using Emby.Server.Implementations.FFMpeg; -namespace Emby.Server.Core.FFMpeg +namespace Emby.Server.Implementations.FFMpeg { public class FFMpegLoader { @@ -119,11 +119,11 @@ namespace Emby.Server.Core.FFMpeg { var encoderFilename = Path.GetFileName(info.EncoderPath); var probeFilename = Path.GetFileName(info.ProbePath); - - foreach (var directory in Directory.EnumerateDirectories(rootEncoderPath, "*", SearchOption.TopDirectoryOnly) + + foreach (var directory in _fileSystem.GetDirectoryPaths(rootEncoderPath) .ToList()) { - var allFiles = Directory.EnumerateFiles(directory, "*", SearchOption.AllDirectories).ToList(); + var allFiles = _fileSystem.GetFilePaths(directory, true).ToList(); var encoder = allFiles.FirstOrDefault(i => string.Equals(Path.GetFileName(i), encoderFilename, StringComparison.OrdinalIgnoreCase)); var probe = allFiles.FirstOrDefault(i => string.Equals(Path.GetFileName(i), probeFilename, StringComparison.OrdinalIgnoreCase)); @@ -182,7 +182,7 @@ namespace Emby.Server.Core.FFMpeg { ExtractArchive(downloadinfo, tempFile, tempFolder); - var files = Directory.EnumerateFiles(tempFolder, "*", SearchOption.AllDirectories) + var files = _fileSystem.GetFilePaths(tempFolder, true) .ToList(); foreach (var file in files.Where(i => diff --git a/Emby.Server.Core/StartupOptions.cs b/Emby.Server.Implementations/StartupOptions.cs index 5da42394d..159c36248 100644 --- a/Emby.Server.Core/StartupOptions.cs +++ b/Emby.Server.Implementations/StartupOptions.cs @@ -2,11 +2,16 @@ using System.Collections.Generic; using System.Linq; -namespace Emby.Server.Core +namespace Emby.Server.Implementations { public class StartupOptions { - private readonly List<string> _options = Environment.GetCommandLineArgs().ToList(); + private readonly List<string> _options; + + public StartupOptions(string[] commandLineArgs) + { + _options = commandLineArgs.ToList(); + } public bool ContainsOption(string option) { diff --git a/MediaBrowser.Server.Mono/MonoAppHost.cs b/MediaBrowser.Server.Mono/MonoAppHost.cs index fd3c9f506..bb7db6a7c 100644 --- a/MediaBrowser.Server.Mono/MonoAppHost.cs +++ b/MediaBrowser.Server.Mono/MonoAppHost.cs @@ -3,7 +3,8 @@ using System.Collections.Generic; using System.Reflection; using Emby.Server.Core; using Emby.Server.Core.Data; -using Emby.Server.Core.FFMpeg; +using Emby.Server.Implementations; +using Emby.Server.Implementations.FFMpeg; using MediaBrowser.IsoMounter; using MediaBrowser.Model.IO; using MediaBrowser.Model.Logging; diff --git a/MediaBrowser.Server.Mono/Program.cs b/MediaBrowser.Server.Mono/Program.cs index 9cc13a59e..39a537e1e 100644 --- a/MediaBrowser.Server.Mono/Program.cs +++ b/MediaBrowser.Server.Mono/Program.cs @@ -16,6 +16,7 @@ using Emby.Common.Implementations.Logging; using Emby.Common.Implementations.Networking; using Emby.Common.Implementations.Security; using Emby.Server.Core; +using Emby.Server.Implementations; using Emby.Server.Implementations.IO; using MediaBrowser.Model.System; using MediaBrowser.Server.Startup.Common.IO; @@ -38,7 +39,7 @@ namespace MediaBrowser.Server.Mono var applicationPath = Assembly.GetEntryAssembly().Location; - var options = new StartupOptions(); + var options = new StartupOptions(Environment.GetCommandLineArgs()); // Allow this to be specified on the command line. var customProgramDataPath = options.GetOption("-programdata"); diff --git a/MediaBrowser.Server.Startup.Common/ImageEncoderHelper.cs b/MediaBrowser.Server.Startup.Common/ImageEncoderHelper.cs index 0a1470f93..ddbde2f66 100644 --- a/MediaBrowser.Server.Startup.Common/ImageEncoderHelper.cs +++ b/MediaBrowser.Server.Startup.Common/ImageEncoderHelper.cs @@ -3,6 +3,7 @@ using Emby.Drawing; using Emby.Drawing.Net; using Emby.Drawing.ImageMagick; using Emby.Server.Core; +using Emby.Server.Implementations; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Net; using MediaBrowser.Controller.Drawing; diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs index 328041bc3..9b634d12b 100644 --- a/MediaBrowser.ServerApplication/MainStartup.cs +++ b/MediaBrowser.ServerApplication/MainStartup.cs @@ -24,6 +24,7 @@ using Emby.Common.Implementations.Networking; using Emby.Common.Implementations.Security; using Emby.Server.Core; using Emby.Server.Core.Browser; +using Emby.Server.Implementations; using Emby.Server.Implementations.IO; using ImageMagickSharp; using MediaBrowser.Common.Net; @@ -73,7 +74,7 @@ namespace MediaBrowser.ServerApplication /// </summary> public static void Main() { - var options = new StartupOptions(); + var options = new StartupOptions(Environment.GetCommandLineArgs()); IsRunningAsService = options.ContainsOption("-service"); if (IsRunningAsService) diff --git a/MediaBrowser.ServerApplication/WindowsAppHost.cs b/MediaBrowser.ServerApplication/WindowsAppHost.cs index fa18b5229..b950de118 100644 --- a/MediaBrowser.ServerApplication/WindowsAppHost.cs +++ b/MediaBrowser.ServerApplication/WindowsAppHost.cs @@ -5,8 +5,9 @@ using System.IO; using System.Reflection; using Emby.Server.Core; using Emby.Server.Core.Data; -using Emby.Server.Core.FFMpeg; +using Emby.Server.Implementations; using Emby.Server.Implementations.EntryPoints; +using Emby.Server.Implementations.FFMpeg; using MediaBrowser.Model.IO; using MediaBrowser.Model.Logging; using MediaBrowser.Model.System; |
