aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Emby.Common.Implementations/Cryptography/CryptographyProvider.cs9
-rw-r--r--Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs (renamed from MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs)2
-rw-r--r--Emby.Server.Implementations/Collections/CollectionImageProvider.cs (renamed from MediaBrowser.Server.Implementations/Collections/CollectionImageProvider.cs)6
-rw-r--r--Emby.Server.Implementations/Devices/DeviceManager.cs (renamed from MediaBrowser.Server.Implementations/Devices/DeviceManager.cs)2
-rw-r--r--Emby.Server.Implementations/Emby.Server.Implementations.csproj13
-rw-r--r--Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs (renamed from MediaBrowser.Server.Implementations/Photos/BaseDynamicImageProvider.cs)4
-rw-r--r--Emby.Server.Implementations/Library/UserDataManager.cs (renamed from MediaBrowser.Server.Implementations/Library/UserDataManager.cs)2
-rw-r--r--Emby.Server.Implementations/Library/UserManager.cs (renamed from MediaBrowser.Server.Implementations/Library/UserManager.cs)54
-rw-r--r--Emby.Server.Implementations/Notifications/Notifications.cs (renamed from MediaBrowser.Server.Implementations/EntryPoints/Notifications/Notifications.cs)11
-rw-r--r--Emby.Server.Implementations/Notifications/WebSocketNotifier.cs (renamed from MediaBrowser.Server.Implementations/EntryPoints/Notifications/WebSocketNotifier.cs)2
-rw-r--r--Emby.Server.Implementations/Photos/PhotoAlbumImageProvider.cs (renamed from MediaBrowser.Server.Implementations/Photos/PhotoAlbumImageProvider.cs)5
-rw-r--r--Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs (renamed from MediaBrowser.Server.Implementations/Playlists/PlaylistImageProvider.cs)4
-rw-r--r--Emby.Server.Implementations/TV/TVSeriesManager.cs (renamed from MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs)2
-rw-r--r--Emby.Server.Implementations/UserViews/CollectionFolderImageProvider.cs (renamed from MediaBrowser.Server.Implementations/UserViews/CollectionFolderImageProvider.cs)4
-rw-r--r--Emby.Server.Implementations/UserViews/DynamicImageProvider.cs (renamed from MediaBrowser.Server.Implementations/UserViews/DynamicImageProvider.cs)6
-rw-r--r--MediaBrowser.Model/Cryptography/ICryptographyProvider.cs1
-rw-r--r--MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj13
-rw-r--r--MediaBrowser.Server.Startup.Common/ApplicationHost.cs9
18 files changed, 81 insertions, 68 deletions
diff --git a/Emby.Common.Implementations/Cryptography/CryptographyProvider.cs b/Emby.Common.Implementations/Cryptography/CryptographyProvider.cs
index 5ece28dc6..e5e4b1c7c 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
index 51f5f57b3..11fd3a872 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
index d70d4b9e6..b82d4e44e 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<BoxSet>
{
diff --git a/MediaBrowser.Server.Implementations/Devices/DeviceManager.cs b/Emby.Server.Implementations/Devices/DeviceManager.cs
index e2e59df08..cdf636e22 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 11b3393c8..567c9b99e 100644
--- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj
+++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj
@@ -52,6 +52,7 @@
<Compile Include="..\SharedVersion.cs">
<Link>Properties\SharedVersion.cs</Link>
</Compile>
+ <Compile Include="Activity\ActivityLogEntryPoint.cs" />
<Compile Include="Activity\ActivityManager.cs" />
<Compile Include="Branding\BrandingConfigurationFactory.cs" />
<Compile Include="Channels\ChannelConfigurations.cs" />
@@ -60,7 +61,9 @@
<Compile Include="Channels\ChannelManager.cs" />
<Compile Include="Channels\ChannelPostScanTask.cs" />
<Compile Include="Channels\RefreshChannelsScheduledTask.cs" />
+ <Compile Include="Collections\CollectionImageProvider.cs" />
<Compile Include="Collections\CollectionManager.cs" />
+ <Compile Include="Devices\DeviceManager.cs" />
<Compile Include="Dto\DtoService.cs" />
<Compile Include="FileOrganization\EpisodeFileOrganizer.cs" />
<Compile Include="FileOrganization\Extensions.cs" />
@@ -69,6 +72,7 @@
<Compile Include="FileOrganization\NameUtils.cs" />
<Compile Include="FileOrganization\OrganizerScheduledTask.cs" />
<Compile Include="FileOrganization\TvFolderOrganizer.cs" />
+ <Compile Include="Images\BaseDynamicImageProvider.cs" />
<Compile Include="Intros\DefaultIntroProvider.cs" />
<Compile Include="Library\CoreResolutionIgnoreRule.cs" />
<Compile Include="Library\LibraryManager.cs" />
@@ -94,6 +98,8 @@
<Compile Include="Library\Resolvers\TV\SeriesResolver.cs" />
<Compile Include="Library\Resolvers\VideoResolver.cs" />
<Compile Include="Library\SearchEngine.cs" />
+ <Compile Include="Library\UserDataManager.cs" />
+ <Compile Include="Library\UserManager.cs" />
<Compile Include="Library\UserViewManager.cs" />
<Compile Include="Library\Validators\ArtistsPostScanTask.cs" />
<Compile Include="Library\Validators\ArtistsValidator.cs" />
@@ -109,7 +115,11 @@
<Compile Include="Library\Validators\YearsPostScanTask.cs" />
<Compile Include="Logging\PatternsLogger.cs" />
<Compile Include="News\NewsService.cs" />
+ <Compile Include="Notifications\Notifications.cs" />
+ <Compile Include="Notifications\WebSocketNotifier.cs" />
<Compile Include="Persistence\CleanDatabaseScheduledTask.cs" />
+ <Compile Include="Photos\PhotoAlbumImageProvider.cs" />
+ <Compile Include="Playlists\PlaylistImageProvider.cs" />
<Compile Include="Playlists\PlaylistManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ScheduledTasks\ChapterImagesTask.cs" />
@@ -149,7 +159,10 @@
<Compile Include="Sorting\SortNameComparer.cs" />
<Compile Include="Sorting\StartDateComparer.cs" />
<Compile Include="Sorting\StudioComparer.cs" />
+ <Compile Include="TV\TVSeriesManager.cs" />
<Compile Include="Updates\InstallationManager.cs" />
+ <Compile Include="UserViews\CollectionFolderImageProvider.cs" />
+ <Compile Include="UserViews\DynamicImageProvider.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MediaBrowser.Naming, Version=1.0.6146.28476, Culture=neutral, processorArchitecture=MSIL">
diff --git a/MediaBrowser.Server.Implementations/Photos/BaseDynamicImageProvider.cs b/Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs
index 0dd7672bc..224cd056a 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<T> : IHasItemChangeMonitor, IForcedProvider, ICustomMetadataProvider<T>, 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
index 9ee65a57c..c8dde1287 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
{
/// <summary>
/// Class UserDataManager
diff --git a/MediaBrowser.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs
index 794c924eb..9c1d7fdf1 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
{
/// <summary>
/// Class UserManager
@@ -72,8 +70,10 @@ namespace MediaBrowser.Server.Implementations.Library
private readonly Func<IConnectManager> _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<IImageProcessor> imageProcessorFactory, Func<IDtoService> dtoServiceFactory, Func<IConnectManager> connectFactory, IServerApplicationHost appHost, IJsonSerializer jsonSerializer, IFileSystem fileSystem)
+ public UserManager(ILogger logger, IServerConfigurationManager configurationManager, IUserRepository userRepository, IXmlSerializer xmlSerializer, INetworkManager networkManager, Func<IImageProcessor> imageProcessorFactory, Func<IDtoService> dtoServiceFactory, Func<IConnectManager> 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<User>();
@@ -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
/// </summary>
/// <param name="str">The STR.</param>
/// <returns>System.String.</returns>
- 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);
}
/// <summary>
@@ -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<UserConfiguration>(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
index f3d1dc8f9..2d441c18c 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
{
/// <summary>
/// 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
index 916b4a622..8b3367217 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
{
/// <summary>
/// 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
index ab03f5aaa..cc1756f96 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<PhotoAlbum>
{
diff --git a/MediaBrowser.Server.Implementations/Playlists/PlaylistImageProvider.cs b/Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs
index 0249b85ee..ef7d6dba8 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<Playlist>
{
diff --git a/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs b/Emby.Server.Implementations/TV/TVSeriesManager.cs
index 03e8a9178..f3bab7883 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
index 33a7b6725..ab6307238 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<CollectionFolder>
{
diff --git a/MediaBrowser.Server.Implementations/UserViews/DynamicImageProvider.cs b/Emby.Server.Implementations/UserViews/DynamicImageProvider.cs
index 61f3c77f0..09b68c8ea 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<UserView>
{
diff --git a/MediaBrowser.Model/Cryptography/ICryptographyProvider.cs b/MediaBrowser.Model/Cryptography/ICryptographyProvider.cs
index 70f679856..696a7c100 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 fc71ef8a0..3fb3ca883 100644
--- a/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj
+++ b/MediaBrowser.Server.Implementations/MediaBrowser.Server.Implementations.csproj
@@ -111,23 +111,18 @@
<Compile Include="Activity\ActivityRepository.cs" />
<Compile Include="Archiving\ZipClient.cs" />
<Compile Include="Collections\CollectionsDynamicFolder.cs" />
- <Compile Include="Collections\CollectionImageProvider.cs" />
<Compile Include="Configuration\ServerConfigurationManager.cs" />
<Compile Include="Connect\ConnectData.cs" />
<Compile Include="Connect\ConnectEntryPoint.cs" />
<Compile Include="Connect\ConnectManager.cs" />
<Compile Include="Connect\Responses.cs" />
<Compile Include="Connect\Validator.cs" />
- <Compile Include="Devices\DeviceManager.cs" />
<Compile Include="Devices\DeviceRepository.cs" />
<Compile Include="Devices\CameraUploadsFolder.cs" />
- <Compile Include="EntryPoints\ActivityLogEntryPoint.cs" />
<Compile Include="EntryPoints\AutomaticRestartEntryPoint.cs" />
<Compile Include="EntryPoints\ExternalPortForwarding.cs" />
<Compile Include="EntryPoints\LibraryChangedNotifier.cs" />
<Compile Include="EntryPoints\LoadRegistrations.cs" />
- <Compile Include="EntryPoints\Notifications\Notifications.cs" />
- <Compile Include="EntryPoints\Notifications\WebSocketNotifier.cs" />
<Compile Include="EntryPoints\RecordingNotifier.cs" />
<Compile Include="EntryPoints\RefreshUsersMetadata.cs" />
<Compile Include="EntryPoints\UsageEntryPoint.cs" />
@@ -162,8 +157,6 @@
<Compile Include="IO\LibraryMonitor.cs" />
<Compile Include="IO\MemoryStreamProvider.cs" />
<Compile Include="IO\ThrottledStream.cs" />
- <Compile Include="Library\UserDataManager.cs" />
- <Compile Include="Library\UserManager.cs" />
<Compile Include="LiveTv\ChannelImageProvider.cs" />
<Compile Include="LiveTv\EmbyTV\DirectRecorder.cs" />
<Compile Include="LiveTv\EmbyTV\EmbyTV.cs" />
@@ -237,8 +230,6 @@
<Compile Include="TextEncoding\TextEncoding.cs" />
<Compile Include="Threading\PeriodicTimer.cs" />
<Compile Include="TV\SeriesPostScanTask.cs" />
- <Compile Include="UserViews\CollectionFolderImageProvider.cs" />
- <Compile Include="UserViews\DynamicImageProvider.cs" />
<Compile Include="Notifications\CoreNotificationTypes.cs" />
<Compile Include="Notifications\InternalNotificationService.cs" />
<Compile Include="Notifications\NotificationConfigurationFactory.cs" />
@@ -246,10 +237,7 @@
<Compile Include="Persistence\SqliteFileOrganizationRepository.cs" />
<Compile Include="Notifications\SqliteNotificationsRepository.cs" />
<Compile Include="Persistence\TypeMapper.cs" />
- <Compile Include="Photos\BaseDynamicImageProvider.cs" />
<Compile Include="Playlists\ManualPlaylistsFolder.cs" />
- <Compile Include="Photos\PhotoAlbumImageProvider.cs" />
- <Compile Include="Playlists\PlaylistImageProvider.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Security\AuthenticationRepository.cs" />
<Compile Include="Security\EncryptionManager.cs" />
@@ -280,7 +268,6 @@
<Compile Include="Sync\SyncRepository.cs" />
<Compile Include="Sync\SyncConvertScheduledTask.cs" />
<Compile Include="Sync\TargetDataProvider.cs" />
- <Compile Include="TV\TVSeriesManager.cs" />
<Compile Include="Udp\UdpMessageReceivedEventArgs.cs" />
<Compile Include="Udp\UdpServer.cs" />
<Compile Include="Xml\XmlReaderSettingsFactory.cs" />
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
index eb5a8a2e5..7c8945ff2 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);