move classes to portable server lib
This commit is contained in:
parent
3eb4091808
commit
b76a1abda5
|
@ -19,6 +19,15 @@ namespace Emby.Common.Implementations.Cryptography
|
||||||
return provider.ComputeHash(Encoding.Unicode.GetBytes(str));
|
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)
|
public byte[] GetMD5Bytes(Stream str)
|
||||||
{
|
{
|
||||||
using (var provider = MD5.Create())
|
using (var provider = MD5.Create())
|
||||||
|
|
|
@ -19,7 +19,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using MediaBrowser.Model.Globalization;
|
using MediaBrowser.Model.Globalization;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.EntryPoints
|
namespace Emby.Server.Implementations.Activity
|
||||||
{
|
{
|
||||||
public class ActivityLogEntryPoint : IServerEntryPoint
|
public class ActivityLogEntryPoint : IServerEntryPoint
|
||||||
{
|
{
|
|
@ -6,16 +6,14 @@ using MediaBrowser.Controller.Entities.Movies;
|
||||||
using MediaBrowser.Controller.Entities.TV;
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Server.Implementations.Photos;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common.IO;
|
using Emby.Server.Implementations.Images;
|
||||||
using MediaBrowser.Controller.IO;
|
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Extensions;
|
using MediaBrowser.Model.Extensions;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Collections
|
namespace Emby.Server.Implementations.Collections
|
||||||
{
|
{
|
||||||
public class CollectionImageProvider : BaseDynamicImageProvider<BoxSet>
|
public class CollectionImageProvider : BaseDynamicImageProvider<BoxSet>
|
||||||
{
|
{
|
|
@ -21,7 +21,7 @@ using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.IO;
|
using MediaBrowser.Controller.IO;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Devices
|
namespace Emby.Server.Implementations.Devices
|
||||||
{
|
{
|
||||||
public class DeviceManager : IDeviceManager
|
public class DeviceManager : IDeviceManager
|
||||||
{
|
{
|
|
@ -52,6 +52,7 @@
|
||||||
<Compile Include="..\SharedVersion.cs">
|
<Compile Include="..\SharedVersion.cs">
|
||||||
<Link>Properties\SharedVersion.cs</Link>
|
<Link>Properties\SharedVersion.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Activity\ActivityLogEntryPoint.cs" />
|
||||||
<Compile Include="Activity\ActivityManager.cs" />
|
<Compile Include="Activity\ActivityManager.cs" />
|
||||||
<Compile Include="Branding\BrandingConfigurationFactory.cs" />
|
<Compile Include="Branding\BrandingConfigurationFactory.cs" />
|
||||||
<Compile Include="Channels\ChannelConfigurations.cs" />
|
<Compile Include="Channels\ChannelConfigurations.cs" />
|
||||||
|
@ -60,7 +61,9 @@
|
||||||
<Compile Include="Channels\ChannelManager.cs" />
|
<Compile Include="Channels\ChannelManager.cs" />
|
||||||
<Compile Include="Channels\ChannelPostScanTask.cs" />
|
<Compile Include="Channels\ChannelPostScanTask.cs" />
|
||||||
<Compile Include="Channels\RefreshChannelsScheduledTask.cs" />
|
<Compile Include="Channels\RefreshChannelsScheduledTask.cs" />
|
||||||
|
<Compile Include="Collections\CollectionImageProvider.cs" />
|
||||||
<Compile Include="Collections\CollectionManager.cs" />
|
<Compile Include="Collections\CollectionManager.cs" />
|
||||||
|
<Compile Include="Devices\DeviceManager.cs" />
|
||||||
<Compile Include="Dto\DtoService.cs" />
|
<Compile Include="Dto\DtoService.cs" />
|
||||||
<Compile Include="FileOrganization\EpisodeFileOrganizer.cs" />
|
<Compile Include="FileOrganization\EpisodeFileOrganizer.cs" />
|
||||||
<Compile Include="FileOrganization\Extensions.cs" />
|
<Compile Include="FileOrganization\Extensions.cs" />
|
||||||
|
@ -69,6 +72,7 @@
|
||||||
<Compile Include="FileOrganization\NameUtils.cs" />
|
<Compile Include="FileOrganization\NameUtils.cs" />
|
||||||
<Compile Include="FileOrganization\OrganizerScheduledTask.cs" />
|
<Compile Include="FileOrganization\OrganizerScheduledTask.cs" />
|
||||||
<Compile Include="FileOrganization\TvFolderOrganizer.cs" />
|
<Compile Include="FileOrganization\TvFolderOrganizer.cs" />
|
||||||
|
<Compile Include="Images\BaseDynamicImageProvider.cs" />
|
||||||
<Compile Include="Intros\DefaultIntroProvider.cs" />
|
<Compile Include="Intros\DefaultIntroProvider.cs" />
|
||||||
<Compile Include="Library\CoreResolutionIgnoreRule.cs" />
|
<Compile Include="Library\CoreResolutionIgnoreRule.cs" />
|
||||||
<Compile Include="Library\LibraryManager.cs" />
|
<Compile Include="Library\LibraryManager.cs" />
|
||||||
|
@ -94,6 +98,8 @@
|
||||||
<Compile Include="Library\Resolvers\TV\SeriesResolver.cs" />
|
<Compile Include="Library\Resolvers\TV\SeriesResolver.cs" />
|
||||||
<Compile Include="Library\Resolvers\VideoResolver.cs" />
|
<Compile Include="Library\Resolvers\VideoResolver.cs" />
|
||||||
<Compile Include="Library\SearchEngine.cs" />
|
<Compile Include="Library\SearchEngine.cs" />
|
||||||
|
<Compile Include="Library\UserDataManager.cs" />
|
||||||
|
<Compile Include="Library\UserManager.cs" />
|
||||||
<Compile Include="Library\UserViewManager.cs" />
|
<Compile Include="Library\UserViewManager.cs" />
|
||||||
<Compile Include="Library\Validators\ArtistsPostScanTask.cs" />
|
<Compile Include="Library\Validators\ArtistsPostScanTask.cs" />
|
||||||
<Compile Include="Library\Validators\ArtistsValidator.cs" />
|
<Compile Include="Library\Validators\ArtistsValidator.cs" />
|
||||||
|
@ -109,7 +115,11 @@
|
||||||
<Compile Include="Library\Validators\YearsPostScanTask.cs" />
|
<Compile Include="Library\Validators\YearsPostScanTask.cs" />
|
||||||
<Compile Include="Logging\PatternsLogger.cs" />
|
<Compile Include="Logging\PatternsLogger.cs" />
|
||||||
<Compile Include="News\NewsService.cs" />
|
<Compile Include="News\NewsService.cs" />
|
||||||
|
<Compile Include="Notifications\Notifications.cs" />
|
||||||
|
<Compile Include="Notifications\WebSocketNotifier.cs" />
|
||||||
<Compile Include="Persistence\CleanDatabaseScheduledTask.cs" />
|
<Compile Include="Persistence\CleanDatabaseScheduledTask.cs" />
|
||||||
|
<Compile Include="Photos\PhotoAlbumImageProvider.cs" />
|
||||||
|
<Compile Include="Playlists\PlaylistImageProvider.cs" />
|
||||||
<Compile Include="Playlists\PlaylistManager.cs" />
|
<Compile Include="Playlists\PlaylistManager.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="ScheduledTasks\ChapterImagesTask.cs" />
|
<Compile Include="ScheduledTasks\ChapterImagesTask.cs" />
|
||||||
|
@ -149,7 +159,10 @@
|
||||||
<Compile Include="Sorting\SortNameComparer.cs" />
|
<Compile Include="Sorting\SortNameComparer.cs" />
|
||||||
<Compile Include="Sorting\StartDateComparer.cs" />
|
<Compile Include="Sorting\StartDateComparer.cs" />
|
||||||
<Compile Include="Sorting\StudioComparer.cs" />
|
<Compile Include="Sorting\StudioComparer.cs" />
|
||||||
|
<Compile Include="TV\TVSeriesManager.cs" />
|
||||||
<Compile Include="Updates\InstallationManager.cs" />
|
<Compile Include="Updates\InstallationManager.cs" />
|
||||||
|
<Compile Include="UserViews\CollectionFolderImageProvider.cs" />
|
||||||
|
<Compile Include="UserViews\DynamicImageProvider.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="MediaBrowser.Naming, Version=1.0.6146.28476, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="MediaBrowser.Naming, Version=1.0.6146.28476, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
|
|
@ -18,7 +18,7 @@ using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.IO;
|
using MediaBrowser.Controller.IO;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Photos
|
namespace Emby.Server.Implementations.Images
|
||||||
{
|
{
|
||||||
public abstract class BaseDynamicImageProvider<T> : IHasItemChangeMonitor, IForcedProvider, ICustomMetadataProvider<T>, IHasOrder
|
public abstract class BaseDynamicImageProvider<T> : IHasItemChangeMonitor, IForcedProvider, ICustomMetadataProvider<T>, IHasOrder
|
||||||
where T : IHasMetadata
|
where T : IHasMetadata
|
||||||
|
@ -353,7 +353,7 @@ namespace MediaBrowser.Server.Implementations.Photos
|
||||||
var ext = Path.GetExtension(image);
|
var ext = Path.GetExtension(image);
|
||||||
|
|
||||||
var outputPath = Path.ChangeExtension(outputPathWithoutExtension, ext);
|
var outputPath = Path.ChangeExtension(outputPathWithoutExtension, ext);
|
||||||
File.Copy(image, outputPath);
|
FileSystem.CopyFile(image, outputPath, true);
|
||||||
|
|
||||||
return outputPath;
|
return outputPath;
|
||||||
}
|
}
|
|
@ -13,7 +13,7 @@ using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Library
|
namespace Emby.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class UserDataManager
|
/// Class UserDataManager
|
|
@ -23,15 +23,13 @@ using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common.IO;
|
using MediaBrowser.Model.Cryptography;
|
||||||
using MediaBrowser.Controller.IO;
|
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Library
|
namespace Emby.Server.Implementations.Library
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class UserManager
|
/// Class UserManager
|
||||||
|
@ -72,8 +70,10 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
private readonly Func<IConnectManager> _connectFactory;
|
private readonly Func<IConnectManager> _connectFactory;
|
||||||
private readonly IServerApplicationHost _appHost;
|
private readonly IServerApplicationHost _appHost;
|
||||||
private readonly IFileSystem _fileSystem;
|
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;
|
_logger = logger;
|
||||||
UserRepository = userRepository;
|
UserRepository = userRepository;
|
||||||
|
@ -85,6 +85,8 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
_appHost = appHost;
|
_appHost = appHost;
|
||||||
_jsonSerializer = jsonSerializer;
|
_jsonSerializer = jsonSerializer;
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
|
_cryptographyProvider = cryptographyProvider;
|
||||||
|
_defaultUserName = defaultUserName;
|
||||||
ConfigurationManager = configurationManager;
|
ConfigurationManager = configurationManager;
|
||||||
Users = new List<User>();
|
Users = new List<User>();
|
||||||
|
|
||||||
|
@ -188,7 +190,14 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
public bool IsValidUsername(string username)
|
public bool IsValidUsername(string username)
|
||||||
{
|
{
|
||||||
// Usernames can contain letters (a-z), numbers (0-9), dashes (-), underscores (_), apostrophes ('), and periods (.)
|
// 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)
|
private bool IsValidUsernameCharacter(char i)
|
||||||
|
@ -323,13 +332,9 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="str">The STR.</param>
|
/// <param name="str">The STR.</param>
|
||||||
/// <returns>System.String.</returns>
|
/// <returns>System.String.</returns>
|
||||||
private static string GetSha1String(string str)
|
private string GetSha1String(string str)
|
||||||
{
|
{
|
||||||
using (var provider = SHA1.Create())
|
return BitConverter.ToString(_cryptographyProvider.GetSHA1Bytes(Encoding.UTF8.GetBytes(str))).Replace("-", string.Empty);
|
||||||
{
|
|
||||||
var hash = provider.ComputeHash(Encoding.UTF8.GetBytes(str));
|
|
||||||
return BitConverter.ToString(hash).Replace("-", string.Empty);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -343,7 +348,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
// There always has to be at least one user.
|
// There always has to be at least one user.
|
||||||
if (users.Count == 0)
|
if (users.Count == 0)
|
||||||
{
|
{
|
||||||
var name = MakeValidUsername(Environment.UserName);
|
var name = MakeValidUsername(_defaultUserName);
|
||||||
|
|
||||||
var user = InstantiateNewUser(name);
|
var user = InstantiateNewUser(name);
|
||||||
|
|
||||||
|
@ -741,7 +746,10 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
text.AppendLine(string.Empty);
|
text.AppendLine(string.Empty);
|
||||||
text.AppendLine(pin);
|
text.AppendLine(pin);
|
||||||
text.AppendLine(string.Empty);
|
text.AppendLine(string.Empty);
|
||||||
text.AppendLine("The pin code will expire at " + expiration.ToLocalTime().ToShortDateString() + " " + expiration.ToLocalTime().ToShortTimeString());
|
|
||||||
|
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);
|
_fileSystem.WriteAllText(path, text.ToString(), Encoding.UTF8);
|
||||||
|
|
||||||
|
@ -875,11 +883,11 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
return (UserPolicy)_xmlSerializer.DeserializeFromFile(typeof(UserPolicy), path);
|
return (UserPolicy)_xmlSerializer.DeserializeFromFile(typeof(UserPolicy), path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (DirectoryNotFoundException)
|
catch (FileNotFoundException)
|
||||||
{
|
{
|
||||||
return GetDefaultPolicy(user);
|
return GetDefaultPolicy(user);
|
||||||
}
|
}
|
||||||
catch (FileNotFoundException)
|
catch (IOException)
|
||||||
{
|
{
|
||||||
return GetDefaultPolicy(user);
|
return GetDefaultPolicy(user);
|
||||||
}
|
}
|
||||||
|
@ -970,11 +978,11 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||||
return (UserConfiguration)_xmlSerializer.DeserializeFromFile(typeof(UserConfiguration), path);
|
return (UserConfiguration)_xmlSerializer.DeserializeFromFile(typeof(UserConfiguration), path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (DirectoryNotFoundException)
|
catch (FileNotFoundException)
|
||||||
{
|
{
|
||||||
return new UserConfiguration();
|
return new UserConfiguration();
|
||||||
}
|
}
|
||||||
catch (FileNotFoundException)
|
catch (IOException)
|
||||||
{
|
{
|
||||||
return new UserConfiguration();
|
return new UserConfiguration();
|
||||||
}
|
}
|
|
@ -22,8 +22,9 @@ using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Controller.Entities.TV;
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
|
using MediaBrowser.Model.Threading;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
|
namespace Emby.Server.Implementations.Notifications
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates notifications for various system events
|
/// Creates notifications for various system events
|
||||||
|
@ -40,14 +41,15 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
|
||||||
private readonly ILibraryManager _libraryManager;
|
private readonly ILibraryManager _libraryManager;
|
||||||
private readonly ISessionManager _sessionManager;
|
private readonly ISessionManager _sessionManager;
|
||||||
private readonly IServerApplicationHost _appHost;
|
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 object _libraryChangedSyncLock = new object();
|
||||||
|
|
||||||
private readonly IConfigurationManager _config;
|
private readonly IConfigurationManager _config;
|
||||||
private readonly IDeviceManager _deviceManager;
|
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;
|
_installationManager = installationManager;
|
||||||
_userManager = userManager;
|
_userManager = userManager;
|
||||||
|
@ -59,6 +61,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
|
||||||
_appHost = appHost;
|
_appHost = appHost;
|
||||||
_config = config;
|
_config = config;
|
||||||
_deviceManager = deviceManager;
|
_deviceManager = deviceManager;
|
||||||
|
_timerFactory = timerFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Run()
|
public void Run()
|
||||||
|
@ -332,7 +335,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
|
||||||
{
|
{
|
||||||
if (LibraryUpdateTimer == null)
|
if (LibraryUpdateTimer == null)
|
||||||
{
|
{
|
||||||
LibraryUpdateTimer = new Timer(LibraryUpdateTimerCallback, null, 5000,
|
LibraryUpdateTimer = _timerFactory.Create(LibraryUpdateTimerCallback, null, 5000,
|
||||||
Timeout.Infinite);
|
Timeout.Infinite);
|
||||||
}
|
}
|
||||||
else
|
else
|
|
@ -3,7 +3,7 @@ using MediaBrowser.Controller.Notifications;
|
||||||
using MediaBrowser.Controller.Plugins;
|
using MediaBrowser.Controller.Plugins;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.EntryPoints.Notifications
|
namespace Emby.Server.Implementations.Notifications
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Notifies clients anytime a notification is added or udpated
|
/// Notifies clients anytime a notification is added or udpated
|
|
@ -5,12 +5,11 @@ using MediaBrowser.Controller.Providers;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common.IO;
|
using Emby.Server.Implementations.Images;
|
||||||
using MediaBrowser.Controller.IO;
|
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Photos
|
namespace Emby.Server.Implementations.Photos
|
||||||
{
|
{
|
||||||
public class PhotoAlbumImageProvider : BaseDynamicImageProvider<PhotoAlbum>
|
public class PhotoAlbumImageProvider : BaseDynamicImageProvider<PhotoAlbum>
|
||||||
{
|
{
|
|
@ -6,10 +6,10 @@ using MediaBrowser.Controller.Entities.TV;
|
||||||
using MediaBrowser.Controller.Playlists;
|
using MediaBrowser.Controller.Playlists;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Server.Implementations.Photos;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Emby.Server.Implementations.Images;
|
||||||
using MediaBrowser.Common.IO;
|
using MediaBrowser.Common.IO;
|
||||||
using MediaBrowser.Controller.IO;
|
using MediaBrowser.Controller.IO;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
|
@ -17,7 +17,7 @@ using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Model.Extensions;
|
using MediaBrowser.Model.Extensions;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.Playlists
|
namespace Emby.Server.Implementations.Playlists
|
||||||
{
|
{
|
||||||
public class PlaylistImageProvider : BaseDynamicImageProvider<Playlist>
|
public class PlaylistImageProvider : BaseDynamicImageProvider<Playlist>
|
||||||
{
|
{
|
|
@ -9,7 +9,7 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using MediaBrowser.Controller.Configuration;
|
using MediaBrowser.Controller.Configuration;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.TV
|
namespace Emby.Server.Implementations.TV
|
||||||
{
|
{
|
||||||
public class TVSeriesManager : ITVSeriesManager
|
public class TVSeriesManager : ITVSeriesManager
|
||||||
{
|
{
|
|
@ -5,12 +5,12 @@ using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.Entities.TV;
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Server.Implementations.Photos;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Emby.Server.Implementations.Images;
|
||||||
using MediaBrowser.Common.IO;
|
using MediaBrowser.Common.IO;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Controller.Collections;
|
using MediaBrowser.Controller.Collections;
|
||||||
|
@ -20,7 +20,7 @@ using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Model.Extensions;
|
using MediaBrowser.Model.Extensions;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.UserViews
|
namespace Emby.Server.Implementations.UserViews
|
||||||
{
|
{
|
||||||
public class CollectionFolderImageProvider : BaseDynamicImageProvider<CollectionFolder>
|
public class CollectionFolderImageProvider : BaseDynamicImageProvider<CollectionFolder>
|
||||||
{
|
{
|
|
@ -6,19 +6,17 @@ using MediaBrowser.Controller.Entities.TV;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Server.Implementations.Photos;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common.IO;
|
using Emby.Server.Implementations.Images;
|
||||||
using MediaBrowser.Controller.IO;
|
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Controller.LiveTv;
|
using MediaBrowser.Controller.LiveTv;
|
||||||
using MediaBrowser.Model.Extensions;
|
using MediaBrowser.Model.Extensions;
|
||||||
|
|
||||||
namespace MediaBrowser.Server.Implementations.UserViews
|
namespace Emby.Server.Implementations.UserViews
|
||||||
{
|
{
|
||||||
public class DynamicImageProvider : BaseDynamicImageProvider<UserView>
|
public class DynamicImageProvider : BaseDynamicImageProvider<UserView>
|
||||||
{
|
{
|
|
@ -7,6 +7,7 @@ namespace MediaBrowser.Model.Cryptography
|
||||||
{
|
{
|
||||||
Guid GetMD5(string str);
|
Guid GetMD5(string str);
|
||||||
byte[] GetMD5Bytes(string str);
|
byte[] GetMD5Bytes(string str);
|
||||||
|
byte[] GetSHA1Bytes(byte[] bytes);
|
||||||
byte[] GetMD5Bytes(Stream str);
|
byte[] GetMD5Bytes(Stream str);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -111,23 +111,18 @@
|
||||||
<Compile Include="Activity\ActivityRepository.cs" />
|
<Compile Include="Activity\ActivityRepository.cs" />
|
||||||
<Compile Include="Archiving\ZipClient.cs" />
|
<Compile Include="Archiving\ZipClient.cs" />
|
||||||
<Compile Include="Collections\CollectionsDynamicFolder.cs" />
|
<Compile Include="Collections\CollectionsDynamicFolder.cs" />
|
||||||
<Compile Include="Collections\CollectionImageProvider.cs" />
|
|
||||||
<Compile Include="Configuration\ServerConfigurationManager.cs" />
|
<Compile Include="Configuration\ServerConfigurationManager.cs" />
|
||||||
<Compile Include="Connect\ConnectData.cs" />
|
<Compile Include="Connect\ConnectData.cs" />
|
||||||
<Compile Include="Connect\ConnectEntryPoint.cs" />
|
<Compile Include="Connect\ConnectEntryPoint.cs" />
|
||||||
<Compile Include="Connect\ConnectManager.cs" />
|
<Compile Include="Connect\ConnectManager.cs" />
|
||||||
<Compile Include="Connect\Responses.cs" />
|
<Compile Include="Connect\Responses.cs" />
|
||||||
<Compile Include="Connect\Validator.cs" />
|
<Compile Include="Connect\Validator.cs" />
|
||||||
<Compile Include="Devices\DeviceManager.cs" />
|
|
||||||
<Compile Include="Devices\DeviceRepository.cs" />
|
<Compile Include="Devices\DeviceRepository.cs" />
|
||||||
<Compile Include="Devices\CameraUploadsFolder.cs" />
|
<Compile Include="Devices\CameraUploadsFolder.cs" />
|
||||||
<Compile Include="EntryPoints\ActivityLogEntryPoint.cs" />
|
|
||||||
<Compile Include="EntryPoints\AutomaticRestartEntryPoint.cs" />
|
<Compile Include="EntryPoints\AutomaticRestartEntryPoint.cs" />
|
||||||
<Compile Include="EntryPoints\ExternalPortForwarding.cs" />
|
<Compile Include="EntryPoints\ExternalPortForwarding.cs" />
|
||||||
<Compile Include="EntryPoints\LibraryChangedNotifier.cs" />
|
<Compile Include="EntryPoints\LibraryChangedNotifier.cs" />
|
||||||
<Compile Include="EntryPoints\LoadRegistrations.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\RecordingNotifier.cs" />
|
||||||
<Compile Include="EntryPoints\RefreshUsersMetadata.cs" />
|
<Compile Include="EntryPoints\RefreshUsersMetadata.cs" />
|
||||||
<Compile Include="EntryPoints\UsageEntryPoint.cs" />
|
<Compile Include="EntryPoints\UsageEntryPoint.cs" />
|
||||||
|
@ -162,8 +157,6 @@
|
||||||
<Compile Include="IO\LibraryMonitor.cs" />
|
<Compile Include="IO\LibraryMonitor.cs" />
|
||||||
<Compile Include="IO\MemoryStreamProvider.cs" />
|
<Compile Include="IO\MemoryStreamProvider.cs" />
|
||||||
<Compile Include="IO\ThrottledStream.cs" />
|
<Compile Include="IO\ThrottledStream.cs" />
|
||||||
<Compile Include="Library\UserDataManager.cs" />
|
|
||||||
<Compile Include="Library\UserManager.cs" />
|
|
||||||
<Compile Include="LiveTv\ChannelImageProvider.cs" />
|
<Compile Include="LiveTv\ChannelImageProvider.cs" />
|
||||||
<Compile Include="LiveTv\EmbyTV\DirectRecorder.cs" />
|
<Compile Include="LiveTv\EmbyTV\DirectRecorder.cs" />
|
||||||
<Compile Include="LiveTv\EmbyTV\EmbyTV.cs" />
|
<Compile Include="LiveTv\EmbyTV\EmbyTV.cs" />
|
||||||
|
@ -237,8 +230,6 @@
|
||||||
<Compile Include="TextEncoding\TextEncoding.cs" />
|
<Compile Include="TextEncoding\TextEncoding.cs" />
|
||||||
<Compile Include="Threading\PeriodicTimer.cs" />
|
<Compile Include="Threading\PeriodicTimer.cs" />
|
||||||
<Compile Include="TV\SeriesPostScanTask.cs" />
|
<Compile Include="TV\SeriesPostScanTask.cs" />
|
||||||
<Compile Include="UserViews\CollectionFolderImageProvider.cs" />
|
|
||||||
<Compile Include="UserViews\DynamicImageProvider.cs" />
|
|
||||||
<Compile Include="Notifications\CoreNotificationTypes.cs" />
|
<Compile Include="Notifications\CoreNotificationTypes.cs" />
|
||||||
<Compile Include="Notifications\InternalNotificationService.cs" />
|
<Compile Include="Notifications\InternalNotificationService.cs" />
|
||||||
<Compile Include="Notifications\NotificationConfigurationFactory.cs" />
|
<Compile Include="Notifications\NotificationConfigurationFactory.cs" />
|
||||||
|
@ -246,10 +237,7 @@
|
||||||
<Compile Include="Persistence\SqliteFileOrganizationRepository.cs" />
|
<Compile Include="Persistence\SqliteFileOrganizationRepository.cs" />
|
||||||
<Compile Include="Notifications\SqliteNotificationsRepository.cs" />
|
<Compile Include="Notifications\SqliteNotificationsRepository.cs" />
|
||||||
<Compile Include="Persistence\TypeMapper.cs" />
|
<Compile Include="Persistence\TypeMapper.cs" />
|
||||||
<Compile Include="Photos\BaseDynamicImageProvider.cs" />
|
|
||||||
<Compile Include="Playlists\ManualPlaylistsFolder.cs" />
|
<Compile Include="Playlists\ManualPlaylistsFolder.cs" />
|
||||||
<Compile Include="Photos\PhotoAlbumImageProvider.cs" />
|
|
||||||
<Compile Include="Playlists\PlaylistImageProvider.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Security\AuthenticationRepository.cs" />
|
<Compile Include="Security\AuthenticationRepository.cs" />
|
||||||
<Compile Include="Security\EncryptionManager.cs" />
|
<Compile Include="Security\EncryptionManager.cs" />
|
||||||
|
@ -280,7 +268,6 @@
|
||||||
<Compile Include="Sync\SyncRepository.cs" />
|
<Compile Include="Sync\SyncRepository.cs" />
|
||||||
<Compile Include="Sync\SyncConvertScheduledTask.cs" />
|
<Compile Include="Sync\SyncConvertScheduledTask.cs" />
|
||||||
<Compile Include="Sync\TargetDataProvider.cs" />
|
<Compile Include="Sync\TargetDataProvider.cs" />
|
||||||
<Compile Include="TV\TVSeriesManager.cs" />
|
|
||||||
<Compile Include="Udp\UdpMessageReceivedEventArgs.cs" />
|
<Compile Include="Udp\UdpMessageReceivedEventArgs.cs" />
|
||||||
<Compile Include="Udp\UdpServer.cs" />
|
<Compile Include="Udp\UdpServer.cs" />
|
||||||
<Compile Include="Xml\XmlReaderSettingsFactory.cs" />
|
<Compile Include="Xml\XmlReaderSettingsFactory.cs" />
|
||||||
|
|
|
@ -50,7 +50,6 @@ using MediaBrowser.Providers.Manager;
|
||||||
using MediaBrowser.Providers.Subtitles;
|
using MediaBrowser.Providers.Subtitles;
|
||||||
using MediaBrowser.Server.Implementations;
|
using MediaBrowser.Server.Implementations;
|
||||||
using MediaBrowser.Server.Implementations.Activity;
|
using MediaBrowser.Server.Implementations.Activity;
|
||||||
using MediaBrowser.Server.Implementations.Collections;
|
|
||||||
using MediaBrowser.Server.Implementations.Configuration;
|
using MediaBrowser.Server.Implementations.Configuration;
|
||||||
using MediaBrowser.Server.Implementations.Connect;
|
using MediaBrowser.Server.Implementations.Connect;
|
||||||
using MediaBrowser.Server.Implementations.Devices;
|
using MediaBrowser.Server.Implementations.Devices;
|
||||||
|
@ -58,19 +57,16 @@ using MediaBrowser.Server.Implementations.EntryPoints;
|
||||||
using MediaBrowser.Server.Implementations.HttpServer;
|
using MediaBrowser.Server.Implementations.HttpServer;
|
||||||
using MediaBrowser.Server.Implementations.HttpServer.Security;
|
using MediaBrowser.Server.Implementations.HttpServer.Security;
|
||||||
using MediaBrowser.Server.Implementations.IO;
|
using MediaBrowser.Server.Implementations.IO;
|
||||||
using MediaBrowser.Server.Implementations.Library;
|
|
||||||
using MediaBrowser.Server.Implementations.LiveTv;
|
using MediaBrowser.Server.Implementations.LiveTv;
|
||||||
using MediaBrowser.Server.Implementations.Localization;
|
using MediaBrowser.Server.Implementations.Localization;
|
||||||
using MediaBrowser.Server.Implementations.MediaEncoder;
|
using MediaBrowser.Server.Implementations.MediaEncoder;
|
||||||
using MediaBrowser.Server.Implementations.Notifications;
|
using MediaBrowser.Server.Implementations.Notifications;
|
||||||
using MediaBrowser.Server.Implementations.Persistence;
|
using MediaBrowser.Server.Implementations.Persistence;
|
||||||
using MediaBrowser.Server.Implementations.Playlists;
|
|
||||||
using MediaBrowser.Server.Implementations.Security;
|
using MediaBrowser.Server.Implementations.Security;
|
||||||
using MediaBrowser.Server.Implementations.ServerManager;
|
using MediaBrowser.Server.Implementations.ServerManager;
|
||||||
using MediaBrowser.Server.Implementations.Session;
|
using MediaBrowser.Server.Implementations.Session;
|
||||||
using MediaBrowser.Server.Implementations.Social;
|
using MediaBrowser.Server.Implementations.Social;
|
||||||
using MediaBrowser.Server.Implementations.Sync;
|
using MediaBrowser.Server.Implementations.Sync;
|
||||||
using MediaBrowser.Server.Implementations.TV;
|
|
||||||
using MediaBrowser.Server.Startup.Common.FFMpeg;
|
using MediaBrowser.Server.Startup.Common.FFMpeg;
|
||||||
using MediaBrowser.Server.Startup.Common.Migrations;
|
using MediaBrowser.Server.Startup.Common.Migrations;
|
||||||
using MediaBrowser.WebDashboard.Api;
|
using MediaBrowser.WebDashboard.Api;
|
||||||
|
@ -98,7 +94,6 @@ using MediaBrowser.Common.Updates;
|
||||||
using MediaBrowser.Controller.Entities.Audio;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using MediaBrowser.Controller.Entities.Movies;
|
using MediaBrowser.Controller.Entities.Movies;
|
||||||
using MediaBrowser.Controller.Entities.TV;
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
using MediaBrowser.Controller.IO;
|
|
||||||
using Emby.Dlna;
|
using Emby.Dlna;
|
||||||
using Emby.Dlna.ConnectionManager;
|
using Emby.Dlna.ConnectionManager;
|
||||||
using Emby.Dlna.ContentDirectory;
|
using Emby.Dlna.ContentDirectory;
|
||||||
|
@ -108,11 +103,13 @@ using Emby.Dlna.Ssdp;
|
||||||
using Emby.Server.Implementations.Activity;
|
using Emby.Server.Implementations.Activity;
|
||||||
using Emby.Server.Implementations.Channels;
|
using Emby.Server.Implementations.Channels;
|
||||||
using Emby.Server.Implementations.Collections;
|
using Emby.Server.Implementations.Collections;
|
||||||
|
using Emby.Server.Implementations.Devices;
|
||||||
using Emby.Server.Implementations.Dto;
|
using Emby.Server.Implementations.Dto;
|
||||||
using Emby.Server.Implementations.FileOrganization;
|
using Emby.Server.Implementations.FileOrganization;
|
||||||
using Emby.Server.Implementations.Library;
|
using Emby.Server.Implementations.Library;
|
||||||
using Emby.Server.Implementations.Persistence;
|
using Emby.Server.Implementations.Persistence;
|
||||||
using Emby.Server.Implementations.Playlists;
|
using Emby.Server.Implementations.Playlists;
|
||||||
|
using Emby.Server.Implementations.TV;
|
||||||
using Emby.Server.Implementations.Updates;
|
using Emby.Server.Implementations.Updates;
|
||||||
using MediaBrowser.Model.Activity;
|
using MediaBrowser.Model.Activity;
|
||||||
using MediaBrowser.Model.Dlna;
|
using MediaBrowser.Model.Dlna;
|
||||||
|
@ -582,7 +579,7 @@ namespace MediaBrowser.Server.Startup.Common
|
||||||
SyncRepository = await GetSyncRepository().ConfigureAwait(false);
|
SyncRepository = await GetSyncRepository().ConfigureAwait(false);
|
||||||
RegisterSingleInstance(SyncRepository);
|
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);
|
RegisterSingleInstance(UserManager);
|
||||||
|
|
||||||
LibraryManager = new LibraryManager(Logger, TaskManager, UserManager, ServerConfigurationManager, UserDataManager, () => LibraryMonitor, FileSystemManager, () => ProviderManager, () => UserViewManager);
|
LibraryManager = new LibraryManager(Logger, TaskManager, UserManager, ServerConfigurationManager, UserDataManager, () => LibraryMonitor, FileSystemManager, () => ProviderManager, () => UserViewManager);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user