The Free Software Media System - Server Backend & API
move classes to portable project
Luke Pulverentie58e34ceca52
diff --git a/Emby.Server.Core/ApplicationHost.cs b/Emby.Server.Core/ApplicationHost.csindex 6a0029db1b..6073991b1b 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.csprojindex b323671c1d..653a6a9c15 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.cssimilarity index 92%rename from Emby.Server.Core/FFMpeg/FFMpegInfo.csrename to Emby.Server.Implementations/FFMpeg/FFMpegInfo.csindex fc197cba32..e725d22f51 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 FFMpegInfodiff --git a/Emby.Server.Core/FFMpeg/FFMpegInstallInfo.cs b/Emby.Server.Implementations/FFMpeg/FFMpegInstallInfo.cssimilarity index 91%rename from Emby.Server.Core/FFMpeg/FFMpegInstallInfo.csrename to Emby.Server.Implementations/FFMpeg/FFMpegInstallInfo.csindex f1eaeb8894..1d769acec1 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.cssimilarity index 95%rename from Emby.Server.Core/FFMpeg/FFMpegLoader.csrename to Emby.Server.Implementations/FFMpeg/FFMpegLoader.csindex 6b090102ab..2becebb3d3 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.cssimilarity index 71%rename from Emby.Server.Core/StartupOptions.csrename to Emby.Server.Implementations/StartupOptions.csindex 5da42394d5..159c36248c 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.csindex fd3c9f506d..bb7db6a7cc 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.csindex 9cc13a59e4..39a537e1e3 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.Monovar 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.csindex 0a1470f932..ddbde2f666 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.csindex 328041bc3d..9b634d12b3 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.csindex fa18b52295..b950de1188 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;