diff --git a/Emby.Common.Implementations/Cryptography/CryptographyProvider.cs b/Emby.Common.Implementations/Cryptography/CryptographyProvider.cs index 5ece28dc67..e5e4b1c7c1 100644 --- a/Emby.Common.Implementations/Cryptography/CryptographyProvider.cs +++ b/Emby.Common.Implementations/Cryptography/CryptographyProvider.cs @@ -19,6 +19,15 @@ namespace Emby.Common.Implementations.Cryptography return provider.ComputeHash(Encoding.Unicode.GetBytes(str)); } } + + public byte[] GetSHA1Bytes(byte[] bytes) + { + using (var provider = SHA1.Create()) + { + return provider.ComputeHash(bytes); + } + } + public byte[] GetMD5Bytes(Stream str) { using (var provider = MD5.Create()) diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs similarity index 99% rename from MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs rename to Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs index 51f5f57b3e..11fd3a872e 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs +++ b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs @@ -19,7 +19,7 @@ using System.Linq; using System.Text; using MediaBrowser.Model.Globalization; -namespace MediaBrowser.Server.Implementations.EntryPoints +namespace Emby.Server.Implementations.Activity { public class ActivityLogEntryPoint : IServerEntryPoint { diff --git a/MediaBrowser.Server.Implementations/Collections/CollectionImageProvider.cs b/Emby.Server.Implementations/Collections/CollectionImageProvider.cs similarity index 94% rename from MediaBrowser.Server.Implementations/Collections/CollectionImageProvider.cs rename to Emby.Server.Implementations/Collections/CollectionImageProvider.cs index d70d4b9e65..b82d4e44e0 100644 --- a/MediaBrowser.Server.Implementations/Collections/CollectionImageProvider.cs +++ b/Emby.Server.Implementations/Collections/CollectionImageProvider.cs @@ -6,16 +6,14 @@ using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -using MediaBrowser.Server.Implementations.Photos; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using MediaBrowser.Common.IO; -using MediaBrowser.Controller.IO; +using Emby.Server.Implementations.Images; using MediaBrowser.Model.IO; using MediaBrowser.Model.Extensions; -namespace MediaBrowser.Server.Implementations.Collections +namespace Emby.Server.Implementations.Collections { public class CollectionImageProvider : BaseDynamicImageProvider { diff --git a/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs b/Emby.Server.Implementations/Devices/DeviceManager.cs similarity index 99% rename from MediaBrowser.Server.Implementations/Devices/DeviceManager.cs rename to Emby.Server.Implementations/Devices/DeviceManager.cs index e2e59df088..cdf636e22d 100644 --- a/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs +++ b/Emby.Server.Implementations/Devices/DeviceManager.cs @@ -21,7 +21,7 @@ using MediaBrowser.Model.IO; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.IO; -namespace MediaBrowser.Server.Implementations.Devices +namespace Emby.Server.Implementations.Devices { public class DeviceManager : IDeviceManager { diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 11b3393c8a..567c9b99ed 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -52,6 +52,7 @@ Properties\SharedVersion.cs + @@ -60,7 +61,9 @@ + + @@ -69,6 +72,7 @@ + @@ -94,6 +98,8 @@ + + @@ -109,7 +115,11 @@ + + + + @@ -149,7 +159,10 @@ + + + diff --git a/MediaBrowser.Server.Implementations/Photos/BaseDynamicImageProvider.cs b/Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs similarity index 99% rename from MediaBrowser.Server.Implementations/Photos/BaseDynamicImageProvider.cs rename to Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs index 0dd7672bc1..224cd056aa 100644 --- a/MediaBrowser.Server.Implementations/Photos/BaseDynamicImageProvider.cs +++ b/Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs @@ -18,7 +18,7 @@ using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.IO; using MediaBrowser.Model.Configuration; -namespace MediaBrowser.Server.Implementations.Photos +namespace Emby.Server.Implementations.Images { public abstract class BaseDynamicImageProvider : IHasItemChangeMonitor, IForcedProvider, ICustomMetadataProvider, IHasOrder where T : IHasMetadata @@ -353,7 +353,7 @@ namespace MediaBrowser.Server.Implementations.Photos var ext = Path.GetExtension(image); var outputPath = Path.ChangeExtension(outputPathWithoutExtension, ext); - File.Copy(image, outputPath); + FileSystem.CopyFile(image, outputPath, true); return outputPath; } diff --git a/MediaBrowser.Server.Implementations/Library/UserDataManager.cs b/Emby.Server.Implementations/Library/UserDataManager.cs similarity index 99% rename from MediaBrowser.Server.Implementations/Library/UserDataManager.cs rename to Emby.Server.Implementations/Library/UserDataManager.cs index 9ee65a57c6..c8dde1287a 100644 --- a/MediaBrowser.Server.Implementations/Library/UserDataManager.cs +++ b/Emby.Server.Implementations/Library/UserDataManager.cs @@ -13,7 +13,7 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -namespace MediaBrowser.Server.Implementations.Library +namespace Emby.Server.Implementations.Library { /// /// Class UserDataManager diff --git a/MediaBrowser.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs similarity index 95% rename from MediaBrowser.Server.Implementations/Library/UserManager.cs rename to Emby.Server.Implementations/Library/UserManager.cs index 794c924eb6..9c1d7fdf13 100644 --- a/MediaBrowser.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -23,15 +23,13 @@ using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; -using System.Security.Cryptography; using System.Text; using System.Threading; using System.Threading.Tasks; -using MediaBrowser.Common.IO; -using MediaBrowser.Controller.IO; +using MediaBrowser.Model.Cryptography; using MediaBrowser.Model.IO; -namespace MediaBrowser.Server.Implementations.Library +namespace Emby.Server.Implementations.Library { /// /// Class UserManager @@ -72,8 +70,10 @@ namespace MediaBrowser.Server.Implementations.Library private readonly Func _connectFactory; private readonly IServerApplicationHost _appHost; private readonly IFileSystem _fileSystem; + private readonly ICryptographyProvider _cryptographyProvider; + private readonly string _defaultUserName; - public UserManager(ILogger logger, IServerConfigurationManager configurationManager, IUserRepository userRepository, IXmlSerializer xmlSerializer, INetworkManager networkManager, Func imageProcessorFactory, Func dtoServiceFactory, Func connectFactory, IServerApplicationHost appHost, IJsonSerializer jsonSerializer, IFileSystem fileSystem) + public UserManager(ILogger logger, IServerConfigurationManager configurationManager, IUserRepository userRepository, IXmlSerializer xmlSerializer, INetworkManager networkManager, Func imageProcessorFactory, Func dtoServiceFactory, Func connectFactory, IServerApplicationHost appHost, IJsonSerializer jsonSerializer, IFileSystem fileSystem, ICryptographyProvider cryptographyProvider, string defaultUserName) { _logger = logger; UserRepository = userRepository; @@ -85,6 +85,8 @@ namespace MediaBrowser.Server.Implementations.Library _appHost = appHost; _jsonSerializer = jsonSerializer; _fileSystem = fileSystem; + _cryptographyProvider = cryptographyProvider; + _defaultUserName = defaultUserName; ConfigurationManager = configurationManager; Users = new List(); @@ -188,7 +190,14 @@ namespace MediaBrowser.Server.Implementations.Library public bool IsValidUsername(string username) { // Usernames can contain letters (a-z), numbers (0-9), dashes (-), underscores (_), apostrophes ('), and periods (.) - return username.All(IsValidUsernameCharacter); + foreach (var currentChar in username) + { + if (!IsValidUsernameCharacter(currentChar)) + { + return false; + } + } + return true; } private bool IsValidUsernameCharacter(char i) @@ -273,8 +282,8 @@ namespace MediaBrowser.Server.Implementations.Library { user.Policy.InvalidLoginAttemptCount = newValue; - var maxCount = user.Policy.IsAdministrator ? - 3 : + var maxCount = user.Policy.IsAdministrator ? + 3 : 5; var fireLockout = false; @@ -323,13 +332,9 @@ namespace MediaBrowser.Server.Implementations.Library /// /// The STR. /// System.String. - private static string GetSha1String(string str) + private string GetSha1String(string str) { - using (var provider = SHA1.Create()) - { - var hash = provider.ComputeHash(Encoding.UTF8.GetBytes(str)); - return BitConverter.ToString(hash).Replace("-", string.Empty); - } + return BitConverter.ToString(_cryptographyProvider.GetSHA1Bytes(Encoding.UTF8.GetBytes(str))).Replace("-", string.Empty); } /// @@ -343,7 +348,7 @@ namespace MediaBrowser.Server.Implementations.Library // There always has to be at least one user. if (users.Count == 0) { - var name = MakeValidUsername(Environment.UserName); + var name = MakeValidUsername(_defaultUserName); var user = InstantiateNewUser(name); @@ -741,9 +746,12 @@ namespace MediaBrowser.Server.Implementations.Library text.AppendLine(string.Empty); text.AppendLine(pin); text.AppendLine(string.Empty); - text.AppendLine("The pin code will expire at " + expiration.ToLocalTime().ToShortDateString() + " " + expiration.ToLocalTime().ToShortTimeString()); - _fileSystem.WriteAllText(path, text.ToString(), Encoding.UTF8); + var localExpirationTime = expiration.ToLocalTime(); + // Tuesday, 22 August 2006 06:30 AM + text.AppendLine("The pin code will expire at " + localExpirationTime.ToString("f1", CultureInfo.CurrentCulture)); + + _fileSystem.WriteAllText(path, text.ToString(), Encoding.UTF8); var result = new PasswordPinCreationResult { @@ -875,11 +883,11 @@ namespace MediaBrowser.Server.Implementations.Library return (UserPolicy)_xmlSerializer.DeserializeFromFile(typeof(UserPolicy), path); } } - catch (DirectoryNotFoundException) + catch (FileNotFoundException) { return GetDefaultPolicy(user); } - catch (FileNotFoundException) + catch (IOException) { return GetDefaultPolicy(user); } @@ -917,7 +925,7 @@ namespace MediaBrowser.Server.Implementations.Library var path = GetPolifyFilePath(user); - _fileSystem.CreateDirectory(Path.GetDirectoryName(path)); + _fileSystem.CreateDirectory(Path.GetDirectoryName(path)); lock (_policySyncLock) { @@ -970,11 +978,11 @@ namespace MediaBrowser.Server.Implementations.Library return (UserConfiguration)_xmlSerializer.DeserializeFromFile(typeof(UserConfiguration), path); } } - catch (DirectoryNotFoundException) + catch (FileNotFoundException) { return new UserConfiguration(); } - catch (FileNotFoundException) + catch (IOException) { return new UserConfiguration(); } @@ -1004,7 +1012,7 @@ namespace MediaBrowser.Server.Implementations.Library config = _jsonSerializer.DeserializeFromString(json); } - _fileSystem.CreateDirectory(Path.GetDirectoryName(path)); + _fileSystem.CreateDirectory(Path.GetDirectoryName(path)); lock (_configSyncLock) { diff --git a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs b/Emby.Server.Implementations/Notifications/Notifications.cs similarity index 97% rename from MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs rename to Emby.Server.Implementations/Notifications/Notifications.cs index f3d1dc8f9b..2d441c18cc 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs +++ b/Emby.Server.Implementations/Notifications/Notifications.cs @@ -22,8 +22,9 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Entities.TV; +using MediaBrowser.Model.Threading; -namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications +namespace Emby.Server.Implementations.Notifications { /// /// Creates notifications for various system events @@ -40,14 +41,15 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications private readonly ILibraryManager _libraryManager; private readonly ISessionManager _sessionManager; private readonly IServerApplicationHost _appHost; + private readonly ITimerFactory _timerFactory; - private Timer LibraryUpdateTimer { get; set; } + private ITimer LibraryUpdateTimer { get; set; } private readonly object _libraryChangedSyncLock = new object(); private readonly IConfigurationManager _config; private readonly IDeviceManager _deviceManager; - public Notifications(IInstallationManager installationManager, IUserManager userManager, ILogger logger, ITaskManager taskManager, INotificationManager notificationManager, ILibraryManager libraryManager, ISessionManager sessionManager, IServerApplicationHost appHost, IConfigurationManager config, IDeviceManager deviceManager) + public Notifications(IInstallationManager installationManager, IUserManager userManager, ILogger logger, ITaskManager taskManager, INotificationManager notificationManager, ILibraryManager libraryManager, ISessionManager sessionManager, IServerApplicationHost appHost, IConfigurationManager config, IDeviceManager deviceManager, ITimerFactory timerFactory) { _installationManager = installationManager; _userManager = userManager; @@ -59,6 +61,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications _appHost = appHost; _config = config; _deviceManager = deviceManager; + _timerFactory = timerFactory; } public void Run() @@ -332,7 +335,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications { if (LibraryUpdateTimer == null) { - LibraryUpdateTimer = new Timer(LibraryUpdateTimerCallback, null, 5000, + LibraryUpdateTimer = _timerFactory.Create(LibraryUpdateTimerCallback, null, 5000, Timeout.Infinite); } else diff --git a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/WebSocketNotifier.cs b/Emby.Server.Implementations/Notifications/WebSocketNotifier.cs similarity index 95% rename from MediaBrowser.Server.Implementations/EntryPoints/Notifications/WebSocketNotifier.cs rename to Emby.Server.Implementations/Notifications/WebSocketNotifier.cs index 916b4a6224..8b3367217c 100644 --- a/MediaBrowser.Server.Implementations/EntryPoints/Notifications/WebSocketNotifier.cs +++ b/Emby.Server.Implementations/Notifications/WebSocketNotifier.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Notifications; using MediaBrowser.Controller.Plugins; using System.Linq; -namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications +namespace Emby.Server.Implementations.Notifications { /// /// Notifies clients anytime a notification is added or udpated diff --git a/MediaBrowser.Server.Implementations/Photos/PhotoAlbumImageProvider.cs b/Emby.Server.Implementations/Photos/PhotoAlbumImageProvider.cs similarity index 91% rename from MediaBrowser.Server.Implementations/Photos/PhotoAlbumImageProvider.cs rename to Emby.Server.Implementations/Photos/PhotoAlbumImageProvider.cs index ab03f5aaa9..cc1756f960 100644 --- a/MediaBrowser.Server.Implementations/Photos/PhotoAlbumImageProvider.cs +++ b/Emby.Server.Implementations/Photos/PhotoAlbumImageProvider.cs @@ -5,12 +5,11 @@ using MediaBrowser.Controller.Providers; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using MediaBrowser.Common.IO; -using MediaBrowser.Controller.IO; +using Emby.Server.Implementations.Images; using MediaBrowser.Model.IO; using MediaBrowser.Model.Entities; -namespace MediaBrowser.Server.Implementations.Photos +namespace Emby.Server.Implementations.Photos { public class PhotoAlbumImageProvider : BaseDynamicImageProvider { diff --git a/MediaBrowser.Server.Implementations/Playlists/PlaylistImageProvider.cs b/Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs similarity index 97% rename from MediaBrowser.Server.Implementations/Playlists/PlaylistImageProvider.cs rename to Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs index 0249b85ee5..ef7d6dba82 100644 --- a/MediaBrowser.Server.Implementations/Playlists/PlaylistImageProvider.cs +++ b/Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs @@ -6,10 +6,10 @@ using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Playlists; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -using MediaBrowser.Server.Implementations.Photos; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using Emby.Server.Implementations.Images; using MediaBrowser.Common.IO; using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; @@ -17,7 +17,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.Playlists +namespace Emby.Server.Implementations.Playlists { public class PlaylistImageProvider : BaseDynamicImageProvider { diff --git a/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs b/Emby.Server.Implementations/TV/TVSeriesManager.cs similarity index 99% rename from MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs rename to Emby.Server.Implementations/TV/TVSeriesManager.cs index 03e8a9178e..f3bab78834 100644 --- a/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs +++ b/Emby.Server.Implementations/TV/TVSeriesManager.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.Linq; using MediaBrowser.Controller.Configuration; -namespace MediaBrowser.Server.Implementations.TV +namespace Emby.Server.Implementations.TV { public class TVSeriesManager : ITVSeriesManager { diff --git a/MediaBrowser.Server.Implementations/UserViews/CollectionFolderImageProvider.cs b/Emby.Server.Implementations/UserViews/CollectionFolderImageProvider.cs similarity index 98% rename from MediaBrowser.Server.Implementations/UserViews/CollectionFolderImageProvider.cs rename to Emby.Server.Implementations/UserViews/CollectionFolderImageProvider.cs index 33a7b67258..ab63072386 100644 --- a/MediaBrowser.Server.Implementations/UserViews/CollectionFolderImageProvider.cs +++ b/Emby.Server.Implementations/UserViews/CollectionFolderImageProvider.cs @@ -5,12 +5,12 @@ using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -using MediaBrowser.Server.Implementations.Photos; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; +using Emby.Server.Implementations.Images; using MediaBrowser.Common.IO; using MediaBrowser.Model.IO; using MediaBrowser.Controller.Collections; @@ -20,7 +20,7 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Querying; -namespace MediaBrowser.Server.Implementations.UserViews +namespace Emby.Server.Implementations.UserViews { public class CollectionFolderImageProvider : BaseDynamicImageProvider { diff --git a/MediaBrowser.Server.Implementations/UserViews/DynamicImageProvider.cs b/Emby.Server.Implementations/UserViews/DynamicImageProvider.cs similarity index 97% rename from MediaBrowser.Server.Implementations/UserViews/DynamicImageProvider.cs rename to Emby.Server.Implementations/UserViews/DynamicImageProvider.cs index 61f3c77f05..09b68c8ea3 100644 --- a/MediaBrowser.Server.Implementations/UserViews/DynamicImageProvider.cs +++ b/Emby.Server.Implementations/UserViews/DynamicImageProvider.cs @@ -6,19 +6,17 @@ using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -using MediaBrowser.Server.Implementations.Photos; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; -using MediaBrowser.Common.IO; -using MediaBrowser.Controller.IO; +using Emby.Server.Implementations.Images; using MediaBrowser.Model.IO; using MediaBrowser.Controller.LiveTv; using MediaBrowser.Model.Extensions; -namespace MediaBrowser.Server.Implementations.UserViews +namespace Emby.Server.Implementations.UserViews { public class DynamicImageProvider : BaseDynamicImageProvider { diff --git a/MediaBrowser.Model/Cryptography/ICryptographyProvider.cs b/MediaBrowser.Model/Cryptography/ICryptographyProvider.cs index 70f6798562..696a7c1009 100644 --- a/MediaBrowser.Model/Cryptography/ICryptographyProvider.cs +++ b/MediaBrowser.Model/Cryptography/ICryptographyProvider.cs @@ -7,6 +7,7 @@ namespace MediaBrowser.Model.Cryptography { Guid GetMD5(string str); byte[] GetMD5Bytes(string str); + byte[] GetSHA1Bytes(byte[] bytes); byte[] GetMD5Bytes(Stream str); } } \ No newline at end of file diff --git a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj index fc71ef8a08..3fb3ca8833 100644 --- a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj +++ b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj @@ -111,23 +111,18 @@ - - - - - @@ -162,8 +157,6 @@ - - @@ -237,8 +230,6 @@ - - @@ -246,10 +237,7 @@ - - - @@ -280,7 +268,6 @@ - diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs index eb5a8a2e59..7c8945ff2e 100644 --- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs +++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs @@ -50,7 +50,6 @@ using MediaBrowser.Providers.Manager; using MediaBrowser.Providers.Subtitles; using MediaBrowser.Server.Implementations; using MediaBrowser.Server.Implementations.Activity; -using MediaBrowser.Server.Implementations.Collections; using MediaBrowser.Server.Implementations.Configuration; using MediaBrowser.Server.Implementations.Connect; using MediaBrowser.Server.Implementations.Devices; @@ -58,19 +57,16 @@ using MediaBrowser.Server.Implementations.EntryPoints; using MediaBrowser.Server.Implementations.HttpServer; using MediaBrowser.Server.Implementations.HttpServer.Security; using MediaBrowser.Server.Implementations.IO; -using MediaBrowser.Server.Implementations.Library; using MediaBrowser.Server.Implementations.LiveTv; using MediaBrowser.Server.Implementations.Localization; using MediaBrowser.Server.Implementations.MediaEncoder; using MediaBrowser.Server.Implementations.Notifications; using MediaBrowser.Server.Implementations.Persistence; -using MediaBrowser.Server.Implementations.Playlists; using MediaBrowser.Server.Implementations.Security; using MediaBrowser.Server.Implementations.ServerManager; using MediaBrowser.Server.Implementations.Session; using MediaBrowser.Server.Implementations.Social; using MediaBrowser.Server.Implementations.Sync; -using MediaBrowser.Server.Implementations.TV; using MediaBrowser.Server.Startup.Common.FFMpeg; using MediaBrowser.Server.Startup.Common.Migrations; using MediaBrowser.WebDashboard.Api; @@ -98,7 +94,6 @@ using MediaBrowser.Common.Updates; using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Entities.TV; -using MediaBrowser.Controller.IO; using Emby.Dlna; using Emby.Dlna.ConnectionManager; using Emby.Dlna.ContentDirectory; @@ -108,11 +103,13 @@ using Emby.Dlna.Ssdp; using Emby.Server.Implementations.Activity; using Emby.Server.Implementations.Channels; using Emby.Server.Implementations.Collections; +using Emby.Server.Implementations.Devices; using Emby.Server.Implementations.Dto; using Emby.Server.Implementations.FileOrganization; using Emby.Server.Implementations.Library; using Emby.Server.Implementations.Persistence; using Emby.Server.Implementations.Playlists; +using Emby.Server.Implementations.TV; using Emby.Server.Implementations.Updates; using MediaBrowser.Model.Activity; using MediaBrowser.Model.Dlna; @@ -582,7 +579,7 @@ namespace MediaBrowser.Server.Startup.Common SyncRepository = await GetSyncRepository().ConfigureAwait(false); RegisterSingleInstance(SyncRepository); - UserManager = new UserManager(LogManager.GetLogger("UserManager"), ServerConfigurationManager, UserRepository, XmlSerializer, NetworkManager, () => ImageProcessor, () => DtoService, () => ConnectManager, this, JsonSerializer, FileSystemManager); + UserManager = new UserManager(LogManager.GetLogger("UserManager"), ServerConfigurationManager, UserRepository, XmlSerializer, NetworkManager, () => ImageProcessor, () => DtoService, () => ConnectManager, this, JsonSerializer, FileSystemManager, CryptographyProvider, Environment.UserName); RegisterSingleInstance(UserManager); LibraryManager = new LibraryManager(Logger, TaskManager, UserManager, ServerConfigurationManager, UserDataManager, () => LibraryMonitor, FileSystemManager, () => ProviderManager, () => UserViewManager);