From bb879fff33ddc40bc15b025c3e7449c7becb2d46 Mon Sep 17 00:00:00 2001 From: cvium Date: Sat, 5 Jan 2019 23:07:06 +0100 Subject: Remove AutoRunAtStartup --- MediaBrowser.Model/System/SystemInfo.cs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'MediaBrowser.Model/System') diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs index 031222b75..a63ce5e66 100644 --- a/MediaBrowser.Model/System/SystemInfo.cs +++ b/MediaBrowser.Model/System/SystemInfo.cs @@ -118,12 +118,6 @@ namespace MediaBrowser.Model.System /// true if this instance has update available; otherwise, false. public bool HasUpdateAvailable { get; set; } - /// - /// Gets or sets a value indicating whether [supports automatic run at startup]. - /// - /// true if [supports automatic run at startup]; otherwise, false. - public bool SupportsAutoRunAtStartup { get; set; } - public string EncoderLocationType { get; set; } public Architecture SystemArchitecture { get; set; } -- cgit v1.2.3 From c07d5a69635494e1bcd39890df8f929fb7353709 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Wed, 2 Jan 2019 15:57:48 +0100 Subject: Remove unused PowerManagement It isn't up to the application to prevent the system from going to sleep --- Emby.Server.Implementations/ApplicationHost.cs | 5 -- .../EntryPoints/KeepServerAwake.cs | 65 ---------------------- .../LiveTv/EmbyTV/EmbyTV.cs | 20 ++++++- .../LiveTv/EmbyTV/TimerManager.cs | 30 ++-------- Jellyfin.Server/CoreAppHost.cs | 4 +- Jellyfin.Server/PowerManagement.cs | 23 -------- Jellyfin.Server/Program.cs | 4 +- MediaBrowser.Model/System/IPowerManagement.cs | 11 ---- 8 files changed, 26 insertions(+), 136 deletions(-) delete mode 100644 Emby.Server.Implementations/EntryPoints/KeepServerAwake.cs delete mode 100644 Jellyfin.Server/PowerManagement.cs delete mode 100644 MediaBrowser.Model/System/IPowerManagement.cs (limited to 'MediaBrowser.Model/System') diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 9b9c6146f..950ae10c7 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -369,7 +369,6 @@ namespace Emby.Server.Implementations public StartupOptions StartupOptions { get; private set; } - internal IPowerManagement PowerManagement { get; private set; } internal IImageEncoder ImageEncoder { get; private set; } protected IProcessFactory ProcessFactory { get; private set; } @@ -391,7 +390,6 @@ namespace Emby.Server.Implementations ILoggerFactory loggerFactory, StartupOptions options, IFileSystem fileSystem, - IPowerManagement powerManagement, IEnvironmentInfo environmentInfo, IImageEncoder imageEncoder, ISystemEvents systemEvents, @@ -417,7 +415,6 @@ namespace Emby.Server.Implementations Logger = LoggerFactory.CreateLogger("App"); StartupOptions = options; - PowerManagement = powerManagement; ImageEncoder = imageEncoder; @@ -857,8 +854,6 @@ namespace Emby.Server.Implementations SocketFactory = new SocketFactory(LoggerFactory.CreateLogger("SocketFactory")); RegisterSingleInstance(SocketFactory); - RegisterSingleInstance(PowerManagement); - SecurityManager = new PluginSecurityManager(this, HttpClient, JsonSerializer, ApplicationPaths, LoggerFactory, FileSystemManager, CryptographyProvider); RegisterSingleInstance(SecurityManager); diff --git a/Emby.Server.Implementations/EntryPoints/KeepServerAwake.cs b/Emby.Server.Implementations/EntryPoints/KeepServerAwake.cs deleted file mode 100644 index a6dadcef0..000000000 --- a/Emby.Server.Implementations/EntryPoints/KeepServerAwake.cs +++ /dev/null @@ -1,65 +0,0 @@ -using MediaBrowser.Controller; -using MediaBrowser.Controller.Plugins; -using MediaBrowser.Controller.Session; -using Microsoft.Extensions.Logging; -using System; -using System.Linq; -using MediaBrowser.Model.System; -using MediaBrowser.Model.Threading; - -namespace Emby.Server.Implementations.EntryPoints -{ - public class KeepServerAwake : IServerEntryPoint - { - private readonly ISessionManager _sessionManager; - private readonly ILogger _logger; - private ITimer _timer; - private readonly IServerApplicationHost _appHost; - private readonly ITimerFactory _timerFactory; - private readonly IPowerManagement _powerManagement; - - public KeepServerAwake(ISessionManager sessionManager, ILogger logger, IServerApplicationHost appHost, ITimerFactory timerFactory, IPowerManagement powerManagement) - { - _sessionManager = sessionManager; - _logger = logger; - _appHost = appHost; - _timerFactory = timerFactory; - _powerManagement = powerManagement; - } - - public void Run() - { - _timer = _timerFactory.Create(OnTimerCallback, null, TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5)); - } - - private void OnTimerCallback(object state) - { - var now = DateTime.UtcNow; - - try - { - if (_sessionManager.Sessions.Any(i => (now - i.LastActivityDate).TotalMinutes < 15)) - { - _powerManagement.PreventSystemStandby(); - } - else - { - _powerManagement.AllowSystemStandby(); - } - } - catch (Exception ex) - { - _logger.LogError(ex, "Error resetting system standby timer"); - } - } - - public void Dispose() - { - if (_timer != null) - { - _timer.Dispose(); - _timer = null; - } - } - } -} diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 59f9fe86f..81a47bfea 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -75,7 +75,23 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV private readonly IStreamHelper _streamHelper; - public EmbyTV(IServerApplicationHost appHost, IStreamHelper streamHelper, IMediaSourceManager mediaSourceManager, IAssemblyInfo assemblyInfo, ILogger logger, IJsonSerializer jsonSerializer, IPowerManagement powerManagement, IHttpClient httpClient, IServerConfigurationManager config, ILiveTvManager liveTvManager, IFileSystem fileSystem, ILibraryManager libraryManager, ILibraryMonitor libraryMonitor, IProviderManager providerManager, IMediaEncoder mediaEncoder, ITimerFactory timerFactory, IProcessFactory processFactory, ISystemEvents systemEvents) + public EmbyTV(IServerApplicationHost appHost, + IStreamHelper streamHelper, + IMediaSourceManager mediaSourceManager, + IAssemblyInfo assemblyInfo, + ILogger logger, + IJsonSerializer jsonSerializer, + IHttpClient httpClient, + IServerConfigurationManager config, + ILiveTvManager liveTvManager, + IFileSystem fileSystem, + ILibraryManager libraryManager, + ILibraryMonitor libraryMonitor, + IProviderManager providerManager, + IMediaEncoder mediaEncoder, + ITimerFactory timerFactory, + IProcessFactory processFactory, + ISystemEvents systemEvents) { Current = this; @@ -97,7 +113,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV _streamHelper = streamHelper; _seriesTimerProvider = new SeriesTimerManager(fileSystem, jsonSerializer, _logger, Path.Combine(DataPath, "seriestimers")); - _timerProvider = new TimerManager(fileSystem, jsonSerializer, _logger, Path.Combine(DataPath, "timers"), _logger, timerFactory, powerManagement); + _timerProvider = new TimerManager(fileSystem, jsonSerializer, _logger, Path.Combine(DataPath, "timers"), _logger, timerFactory); _timerProvider.TimerFired += _timerProvider_TimerFired; _config.NamedConfigurationUpdated += _config_NamedConfigurationUpdated; diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs index 76a044c02..e4ab34770 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs @@ -9,7 +9,6 @@ using MediaBrowser.Model.Serialization; using MediaBrowser.Model.IO; using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Threading; -using MediaBrowser.Model.System; namespace Emby.Server.Implementations.LiveTv.EmbyTV { @@ -20,14 +19,12 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV public event EventHandler> TimerFired; private readonly ITimerFactory _timerFactory; - private readonly IPowerManagement _powerManagement; - public TimerManager(IFileSystem fileSystem, IJsonSerializer jsonSerializer, ILogger logger, string dataPath, ILogger logger1, ITimerFactory timerFactory, IPowerManagement powerManagement) + public TimerManager(IFileSystem fileSystem, IJsonSerializer jsonSerializer, ILogger logger, string dataPath, ILogger logger1, ITimerFactory timerFactory) : base(fileSystem, jsonSerializer, logger, dataPath, (r1, r2) => string.Equals(r1.Id, r2.Id, StringComparison.OrdinalIgnoreCase)) { _logger = logger1; _timerFactory = timerFactory; - _powerManagement = powerManagement; } public void RestartTimers() @@ -36,7 +33,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV foreach (var item in GetAll().ToList()) { - AddOrUpdateSystemTimer(item, false); + AddOrUpdateSystemTimer(item); } } @@ -59,7 +56,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV public override void Update(TimerInfo item) { base.Update(item); - AddOrUpdateSystemTimer(item, false); + AddOrUpdateSystemTimer(item); } public void AddOrUpdate(TimerInfo item, bool resetTimer) @@ -90,7 +87,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV } base.Add(item); - AddOrUpdateSystemTimer(item, true); + AddOrUpdateSystemTimer(item); } private bool ShouldStartTimer(TimerInfo item) @@ -104,7 +101,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV return true; } - private void AddOrUpdateSystemTimer(TimerInfo item, bool scheduleSystemWakeTimer) + private void AddOrUpdateSystemTimer(TimerInfo item) { StopTimer(item); @@ -124,23 +121,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV var dueTime = startDate - now; StartTimer(item, dueTime); - - if (scheduleSystemWakeTimer && dueTime >= TimeSpan.FromMinutes(15)) - { - ScheduleSystemWakeTimer(startDate, item.Name); - } - } - - private void ScheduleSystemWakeTimer(DateTime startDate, string displayName) - { - try - { - _powerManagement.ScheduleWake(startDate.AddMinutes(-5), displayName); - } - catch (Exception ex) - { - _logger.LogError(ex, "Error scheduling wake timer"); - } } private void StartTimer(TimerInfo item, TimeSpan dueTime) diff --git a/Jellyfin.Server/CoreAppHost.cs b/Jellyfin.Server/CoreAppHost.cs index b54634387..64e03f22e 100644 --- a/Jellyfin.Server/CoreAppHost.cs +++ b/Jellyfin.Server/CoreAppHost.cs @@ -11,8 +11,8 @@ namespace Jellyfin.Server { public class CoreAppHost : ApplicationHost { - public CoreAppHost(ServerApplicationPaths applicationPaths, ILoggerFactory loggerFactory, StartupOptions options, IFileSystem fileSystem, IPowerManagement powerManagement, IEnvironmentInfo environmentInfo, MediaBrowser.Controller.Drawing.IImageEncoder imageEncoder, ISystemEvents systemEvents, MediaBrowser.Common.Net.INetworkManager networkManager) - : base(applicationPaths, loggerFactory, options, fileSystem, powerManagement, environmentInfo, imageEncoder, systemEvents, networkManager) + public CoreAppHost(ServerApplicationPaths applicationPaths, ILoggerFactory loggerFactory, StartupOptions options, IFileSystem fileSystem, IEnvironmentInfo environmentInfo, MediaBrowser.Controller.Drawing.IImageEncoder imageEncoder, ISystemEvents systemEvents, MediaBrowser.Common.Net.INetworkManager networkManager) + : base(applicationPaths, loggerFactory, options, fileSystem, environmentInfo, imageEncoder, systemEvents, networkManager) { } diff --git a/Jellyfin.Server/PowerManagement.cs b/Jellyfin.Server/PowerManagement.cs deleted file mode 100644 index c27c51893..000000000 --- a/Jellyfin.Server/PowerManagement.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using MediaBrowser.Model.System; - -namespace Jellyfin.Server.Native -{ - public class PowerManagement : IPowerManagement - { - public void PreventSystemStandby() - { - - } - - public void AllowSystemStandby() - { - - } - - public void ScheduleWake(DateTime wakeTimeUtc, string displayName) - { - - } - } -} diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index 03fdacb26..e9f4708c8 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -13,7 +13,6 @@ using Emby.Server.Implementations; using Emby.Server.Implementations.EnvironmentInfo; using Emby.Server.Implementations.IO; using Emby.Server.Implementations.Networking; -using Jellyfin.Server.Native; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Net; using MediaBrowser.Controller.Drawing; @@ -71,7 +70,6 @@ namespace Jellyfin.Server _loggerFactory, options, fileSystem, - new PowerManagement(), environmentInfo, new NullImageEncoder(), new SystemEvents(_loggerFactory.CreateLogger("SystemEvents")), @@ -274,7 +272,7 @@ namespace Jellyfin.Server } } - public static void Shutdown() + public static void Shutdown() { ApplicationTaskCompletionSource.SetResult(true); } diff --git a/MediaBrowser.Model/System/IPowerManagement.cs b/MediaBrowser.Model/System/IPowerManagement.cs deleted file mode 100644 index 03907568c..000000000 --- a/MediaBrowser.Model/System/IPowerManagement.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace MediaBrowser.Model.System -{ - public interface IPowerManagement - { - void PreventSystemStandby(); - void AllowSystemStandby(); - void ScheduleWake(DateTime wakeTimeUtc, string displayName); - } -} -- cgit v1.2.3 From bd169e4fd4f5586ab8dad323a520cbcc10de54fe Mon Sep 17 00:00:00 2001 From: hawken Date: Mon, 7 Jan 2019 23:27:46 +0000 Subject: remove trailing whitespace --- BDInfo/Properties/AssemblyInfo.cs | 6 +- BDInfo/TSCodecDTS.cs | 2 +- BDInfo/TSCodecDTSHD.cs | 10 +- BDInfo/TSCodecMPEG2.cs | 4 +- BDInfo/TSCodecTrueHD.cs | 12 +- BDInfo/TSCodecVC1.cs | 6 +- BDInfo/TSPlaylistFile.cs | 24 +- BDInfo/TSStream.cs | 16 +- BDInfo/TSStreamClipFile.cs | 10 +- BDInfo/TSStreamFile.cs | 140 ++-- DvdLib/Ifo/ProgramChain.cs | 2 +- DvdLib/Ifo/Title.cs | 2 +- DvdLib/Properties/AssemblyInfo.cs | 6 +- Emby.Dlna/Common/Argument.cs | 2 +- .../ConnectionManager/ServiceActionListBuilder.cs | 2 +- .../ContentDirectory/ContentDirectoryXmlBuilder.cs | 2 +- .../ContentDirectory/ServiceActionListBuilder.cs | 2 +- Emby.Dlna/IUpnpService.cs | 2 +- Emby.Dlna/Main/DlnaEntryPoint.cs | 40 +- Emby.Dlna/PlayTo/Device.cs | 2 +- Emby.Dlna/PlayTo/SsdpHttpClient.cs | 26 +- Emby.Dlna/PlayTo/TransportCommands.cs | 2 +- Emby.Dlna/PlayTo/uBaseObject.cs | 2 +- Emby.Dlna/PlayTo/uParser.cs | 2 +- Emby.Dlna/Profiles/SonyBravia2010Profile.cs | 2 +- Emby.Dlna/Properties/AssemblyInfo.cs | 6 +- Emby.Dlna/Service/BaseService.cs | 2 +- Emby.Dlna/Service/ControlErrorHandler.cs | 2 +- Emby.Dlna/Ssdp/DeviceDiscovery.cs | 4 +- Emby.Drawing.Skia/Properties/AssemblyInfo.cs | 4 +- Emby.Drawing/ImageProcessor.cs | 2 +- Emby.Drawing/Properties/AssemblyInfo.cs | 8 +- Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs | 10 +- Emby.IsoMounting/IsoMounter/LinuxMount.cs | 2 +- Emby.Naming/AudioBook/AudioBookInfo.cs | 2 +- Emby.Naming/AudioBook/AudioBookResolver.cs | 2 +- Emby.Naming/Common/NamingOptions.cs | 2 +- Emby.Naming/TV/EpisodeResolver.cs | 2 +- Emby.Naming/Video/CleanDateTimeParser.cs | 2 +- Emby.Naming/Video/StackResolver.cs | 2 +- Emby.Naming/Video/StubResolver.cs | 2 +- Emby.Naming/Video/VideoFileInfo.cs | 2 +- Emby.Naming/Video/VideoInfo.cs | 2 +- Emby.Naming/Video/VideoListResolver.cs | 4 +- Emby.Photos/Properties/AssemblyInfo.cs | 10 +- Emby.Server.Implementations/ApplicationHost.cs | 22 +- .../Browser/BrowserLauncher.cs | 2 +- .../Channels/ChannelManager.cs | 2 +- .../Channels/RefreshChannelsScheduledTask.cs | 4 +- .../Data/SqliteItemRepository.cs | 6 +- .../Devices/DeviceManager.cs | 2 +- .../EntryPoints/LibraryChangedNotifier.cs | 2 +- Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs | 2 +- .../HttpServer/FileWriter.cs | 2 +- .../HttpServer/HttpListenerHost.cs | 2 +- .../HttpServer/HttpResultFactory.cs | 2 +- .../HttpServer/IHttpListener.cs | 2 +- .../HttpServer/Security/AuthorizationContext.cs | 2 +- Emby.Server.Implementations/IO/FileRefresher.cs | 2 +- .../IO/ManagedFileSystem.cs | 2 +- .../Library/LibraryManager.cs | 4 +- .../Library/Resolvers/Audio/AudioResolver.cs | 2 +- .../Library/Resolvers/Audio/MusicAlbumResolver.cs | 2 +- .../Library/Resolvers/Audio/MusicArtistResolver.cs | 2 +- .../Library/Resolvers/BaseVideoResolver.cs | 8 +- .../Library/Resolvers/Books/BookResolver.cs | 6 +- .../Library/Resolvers/Movies/MovieResolver.cs | 2 +- .../Library/Resolvers/TV/EpisodeResolver.cs | 6 +- .../Library/UserViewManager.cs | 2 +- .../Library/Validators/ArtistsValidator.cs | 2 +- .../LiveTv/EmbyTV/EmbyTV.cs | 2 +- .../LiveTv/EmbyTV/EncodedRecorder.cs | 14 +- .../LiveTv/LiveTvManager.cs | 2 +- .../LiveTv/RefreshChannelsScheduledTask.cs | 4 +- .../LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs | 2 +- .../Localization/TextLocalizer.cs | 2 +- .../Networking/IPNetwork/BigIntegerExt.cs | 20 +- .../Properties/AssemblyInfo.cs | 6 +- .../ScheduledTasks/PeopleValidationTask.cs | 4 +- .../ScheduledTasks/RefreshMediaLibraryTask.cs | 4 +- .../ScheduledTasks/Tasks/DeleteCacheFileTask.cs | 4 +- .../ScheduledTasks/Tasks/DeleteLogFileTask.cs | 4 +- .../Security/MBLicenseFile.cs | 2 +- .../Services/ServiceHandler.cs | 2 +- .../Services/ServicePath.cs | 2 +- .../Services/UrlExtensions.cs | 2 +- .../Sorting/DatePlayedComparer.cs | 2 +- .../Sorting/PlayCountComparer.cs | 2 +- .../Sorting/PremiereDateComparer.cs | 2 +- .../NLangDetect/Extensions/StringExtensions.cs | 2 +- .../TextEncoding/TextEncodingDetect.cs | 8 +- .../UniversalDetector/CharsetDetector.cs | 32 +- .../UniversalDetector/Core/Big5Prober.cs | 18 +- .../UniversalDetector/Core/BitPackage.cs | 20 +- .../UniversalDetector/Core/CharsetProber.cs | 44 +- .../UniversalDetector/Core/Charsets.cs | 44 +- .../UniversalDetector/Core/CodingStateMachine.cs | 34 +- .../UniversalDetector/Core/EUCJPProber.cs | 18 +- .../UniversalDetector/Core/EUCKRProber.cs | 14 +- .../UniversalDetector/Core/EUCTWProber.cs | 18 +- .../UniversalDetector/Core/EscCharsetProber.cs | 14 +- .../TextEncoding/UniversalDetector/Core/EscSM.cs | 356 ++++----- .../UniversalDetector/Core/GB18030Prober.cs | 20 +- .../UniversalDetector/Core/HebrewProber.cs | 130 ++-- .../Core/JapaneseContextAnalyser.cs | 68 +- .../UniversalDetector/Core/LangBulgarianModel.cs | 28 +- .../UniversalDetector/Core/LangCyrillicModel.cs | 36 +- .../UniversalDetector/Core/LangGreekModel.cs | 22 +- .../UniversalDetector/Core/LangHebrewModel.cs | 16 +- .../UniversalDetector/Core/LangHungarianModel.cs | 20 +- .../UniversalDetector/Core/LangThaiModel.cs | 16 +- .../UniversalDetector/Core/Latin1Prober.cs | 38 +- .../UniversalDetector/Core/MBCSGroupProber.cs | 16 +- .../TextEncoding/UniversalDetector/Core/MBCSSM.cs | 834 ++++++++++----------- .../UniversalDetector/Core/SBCSGroupProber.cs | 28 +- .../UniversalDetector/Core/SBCharsetProber.cs | 44 +- .../UniversalDetector/Core/SJISProber.cs | 20 +- .../TextEncoding/UniversalDetector/Core/SMModel.cs | 12 +- .../UniversalDetector/Core/SequenceModel.cs | 30 +- .../UniversalDetector/Core/UTF8Prober.cs | 10 +- .../UniversalDetector/Core/UniversalDetector.cs | 60 +- .../UniversalDetector/DetectionConfidence.cs | 20 +- .../UniversalDetector/ICharsetDetector.cs | 20 +- Emby.Server.Implementations/Udp/UdpServer.cs | 2 +- .../Updates/InstallationManager.cs | 2 +- .../UserViews/FolderImageProvider.cs | 2 +- Emby.XmlTv/Emby.XmlTv.Console/Program.cs | 2 +- .../Emby.XmlTv.Console/Properties/AssemblyInfo.cs | 10 +- .../Emby.XmlTv.Test/Properties/AssemblyInfo.cs | 10 +- .../Emby.XmlTv.Test/XmlTvReaderDateTimeTests.cs | 2 +- Emby.XmlTv/Emby.XmlTv/Entities/XmlTvEpisode.cs | 2 +- Emby.XmlTv/Emby.XmlTv/Entities/XmlTvProgram.cs | 2 +- Emby.XmlTv/Emby.XmlTv/Properties/AssemblyInfo.cs | 10 +- MediaBrowser.Api/ApiEntryPoint.cs | 4 +- MediaBrowser.Api/DisplayPreferencesService.cs | 2 +- MediaBrowser.Api/EnvironmentService.cs | 2 +- MediaBrowser.Api/Playback/BaseStreamingService.cs | 2 +- MediaBrowser.Api/Playback/Hls/BaseHlsService.cs | 2 +- MediaBrowser.Api/Playback/MediaInfoService.cs | 6 +- MediaBrowser.Api/Playback/StreamRequest.cs | 2 +- MediaBrowser.Api/Playback/StreamState.cs | 2 +- MediaBrowser.Api/PluginService.cs | 2 +- MediaBrowser.Api/Properties/AssemblyInfo.cs | 8 +- .../ScheduledTasks/ScheduledTaskService.cs | 2 +- .../System/ActivityLogWebSocketListener.cs | 2 +- MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs | 4 +- MediaBrowser.Api/UserLibrary/GenresService.cs | 2 +- MediaBrowser.Api/UserLibrary/MusicGenresService.cs | 2 +- MediaBrowser.Api/UserLibrary/YearsService.cs | 2 +- MediaBrowser.Common/Net/HttpResponseInfo.cs | 2 +- MediaBrowser.Common/Properties/AssemblyInfo.cs | 8 +- MediaBrowser.Controller/Dlna/IDlnaManager.cs | 8 +- .../Drawing/ImageProcessorExtensions.cs | 2 +- MediaBrowser.Controller/Entities/BaseItem.cs | 4 +- .../Entities/BaseItemExtensions.cs | 8 +- MediaBrowser.Controller/Entities/Folder.cs | 2 +- .../Entities/ISupportsBoxSetGrouping.cs | 2 +- .../Entities/InternalItemsQuery.cs | 2 +- MediaBrowser.Controller/Entities/User.cs | 2 +- MediaBrowser.Controller/Entities/UserItemData.cs | 2 +- MediaBrowser.Controller/IServerApplicationHost.cs | 2 +- MediaBrowser.Controller/IServerApplicationPaths.cs | 2 +- MediaBrowser.Controller/Library/IUserManager.cs | 4 +- MediaBrowser.Controller/Library/ItemResolveArgs.cs | 2 +- MediaBrowser.Controller/LiveTv/ChannelInfo.cs | 2 +- MediaBrowser.Controller/LiveTv/ILiveTvService.cs | 2 +- .../LiveTv/LiveTvServiceStatusInfo.cs | 2 +- MediaBrowser.Controller/LiveTv/LiveTvTunerInfo.cs | 6 +- MediaBrowser.Controller/LiveTv/RecordingInfo.cs | 6 +- MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs | 8 +- .../MediaEncoding/ImageEncodingOptions.cs | 4 +- MediaBrowser.Controller/Net/AuthorizationInfo.cs | 4 +- .../Net/BasePeriodicWebSocketListener.cs | 2 +- .../Net/IAuthorizationContext.cs | 2 +- MediaBrowser.Controller/Net/ISessionContext.cs | 2 +- .../Plugins/ILocalizablePlugin.cs | 2 +- MediaBrowser.Controller/Properties/AssemblyInfo.cs | 8 +- .../Providers/ILocalMetadataProvider.cs | 2 +- .../Providers/IPreRefreshProvider.cs | 2 +- .../Providers/IRemoteImageProvider.cs | 2 +- MediaBrowser.Controller/Resolvers/IItemResolver.cs | 2 +- .../Security/AuthenticationInfo.cs | 2 +- .../Security/AuthenticationInfoQuery.cs | 4 +- MediaBrowser.Controller/Session/ISessionManager.cs | 8 +- .../Properties/AssemblyInfo.cs | 10 +- MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs | 2 +- .../Encoder/EncodingJobFactory.cs | 4 +- MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs | 8 +- .../Probing/InternalMediaInfoResult.cs | 2 +- .../Probing/ProbeResultNormalizer.cs | 8 +- .../Properties/AssemblyInfo.cs | 10 +- MediaBrowser.MediaEncoding/Subtitles/AssParser.cs | 4 +- MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs | 4 +- MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs | 4 +- MediaBrowser.MediaEncoding/Subtitles/TtmlWriter.cs | 2 +- MediaBrowser.Model/Channels/ChannelFeatures.cs | 2 +- MediaBrowser.Model/Channels/ChannelQuery.cs | 2 +- .../Configuration/BaseApplicationConfiguration.cs | 2 +- MediaBrowser.Model/Dlna/AudioOptions.cs | 2 +- MediaBrowser.Model/Dlna/CodecProfile.cs | 2 +- MediaBrowser.Model/Dlna/ConditionProcessor.cs | 2 +- MediaBrowser.Model/Dlna/ProfileCondition.cs | 2 +- MediaBrowser.Model/Dlna/SearchCriteria.cs | 2 +- MediaBrowser.Model/Dlna/SortCriteria.cs | 2 +- MediaBrowser.Model/Dlna/StreamBuilder.cs | 2 +- MediaBrowser.Model/Dto/BaseItemDto.cs | 2 +- MediaBrowser.Model/Dto/GameSystemSummary.cs | 2 +- MediaBrowser.Model/Dto/ImageOptions.cs | 2 +- MediaBrowser.Model/Dto/NameValuePair.cs | 2 +- MediaBrowser.Model/Dto/UserDto.cs | 4 +- MediaBrowser.Model/Entities/MediaStream.cs | 4 +- .../Entities/ProviderIdsExtensions.cs | 4 +- MediaBrowser.Model/Extensions/LinqExtensions.cs | 6 +- MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs | 2 +- MediaBrowser.Model/Net/HttpException.cs | 2 +- .../Notifications/NotificationOption.cs | 2 +- MediaBrowser.Model/Properties/AssemblyInfo.cs | 4 +- MediaBrowser.Model/Providers/RemoteImageInfo.cs | 2 +- MediaBrowser.Model/Querying/AllThemeMediaResult.cs | 2 +- MediaBrowser.Model/Querying/EpisodeQuery.cs | 2 +- MediaBrowser.Model/Querying/ItemFields.cs | 2 +- MediaBrowser.Model/Querying/NextUpQuery.cs | 4 +- MediaBrowser.Model/Search/SearchHint.cs | 12 +- MediaBrowser.Model/Serialization/IXmlSerializer.cs | 2 +- MediaBrowser.Model/Services/ApiMemberAttribute.cs | 4 +- MediaBrowser.Model/Services/IHasRequestFilter.cs | 2 +- MediaBrowser.Model/Services/IHttpResponse.cs | 2 +- MediaBrowser.Model/Session/PlaybackProgressInfo.cs | 2 +- MediaBrowser.Model/System/SystemInfo.cs | 2 +- MediaBrowser.Model/Tasks/ITaskManager.cs | 4 +- MediaBrowser.Model/Tasks/TaskResult.cs | 2 +- MediaBrowser.Model/Updates/PackageInfo.cs | 2 +- .../BoxSets/MovieDbBoxSetImageProvider.cs | 2 +- .../BoxSets/MovieDbBoxSetProvider.cs | 4 +- .../Manager/GenericPriorityQueue.cs | 4 +- MediaBrowser.Providers/Manager/IPriorityQueue.cs | 4 +- MediaBrowser.Providers/Manager/ImageSaver.cs | 2 +- .../Manager/SimplePriorityQueue.cs | 4 +- .../MediaInfo/SubtitleScheduledTask.cs | 4 +- .../Movies/GenericMovieDbInfo.cs | 2 +- .../Movies/MovieDbImageProvider.cs | 2 +- .../Music/AlbumMetadataService.cs | 2 +- .../Music/AudioDbAlbumImageProvider.cs | 4 +- .../Music/AudioDbArtistImageProvider.cs | 2 +- MediaBrowser.Providers/Music/Extensions.cs | 2 +- .../Music/FanArtAlbumProvider.cs | 2 +- .../Music/FanArtArtistProvider.cs | 2 +- MediaBrowser.Providers/Properties/AssemblyInfo.cs | 8 +- .../Studios/StudiosImageProvider.cs | 2 +- .../TV/FanArt/FanArtSeasonProvider.cs | 2 +- .../TV/FanArt/FanartSeriesProvider.cs | 2 +- .../TV/TheMovieDb/MovieDbEpisodeImageProvider.cs | 2 +- .../TV/TheMovieDb/MovieDbEpisodeProvider.cs | 2 +- .../TV/TheMovieDb/MovieDbSeriesImageProvider.cs | 2 +- .../TV/TheTVDB/TvdbSeasonImageProvider.cs | 2 +- .../TV/TheTVDB/TvdbSeriesImageProvider.cs | 2 +- .../TV/TheTVDB/TvdbSeriesProvider.cs | 2 +- .../MediaEncoding/Subtitles/VttWriterTest.cs | 2 +- MediaBrowser.Tests/Properties/AssemblyInfo.cs | 10 +- MediaBrowser.WebDashboard/Api/DashboardService.cs | 2 +- .../Properties/AssemblyInfo.cs | 8 +- .../Parsers/EpisodeNfoParser.cs | 2 +- .../Properties/AssemblyInfo.cs | 10 +- MediaBrowser.XbmcMetadata/Savers/AlbumNfoSaver.cs | 6 +- MediaBrowser.XbmcMetadata/Savers/ArtistNfoSaver.cs | 4 +- MediaBrowser.XbmcMetadata/Savers/SeriesNfoSaver.cs | 2 +- Mono.Nat/ISearcher.cs | 4 +- Mono.Nat/Pmp/PmpNatDevice.cs | 4 +- Mono.Nat/Properties/AssemblyInfo.cs | 10 +- Mono.Nat/Upnp/Messages/GetServicesMessage.cs | 4 +- .../Messages/Requests/CreatePortMappingMessage.cs | 4 +- Mono.Nat/Upnp/Messages/UpnpMessage.cs | 4 +- Mono.Nat/Upnp/UpnpNatDevice.cs | 4 +- OpenSubtitlesHandler/Console/OSHConsole.cs | 2 +- .../MethodResponses/MethodResponseAutoUpdate.cs | 8 +- .../MethodResponses/MethodResponseMovieDetails.cs | 2 +- .../MethodResponses/MethodResponseServerInfo.cs | 18 +- OpenSubtitlesHandler/OpenSubtitles.cs | 110 +-- OpenSubtitlesHandler/Properties/AssemblyInfo.cs | 10 +- .../SubtitleTypes/SubtitleSearchParameters.cs | 2 +- OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs | 2 +- RSSDP/Properties/AssemblyInfo.cs | 6 +- RSSDP/SsdpDeviceLocator.cs | 2 +- SocketHttpListener/Net/ChunkedInputStream.cs | 4 +- SocketHttpListener/Net/HttpEndPointListener.cs | 6 +- SocketHttpListener/Net/HttpListener.cs | 2 +- .../Net/HttpListenerRequestUriBuilder.cs | 12 +- SocketHttpListener/Net/WebSockets/HttpWebSocket.cs | 10 +- .../Net/WebSockets/WebSocketCloseStatus.cs | 6 +- SocketHttpListener/Properties/AssemblyInfo.cs | 10 +- 290 files changed, 1708 insertions(+), 1708 deletions(-) (limited to 'MediaBrowser.Model/System') diff --git a/BDInfo/Properties/AssemblyInfo.cs b/BDInfo/Properties/AssemblyInfo.cs index aa44da190..539645295 100644 --- a/BDInfo/Properties/AssemblyInfo.cs +++ b/BDInfo/Properties/AssemblyInfo.cs @@ -3,7 +3,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("BDInfo")] @@ -19,11 +19,11 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.1")] \ No newline at end of file diff --git a/BDInfo/TSCodecDTS.cs b/BDInfo/TSCodecDTS.cs index 58eb60fc5..904dcd986 100644 --- a/BDInfo/TSCodecDTS.cs +++ b/BDInfo/TSCodecDTS.cs @@ -148,7 +148,7 @@ namespace BDInfo stream.IsVBR = true; stream.IsInitialized = true; break; - + default: stream.IsVBR = false; stream.IsInitialized = true; diff --git a/BDInfo/TSCodecDTSHD.cs b/BDInfo/TSCodecDTSHD.cs index 169a8077f..3c5ad85cc 100644 --- a/BDInfo/TSCodecDTSHD.cs +++ b/BDInfo/TSCodecDTSHD.cs @@ -22,9 +22,9 @@ namespace BDInfo { public abstract class TSCodecDTSHD { - private static int[] SampleRates = new int[] + private static int[] SampleRates = new int[] { 0x1F40, 0x3E80, 0x7D00, 0x0FA00, 0x1F400, 0x5622, 0x0AC44, 0x15888, 0x2B110, 0x56220, 0x2EE0, 0x5DC0, 0x0BB80, 0x17700, 0x2EE00, 0x5DC00 }; - + public static void Scan( TSAudioStream stream, TSStreamBuffer buffer, @@ -131,7 +131,7 @@ namespace BDInfo else { AssetSizes[i] = buffer.ReadBits(16) + 1; - } + } } for (int i = 0; i < nuNumAssets; i++) { @@ -189,7 +189,7 @@ namespace BDInfo } stream.SampleRate = SampleRates[nuMaxSampleRate]; stream.BitDepth = nuBitResolution; - + stream.LFE = 0; if ((nuSpkrActivityMask & 0x8) == 0x8) { @@ -240,7 +240,7 @@ namespace BDInfo stream.IsInitialized = true; } stream.IsInitialized = (stream.BitRate > 0 ? true : false); - } + } } } } diff --git a/BDInfo/TSCodecMPEG2.cs b/BDInfo/TSCodecMPEG2.cs index 3413a06e9..1d523528e 100644 --- a/BDInfo/TSCodecMPEG2.cs +++ b/BDInfo/TSCodecMPEG2.cs @@ -33,7 +33,7 @@ namespace BDInfo int pictureParse = 0; int sequenceHeaderParse = 0; int extensionParse = 0; - int sequenceExtensionParse = 0; + int sequenceExtensionParse = 0; for (int i = 0; i < buffer.Length; i++) { @@ -189,7 +189,7 @@ namespace BDInfo #if DEBUG if (sequenceExtensionParse == 0) { - uint sequenceExtension = + uint sequenceExtension = ((parse & 0x8) >> 3); if (sequenceExtension == 0) { diff --git a/BDInfo/TSCodecTrueHD.cs b/BDInfo/TSCodecTrueHD.cs index baf4fa3df..6ea78614c 100644 --- a/BDInfo/TSCodecTrueHD.cs +++ b/BDInfo/TSCodecTrueHD.cs @@ -36,7 +36,7 @@ namespace BDInfo for (int i = 0; i < buffer.Length; i++) { sync = (sync << 8) + buffer.ReadByte(); - if (sync == 0xF8726FBA) + if (sync == 0xF8726FBA) { syncFound = true; break; @@ -63,7 +63,7 @@ namespace BDInfo int ratebits = buffer.ReadBits(4); if (ratebits != 0xF) { - stream.SampleRate = + stream.SampleRate = (((ratebits & 8) > 0 ? 44100 : 48000) << (ratebits & 7)); } int temp1 = buffer.ReadBits(8); @@ -149,9 +149,9 @@ namespace BDInfo int peak_bitrate = buffer.ReadBits(15); peak_bitrate = (peak_bitrate * stream.SampleRate) >> 4; - double peak_bitdepth = - (double)peak_bitrate / - (stream.ChannelCount + stream.LFE) / + double peak_bitdepth = + (double)peak_bitrate / + (stream.ChannelCount + stream.LFE) / stream.SampleRate; if (peak_bitdepth > 14) { @@ -164,7 +164,7 @@ namespace BDInfo #if DEBUG System.Diagnostics.Debug.WriteLine(string.Format( - "{0}\t{1}\t{2:F2}", + "{0}\t{1}\t{2:F2}", stream.PID, peak_bitrate, peak_bitdepth)); #endif /* diff --git a/BDInfo/TSCodecVC1.cs b/BDInfo/TSCodecVC1.cs index 164ef8c47..ce9eabdb9 100644 --- a/BDInfo/TSCodecVC1.cs +++ b/BDInfo/TSCodecVC1.cs @@ -50,18 +50,18 @@ namespace BDInfo { if ((parse & 0x80000000) == 0) { - pictureType = + pictureType = (uint)((parse & 0x78000000) >> 13); } else { - pictureType = + pictureType = (uint)((parse & 0x3c000000) >> 12); } } else { - pictureType = + pictureType = (uint)((parse & 0xf0000000) >> 14); } diff --git a/BDInfo/TSPlaylistFile.cs b/BDInfo/TSPlaylistFile.cs index da6fd37cc..c4e8d62ec 100644 --- a/BDInfo/TSPlaylistFile.cs +++ b/BDInfo/TSPlaylistFile.cs @@ -42,7 +42,7 @@ namespace BDInfo public List Chapters = new List(); - public Dictionary Streams = + public Dictionary Streams = new Dictionary(); public Dictionary PlaylistStreams = new Dictionary(); @@ -50,19 +50,19 @@ namespace BDInfo new List(); public List> AngleStreams = new List>(); - public List> AngleClips = + public List> AngleClips = new List>(); public int AngleCount = 0; - public List SortedStreams = + public List SortedStreams = new List(); - public List VideoStreams = + public List VideoStreams = new List(); - public List AudioStreams = + public List AudioStreams = new List(); - public List TextStreams = + public List TextStreams = new List(); - public List GraphicsStreams = + public List GraphicsStreams = new List(); public TSPlaylistFile( @@ -388,8 +388,8 @@ namespace BDInfo #if DEBUG Debug.WriteLine(string.Format( - "{0} : {1} -> V:{2} A:{3} PG:{4} IG:{5} 2A:{6} 2V:{7} PIP:{8}", - Name, streamFileName, streamCountVideo, streamCountAudio, streamCountPG, streamCountIG, + "{0} : {1} -> V:{2} A:{3} PG:{4} IG:{5} 2A:{6} 2V:{7} PIP:{8}", + Name, streamFileName, streamCountVideo, streamCountAudio, streamCountPG, streamCountIG, streamCountSecondaryAudio, streamCountSecondaryVideo, streamCountPIP)); #endif @@ -427,7 +427,7 @@ namespace BDInfo } /* * TODO - * + * for (int i = 0; i < streamCountPIP; i++) { TSStream stream = CreatePlaylistStream(data, ref pos); @@ -955,7 +955,7 @@ namespace BDInfo } public int CompareVideoStreams( - TSVideoStream x, + TSVideoStream x, TSVideoStream y) { if (x == null && y == null) @@ -996,7 +996,7 @@ namespace BDInfo } public int CompareAudioStreams( - TSAudioStream x, + TSAudioStream x, TSAudioStream y) { if (x == y) diff --git a/BDInfo/TSStream.cs b/BDInfo/TSStream.cs index 5afb81c5e..250308b1a 100644 --- a/BDInfo/TSStream.cs +++ b/BDInfo/TSStream.cs @@ -109,7 +109,7 @@ namespace BDInfo public TSDescriptor Clone() { - TSDescriptor descriptor = + TSDescriptor descriptor = new TSDescriptor(Name, (byte)Value.Length); Value.CopyTo(descriptor.Value, 0); return descriptor; @@ -153,15 +153,15 @@ namespace BDInfo private string _LanguageCode; public string LanguageCode { - get + get { - return _LanguageCode; + return _LanguageCode; } - set + set { _LanguageCode = value; LanguageName = LanguageCodes.GetName(value); - } + } } public bool IsVideoStream @@ -407,7 +407,7 @@ namespace BDInfo } public abstract TSStream Clone(); - + protected void CopyTo(TSStream stream) { stream.PID = PID; @@ -435,7 +435,7 @@ namespace BDInfo public int Width; public int Height; - public bool IsInterlaced; + public bool IsInterlaced; public int FrameRateEnumerator; public int FrameRateDenominator; public TSAspectRatio AspectRatio; @@ -581,7 +581,7 @@ namespace BDInfo stream.FrameRate = _FrameRate; stream.Width = Width; stream.Height = Height; - stream.IsInterlaced = IsInterlaced; + stream.IsInterlaced = IsInterlaced; stream.FrameRateEnumerator = FrameRateEnumerator; stream.FrameRateDenominator = FrameRateDenominator; stream.AspectRatio = AspectRatio; diff --git a/BDInfo/TSStreamClipFile.cs b/BDInfo/TSStreamClipFile.cs index f2accb88d..f311dd839 100644 --- a/BDInfo/TSStreamClipFile.cs +++ b/BDInfo/TSStreamClipFile.cs @@ -69,7 +69,7 @@ namespace BDInfo byte[] fileType = new byte[8]; Array.Copy(data, 0, fileType, 0, fileType.Length); - + FileType = _textEncoding.GetASCIIEncoding().GetString(fileType, 0, fileType.Length); if (FileType != "HDMV0100" && FileType != "HDMV0200") @@ -78,7 +78,7 @@ namespace BDInfo "Clip info file {0} has an unknown file type {1}.", FileInfo.Name, FileType)); } -#if DEBUG +#if DEBUG Debug.WriteLine(string.Format( "\tFileType: {0}", FileType)); #endif @@ -110,9 +110,9 @@ namespace BDInfo TSStream stream = null; ushort PID = (ushort) - ((clipData[streamOffset] << 8) + + ((clipData[streamOffset] << 8) + clipData[streamOffset + 1]); - + streamOffset += 2; TSStreamType streamType = (TSStreamType) @@ -240,7 +240,7 @@ namespace BDInfo } streamOffset += clipData[streamOffset] + 1; - } + } IsValid = true; } finally diff --git a/BDInfo/TSStreamFile.cs b/BDInfo/TSStreamFile.cs index cfd402434..00e6b338e 100644 --- a/BDInfo/TSStreamFile.cs +++ b/BDInfo/TSStreamFile.cs @@ -391,7 +391,7 @@ namespace BDInfo } Dictionary playlistStreams = playlist.Streams; - if (clip.AngleIndex > 0 && + if (clip.AngleIndex > 0 && clip.AngleIndex < playlist.AngleStreams.Count + 1) { playlistStreams = playlist.AngleStreams[clip.AngleIndex - 1]; @@ -428,7 +428,7 @@ namespace BDInfo TSStream stream = Streams[PID]; stream.PayloadBytes += streamState.WindowBytes; stream.PacketCount += streamState.WindowPackets; - + if (stream.IsVideoStream) { TSStreamDiagnostics diag = new TSStreamDiagnostics(); @@ -457,7 +457,7 @@ namespace BDInfo int dataSize = 16384; Stream fileStream = null; try - { + { string fileName; if (BDInfoSettings.EnableSSIF && InterleavedFile != null) @@ -482,13 +482,13 @@ namespace BDInfo StreamStates.Clear(); StreamDiagnostics.Clear(); - TSPacketParser parser = + TSPacketParser parser = new TSPacketParser(); - + long fileLength = (uint)fileStream.Length; byte[] buffer = new byte[dataSize]; int bufferLength = 0; - while ((bufferLength = + while ((bufferLength = fileStream.Read(buffer, 0, buffer.Length)) > 0) { int offset = 0; @@ -598,8 +598,8 @@ namespace BDInfo parser.StreamState.TransferCount++; bool isFinished = ScanStream( - parser.Stream, - parser.StreamState, + parser.Stream, + parser.StreamState, parser.StreamState.StreamBuffer); if (!isFullScan && isFinished) @@ -680,10 +680,10 @@ namespace BDInfo for (int k = 0; k < (parser.PATOffset - 4); k += 4) { uint programNumber = (uint) - ((parser.PAT[k] << 8) + + ((parser.PAT[k] << 8) + parser.PAT[k + 1]); - ushort programPID = (ushort) + ushort programPID = (ushort) (((parser.PAT[k + 2] & 0x1F) << 8) + parser.PAT[k + 3]); @@ -985,7 +985,7 @@ namespace BDInfo parser.PMTProgramDescriptorLength = buffer[i]; parser.PMTProgramDescriptors.Add( new TSDescriptor( - parser.PMTProgramDescriptor, + parser.PMTProgramDescriptor, parser.PMTProgramDescriptorLength)); break; } @@ -998,7 +998,7 @@ namespace BDInfo parser.PMTProgramDescriptors.Count - 1]; int valueIndex = - descriptor.Value.Length - + descriptor.Value.Length - parser.PMTProgramDescriptorLength - 1; descriptor.Value[valueIndex] = buffer[i]; @@ -1020,8 +1020,8 @@ namespace BDInfo parser.SyncState = false; } } - else if (parser.Stream != null && - parser.StreamState != null && + else if (parser.Stream != null && + parser.StreamState != null && parser.TransportScramblingControl == 0) { TSStream stream = parser.Stream; @@ -1032,7 +1032,7 @@ namespace BDInfo if (streamState.TransferState) { - if ((bufferLength - i) >= streamState.PacketLength && + if ((bufferLength - i) >= streamState.PacketLength && streamState.PacketLength > 0) { offset = streamState.PacketLength; @@ -1085,7 +1085,7 @@ namespace BDInfo --parser.PacketLength; bool headerFound = false; - if (stream.IsVideoStream && + if (stream.IsVideoStream && streamState.Parse == 0x000001FD) { headerFound = true; @@ -1170,18 +1170,18 @@ namespace BDInfo (byte)(streamState.Parse & 0xFF); #endif break; - + case 1: - streamState.PESHeaderFlags = + streamState.PESHeaderFlags = (byte)(streamState.Parse & 0xFF); #if DEBUG streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xFF); #endif break; - + case 0: - streamState.PESHeaderLength = + streamState.PESHeaderLength = (byte)(streamState.Parse & 0xFF); #if DEBUG streamState.PESHeader[streamState.PESHeaderIndex++] = @@ -1211,48 +1211,48 @@ namespace BDInfo switch (streamState.PTSParse) { case 4: - streamState.PTSTemp = + streamState.PTSTemp = ((streamState.Parse & 0xE) << 29); #if DEBUG - streamState.PESHeader[streamState.PESHeaderIndex++] = + streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xff); #endif break; - + case 3: - streamState.PTSTemp |= + streamState.PTSTemp |= ((streamState.Parse & 0xFF) << 22); #if DEBUG - streamState.PESHeader[streamState.PESHeaderIndex++] = + streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xFF); #endif break; - + case 2: - streamState.PTSTemp |= + streamState.PTSTemp |= ((streamState.Parse & 0xFE) << 14); #if DEBUG - streamState.PESHeader[streamState.PESHeaderIndex++] = + streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xFF); #endif break; - + case 1: - streamState.PTSTemp |= + streamState.PTSTemp |= ((streamState.Parse & 0xFF) << 7); #if DEBUG - streamState.PESHeader[streamState.PESHeaderIndex++] = + streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xFF); #endif break; - + case 0: - streamState.PTSTemp |= + streamState.PTSTemp |= ((streamState.Parse & 0xFE) >> 1); #if DEBUG - streamState.PESHeader[streamState.PESHeaderIndex++] = + streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xff); -#endif +#endif streamState.PTS = streamState.PTSTemp; if (streamState.PTS > streamState.PTSLast) @@ -1260,13 +1260,13 @@ namespace BDInfo if (streamState.PTSLast > 0) { streamState.PTSTransfer = (streamState.PTS - streamState.PTSLast); - } + } streamState.PTSLast = streamState.PTS; } streamState.PTSDiff = streamState.PTS - streamState.DTSPrev; - if (streamState.PTSCount > 0 && + if (streamState.PTSCount > 0 && stream.IsVideoStream) { UpdateStreamBitrates(stream.PID, streamState.PTS, streamState.PTSDiff); @@ -1280,7 +1280,7 @@ namespace BDInfo } Length = (double)(parser.PTSLast - parser.PTSFirst) / 90000; } - + streamState.DTSPrev = streamState.PTS; streamState.PTSCount++; if (streamState.PESHeaderLength == 0) @@ -1299,46 +1299,46 @@ namespace BDInfo switch (streamState.DTSParse) { case 9: - streamState.PTSTemp = + streamState.PTSTemp = ((streamState.Parse & 0xE) << 29); #if DEBUG - streamState.PESHeader[streamState.PESHeaderIndex++] = + streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xFF); #endif break; - + case 8: - streamState.PTSTemp |= + streamState.PTSTemp |= ((streamState.Parse & 0xFF) << 22); #if DEBUG - streamState.PESHeader[streamState.PESHeaderIndex++] = + streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xFF); #endif break; - + case 7: - streamState.PTSTemp |= + streamState.PTSTemp |= ((streamState.Parse & 0xFE) << 14); #if DEBUG - streamState.PESHeader[streamState.PESHeaderIndex++] = + streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xff); #endif break; - + case 6: - streamState.PTSTemp |= + streamState.PTSTemp |= ((streamState.Parse & 0xFF) << 7); #if DEBUG - streamState.PESHeader[streamState.PESHeaderIndex++] = + streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xFF); #endif break; - + case 5: - streamState.PTSTemp |= + streamState.PTSTemp |= ((streamState.Parse & 0xFE) >> 1); #if DEBUG - streamState.PESHeader[streamState.PESHeaderIndex++] = + streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xff); #endif streamState.PTS = streamState.PTSTemp; @@ -1347,48 +1347,48 @@ namespace BDInfo streamState.PTSLast = streamState.PTS; } break; - + case 4: - streamState.DTSTemp = + streamState.DTSTemp = ((streamState.Parse & 0xE) << 29); #if DEBUG - streamState.PESHeader[streamState.PESHeaderIndex++] = + streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xff); #endif break; - + case 3: - streamState.DTSTemp |= + streamState.DTSTemp |= ((streamState.Parse & 0xFF) << 22); #if DEBUG - streamState.PESHeader[streamState.PESHeaderIndex++] = + streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xff); #endif break; - + case 2: - streamState.DTSTemp |= + streamState.DTSTemp |= ((streamState.Parse & 0xFE) << 14); #if DEBUG - streamState.PESHeader[streamState.PESHeaderIndex++] = + streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xff); #endif break; - + case 1: - streamState.DTSTemp |= + streamState.DTSTemp |= ((streamState.Parse & 0xFF) << 7); #if DEBUG - streamState.PESHeader[streamState.PESHeaderIndex++] = + streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xFF); #endif break; - + case 0: - streamState.DTSTemp |= + streamState.DTSTemp |= ((streamState.Parse & 0xFE) >> 1); #if DEBUG - streamState.PESHeader[streamState.PESHeaderIndex++] = + streamState.PESHeader[streamState.PESHeaderIndex++] = (byte)(streamState.Parse & 0xff); #endif streamState.PTSDiff = streamState.DTSTemp - streamState.DTSPrev; @@ -1482,8 +1482,8 @@ namespace BDInfo } private TSStream CreateStream( - ushort streamPID, - byte streamType, + ushort streamPID, + byte streamType, List streamDescriptors) { TSStream stream = null; @@ -1548,6 +1548,6 @@ namespace BDInfo } return stream; - } + } } } diff --git a/DvdLib/Ifo/ProgramChain.cs b/DvdLib/Ifo/ProgramChain.cs index 6b4e5fa32..85dfcea05 100644 --- a/DvdLib/Ifo/ProgramChain.cs +++ b/DvdLib/Ifo/ProgramChain.cs @@ -68,7 +68,7 @@ namespace DvdLib.Ifo ProhibitedUserOperations = (UserOperation)br.ReadUInt32(); AudioStreamControl = br.ReadBytes(16); SubpictureStreamControl = br.ReadBytes(128); - + _nextProgramNumber = br.ReadUInt16(); _prevProgramNumber = br.ReadUInt16(); _goupProgramNumber = br.ReadUInt16(); diff --git a/DvdLib/Ifo/Title.cs b/DvdLib/Ifo/Title.cs index 70deb45bf..6ef83b4fb 100644 --- a/DvdLib/Ifo/Title.cs +++ b/DvdLib/Ifo/Title.cs @@ -20,7 +20,7 @@ namespace DvdLib.Ifo public ProgramChain EntryProgramChain { get; private set; } public readonly List ProgramChains; - public readonly List Chapters; + public readonly List Chapters; public Title(uint titleNum) { diff --git a/DvdLib/Properties/AssemblyInfo.cs b/DvdLib/Properties/AssemblyInfo.cs index cca792684..08c0ed88c 100644 --- a/DvdLib/Properties/AssemblyInfo.cs +++ b/DvdLib/Properties/AssemblyInfo.cs @@ -3,7 +3,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("DvdLib")] @@ -19,11 +19,11 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.1")] \ No newline at end of file diff --git a/Emby.Dlna/Common/Argument.cs b/Emby.Dlna/Common/Argument.cs index 7e61c3d6d..e6a220a7f 100644 --- a/Emby.Dlna/Common/Argument.cs +++ b/Emby.Dlna/Common/Argument.cs @@ -1,6 +1,6 @@  namespace Emby.Dlna.Common -{ +{ public class Argument { public string Name { get; set; } diff --git a/Emby.Dlna/ConnectionManager/ServiceActionListBuilder.cs b/Emby.Dlna/ConnectionManager/ServiceActionListBuilder.cs index 9b22b7773..a37f81242 100644 --- a/Emby.Dlna/ConnectionManager/ServiceActionListBuilder.cs +++ b/Emby.Dlna/ConnectionManager/ServiceActionListBuilder.cs @@ -77,7 +77,7 @@ namespace Emby.Dlna.ConnectionManager return action; } - + private ServiceAction GetCurrentConnectionInfo() { var action = new ServiceAction diff --git a/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs b/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs index facc25214..05de8259c 100644 --- a/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs +++ b/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs @@ -8,7 +8,7 @@ namespace Emby.Dlna.ContentDirectory { public string GetXml() { - return new ServiceXmlBuilder().GetXml(new ServiceActionListBuilder().GetActions(), + return new ServiceXmlBuilder().GetXml(new ServiceActionListBuilder().GetActions(), GetStateVariables()); } diff --git a/Emby.Dlna/ContentDirectory/ServiceActionListBuilder.cs b/Emby.Dlna/ContentDirectory/ServiceActionListBuilder.cs index 8e5c07ce2..26f5b671d 100644 --- a/Emby.Dlna/ContentDirectory/ServiceActionListBuilder.cs +++ b/Emby.Dlna/ContentDirectory/ServiceActionListBuilder.cs @@ -334,7 +334,7 @@ namespace Emby.Dlna.ContentDirectory return action; } - + private ServiceAction GetXSetBookmarkAction() { var action = new ServiceAction diff --git a/Emby.Dlna/IUpnpService.cs b/Emby.Dlna/IUpnpService.cs index caae87ba3..0a52e9acf 100644 --- a/Emby.Dlna/IUpnpService.cs +++ b/Emby.Dlna/IUpnpService.cs @@ -10,7 +10,7 @@ namespace Emby.Dlna /// The headers. /// System.String. string GetServiceXml(IDictionary headers); - + /// /// Processes the control request. /// diff --git a/Emby.Dlna/Main/DlnaEntryPoint.cs b/Emby.Dlna/Main/DlnaEntryPoint.cs index 6ab0767a5..eae3f22de 100644 --- a/Emby.Dlna/Main/DlnaEntryPoint.cs +++ b/Emby.Dlna/Main/DlnaEntryPoint.cs @@ -75,11 +75,11 @@ namespace Emby.Dlna.Main IUserDataManager userDataManager, ILocalizationManager localizationManager, IMediaSourceManager mediaSourceManager, - IDeviceDiscovery deviceDiscovery, - IMediaEncoder mediaEncoder, - ISocketFactory socketFactory, - ITimerFactory timerFactory, - IEnvironmentInfo environmentInfo, + IDeviceDiscovery deviceDiscovery, + IMediaEncoder mediaEncoder, + ISocketFactory socketFactory, + ITimerFactory timerFactory, + IEnvironmentInfo environmentInfo, INetworkManager networkManager, IUserViewManager userViewManager, IXmlReaderSettingsFactory xmlReaderSettingsFactory, @@ -104,19 +104,19 @@ namespace Emby.Dlna.Main _networkManager = networkManager; _logger = loggerFactory.CreateLogger("Dlna"); - ContentDirectory = new ContentDirectory.ContentDirectory(dlnaManager, - userDataManager, - imageProcessor, - libraryManager, - config, - userManager, - _logger, - httpClient, - localizationManager, - mediaSourceManager, + ContentDirectory = new ContentDirectory.ContentDirectory(dlnaManager, + userDataManager, + imageProcessor, + libraryManager, + config, + userManager, + _logger, + httpClient, + localizationManager, + mediaSourceManager, userViewManager, - mediaEncoder, - xmlReaderSettingsFactory, + mediaEncoder, + xmlReaderSettingsFactory, tvSeriesManager); ConnectionManager = new ConnectionManager.ConnectionManager(dlnaManager, config, _logger, httpClient, xmlReaderSettingsFactory); @@ -271,12 +271,12 @@ namespace Emby.Dlna.Main var device = new SsdpRootDevice { CacheLifetime = TimeSpan.FromSeconds(1800), //How long SSDP clients can cache this info. - Location = uri, // Must point to the URL that serves your devices UPnP description document. + Location = uri, // Must point to the URL that serves your devices UPnP description document. FriendlyName = "Jellyfin", Manufacturer = "Jellyfin", ModelName = "Jellyfin Server", Uuid = udn - // This must be a globally unique value that survives reboots etc. Get from storage or embedded hardware etc. + // This must be a globally unique value that survives reboots etc. Get from storage or embedded hardware etc. }; SetProperies(device, fullService); @@ -297,7 +297,7 @@ namespace Emby.Dlna.Main Manufacturer = device.Manufacturer, ModelName = device.ModelName, Uuid = udn - // This must be a globally unique value that survives reboots etc. Get from storage or embedded hardware etc. + // This must be a globally unique value that survives reboots etc. Get from storage or embedded hardware etc. }; SetProperies(embeddedDevice, subDevice); diff --git a/Emby.Dlna/PlayTo/Device.cs b/Emby.Dlna/PlayTo/Device.cs index 13bed6b2f..fdd304577 100644 --- a/Emby.Dlna/PlayTo/Device.cs +++ b/Emby.Dlna/PlayTo/Device.cs @@ -739,7 +739,7 @@ namespace Emby.Dlna.PlayTo if (track == null) { - //If track is null, some vendors do this, use GetMediaInfo instead + //If track is null, some vendors do this, use GetMediaInfo instead return new Tuple(true, null); } diff --git a/Emby.Dlna/PlayTo/SsdpHttpClient.cs b/Emby.Dlna/PlayTo/SsdpHttpClient.cs index bfd163bf1..818744ba8 100644 --- a/Emby.Dlna/PlayTo/SsdpHttpClient.cs +++ b/Emby.Dlna/PlayTo/SsdpHttpClient.cs @@ -25,10 +25,10 @@ namespace Emby.Dlna.PlayTo _config = config; } - public async Task SendCommandAsync(string baseUrl, - DeviceService service, - string command, - string postData, + public async Task SendCommandAsync(string baseUrl, + DeviceService service, + string command, + string postData, bool logRequest = true, string header = null) { @@ -62,12 +62,12 @@ namespace Emby.Dlna.PlayTo } private readonly CultureInfo _usCulture = new CultureInfo("en-US"); - - public async Task SubscribeAsync(string url, - string ip, - int port, - string localIp, - int eventport, + + public async Task SubscribeAsync(string url, + string ip, + int port, + string localIp, + int eventport, int timeOut = 3600) { var options = new HttpRequestOptions @@ -121,9 +121,9 @@ namespace Emby.Dlna.PlayTo } } - private Task PostSoapDataAsync(string url, - string soapAction, - string postData, + private Task PostSoapDataAsync(string url, + string soapAction, + string postData, string header, bool logRequest, CancellationToken cancellationToken) diff --git a/Emby.Dlna/PlayTo/TransportCommands.cs b/Emby.Dlna/PlayTo/TransportCommands.cs index 9e055f792..09a8f0734 100644 --- a/Emby.Dlna/PlayTo/TransportCommands.cs +++ b/Emby.Dlna/PlayTo/TransportCommands.cs @@ -171,7 +171,7 @@ namespace Emby.Dlna.PlayTo if (state != null) { var sendValue = state.AllowedValues.FirstOrDefault(a => string.Equals(a, commandParameter, StringComparison.OrdinalIgnoreCase)) ?? - state.AllowedValues.FirstOrDefault() ?? + state.AllowedValues.FirstOrDefault() ?? value; return string.Format("<{0} xmlns:dt=\"urn:schemas-microsoft-com:datatypes\" dt:dt=\"{1}\">{2}", argument.Name, state.DataType ?? "string", sendValue); diff --git a/Emby.Dlna/PlayTo/uBaseObject.cs b/Emby.Dlna/PlayTo/uBaseObject.cs index 1de46317e..0107b63c5 100644 --- a/Emby.Dlna/PlayTo/uBaseObject.cs +++ b/Emby.Dlna/PlayTo/uBaseObject.cs @@ -2,7 +2,7 @@ namespace Emby.Dlna.PlayTo { - public class uBaseObject + public class uBaseObject { public string Id { get; set; } diff --git a/Emby.Dlna/PlayTo/uParser.cs b/Emby.Dlna/PlayTo/uParser.cs index 5caf83a9a..36ebdbf5c 100644 --- a/Emby.Dlna/PlayTo/uParser.cs +++ b/Emby.Dlna/PlayTo/uParser.cs @@ -20,7 +20,7 @@ namespace Emby.Dlna.PlayTo if (document == null) return list; - + var item = (from result in document.Descendants("Result") select result).FirstOrDefault(); if (item == null) diff --git a/Emby.Dlna/Profiles/SonyBravia2010Profile.cs b/Emby.Dlna/Profiles/SonyBravia2010Profile.cs index 75382067f..7b452c536 100644 --- a/Emby.Dlna/Profiles/SonyBravia2010Profile.cs +++ b/Emby.Dlna/Profiles/SonyBravia2010Profile.cs @@ -41,7 +41,7 @@ namespace Emby.Dlna.Profiles EnableSingleAlbumArtLimit = true; EnableAlbumArtInDidl = true; - + TranscodingProfiles = new[] { new TranscodingProfile diff --git a/Emby.Dlna/Properties/AssemblyInfo.cs b/Emby.Dlna/Properties/AssemblyInfo.cs index 6f924f9e9..6ee7177ce 100644 --- a/Emby.Dlna/Properties/AssemblyInfo.cs +++ b/Emby.Dlna/Properties/AssemblyInfo.cs @@ -3,7 +3,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Emby.Dlna2")] @@ -19,11 +19,11 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] diff --git a/Emby.Dlna/Service/BaseService.cs b/Emby.Dlna/Service/BaseService.cs index 92b81a7ac..10ef12c6c 100644 --- a/Emby.Dlna/Service/BaseService.cs +++ b/Emby.Dlna/Service/BaseService.cs @@ -14,7 +14,7 @@ namespace Emby.Dlna.Service protected BaseService(ILogger logger, IHttpClient httpClient) { Logger = logger; - HttpClient = httpClient; + HttpClient = httpClient; EventManager = new EventManager(Logger, HttpClient); } diff --git a/Emby.Dlna/Service/ControlErrorHandler.cs b/Emby.Dlna/Service/ControlErrorHandler.cs index a3cd77f0f..431dea932 100644 --- a/Emby.Dlna/Service/ControlErrorHandler.cs +++ b/Emby.Dlna/Service/ControlErrorHandler.cs @@ -10,7 +10,7 @@ namespace Emby.Dlna.Service public class ControlErrorHandler { private const string NS_SOAPENV = "http://schemas.xmlsoap.org/soap/envelope/"; - + public ControlResponse GetResponse(Exception ex) { var settings = new XmlWriterSettings diff --git a/Emby.Dlna/Ssdp/DeviceDiscovery.cs b/Emby.Dlna/Ssdp/DeviceDiscovery.cs index d91f711d2..e01ff8149 100644 --- a/Emby.Dlna/Ssdp/DeviceDiscovery.cs +++ b/Emby.Dlna/Ssdp/DeviceDiscovery.cs @@ -83,8 +83,8 @@ namespace Emby.Dlna.Ssdp { _deviceLocator = new SsdpDeviceLocator(_commsServer, _timerFactory); - // (Optional) Set the filter so we only see notifications for devices we care about - // (can be any search target value i.e device type, uuid value etc - any value that appears in the + // (Optional) Set the filter so we only see notifications for devices we care about + // (can be any search target value i.e device type, uuid value etc - any value that appears in the // DiscoverdSsdpDevice.NotificationType property or that is used with the searchTarget parameter of the Search method). //_DeviceLocator.NotificationFilter = "upnp:rootdevice"; diff --git a/Emby.Drawing.Skia/Properties/AssemblyInfo.cs b/Emby.Drawing.Skia/Properties/AssemblyInfo.cs index c0dc7c5b4..b8799f986 100644 --- a/Emby.Drawing.Skia/Properties/AssemblyInfo.cs +++ b/Emby.Drawing.Skia/Properties/AssemblyInfo.cs @@ -3,7 +3,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Emby.Drawing.Skia")] @@ -19,7 +19,7 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // \ No newline at end of file diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs index 6a67be56d..32f0559c6 100644 --- a/Emby.Drawing/ImageProcessor.cs +++ b/Emby.Drawing/ImageProcessor.cs @@ -103,7 +103,7 @@ namespace Emby.Drawing "crw", // Remove until supported - //"nef", + //"nef", "orf", "pef", "arw", diff --git a/Emby.Drawing/Properties/AssemblyInfo.cs b/Emby.Drawing/Properties/AssemblyInfo.cs index b9e9c2ff7..aa5619f97 100644 --- a/Emby.Drawing/Properties/AssemblyInfo.cs +++ b/Emby.Drawing/Properties/AssemblyInfo.cs @@ -1,7 +1,7 @@ using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Emby.Drawing")] @@ -13,8 +13,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -24,7 +24,7 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // \ No newline at end of file diff --git a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs index faaed482a..ea4417071 100644 --- a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs +++ b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs @@ -315,9 +315,9 @@ namespace IsoMounter ); } else { - + throw new ArgumentNullException(nameof(isoPath)); - + } try @@ -397,9 +397,9 @@ namespace IsoMounter ); } else { - + throw new ArgumentNullException(nameof(mount)); - + } if (GetUID() == 0) { @@ -444,7 +444,7 @@ namespace IsoMounter } #endregion - + #region Internal Methods internal void OnUnmount(LinuxMount mount) diff --git a/Emby.IsoMounting/IsoMounter/LinuxMount.cs b/Emby.IsoMounting/IsoMounter/LinuxMount.cs index edd26f08d..da2eb1983 100644 --- a/Emby.IsoMounting/IsoMounter/LinuxMount.cs +++ b/Emby.IsoMounting/IsoMounter/LinuxMount.cs @@ -48,7 +48,7 @@ namespace IsoMounter if (disposed) { return; } - + if (disposing) { // diff --git a/Emby.Naming/AudioBook/AudioBookInfo.cs b/Emby.Naming/AudioBook/AudioBookInfo.cs index e039e5359..d7af63d91 100644 --- a/Emby.Naming/AudioBook/AudioBookInfo.cs +++ b/Emby.Naming/AudioBook/AudioBookInfo.cs @@ -29,7 +29,7 @@ namespace Emby.Naming.AudioBook /// /// The alternate versions. public List AlternateVersions { get; set; } - + public AudioBookInfo() { Files = new List(); diff --git a/Emby.Naming/AudioBook/AudioBookResolver.cs b/Emby.Naming/AudioBook/AudioBookResolver.cs index a206ee30b..53abbedb2 100644 --- a/Emby.Naming/AudioBook/AudioBookResolver.cs +++ b/Emby.Naming/AudioBook/AudioBookResolver.cs @@ -46,7 +46,7 @@ namespace Emby.Naming.AudioBook var parsingResult = new AudioBookFilePathParser(_options) .Parse(path, IsDirectory); - + return new AudioBookFileInfo { Path = path, diff --git a/Emby.Naming/Common/NamingOptions.cs b/Emby.Naming/Common/NamingOptions.cs index 9e65440d0..014f4ebde 100644 --- a/Emby.Naming/Common/NamingOptions.cs +++ b/Emby.Naming/Common/NamingOptions.cs @@ -282,7 +282,7 @@ namespace Emby.Naming.Common new EpisodeExpression(@".*(\\|\/)(?((?![Ss]([0-9]+)[][ ._-]*[Ee]([0-9]+))[^\\\/])*)?[Ss](?[0-9]+)[][ ._-]*[Ee](?[0-9]+)([^\\/]*)$") { IsNamed = true - }, + }, // new EpisodeExpression(@"[\._ -]()[Ee][Pp]_?([0-9]+)([^\\/]*)$"), new EpisodeExpression("([0-9]{4})[\\.-]([0-9]{2})[\\.-]([0-9]{2})", true) diff --git a/Emby.Naming/TV/EpisodeResolver.cs b/Emby.Naming/TV/EpisodeResolver.cs index 2007d1307..cce4e73b8 100644 --- a/Emby.Naming/TV/EpisodeResolver.cs +++ b/Emby.Naming/TV/EpisodeResolver.cs @@ -53,7 +53,7 @@ namespace Emby.Naming.TV var parsingResult = new EpisodePathParser(_options) .Parse(path, IsDirectory, isNamed, isOptimistic, supportsAbsoluteNumbers, fillExtendedInfo); - + return new EpisodeInfo { Path = path, diff --git a/Emby.Naming/Video/CleanDateTimeParser.cs b/Emby.Naming/Video/CleanDateTimeParser.cs index 572dd1c60..e2a2d921c 100644 --- a/Emby.Naming/Video/CleanDateTimeParser.cs +++ b/Emby.Naming/Video/CleanDateTimeParser.cs @@ -38,7 +38,7 @@ namespace Emby.Naming.Video } catch (ArgumentException) { - + } var result = _options.CleanDateTimeRegexes.Select(i => Clean(name, i)) diff --git a/Emby.Naming/Video/StackResolver.cs b/Emby.Naming/Video/StackResolver.cs index 2a7125536..995e95d42 100644 --- a/Emby.Naming/Video/StackResolver.cs +++ b/Emby.Naming/Video/StackResolver.cs @@ -126,7 +126,7 @@ namespace Emby.Naming.Video } stack.Files.Add(file2.FullName); } - else + else { // Sequel offset = 0; diff --git a/Emby.Naming/Video/StubResolver.cs b/Emby.Naming/Video/StubResolver.cs index 69f1f50fa..33d6baefd 100644 --- a/Emby.Naming/Video/StubResolver.cs +++ b/Emby.Naming/Video/StubResolver.cs @@ -18,7 +18,7 @@ namespace Emby.Naming.Video { var result = new StubResult(); var extension = Path.GetExtension(path) ?? string.Empty; - + if (_options.StubFileExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase)) { result.IsStub = true; diff --git a/Emby.Naming/Video/VideoFileInfo.cs b/Emby.Naming/Video/VideoFileInfo.cs index 96839c31e..3cdc483ff 100644 --- a/Emby.Naming/Video/VideoFileInfo.cs +++ b/Emby.Naming/Video/VideoFileInfo.cs @@ -55,7 +55,7 @@ namespace Emby.Naming.Video /// Gets or sets the type of the stub. /// /// The type of the stub. - public string StubType { get; set; } + public string StubType { get; set; } /// /// Gets or sets the type. /// diff --git a/Emby.Naming/Video/VideoInfo.cs b/Emby.Naming/Video/VideoInfo.cs index f4d311b97..033a8ae2d 100644 --- a/Emby.Naming/Video/VideoInfo.cs +++ b/Emby.Naming/Video/VideoInfo.cs @@ -32,7 +32,7 @@ namespace Emby.Naming.Video /// /// The alternate versions. public List AlternateVersions { get; set; } - + public VideoInfo() { Files = new List(); diff --git a/Emby.Naming/Video/VideoListResolver.cs b/Emby.Naming/Video/VideoListResolver.cs index 47be28104..b052c7929 100644 --- a/Emby.Naming/Video/VideoListResolver.cs +++ b/Emby.Naming/Video/VideoListResolver.cs @@ -55,9 +55,9 @@ namespace Emby.Naming.Video info.Year = info.Files.First().Year; - var extraBaseNames = new List + var extraBaseNames = new List { - stack.Name, + stack.Name, Path.GetFileNameWithoutExtension(stack.Files[0]) }; diff --git a/Emby.Photos/Properties/AssemblyInfo.cs b/Emby.Photos/Properties/AssemblyInfo.cs index 49ac83345..20e7d952d 100644 --- a/Emby.Photos/Properties/AssemblyInfo.cs +++ b/Emby.Photos/Properties/AssemblyInfo.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Emby.Photos")] @@ -14,8 +14,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -25,10 +25,10 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] \ No newline at end of file diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index fb053f0e4..ab8a85806 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1647,25 +1647,25 @@ namespace Emby.Server.Implementations // Gets all plugin assemblies by first reading all bytes of the .dll and calling Assembly.Load against that // This will prevent the .dll file from getting locked, and allow us to replace it when needed - // Include composable parts in the Api assembly + // Include composable parts in the Api assembly list.Add(GetAssembly(typeof(ApiEntryPoint))); - // Include composable parts in the Dashboard assembly + // Include composable parts in the Dashboard assembly list.Add(GetAssembly(typeof(DashboardService))); - // Include composable parts in the Model assembly + // Include composable parts in the Model assembly list.Add(GetAssembly(typeof(SystemInfo))); - // Include composable parts in the Common assembly + // Include composable parts in the Common assembly list.Add(GetAssembly(typeof(IApplicationHost))); - // Include composable parts in the Controller assembly + // Include composable parts in the Controller assembly list.Add(GetAssembly(typeof(IServerApplicationHost))); - // Include composable parts in the Providers assembly + // Include composable parts in the Providers assembly list.Add(GetAssembly(typeof(ProviderUtils))); - // Include composable parts in the Photos assembly + // Include composable parts in the Photos assembly list.Add(GetAssembly(typeof(PhotoProvider))); // Emby.Server implementations @@ -1674,16 +1674,16 @@ namespace Emby.Server.Implementations // MediaEncoding list.Add(GetAssembly(typeof(MediaBrowser.MediaEncoding.Encoder.MediaEncoder))); - // Dlna + // Dlna list.Add(GetAssembly(typeof(DlnaEntryPoint))); - // Local metadata + // Local metadata list.Add(GetAssembly(typeof(BoxSetXmlSaver))); // Notifications list.Add(GetAssembly(typeof(NotificationManager))); - // Xbmc + // Xbmc list.Add(GetAssembly(typeof(ArtistNfoProvider))); list.AddRange(GetAssembliesWithPartsInternal().Select(i => new Tuple(i, null))); @@ -2219,7 +2219,7 @@ namespace Emby.Server.Implementations } /// - /// This returns localhost in the case of no external dns, and the hostname if the + /// This returns localhost in the case of no external dns, and the hostname if the /// dns is prefixed with a valid Uri prefix. /// /// The external dns prefix to get the hostname of. diff --git a/Emby.Server.Implementations/Browser/BrowserLauncher.cs b/Emby.Server.Implementations/Browser/BrowserLauncher.cs index 007f60a9b..4c9f442d1 100644 --- a/Emby.Server.Implementations/Browser/BrowserLauncher.cs +++ b/Emby.Server.Implementations/Browser/BrowserLauncher.cs @@ -41,7 +41,7 @@ namespace Emby.Server.Implementations.Browser } catch (NotSupportedException) { - + } catch (Exception) { diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs index c2160d338..398699977 100644 --- a/Emby.Server.Implementations/Channels/ChannelManager.cs +++ b/Emby.Server.Implementations/Channels/ChannelManager.cs @@ -902,7 +902,7 @@ namespace Emby.Server.Implementations.Channels where T : BaseItem, new() { var id = _libraryManager.GetNewItemId(GetIdToHash(idString, channelName), typeof(T)); - + T item = null; try diff --git a/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs index ab6acf3c5..3e270dabc 100644 --- a/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs +++ b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs @@ -70,8 +70,8 @@ namespace Emby.Server.Implementations.Channels /// public IEnumerable GetDefaultTriggers() { - return new[] { - + return new[] { + // Every so often new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks} }; diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index 0f9770e8f..f18a0ba08 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -4038,7 +4038,7 @@ namespace Emby.Server.Implementations.Data if (query.PersonIds.Length > 0) { - // TODO: Should this query with CleanName ? + // TODO: Should this query with CleanName ? var clauses = new List(); var index = 0; @@ -5399,7 +5399,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type var itemIdBlob = itemId.ToGuidBlob(); - // First delete + // First delete deleteAncestorsStatement.Reset(); deleteAncestorsStatement.TryBind("@ItemId", itemIdBlob); deleteAncestorsStatement.MoveNext(); @@ -5927,7 +5927,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type var guidBlob = itemId.ToGuidBlob(); - // First delete + // First delete db.Execute("delete from ItemValues where ItemId=@Id", guidBlob); InsertItemValues(guidBlob, values, db); diff --git a/Emby.Server.Implementations/Devices/DeviceManager.cs b/Emby.Server.Implementations/Devices/DeviceManager.cs index f5314df6e..d95222e26 100644 --- a/Emby.Server.Implementations/Devices/DeviceManager.cs +++ b/Emby.Server.Implementations/Devices/DeviceManager.cs @@ -144,7 +144,7 @@ namespace Emby.Server.Implementations.Devices HasUser = true }).Items; - + // TODO: DeviceQuery doesn't seem to be used from client. Not even Swagger. if (query.SupportsSync.HasValue) { diff --git a/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs b/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs index bb8ef52f1..bc72228bd 100644 --- a/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs +++ b/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs @@ -471,7 +471,7 @@ namespace Emby.Server.Implementations.EntryPoints LibraryUpdateTimer.Dispose(); LibraryUpdateTimer = null; } - + _libraryManager.ItemAdded -= libraryManager_ItemAdded; _libraryManager.ItemUpdated -= libraryManager_ItemUpdated; _libraryManager.ItemRemoved -= libraryManager_ItemRemoved; diff --git a/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs b/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs index 5f043e127..83e3cb720 100644 --- a/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs +++ b/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs @@ -114,7 +114,7 @@ namespace Emby.Server.Implementations.FFMpeg { var encoderFilename = Path.GetFileName(info.EncoderPath); var probeFilename = Path.GetFileName(info.ProbePath); - + foreach (var directory in _fileSystem.GetDirectoryPaths(rootEncoderPath) .ToList()) { diff --git a/Emby.Server.Implementations/HttpServer/FileWriter.cs b/Emby.Server.Implementations/HttpServer/FileWriter.cs index 1a875e533..4b864eea5 100644 --- a/Emby.Server.Implementations/HttpServer/FileWriter.cs +++ b/Emby.Server.Implementations/HttpServer/FileWriter.cs @@ -148,7 +148,7 @@ namespace Emby.Server.Implementations.HttpServer } } - private string[] SkipLogExtensions = new string[] + private string[] SkipLogExtensions = new string[] { ".js", ".html", diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index 69ca0f85b..27aa2e9f4 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -103,7 +103,7 @@ namespace Emby.Server.Implementations.HttpServer } /// - /// Applies the request filters. Returns whether or not the request has been handled + /// Applies the request filters. Returns whether or not the request has been handled /// and no more processing should be done. /// /// diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs index 73b2afe64..b3244640d 100644 --- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs +++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs @@ -265,7 +265,7 @@ namespace Emby.Server.Implementations.HttpServer } /// - /// Returns the optimized result for the IRequestContext. + /// Returns the optimized result for the IRequestContext. /// Does not use or store results in any cache. /// /// diff --git a/Emby.Server.Implementations/HttpServer/IHttpListener.cs b/Emby.Server.Implementations/HttpServer/IHttpListener.cs index e21607ebd..d50d7df6b 100644 --- a/Emby.Server.Implementations/HttpServer/IHttpListener.cs +++ b/Emby.Server.Implementations/HttpServer/IHttpListener.cs @@ -33,7 +33,7 @@ namespace Emby.Server.Implementations.HttpServer /// /// The web socket connecting. Action WebSocketConnecting { get; set; } - + /// /// Starts this instance. /// diff --git a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs index c3e2d3170..56e1095f6 100644 --- a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs +++ b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs @@ -115,7 +115,7 @@ namespace Emby.Server.Implementations.HttpServer.Security { info.Device = tokenInfo.DeviceName; } - + else if (!string.Equals(info.Device, tokenInfo.DeviceName, StringComparison.OrdinalIgnoreCase)) { if (allowTokenInfoUpdate) diff --git a/Emby.Server.Implementations/IO/FileRefresher.cs b/Emby.Server.Implementations/IO/FileRefresher.cs index 34c711324..3212c41e9 100644 --- a/Emby.Server.Implementations/IO/FileRefresher.cs +++ b/Emby.Server.Implementations/IO/FileRefresher.cs @@ -164,7 +164,7 @@ namespace Emby.Server.Implementations.IO } catch (IOException ex) { - // For now swallow and log. + // For now swallow and log. // Research item: If an IOException occurs, the item may be in a disconnected state (media unavailable) // Should we remove it from it's parent? Logger.LogError(ex, "Error refreshing {name}", item.Name); diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.cs index 0f85e0642..1e89c1370 100644 --- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs +++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs @@ -159,7 +159,7 @@ namespace Emby.Server.Implementations.IO var firstChar = filePath[0]; if (firstChar == '/') { - // For this we don't really know. + // For this we don't really know. return filePath; } if (firstChar == '\\') //relative path diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 451f16bef..3d3ef43b8 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -818,7 +818,7 @@ namespace Emby.Server.Implementations.Library public BaseItem FindByPath(string path, bool? isFolder) { - // If this returns multiple items it could be tricky figuring out which one is correct. + // If this returns multiple items it could be tricky figuring out which one is correct. // In most cases, the newest one will be and the others obsolete but not yet cleaned up if (string.IsNullOrEmpty(path)) @@ -1699,7 +1699,7 @@ namespace Emby.Server.Implementations.Library { try { - // Try to resolve the path into a video + // Try to resolve the path into a video video = ResolvePath(_fileSystem.GetFileSystemInfo(info.Path)) as Video; if (video == null) diff --git a/Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs index 8872bd641..9b030c0b7 100644 --- a/Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Audio/AudioResolver.cs @@ -231,7 +231,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio } var firstMedia = resolvedItem.Files.First(); - + var libraryItem = new T { Path = firstMedia.Path, diff --git a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs index dbfcf41e8..47d752129 100644 --- a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs @@ -42,7 +42,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio { // Behind special folder resolver return ResolverPriority.Second; - } + } } /// diff --git a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs index 71ccd7da8..c887cbd40 100644 --- a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs @@ -41,7 +41,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio { // Behind special folder resolver return ResolverPriority.Second; - } + } } /// diff --git a/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs b/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs index 143af4076..b9ac2056f 100644 --- a/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs @@ -48,7 +48,7 @@ namespace Emby.Server.Implementations.Library.Resolvers where TVideoType : Video, new() { var namingOptions = ((LibraryManager)LibraryManager).GetNamingOptions(); - + // If the path is a file check for a matching extensions var parser = new Emby.Naming.Video.VideoResolver(namingOptions); @@ -120,7 +120,7 @@ namespace Emby.Server.Implementations.Library.Resolvers if (video != null) { - video.Name = parseName ? + video.Name = parseName ? videoInfo.Name : Path.GetFileName(args.Path); @@ -150,7 +150,7 @@ namespace Emby.Server.Implementations.Library.Resolvers }; SetVideoType(video, videoInfo); - + video.Name = parseName ? videoInfo.Name : Path.GetFileNameWithoutExtension(args.Path); @@ -281,7 +281,7 @@ namespace Emby.Server.Implementations.Library.Resolvers { return string.Equals(name, "video_ts.ifo", StringComparison.OrdinalIgnoreCase); } - + /// /// Determines whether [is blu ray directory] [the specified directory name]. /// diff --git a/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs index 7aa4c299f..d7f80b3f4 100644 --- a/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs @@ -8,14 +8,14 @@ using MediaBrowser.Model.Entities; namespace Emby.Server.Implementations.Library.Resolvers.Books { /// - /// + /// /// public class BookResolver : MediaBrowser.Controller.Resolvers.ItemResolver { private readonly string[] _validExtensions = { ".pdf", ".epub", ".mobi", ".cbr", ".cbz", ".azw3" }; /// - /// + /// /// /// /// @@ -48,7 +48,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Books } /// - /// + /// /// /// /// diff --git a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs index 68b6c57ae..dd383f195 100644 --- a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs @@ -32,7 +32,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies get { // Give plugins a chance to catch iso's first - // Also since we have to loop through child files looking for videos, + // Also since we have to loop through child files looking for videos, // see if we can avoid some of that by letting other resolvers claim folders first // Also run after series resolver return ResolverPriority.Third; diff --git a/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs b/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs index 7d1c4d65a..4e5ac959c 100644 --- a/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs @@ -27,7 +27,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV } var season = parent as Season; - // Just in case the user decided to nest episodes. + // Just in case the user decided to nest episodes. // Not officially supported but in some cases we can handle it. if (season == null) { @@ -36,8 +36,8 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV // If the parent is a Season or Series, then this is an Episode if the VideoResolver returns something // Also handle flat tv folders - if (season != null || - string.Equals(args.GetCollectionType(), CollectionType.TvShows, StringComparison.OrdinalIgnoreCase) || + if (season != null || + string.Equals(args.GetCollectionType(), CollectionType.TvShows, StringComparison.OrdinalIgnoreCase) || args.HasParent()) { var episode = ResolveVideo(args, false); diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs index aae5751de..d616e1209 100644 --- a/Emby.Server.Implementations/Library/UserViewManager.cs +++ b/Emby.Server.Implementations/Library/UserViewManager.cs @@ -282,7 +282,7 @@ namespace Emby.Server.Implementations.Library if (includeItemTypes.Length == 0) { - // Handle situations with the grouping setting, e.g. movies showing up in tv, etc. + // Handle situations with the grouping setting, e.g. movies showing up in tv, etc. // Thanks to mixed content libraries included in the UserView var hasCollectionType = parents.OfType().ToArray(); if (hasCollectionType.Length > 0) diff --git a/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs b/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs index 1686dc23c..278c0cc7a 100644 --- a/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs @@ -94,7 +94,7 @@ namespace Emby.Server.Implementations.Library.Validators { continue; } - + _logger.LogInformation("Deleting dead {2} {0} {1}.", item.Id.ToString("N"), item.Name, item.GetType().Name); _libraryManager.DeleteItem(item, new DeleteOptions diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 81a47bfea..ccd6cebca 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -1055,7 +1055,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV { _logger.LogInformation("Streaming Channel " + channelId); - var result = string.IsNullOrEmpty(streamId) ? + var result = string.IsNullOrEmpty(streamId) ? null : currentLiveStreams.FirstOrDefault(i => string.Equals(i.OriginalStreamId, streamId, StringComparison.OrdinalIgnoreCase)); diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs index 4ea83b7ac..a6222a469 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs @@ -214,13 +214,13 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV var outputParam = string.Empty; - var commandLineArgs = string.Format("-i \"{0}\"{5} {2} -map_metadata -1 -threads 0 {3}{4}{6} -y \"{1}\"", - inputTempFile, - targetFile, - videoArgs, - GetAudioArgs(mediaSource), - subtitleArgs, - durationParam, + var commandLineArgs = string.Format("-i \"{0}\"{5} {2} -map_metadata -1 -threads 0 {3}{4}{6} -y \"{1}\"", + inputTempFile, + targetFile, + videoArgs, + GetAudioArgs(mediaSource), + subtitleArgs, + durationParam, outputParam); return inputModifier + " " + commandLineArgs; diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs index b597a935a..63e940ac2 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs @@ -1993,7 +1993,7 @@ namespace Emby.Server.Implementations.LiveTv Name = program.Name, OfficialRating = program.OfficialRating }; - } + } if (service == null) { diff --git a/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs b/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs index 225360159..8e4fcc099 100644 --- a/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs +++ b/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs @@ -48,8 +48,8 @@ namespace Emby.Server.Implementations.LiveTv /// IEnumerable{BaseTaskTrigger}. public IEnumerable GetDefaultTriggers() { - return new[] { - + return new[] { + // Every so often new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks} }; diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs index be090df0c..edeafdd93 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs @@ -275,7 +275,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun for (int i = 0; i < model.TunerCount; ++i) { var name = String.Format("Tuner {0}", i + 1); - var currentChannel = "none"; /// @todo Get current channel and map back to Station Id + var currentChannel = "none"; /// @todo Get current channel and map back to Station Id var isAvailable = await manager.CheckTunerAvailability(ipInfo, i, cancellationToken).ConfigureAwait(false); LiveTvTunerStatus status = isAvailable ? LiveTvTunerStatus.Available : LiveTvTunerStatus.LiveTv; tuners.Add(new LiveTvTunerInfo diff --git a/Emby.Server.Implementations/Localization/TextLocalizer.cs b/Emby.Server.Implementations/Localization/TextLocalizer.cs index 5188a959e..3ea04265d 100644 --- a/Emby.Server.Implementations/Localization/TextLocalizer.cs +++ b/Emby.Server.Implementations/Localization/TextLocalizer.cs @@ -32,7 +32,7 @@ namespace Emby.Server.Implementations.Localization catch (ArgumentException) { // will throw if input contains invalid unicode chars - // https://mnaoumov.wordpress.com/2014/06/14/stripping-invalid-characters-from-utf-16-strings/ + // https://mnaoumov.wordpress.com/2014/06/14/stripping-invalid-characters-from-utf-16-strings/ text = StripInvalidUnicodeCharacters(text); return Normalize(text, form, false); } diff --git a/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs b/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs index afb202fa3..4da9c08d0 100644 --- a/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs +++ b/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs @@ -122,28 +122,28 @@ namespace System.Net } /// - /// + /// /// Reverse a Positive BigInteger ONLY /// Bitwise ~ operator - /// + /// /// Input : FF FF FF FF /// Width : 4 - /// Result : 00 00 00 00 - /// - /// + /// Result : 00 00 00 00 + /// + /// /// Input : 00 00 00 00 /// Width : 4 - /// Result : FF FF FF FF - /// + /// Result : FF FF FF FF + /// /// Input : FF FF FF FF /// Width : 8 /// Result : FF FF FF FF 00 00 00 00 - /// - /// + /// + /// /// Input : 00 00 00 00 /// Width : 8 /// Result : FF FF FF FF FF FF FF FF - /// + /// /// /// /// diff --git a/Emby.Server.Implementations/Properties/AssemblyInfo.cs b/Emby.Server.Implementations/Properties/AssemblyInfo.cs index 28ffcbac6..5987db0eb 100644 --- a/Emby.Server.Implementations/Properties/AssemblyInfo.cs +++ b/Emby.Server.Implementations/Properties/AssemblyInfo.cs @@ -3,7 +3,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Emby.Server.Implementations")] @@ -19,10 +19,10 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] \ No newline at end of file diff --git a/Emby.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs b/Emby.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs index 02568fe3a..db81243e0 100644 --- a/Emby.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/PeopleValidationTask.cs @@ -35,8 +35,8 @@ namespace Emby.Server.Implementations.ScheduledTasks /// public IEnumerable GetDefaultTriggers() { - return new[] - { + return new[] + { // Every so often new TaskTriggerInfo { diff --git a/Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs b/Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs index fb07b8e99..c58af68c8 100644 --- a/Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs @@ -36,8 +36,8 @@ namespace Emby.Server.Implementations.ScheduledTasks /// IEnumerable{BaseTaskTrigger}. public IEnumerable GetDefaultTriggers() { - return new[] { - + return new[] { + // Every so often new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(12).Ticks} }; diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs index c60f59ce4..c6a807521 100644 --- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs @@ -42,8 +42,8 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks /// IEnumerable{BaseTaskTrigger}. public IEnumerable GetDefaultTriggers() { - return new[] { - + return new[] { + // Every so often new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks} }; diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs index b754d7cb5..c3ef81f14 100644 --- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs @@ -38,8 +38,8 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks /// IEnumerable{BaseTaskTrigger}. public IEnumerable GetDefaultTriggers() { - return new[] { - + return new[] { + // Every so often new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks} }; diff --git a/Emby.Server.Implementations/Security/MBLicenseFile.cs b/Emby.Server.Implementations/Security/MBLicenseFile.cs index 1810cbcd2..485aaba46 100644 --- a/Emby.Server.Implementations/Security/MBLicenseFile.cs +++ b/Emby.Server.Implementations/Security/MBLicenseFile.cs @@ -171,7 +171,7 @@ namespace Emby.Server.Implementations.Security //build our array var lines = new List { - RegKey, + RegKey, // Legacy key string.Empty diff --git a/Emby.Server.Implementations/Services/ServiceHandler.cs b/Emby.Server.Implementations/Services/ServiceHandler.cs index f5fcb5fe6..5590c51b6 100644 --- a/Emby.Server.Implementations/Services/ServiceHandler.cs +++ b/Emby.Server.Implementations/Services/ServiceHandler.cs @@ -21,7 +21,7 @@ namespace Emby.Server.Implementations.Services return deserializer(requestType, httpReq.InputStream); } } - return Task.FromResult(host.CreateInstance(requestType)); + return Task.FromResult(host.CreateInstance(requestType)); } public static RestPath FindMatchingRestPath(string httpMethod, string pathInfo, out string contentType) diff --git a/Emby.Server.Implementations/Services/ServicePath.cs b/Emby.Server.Implementations/Services/ServicePath.cs index ac2af3eaf..ce779a208 100644 --- a/Emby.Server.Implementations/Services/ServicePath.cs +++ b/Emby.Server.Implementations/Services/ServicePath.cs @@ -39,7 +39,7 @@ namespace Emby.Server.Implementations.Services public int PathComponentsCount { get; set; } /// - /// The total number of segments after subparts have been exploded ('.') + /// The total number of segments after subparts have been exploded ('.') /// e.g. /path/to/here.ext == 4 /// public int TotalComponentsCount { get; set; } diff --git a/Emby.Server.Implementations/Services/UrlExtensions.cs b/Emby.Server.Implementations/Services/UrlExtensions.cs index ba9889c41..898dcac3e 100644 --- a/Emby.Server.Implementations/Services/UrlExtensions.cs +++ b/Emby.Server.Implementations/Services/UrlExtensions.cs @@ -5,7 +5,7 @@ namespace Emby.Server.Implementations.Services /// /// Donated by Ivan Korneliuk from his post: /// http://korneliuk.blogspot.com/2012/08/servicestack-reusing-dtos.html - /// + /// /// Modified to only allow using routes matching the supplied HTTP Verb /// public static class UrlExtensions diff --git a/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs b/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs index 388d2772e..5939a9442 100644 --- a/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs +++ b/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs @@ -28,7 +28,7 @@ namespace Emby.Server.Implementations.Sorting /// /// The user data repository. public IUserDataManager UserDataRepository { get; set; } - + /// /// Compares the specified x. /// diff --git a/Emby.Server.Implementations/Sorting/PlayCountComparer.cs b/Emby.Server.Implementations/Sorting/PlayCountComparer.cs index aecad7c58..6acec8012 100644 --- a/Emby.Server.Implementations/Sorting/PlayCountComparer.cs +++ b/Emby.Server.Implementations/Sorting/PlayCountComparer.cs @@ -53,7 +53,7 @@ namespace Emby.Server.Implementations.Sorting /// /// The user data repository. public IUserDataManager UserDataRepository { get; set; } - + /// /// Gets or sets the user manager. /// diff --git a/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs b/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs index d7219c86f..b42aabe25 100644 --- a/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs +++ b/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs @@ -32,7 +32,7 @@ namespace Emby.Server.Implementations.Sorting { return x.PremiereDate.Value; } - + if (x.ProductionYear.HasValue) { try diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs index fc6c58a95..1ea92232b 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs @@ -18,7 +18,7 @@ namespace NLangDetect.Core.Extensions if (end < 0) throw new ArgumentOutOfRangeException("end", "Argument must not be negative."); if (end > s.Length) throw new ArgumentOutOfRangeException("end", "Argument must not be greater than the input string's length."); if (start > end) throw new ArgumentOutOfRangeException("start", "Argument must not be greater than the 'end' argument."); - + return s.Substring(start, end - start); } } diff --git a/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs b/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs index a0395a21b..441606e2c 100644 --- a/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs +++ b/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs @@ -1,15 +1,15 @@ namespace Emby.Server.Implementations.TextEncoding { // Copyright 2015-2016 Jonathan Bennett - // - // https://www.autoitscript.com + // + // https://www.autoitscript.com // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 - // + // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -166,7 +166,7 @@ return encoding; } - // Now try UTF16 + // Now try UTF16 encoding = CheckUtf16NewlineChars(buffer, size); if (encoding != CharacterEncoding.None) { diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/CharsetDetector.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/CharsetDetector.cs index 942fda8d1..18b3b306e 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/CharsetDetector.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/CharsetDetector.cs @@ -41,7 +41,7 @@ using System.IO; namespace UniversalDetector { /// - /// Default implementation of charset detection interface. + /// Default implementation of charset detection interface. /// The detector can be fed by a System.IO.Stream: /// /// @@ -52,9 +52,9 @@ namespace UniversalDetector /// Console.WriteLine("{0}, {1}", cdet.Charset, cdet.Confidence); /// /// - /// + /// /// or by a byte a array: - /// + /// /// /// /// byte[] buff = new byte[1024]; @@ -64,23 +64,23 @@ namespace UniversalDetector /// cdet.DataEnd(); /// Console.WriteLine("{0}, {1}", cdet.Charset, cdet.Confidence); /// - /// - /// + /// + /// public class CharsetDetector : Core.UniversalDetector, ICharsetDetector { private string charset; - + private float confidence; - + //public event DetectorFinished Finished; - + public CharsetDetector() : base(FILTER_ALL) { - + } public void Feed(Stream stream) - { + { byte[] buff = new byte[1024]; int read; while ((read = stream.Read(buff, 0, buff.Length)) > 0 && !done) @@ -88,19 +88,19 @@ namespace UniversalDetector Feed(buff, 0, read); } } - - public bool IsDone() + + public bool IsDone() { return done; } - + public override void Reset() { this.charset = null; this.confidence = 0.0f; base.Reset(); } - + public string Charset { get { return charset; } } @@ -108,7 +108,7 @@ namespace UniversalDetector public float Confidence { get { return confidence; } } - + protected override void Report(string charset, float confidence) { this.charset = charset; @@ -118,7 +118,7 @@ namespace UniversalDetector // } } } - + //public delegate void DetectorFinished(string charset, float confidence); } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Big5Prober.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Big5Prober.cs index 760fca9bd..19152a7ac 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Big5Prober.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Big5Prober.cs @@ -44,12 +44,12 @@ namespace UniversalDetector.Core private CodingStateMachine codingSM; private BIG5DistributionAnalyser distributionAnalyser; private byte[] lastChar = new byte[2]; - + public Big5Prober() { this.codingSM = new CodingStateMachine(new BIG5SMModel()); this.distributionAnalyser = new BIG5DistributionAnalyser(); - this.Reset(); + this.Reset(); } public override ProbingState HandleData(byte[] buf, int offset, int len) @@ -73,7 +73,7 @@ namespace UniversalDetector.Core lastChar[1] = buf[offset]; distributionAnalyser.HandleOneChar(lastChar, 0, charLen); } else { - distributionAnalyser.HandleOneChar(buf, i-1, charLen); + distributionAnalyser.HandleOneChar(buf, i-1, charLen); } } } @@ -84,23 +84,23 @@ namespace UniversalDetector.Core state = ProbingState.FoundIt; return state; } - + public override void Reset() { - codingSM.Reset(); + codingSM.Reset(); state = ProbingState.Detecting; distributionAnalyser.Reset(); } - + public override string GetCharsetName() { - return "Big-5"; + return "Big-5"; } - + public override float GetConfidence() { return distributionAnalyser.GetConfidence(); } - + } } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/BitPackage.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/BitPackage.cs index 16483e661..19bcdc779 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/BitPackage.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/BitPackage.cs @@ -43,15 +43,15 @@ namespace UniversalDetector.Core public static int INDEX_SHIFT_4BITS = 3; public static int INDEX_SHIFT_8BITS = 2; public static int INDEX_SHIFT_16BITS = 1; - + public static int SHIFT_MASK_4BITS = 7; public static int SHIFT_MASK_8BITS = 3; public static int SHIFT_MASK_16BITS = 1; - + public static int BIT_SHIFT_4BITS = 2; public static int BIT_SHIFT_8BITS = 3; public static int BIT_SHIFT_16BITS = 4; - + public static int UNIT_MASK_4BITS = 0x0000000F; public static int UNIT_MASK_8BITS = 0x000000FF; public static int UNIT_MASK_16BITS = 0x0000FFFF; @@ -61,7 +61,7 @@ namespace UniversalDetector.Core private int bitShift; private int unitMask; private int[] data; - + public BitPackage(int indexShift, int shiftMask, int bitShift, int unitMask, int[] data) { @@ -71,27 +71,27 @@ namespace UniversalDetector.Core this.unitMask = unitMask; this.data = data; } - + public static int Pack16bits(int a, int b) { return ((b << 16) | a); } - + public static int Pack8bits(int a, int b, int c, int d) { return Pack16bits((b << 8) | a, (d << 8) | c); } - - public static int Pack4bits(int a, int b, int c, int d, + + public static int Pack4bits(int a, int b, int c, int d, int e, int f, int g, int h) { return Pack8bits((b << 4) | a, (d << 4) | c, (f << 4) | e, (h << 4) | g); } - + public int Unpack(int i) { - return (data[i >> indexShift] >> + return (data[i >> indexShift] >> ((i & shiftMask) << bitShift)) & unitMask; } } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharsetProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharsetProber.cs index 3369dd430..cc4539058 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharsetProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharsetProber.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -40,10 +40,10 @@ using System.IO; namespace UniversalDetector.Core { - public enum ProbingState { + public enum ProbingState { Detecting = 0, // no sure answer yet, but caller can ask for confidence FoundIt = 1, // positive answer - NotMe = 2 // negative answer + NotMe = 2 // negative answer }; public abstract class CharsetProber @@ -51,16 +51,16 @@ namespace UniversalDetector.Core protected const float SHORTCUT_THRESHOLD = 0.95F; protected ProbingState state; - + // ASCII codes private const byte SPACE = 0x20; private const byte CAPITAL_A = 0x41; private const byte CAPITAL_Z = 0x5A; private const byte SMALL_A = 0x61; private const byte SMALL_Z = 0x7A; - private const byte LESS_THAN = 0x3C; + private const byte LESS_THAN = 0x3C; private const byte GREATER_THAN = 0x3E; - + /// /// Feed data to the prober /// @@ -71,44 +71,44 @@ namespace UniversalDetector.Core /// A /// public abstract ProbingState HandleData(byte[] buf, int offset, int len); - + /// /// Reset prober state /// public abstract void Reset(); public abstract string GetCharsetName(); - + public abstract float GetConfidence(); - + public virtual ProbingState GetState() { return state; } public virtual void SetOption() - { - + { + } public virtual void DumpStatus() - { - + { + } // // Helper functions used in the Latin1 and Group probers // /// - /// + /// /// /// filtered buffer - protected static byte[] FilterWithoutEnglishLetters(byte[] buf, int offset, int len) + protected static byte[] FilterWithoutEnglishLetters(byte[] buf, int offset, int len) { byte[] result = null; using (MemoryStream ms = new MemoryStream(buf.Length)) { - + bool meetMSB = false; int max = offset + len; int prev = offset; @@ -140,8 +140,8 @@ namespace UniversalDetector.Core } /// - /// Do filtering to reduce load to probers (Remove ASCII symbols, - /// collapse spaces). This filter applies to all scripts which contain + /// Do filtering to reduce load to probers (Remove ASCII symbols, + /// collapse spaces). This filter applies to all scripts which contain /// both English characters and upper ASCII characters. /// /// a filtered copy of the input buffer @@ -150,16 +150,16 @@ namespace UniversalDetector.Core byte[] result = null; using (MemoryStream ms = new MemoryStream(buf.Length)) { - + bool inTag = false; int max = offset + len; int prev = offset; int cur = offset; while (cur < max) { - + byte b = buf[cur]; - + if (b == GREATER_THAN) inTag = false; else if (b == LESS_THAN) @@ -177,7 +177,7 @@ namespace UniversalDetector.Core cur++; } - // If the current segment contains more than just a symbol + // If the current segment contains more than just a symbol // and it is not inside a tag then keep it. if (!inTag && cur > prev) ms.Write(buf, prev, cur - prev); diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Charsets.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Charsets.cs index a7c1be92a..00cd8826f 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Charsets.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Charsets.cs @@ -20,7 +20,7 @@ * * Contributor(s): * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -40,47 +40,47 @@ namespace UniversalDetector.Core public static class Charsets { public const string ASCII = "ASCII"; - + public const string UTF8 = "UTF-8"; - + public const string UTF16_LE = "UTF-16LE"; - + public const string UTF16_BE = "UTF-16BE"; - + public const string UTF32_BE = "UTF-32BE"; - + public const string UTF32_LE = "UTF-32LE"; /// /// Unusual BOM (3412 order) /// public const string UCS4_3412 = "X-ISO-10646-UCS-4-3412"; - + /// /// Unusual BOM (2413 order) /// public const string UCS4_2413 = "X-ISO-10646-UCS-4-2413"; - + /// /// Cyrillic (based on bulgarian and russian data) /// public const string WIN1251 = "windows-1251"; - + /// /// Latin-1, almost identical to ISO-8859-1 /// public const string WIN1252 = "windows-1252"; - + /// /// Greek /// public const string WIN1253 = "windows-1253"; - + /// /// Logical hebrew (includes ISO-8859-8-I and most of x-mac-hebrew) /// public const string WIN1255 = "windows-1255"; - + /// /// Traditional chinese /// @@ -89,7 +89,7 @@ namespace UniversalDetector.Core public const string EUCKR = "EUC-KR"; public const string EUCJP = "EUC-JP"; - + public const string EUCTW = "EUC-TW"; /// @@ -98,11 +98,11 @@ namespace UniversalDetector.Core public const string GB18030 = "gb18030"; public const string ISO2022_JP = "ISO-2022-JP"; - + public const string ISO2022_CN = "ISO-2022-CN"; - + public const string ISO2022_KR = "ISO-2022-KR"; - + /// /// Simplified chinese /// @@ -111,15 +111,15 @@ namespace UniversalDetector.Core public const string SHIFT_JIS = "Shift-JIS"; public const string MAC_CYRILLIC = "x-mac-cyrillic"; - + public const string KOI8R = "KOI8-R"; - + public const string IBM855 = "IBM855"; - + public const string IBM866 = "IBM866"; /// - /// East-Europe. Disabled because too similar to windows-1252 + /// East-Europe. Disabled because too similar to windows-1252 /// (latin-1). Should use tri-grams models to discriminate between /// these two charsets. /// @@ -141,9 +141,9 @@ namespace UniversalDetector.Core public const string ISO8859_8 = "ISO-8859-8"; /// - /// Thai. This recognizer is not enabled yet. + /// Thai. This recognizer is not enabled yet. /// public const string TIS620 = "TIS620"; - + } } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CodingStateMachine.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CodingStateMachine.cs index f837dd966..484bbca36 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CodingStateMachine.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CodingStateMachine.cs @@ -22,7 +22,7 @@ * Shy Shalom * Kohei TAKETA (Java port) * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -48,8 +48,8 @@ namespace UniversalDetector.Core private SMModel model; private int currentCharLen; private int currentBytePos; - - public CodingStateMachine(SMModel model) + + public CodingStateMachine(SMModel model) { this.currentState = SMModel.START; this.model = model; @@ -57,34 +57,34 @@ namespace UniversalDetector.Core public int NextState(byte b) { - // for each byte we get its class, if it is first byte, + // for each byte we get its class, if it is first byte, // we also get byte length int byteCls = model.GetClass(b); - if (currentState == SMModel.START) { + if (currentState == SMModel.START) { currentBytePos = 0; currentCharLen = model.charLenTable[byteCls]; } - - // from byte's class and stateTable, we get its next state + + // from byte's class and stateTable, we get its next state currentState = model.stateTable.Unpack( currentState * model.ClassFactor + byteCls); currentBytePos++; return currentState; } - - public void Reset() - { - currentState = SMModel.START; + + public void Reset() + { + currentState = SMModel.START; } - public int CurrentCharLen - { - get { return currentCharLen; } + public int CurrentCharLen + { + get { return currentCharLen; } } - public string ModelName - { - get { return model.Name; } + public string ModelName + { + get { return model.Name; } } } } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCJPProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCJPProber.cs index 050a9d9ce..eac67fe95 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCJPProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCJPProber.cs @@ -43,25 +43,25 @@ namespace UniversalDetector.Core private EUCJPContextAnalyser contextAnalyser; private EUCJPDistributionAnalyser distributionAnalyser; private byte[] lastChar = new byte[2]; - + public EUCJPProber() { codingSM = new CodingStateMachine(new EUCJPSMModel()); distributionAnalyser = new EUCJPDistributionAnalyser(); - contextAnalyser = new EUCJPContextAnalyser(); + contextAnalyser = new EUCJPContextAnalyser(); Reset(); } - public override string GetCharsetName() + public override string GetCharsetName() { return "EUC-JP"; } - + public override ProbingState HandleData(byte[] buf, int offset, int len) { int codingState; int max = offset + len; - + for (int i = offset; i < max; i++) { codingState = codingSM.NextState(buf[i]); if (codingState == SMModel.ERROR) { @@ -83,7 +83,7 @@ namespace UniversalDetector.Core distributionAnalyser.HandleOneChar(buf, i-1, charLen); } } - } + } lastChar[0] = buf[max-1]; if (state == ProbingState.Detecting) if (contextAnalyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD) @@ -93,18 +93,18 @@ namespace UniversalDetector.Core public override void Reset() { - codingSM.Reset(); + codingSM.Reset(); state = ProbingState.Detecting; contextAnalyser.Reset(); distributionAnalyser.Reset(); } - + public override float GetConfidence() { float contxtCf = contextAnalyser.GetConfidence(); float distribCf = distributionAnalyser.GetConfidence(); return (contxtCf > distribCf ? contxtCf : distribCf); } - + } } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCKRProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCKRProber.cs index 67d4b0a72..b1543dae1 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCKRProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCKRProber.cs @@ -46,15 +46,15 @@ namespace UniversalDetector.Core public EUCKRProber() { codingSM = new CodingStateMachine(new EUCKRSMModel()); - distributionAnalyser = new EUCKRDistributionAnalyser(); + distributionAnalyser = new EUCKRDistributionAnalyser(); Reset(); } - + public override string GetCharsetName() { - return "EUC-KR"; + return "EUC-KR"; } - + public override ProbingState HandleData(byte[] buf, int offset, int len) { int codingState; @@ -81,12 +81,12 @@ namespace UniversalDetector.Core } } lastChar[0] = buf[max-1]; - + if (state == ProbingState.Detecting) if (distributionAnalyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD) state = ProbingState.FoundIt; return state; - + } public override float GetConfidence() @@ -96,7 +96,7 @@ namespace UniversalDetector.Core public override void Reset() { - codingSM.Reset(); + codingSM.Reset(); state = ProbingState.Detecting; distributionAnalyser.Reset(); //mContextAnalyser.Reset(); diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCTWProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCTWProber.cs index a4e0b486e..65a521760 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCTWProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EUCTWProber.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -50,7 +50,7 @@ namespace UniversalDetector.Core this.distributionAnalyser = new EUCTWDistributionAnalyser(); this.Reset(); } - + public override ProbingState HandleData(byte[] buf, int offset, int len) { int codingState; @@ -77,21 +77,21 @@ namespace UniversalDetector.Core } } lastChar[0] = buf[max-1]; - + if (state == ProbingState.Detecting) if (distributionAnalyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD) state = ProbingState.FoundIt; return state; } - + public override string GetCharsetName() { - return "x-euc-tw"; + return "x-euc-tw"; } - + public override void Reset() { - codingSM.Reset(); + codingSM.Reset(); state = ProbingState.Detecting; distributionAnalyser.Reset(); } @@ -100,7 +100,7 @@ namespace UniversalDetector.Core { return distributionAnalyser.GetConfidence(); } - - + + } } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs index e9cefa9bc..f457bf490 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs @@ -41,19 +41,19 @@ namespace UniversalDetector.Core { private const int CHARSETS_NUM = 4; private string detectedCharset; - private CodingStateMachine[] codingSM; + private CodingStateMachine[] codingSM; int activeSM; public EscCharsetProber() { - codingSM = new CodingStateMachine[CHARSETS_NUM]; + codingSM = new CodingStateMachine[CHARSETS_NUM]; codingSM[0] = new CodingStateMachine(new HZSMModel()); codingSM[1] = new CodingStateMachine(new ISO2022CNSMModel()); codingSM[2] = new CodingStateMachine(new ISO2022JPSMModel()); codingSM[3] = new CodingStateMachine(new ISO2022KRSMModel()); Reset(); } - + public override void Reset() { state = ProbingState.Detecting; @@ -66,7 +66,7 @@ namespace UniversalDetector.Core public override ProbingState HandleData(byte[] buf, int offset, int len) { int max = offset + len; - + for (int i = offset; i < max && state == ProbingState.Detecting; i++) { for (int j = activeSM - 1; j >= 0; j--) { // byte is feed to all active state machine @@ -94,12 +94,12 @@ namespace UniversalDetector.Core public override string GetCharsetName() { - return detectedCharset; + return detectedCharset; } - + public override float GetConfidence() { return 0.99f; - } + } } } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscSM.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscSM.cs index 61ac5545f..6ebfa8a4c 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscSM.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscSM.cs @@ -44,59 +44,59 @@ namespace UniversalDetector.Core public class HZSMModel : SMModel { private readonly static int[] HZ_cls = { - BitPackage.Pack4bits(1,0,0,0,0,0,0,0), // 00 - 07 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 08 - 0f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17 - BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 28 - 2f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 40 - 47 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77 - BitPackage.Pack4bits(0,0,0,4,0,5,2,0), // 78 - 7f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 80 - 87 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 88 - 8f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 90 - 97 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 98 - 9f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // a0 - a7 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // a8 - af - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b0 - b7 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b8 - bf - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // c0 - c7 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // c8 - cf - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // d0 - d7 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // d8 - df - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // e0 - e7 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // e8 - ef - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // f0 - f7 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1) // f8 - ff + BitPackage.Pack4bits(1,0,0,0,0,0,0,0), // 00 - 07 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 08 - 0f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17 + BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 28 - 2f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 40 - 47 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77 + BitPackage.Pack4bits(0,0,0,4,0,5,2,0), // 78 - 7f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 80 - 87 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 88 - 8f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 90 - 97 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 98 - 9f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // a0 - a7 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // a8 - af + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b0 - b7 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b8 - bf + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // c0 - c7 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // c8 - cf + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // d0 - d7 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // d8 - df + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // e0 - e7 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // e8 - ef + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // f0 - f7 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1) // f8 - ff }; private readonly static int[] HZ_st = { - BitPackage.Pack4bits(START, ERROR, 3, START, START, START, ERROR, ERROR),//00-07 - BitPackage.Pack4bits(ERROR, ERROR, ERROR, ERROR, ITSME, ITSME, ITSME, ITSME),//08-0f - BitPackage.Pack4bits(ITSME, ITSME, ERROR, ERROR, START, START, 4, ERROR),//10-17 - BitPackage.Pack4bits( 5, ERROR, 6, ERROR, 5, 5, 4, ERROR),//18-1f - BitPackage.Pack4bits( 4, ERROR, 4, 4, 4, ERROR, 4, ERROR),//20-27 - BitPackage.Pack4bits( 4, ITSME, START, START, START, START, START, START) //28-2f + BitPackage.Pack4bits(START, ERROR, 3, START, START, START, ERROR, ERROR),//00-07 + BitPackage.Pack4bits(ERROR, ERROR, ERROR, ERROR, ITSME, ITSME, ITSME, ITSME),//08-0f + BitPackage.Pack4bits(ITSME, ITSME, ERROR, ERROR, START, START, 4, ERROR),//10-17 + BitPackage.Pack4bits( 5, ERROR, 6, ERROR, 5, 5, 4, ERROR),//18-1f + BitPackage.Pack4bits( 4, ERROR, 4, 4, 4, ERROR, 4, ERROR),//20-27 + BitPackage.Pack4bits( 4, ITSME, START, START, START, START, START, START) //28-2f }; private readonly static int[] HZCharLenTable = {0, 0, 0, 0, 0, 0}; - + public HZSMModel() : base( - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, HZ_cls), 6, - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, HZ_st), HZCharLenTable, "HZ-GB-2312") @@ -104,65 +104,65 @@ namespace UniversalDetector.Core } } - + public class ISO2022CNSMModel : SMModel { private readonly static int[] ISO2022CN_cls = { - BitPackage.Pack4bits(2,0,0,0,0,0,0,0), // 00 - 07 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 08 - 0f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17 - BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27 - BitPackage.Pack4bits(0,3,0,0,0,0,0,0), // 28 - 2f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f - BitPackage.Pack4bits(0,0,0,4,0,0,0,0), // 40 - 47 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 80 - 87 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 88 - 8f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 90 - 97 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 98 - 9f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2) // f8 - ff + BitPackage.Pack4bits(2,0,0,0,0,0,0,0), // 00 - 07 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 08 - 0f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17 + BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27 + BitPackage.Pack4bits(0,3,0,0,0,0,0,0), // 28 - 2f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f + BitPackage.Pack4bits(0,0,0,4,0,0,0,0), // 40 - 47 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 80 - 87 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 88 - 8f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 90 - 97 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 98 - 9f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2) // f8 - ff }; private readonly static int[] ISO2022CN_st = { - BitPackage.Pack4bits(START, 3,ERROR,START,START,START,START,START),//00-07 - BitPackage.Pack4bits(START,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//08-0f - BitPackage.Pack4bits(ERROR,ERROR,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME),//10-17 - BitPackage.Pack4bits(ITSME,ITSME,ITSME,ERROR,ERROR,ERROR, 4,ERROR),//18-1f - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ITSME,ERROR,ERROR,ERROR,ERROR),//20-27 - BitPackage.Pack4bits( 5, 6,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//28-2f - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ITSME,ERROR,ERROR,ERROR,ERROR),//30-37 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ITSME,ERROR,START) //38-3f + BitPackage.Pack4bits(START, 3,ERROR,START,START,START,START,START),//00-07 + BitPackage.Pack4bits(START,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//08-0f + BitPackage.Pack4bits(ERROR,ERROR,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME),//10-17 + BitPackage.Pack4bits(ITSME,ITSME,ITSME,ERROR,ERROR,ERROR, 4,ERROR),//18-1f + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ITSME,ERROR,ERROR,ERROR,ERROR),//20-27 + BitPackage.Pack4bits( 5, 6,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//28-2f + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ITSME,ERROR,ERROR,ERROR,ERROR),//30-37 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ITSME,ERROR,START) //38-3f }; private readonly static int[] ISO2022CNCharLenTable = {0, 0, 0, 0, 0, 0, 0, 0, 0}; public ISO2022CNSMModel() : base( - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, ISO2022CN_cls), 9, - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, ISO2022CN_st), ISO2022CNCharLenTable, "ISO-2022-CN") @@ -170,130 +170,130 @@ namespace UniversalDetector.Core } } - + public class ISO2022JPSMModel : SMModel { private readonly static int[] ISO2022JP_cls = { - BitPackage.Pack4bits(2,0,0,0,0,0,0,0), // 00 - 07 - BitPackage.Pack4bits(0,0,0,0,0,0,2,2), // 08 - 0f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17 - BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f - BitPackage.Pack4bits(0,0,0,0,7,0,0,0), // 20 - 27 - BitPackage.Pack4bits(3,0,0,0,0,0,0,0), // 28 - 2f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f - BitPackage.Pack4bits(6,0,4,0,8,0,0,0), // 40 - 47 - BitPackage.Pack4bits(0,9,5,0,0,0,0,0), // 48 - 4f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 80 - 87 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 88 - 8f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 90 - 97 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 98 - 9f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2) // f8 - ff + BitPackage.Pack4bits(2,0,0,0,0,0,0,0), // 00 - 07 + BitPackage.Pack4bits(0,0,0,0,0,0,2,2), // 08 - 0f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17 + BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f + BitPackage.Pack4bits(0,0,0,0,7,0,0,0), // 20 - 27 + BitPackage.Pack4bits(3,0,0,0,0,0,0,0), // 28 - 2f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f + BitPackage.Pack4bits(6,0,4,0,8,0,0,0), // 40 - 47 + BitPackage.Pack4bits(0,9,5,0,0,0,0,0), // 48 - 4f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 80 - 87 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 88 - 8f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 90 - 97 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 98 - 9f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2) // f8 - ff }; private readonly static int[] ISO2022JP_st = { - BitPackage.Pack4bits(START, 3, ERROR,START,START,START,START,START),//00-07 - BitPackage.Pack4bits(START, START, ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//08-0f - BitPackage.Pack4bits(ERROR, ERROR, ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//10-17 - BitPackage.Pack4bits(ITSME, ITSME, ITSME,ITSME,ITSME,ITSME,ERROR,ERROR),//18-1f - BitPackage.Pack4bits(ERROR, 5, ERROR,ERROR,ERROR, 4,ERROR,ERROR),//20-27 - BitPackage.Pack4bits(ERROR, ERROR, ERROR, 6,ITSME,ERROR,ITSME,ERROR),//28-2f - BitPackage.Pack4bits(ERROR, ERROR, ERROR,ERROR,ERROR,ERROR,ITSME,ITSME),//30-37 - BitPackage.Pack4bits(ERROR, ERROR, ERROR,ITSME,ERROR,ERROR,ERROR,ERROR),//38-3f - BitPackage.Pack4bits(ERROR, ERROR, ERROR,ERROR,ITSME,ERROR,START,START) //40-47 + BitPackage.Pack4bits(START, 3, ERROR,START,START,START,START,START),//00-07 + BitPackage.Pack4bits(START, START, ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//08-0f + BitPackage.Pack4bits(ERROR, ERROR, ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//10-17 + BitPackage.Pack4bits(ITSME, ITSME, ITSME,ITSME,ITSME,ITSME,ERROR,ERROR),//18-1f + BitPackage.Pack4bits(ERROR, 5, ERROR,ERROR,ERROR, 4,ERROR,ERROR),//20-27 + BitPackage.Pack4bits(ERROR, ERROR, ERROR, 6,ITSME,ERROR,ITSME,ERROR),//28-2f + BitPackage.Pack4bits(ERROR, ERROR, ERROR,ERROR,ERROR,ERROR,ITSME,ITSME),//30-37 + BitPackage.Pack4bits(ERROR, ERROR, ERROR,ITSME,ERROR,ERROR,ERROR,ERROR),//38-3f + BitPackage.Pack4bits(ERROR, ERROR, ERROR,ERROR,ITSME,ERROR,START,START) //40-47 }; private readonly static int[] ISO2022JPCharLenTable = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; public ISO2022JPSMModel() : base( - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, ISO2022JP_cls), 10, - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, ISO2022JP_st), ISO2022JPCharLenTable, "ISO-2022-JP") { } - + } - + public class ISO2022KRSMModel : SMModel - { + { private readonly static int[] ISO2022KR_cls = { - BitPackage.Pack4bits(2,0,0,0,0,0,0,0), // 00 - 07 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 08 - 0f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17 - BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f - BitPackage.Pack4bits(0,0,0,0,3,0,0,0), // 20 - 27 - BitPackage.Pack4bits(0,4,0,0,0,0,0,0), // 28 - 2f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f - BitPackage.Pack4bits(0,0,0,5,0,0,0,0), // 40 - 47 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 80 - 87 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 88 - 8f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 90 - 97 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 98 - 9f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2) // f8 - ff + BitPackage.Pack4bits(2,0,0,0,0,0,0,0), // 00 - 07 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 08 - 0f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17 + BitPackage.Pack4bits(0,0,0,1,0,0,0,0), // 18 - 1f + BitPackage.Pack4bits(0,0,0,0,3,0,0,0), // 20 - 27 + BitPackage.Pack4bits(0,4,0,0,0,0,0,0), // 28 - 2f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f + BitPackage.Pack4bits(0,0,0,5,0,0,0,0), // 40 - 47 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 80 - 87 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 88 - 8f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 90 - 97 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 98 - 9f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2) // f8 - ff }; private readonly static int[] ISO2022KR_st = { - BitPackage.Pack4bits(START, 3,ERROR,START,START,START,ERROR,ERROR),//00-07 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f - BitPackage.Pack4bits(ITSME,ITSME,ERROR,ERROR,ERROR, 4,ERROR,ERROR),//10-17 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR, 5,ERROR,ERROR,ERROR),//18-1f - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ITSME,START,START,START,START) //20-27 + BitPackage.Pack4bits(START, 3,ERROR,START,START,START,ERROR,ERROR),//00-07 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f + BitPackage.Pack4bits(ITSME,ITSME,ERROR,ERROR,ERROR, 4,ERROR,ERROR),//10-17 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR, 5,ERROR,ERROR,ERROR),//18-1f + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ITSME,START,START,START,START) //20-27 }; private readonly static int[] ISO2022KRCharLenTable = {0, 0, 0, 0, 0, 0}; public ISO2022KRSMModel() : base( - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, ISO2022KR_cls), 6, - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, ISO2022KR_st), ISO2022KRCharLenTable, "ISO-2022-KR") diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/GB18030Prober.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/GB18030Prober.cs index ac237c5cd..0d2ebd8c7 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/GB18030Prober.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/GB18030Prober.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -38,7 +38,7 @@ namespace UniversalDetector.Core { - // We use gb18030 to replace gb2312, because 18030 is a superset. + // We use gb18030 to replace gb2312, because 18030 is a superset. public class GB18030Prober : CharsetProber { private CodingStateMachine codingSM; @@ -52,18 +52,18 @@ namespace UniversalDetector.Core analyser = new GB18030DistributionAnalyser(); Reset(); } - + public override string GetCharsetName() { - return "gb18030"; + return "gb18030"; } - + public override ProbingState HandleData(byte[] buf, int offset, int len) { int codingState = SMModel.START; int max = offset + len; - + for (int i = offset; i < max; i++) { codingState = codingSM.NextState(buf[i]); if (codingState == SMModel.ERROR) { @@ -91,18 +91,18 @@ namespace UniversalDetector.Core if (analyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD) state = ProbingState.FoundIt; } - + return state; } - + public override float GetConfidence() { return analyser.GetConfidence(); } - + public override void Reset() { - codingSM.Reset(); + codingSM.Reset(); state = ProbingState.Detecting; analyser.Reset(); } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/HebrewProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/HebrewProber.cs index 92974d3a8..2cbf33075 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/HebrewProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/HebrewProber.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -43,40 +43,40 @@ using System; * * Four main charsets exist in Hebrew: * "ISO-8859-8" - Visual Hebrew - * "windows-1255" - Logical Hebrew + * "windows-1255" - Logical Hebrew * "ISO-8859-8-I" - Logical Hebrew * "x-mac-hebrew" - ?? Logical Hebrew ?? * * Both "ISO" charsets use a completely identical set of code points, whereas - * "windows-1255" and "x-mac-hebrew" are two different proper supersets of + * "windows-1255" and "x-mac-hebrew" are two different proper supersets of * these code points. windows-1255 defines additional characters in the range - * 0x80-0x9F as some misc punctuation marks as well as some Hebrew-specific + * 0x80-0x9F as some misc punctuation marks as well as some Hebrew-specific * diacritics and additional 'Yiddish' ligature letters in the range 0xc0-0xd6. - * x-mac-hebrew defines similar additional code points but with a different + * x-mac-hebrew defines similar additional code points but with a different * mapping. * - * As far as an average Hebrew text with no diacritics is concerned, all four - * charsets are identical with respect to code points. Meaning that for the - * main Hebrew alphabet, all four map the same values to all 27 Hebrew letters + * As far as an average Hebrew text with no diacritics is concerned, all four + * charsets are identical with respect to code points. Meaning that for the + * main Hebrew alphabet, all four map the same values to all 27 Hebrew letters * (including final letters). * * The dominant difference between these charsets is their directionality. * "Visual" directionality means that the text is ordered as if the renderer is - * not aware of a BIDI rendering algorithm. The renderer sees the text and - * draws it from left to right. The text itself when ordered naturally is read + * not aware of a BIDI rendering algorithm. The renderer sees the text and + * draws it from left to right. The text itself when ordered naturally is read * backwards. A buffer of Visual Hebrew generally looks like so: * "[last word of first line spelled backwards] [whole line ordered backwards - * and spelled backwards] [first word of first line spelled backwards] + * and spelled backwards] [first word of first line spelled backwards] * [end of line] [last word of second line] ... etc' " * adding punctuation marks, numbers and English text to visual text is * naturally also "visual" and from left to right. - * + * * "Logical" directionality means the text is ordered "naturally" according to - * the order it is read. It is the responsibility of the renderer to display - * the text from right to left. A BIDI algorithm is used to place general + * the order it is read. It is the responsibility of the renderer to display + * the text from right to left. A BIDI algorithm is used to place general * punctuation marks, numbers and English text in the text. * - * Texts in x-mac-hebrew are almost impossible to find on the Internet. From + * Texts in x-mac-hebrew are almost impossible to find on the Internet. From * what little evidence I could find, it seems that its general directionality * is Logical. * @@ -84,17 +84,17 @@ using System; * charsets: * Visual Hebrew - "ISO-8859-8" - backwards text - Words and sentences are * backwards while line order is natural. For charset recognition purposes - * the line order is unimportant (In fact, for this implementation, even + * the line order is unimportant (In fact, for this implementation, even * word order is unimportant). * Logical Hebrew - "windows-1255" - normal, naturally ordered text. * - * "ISO-8859-8-I" is a subset of windows-1255 and doesn't need to be + * "ISO-8859-8-I" is a subset of windows-1255 and doesn't need to be * specifically identified. * "x-mac-hebrew" is also identified as windows-1255. A text in x-mac-hebrew * that contain special punctuation marks or diacritics is displayed with * some unconverted characters showing as question marks. This problem might * be corrected using another model prober for x-mac-hebrew. Due to the fact - * that x-mac-hebrew texts are so rare, writing another model prober isn't + * that x-mac-hebrew texts are so rare, writing another model prober isn't * worth the effort and performance hit. * * *** The Prober *** @@ -136,7 +136,7 @@ using System; */ namespace UniversalDetector.Core { - + /// /// This prober doesn't actually recognize a language or a charset. /// It is a helper prober for the use of the Hebrew model probers @@ -165,49 +165,49 @@ namespace UniversalDetector.Core protected const string VISUAL_HEBREW_NAME = "ISO-8859-8"; protected const string LOGICAL_HEBREW_NAME = "windows-1255"; - + // owned by the group prober. protected CharsetProber logicalProber, visualProber; - protected int finalCharLogicalScore, finalCharVisualScore; - + protected int finalCharLogicalScore, finalCharVisualScore; + // The two last bytes seen in the previous buffer. protected byte prev, beforePrev; - + public HebrewProber() { Reset(); } - - public void SetModelProbers(CharsetProber logical, CharsetProber visual) - { - logicalProber = logical; - visualProber = visual; + + public void SetModelProbers(CharsetProber logical, CharsetProber visual) + { + logicalProber = logical; + visualProber = visual; } - - /** + + /** * Final letter analysis for logical-visual decision. - * Look for evidence that the received buffer is either logical Hebrew or + * Look for evidence that the received buffer is either logical Hebrew or * visual Hebrew. * The following cases are checked: - * 1) A word longer than 1 letter, ending with a final letter. This is an - * indication that the text is laid out "naturally" since the final letter + * 1) A word longer than 1 letter, ending with a final letter. This is an + * indication that the text is laid out "naturally" since the final letter * really appears at the end. +1 for logical score. * 2) A word longer than 1 letter, ending with a Non-Final letter. In normal * Hebrew, words ending with Kaf, Mem, Nun, Pe or Tsadi, should not end with * the Non-Final form of that letter. Exceptions to this rule are mentioned * above in isNonFinal(). This is an indication that the text is laid out * backwards. +1 for visual score - * 3) A word longer than 1 letter, starting with a final letter. Final letters - * should not appear at the beginning of a word. This is an indication that + * 3) A word longer than 1 letter, starting with a final letter. Final letters + * should not appear at the beginning of a word. This is an indication that * the text is laid out backwards. +1 for visual score. * - * The visual score and logical score are accumulated throughout the text and + * The visual score and logical score are accumulated throughout the text and * are finally checked against each other in GetCharSetName(). * No checking for final letters in the middle of words is done since that case * is not an indication for either Logical or Visual text. * * The input buffer should not contain any white spaces that are not (' ') - * or any low-ascii punctuation marks. + * or any low-ascii punctuation marks. */ public override ProbingState HandleData(byte[] buf, int offset, int len) { @@ -218,31 +218,31 @@ namespace UniversalDetector.Core int max = offset + len; for (int i = offset; i < max; i++) { - + byte b = buf[i]; - + // a word just ended if (b == 0x20) { // *(curPtr-2) was not a space so prev is not a 1 letter word if (beforePrev != 0x20) { // case (1) [-2:not space][-1:final letter][cur:space] - if (IsFinal(prev)) + if (IsFinal(prev)) finalCharLogicalScore++; - // case (2) [-2:not space][-1:Non-Final letter][cur:space] + // case (2) [-2:not space][-1:Non-Final letter][cur:space] else if (IsNonFinal(prev)) finalCharVisualScore++; } - + } else { // case (3) [-2:space][-1:final letter][cur:not space] - if ((beforePrev == 0x20) && (IsFinal(prev)) && (b != ' ')) + if ((beforePrev == 0x20) && (IsFinal(prev)) && (b != ' ')) ++finalCharVisualScore; } beforePrev = prev; prev = b; } - // Forever detecting, till the end or until both model probers + // Forever detecting, till the end or until both model probers // return NotMe (handled above). return ProbingState.Detecting; } @@ -252,7 +252,7 @@ namespace UniversalDetector.Core { // If the final letter score distance is dominant enough, rely on it. int finalsub = finalCharLogicalScore - finalCharVisualScore; - if (finalsub >= MIN_FINAL_CHAR_DISTANCE) + if (finalsub >= MIN_FINAL_CHAR_DISTANCE) return LOGICAL_HEBREW_NAME; if (finalsub <= -(MIN_FINAL_CHAR_DISTANCE)) return VISUAL_HEBREW_NAME; @@ -263,9 +263,9 @@ namespace UniversalDetector.Core return LOGICAL_HEBREW_NAME; if (modelsub < -(MIN_MODEL_DISTANCE)) return VISUAL_HEBREW_NAME; - + // Still no good, back to final letter distance, maybe it'll save the day. - if (finalsub < 0) + if (finalsub < 0) return VISUAL_HEBREW_NAME; // (finalsub > 0 - Logical) or (don't know what to do) default to Logical. @@ -280,10 +280,10 @@ namespace UniversalDetector.Core beforePrev = 0x20; } - public override ProbingState GetState() + public override ProbingState GetState() { // Remain active as long as any of the model probers are active. - if (logicalProber.GetState() == ProbingState.NotMe && + if (logicalProber.GetState() == ProbingState.NotMe && visualProber.GetState() == ProbingState.NotMe) return ProbingState.NotMe; return ProbingState.Detecting; @@ -293,31 +293,31 @@ namespace UniversalDetector.Core { //Console.WriteLine(" HEB: {0} - {1} [Logical-Visual score]", finalCharLogicalScore, finalCharVisualScore); } - + public override float GetConfidence() - { + { return 0.0f; } - + protected static bool IsFinal(byte b) { - return (b == FINAL_KAF || b == FINAL_MEM || b == FINAL_NUN - || b == FINAL_PE || b == FINAL_TSADI); + return (b == FINAL_KAF || b == FINAL_MEM || b == FINAL_NUN + || b == FINAL_PE || b == FINAL_TSADI); } - + protected static bool IsNonFinal(byte b) { - // The normal Tsadi is not a good Non-Final letter due to words like - // 'lechotet' (to chat) containing an apostrophe after the tsadi. This - // apostrophe is converted to a space in FilterWithoutEnglishLetters causing - // the Non-Final tsadi to appear at an end of a word even though this is not + // The normal Tsadi is not a good Non-Final letter due to words like + // 'lechotet' (to chat) containing an apostrophe after the tsadi. This + // apostrophe is converted to a space in FilterWithoutEnglishLetters causing + // the Non-Final tsadi to appear at an end of a word even though this is not // the case in the original text. - // The letters Pe and Kaf rarely display a related behavior of not being a - // good Non-Final letter. Words like 'Pop', 'Winamp' and 'Mubarak' for - // example legally end with a Non-Final Pe or Kaf. However, the benefit of - // these letters as Non-Final letters outweighs the damage since these words - // are quite rare. - return (b == NORMAL_KAF || b == NORMAL_MEM || b == NORMAL_NUN + // The letters Pe and Kaf rarely display a related behavior of not being a + // good Non-Final letter. Words like 'Pop', 'Winamp' and 'Mubarak' for + // example legally end with a Non-Final Pe or Kaf. However, the benefit of + // these letters as Non-Final letters outweighs the damage since these words + // are quite rare. + return (b == NORMAL_KAF || b == NORMAL_MEM || b == NORMAL_NUN || b == NORMAL_PE); } } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/JapaneseContextAnalyser.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/JapaneseContextAnalyser.cs index 93b9d7580..7d28224c5 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/JapaneseContextAnalyser.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/JapaneseContextAnalyser.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -48,7 +48,7 @@ namespace UniversalDetector.Core // hiragana frequency category table // This is hiragana 2-char sequence table, the number in each cell represents its frequency category - protected static byte[,] jp2CharContext = { + protected static byte[,] jp2CharContext = { { 0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,}, { 2,4,0,4,0,3,0,4,0,3,4,4,4,2,4,3,3,4,3,2,3,3,4,2,3,3,3,2,4,1,4,3,3,1,5,4,3,4,3,4,3,5,3,0,3,5,4,2,0,3,1,0,3,3,0,3,3,0,1,1,0,4,3,0,3,3,0,4,0,2,0,3,5,5,5,5,4,0,4,1,0,3,4,}, { 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,}, @@ -133,35 +133,35 @@ namespace UniversalDetector.Core { 0,4,0,4,0,4,0,3,0,4,4,3,4,2,4,3,2,0,4,4,4,3,5,3,5,3,3,2,4,2,4,3,4,3,1,4,0,2,3,4,4,4,3,3,3,4,4,4,3,4,1,3,4,3,2,1,2,1,3,3,3,4,4,3,3,5,0,4,0,3,0,4,3,3,3,2,1,0,3,0,0,3,3,}, { 0,4,0,3,0,3,0,3,0,3,5,5,3,3,3,3,4,3,4,3,3,3,4,4,4,3,3,3,3,4,3,5,3,3,1,3,2,4,5,5,5,5,4,3,4,5,5,3,2,2,3,3,3,3,2,3,3,1,2,3,2,4,3,3,3,4,0,4,0,2,0,4,3,2,2,1,2,0,3,0,0,4,1,}, }; - + // category counters, each integer counts sequence in its category int[] relSample = new int[CATEGORIES_NUM]; // total sequence received int totalRel; - + // The order of previous char int lastCharOrder; - // if last byte in current buffer is not the last byte of a character, + // if last byte in current buffer is not the last byte of a character, // we need to know how many byte to skip in next buffer. int needToSkipCharNum; - // If this flag is set to true, detection is done and conclusion has + // If this flag is set to true, detection is done and conclusion has // been made bool done; - + public JapaneseContextAnalyser() { - Reset(); + Reset(); } - + public float GetConfidence() { // This is just one way to calculate confidence. It works well for me. if (totalRel > MINIMUM_DATA_THRESHOLD) return ((float)(totalRel - relSample[0]))/totalRel; - else + else return DONT_KNOW; } @@ -170,15 +170,15 @@ namespace UniversalDetector.Core int charLen = 0; int max = offset + len; - + if (done) return; - // The buffer we got is byte oriented, and a character may span + // The buffer we got is byte oriented, and a character may span // more than one buffer. In case the last one or two byte in last - // buffer is not complete, we record how many byte needed to + // buffer is not complete, we record how many byte needed to // complete that character and skip these bytes here. We can choose - // to record those bytes as well and analyse the character once it + // to record those bytes as well and analyse the character once it // is complete, but since a character will not make much difference, // skipping it will simplify our logic and improve performance. for (int i = needToSkipCharNum+offset; i < max; ) { @@ -200,14 +200,14 @@ namespace UniversalDetector.Core } } } - + public void HandleOneChar(byte[] buf, int offset, int charLen) { - if (totalRel > MAX_REL_THRESHOLD) + if (totalRel > MAX_REL_THRESHOLD) done = true; - if (done) + if (done) return; - + // Only 2-bytes characters are of our interest int order = (charLen == 2) ? GetOrder(buf, offset) : -1; if (order != -1 && lastCharOrder != -1) { @@ -217,7 +217,7 @@ namespace UniversalDetector.Core } lastCharOrder = order; } - + public void Reset() { totalRel = 0; @@ -228,18 +228,18 @@ namespace UniversalDetector.Core done = false; } } - + protected abstract int GetOrder(byte[] buf, int offset, out int charLen); - + protected abstract int GetOrder(byte[] buf, int offset); - - public bool GotEnoughData() + + public bool GotEnoughData() { return totalRel > ENOUGH_REL_THRESHOLD; } - + } - + public class SJISContextAnalyser : JapaneseContextAnalyser { private const byte HIRAGANA_FIRST_BYTE = 0x82; @@ -247,10 +247,10 @@ namespace UniversalDetector.Core protected override int GetOrder(byte[] buf, int offset, out int charLen) { //find out current char's byte length - if (buf[offset] >= 0x81 && buf[offset] <= 0x9F + if (buf[offset] >= 0x81 && buf[offset] <= 0x9F || buf[offset] >= 0xe0 && buf[offset] <= 0xFC) charLen = 2; - else + else charLen = 1; // return its order if it is hiragana @@ -259,7 +259,7 @@ namespace UniversalDetector.Core if (low >= 0x9F && low <= 0xF1) return low - 0x9F; } - return -1; + return -1; } protected override int GetOrder(byte[] buf, int offset) @@ -274,15 +274,15 @@ namespace UniversalDetector.Core } } - + public class EUCJPContextAnalyser : JapaneseContextAnalyser { private const byte HIRAGANA_FIRST_BYTE = 0xA4; - + protected override int GetOrder(byte[] buf, int offset, out int charLen) { byte high = buf[offset]; - + //find out current char's byte length if (high == 0x8E || high >= 0xA1 && high <= 0xFE) charLen = 2; @@ -297,9 +297,9 @@ namespace UniversalDetector.Core if (low >= 0xA1 && low <= 0xF3) return low - 0xA1; } - return -1; + return -1; } - + protected override int GetOrder(byte[] buf, int offset) { // We are only interested in Hiragana @@ -309,7 +309,7 @@ namespace UniversalDetector.Core return low - 0xA1; } return -1; - } + } } } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangBulgarianModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangBulgarianModel.cs index 4b6729ed3..5b18480d2 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangBulgarianModel.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangBulgarianModel.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -37,15 +37,15 @@ * ***** END LICENSE BLOCK ***** */ namespace UniversalDetector.Core -{ +{ public abstract class BulgarianModel : SequenceModel { - //Model Table: + //Model Table: //total sequences: 100% //first 512 sequences: 96.9392% //first 1024 sequences:3.0618% //rest sequences: 0.2992% - //negative sequences: 0.0020% + //negative sequences: 0.0020% private static byte[] BULGARIAN_LANG_MODEL = { 0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,3,3,3,3,3, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,3,3,2,2,3,2,2,1,2,2, @@ -175,15 +175,15 @@ namespace UniversalDetector.Core 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,1,1,1,1,0,1,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, - + }; - public BulgarianModel(byte[] charToOrderMap, string name) + public BulgarianModel(byte[] charToOrderMap, string name) : base(charToOrderMap, BULGARIAN_LANG_MODEL, 0.969392f, false, name) { - } + } } - + public class Latin5BulgarianModel : BulgarianModel { //255: Control characters that usually does not exist in any text @@ -191,7 +191,7 @@ namespace UniversalDetector.Core //253: symbol (punctuation) that does not belong to word //252: 0 - 9 // Character Mapping Table: - // this table is modified base on win1251BulgarianCharToOrderMap, so + // this table is modified base on win1251BulgarianCharToOrderMap, so // only number <64 is sure valid private static byte[] LATIN5_CHAR_TO_ORDER_MAP = { 255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, //00 @@ -209,14 +209,14 @@ namespace UniversalDetector.Core 39, 28, 34, 51, 48, 49, 53, 50, 54, 57, 61,239, 67,240, 60, 56, //c0 1, 18, 9, 20, 11, 3, 23, 15, 2, 26, 12, 10, 14, 6, 4, 13, //d0 7, 8, 5, 19, 29, 25, 22, 21, 27, 24, 17, 75, 52,241, 42, 16, //e0 - 62,242,243,244, 58,245, 98,246,247,248,249,250,251, 91,252,253, //f0 + 62,242,243,244, 58,245, 98,246,247,248,249,250,251, 91,252,253, //f0 }; - + public Latin5BulgarianModel() : base(LATIN5_CHAR_TO_ORDER_MAP, "ISO-8859-5") { } } - + public class Win1251BulgarianModel : BulgarianModel { private static byte[] WIN1251__CHAR_TO_ORDER_MAP = { @@ -236,8 +236,8 @@ namespace UniversalDetector.Core 39, 28, 34, 51, 48, 49, 53, 50, 54, 57, 61,251, 67,252, 60, 56, //d0 1, 18, 9, 20, 11, 3, 23, 15, 2, 26, 12, 10, 14, 6, 4, 13, //e0 7, 8, 5, 19, 29, 25, 22, 21, 27, 24, 17, 75, 52,253, 42, 16, //f0 - }; - + }; + public Win1251BulgarianModel() : base(WIN1251__CHAR_TO_ORDER_MAP, "windows-1251") { } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangCyrillicModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangCyrillicModel.cs index 5e55a4839..1210b6d5d 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangCyrillicModel.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangCyrillicModel.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -40,12 +40,12 @@ namespace UniversalDetector.Core { public abstract class CyrillicModel : SequenceModel { - // Model Table: + // Model Table: // total sequences: 100% // first 512 sequences: 97.6601% // first 1024 sequences: 2.3389% // rest sequences: 0.1237% - // negative sequences: 0.0009% + // negative sequences: 0.0009% protected readonly static byte[] RUSSIAN_LANG_MODEL = { 0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,1,3,3,3,2,3,2,3,3, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,3,2,2,2,2,2,0,0,2, @@ -176,13 +176,13 @@ namespace UniversalDetector.Core 0,1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0, }; - - public CyrillicModel(byte[] charToOrderMap, string name) + + public CyrillicModel(byte[] charToOrderMap, string name) : base(charToOrderMap, RUSSIAN_LANG_MODEL, 0.976601f, false, name) { } } - + public class Koi8rModel : CyrillicModel { private readonly static byte[] KOI8R_CHAR_TO_ORDER_MAP = { @@ -203,12 +203,12 @@ namespace UniversalDetector.Core 59, 37, 44, 58, 41, 48, 53, 46, 55, 42, 60, 36, 49, 38, 31, 34, //e0 35, 43, 45, 32, 40, 52, 56, 33, 61, 62, 51, 57, 47, 63, 50, 70, //f0 }; - + public Koi8rModel() : base(KOI8R_CHAR_TO_ORDER_MAP, "KOI8-R") { } } - + public class Win1251Model : CyrillicModel { private readonly static byte[] WIN1251_CHAR_TO_ORDER_MAP = { @@ -229,12 +229,12 @@ namespace UniversalDetector.Core 3, 21, 10, 19, 13, 2, 24, 20, 4, 23, 11, 8, 12, 5, 1, 15, 9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16, }; - + public Win1251Model() : base(WIN1251_CHAR_TO_ORDER_MAP, "windows-1251") { } } - + public class Latin5Model : CyrillicModel { private readonly static byte[] LATIN5_CHAR_TO_ORDER_MAP = { @@ -254,13 +254,13 @@ namespace UniversalDetector.Core 3, 21, 10, 19, 13, 2, 24, 20, 4, 23, 11, 8, 12, 5, 1, 15, 9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16, 239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255, - }; - + }; + public Latin5Model() : base(LATIN5_CHAR_TO_ORDER_MAP, "ISO-8859-5") { } } - + public class MacCyrillicModel : CyrillicModel { private readonly static byte[] MACCYRILLIC_CHAR_TO_ORDER_MAP = { @@ -281,7 +281,7 @@ namespace UniversalDetector.Core 3, 21, 10, 19, 13, 2, 24, 20, 4, 23, 11, 8, 12, 5, 1, 15, 9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27,255, }; - + public MacCyrillicModel() : base(MACCYRILLIC_CHAR_TO_ORDER_MAP, "x-mac-cyrillic") { @@ -308,7 +308,7 @@ namespace UniversalDetector.Core 43, 9, 45, 7, 32, 6, 40, 14, 52, 24, 56, 10, 33, 17, 61,249, 250, 18, 62, 20, 51, 25, 57, 30, 47, 29, 63, 22, 50,251,252,255, }; - + public Ibm855Model() : base(IBM855_BYTE_TO_ORDER_MAP, "IBM855") { } @@ -334,12 +334,12 @@ namespace UniversalDetector.Core 9, 7, 6, 14, 39, 26, 28, 22, 25, 29, 54, 18, 17, 30, 27, 16, 239, 68,240,241,242,243,244,245,246,247,248,249,250,251,252,255, }; - + public Ibm866Model() : base(IBM866_CHAR_TO_ORDER_MAP, "IBM866") { } } - - + + } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangGreekModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangGreekModel.cs index 563ba52c2..2fe1e97c0 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangGreekModel.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangGreekModel.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -37,15 +37,15 @@ * ***** END LICENSE BLOCK ***** */ namespace UniversalDetector.Core -{ +{ public abstract class GreekModel : SequenceModel { - // Model Table: + // Model Table: // total sequences: 100% // first 512 sequences: 98.2851% // first 1024 sequences:1.7001% // rest sequences: 0.0359% - // negative sequences: 0.0148% + // negative sequences: 0.0148% private readonly static byte[] GREEK_LANG_MODEL = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -177,12 +177,12 @@ namespace UniversalDetector.Core 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; - public GreekModel(byte[] charToOrderMap, string name) + public GreekModel(byte[] charToOrderMap, string name) : base(charToOrderMap, GREEK_LANG_MODEL, 0.982851f, false, name) { - } + } } - + public class Latin7Model : GreekModel { /**************************************************************** @@ -210,12 +210,12 @@ namespace UniversalDetector.Core 124, 1, 29, 20, 21, 3, 32, 13, 25, 5, 11, 16, 10, 6, 30, 4, //e0 9, 8, 14, 7, 2, 12, 28, 23, 42, 24, 64, 75, 19, 26, 27,253, //f0 }; - + public Latin7Model() : base(LATIN7_CHAR_TO_ORDER_MAP, "ISO-8859-7") { } } - + public class Win1253Model : GreekModel { private readonly static byte[] WIN1253__CHAR_TO_ORDER_MAP = { @@ -235,8 +235,8 @@ namespace UniversalDetector.Core 35, 48,250, 37, 33, 45, 56, 50, 84, 57,120,121, 17, 18, 22, 15, //d0 124, 1, 29, 20, 21, 3, 32, 13, 25, 5, 11, 16, 10, 6, 30, 4, //e0 9, 8, 14, 7, 2, 12, 28, 23, 42, 24, 64, 75, 19, 26, 27,253, //f0 - }; - + }; + public Win1253Model() : base(WIN1253__CHAR_TO_ORDER_MAP, "windows-1253") { } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHebrewModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHebrewModel.cs index 030fcc598..180ab8a63 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHebrewModel.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHebrewModel.cs @@ -37,15 +37,15 @@ * ***** END LICENSE BLOCK ***** */ namespace UniversalDetector.Core -{ +{ public abstract class HebrewModel : SequenceModel { - //Model Table: + //Model Table: //total sequences: 100% //first 512 sequences: 98.4004% //first 1024 sequences: 1.5981% //rest sequences: 0.087% - //negative sequences: 0.0015% + //negative sequences: 0.0015% private readonly static byte[] HEBREW_LANG_MODEL = { 0,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,2,3,2,1,2,0,1,0,0, 3,0,3,1,0,0,1,3,2,0,1,1,2,0,2,2,2,1,1,1,1,2,1,1,1,2,0,0,2,2,0,1, @@ -177,12 +177,12 @@ namespace UniversalDetector.Core 0,0,0,0,0,0,0,0,0,0,1,2,1,0,0,0,0,0,1,1,1,1,1,0,1,0,0,0,1,1,0,0, }; - public HebrewModel(byte[] charToOrderMap, string name) + public HebrewModel(byte[] charToOrderMap, string name) : base(charToOrderMap, HEBREW_LANG_MODEL, 0.984004f, false, name) { - } + } } - + public class Win1255Model : HebrewModel { /* @@ -192,7 +192,7 @@ namespace UniversalDetector.Core 252: 0 - 9 */ //Windows-1255 language model - //Character Mapping Table: + //Character Mapping Table: private readonly static byte[] WIN1255_CHAR_TO_ORDER_MAP = { 255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, //00 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, //10 @@ -211,7 +211,7 @@ namespace UniversalDetector.Core 9, 8, 20, 16, 3, 2, 24, 14, 22, 1, 25, 15, 4, 11, 6, 23, 12, 19, 13, 26, 18, 27, 21, 17, 7, 10, 5,251,252,128, 96,253, }; - + public Win1255Model() : base(WIN1255_CHAR_TO_ORDER_MAP, "windows-1255") { } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHungarianModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHungarianModel.cs index d7eee2251..d95ec4c8e 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHungarianModel.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangHungarianModel.cs @@ -36,15 +36,15 @@ * ***** END LICENSE BLOCK ***** */ namespace UniversalDetector.Core -{ +{ public abstract class HungarianModel : SequenceModel { - //Model Table: + //Model Table: //total sequences: 100% //first 512 sequences: 94.7368% //first 1024 sequences:5.2623% //rest sequences: 0.8894% - //negative sequences: 0.0009% + //negative sequences: 0.0009% private readonly static byte[] HUNGARIAN_LANG_MODEL = { 0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,2,2,3,3,1,1,2,2,2,2,2,1,2, @@ -176,13 +176,13 @@ namespace UniversalDetector.Core 0,1,1,1,1,1,1,0,1,1,0,1,0,1,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0, }; - public HungarianModel(byte[] charToOrderMap, string name) - : base(charToOrderMap, HUNGARIAN_LANG_MODEL, 0.947368f, + public HungarianModel(byte[] charToOrderMap, string name) + : base(charToOrderMap, HUNGARIAN_LANG_MODEL, 0.947368f, false, name) { - } + } } - + public class Latin2HungarianModel : HungarianModel { private readonly static byte[] LATIN2_CHAR_TO_ORDER_MAP = { @@ -203,12 +203,12 @@ namespace UniversalDetector.Core 82, 14, 74,242, 70, 80,243, 72,244, 15, 83, 77, 84, 30, 76, 85, 245,246,247, 25, 73, 42, 24,248,249,250, 31, 56, 29,251,252,253, }; - + public Latin2HungarianModel() : base(LATIN2_CHAR_TO_ORDER_MAP, "ISO-8859-2") { } } - + public class Win1250HungarianModel : HungarianModel { private readonly static byte[] WIN1250_CHAR_TO_ORDER_MAP = { @@ -229,7 +229,7 @@ namespace UniversalDetector.Core 84, 14, 75,242, 71, 82,243, 73,244, 15, 85, 79, 86, 30, 77, 87, 245,246,247, 25, 74, 42, 24,248,249,250, 31, 56, 29,251,252,253, }; - + public Win1250HungarianModel() : base(WIN1250_CHAR_TO_ORDER_MAP, "windows-1250") { } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangThaiModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangThaiModel.cs index bdda20f14..b5dae7a34 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangThaiModel.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/LangThaiModel.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -37,7 +37,7 @@ * ***** END LICENSE BLOCK ***** */ namespace UniversalDetector.Core -{ +{ public class ThaiModel : SequenceModel { /**************************************************************** @@ -46,7 +46,7 @@ namespace UniversalDetector.Core 253: symbol (punctuation) that does not belong to word 252: 0 - 9 *****************************************************************/ - // The following result for thai was collected from a limited sample (1M) + // The following result for thai was collected from a limited sample (1M) private readonly static byte[] TIS620_CHAR_TO_ORDER_MAP = { 255,255,255,255,255,255,255,255,255,255,254,255,255,254,255,255, //00 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, //10 @@ -66,12 +66,12 @@ namespace UniversalDetector.Core 68, 56, 59, 65, 69, 60, 70, 80, 71, 87,248,249,250,251,252,253, }; - //Model Table: + //Model Table: //total sequences: 100% //first 512 sequences: 92.6386% //first 1024 sequences:7.3177% //rest sequences: 1.0230% - //negative sequences: 0.0436% + //negative sequences: 0.0436% private readonly static byte[] THAI_LANG_MODEL = { 0,1,3,3,3,3,0,0,3,3,0,3,3,0,3,3,3,3,3,3,3,3,0,0,3,3,3,0,3,3,3,3, 0,3,3,0,0,0,1,3,0,3,3,2,3,3,0,1,2,3,3,3,3,0,2,0,2,0,0,3,2,1,2,2, @@ -203,11 +203,11 @@ namespace UniversalDetector.Core 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; - public ThaiModel(byte[] charToOrderMap, string name) - : base(TIS620_CHAR_TO_ORDER_MAP, THAI_LANG_MODEL, + public ThaiModel(byte[] charToOrderMap, string name) + : base(TIS620_CHAR_TO_ORDER_MAP, THAI_LANG_MODEL, 0.926386f, false, "TIS-620") { - } + } } } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Latin1Prober.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Latin1Prober.cs index c79a10aa7..5d57e30e1 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Latin1Prober.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/Latin1Prober.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -40,7 +40,7 @@ using System; namespace UniversalDetector.Core { - // TODO: Using trigrams the detector should be able to discriminate between + // TODO: Using trigrams the detector should be able to discriminate between // latin-1 and iso8859-2 public class Latin1Prober : CharsetProber { @@ -54,9 +54,9 @@ namespace UniversalDetector.Core private const int ACO = 5; // accent capital other private const int ASV = 6; // accent small vowel private const int ASO = 7; // accent small other - + private const int CLASS_NUM = 8; // total classes - + private readonly static byte[] Latin1_CharToClass = { OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, // 00 - 07 OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, // 08 - 0F @@ -92,36 +92,36 @@ namespace UniversalDetector.Core ASV, ASV, ASV, ASV, ASV, ASO, ASO, ASO, // F8 - FF }; - /* 0 : illegal - 1 : very unlikely - 2 : normal + /* 0 : illegal + 1 : very unlikely + 2 : normal 3 : very likely */ private readonly static byte[] Latin1ClassModel = { /* UDF OTH ASC ASS ACV ACO ASV ASO */ /*UDF*/ 0, 0, 0, 0, 0, 0, 0, 0, /*OTH*/ 0, 3, 3, 3, 3, 3, 3, 3, - /*ASC*/ 0, 3, 3, 3, 3, 3, 3, 3, + /*ASC*/ 0, 3, 3, 3, 3, 3, 3, 3, /*ASS*/ 0, 3, 3, 3, 1, 1, 3, 3, /*ACV*/ 0, 3, 3, 3, 1, 2, 1, 2, - /*ACO*/ 0, 3, 3, 3, 3, 3, 3, 3, - /*ASV*/ 0, 3, 1, 3, 1, 1, 1, 3, + /*ACO*/ 0, 3, 3, 3, 3, 3, 3, 3, + /*ASV*/ 0, 3, 1, 3, 1, 1, 1, 3, /*ASO*/ 0, 3, 1, 3, 1, 1, 3, 3, }; private byte lastCharClass; private int[] freqCounter = new int[FREQ_CAT_NUM]; - + public Latin1Prober() { Reset(); } - public override string GetCharsetName() + public override string GetCharsetName() { return "windows-1252"; } - + public override void Reset() { state = ProbingState.Detecting; @@ -129,12 +129,12 @@ namespace UniversalDetector.Core for (int i = 0; i < FREQ_CAT_NUM; i++) freqCounter[i] = 0; } - + public override ProbingState HandleData(byte[] buf, int offset, int len) { byte[] newbuf = FilterWithEnglishLetters(buf, offset, len); byte charClass, freq; - + for (int i = 0; i < newbuf.Length; i++) { charClass = Latin1_CharToClass[newbuf[i]]; freq = Latin1ClassModel[lastCharClass * CLASS_NUM + charClass]; @@ -152,21 +152,21 @@ namespace UniversalDetector.Core { if (state == ProbingState.NotMe) return 0.01f; - + float confidence = 0.0f; int total = 0; for (int i = 0; i < FREQ_CAT_NUM; i++) { total += freqCounter[i]; } - + if (total <= 0) { confidence = 0.0f; } else { confidence = freqCounter[3] * 1.0f / total; confidence -= freqCounter[1] * 20.0f / total; } - - // lower the confidence of latin1 so that other more accurate detector + + // lower the confidence of latin1 so that other more accurate detector // can take priority. return confidence < 0.0f ? 0.0f : confidence * 0.5f; } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSGroupProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSGroupProber.cs index abf49aacd..b4f6928a4 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSGroupProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSGroupProber.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -46,13 +46,13 @@ namespace UniversalDetector.Core public class MBCSGroupProber : CharsetProber { private const int PROBERS_NUM = 7; - private readonly static string[] ProberName = + private readonly static string[] ProberName = { "UTF8", "SJIS", "EUCJP", "GB18030", "EUCKR", "Big5", "EUCTW" }; private CharsetProber[] probers = new CharsetProber[PROBERS_NUM]; private bool[] isActive = new bool[PROBERS_NUM]; private int bestGuess; private int activeNum; - + public MBCSGroupProber() { probers[0] = new UTF8Prober(); @@ -62,7 +62,7 @@ namespace UniversalDetector.Core probers[4] = new EUCKRProber(); probers[5] = new Big5Prober(); probers[6] = new EUCTWProber(); - Reset(); + Reset(); } public override string GetCharsetName() @@ -99,7 +99,7 @@ namespace UniversalDetector.Core //assume previous is not ascii, it will do no harm except add some noise bool keepNext = true; int max = offset + len; - + for (int i = offset; i < max; i++) { if ((buf[i] & 0x80) != 0) { highbyteBuf[hptr++] = buf[i]; @@ -112,9 +112,9 @@ namespace UniversalDetector.Core } } } - + ProbingState st = ProbingState.NotMe; - + for (int i = 0; i < probers.Length; i++) { if (!isActive[i]) continue; @@ -139,7 +139,7 @@ namespace UniversalDetector.Core { float bestConf = 0.0f; float cf = 0.0f; - + if (state == ProbingState.FoundIt) { return 0.99f; } else if (state == ProbingState.NotMe) { diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSSM.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSSM.cs index 7aa8581bc..65e04292a 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSSM.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSSM.cs @@ -42,79 +42,79 @@ namespace UniversalDetector.Core { private readonly static int[] UTF8_cls = { BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07 - BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17 - BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 40 - 47 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 48 - 4f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 50 - 57 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 58 - 5f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 60 - 67 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 68 - 6f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 70 - 77 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 78 - 7f - BitPackage.Pack4bits(2,2,2,2,3,3,3,3), // 80 - 87 - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 88 - 8f - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 90 - 97 - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 98 - 9f - BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // a0 - a7 - BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // a8 - af - BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // b0 - b7 - BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // b8 - bf - BitPackage.Pack4bits(0,0,6,6,6,6,6,6), // c0 - c7 - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // c8 - cf - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d0 - d7 - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d8 - df - BitPackage.Pack4bits(7,8,8,8,8,8,8,8), // e0 - e7 - BitPackage.Pack4bits(8,8,8,8,8,9,8,8), // e8 - ef - BitPackage.Pack4bits(10,11,11,11,11,11,11,11), // f0 - f7 - BitPackage.Pack4bits(12,13,13,13,14,15,0,0) // f8 - ff + BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17 + BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 40 - 47 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 48 - 4f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 50 - 57 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 58 - 5f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 60 - 67 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 68 - 6f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 70 - 77 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 78 - 7f + BitPackage.Pack4bits(2,2,2,2,3,3,3,3), // 80 - 87 + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 88 - 8f + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 90 - 97 + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 98 - 9f + BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // a0 - a7 + BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // a8 - af + BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // b0 - b7 + BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // b8 - bf + BitPackage.Pack4bits(0,0,6,6,6,6,6,6), // c0 - c7 + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // c8 - cf + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d0 - d7 + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d8 - df + BitPackage.Pack4bits(7,8,8,8,8,8,8,8), // e0 - e7 + BitPackage.Pack4bits(8,8,8,8,8,9,8,8), // e8 - ef + BitPackage.Pack4bits(10,11,11,11,11,11,11,11), // f0 - f7 + BitPackage.Pack4bits(12,13,13,13,14,15,0,0) // f8 - ff }; private readonly static int[] UTF8_st = { - BitPackage.Pack4bits(ERROR,START,ERROR,ERROR,ERROR,ERROR, 12, 10),//00-07 - BitPackage.Pack4bits( 9, 11, 8, 7, 6, 5, 4, 3),//08-0f - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//10-17 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//18-1f - BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME),//20-27 - BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME),//28-2f - BitPackage.Pack4bits(ERROR,ERROR, 5, 5, 5, 5,ERROR,ERROR),//30-37 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//38-3f - BitPackage.Pack4bits(ERROR,ERROR,ERROR, 5, 5, 5,ERROR,ERROR),//40-47 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//48-4f - BitPackage.Pack4bits(ERROR,ERROR, 7, 7, 7, 7,ERROR,ERROR),//50-57 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//58-5f - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR, 7, 7,ERROR,ERROR),//60-67 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//68-6f - BitPackage.Pack4bits(ERROR,ERROR, 9, 9, 9, 9,ERROR,ERROR),//70-77 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//78-7f - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR, 9,ERROR,ERROR),//80-87 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//88-8f - BitPackage.Pack4bits(ERROR,ERROR, 12, 12, 12, 12,ERROR,ERROR),//90-97 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//98-9f - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR, 12,ERROR,ERROR),//a0-a7 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//a8-af - BitPackage.Pack4bits(ERROR,ERROR, 12, 12, 12,ERROR,ERROR,ERROR),//b0-b7 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//b8-bf - BitPackage.Pack4bits(ERROR,ERROR,START,START,START,START,ERROR,ERROR),//c0-c7 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR) //c8-cf + BitPackage.Pack4bits(ERROR,START,ERROR,ERROR,ERROR,ERROR, 12, 10),//00-07 + BitPackage.Pack4bits( 9, 11, 8, 7, 6, 5, 4, 3),//08-0f + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//10-17 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//18-1f + BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME),//20-27 + BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME,ITSME),//28-2f + BitPackage.Pack4bits(ERROR,ERROR, 5, 5, 5, 5,ERROR,ERROR),//30-37 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//38-3f + BitPackage.Pack4bits(ERROR,ERROR,ERROR, 5, 5, 5,ERROR,ERROR),//40-47 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//48-4f + BitPackage.Pack4bits(ERROR,ERROR, 7, 7, 7, 7,ERROR,ERROR),//50-57 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//58-5f + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR, 7, 7,ERROR,ERROR),//60-67 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//68-6f + BitPackage.Pack4bits(ERROR,ERROR, 9, 9, 9, 9,ERROR,ERROR),//70-77 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//78-7f + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR, 9,ERROR,ERROR),//80-87 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//88-8f + BitPackage.Pack4bits(ERROR,ERROR, 12, 12, 12, 12,ERROR,ERROR),//90-97 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//98-9f + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR, 12,ERROR,ERROR),//a0-a7 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//a8-af + BitPackage.Pack4bits(ERROR,ERROR, 12, 12, 12,ERROR,ERROR,ERROR),//b0-b7 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR),//b8-bf + BitPackage.Pack4bits(ERROR,ERROR,START,START,START,START,ERROR,ERROR),//c0-c7 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR) //c8-cf }; - private readonly static int[] UTF8CharLenTable = + private readonly static int[] UTF8CharLenTable = {0, 1, 0, 0, 0, 0, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6 }; - + public UTF8SMModel() : base( - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, UTF8_cls), 16, - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, UTF8_st), UTF8CharLenTable, "UTF-8") @@ -122,68 +122,68 @@ namespace UniversalDetector.Core } } - + public class GB18030SMModel : SMModel { private readonly static int[] GB18030_cls = { - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07 - BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17 - BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 30 - 37 - BitPackage.Pack4bits(3,3,1,1,1,1,1,1), // 38 - 3f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77 - BitPackage.Pack4bits(2,2,2,2,2,2,2,4), // 78 - 7f - BitPackage.Pack4bits(5,6,6,6,6,6,6,6), // 80 - 87 - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // 88 - 8f - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // 90 - 97 - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // 98 - 9f - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // a0 - a7 - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // a8 - af - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // b0 - b7 - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // b8 - bf - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // c0 - c7 - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // c8 - cf - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d0 - d7 - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d8 - df - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // e0 - e7 - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // e8 - ef - BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // f0 - f7 - BitPackage.Pack4bits(6,6,6,6,6,6,6,0) // f8 - ff + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07 + BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17 + BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 30 - 37 + BitPackage.Pack4bits(3,3,1,1,1,1,1,1), // 38 - 3f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77 + BitPackage.Pack4bits(2,2,2,2,2,2,2,4), // 78 - 7f + BitPackage.Pack4bits(5,6,6,6,6,6,6,6), // 80 - 87 + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // 88 - 8f + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // 90 - 97 + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // 98 - 9f + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // a0 - a7 + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // a8 - af + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // b0 - b7 + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // b8 - bf + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // c0 - c7 + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // c8 - cf + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d0 - d7 + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // d8 - df + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // e0 - e7 + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // e8 - ef + BitPackage.Pack4bits(6,6,6,6,6,6,6,6), // f0 - f7 + BitPackage.Pack4bits(6,6,6,6,6,6,6,0) // f8 - ff }; private readonly static int[] GB18030_st = { - BitPackage.Pack4bits(ERROR,START,START,START,START,START, 3,ERROR),//00-07 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ITSME,ITSME),//08-0f - BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ERROR,ERROR,START),//10-17 - BitPackage.Pack4bits( 4,ERROR,START,START,ERROR,ERROR,ERROR,ERROR),//18-1f - BitPackage.Pack4bits(ERROR,ERROR, 5,ERROR,ERROR,ERROR,ITSME,ERROR),//20-27 - BitPackage.Pack4bits(ERROR,ERROR,START,START,START,START,START,START) //28-2f + BitPackage.Pack4bits(ERROR,START,START,START,START,START, 3,ERROR),//00-07 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ITSME,ITSME),//08-0f + BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ERROR,ERROR,START),//10-17 + BitPackage.Pack4bits( 4,ERROR,START,START,ERROR,ERROR,ERROR,ERROR),//18-1f + BitPackage.Pack4bits(ERROR,ERROR, 5,ERROR,ERROR,ERROR,ITSME,ERROR),//20-27 + BitPackage.Pack4bits(ERROR,ERROR,START,START,START,START,START,START) //28-2f }; - // To be accurate, the length of class 6 can be either 2 or 4. - // But it is not necessary to discriminate between the two since - // it is used for frequency analysis only, and we are validating - // each code range there as well. So it is safe to set it to be - // 2 here. + // To be accurate, the length of class 6 can be either 2 or 4. + // But it is not necessary to discriminate between the two since + // it is used for frequency analysis only, and we are validating + // each code range there as well. So it is safe to set it to be + // 2 here. private readonly static int[] GB18030CharLenTable = {0, 1, 1, 1, 1, 1, 2}; - + public GB18030SMModel() : base( - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, GB18030_cls), 7, - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, GB18030_st), GB18030CharLenTable, "GB18030") @@ -191,60 +191,60 @@ namespace UniversalDetector.Core } } - + public class BIG5SMModel : SMModel { private readonly static int[] BIG5_cls = { BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07 - BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17 - BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77 - BitPackage.Pack4bits(2,2,2,2,2,2,2,1), // 78 - 7f - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 80 - 87 - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 88 - 8f - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 90 - 97 - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 98 - 9f - BitPackage.Pack4bits(4,3,3,3,3,3,3,3), // a0 - a7 - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // a8 - af - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // b0 - b7 - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // b8 - bf - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // c0 - c7 - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // c8 - cf - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d0 - d7 - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d8 - df - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e0 - e7 - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e8 - ef - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // f0 - f7 - BitPackage.Pack4bits(3,3,3,3,3,3,3,0) // f8 - ff + BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17 + BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77 + BitPackage.Pack4bits(2,2,2,2,2,2,2,1), // 78 - 7f + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 80 - 87 + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 88 - 8f + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 90 - 97 + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 98 - 9f + BitPackage.Pack4bits(4,3,3,3,3,3,3,3), // a0 - a7 + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // a8 - af + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // b0 - b7 + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // b8 - bf + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // c0 - c7 + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // c8 - cf + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d0 - d7 + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d8 - df + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e0 - e7 + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e8 - ef + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // f0 - f7 + BitPackage.Pack4bits(3,3,3,3,3,3,3,0) // f8 - ff }; private readonly static int[] BIG5_st = { - BitPackage.Pack4bits(ERROR,START,START, 3,ERROR,ERROR,ERROR,ERROR),//00-07 - BitPackage.Pack4bits(ERROR,ERROR,ITSME,ITSME,ITSME,ITSME,ITSME,ERROR),//08-0f - BitPackage.Pack4bits(ERROR,START,START,START,START,START,START,START) //10-17 + BitPackage.Pack4bits(ERROR,START,START, 3,ERROR,ERROR,ERROR,ERROR),//00-07 + BitPackage.Pack4bits(ERROR,ERROR,ITSME,ITSME,ITSME,ITSME,ITSME,ERROR),//08-0f + BitPackage.Pack4bits(ERROR,START,START,START,START,START,START,START) //10-17 }; private readonly static int[] BIG5CharLenTable = {0, 1, 1, 2, 0}; - + public BIG5SMModel() : base( - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, BIG5_cls), 5, - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, BIG5_st), BIG5CharLenTable, "Big5") @@ -252,63 +252,63 @@ namespace UniversalDetector.Core } } - + public class EUCJPSMModel : SMModel { private readonly static int[] EUCJP_cls = { - //BitPacket.Pack4bits(5,4,4,4,4,4,4,4), // 00 - 07 - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 00 - 07 - BitPackage.Pack4bits(4,4,4,4,4,4,5,5), // 08 - 0f - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 10 - 17 - BitPackage.Pack4bits(4,4,4,5,4,4,4,4), // 18 - 1f - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 20 - 27 - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 28 - 2f - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 30 - 37 - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 38 - 3f - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 40 - 47 - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 48 - 4f - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 50 - 57 - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 58 - 5f - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 60 - 67 - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 68 - 6f - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 70 - 77 - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 78 - 7f - BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // 80 - 87 - BitPackage.Pack4bits(5,5,5,5,5,5,1,3), // 88 - 8f - BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // 90 - 97 - BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // 98 - 9f - BitPackage.Pack4bits(5,2,2,2,2,2,2,2), // a0 - a7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e0 - e7 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e8 - ef - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // f0 - f7 - BitPackage.Pack4bits(0,0,0,0,0,0,0,5) // f8 - ff + //BitPacket.Pack4bits(5,4,4,4,4,4,4,4), // 00 - 07 + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 00 - 07 + BitPackage.Pack4bits(4,4,4,4,4,4,5,5), // 08 - 0f + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 10 - 17 + BitPackage.Pack4bits(4,4,4,5,4,4,4,4), // 18 - 1f + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 20 - 27 + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 28 - 2f + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 30 - 37 + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 38 - 3f + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 40 - 47 + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 48 - 4f + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 50 - 57 + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 58 - 5f + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 60 - 67 + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 68 - 6f + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 70 - 77 + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // 78 - 7f + BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // 80 - 87 + BitPackage.Pack4bits(5,5,5,5,5,5,1,3), // 88 - 8f + BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // 90 - 97 + BitPackage.Pack4bits(5,5,5,5,5,5,5,5), // 98 - 9f + BitPackage.Pack4bits(5,2,2,2,2,2,2,2), // a0 - a7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e0 - e7 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e8 - ef + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // f0 - f7 + BitPackage.Pack4bits(0,0,0,0,0,0,0,5) // f8 - ff }; private readonly static int[] EUCJP_st = { - BitPackage.Pack4bits( 3, 4, 3, 5,START,ERROR,ERROR,ERROR),//00-07 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f - BitPackage.Pack4bits(ITSME,ITSME,START,ERROR,START,ERROR,ERROR,ERROR),//10-17 - BitPackage.Pack4bits(ERROR,ERROR,START,ERROR,ERROR,ERROR, 3,ERROR),//18-1f - BitPackage.Pack4bits( 3,ERROR,ERROR,ERROR,START,START,START,START) //20-27 + BitPackage.Pack4bits( 3, 4, 3, 5,START,ERROR,ERROR,ERROR),//00-07 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f + BitPackage.Pack4bits(ITSME,ITSME,START,ERROR,START,ERROR,ERROR,ERROR),//10-17 + BitPackage.Pack4bits(ERROR,ERROR,START,ERROR,ERROR,ERROR, 3,ERROR),//18-1f + BitPackage.Pack4bits( 3,ERROR,ERROR,ERROR,START,START,START,START) //20-27 }; private readonly static int[] EUCJPCharLenTable = { 2, 2, 2, 3, 1, 0 }; - + public EUCJPSMModel() : base( - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, EUCJP_cls), 6, - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, EUCJP_st), EUCJPCharLenTable, "EUC-JP") @@ -316,60 +316,60 @@ namespace UniversalDetector.Core } } - + public class EUCKRSMModel : SMModel { private readonly static int[] EUCKR_cls = { - //BitPacket.Pack4bits(0,1,1,1,1,1,1,1), // 00 - 07 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07 - BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17 - BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 40 - 47 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 48 - 4f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 50 - 57 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 58 - 5f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 60 - 67 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 68 - 6f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 70 - 77 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 78 - 7f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 88 - 8f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f - BitPackage.Pack4bits(0,2,2,2,2,2,2,2), // a0 - a7 - BitPackage.Pack4bits(2,2,2,2,2,3,3,3), // a8 - af - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7 - BitPackage.Pack4bits(2,3,2,2,2,2,2,2), // c8 - cf - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,0) // f8 - ff + //BitPacket.Pack4bits(0,1,1,1,1,1,1,1), // 00 - 07 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07 + BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17 + BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 40 - 47 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 48 - 4f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 50 - 57 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 58 - 5f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 60 - 67 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 68 - 6f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 70 - 77 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 78 - 7f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 88 - 8f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f + BitPackage.Pack4bits(0,2,2,2,2,2,2,2), // a0 - a7 + BitPackage.Pack4bits(2,2,2,2,2,3,3,3), // a8 - af + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7 + BitPackage.Pack4bits(2,3,2,2,2,2,2,2), // c8 - cf + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e0 - e7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // e8 - ef + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // f0 - f7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,0) // f8 - ff }; private readonly static int[] EUCKR_st = { - BitPackage.Pack4bits(ERROR,START, 3,ERROR,ERROR,ERROR,ERROR,ERROR),//00-07 - BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ERROR,ERROR,START,START) //08-0f + BitPackage.Pack4bits(ERROR,START, 3,ERROR,ERROR,ERROR,ERROR,ERROR),//00-07 + BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ERROR,ERROR,START,START) //08-0f }; private readonly static int[] EUCKRCharLenTable = { 0, 1, 2, 0 }; - + public EUCKRSMModel() : base( - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, EUCKR_cls), 4, - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, EUCKR_st), EUCKRCharLenTable, "EUC-KR") @@ -377,127 +377,127 @@ namespace UniversalDetector.Core } } - + public class EUCTWSMModel : SMModel { private readonly static int[] EUCTW_cls = { - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 00 - 07 - BitPackage.Pack4bits(2,2,2,2,2,2,0,0), // 08 - 0f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 10 - 17 - BitPackage.Pack4bits(2,2,2,0,2,2,2,2), // 18 - 1f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 20 - 27 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 28 - 2f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 30 - 37 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 38 - 3f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 78 - 7f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87 - BitPackage.Pack4bits(0,0,0,0,0,0,6,0), // 88 - 8f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f - BitPackage.Pack4bits(0,3,4,4,4,4,4,4), // a0 - a7 - BitPackage.Pack4bits(5,5,1,1,1,1,1,1), // a8 - af - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b0 - b7 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b8 - bf - BitPackage.Pack4bits(1,1,3,1,3,3,3,3), // c0 - c7 - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // c8 - cf - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d0 - d7 - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d8 - df - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e0 - e7 - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e8 - ef - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // f0 - f7 - BitPackage.Pack4bits(3,3,3,3,3,3,3,0) // f8 - ff + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 00 - 07 + BitPackage.Pack4bits(2,2,2,2,2,2,0,0), // 08 - 0f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 10 - 17 + BitPackage.Pack4bits(2,2,2,0,2,2,2,2), // 18 - 1f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 20 - 27 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 28 - 2f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 30 - 37 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 38 - 3f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 78 - 7f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87 + BitPackage.Pack4bits(0,0,0,0,0,0,6,0), // 88 - 8f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f + BitPackage.Pack4bits(0,3,4,4,4,4,4,4), // a0 - a7 + BitPackage.Pack4bits(5,5,1,1,1,1,1,1), // a8 - af + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b0 - b7 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // b8 - bf + BitPackage.Pack4bits(1,1,3,1,3,3,3,3), // c0 - c7 + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // c8 - cf + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d0 - d7 + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // d8 - df + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e0 - e7 + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e8 - ef + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // f0 - f7 + BitPackage.Pack4bits(3,3,3,3,3,3,3,0) // f8 - ff }; private readonly static int[] EUCTW_st = { - BitPackage.Pack4bits(ERROR,ERROR,START, 3, 3, 3, 4,ERROR),//00-07 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ITSME,ITSME),//08-0f - BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ERROR,START,ERROR),//10-17 - BitPackage.Pack4bits(START,START,START,ERROR,ERROR,ERROR,ERROR,ERROR),//18-1f - BitPackage.Pack4bits( 5,ERROR,ERROR,ERROR,START,ERROR,START,START),//20-27 - BitPackage.Pack4bits(START,ERROR,START,START,START,START,START,START) //28-2f + BitPackage.Pack4bits(ERROR,ERROR,START, 3, 3, 3, 4,ERROR),//00-07 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ITSME,ITSME),//08-0f + BitPackage.Pack4bits(ITSME,ITSME,ITSME,ITSME,ITSME,ERROR,START,ERROR),//10-17 + BitPackage.Pack4bits(START,START,START,ERROR,ERROR,ERROR,ERROR,ERROR),//18-1f + BitPackage.Pack4bits( 5,ERROR,ERROR,ERROR,START,ERROR,START,START),//20-27 + BitPackage.Pack4bits(START,ERROR,START,START,START,START,START,START) //28-2f }; private readonly static int[] EUCTWCharLenTable = { 0, 0, 1, 2, 2, 2, 3 }; - + public EUCTWSMModel() : base( - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, EUCTW_cls), 7, - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, EUCTW_st), EUCTWCharLenTable, "EUC-TW") { } - } - + } + public class SJISSMModel : SMModel { private readonly static int[] SJIS_cls = { - //BitPacket.Pack4bits(0,1,1,1,1,1,1,1), // 00 - 07 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07 - BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17 - BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37 - BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77 - BitPackage.Pack4bits(2,2,2,2,2,2,2,1), // 78 - 7f - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 80 - 87 - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 88 - 8f - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 90 - 97 - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 98 - 9f - //0xa0 is illegal in sjis encoding, but some pages does + //BitPacket.Pack4bits(0,1,1,1,1,1,1,1), // 00 - 07 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 00 - 07 + BitPackage.Pack4bits(1,1,1,1,1,1,0,0), // 08 - 0f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 10 - 17 + BitPackage.Pack4bits(1,1,1,0,1,1,1,1), // 18 - 1f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 20 - 27 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 28 - 2f + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 30 - 37 + BitPackage.Pack4bits(1,1,1,1,1,1,1,1), // 38 - 3f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 40 - 47 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 48 - 4f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 50 - 57 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 58 - 5f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 60 - 67 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 68 - 6f + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // 70 - 77 + BitPackage.Pack4bits(2,2,2,2,2,2,2,1), // 78 - 7f + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 80 - 87 + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 88 - 8f + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 90 - 97 + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // 98 - 9f + //0xa0 is illegal in sjis encoding, but some pages does //contain such byte. We need to be more error forgiven. - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7 - BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df - BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e0 - e7 - BitPackage.Pack4bits(3,3,3,3,3,4,4,4), // e8 - ef - BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // f0 - f7 - BitPackage.Pack4bits(4,4,4,4,4,0,0,0) // f8 - ff + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a0 - a7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // a8 - af + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b0 - b7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // b8 - bf + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c0 - c7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // c8 - cf + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d0 - d7 + BitPackage.Pack4bits(2,2,2,2,2,2,2,2), // d8 - df + BitPackage.Pack4bits(3,3,3,3,3,3,3,3), // e0 - e7 + BitPackage.Pack4bits(3,3,3,3,3,4,4,4), // e8 - ef + BitPackage.Pack4bits(4,4,4,4,4,4,4,4), // f0 - f7 + BitPackage.Pack4bits(4,4,4,4,4,0,0,0) // f8 - ff }; private readonly static int[] SJIS_st = { - BitPackage.Pack4bits(ERROR,START,START, 3,ERROR,ERROR,ERROR,ERROR),//00-07 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f - BitPackage.Pack4bits(ITSME,ITSME,ERROR,ERROR,START,START,START,START) //10-17 + BitPackage.Pack4bits(ERROR,START,START, 3,ERROR,ERROR,ERROR,ERROR),//00-07 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f + BitPackage.Pack4bits(ITSME,ITSME,ERROR,ERROR,START,START,START,START) //10-17 }; private readonly static int[] SJISCharLenTable = { 0, 1, 1, 2, 0, 0 }; - + public SJISSMModel() : base( - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, SJIS_cls), 6, - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, SJIS_st), SJISCharLenTable, "Shift_JIS") @@ -505,64 +505,64 @@ namespace UniversalDetector.Core } } - + public class UCS2BESMModel : SMModel { private readonly static int[] UCS2BE_cls = { - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 00 - 07 - BitPackage.Pack4bits(0,0,1,0,0,2,0,0), // 08 - 0f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17 - BitPackage.Pack4bits(0,0,0,3,0,0,0,0), // 18 - 1f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27 - BitPackage.Pack4bits(0,3,3,3,3,3,0,0), // 28 - 2f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 40 - 47 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 88 - 8f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a0 - a7 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a8 - af - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b0 - b7 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b8 - bf - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c0 - c7 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c8 - cf - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d0 - d7 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d8 - df - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e0 - e7 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e8 - ef - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // f0 - f7 - BitPackage.Pack4bits(0,0,0,0,0,0,4,5) // f8 - ff + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 00 - 07 + BitPackage.Pack4bits(0,0,1,0,0,2,0,0), // 08 - 0f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17 + BitPackage.Pack4bits(0,0,0,3,0,0,0,0), // 18 - 1f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27 + BitPackage.Pack4bits(0,3,3,3,3,3,0,0), // 28 - 2f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 40 - 47 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 88 - 8f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a0 - a7 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a8 - af + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b0 - b7 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b8 - bf + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c0 - c7 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c8 - cf + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d0 - d7 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d8 - df + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e0 - e7 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e8 - ef + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // f0 - f7 + BitPackage.Pack4bits(0,0,0,0,0,0,4,5) // f8 - ff }; private readonly static int[] UCS2BE_st = { - BitPackage.Pack4bits( 5, 7, 7,ERROR, 4, 3,ERROR,ERROR),//00-07 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f - BitPackage.Pack4bits(ITSME,ITSME, 6, 6, 6, 6,ERROR,ERROR),//10-17 - BitPackage.Pack4bits( 6, 6, 6, 6, 6,ITSME, 6, 6),//18-1f - BitPackage.Pack4bits( 6, 6, 6, 6, 5, 7, 7,ERROR),//20-27 - BitPackage.Pack4bits( 5, 8, 6, 6,ERROR, 6, 6, 6),//28-2f - BitPackage.Pack4bits( 6, 6, 6, 6,ERROR,ERROR,START,START) //30-37 + BitPackage.Pack4bits( 5, 7, 7,ERROR, 4, 3,ERROR,ERROR),//00-07 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f + BitPackage.Pack4bits(ITSME,ITSME, 6, 6, 6, 6,ERROR,ERROR),//10-17 + BitPackage.Pack4bits( 6, 6, 6, 6, 6,ITSME, 6, 6),//18-1f + BitPackage.Pack4bits( 6, 6, 6, 6, 5, 7, 7,ERROR),//20-27 + BitPackage.Pack4bits( 5, 8, 6, 6,ERROR, 6, 6, 6),//28-2f + BitPackage.Pack4bits( 6, 6, 6, 6,ERROR,ERROR,START,START) //30-37 }; private readonly static int[] UCS2BECharLenTable = { 2, 2, 2, 0, 2, 2 }; - + public UCS2BESMModel() : base( - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, UCS2BE_cls), 6, - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, UCS2BE_st), UCS2BECharLenTable, "UTF-16BE") @@ -570,64 +570,64 @@ namespace UniversalDetector.Core } } - + public class UCS2LESMModel : SMModel { private readonly static int[] UCS2LE_cls = { - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 00 - 07 - BitPackage.Pack4bits(0,0,1,0,0,2,0,0), // 08 - 0f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17 - BitPackage.Pack4bits(0,0,0,3,0,0,0,0), // 18 - 1f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27 - BitPackage.Pack4bits(0,3,3,3,3,3,0,0), // 28 - 2f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 40 - 47 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 88 - 8f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a0 - a7 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a8 - af - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b0 - b7 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b8 - bf - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c0 - c7 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c8 - cf - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d0 - d7 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d8 - df - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e0 - e7 - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e8 - ef - BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // f0 - f7 - BitPackage.Pack4bits(0,0,0,0,0,0,4,5) // f8 - ff + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 00 - 07 + BitPackage.Pack4bits(0,0,1,0,0,2,0,0), // 08 - 0f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 10 - 17 + BitPackage.Pack4bits(0,0,0,3,0,0,0,0), // 18 - 1f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 20 - 27 + BitPackage.Pack4bits(0,3,3,3,3,3,0,0), // 28 - 2f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 30 - 37 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 38 - 3f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 40 - 47 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 48 - 4f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 50 - 57 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 58 - 5f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 60 - 67 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 68 - 6f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 70 - 77 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 78 - 7f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 80 - 87 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 88 - 8f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 90 - 97 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // 98 - 9f + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a0 - a7 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // a8 - af + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b0 - b7 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // b8 - bf + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c0 - c7 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // c8 - cf + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d0 - d7 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // d8 - df + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e0 - e7 + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // e8 - ef + BitPackage.Pack4bits(0,0,0,0,0,0,0,0), // f0 - f7 + BitPackage.Pack4bits(0,0,0,0,0,0,4,5) // f8 - ff }; private readonly static int[] UCS2LE_st = { - BitPackage.Pack4bits( 6, 6, 7, 6, 4, 3,ERROR,ERROR),//00-07 - BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f - BitPackage.Pack4bits(ITSME,ITSME, 5, 5, 5,ERROR,ITSME,ERROR),//10-17 - BitPackage.Pack4bits( 5, 5, 5,ERROR, 5,ERROR, 6, 6),//18-1f - BitPackage.Pack4bits( 7, 6, 8, 8, 5, 5, 5,ERROR),//20-27 - BitPackage.Pack4bits( 5, 5, 5,ERROR,ERROR,ERROR, 5, 5),//28-2f - BitPackage.Pack4bits( 5, 5, 5,ERROR, 5,ERROR,START,START) //30-37 + BitPackage.Pack4bits( 6, 6, 7, 6, 4, 3,ERROR,ERROR),//00-07 + BitPackage.Pack4bits(ERROR,ERROR,ERROR,ERROR,ITSME,ITSME,ITSME,ITSME),//08-0f + BitPackage.Pack4bits(ITSME,ITSME, 5, 5, 5,ERROR,ITSME,ERROR),//10-17 + BitPackage.Pack4bits( 5, 5, 5,ERROR, 5,ERROR, 6, 6),//18-1f + BitPackage.Pack4bits( 7, 6, 8, 8, 5, 5, 5,ERROR),//20-27 + BitPackage.Pack4bits( 5, 5, 5,ERROR,ERROR,ERROR, 5, 5),//28-2f + BitPackage.Pack4bits( 5, 5, 5,ERROR, 5,ERROR,START,START) //30-37 }; private readonly static int[] UCS2LECharLenTable = { 2, 2, 2, 2, 2, 2 }; - + public UCS2LESMModel() : base( - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, UCS2LE_cls), 6, - new BitPackage(BitPackage.INDEX_SHIFT_4BITS, - BitPackage.SHIFT_MASK_4BITS, + new BitPackage(BitPackage.INDEX_SHIFT_4BITS, + BitPackage.SHIFT_MASK_4BITS, BitPackage.BIT_SHIFT_4BITS, BitPackage.UNIT_MASK_4BITS, UCS2LE_st), UCS2LECharLenTable, "UTF-16LE") @@ -635,6 +635,6 @@ namespace UniversalDetector.Core } } - - + + } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCSGroupProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCSGroupProber.cs index d8f496474..640b19c4a 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCSGroupProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCSGroupProber.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -43,11 +43,11 @@ namespace UniversalDetector.Core public class SBCSGroupProber : CharsetProber { private const int PROBERS_NUM = 13; - private CharsetProber[] probers = new CharsetProber[PROBERS_NUM]; + private CharsetProber[] probers = new CharsetProber[PROBERS_NUM]; private bool[] isActive = new bool[PROBERS_NUM]; private int bestGuess; private int activeNum; - + public SBCSGroupProber() { probers[0] = new SingleByteCharSetProber(new Win1251Model()); @@ -62,24 +62,24 @@ namespace UniversalDetector.Core probers[9] = new SingleByteCharSetProber(new Win1251BulgarianModel()); HebrewProber hebprober = new HebrewProber(); probers[10] = hebprober; - // Logical - probers[11] = new SingleByteCharSetProber(new Win1255Model(), false, hebprober); + // Logical + probers[11] = new SingleByteCharSetProber(new Win1255Model(), false, hebprober); // Visual - probers[12] = new SingleByteCharSetProber(new Win1255Model(), true, hebprober); + probers[12] = new SingleByteCharSetProber(new Win1255Model(), true, hebprober); hebprober.SetModelProbers(probers[11], probers[12]); - // disable latin2 before latin1 is available, otherwise all latin1 + // disable latin2 before latin1 is available, otherwise all latin1 // will be detected as latin2 because of their similarity. //probers[13] = new SingleByteCharSetProber(new Latin2HungarianModel()); - //probers[14] = new SingleByteCharSetProber(new Win1250HungarianModel()); + //probers[14] = new SingleByteCharSetProber(new Win1250HungarianModel()); Reset(); } - - public override ProbingState HandleData(byte[] buf, int offset, int len) + + public override ProbingState HandleData(byte[] buf, int offset, int len) { ProbingState st = ProbingState.NotMe; - + //apply filter to original buffer, and we got new buffer back - //depend on what script it is, we will feed them the new buffer + //depend on what script it is, we will feed them the new buffer //we got after applying proper filter //this is done without any consideration to KeepEnglishLetters //of each prober since as of now, there are no probers here which @@ -87,12 +87,12 @@ namespace UniversalDetector.Core byte[] newBuf = FilterWithoutEnglishLetters(buf, offset, len); if (newBuf.Length == 0) return state; // Nothing to see here, move on. - + for (int i = 0; i < PROBERS_NUM; i++) { if (!isActive[i]) continue; st = probers[i].HandleData(newBuf, 0, newBuf.Length); - + if (st == ProbingState.FoundIt) { bestGuess = i; state = ProbingState.FoundIt; diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCharsetProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCharsetProber.cs index 5a3496075..65c0f8ca8 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCharsetProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCharsetProber.cs @@ -20,7 +20,7 @@ * * Contributor(s): * Shy Shalom - * Rudi Pettazzi (C# port) + * Rudi Pettazzi (C# port) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or @@ -51,11 +51,11 @@ namespace UniversalDetector.Core private const int NUMBER_OF_SEQ_CAT = 4; private const int POSITIVE_CAT = NUMBER_OF_SEQ_CAT-1; private const int NEGATIVE_CAT = 0; - + protected SequenceModel model; - - // true if we need to reverse every pair in the model lookup - bool reversed; + + // true if we need to reverse every pair in the model lookup + bool reversed; // char order of last character byte lastOrder; @@ -63,38 +63,38 @@ namespace UniversalDetector.Core int totalSeqs; int totalChar; int[] seqCounters = new int[NUMBER_OF_SEQ_CAT]; - + // characters that fall in our sampling range int freqChar; - + // Optional auxiliary prober for name decision. created and destroyed by the GroupProber - CharsetProber nameProber; - - public SingleByteCharSetProber(SequenceModel model) + CharsetProber nameProber; + + public SingleByteCharSetProber(SequenceModel model) : this(model, false, null) { - + } - - public SingleByteCharSetProber(SequenceModel model, bool reversed, + + public SingleByteCharSetProber(SequenceModel model, bool reversed, CharsetProber nameProber) { this.model = model; this.reversed = reversed; this.nameProber = nameProber; - Reset(); + Reset(); } public override ProbingState HandleData(byte[] buf, int offset, int len) { int max = offset + len; - + for (int i = offset; i < max; i++) { byte order = model.GetOrder(buf[i]); if (order < SYMBOL_CAT_ORDER) totalChar++; - + if (order < SAMPLE_SIZE) { freqChar++; @@ -120,7 +120,7 @@ namespace UniversalDetector.Core } return state; } - + public override void DumpStatus() { //Console.WriteLine(" SBCS: {0} [{1}]", GetConfidence(), GetCharsetName()); @@ -146,9 +146,9 @@ namespace UniversalDetector.Core r = 0.99f; return r; } - return 0.01f; + return 0.01f; } - + public override void Reset() { state = ProbingState.Detecting; @@ -159,12 +159,12 @@ namespace UniversalDetector.Core totalChar = 0; freqChar = 0; } - - public override string GetCharsetName() + + public override string GetCharsetName() { return (nameProber == null) ? model.CharsetName : nameProber.GetCharsetName(); } - + } } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SJISProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SJISProber.cs index 515cd2498..e1fbb873e 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SJISProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SJISProber.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -50,25 +50,25 @@ namespace UniversalDetector.Core private SJISContextAnalyser contextAnalyser; private SJISDistributionAnalyser distributionAnalyser; private byte[] lastChar = new byte[2]; - + public SJISProber() { codingSM = new CodingStateMachine(new SJISSMModel()); distributionAnalyser = new SJISDistributionAnalyser(); - contextAnalyser = new SJISContextAnalyser(); + contextAnalyser = new SJISContextAnalyser(); Reset(); } - + public override string GetCharsetName() { - return "Shift-JIS"; + return "Shift-JIS"; } - + public override ProbingState HandleData(byte[] buf, int offset, int len) { int codingState; int max = offset + len; - + for (int i = offset; i < max; i++) { codingState = codingSM.NextState(buf[i]); if (codingState == SMModel.ERROR) { @@ -90,7 +90,7 @@ namespace UniversalDetector.Core distributionAnalyser.HandleOneChar(buf, i-1, charLen); } } - } + } lastChar[0] = buf[max-1]; if (state == ProbingState.Detecting) if (contextAnalyser.GotEnoughData() && GetConfidence() > SHORTCUT_THRESHOLD) @@ -100,12 +100,12 @@ namespace UniversalDetector.Core public override void Reset() { - codingSM.Reset(); + codingSM.Reset(); state = ProbingState.Detecting; contextAnalyser.Reset(); distributionAnalyser.Reset(); } - + public override float GetConfidence() { float contxtCf = contextAnalyser.GetConfidence(); diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SMModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SMModel.cs index 2321ecad2..451a3e59c 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SMModel.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SMModel.cs @@ -52,9 +52,9 @@ namespace UniversalDetector.Core public BitPackage classTable; public BitPackage stateTable; public int[] charLenTable; - + private string name; - + public string Name { get { return name; } } @@ -74,10 +74,10 @@ namespace UniversalDetector.Core this.charLenTable = charLenTable; this.name = name; } - + public int GetClass(byte b) - { - return classTable.Unpack((int)b); + { + return classTable.Unpack((int)b); } - } + } } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SequenceModel.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SequenceModel.cs index 9048796b5..fc824b5a2 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SequenceModel.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SequenceModel.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -39,36 +39,36 @@ using System; namespace UniversalDetector.Core -{ +{ public abstract class SequenceModel { // [256] table use to find a char's order protected byte[] charToOrderMap; - - // [SAMPLE_SIZE][SAMPLE_SIZE] table to find a 2-char sequence's - // frequency + + // [SAMPLE_SIZE][SAMPLE_SIZE] table to find a 2-char sequence's + // frequency protected byte[] precedenceMatrix; - + // freqSeqs / totalSeqs protected float typicalPositiveRatio; - + public float TypicalPositiveRatio { get { return typicalPositiveRatio; } } - - // not used + + // not used protected bool keepEnglishLetter; - + public bool KeepEnglishLetter { get { return keepEnglishLetter; } } - + protected String charsetName; public string CharsetName { get { return charsetName; } } - + public SequenceModel( byte[] charToOrderMap, byte[] precedenceMatrix, @@ -82,16 +82,16 @@ namespace UniversalDetector.Core this.keepEnglishLetter = keepEnglishLetter; this.charsetName = charsetName; } - + public byte GetOrder(byte b) { return charToOrderMap[b]; } - + public byte GetPrecedence(int pos) { return precedenceMatrix[pos]; } - + } } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.cs index 084797c5e..a469e2a0c 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UTF8Prober.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -46,11 +46,11 @@ namespace UniversalDetector.Core public UTF8Prober() { - numOfMBChar = 0; + numOfMBChar = 0; codingSM = new CodingStateMachine(new UTF8SMModel()); Reset(); } - + public override string GetCharsetName() { return "UTF-8"; } @@ -66,7 +66,7 @@ namespace UniversalDetector.Core { int codingState = SMModel.START; int max = offset + len; - + for (int i = offset; i < max; i++) { codingState = codingSM.NextState(buf[i]); @@ -97,7 +97,7 @@ namespace UniversalDetector.Core { float unlike = 0.99f; float confidence = 0.0f; - + if (numOfMBChar < 6) { for (int i = 0; i < numOfMBChar; i++) unlike *= ONE_CHAR_PROB; diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UniversalDetector.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UniversalDetector.cs index 0c9a4ee60..4dcb282cc 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UniversalDetector.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UniversalDetector.cs @@ -21,7 +21,7 @@ * Contributor(s): * Shy Shalom * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -41,7 +41,7 @@ namespace UniversalDetector.Core enum InputState { PureASCII=0, EscASCII=1, Highbyte=2 }; - public abstract class UniversalDetector + public abstract class UniversalDetector { protected const int FILTER_CHINESE_SIMPLIFIED = 1; protected const int FILTER_CHINESE_TRADITIONAL = 2; @@ -49,12 +49,12 @@ namespace UniversalDetector.Core protected const int FILTER_KOREAN = 8; protected const int FILTER_NON_CJK = 16; protected const int FILTER_ALL = 31; - protected static int FILTER_CHINESE = + protected static int FILTER_CHINESE = FILTER_CHINESE_SIMPLIFIED | FILTER_CHINESE_TRADITIONAL; - protected static int FILTER_CJK = - FILTER_JAPANESE | FILTER_KOREAN | FILTER_CHINESE_SIMPLIFIED + protected static int FILTER_CJK = + FILTER_JAPANESE | FILTER_KOREAN | FILTER_CHINESE_SIMPLIFIED | FILTER_CHINESE_TRADITIONAL; - + protected const float SHORTCUT_THRESHOLD = 0.95f; protected const float MINIMUM_THRESHOLD = 0.20f; @@ -70,16 +70,16 @@ namespace UniversalDetector.Core protected CharsetProber escCharsetProber; protected string detectedCharset; - public UniversalDetector(int languageFilter) { + public UniversalDetector(int languageFilter) { this.start = true; this.inputState = InputState.PureASCII; - this.lastChar = 0x00; + this.lastChar = 0x00; this.bestGuess = -1; this.languageFilter = languageFilter; } public virtual void Feed(byte[] buf, int offset, int len) - { + { if (done) { return; } @@ -125,7 +125,7 @@ namespace UniversalDetector.Core } for (int i = 0; i < len; i++) { - + // other than 0xa0, if every other character is ascii, the page is ascii if ((buf[i] & 0x80) != 0 && buf[i] != 0xA0) { // we got a non-ascii byte (high-byte) @@ -143,9 +143,9 @@ namespace UniversalDetector.Core if (charsetProbers[1] == null) charsetProbers[1] = new SBCSGroupProber(); if (charsetProbers[2] == null) - charsetProbers[2] = new Latin1Prober(); + charsetProbers[2] = new Latin1Prober(); } - } else { + } else { if (inputState == InputState.PureASCII && (buf[i] == 0x33 || (buf[i] == 0x7B && lastChar == 0x7E))) { // found escape character or HZ "~{" @@ -154,9 +154,9 @@ namespace UniversalDetector.Core lastChar = buf[i]; } } - + ProbingState st = ProbingState.NotMe; - + switch (inputState) { case InputState.EscASCII: if (escCharsetProber == null) { @@ -172,18 +172,18 @@ namespace UniversalDetector.Core for (int i = 0; i < PROBERS_NUM; i++) { if (charsetProbers[i] != null) { st = charsetProbers[i].HandleData(buf, offset, len); - #if DEBUG + #if DEBUG charsetProbers[i].DumpStatus(); - #endif + #endif if (st == ProbingState.FoundIt) { done = true; detectedCharset = charsetProbers[i].GetCharsetName(); return; - } + } } } break; - default: + default: // pure ascii break; } @@ -191,13 +191,13 @@ namespace UniversalDetector.Core } /// - /// Notify detector that no further data is available. + /// Notify detector that no further data is available. /// public virtual void DataEnd() { if (!gotData) { - // we haven't got any data yet, return immediately - // caller program sometimes call DataEnd before anything has + // we haven't got any data yet, return immediately + // caller program sometimes call DataEnd before anything has // been sent to detector return; } @@ -206,7 +206,7 @@ namespace UniversalDetector.Core done = true; Report(detectedCharset, 1.0f); return; - } + } if (inputState == InputState.Highbyte) { float proberConfidence = 0.0f; @@ -221,22 +221,22 @@ namespace UniversalDetector.Core } } } - + if (maxProberConfidence > MINIMUM_THRESHOLD) { Report(charsetProbers[maxProber].GetCharsetName(), maxProberConfidence); - } - + } + } else if (inputState == InputState.PureASCII) { Report("ASCII", 1.0f); - } + } } /// /// Clear internal state of charset detector. - /// In the original interface this method is protected. + /// In the original interface this method is protected. /// - public virtual void Reset() - { + public virtual void Reset() + { done = false; start = true; detectedCharset = null; @@ -250,7 +250,7 @@ namespace UniversalDetector.Core if (charsetProbers[i] != null) charsetProbers[i].Reset(); } - + protected abstract void Report(string charset, float confidence); } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/DetectionConfidence.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/DetectionConfidence.cs index 6dfa55f6c..ea96c2803 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/DetectionConfidence.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/DetectionConfidence.cs @@ -21,7 +21,7 @@ * * Contributor(s): * Rudi Pettazzi (C# port) - * + * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), @@ -40,26 +40,26 @@ namespace UniversalDetector { /// /// Indicate how confident the detection module about the return result. - /// - /// NoAnswerYet: the detector have not find out a answer yet based on + /// + /// NoAnswerYet: the detector have not find out a answer yet based on /// the data it received. - /// - /// BestAnswer: the answer the detector returned is the best one within - /// the knowledge of the detector. In other words, the test to all + /// + /// BestAnswer: the answer the detector returned is the best one within + /// the knowledge of the detector. In other words, the test to all /// other candidates fail. /// For example, the (Shift_JIS/EUC-JP/ISO-2022-JP) detection - /// module may return this with answer "Shift_JIS " if it receive - /// bytes > 0x80 (which make ISO-2022-JP test failed) and byte + /// module may return this with answer "Shift_JIS " if it receive + /// bytes > 0x80 (which make ISO-2022-JP test failed) and byte /// 0x82 (which may EUC-JP test failed) /// /// SureAnswer: the detector is 100% sure about the answer. - /// + /// /// Example 1: the Shift_JIS/ISO-2022-JP/EUC-JP detector return /// this w/ ISO-2022-JP when it hit one of the following ESC seq /// ESC ( J /// ESC $ @ /// ESC $ B - /// + /// /// Example 2: the detector which can detect UCS2 return w/ UCS2 /// when the first 2 byte are BOM mark. /// Example 3: the Korean detector return ISO-2022-KR when it diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/ICharsetDetector.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/ICharsetDetector.cs index c0c35a59e..fbf8376bd 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/ICharsetDetector.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/ICharsetDetector.cs @@ -47,31 +47,31 @@ namespace UniversalDetector /// The detected charset. It can be null. /// string Charset { get; } - + /// - /// The confidence of the detected charset, if any + /// The confidence of the detected charset, if any /// float Confidence { get; } - + /// - /// Feed a block of bytes to the detector. + /// Feed a block of bytes to the detector. /// /// input buffer /// offset into buffer /// number of available bytes void Feed(byte[] buf, int offset, int len); - + /// - /// Feed a bytes stream to the detector. + /// Feed a bytes stream to the detector. /// /// an input stream void Feed(Stream stream); /// - /// Resets the state of the detector. - /// + /// Resets the state of the detector. + /// void Reset(); - + /// /// Returns true if the detector has found a result and it is sure about it. /// @@ -83,6 +83,6 @@ namespace UniversalDetector /// decision. /// void DataEnd(); - + } } diff --git a/Emby.Server.Implementations/Udp/UdpServer.cs b/Emby.Server.Implementations/Udp/UdpServer.cs index 275bd83ea..7db814c4a 100644 --- a/Emby.Server.Implementations/Udp/UdpServer.cs +++ b/Emby.Server.Implementations/Udp/UdpServer.cs @@ -182,7 +182,7 @@ namespace Emby.Server.Implementations.Udp { return; } - + try { var socketResult = _udpClient.EndReceive(result); diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index 82b61c15a..4943d0ccc 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -597,7 +597,7 @@ namespace Emby.Server.Implementations.Updates cancellationToken.ThrowIfCancellationRequested(); - // Success - move it to the real target + // Success - move it to the real target try { _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(target)); diff --git a/Emby.Server.Implementations/UserViews/FolderImageProvider.cs b/Emby.Server.Implementations/UserViews/FolderImageProvider.cs index abd6810b0..057d22aec 100644 --- a/Emby.Server.Implementations/UserViews/FolderImageProvider.cs +++ b/Emby.Server.Implementations/UserViews/FolderImageProvider.cs @@ -34,7 +34,7 @@ namespace Emby.Server.Implementations.Photos Parent = item, DtoOptions = new DtoOptions(true), ImageTypes = new ImageType[] { ImageType.Primary }, - OrderBy = new System.ValueTuple[] + OrderBy = new System.ValueTuple[] { new System.ValueTuple(ItemSortBy.IsFolder, SortOrder.Ascending), new System.ValueTuple(ItemSortBy.SortName, SortOrder.Ascending) diff --git a/Emby.XmlTv/Emby.XmlTv.Console/Program.cs b/Emby.XmlTv/Emby.XmlTv.Console/Program.cs index c57c45297..e72d94bf5 100644 --- a/Emby.XmlTv/Emby.XmlTv.Console/Program.cs +++ b/Emby.XmlTv/Emby.XmlTv.Console/Program.cs @@ -25,7 +25,7 @@ namespace Emby.XmlTv.Console var timer = Stopwatch.StartNew(); System.Console.WriteLine("Running XMLTv Parsing"); - var resultsFile = String.Format("C:\\Temp\\{0}_Results_{1:HHmmss}.txt", + var resultsFile = String.Format("C:\\Temp\\{0}_Results_{1:HHmmss}.txt", Path.GetFileNameWithoutExtension(filename), DateTimeOffset.UtcNow); diff --git a/Emby.XmlTv/Emby.XmlTv.Console/Properties/AssemblyInfo.cs b/Emby.XmlTv/Emby.XmlTv.Console/Properties/AssemblyInfo.cs index cd1fcce68..4178a27a1 100644 --- a/Emby.XmlTv/Emby.XmlTv.Console/Properties/AssemblyInfo.cs +++ b/Emby.XmlTv/Emby.XmlTv.Console/Properties/AssemblyInfo.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Emby.XmlTv.Console")] @@ -14,8 +14,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -25,11 +25,11 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] diff --git a/Emby.XmlTv/Emby.XmlTv.Test/Properties/AssemblyInfo.cs b/Emby.XmlTv/Emby.XmlTv.Test/Properties/AssemblyInfo.cs index b6fc4c8e2..e79fda8a8 100644 --- a/Emby.XmlTv/Emby.XmlTv.Test/Properties/AssemblyInfo.cs +++ b/Emby.XmlTv/Emby.XmlTv.Test/Properties/AssemblyInfo.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Emby.XmlTv.Test")] @@ -14,8 +14,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -25,11 +25,11 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] diff --git a/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderDateTimeTests.cs b/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderDateTimeTests.cs index dbbd352ee..2e4516be5 100644 --- a/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderDateTimeTests.cs +++ b/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderDateTimeTests.cs @@ -16,7 +16,7 @@ namespace Emby.XmlTv.Test { var testFile = Path.GetFullPath(@"MultilanguageData.xml"); var reader = new XmlTvReader(testFile, "es"); - + Assert.AreEqual(Parse("01 Jan 2016 00:00:00"), reader.ParseDate("2016")); Assert.AreEqual(Parse("01 Jan 2016 00:00:00"), reader.ParseDate("201601")); Assert.AreEqual(Parse("01 Jan 2016 00:00:00"), reader.ParseDate("20160101")); diff --git a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvEpisode.cs b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvEpisode.cs index afcfb909e..98a035467 100644 --- a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvEpisode.cs +++ b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvEpisode.cs @@ -49,5 +49,5 @@ namespace Emby.XmlTv.Entities } } - + } diff --git a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvProgram.cs b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvProgram.cs index b5aa6cf7a..b6614afc1 100644 --- a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvProgram.cs +++ b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvProgram.cs @@ -13,7 +13,7 @@ namespace Emby.XmlTv.Entities public DateTimeOffset EndDate { get; set; } public string Title { get; set; } - + public string Description { get; set; } public string ProgramId { get; set; } public string Quality { get; set; } diff --git a/Emby.XmlTv/Emby.XmlTv/Properties/AssemblyInfo.cs b/Emby.XmlTv/Emby.XmlTv/Properties/AssemblyInfo.cs index f33433c93..d85258419 100644 --- a/Emby.XmlTv/Emby.XmlTv/Properties/AssemblyInfo.cs +++ b/Emby.XmlTv/Emby.XmlTv/Properties/AssemblyInfo.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("XmlTv")] @@ -14,19 +14,19 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0")] diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs index ed0a0c81a..7f7e48a3a 100644 --- a/MediaBrowser.Api/ApiEntryPoint.cs +++ b/MediaBrowser.Api/ApiEntryPoint.cs @@ -397,7 +397,7 @@ namespace MediaBrowser.Api lock (_activeTranscodingJobs) { - // This is really only needed for HLS. + // This is really only needed for HLS. // Progressive streams can stop on their own reliably jobs = _activeTranscodingJobs.Where(j => string.Equals(playSessionId, j.PlaySessionId, StringComparison.OrdinalIgnoreCase)).ToList(); } @@ -499,7 +499,7 @@ namespace MediaBrowser.Api lock (_activeTranscodingJobs) { - // This is really only needed for HLS. + // This is really only needed for HLS. // Progressive streams can stop on their own reliably jobs.AddRange(_activeTranscodingJobs.Where(killJob)); } diff --git a/MediaBrowser.Api/DisplayPreferencesService.cs b/MediaBrowser.Api/DisplayPreferencesService.cs index 6bc2f7e4a..eea83490a 100644 --- a/MediaBrowser.Api/DisplayPreferencesService.cs +++ b/MediaBrowser.Api/DisplayPreferencesService.cs @@ -41,7 +41,7 @@ namespace MediaBrowser.Api [ApiMember(Name = "Client", Description = "Client", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "GET")] public string Client { get; set; } } - + /// /// Class DisplayPreferencesService /// diff --git a/MediaBrowser.Api/EnvironmentService.cs b/MediaBrowser.Api/EnvironmentService.cs index ea3920d38..6794a9304 100644 --- a/MediaBrowser.Api/EnvironmentService.cs +++ b/MediaBrowser.Api/EnvironmentService.cs @@ -98,7 +98,7 @@ namespace MediaBrowser.Api [Route("/Environment/DefaultDirectoryBrowser", "GET", Summary = "Gets the parent path of a given path")] public class GetDefaultDirectoryBrowser : IReturn { - + } /// diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index fa6502bda..9cddcde49 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -882,7 +882,7 @@ namespace MediaBrowser.Api.Playback if (profile == null) { - // Don't use settings from the default profile. + // Don't use settings from the default profile. // Only use a specific profile if it was requested. return; } diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs index 7ef7b81e6..954963b2f 100644 --- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs @@ -296,7 +296,7 @@ namespace MediaBrowser.Api.Playback.Hls ).Trim(); } - // add when stream copying? + // add when stream copying? // -avoid_negative_ts make_zero -fflags +genpts var args = string.Format("{0} {1} {2} -map_metadata -1 -map_chapters -1 -threads {3} {4} {5} -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero {6} -hls_time {7} -individual_header_trailer 0 -start_number {8} -hls_list_size {9}{10} -y \"{11}\"", diff --git a/MediaBrowser.Api/Playback/MediaInfoService.cs b/MediaBrowser.Api/Playback/MediaInfoService.cs index 6dafe134c..a0b0b2ced 100644 --- a/MediaBrowser.Api/Playback/MediaInfoService.cs +++ b/MediaBrowser.Api/Playback/MediaInfoService.cs @@ -118,7 +118,7 @@ namespace MediaBrowser.Api.Playback var authInfo = _authContext.GetAuthorizationInfo(Request); var result = await _mediaSourceManager.OpenLiveStream(request, CancellationToken.None).ConfigureAwait(false); - + var profile = request.DeviceProfile; if (profile == null) { @@ -386,10 +386,10 @@ namespace MediaBrowser.Api.Playback } else { - Logger.LogInformation("User policy for {0}. EnablePlaybackRemuxing: {1} EnableVideoPlaybackTranscoding: {2} EnableAudioPlaybackTranscoding: {3}", + Logger.LogInformation("User policy for {0}. EnablePlaybackRemuxing: {1} EnableVideoPlaybackTranscoding: {2} EnableAudioPlaybackTranscoding: {3}", user.Name, user.Policy.EnablePlaybackRemuxing, - user.Policy.EnableVideoPlaybackTranscoding, + user.Policy.EnableVideoPlaybackTranscoding, user.Policy.EnableAudioPlaybackTranscoding); } diff --git a/MediaBrowser.Api/Playback/StreamRequest.cs b/MediaBrowser.Api/Playback/StreamRequest.cs index d95c30d65..6b0725f31 100644 --- a/MediaBrowser.Api/Playback/StreamRequest.cs +++ b/MediaBrowser.Api/Playback/StreamRequest.cs @@ -19,7 +19,7 @@ namespace MediaBrowser.Api.Playback [ApiMember(Name = "MediaSourceId", Description = "The media version id, if playing an alternate version", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")] public string MediaSourceId { get; set; } - + [ApiMember(Name = "DeviceId", Description = "The device id of the client requesting. Used to stop encoding processes when needed.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")] public string DeviceId { get; set; } diff --git a/MediaBrowser.Api/Playback/StreamState.cs b/MediaBrowser.Api/Playback/StreamState.cs index 67fb04d0c..73741d527 100644 --- a/MediaBrowser.Api/Playback/StreamState.cs +++ b/MediaBrowser.Api/Playback/StreamState.cs @@ -117,7 +117,7 @@ namespace MediaBrowser.Api.Playback public string UserAgent { get; set; } - public StreamState(IMediaSourceManager mediaSourceManager, ILogger logger, TranscodingJobType transcodingType) + public StreamState(IMediaSourceManager mediaSourceManager, ILogger logger, TranscodingJobType transcodingType) : base(logger, mediaSourceManager, transcodingType) { _mediaSourceManager = mediaSourceManager; diff --git a/MediaBrowser.Api/PluginService.cs b/MediaBrowser.Api/PluginService.cs index 1f1bb3614..12488b712 100644 --- a/MediaBrowser.Api/PluginService.cs +++ b/MediaBrowser.Api/PluginService.cs @@ -225,7 +225,7 @@ namespace MediaBrowser.Api { var pkg = packages.FirstOrDefault(i => !string.IsNullOrWhiteSpace(i.guid) && new Guid(plugin.Id).Equals(new Guid(i.guid))); return pkg != null && pkg.enableInAppStore; - + }) .ToArray(); } diff --git a/MediaBrowser.Api/Properties/AssemblyInfo.cs b/MediaBrowser.Api/Properties/AssemblyInfo.cs index c68952291..2755924c8 100644 --- a/MediaBrowser.Api/Properties/AssemblyInfo.cs +++ b/MediaBrowser.Api/Properties/AssemblyInfo.cs @@ -1,7 +1,7 @@ using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("MediaBrowser.Api")] @@ -13,8 +13,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -24,7 +24,7 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // diff --git a/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs b/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs index 959bdcd55..ef9b3c1ae 100644 --- a/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs +++ b/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs @@ -155,7 +155,7 @@ namespace MediaBrowser.Api.ScheduledTasks return isEnabled == val; }); } - + var infos = result .Select(ScheduledTaskHelpers.GetTaskInfo) .ToArray(); diff --git a/MediaBrowser.Api/System/ActivityLogWebSocketListener.cs b/MediaBrowser.Api/System/ActivityLogWebSocketListener.cs index b61ff8d93..29f01eab9 100644 --- a/MediaBrowser.Api/System/ActivityLogWebSocketListener.cs +++ b/MediaBrowser.Api/System/ActivityLogWebSocketListener.cs @@ -47,7 +47,7 @@ namespace MediaBrowser.Api.System { return Task.FromResult(new List()); } - + protected override void Dispose(bool dispose) { diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs index 11c12c718..2ce9b0aec 100644 --- a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs +++ b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs @@ -214,7 +214,7 @@ namespace MediaBrowser.Api.UserLibrary public string Genres { get; set; } public string GenreIds { get; set; } - + [ApiMember(Name = "OfficialRatings", Description = "Optional. If specified, results will be filtered based on OfficialRating. This allows multiple, pipe delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string OfficialRatings { get; set; } @@ -412,7 +412,7 @@ namespace MediaBrowser.Api.UserLibrary return val.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(v => (VideoType)Enum.Parse(typeof(VideoType), v, true)).ToArray(); } - + /// /// Gets the filters. /// diff --git a/MediaBrowser.Api/UserLibrary/GenresService.cs b/MediaBrowser.Api/UserLibrary/GenresService.cs index 0bb7d7865..c897ba300 100644 --- a/MediaBrowser.Api/UserLibrary/GenresService.cs +++ b/MediaBrowser.Api/UserLibrary/GenresService.cs @@ -69,7 +69,7 @@ namespace MediaBrowser.Api.UserLibrary var dtoOptions = GetDtoOptions(AuthorizationContext, request); var item = GetGenre(request.Name, LibraryManager, dtoOptions); - + if (!request.UserId.Equals(Guid.Empty)) { var user = UserManager.GetUserById(request.UserId); diff --git a/MediaBrowser.Api/UserLibrary/MusicGenresService.cs b/MediaBrowser.Api/UserLibrary/MusicGenresService.cs index d4f1b3fa8..9583dacb2 100644 --- a/MediaBrowser.Api/UserLibrary/MusicGenresService.cs +++ b/MediaBrowser.Api/UserLibrary/MusicGenresService.cs @@ -60,7 +60,7 @@ namespace MediaBrowser.Api.UserLibrary var dtoOptions = GetDtoOptions(AuthorizationContext, request); var item = GetMusicGenre(request.Name, LibraryManager, dtoOptions); - + if (!request.UserId.Equals(Guid.Empty)) { var user = UserManager.GetUserById(request.UserId); diff --git a/MediaBrowser.Api/UserLibrary/YearsService.cs b/MediaBrowser.Api/UserLibrary/YearsService.cs index 30ac88e00..528406aa4 100644 --- a/MediaBrowser.Api/UserLibrary/YearsService.cs +++ b/MediaBrowser.Api/UserLibrary/YearsService.cs @@ -66,7 +66,7 @@ namespace MediaBrowser.Api.UserLibrary private BaseItemDto GetItem(GetYear request) { var item = LibraryManager.GetYear(request.Year); - + var dtoOptions = GetDtoOptions(AuthorizationContext, request); if (!request.UserId.Equals(Guid.Empty)) diff --git a/MediaBrowser.Common/Net/HttpResponseInfo.cs b/MediaBrowser.Common/Net/HttpResponseInfo.cs index ed941a447..a36550a28 100644 --- a/MediaBrowser.Common/Net/HttpResponseInfo.cs +++ b/MediaBrowser.Common/Net/HttpResponseInfo.cs @@ -21,7 +21,7 @@ namespace MediaBrowser.Common.Net /// /// The response URL. public string ResponseUrl { get; set; } - + /// /// Gets or sets the content. /// diff --git a/MediaBrowser.Common/Properties/AssemblyInfo.cs b/MediaBrowser.Common/Properties/AssemblyInfo.cs index 09fd68f93..1a7112ad9 100644 --- a/MediaBrowser.Common/Properties/AssemblyInfo.cs +++ b/MediaBrowser.Common/Properties/AssemblyInfo.cs @@ -1,7 +1,7 @@ using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("MediaBrowser.Common")] @@ -13,15 +13,15 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // \ No newline at end of file diff --git a/MediaBrowser.Controller/Dlna/IDlnaManager.cs b/MediaBrowser.Controller/Dlna/IDlnaManager.cs index 2f64cd194..70529d062 100644 --- a/MediaBrowser.Controller/Dlna/IDlnaManager.cs +++ b/MediaBrowser.Controller/Dlna/IDlnaManager.cs @@ -30,26 +30,26 @@ namespace MediaBrowser.Controller.Dlna /// /// The profile. void CreateProfile(DeviceProfile profile); - + /// /// Updates the profile. /// /// The profile. void UpdateProfile(DeviceProfile profile); - + /// /// Deletes the profile. /// /// The identifier. void DeleteProfile(string id); - + /// /// Gets the profile. /// /// The identifier. /// DeviceProfile. DeviceProfile GetProfile(string id); - + /// /// Gets the profile. /// diff --git a/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs b/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs index 948219bf5..1b1e386e5 100644 --- a/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs +++ b/MediaBrowser.Controller/Drawing/ImageProcessorExtensions.cs @@ -9,7 +9,7 @@ namespace MediaBrowser.Controller.Drawing { return processor.GetImageCacheTag(item, imageType, 0); } - + public static string GetImageCacheTag(this IImageProcessor processor, BaseItem item, ImageType imageType, int imageIndex) { var imageInfo = item.GetImageInfo(imageType, imageIndex); diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index a268e6d76..4703b9d40 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -2100,7 +2100,7 @@ namespace MediaBrowser.Controller.Entities } else { - var list = + var list = Studios = current.Concat(new [] { name }).ToArray(); } } @@ -2915,7 +2915,7 @@ namespace MediaBrowser.Controller.Entities return GetExtras(); } - public virtual bool IsHD { + public virtual bool IsHD { get { return Height >= 720; diff --git a/MediaBrowser.Controller/Entities/BaseItemExtensions.cs b/MediaBrowser.Controller/Entities/BaseItemExtensions.cs index 8ab1788b5..bfd832d34 100644 --- a/MediaBrowser.Controller/Entities/BaseItemExtensions.cs +++ b/MediaBrowser.Controller/Entities/BaseItemExtensions.cs @@ -62,13 +62,13 @@ namespace MediaBrowser.Controller.Entities item.SetImagePath(imageType, BaseItem.FileSystem.GetFileInfo(file)); } } - + /// /// Copies all properties on object. Skips properties that do not exist. /// /// The source object. /// The destination object. - public static void DeepCopy(this T source, TU dest) + public static void DeepCopy(this T source, TU dest) where T : BaseItem where TU : BaseItem { @@ -82,7 +82,7 @@ namespace MediaBrowser.Controller.Entities if (destProps.Any(x => x.Name == sourceProp.Name)) { var p = destProps.First(x => x.Name == sourceProp.Name); - p.SetValue(dest, sourceProp.GetValue(source, null), null); + p.SetValue(dest, sourceProp.GetValue(source, null), null); } } @@ -93,7 +93,7 @@ namespace MediaBrowser.Controller.Entities /// Copies all properties on newly created object. Skips properties that do not exist. /// /// The source object. - public static TU DeepCopy(this T source) + public static TU DeepCopy(this T source) where T : BaseItem where TU : BaseItem, new() { diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index dbe30f9a5..a2522cf5d 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -1705,7 +1705,7 @@ namespace MediaBrowser.Controller.Entities { get { - // These are just far too slow. + // These are just far too slow. if (this is ICollectionFolder) { return false; diff --git a/MediaBrowser.Controller/Entities/ISupportsBoxSetGrouping.cs b/MediaBrowser.Controller/Entities/ISupportsBoxSetGrouping.cs index fbe5a06d0..7eede6708 100644 --- a/MediaBrowser.Controller/Entities/ISupportsBoxSetGrouping.cs +++ b/MediaBrowser.Controller/Entities/ISupportsBoxSetGrouping.cs @@ -3,7 +3,7 @@ namespace MediaBrowser.Controller.Entities { /// /// Marker interface to denote a class that supports being hidden underneath it's boxset. - /// Just about anything can be placed into a boxset, + /// Just about anything can be placed into a boxset, /// but movies should also only appear underneath and not outside separately (subject to configuration). /// public interface ISupportsBoxSetGrouping diff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs index bb99c0a84..b35e36e1b 100644 --- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs +++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs @@ -158,7 +158,7 @@ namespace MediaBrowser.Controller.Entities public bool EnableGroupByMetadataKey { get; set; } public bool? HasChapterImages { get; set; } - public ValueTuple[] OrderBy { get; set; } + public ValueTuple[] OrderBy { get; set; } public DateTime? MinDateCreated { get; set; } public DateTime? MinDateLastSaved { get; set; } diff --git a/MediaBrowser.Controller/Entities/User.cs b/MediaBrowser.Controller/Entities/User.cs index f569c8021..1cecfe44e 100644 --- a/MediaBrowser.Controller/Entities/User.cs +++ b/MediaBrowser.Controller/Entities/User.cs @@ -19,7 +19,7 @@ namespace MediaBrowser.Controller.Entities public static IXmlSerializer XmlSerializer { get; set; } /// - /// From now on all user paths will be Id-based. + /// From now on all user paths will be Id-based. /// This is for backwards compatibility. /// public bool UsesIdForConfigurationPath { get; set; } diff --git a/MediaBrowser.Controller/Entities/UserItemData.cs b/MediaBrowser.Controller/Entities/UserItemData.cs index 0e1326949..fd118be9e 100644 --- a/MediaBrowser.Controller/Entities/UserItemData.cs +++ b/MediaBrowser.Controller/Entities/UserItemData.cs @@ -90,7 +90,7 @@ namespace MediaBrowser.Controller.Entities public int? SubtitleStreamIndex { get; set; } public const double MinLikeValue = 6.5; - + /// /// This is an interpreted property to indicate likes or dislikes /// This should never be serialized. diff --git a/MediaBrowser.Controller/IServerApplicationHost.cs b/MediaBrowser.Controller/IServerApplicationHost.cs index 4dc559031..57a3bbc0a 100644 --- a/MediaBrowser.Controller/IServerApplicationHost.cs +++ b/MediaBrowser.Controller/IServerApplicationHost.cs @@ -37,7 +37,7 @@ namespace MediaBrowser.Controller /// /// The HTTPS port. int HttpsPort { get; } - + /// /// Gets a value indicating whether [supports HTTPS]. /// diff --git a/MediaBrowser.Controller/IServerApplicationPaths.cs b/MediaBrowser.Controller/IServerApplicationPaths.cs index 5fb7968dd..7f2605fab 100644 --- a/MediaBrowser.Controller/IServerApplicationPaths.cs +++ b/MediaBrowser.Controller/IServerApplicationPaths.cs @@ -16,7 +16,7 @@ namespace MediaBrowser.Controller /// /// The application resources path. string ApplicationResourcesPath { get; } - + /// /// Gets the path to the default user view directory. Used if no specific user view is defined. /// diff --git a/MediaBrowser.Controller/Library/IUserManager.cs b/MediaBrowser.Controller/Library/IUserManager.cs index d29b164ef..154ef3b05 100644 --- a/MediaBrowser.Controller/Library/IUserManager.cs +++ b/MediaBrowser.Controller/Library/IUserManager.cs @@ -123,7 +123,7 @@ namespace MediaBrowser.Controller.Library /// The user. /// Task. void ResetEasyPassword(User user); - + /// /// Changes the password. /// @@ -133,7 +133,7 @@ namespace MediaBrowser.Controller.Library /// Changes the easy password. /// void ChangeEasyPassword(User user, string newPassword, string newPasswordSha1); - + /// /// Gets the user dto. /// diff --git a/MediaBrowser.Controller/Library/ItemResolveArgs.cs b/MediaBrowser.Controller/Library/ItemResolveArgs.cs index 9812802e7..238dd2880 100644 --- a/MediaBrowser.Controller/Library/ItemResolveArgs.cs +++ b/MediaBrowser.Controller/Library/ItemResolveArgs.cs @@ -126,7 +126,7 @@ namespace MediaBrowser.Controller.Library { var item = parent as T; - // Just in case the user decided to nest episodes. + // Just in case the user decided to nest episodes. // Not officially supported but in some cases we can handle it. if (item == null) { diff --git a/MediaBrowser.Controller/LiveTv/ChannelInfo.cs b/MediaBrowser.Controller/LiveTv/ChannelInfo.cs index c000da852..f45c7b71a 100644 --- a/MediaBrowser.Controller/LiveTv/ChannelInfo.cs +++ b/MediaBrowser.Controller/LiveTv/ChannelInfo.cs @@ -36,7 +36,7 @@ namespace MediaBrowser.Controller.LiveTv /// /// The tuner host identifier. public string TunerHostId { get; set; } - + /// /// Gets or sets the type of the channel. /// diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs index 601fb69aa..5986474d8 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvService.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvService.cs @@ -99,7 +99,7 @@ namespace MediaBrowser.Controller.LiveTv /// The program. /// Task{SeriesTimerInfo}. Task GetNewTimerDefaultsAsync(CancellationToken cancellationToken, ProgramInfo program = null); - + /// /// Gets the series timers asynchronous. /// diff --git a/MediaBrowser.Controller/LiveTv/LiveTvServiceStatusInfo.cs b/MediaBrowser.Controller/LiveTv/LiveTvServiceStatusInfo.cs index 4da238acf..20e5d228b 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvServiceStatusInfo.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvServiceStatusInfo.cs @@ -39,7 +39,7 @@ namespace MediaBrowser.Controller.LiveTv /// /// true if this instance is visible; otherwise, false. public bool IsVisible { get; set; } - + public LiveTvServiceStatusInfo() { Tuners = new List(); diff --git a/MediaBrowser.Controller/LiveTv/LiveTvTunerInfo.cs b/MediaBrowser.Controller/LiveTv/LiveTvTunerInfo.cs index 5c001f288..ade25abdc 100644 --- a/MediaBrowser.Controller/LiveTv/LiveTvTunerInfo.cs +++ b/MediaBrowser.Controller/LiveTv/LiveTvTunerInfo.cs @@ -28,7 +28,7 @@ namespace MediaBrowser.Controller.LiveTv /// /// The URL. public string Url { get; set; } - + /// /// Gets or sets the status. /// @@ -52,7 +52,7 @@ namespace MediaBrowser.Controller.LiveTv /// /// The name of the program. public string ProgramName { get; set; } - + /// /// Gets or sets the clients. /// @@ -64,7 +64,7 @@ namespace MediaBrowser.Controller.LiveTv /// /// true if this instance can reset; otherwise, false. public bool CanReset { get; set; } - + public LiveTvTunerInfo() { Clients = new List(); diff --git a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs index 3006b9bbe..0ca4749d7 100644 --- a/MediaBrowser.Controller/LiveTv/RecordingInfo.cs +++ b/MediaBrowser.Controller/LiveTv/RecordingInfo.cs @@ -22,7 +22,7 @@ namespace MediaBrowser.Controller.LiveTv /// /// The timer identifier. public string TimerId { get; set; } - + /// /// ChannelId of the recording. /// @@ -33,7 +33,7 @@ namespace MediaBrowser.Controller.LiveTv /// /// The type of the channel. public ChannelType ChannelType { get; set; } - + /// /// Name of the recording. /// @@ -50,7 +50,7 @@ namespace MediaBrowser.Controller.LiveTv /// /// The URL. public string Url { get; set; } - + /// /// Gets or sets the overview. /// diff --git a/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs b/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs index 5c73ed833..a9bb9f4e8 100644 --- a/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs +++ b/MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs @@ -15,13 +15,13 @@ namespace MediaBrowser.Controller.LiveTv /// ChannelId of the recording. /// public string ChannelId { get; set; } - + /// /// Gets or sets the program identifier. /// /// The program identifier. public string ProgramId { get; set; } - + /// /// Name of the recording. /// @@ -66,7 +66,7 @@ namespace MediaBrowser.Controller.LiveTv /// /// true if [record new only]; otherwise, false. public bool RecordNewOnly { get; set; } - + /// /// Gets or sets the days. /// @@ -108,7 +108,7 @@ namespace MediaBrowser.Controller.LiveTv /// /// The series identifier. public string SeriesId { get; set; } - + public SeriesTimerInfo() { Days = new List(); diff --git a/MediaBrowser.Controller/MediaEncoding/ImageEncodingOptions.cs b/MediaBrowser.Controller/MediaEncoding/ImageEncodingOptions.cs index a8d1e5a0f..d69c2e47d 100644 --- a/MediaBrowser.Controller/MediaEncoding/ImageEncodingOptions.cs +++ b/MediaBrowser.Controller/MediaEncoding/ImageEncodingOptions.cs @@ -4,7 +4,7 @@ namespace MediaBrowser.Controller.MediaEncoding public class ImageEncodingOptions { public string InputPath { get; set; } - + public int? Width { get; set; } public int? Height { get; set; } @@ -14,7 +14,7 @@ namespace MediaBrowser.Controller.MediaEncoding public int? MaxHeight { get; set; } public int? Quality { get; set; } - + public string Format { get; set; } } } diff --git a/MediaBrowser.Controller/Net/AuthorizationInfo.cs b/MediaBrowser.Controller/Net/AuthorizationInfo.cs index 848d8fa15..86c7b7e0f 100644 --- a/MediaBrowser.Controller/Net/AuthorizationInfo.cs +++ b/MediaBrowser.Controller/Net/AuthorizationInfo.cs @@ -9,12 +9,12 @@ namespace MediaBrowser.Controller.Net /// Gets or sets the user identifier. /// /// The user identifier. - public Guid UserId { + public Guid UserId { get { return User == null ? Guid.Empty : User.Id; } } - + /// /// Gets or sets the device identifier. /// diff --git a/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs b/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs index 31ec149bf..7bcd66e56 100644 --- a/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs +++ b/MediaBrowser.Controller/Net/BasePeriodicWebSocketListener.cs @@ -93,7 +93,7 @@ namespace MediaBrowser.Controller.Net protected virtual void ParseMessageParams(string[] values) { - + } /// diff --git a/MediaBrowser.Controller/Net/IAuthorizationContext.cs b/MediaBrowser.Controller/Net/IAuthorizationContext.cs index 5a9d0aa30..9b9b2226a 100644 --- a/MediaBrowser.Controller/Net/IAuthorizationContext.cs +++ b/MediaBrowser.Controller/Net/IAuthorizationContext.cs @@ -10,7 +10,7 @@ namespace MediaBrowser.Controller.Net /// The request context. /// AuthorizationInfo. AuthorizationInfo GetAuthorizationInfo(object requestContext); - + /// /// Gets the authorization information. /// diff --git a/MediaBrowser.Controller/Net/ISessionContext.cs b/MediaBrowser.Controller/Net/ISessionContext.cs index 37ddbc2b3..40e76c252 100644 --- a/MediaBrowser.Controller/Net/ISessionContext.cs +++ b/MediaBrowser.Controller/Net/ISessionContext.cs @@ -5,7 +5,7 @@ using MediaBrowser.Model.Services; namespace MediaBrowser.Controller.Net { - public interface ISessionContext + public interface ISessionContext { SessionInfo GetSession(object requestContext); User GetUser(object requestContext); diff --git a/MediaBrowser.Controller/Plugins/ILocalizablePlugin.cs b/MediaBrowser.Controller/Plugins/ILocalizablePlugin.cs index d294107d7..e914fc200 100644 --- a/MediaBrowser.Controller/Plugins/ILocalizablePlugin.cs +++ b/MediaBrowser.Controller/Plugins/ILocalizablePlugin.cs @@ -15,6 +15,6 @@ namespace MediaBrowser.Controller.Plugins // Find all dictionaries using GetManifestResourceNames, start start with the prefix // Return the one for the culture if exists, otherwise return the default return null; - } + } } } diff --git a/MediaBrowser.Controller/Properties/AssemblyInfo.cs b/MediaBrowser.Controller/Properties/AssemblyInfo.cs index 844b93f37..a28296c18 100644 --- a/MediaBrowser.Controller/Properties/AssemblyInfo.cs +++ b/MediaBrowser.Controller/Properties/AssemblyInfo.cs @@ -1,7 +1,7 @@ using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("MediaBrowser.Controller")] @@ -13,15 +13,15 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // \ No newline at end of file diff --git a/MediaBrowser.Controller/Providers/ILocalMetadataProvider.cs b/MediaBrowser.Controller/Providers/ILocalMetadataProvider.cs index fc4cca19c..68f1ae589 100644 --- a/MediaBrowser.Controller/Providers/ILocalMetadataProvider.cs +++ b/MediaBrowser.Controller/Providers/ILocalMetadataProvider.cs @@ -18,7 +18,7 @@ namespace MediaBrowser.Controller.Providers /// The directory service. /// The cancellation token. /// Task{MetadataResult{`0}}. - Task> GetMetadata(ItemInfo info, + Task> GetMetadata(ItemInfo info, IDirectoryService directoryService, CancellationToken cancellationToken); } diff --git a/MediaBrowser.Controller/Providers/IPreRefreshProvider.cs b/MediaBrowser.Controller/Providers/IPreRefreshProvider.cs index 608674905..4170bb375 100644 --- a/MediaBrowser.Controller/Providers/IPreRefreshProvider.cs +++ b/MediaBrowser.Controller/Providers/IPreRefreshProvider.cs @@ -2,6 +2,6 @@ namespace MediaBrowser.Controller.Providers { public interface IPreRefreshProvider : ICustomMetadataProvider { - + } } \ No newline at end of file diff --git a/MediaBrowser.Controller/Providers/IRemoteImageProvider.cs b/MediaBrowser.Controller/Providers/IRemoteImageProvider.cs index 5db5ddbb2..32f51c650 100644 --- a/MediaBrowser.Controller/Providers/IRemoteImageProvider.cs +++ b/MediaBrowser.Controller/Providers/IRemoteImageProvider.cs @@ -19,7 +19,7 @@ namespace MediaBrowser.Controller.Providers /// The item. /// IEnumerable{ImageType}. IEnumerable GetSupportedImages(BaseItem item); - + /// /// Gets the images. /// diff --git a/MediaBrowser.Controller/Resolvers/IItemResolver.cs b/MediaBrowser.Controller/Resolvers/IItemResolver.cs index 3af5d5f7f..298ec248a 100644 --- a/MediaBrowser.Controller/Resolvers/IItemResolver.cs +++ b/MediaBrowser.Controller/Resolvers/IItemResolver.cs @@ -29,7 +29,7 @@ namespace MediaBrowser.Controller.Resolvers public interface IMultiItemResolver { MultiItemResolverResult ResolveMultiple(Folder parent, - List files, + List files, string collectionType, IDirectoryService directoryService); } diff --git a/MediaBrowser.Controller/Security/AuthenticationInfo.cs b/MediaBrowser.Controller/Security/AuthenticationInfo.cs index c75bf89e4..ecb3866d0 100644 --- a/MediaBrowser.Controller/Security/AuthenticationInfo.cs +++ b/MediaBrowser.Controller/Security/AuthenticationInfo.cs @@ -33,7 +33,7 @@ namespace MediaBrowser.Controller.Security /// /// The application version. public string AppVersion { get; set; } - + /// /// Gets or sets the name of the device. /// diff --git a/MediaBrowser.Controller/Security/AuthenticationInfoQuery.cs b/MediaBrowser.Controller/Security/AuthenticationInfoQuery.cs index 125534c46..2fa988ec1 100644 --- a/MediaBrowser.Controller/Security/AuthenticationInfoQuery.cs +++ b/MediaBrowser.Controller/Security/AuthenticationInfoQuery.cs @@ -21,7 +21,7 @@ namespace MediaBrowser.Controller.Security /// /// The access token. public string AccessToken { get; set; } - + /// /// Gets or sets a value indicating whether this instance is active. /// @@ -33,7 +33,7 @@ namespace MediaBrowser.Controller.Security /// /// null if [has user] contains no value, true if [has user]; otherwise, false. public bool? HasUser { get; set; } - + /// /// Gets or sets the start index. /// diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs index eca345cbc..1b51ddc16 100644 --- a/MediaBrowser.Controller/Session/ISessionManager.cs +++ b/MediaBrowser.Controller/Session/ISessionManager.cs @@ -43,7 +43,7 @@ namespace MediaBrowser.Controller.Session event EventHandler SessionEnded; event EventHandler SessionActivity; - + /// /// Occurs when [capabilities changed]. /// @@ -58,7 +58,7 @@ namespace MediaBrowser.Controller.Session /// Occurs when [authentication succeeded]. /// event EventHandler> AuthenticationSucceeded; - + /// /// Gets the sessions. /// @@ -119,7 +119,7 @@ namespace MediaBrowser.Controller.Session /// The cancellation token. /// Task. Task SendGeneralCommand(string controllingSessionId, string sessionId, GeneralCommand command, CancellationToken cancellationToken); - + /// /// Sends the message command. /// @@ -189,7 +189,7 @@ namespace MediaBrowser.Controller.Session /// The cancellation token. /// Task. Task SendMessageToUserDeviceSessions(string deviceId, string name, T data, CancellationToken cancellationToken); - + /// /// Sends the restart required message. /// diff --git a/MediaBrowser.LocalMetadata/Properties/AssemblyInfo.cs b/MediaBrowser.LocalMetadata/Properties/AssemblyInfo.cs index 0d5a8003e..bffe0469f 100644 --- a/MediaBrowser.LocalMetadata/Properties/AssemblyInfo.cs +++ b/MediaBrowser.LocalMetadata/Properties/AssemblyInfo.cs @@ -1,7 +1,7 @@ using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("MediaBrowser.LocalMetadata")] @@ -13,8 +13,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -24,10 +24,10 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] \ No newline at end of file diff --git a/MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs b/MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs index 9761de98f..1edc5c201 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs @@ -46,7 +46,7 @@ namespace MediaBrowser.MediaEncoding.Encoder private readonly ILogger _logger; private readonly IMediaSourceManager _mediaSourceManager; - public EncodingJob(ILogger logger, IMediaSourceManager mediaSourceManager) : + public EncodingJob(ILogger logger, IMediaSourceManager mediaSourceManager) : base(logger, mediaSourceManager, TranscodingJobType.Progressive) { _logger = logger; diff --git a/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs b/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs index 4e6ee89e1..34bc8d1b9 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs @@ -25,7 +25,7 @@ namespace MediaBrowser.MediaEncoding.Encoder private readonly IMediaEncoder _mediaEncoder; protected static readonly CultureInfo UsCulture = new CultureInfo("en-US"); - + public EncodingJobFactory(ILogger logger, ILibraryManager libraryManager, IMediaSourceManager mediaSourceManager, IConfigurationManager config, IMediaEncoder mediaEncoder) { _logger = logger; @@ -255,7 +255,7 @@ namespace MediaBrowser.MediaEncoding.Encoder if (profile == null) { - // Don't use settings from the default profile. + // Don't use settings from the default profile. // Only use a specific profile if it was requested. return; } diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs index a93dd9742..96fe416b2 100644 --- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs +++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs @@ -362,7 +362,7 @@ namespace MediaBrowser.MediaEncoding.Encoder private Tuple GetPathsFromDirectory(string path) { - // Since we can't predict the file extension, first try directly within the folder + // Since we can't predict the file extension, first try directly within the folder // If that doesn't pan out, then do a recursive search var files = FileSystem.GetFilePaths(path); @@ -525,7 +525,7 @@ namespace MediaBrowser.MediaEncoding.Encoder CreateNoWindow = true, UseShellExecute = false, - // Must consume both or ffmpeg may hang due to deadlocks. See comments below. + // Must consume both or ffmpeg may hang due to deadlocks. See comments below. RedirectStandardOutput = true, FileName = FFProbePath, Arguments = string.Format(args, probeSizeArgument, inputPath).Trim(), @@ -648,7 +648,7 @@ namespace MediaBrowser.MediaEncoding.Encoder var tempExtractPath = Path.Combine(ConfigurationManager.ApplicationPaths.TempDirectory, Guid.NewGuid() + ".jpg"); FileSystem.CreateDirectory(FileSystem.GetDirectoryName(tempExtractPath)); - // apply some filters to thumbnail extracted below (below) crop any black lines that we made and get the correct ar then scale to width 600. + // apply some filters to thumbnail extracted below (below) crop any black lines that we made and get the correct ar then scale to width 600. // This filter chain may have adverse effects on recorded tv thumbnails if ar changes during presentation ex. commercials @ diff ar var vf = "scale=600:trunc(600/dar/2)*2"; @@ -676,7 +676,7 @@ namespace MediaBrowser.MediaEncoding.Encoder break; } } - + var mapArg = imageStreamIndex.HasValue ? (" -map 0:v:" + imageStreamIndex.Value.ToString(CultureInfo.InvariantCulture)) : string.Empty; var enableThumbnail = !new List { "wtv" }.Contains(container ?? string.Empty, StringComparer.OrdinalIgnoreCase); diff --git a/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs b/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs index eef273250..350a2e3e5 100644 --- a/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs +++ b/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs @@ -149,7 +149,7 @@ namespace MediaBrowser.MediaEncoding.Probing /// /// The bits_per_raw_sample. public int bits_per_raw_sample { get; set; } - + /// /// Gets or sets the r_frame_rate. /// diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs index 5367a87f7..0b168f10e 100644 --- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs +++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs @@ -132,7 +132,7 @@ namespace MediaBrowser.MediaEncoding.Probing if (!string.IsNullOrWhiteSpace(iTunEXTC)) { var parts = iTunEXTC.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries); - // Example + // Example // mpaa|G|100|For crude humor if (parts.Length > 1) { @@ -423,7 +423,7 @@ namespace MediaBrowser.MediaEncoding.Probing Type = PersonType.Writer }); } - + } else if (string.Equals(key, "producers", StringComparison.OrdinalIgnoreCase)) { @@ -619,7 +619,7 @@ namespace MediaBrowser.MediaEncoding.Probing else if (string.Equals(stream.Codec, "mjpeg", StringComparison.OrdinalIgnoreCase)) { // How to differentiate between video and embedded image? - // The only difference I've seen thus far is presence of codec tag, also embedded images have high (unusual) framerates + // The only difference I've seen thus far is presence of codec tag, also embedded images have high (unusual) framerates if (!string.IsNullOrWhiteSpace(stream.CodecTag)) { stream.Type = MediaStreamType.Video; @@ -1054,7 +1054,7 @@ namespace MediaBrowser.MediaEncoding.Probing /// System.String[][]. private IEnumerable Split(string val, bool allowCommaDelimiter) { - // Only use the comma as a delimeter if there are no slashes or pipes. + // Only use the comma as a delimeter if there are no slashes or pipes. // We want to be careful not to split names that have commas in them var delimeter = !allowCommaDelimiter || _nameDelimiters.Any(i => val.IndexOf(i) != -1) ? _nameDelimiters : diff --git a/MediaBrowser.MediaEncoding/Properties/AssemblyInfo.cs b/MediaBrowser.MediaEncoding/Properties/AssemblyInfo.cs index 53f4eb403..2f26648d0 100644 --- a/MediaBrowser.MediaEncoding/Properties/AssemblyInfo.cs +++ b/MediaBrowser.MediaEncoding/Properties/AssemblyInfo.cs @@ -1,7 +1,7 @@ using System.Reflection; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("MediaBrowser.MediaEncoding")] @@ -13,8 +13,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -24,10 +24,10 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] \ No newline at end of file diff --git a/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs b/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs index 71fefba44..73df2b1e0 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs @@ -29,7 +29,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles while ((line = reader.ReadLine()) != null) { cancellationToken.ThrowIfCancellationRequested(); - + if (string.IsNullOrWhiteSpace(line)) { continue; @@ -49,7 +49,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles RemoteNativeFormatting(subEvent); subEvent.Text = subEvent.Text.Replace("\\n", ParserValues.NewLine, StringComparison.OrdinalIgnoreCase); - + subEvent.Text = Regex.Replace(subEvent.Text, @"\{(\\[\w]+\(?([\w\d]+,?)+\)?)+\}", string.Empty, RegexOptions.IgnoreCase); trackEvents.Add(subEvent); diff --git a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs index 7ca8aa1fd..e9f9c6f58 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs @@ -43,7 +43,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles { continue; } - + var time = Regex.Split(line, @"[\t ]*-->[\t ]*"); if (time.Length < 2) @@ -85,7 +85,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles TimeSpan span; return TimeSpan.TryParseExact(time, @"hh\:mm\:ss\.fff", _usCulture, out span) ? span.Ticks - : (TimeSpan.TryParseExact(time, @"hh\:mm\:ss\,fff", _usCulture, out span) + : (TimeSpan.TryParseExact(time, @"hh\:mm\:ss\,fff", _usCulture, out span) ? span.Ticks : 0); } } diff --git a/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs b/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs index a2cee7793..022fca1c8 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs @@ -129,8 +129,8 @@ namespace MediaBrowser.MediaEncoding.Subtitles } } } - } - + } + //if (header.Length > 0) //subtitle.Header = header.ToString(); diff --git a/MediaBrowser.MediaEncoding/Subtitles/TtmlWriter.cs b/MediaBrowser.MediaEncoding/Subtitles/TtmlWriter.cs index c32005f89..f0cf3b31a 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/TtmlWriter.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/TtmlWriter.cs @@ -45,7 +45,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles writer.WriteLine(""); writer.WriteLine(""); - + writer.WriteLine(""); } } diff --git a/MediaBrowser.Model/Channels/ChannelFeatures.cs b/MediaBrowser.Model/Channels/ChannelFeatures.cs index d4caf499b..259370b7e 100644 --- a/MediaBrowser.Model/Channels/ChannelFeatures.cs +++ b/MediaBrowser.Model/Channels/ChannelFeatures.cs @@ -61,7 +61,7 @@ namespace MediaBrowser.Model.Channels /// /// true if [supports latest media]; otherwise, false. public bool SupportsLatestMedia { get; set; } - + /// /// Gets or sets a value indicating whether this instance can filter. /// diff --git a/MediaBrowser.Model/Channels/ChannelQuery.cs b/MediaBrowser.Model/Channels/ChannelQuery.cs index 6b5e95d69..9651cb6c2 100644 --- a/MediaBrowser.Model/Channels/ChannelQuery.cs +++ b/MediaBrowser.Model/Channels/ChannelQuery.cs @@ -14,7 +14,7 @@ namespace MediaBrowser.Model.Channels public bool? EnableImages { get; set; } public int? ImageTypeLimit { get; set; } public ImageType[] EnableImageTypes { get; set; } - + /// /// Gets or sets the user identifier. /// diff --git a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs index 08bf2379f..76b5924e9 100644 --- a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs +++ b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs @@ -40,7 +40,7 @@ namespace MediaBrowser.Model.Configuration /// /// The cache path. public string CachePath { get; set; } - + /// /// Initializes a new instance of the class. /// diff --git a/MediaBrowser.Model/Dlna/AudioOptions.cs b/MediaBrowser.Model/Dlna/AudioOptions.cs index 189f64635..9480311b5 100644 --- a/MediaBrowser.Model/Dlna/AudioOptions.cs +++ b/MediaBrowser.Model/Dlna/AudioOptions.cs @@ -55,7 +55,7 @@ namespace MediaBrowser.Model.Dlna /// /// The audio transcoding bitrate. public int? AudioTranscodingBitrate { get; set; } - + /// /// Gets the maximum bitrate. /// diff --git a/MediaBrowser.Model/Dlna/CodecProfile.cs b/MediaBrowser.Model/Dlna/CodecProfile.cs index 6d143962d..c40408e9b 100644 --- a/MediaBrowser.Model/Dlna/CodecProfile.cs +++ b/MediaBrowser.Model/Dlna/CodecProfile.cs @@ -9,7 +9,7 @@ namespace MediaBrowser.Model.Dlna { [XmlAttribute("type")] public CodecType Type { get; set; } - + public ProfileCondition[] Conditions { get; set; } public ProfileCondition[] ApplyConditions { get; set; } diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.cs index a550ee982..5bcee6de2 100644 --- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs +++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs @@ -98,7 +98,7 @@ namespace MediaBrowser.Model.Dlna public bool IsVideoAudioConditionSatisfied(ProfileCondition condition, int? audioChannels, int? audioBitrate, - int? audioSampleRate, + int? audioSampleRate, int? audioBitDepth, string audioProfile, bool? isSecondaryTrack) diff --git a/MediaBrowser.Model/Dlna/ProfileCondition.cs b/MediaBrowser.Model/Dlna/ProfileCondition.cs index 9234a2713..39f99b92e 100644 --- a/MediaBrowser.Model/Dlna/ProfileCondition.cs +++ b/MediaBrowser.Model/Dlna/ProfileCondition.cs @@ -24,7 +24,7 @@ namespace MediaBrowser.Model.Dlna public ProfileCondition(ProfileConditionType condition, ProfileConditionValue property, string value) : this(condition, property, value, false) { - + } public ProfileCondition(ProfileConditionType condition, ProfileConditionValue property, string value, bool isRequired) diff --git a/MediaBrowser.Model/Dlna/SearchCriteria.cs b/MediaBrowser.Model/Dlna/SearchCriteria.cs index 533605d89..4f931d1b1 100644 --- a/MediaBrowser.Model/Dlna/SearchCriteria.cs +++ b/MediaBrowser.Model/Dlna/SearchCriteria.cs @@ -48,7 +48,7 @@ namespace MediaBrowser.Model.Dlna if (subFactors.Length == 3) { - if (StringHelper.EqualsIgnoreCase("upnp:class", subFactors[0]) && + if (StringHelper.EqualsIgnoreCase("upnp:class", subFactors[0]) && (StringHelper.EqualsIgnoreCase("=", subFactors[1]) || StringHelper.EqualsIgnoreCase("derivedfrom", subFactors[1]))) { if (StringHelper.EqualsIgnoreCase("\"object.item.imageItem\"", subFactors[2]) || StringHelper.EqualsIgnoreCase("\"object.item.imageItem.photo\"", subFactors[2])) diff --git a/MediaBrowser.Model/Dlna/SortCriteria.cs b/MediaBrowser.Model/Dlna/SortCriteria.cs index 600a2f58e..ecaf32614 100644 --- a/MediaBrowser.Model/Dlna/SortCriteria.cs +++ b/MediaBrowser.Model/Dlna/SortCriteria.cs @@ -11,7 +11,7 @@ namespace MediaBrowser.Model.Dlna public SortCriteria(string value) { - + } } } diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index 41306b4c3..b4021e999 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -951,7 +951,7 @@ namespace MediaBrowser.Model.Dlna if (audioStream != null) { - // Seeing webm encoding failures when source has 1 audio channel and 22k bitrate. + // Seeing webm encoding failures when source has 1 audio channel and 22k bitrate. // Any attempts to transcode over 64k will fail if (audioStream.Channels.HasValue && audioStream.Channels.Value == 1) diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index 746d38679..7ff883798 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -46,7 +46,7 @@ namespace MediaBrowser.Model.Dto /// /// The type of the source. public string SourceType { get; set; } - + /// /// Gets or sets the playlist item identifier. /// diff --git a/MediaBrowser.Model/Dto/GameSystemSummary.cs b/MediaBrowser.Model/Dto/GameSystemSummary.cs index 0f21533a0..b42e98842 100644 --- a/MediaBrowser.Model/Dto/GameSystemSummary.cs +++ b/MediaBrowser.Model/Dto/GameSystemSummary.cs @@ -18,7 +18,7 @@ namespace MediaBrowser.Model.Dto /// /// The name. public string DisplayName { get; set; } - + /// /// Gets or sets the game count. /// diff --git a/MediaBrowser.Model/Dto/ImageOptions.cs b/MediaBrowser.Model/Dto/ImageOptions.cs index 98bd0279a..e98d54435 100644 --- a/MediaBrowser.Model/Dto/ImageOptions.cs +++ b/MediaBrowser.Model/Dto/ImageOptions.cs @@ -92,7 +92,7 @@ namespace MediaBrowser.Model.Dto /// /// The un played count. public int? UnPlayedCount { get; set; } - + /// /// Gets or sets the color of the background. /// diff --git a/MediaBrowser.Model/Dto/NameValuePair.cs b/MediaBrowser.Model/Dto/NameValuePair.cs index a6e687949..564e32dcd 100644 --- a/MediaBrowser.Model/Dto/NameValuePair.cs +++ b/MediaBrowser.Model/Dto/NameValuePair.cs @@ -5,7 +5,7 @@ namespace MediaBrowser.Model.Dto { public NameValuePair() { - + } public NameValuePair(string name, string value) diff --git a/MediaBrowser.Model/Dto/UserDto.cs b/MediaBrowser.Model/Dto/UserDto.cs index 8d7679fdb..eb4979632 100644 --- a/MediaBrowser.Model/Dto/UserDto.cs +++ b/MediaBrowser.Model/Dto/UserDto.cs @@ -44,13 +44,13 @@ namespace MediaBrowser.Model.Dto /// /// The type of the connect link. public UserLinkType? ConnectLinkType { get; set; } - + /// /// Gets or sets the id. /// /// The id. public Guid Id { get; set; } - + /// /// Gets or sets the primary image tag. /// diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs index 35369fbbb..454e6ff16 100644 --- a/MediaBrowser.Model/Entities/MediaStream.cs +++ b/MediaBrowser.Model/Entities/MediaStream.cs @@ -420,7 +420,7 @@ namespace MediaBrowser.Model.Entities var fromCodec = Codec; - // Can't convert from this + // Can't convert from this if (StringHelper.EqualsIgnoreCase(fromCodec, "ass")) { return false; @@ -430,7 +430,7 @@ namespace MediaBrowser.Model.Entities return false; } - // Can't convert to this + // Can't convert to this if (StringHelper.EqualsIgnoreCase(toCodec, "ass")) { return false; diff --git a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs index e10232baa..35900b544 100644 --- a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs +++ b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs @@ -18,7 +18,7 @@ namespace MediaBrowser.Model.Entities { return !string.IsNullOrEmpty(instance.GetProviderId(provider.ToString())); } - + /// /// Gets a provider id /// @@ -65,7 +65,7 @@ namespace MediaBrowser.Model.Entities { throw new ArgumentNullException("instance"); } - + // If it's null remove the key from the dictionary if (string.IsNullOrEmpty(value)) { diff --git a/MediaBrowser.Model/Extensions/LinqExtensions.cs b/MediaBrowser.Model/Extensions/LinqExtensions.cs index 1223e689e..d50b570ea 100644 --- a/MediaBrowser.Model/Extensions/LinqExtensions.cs +++ b/MediaBrowser.Model/Extensions/LinqExtensions.cs @@ -6,13 +6,13 @@ namespace MediaBrowser.Model.Extensions { // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. - // + // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at - // + // // http://www.apache.org/licenses/LICENSE-2.0 - // + // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs index 5fe77d41e..a9546bb95 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs @@ -37,7 +37,7 @@ namespace MediaBrowser.Model.LiveTv /// /// true if [enable favorite sorting]; otherwise, false. public bool EnableFavoriteSorting { get; set; } - + /// /// Gets or sets the user identifier. /// diff --git a/MediaBrowser.Model/Net/HttpException.cs b/MediaBrowser.Model/Net/HttpException.cs index 698b1bc7e..2f45299e3 100644 --- a/MediaBrowser.Model/Net/HttpException.cs +++ b/MediaBrowser.Model/Net/HttpException.cs @@ -28,7 +28,7 @@ namespace MediaBrowser.Model.Net public HttpException(string message, Exception innerException) : base(message, innerException) { - + } /// diff --git a/MediaBrowser.Model/Notifications/NotificationOption.cs b/MediaBrowser.Model/Notifications/NotificationOption.cs index ce49ae209..51a07370f 100644 --- a/MediaBrowser.Model/Notifications/NotificationOption.cs +++ b/MediaBrowser.Model/Notifications/NotificationOption.cs @@ -21,7 +21,7 @@ namespace MediaBrowser.Model.Notifications /// /// true if enabled; otherwise, false. public bool Enabled { get; set; } - + /// /// Gets or sets the disabled services. /// diff --git a/MediaBrowser.Model/Properties/AssemblyInfo.cs b/MediaBrowser.Model/Properties/AssemblyInfo.cs index fabfd908b..e34472f08 100644 --- a/MediaBrowser.Model/Properties/AssemblyInfo.cs +++ b/MediaBrowser.Model/Properties/AssemblyInfo.cs @@ -1,7 +1,7 @@ using System.Reflection; using System.Resources; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("MediaBrowser.Model")] @@ -17,7 +17,7 @@ using System.Resources; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // \ No newline at end of file diff --git a/MediaBrowser.Model/Providers/RemoteImageInfo.cs b/MediaBrowser.Model/Providers/RemoteImageInfo.cs index 6db7f77bd..90c1ba0af 100644 --- a/MediaBrowser.Model/Providers/RemoteImageInfo.cs +++ b/MediaBrowser.Model/Providers/RemoteImageInfo.cs @@ -24,7 +24,7 @@ namespace MediaBrowser.Model.Providers /// Gets a url used for previewing a smaller version /// public string ThumbnailUrl { get; set; } - + /// /// Gets or sets the height. /// diff --git a/MediaBrowser.Model/Querying/AllThemeMediaResult.cs b/MediaBrowser.Model/Querying/AllThemeMediaResult.cs index 89640eb65..57114cc4a 100644 --- a/MediaBrowser.Model/Querying/AllThemeMediaResult.cs +++ b/MediaBrowser.Model/Querying/AllThemeMediaResult.cs @@ -7,7 +7,7 @@ public ThemeMediaResult ThemeSongsResult { get; set; } public ThemeMediaResult SoundtrackSongsResult { get; set; } - + public AllThemeMediaResult() { ThemeVideosResult = new ThemeMediaResult(); diff --git a/MediaBrowser.Model/Querying/EpisodeQuery.cs b/MediaBrowser.Model/Querying/EpisodeQuery.cs index 78fe943e3..cae87b852 100644 --- a/MediaBrowser.Model/Querying/EpisodeQuery.cs +++ b/MediaBrowser.Model/Querying/EpisodeQuery.cs @@ -53,7 +53,7 @@ namespace MediaBrowser.Model.Querying /// /// The start item identifier. public string StartItemId { get; set; } - + public EpisodeQuery() { Fields = new ItemFields[] { }; diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs index 92fa3822b..ceccf5ee5 100644 --- a/MediaBrowser.Model/Querying/ItemFields.cs +++ b/MediaBrowser.Model/Querying/ItemFields.cs @@ -41,7 +41,7 @@ /// The custom rating /// CustomRating, - + /// /// The date created of the item /// diff --git a/MediaBrowser.Model/Querying/NextUpQuery.cs b/MediaBrowser.Model/Querying/NextUpQuery.cs index d20ff99c2..2af8738d7 100644 --- a/MediaBrowser.Model/Querying/NextUpQuery.cs +++ b/MediaBrowser.Model/Querying/NextUpQuery.cs @@ -16,13 +16,13 @@ namespace MediaBrowser.Model.Querying /// /// The parent identifier. public string ParentId { get; set; } - + /// /// Gets or sets the series id. /// /// The series id. public string SeriesId { get; set; } - + /// /// Skips over a given number of items within the results. Use for paging. /// diff --git a/MediaBrowser.Model/Search/SearchHint.cs b/MediaBrowser.Model/Search/SearchHint.cs index daa3566cf..48da8e4bc 100644 --- a/MediaBrowser.Model/Search/SearchHint.cs +++ b/MediaBrowser.Model/Search/SearchHint.cs @@ -14,7 +14,7 @@ namespace MediaBrowser.Model.Search public Guid ItemId { get; set; } public Guid Id { get; set; } - + /// /// Gets or sets the name. /// @@ -26,7 +26,7 @@ namespace MediaBrowser.Model.Search /// /// The matched term. public string MatchedTerm { get; set; } - + /// /// Gets or sets the index number. /// @@ -38,7 +38,7 @@ namespace MediaBrowser.Model.Search /// /// The production year. public int? ProductionYear { get; set; } - + /// /// Gets or sets the parent index number. /// @@ -74,7 +74,7 @@ namespace MediaBrowser.Model.Search /// /// The backdrop image item identifier. public string BackdropImageItemId { get; set; } - + /// /// Gets or sets the type. /// @@ -82,13 +82,13 @@ namespace MediaBrowser.Model.Search public string Type { get; set; } public bool? IsFolder { get; set; } - + /// /// Gets or sets the run time ticks. /// /// The run time ticks. public long? RunTimeTicks { get; set; } - + /// /// Gets or sets the type of the media. /// diff --git a/MediaBrowser.Model/Serialization/IXmlSerializer.cs b/MediaBrowser.Model/Serialization/IXmlSerializer.cs index b26b673f3..eb23d784f 100644 --- a/MediaBrowser.Model/Serialization/IXmlSerializer.cs +++ b/MediaBrowser.Model/Serialization/IXmlSerializer.cs @@ -34,7 +34,7 @@ namespace MediaBrowser.Model.Serialization /// The file. /// System.Object. object DeserializeFromFile(Type type, string file); - + /// /// Deserializes from bytes. /// diff --git a/MediaBrowser.Model/Services/ApiMemberAttribute.cs b/MediaBrowser.Model/Services/ApiMemberAttribute.cs index 4a2831775..9e5faad29 100644 --- a/MediaBrowser.Model/Services/ApiMemberAttribute.cs +++ b/MediaBrowser.Model/Services/ApiMemberAttribute.cs @@ -16,7 +16,7 @@ namespace MediaBrowser.Model.Services public string ParameterType { get; set; } /// - /// Gets or sets unique name for the parameter. Each name must be unique, even if they are associated with different paramType values. + /// Gets or sets unique name for the parameter. Each name must be unique, even if they are associated with different paramType values. /// /// /// @@ -49,7 +49,7 @@ namespace MediaBrowser.Model.Services public bool AllowMultiple { get; set; } /// - /// Gets or sets route to which applies attribute, matches using StartsWith. By default applies to all routes. + /// Gets or sets route to which applies attribute, matches using StartsWith. By default applies to all routes. /// public string Route { get; set; } diff --git a/MediaBrowser.Model/Services/IHasRequestFilter.cs b/MediaBrowser.Model/Services/IHasRequestFilter.cs index 2164179d5..90cfc2a31 100644 --- a/MediaBrowser.Model/Services/IHasRequestFilter.cs +++ b/MediaBrowser.Model/Services/IHasRequestFilter.cs @@ -4,7 +4,7 @@ namespace MediaBrowser.Model.Services public interface IHasRequestFilter { /// - /// Order in which Request Filters are executed. + /// Order in which Request Filters are executed. /// <0 Executed before global request filters /// >0 Executed after global request filters /// diff --git a/MediaBrowser.Model/Services/IHttpResponse.cs b/MediaBrowser.Model/Services/IHttpResponse.cs index cd9c07d46..9d77eefc9 100644 --- a/MediaBrowser.Model/Services/IHttpResponse.cs +++ b/MediaBrowser.Model/Services/IHttpResponse.cs @@ -17,7 +17,7 @@ namespace MediaBrowser.Model.Services void SetCookie(Cookie cookie); /// - /// Removes all pending Set-Cookie instructions + /// Removes all pending Set-Cookie instructions /// void ClearCookies(); } diff --git a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs index ce6b2875e..dfdd42c36 100644 --- a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs +++ b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs @@ -25,7 +25,7 @@ namespace MediaBrowser.Model.Session /// /// The item identifier. public Guid ItemId { get; set; } - + /// /// Gets or sets the session id. /// diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs index a63ce5e66..5d019932a 100644 --- a/MediaBrowser.Model/System/SystemInfo.cs +++ b/MediaBrowser.Model/System/SystemInfo.cs @@ -17,7 +17,7 @@ namespace MediaBrowser.Model.System public string OperatingSystemDisplayName { get; set; } public string PackageName { get; set; } - + /// /// Gets or sets a value indicating whether this instance has pending restart. /// diff --git a/MediaBrowser.Model/Tasks/ITaskManager.cs b/MediaBrowser.Model/Tasks/ITaskManager.cs index cbc18032c..dd29cdb65 100644 --- a/MediaBrowser.Model/Tasks/ITaskManager.cs +++ b/MediaBrowser.Model/Tasks/ITaskManager.cs @@ -52,7 +52,7 @@ namespace MediaBrowser.Model.Tasks void QueueIfNotRunning() where T : IScheduledTask; - + /// /// Queues the scheduled task. /// @@ -69,7 +69,7 @@ namespace MediaBrowser.Model.Tasks void Execute() where T : IScheduledTask; - + event EventHandler> TaskExecuting; event EventHandler TaskCompleted; diff --git a/MediaBrowser.Model/Tasks/TaskResult.cs b/MediaBrowser.Model/Tasks/TaskResult.cs index 39eacdf66..9cc45a16b 100644 --- a/MediaBrowser.Model/Tasks/TaskResult.cs +++ b/MediaBrowser.Model/Tasks/TaskResult.cs @@ -36,7 +36,7 @@ namespace MediaBrowser.Model.Tasks /// /// The key. public string Key { get; set; } - + /// /// Gets or sets the id. /// diff --git a/MediaBrowser.Model/Updates/PackageInfo.cs b/MediaBrowser.Model/Updates/PackageInfo.cs index e46d59fc0..464ea295d 100644 --- a/MediaBrowser.Model/Updates/PackageInfo.cs +++ b/MediaBrowser.Model/Updates/PackageInfo.cs @@ -164,7 +164,7 @@ namespace MediaBrowser.Model.Updates /// /// The installs. public int installs { get; set; } - + /// /// Initializes a new instance of the class. /// diff --git a/MediaBrowser.Providers/BoxSets/MovieDbBoxSetImageProvider.cs b/MediaBrowser.Providers/BoxSets/MovieDbBoxSetImageProvider.cs index 729897290..79b9aaf98 100644 --- a/MediaBrowser.Providers/BoxSets/MovieDbBoxSetImageProvider.cs +++ b/MediaBrowser.Providers/BoxSets/MovieDbBoxSetImageProvider.cs @@ -42,7 +42,7 @@ namespace MediaBrowser.Providers.BoxSets { return new List { - ImageType.Primary, + ImageType.Primary, ImageType.Backdrop }; } diff --git a/MediaBrowser.Providers/BoxSets/MovieDbBoxSetProvider.cs b/MediaBrowser.Providers/BoxSets/MovieDbBoxSetProvider.cs index d58aa336b..eacc983d5 100644 --- a/MediaBrowser.Providers/BoxSets/MovieDbBoxSetProvider.cs +++ b/MediaBrowser.Providers/BoxSets/MovieDbBoxSetProvider.cs @@ -50,7 +50,7 @@ namespace MediaBrowser.Providers.BoxSets } private readonly CultureInfo _usCulture = new CultureInfo("en-US"); - + public async Task> GetSearchResults(BoxSetInfo searchInfo, CancellationToken cancellationToken) { var tmdbId = searchInfo.GetProviderId(MetadataProviders.Tmdb); @@ -73,7 +73,7 @@ namespace MediaBrowser.Providers.BoxSets Name = info.name, SearchProviderName = Name, - + ImageUrl = images.Count == 0 ? null : (tmdbImageUrl + images[0].file_path) }; diff --git a/MediaBrowser.Providers/Manager/GenericPriorityQueue.cs b/MediaBrowser.Providers/Manager/GenericPriorityQueue.cs index 0e6c07357..fa080397b 100644 --- a/MediaBrowser.Providers/Manager/GenericPriorityQueue.cs +++ b/MediaBrowser.Providers/Manager/GenericPriorityQueue.cs @@ -303,7 +303,7 @@ namespace Priority_Queue } /// - /// This method must be called on a node every time its priority changes while it is in the queue. + /// This method must be called on a node every time its priority changes while it is in the queue. /// Forgetting to call this method will result in a corrupted queue! /// Calling this method on a node not in the queue results in undefined behavior /// O(log n) @@ -344,7 +344,7 @@ namespace Priority_Queue } /// - /// Removes a node from the queue. The node does not need to be the head of the queue. + /// Removes a node from the queue. The node does not need to be the head of the queue. /// If the node is not in the queue, the result is undefined. If unsure, check Contains() first /// O(log n) /// diff --git a/MediaBrowser.Providers/Manager/IPriorityQueue.cs b/MediaBrowser.Providers/Manager/IPriorityQueue.cs index 23f08a13e..efc9fc2ef 100644 --- a/MediaBrowser.Providers/Manager/IPriorityQueue.cs +++ b/MediaBrowser.Providers/Manager/IPriorityQueue.cs @@ -36,12 +36,12 @@ namespace Priority_Queue bool Contains(TItem node); /// - /// Removes a node from the queue. The node does not need to be the head of the queue. + /// Removes a node from the queue. The node does not need to be the head of the queue. /// void Remove(TItem node); /// - /// Call this method to change the priority of a node. + /// Call this method to change the priority of a node. /// void UpdatePriority(TItem node, TPriority priority); diff --git a/MediaBrowser.Providers/Manager/ImageSaver.cs b/MediaBrowser.Providers/Manager/ImageSaver.cs index 6790f9b33..047c59028 100644 --- a/MediaBrowser.Providers/Manager/ImageSaver.cs +++ b/MediaBrowser.Providers/Manager/ImageSaver.cs @@ -174,7 +174,7 @@ namespace MediaBrowser.Providers.Manager } catch (FileNotFoundException) { - + } finally { diff --git a/MediaBrowser.Providers/Manager/SimplePriorityQueue.cs b/MediaBrowser.Providers/Manager/SimplePriorityQueue.cs index 879ae1dca..36f2605fa 100644 --- a/MediaBrowser.Providers/Manager/SimplePriorityQueue.cs +++ b/MediaBrowser.Providers/Manager/SimplePriorityQueue.cs @@ -167,9 +167,9 @@ namespace Priority_Queue } /// - /// Removes an item from the queue. The item does not need to be the head of the queue. + /// Removes an item from the queue. The item does not need to be the head of the queue. /// If the item is not in the queue, an exception is thrown. If unsure, check Contains() first. - /// If multiple copies of the item are enqueued, only the first one is removed. + /// If multiple copies of the item are enqueued, only the first one is removed. /// O(n) /// public void Remove(TItem item) diff --git a/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs b/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs index 81abedeb9..02fb50ae9 100644 --- a/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs +++ b/MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs @@ -210,8 +210,8 @@ namespace MediaBrowser.Providers.MediaInfo public IEnumerable GetDefaultTriggers() { - return new[] { - + return new[] { + // Every so often new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks} }; diff --git a/MediaBrowser.Providers/Movies/GenericMovieDbInfo.cs b/MediaBrowser.Providers/Movies/GenericMovieDbInfo.cs index 1fce01903..039f2efaf 100644 --- a/MediaBrowser.Providers/Movies/GenericMovieDbInfo.cs +++ b/MediaBrowser.Providers/Movies/GenericMovieDbInfo.cs @@ -43,7 +43,7 @@ namespace MediaBrowser.Providers.Movies var tmdbId = itemId.GetProviderId(MetadataProviders.Tmdb); var imdbId = itemId.GetProviderId(MetadataProviders.Imdb); - // Don't search for music video id's because it is very easy to misidentify. + // Don't search for music video id's because it is very easy to misidentify. if (string.IsNullOrEmpty(tmdbId) && string.IsNullOrEmpty(imdbId) && typeof(T) != typeof(MusicVideo)) { var searchResults = await new MovieDbSearch(_logger, _jsonSerializer, _libraryManager).GetMovieSearchResults(itemId, cancellationToken).ConfigureAwait(false); diff --git a/MediaBrowser.Providers/Movies/MovieDbImageProvider.cs b/MediaBrowser.Providers/Movies/MovieDbImageProvider.cs index ad45c8432..ae466c47e 100644 --- a/MediaBrowser.Providers/Movies/MovieDbImageProvider.cs +++ b/MediaBrowser.Providers/Movies/MovieDbImageProvider.cs @@ -50,7 +50,7 @@ namespace MediaBrowser.Providers.Movies { return new List { - ImageType.Primary, + ImageType.Primary, ImageType.Backdrop }; } diff --git a/MediaBrowser.Providers/Music/AlbumMetadataService.cs b/MediaBrowser.Providers/Music/AlbumMetadataService.cs index ae81545a6..a035dd758 100644 --- a/MediaBrowser.Providers/Music/AlbumMetadataService.cs +++ b/MediaBrowser.Providers/Music/AlbumMetadataService.cs @@ -79,7 +79,7 @@ namespace MediaBrowser.Providers.Music private ItemUpdateType SetAlbumArtistFromSongs(MusicAlbum item, IEnumerable public string MovieHash { get { return movieHash; } set { movieHash = value; } } /// - /// Size of video file in bytes + /// Size of video file in bytes /// public long MovieByteSize { get { return movieByteSize; } set { movieByteSize = value; } } /// diff --git a/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs b/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs index 06fc945a8..1efa3dd5b 100644 --- a/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs +++ b/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs @@ -250,7 +250,7 @@ namespace XmlRpcHandler } return reader.ReadContentAsString(); } - + private static IXmlRpcValue ReadValue(XmlReader xmlReader, bool skipRead = false) { while (skipRead || xmlReader.Read()) diff --git a/RSSDP/Properties/AssemblyInfo.cs b/RSSDP/Properties/AssemblyInfo.cs index 1ce64b159..f0584fa1a 100644 --- a/RSSDP/Properties/AssemblyInfo.cs +++ b/RSSDP/Properties/AssemblyInfo.cs @@ -3,7 +3,7 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("RSSDP2")] @@ -19,11 +19,11 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] diff --git a/RSSDP/SsdpDeviceLocator.cs b/RSSDP/SsdpDeviceLocator.cs index 32289822f..c7daf359d 100644 --- a/RSSDP/SsdpDeviceLocator.cs +++ b/RSSDP/SsdpDeviceLocator.cs @@ -53,7 +53,7 @@ namespace Rssdp.Infrastructure #region Events /// - /// Raised for when + /// Raised for when /// /// An 'alive' notification is received that a device, regardless of whether or not that device is not already in the cache or has previously raised this event. /// For each item found during a device (cached or not), allowing clients to respond to found devices before the entire search is complete. diff --git a/SocketHttpListener/Net/ChunkedInputStream.cs b/SocketHttpListener/Net/ChunkedInputStream.cs index c3bbff82d..4d6d96a6c 100644 --- a/SocketHttpListener/Net/ChunkedInputStream.cs +++ b/SocketHttpListener/Net/ChunkedInputStream.cs @@ -23,10 +23,10 @@ namespace SocketHttpListener.Net // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: - // + // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. - // + // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND diff --git a/SocketHttpListener/Net/HttpEndPointListener.cs b/SocketHttpListener/Net/HttpEndPointListener.cs index fb093314c..35f60a9fb 100644 --- a/SocketHttpListener/Net/HttpEndPointListener.cs +++ b/SocketHttpListener/Net/HttpEndPointListener.cs @@ -177,9 +177,9 @@ namespace SocketHttpListener.Net } } - // This method is the callback method associated with Socket.AcceptAsync - // operations and is invoked when an accept operation is complete - // + // This method is the callback method associated with Socket.AcceptAsync + // operations and is invoked when an accept operation is complete + // private static void OnAccept(object sender, SocketAsyncEventArgs e) { ProcessAccept(e); diff --git a/SocketHttpListener/Net/HttpListener.cs b/SocketHttpListener/Net/HttpListener.cs index 941b99f35..4c4832336 100644 --- a/SocketHttpListener/Net/HttpListener.cs +++ b/SocketHttpListener/Net/HttpListener.cs @@ -35,7 +35,7 @@ namespace SocketHttpListener.Net bool listening; bool disposed; - Dictionary registry; // Dictionary + Dictionary registry; // Dictionary Dictionary connections; private ILogger _logger; private X509Certificate _certificate; diff --git a/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs b/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs index 34b5eaf74..63790d796 100644 --- a/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs +++ b/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs @@ -28,11 +28,11 @@ namespace SocketHttpListener.Net // The raw path is parsed by looping through all characters from left to right. 'rawOctets' // is used to store consecutive percent encoded octets as actual byte values: e.g. for path /pa%C3%84th%2F/ // rawOctets will be set to { 0xC3, 0x84 } when we reach character 't' and it will be { 0x2F } when - // we reach the final '/'. I.e. after a sequence of percent encoded octets ends, we use rawOctets as + // we reach the final '/'. I.e. after a sequence of percent encoded octets ends, we use rawOctets as // input to the encoding and percent encode the resulting string into UTF-8 octets. // // When parsing ANSI (Latin 1) encoded path '/pa%C4th/', %C4 will be added to rawOctets and when - // we reach 't', the content of rawOctets { 0xC4 } will be fed into the ANSI encoding. The resulting + // we reach 't', the content of rawOctets { 0xC4 } will be fed into the ANSI encoding. The resulting // string 'Ä' will be percent encoded into UTF-8 octets and appended to requestUriString. The final // path will be '/pa%C3%84th/', where '%C3%84' is the UTF-8 percent encoded character 'Ä'. private List _rawOctets; @@ -146,7 +146,7 @@ namespace SocketHttpListener.Net if (!Uri.TryCreate(_requestUriString.ToString(), UriKind.Absolute, out _requestUri)) { - // If we can't create a Uri from the string, this is an invalid string and it doesn't make + // If we can't create a Uri from the string, this is an invalid string and it doesn't make // sense to try another encoding. result = ParsingResult.InvalidString; } @@ -196,7 +196,7 @@ namespace SocketHttpListener.Net } else { - // We found '%', but not followed by 'u', i.e. we have a percent encoded octed: %XX + // We found '%', but not followed by 'u', i.e. we have a percent encoded octed: %XX if (!AddPercentEncodedOctetToRawOctetsList(encoding, _rawPath.Substring(index, 2))) { return ParsingResult.InvalidString; @@ -207,7 +207,7 @@ namespace SocketHttpListener.Net else { // We found a non-'%' character: decode the content of rawOctets into percent encoded - // UTF-8 characters and append it to the result. + // UTF-8 characters and append it to the result. if (!EmptyDecodeAndAppendRawOctetsList(encoding)) { return ParsingResult.EncodingError; @@ -402,7 +402,7 @@ namespace SocketHttpListener.Net // Find end of path: The path is terminated by // - the first '?' character - // - the first '#' character: This is never the case here, since http.sys won't accept + // - the first '#' character: This is never the case here, since http.sys won't accept // Uris containing fragments. Also, RFC2616 doesn't allow fragments in request Uris. // - end of Uri string int queryIndex = uriString.IndexOf('?'); diff --git a/SocketHttpListener/Net/WebSockets/HttpWebSocket.cs b/SocketHttpListener/Net/WebSockets/HttpWebSocket.cs index 9dc9143f8..1649050d9 100644 --- a/SocketHttpListener/Net/WebSockets/HttpWebSocket.cs +++ b/SocketHttpListener/Net/WebSockets/HttpWebSocket.cs @@ -30,7 +30,7 @@ namespace SocketHttpListener.Net.WebSockets return retVal; } - // return value here signifies if a Sec-WebSocket-Protocol header should be returned by the server. + // return value here signifies if a Sec-WebSocket-Protocol header should be returned by the server. internal static bool ProcessWebSocketProtocolHeader(string clientSecWebSocketProtocol, string subProtocol, out string acceptProtocol) @@ -44,7 +44,7 @@ namespace SocketHttpListener.Net.WebSockets // If the server specified _anything_ this isn't valid. throw new WebSocketException("UnsupportedProtocol"); } - // Treat empty and null from the server as the same thing here, server should not send headers. + // Treat empty and null from the server as the same thing here, server should not send headers. return false; } @@ -52,7 +52,7 @@ namespace SocketHttpListener.Net.WebSockets if (subProtocol == null) { - // client specified some protocols, server specified 'null'. So server should send headers. + // client specified some protocols, server specified 'null'. So server should send headers. return true; } @@ -63,8 +63,8 @@ namespace SocketHttpListener.Net.WebSockets StringSplitOptions.RemoveEmptyEntries); acceptProtocol = subProtocol; - // client specified protocols, serverOptions has exactly 1 non-empty entry. Check that - // this exists in the list the client specified. + // client specified protocols, serverOptions has exactly 1 non-empty entry. Check that + // this exists in the list the client specified. for (int i = 0; i < requestProtocols.Length; i++) { string currentRequestProtocol = requestProtocols[i].Trim(); diff --git a/SocketHttpListener/Net/WebSockets/WebSocketCloseStatus.cs b/SocketHttpListener/Net/WebSockets/WebSocketCloseStatus.cs index 0f43b7b80..b83b6cd0f 100644 --- a/SocketHttpListener/Net/WebSockets/WebSocketCloseStatus.cs +++ b/SocketHttpListener/Net/WebSockets/WebSocketCloseStatus.cs @@ -22,9 +22,9 @@ namespace SocketHttpListener.Net.WebSockets // 0 - 999 Status codes in the range 0-999 are not used. // 1000 - 1999 Status codes in the range 1000-1999 are reserved for definition by this protocol. // 2000 - 2999 Status codes in the range 2000-2999 are reserved for use by extensions. - // 3000 - 3999 Status codes in the range 3000-3999 MAY be used by libraries and frameworks. The - // interpretation of these codes is undefined by this protocol. End applications MUST - // NOT use status codes in this range. + // 3000 - 3999 Status codes in the range 3000-3999 MAY be used by libraries and frameworks. The + // interpretation of these codes is undefined by this protocol. End applications MUST + // NOT use status codes in this range. // 4000 - 4999 Status codes in the range 4000-4999 MAY be used by application code. The interpretation // of these codes is undefined by this protocol. } diff --git a/SocketHttpListener/Properties/AssemblyInfo.cs b/SocketHttpListener/Properties/AssemblyInfo.cs index 8876cea4f..4151e83e3 100644 --- a/SocketHttpListener/Properties/AssemblyInfo.cs +++ b/SocketHttpListener/Properties/AssemblyInfo.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("SocketHttpListener")] @@ -14,8 +14,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -25,10 +25,10 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -- cgit v1.2.3 From f520ddc9662ec65538374d40f516c5fe6c67bb16 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Tue, 8 Jan 2019 17:29:34 +0100 Subject: Remove useless properties from IEnvironmentInfo --- Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs | 56 +++++++++++----------- Emby.Server.Implementations/ApplicationHost.cs | 25 +++++----- .../EnvironmentInfo/EnvironmentInfo.cs | 25 ---------- MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs | 45 ++--------------- MediaBrowser.Model/System/IEnvironmentInfo.cs | 4 -- 5 files changed, 45 insertions(+), 110 deletions(-) (limited to 'MediaBrowser.Model/System') diff --git a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs index faaed482a..d82d2f2fb 100644 --- a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs +++ b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs @@ -44,13 +44,13 @@ namespace IsoMounter _logger.LogDebug( "[{0}] System PATH is currently set to [{1}].", Name, - EnvironmentInfo.GetEnvironmentVariable("PATH") ?? "" + Environment.GetEnvironmentVariable("PATH") ?? "" ); _logger.LogDebug( "[{0}] System path separator is [{1}].", Name, - EnvironmentInfo.PathSeparator + Path.PathSeparator ); _logger.LogDebug( @@ -118,25 +118,27 @@ namespace IsoMounter public bool CanMount(string path) { - if (EnvironmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Linux) { - _logger.LogInformation( - "[{0}] Checking we can attempt to mount [{1}], Extension = [{2}], Operating System = [{3}], Executables Available = [{4}].", - Name, - path, - Path.GetExtension(path), - EnvironmentInfo.OperatingSystem, - ExecutablesAvailable.ToString() - ); - - if (ExecutablesAvailable) { - return string.Equals(Path.GetExtension(path), ".iso", StringComparison.OrdinalIgnoreCase); - } else { - return false; - } - } else { + if (EnvironmentInfo.OperatingSystem != MediaBrowser.Model.System.OperatingSystem.Linux) + { return false; } + _logger.LogInformation( + "[{0}] Checking we can attempt to mount [{1}], Extension = [{2}], Operating System = [{3}], Executables Available = [{4}].", + Name, + path, + Path.GetExtension(path), + EnvironmentInfo.OperatingSystem, + ExecutablesAvailable.ToString() + ); + if (ExecutablesAvailable) + { + return string.Equals(Path.GetExtension(path), ".iso", StringComparison.OrdinalIgnoreCase); + } + else + { + return false; + } } public Task Install(CancellationToken cancellationToken) @@ -211,18 +213,16 @@ namespace IsoMounter private string GetFullPathForExecutable(string name) { - foreach (string test in (EnvironmentInfo.GetEnvironmentVariable("PATH") ?? "").Split(EnvironmentInfo.PathSeparator)) { - + foreach (string test in (Environment.GetEnvironmentVariable("PATH") ?? "").Split(Path.PathSeparator)) + { string path = test.Trim(); if (!String.IsNullOrEmpty(path) && FileSystem.FileExists(path = Path.Combine(path, name))) { return FileSystem.GetFullPath(path); } - } - return String.Empty; - + return string.Empty; } private uint GetUID() @@ -315,9 +315,9 @@ namespace IsoMounter ); } else { - + throw new ArgumentNullException(nameof(isoPath)); - + } try @@ -397,9 +397,9 @@ namespace IsoMounter ); } else { - + throw new ArgumentNullException(nameof(mount)); - + } if (GetUID() == 0) { @@ -444,7 +444,7 @@ namespace IsoMounter } #endregion - + #region Internal Methods internal void OnUnmount(LinuxMount mount) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index fb053f0e4..b020b33c3 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1188,8 +1188,7 @@ namespace Emby.Server.Implementations HttpClient, ZipClient, ProcessFactory, - 5000, - EnvironmentInfo); + 5000); MediaEncoder = mediaEncoder; RegisterSingleInstance(MediaEncoder); @@ -1647,25 +1646,25 @@ namespace Emby.Server.Implementations // Gets all plugin assemblies by first reading all bytes of the .dll and calling Assembly.Load against that // This will prevent the .dll file from getting locked, and allow us to replace it when needed - // Include composable parts in the Api assembly + // Include composable parts in the Api assembly list.Add(GetAssembly(typeof(ApiEntryPoint))); - // Include composable parts in the Dashboard assembly + // Include composable parts in the Dashboard assembly list.Add(GetAssembly(typeof(DashboardService))); - // Include composable parts in the Model assembly + // Include composable parts in the Model assembly list.Add(GetAssembly(typeof(SystemInfo))); - // Include composable parts in the Common assembly + // Include composable parts in the Common assembly list.Add(GetAssembly(typeof(IApplicationHost))); - // Include composable parts in the Controller assembly + // Include composable parts in the Controller assembly list.Add(GetAssembly(typeof(IServerApplicationHost))); - // Include composable parts in the Providers assembly + // Include composable parts in the Providers assembly list.Add(GetAssembly(typeof(ProviderUtils))); - // Include composable parts in the Photos assembly + // Include composable parts in the Photos assembly list.Add(GetAssembly(typeof(PhotoProvider))); // Emby.Server implementations @@ -1674,16 +1673,16 @@ namespace Emby.Server.Implementations // MediaEncoding list.Add(GetAssembly(typeof(MediaBrowser.MediaEncoding.Encoder.MediaEncoder))); - // Dlna + // Dlna list.Add(GetAssembly(typeof(DlnaEntryPoint))); - // Local metadata + // Local metadata list.Add(GetAssembly(typeof(BoxSetXmlSaver))); // Notifications list.Add(GetAssembly(typeof(NotificationManager))); - // Xbmc + // Xbmc list.Add(GetAssembly(typeof(ArtistNfoProvider))); list.AddRange(GetAssembliesWithPartsInternal().Select(i => new Tuple(i, null))); @@ -2219,7 +2218,7 @@ namespace Emby.Server.Implementations } /// - /// This returns localhost in the case of no external dns, and the hostname if the + /// This returns localhost in the case of no external dns, and the hostname if the /// dns is prefixed with a valid Uri prefix. /// /// The external dns prefix to get the hostname of. diff --git a/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs b/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs index 03e10e7ea..655867577 100644 --- a/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs +++ b/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs @@ -1,11 +1,9 @@ using System; -using System.IO; using MediaBrowser.Model.System; using System.Runtime.InteropServices; namespace Emby.Server.Implementations.EnvironmentInfo { - // TODO: Rework @bond public class EnvironmentInfo : IEnvironmentInfo { public EnvironmentInfo(MediaBrowser.Model.System.OperatingSystem operatingSystem) @@ -39,29 +37,6 @@ namespace Emby.Server.Implementations.EnvironmentInfo } } - public char PathSeparator - { - get - { - return Path.PathSeparator; - } - } - public Architecture SystemArchitecture { get { return RuntimeInformation.OSArchitecture; } } - - public string GetEnvironmentVariable(string name) - { - return Environment.GetEnvironmentVariable(name); - } - - public string StackTrace - { - get { return Environment.StackTrace; } - } - - public void SetProcessEnvironmentVariable(string name, string value) - { - Environment.SetEnvironmentVariable(name, value); - } } } diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs index a93dd9742..a13795548 100644 --- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs +++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs @@ -70,7 +70,6 @@ namespace MediaBrowser.MediaEncoding.Encoder private readonly string _originalFFMpegPath; private readonly string _originalFFProbePath; private readonly int DefaultImageExtractionTimeoutMs; - private readonly IEnvironmentInfo _environmentInfo; public MediaEncoder(ILogger logger, IJsonSerializer jsonSerializer, @@ -89,8 +88,7 @@ namespace MediaBrowser.MediaEncoding.Encoder IHttpClient httpClient, IZipClient zipClient, IProcessFactory processFactory, - int defaultImageExtractionTimeoutMs, - IEnvironmentInfo environmentInfo) + int defaultImageExtractionTimeoutMs) { _logger = logger; _jsonSerializer = jsonSerializer; @@ -107,46 +105,13 @@ namespace MediaBrowser.MediaEncoding.Encoder _zipClient = zipClient; _processFactory = processFactory; DefaultImageExtractionTimeoutMs = defaultImageExtractionTimeoutMs; - _environmentInfo = environmentInfo; FFProbePath = ffProbePath; FFMpegPath = ffMpegPath; _originalFFProbePath = ffProbePath; _originalFFMpegPath = ffMpegPath; - _hasExternalEncoder = hasExternalEncoder; } - private readonly object _logLock = new object(); - public void SetLogFilename(string name) - { - lock (_logLock) - { - try - { - _environmentInfo.SetProcessEnvironmentVariable("FFREPORT", "file=" + name + ":level=32"); - } - catch (Exception ex) - { - _logger.LogError(ex, "Error setting FFREPORT environment variable"); - } - } - } - - public void ClearLogFilename() - { - lock (_logLock) - { - try - { - _environmentInfo.SetProcessEnvironmentVariable("FFREPORT", null); - } - catch (Exception ex) - { - _logger.LogError(ex, "Error setting FFREPORT environment variable"); - } - } - } - public string EncoderLocationType { get @@ -362,7 +327,7 @@ namespace MediaBrowser.MediaEncoding.Encoder private Tuple GetPathsFromDirectory(string path) { - // Since we can't predict the file extension, first try directly within the folder + // Since we can't predict the file extension, first try directly within the folder // If that doesn't pan out, then do a recursive search var files = FileSystem.GetFilePaths(path); @@ -525,7 +490,7 @@ namespace MediaBrowser.MediaEncoding.Encoder CreateNoWindow = true, UseShellExecute = false, - // Must consume both or ffmpeg may hang due to deadlocks. See comments below. + // Must consume both or ffmpeg may hang due to deadlocks. See comments below. RedirectStandardOutput = true, FileName = FFProbePath, Arguments = string.Format(args, probeSizeArgument, inputPath).Trim(), @@ -648,7 +613,7 @@ namespace MediaBrowser.MediaEncoding.Encoder var tempExtractPath = Path.Combine(ConfigurationManager.ApplicationPaths.TempDirectory, Guid.NewGuid() + ".jpg"); FileSystem.CreateDirectory(FileSystem.GetDirectoryName(tempExtractPath)); - // apply some filters to thumbnail extracted below (below) crop any black lines that we made and get the correct ar then scale to width 600. + // apply some filters to thumbnail extracted below (below) crop any black lines that we made and get the correct ar then scale to width 600. // This filter chain may have adverse effects on recorded tv thumbnails if ar changes during presentation ex. commercials @ diff ar var vf = "scale=600:trunc(600/dar/2)*2"; @@ -676,7 +641,7 @@ namespace MediaBrowser.MediaEncoding.Encoder break; } } - + var mapArg = imageStreamIndex.HasValue ? (" -map 0:v:" + imageStreamIndex.Value.ToString(CultureInfo.InvariantCulture)) : string.Empty; var enableThumbnail = !new List { "wtv" }.Contains(container ?? string.Empty, StringComparer.OrdinalIgnoreCase); diff --git a/MediaBrowser.Model/System/IEnvironmentInfo.cs b/MediaBrowser.Model/System/IEnvironmentInfo.cs index 6af514dc8..faf9f0a42 100644 --- a/MediaBrowser.Model/System/IEnvironmentInfo.cs +++ b/MediaBrowser.Model/System/IEnvironmentInfo.cs @@ -8,10 +8,6 @@ namespace MediaBrowser.Model.System string OperatingSystemName { get; } string OperatingSystemVersion { get; } Architecture SystemArchitecture { get; } - string GetEnvironmentVariable(string name); - void SetProcessEnvironmentVariable(string name, string value); - string StackTrace { get; } - char PathSeparator { get; } } public enum OperatingSystem -- cgit v1.2.3 From 1a4b271314b96b8fc050a3034fb77c952f72fac6 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Sun, 13 Jan 2019 20:26:15 +0100 Subject: Visual Studio Reformat: MediaBrowser.Model --- MediaBrowser.Model/Activity/ActivityLogEntry.cs | 4 ++-- MediaBrowser.Model/Channels/ChannelQuery.cs | 4 ++-- .../Configuration/BaseApplicationConfiguration.cs | 4 +--- MediaBrowser.Model/Configuration/LibraryOptions.cs | 2 +- MediaBrowser.Model/Configuration/ServerConfiguration.cs | 5 ++--- MediaBrowser.Model/Devices/ContentUploadHistory.cs | 4 +--- MediaBrowser.Model/Devices/DeviceInfo.cs | 4 ++-- MediaBrowser.Model/Diagnostics/IProcessFactory.cs | 4 +--- MediaBrowser.Model/Dlna/AudioOptions.cs | 5 ++--- MediaBrowser.Model/Dlna/CodecProfile.cs | 8 +++----- MediaBrowser.Model/Dlna/ConditionProcessor.cs | 9 ++++----- MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs | 4 ++-- MediaBrowser.Model/Dlna/DeviceIdentification.cs | 2 +- MediaBrowser.Model/Dlna/DeviceProfile.cs | 7 +++---- MediaBrowser.Model/Dlna/DirectPlayProfile.cs | 4 +--- MediaBrowser.Model/Dlna/HttpHeaderInfo.cs | 1 - MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs | 8 ++++---- MediaBrowser.Model/Dlna/ResponseProfile.cs | 6 ++---- MediaBrowser.Model/Dlna/SearchCriteria.cs | 2 +- MediaBrowser.Model/Dlna/StreamBuilder.cs | 12 ++++++------ MediaBrowser.Model/Dlna/StreamInfo.cs | 10 +++++----- MediaBrowser.Model/Dlna/SubtitleProfile.cs | 4 ++-- MediaBrowser.Model/Dlna/TranscodingProfile.cs | 4 +--- MediaBrowser.Model/Dto/BaseItemDto.cs | 7 +++---- MediaBrowser.Model/Dto/MediaSourceInfo.cs | 6 +++--- MediaBrowser.Model/Dto/MetadataEditorInfo.cs | 4 ++-- MediaBrowser.Model/Dto/UserDto.cs | 4 ++-- MediaBrowser.Model/Entities/DisplayPreferences.cs | 4 +--- MediaBrowser.Model/Entities/MediaStream.cs | 3 +-- MediaBrowser.Model/Entities/VirtualFolderInfo.cs | 3 +-- MediaBrowser.Model/Globalization/ILocalizationManager.cs | 3 +-- MediaBrowser.Model/IO/IFileSystem.cs | 2 +- MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs | 5 ++--- MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs | 4 ++-- MediaBrowser.Model/LiveTv/LiveTvInfo.cs | 1 - MediaBrowser.Model/LiveTv/LiveTvOptions.cs | 12 ++++++------ MediaBrowser.Model/LiveTv/RecordingQuery.cs | 4 ++-- MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs | 5 ++--- MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs | 1 - MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs | 4 ++-- MediaBrowser.Model/MediaInfo/MediaInfo.cs | 4 ++-- MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs | 4 ++-- MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs | 1 - MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs | 4 +--- MediaBrowser.Model/Net/ISocket.cs | 2 -- MediaBrowser.Model/Net/IpEndPointInfo.cs | 3 +-- MediaBrowser.Model/Net/MimeTypes.cs | 4 ++-- MediaBrowser.Model/Notifications/NotificationOptions.cs | 4 ++-- MediaBrowser.Model/Notifications/NotificationTypeInfo.cs | 4 +--- MediaBrowser.Model/Plugins/PluginInfo.cs | 4 +--- MediaBrowser.Model/Providers/ImageProviderInfo.cs | 3 +-- MediaBrowser.Model/Providers/RemoteImageResult.cs | 4 +--- MediaBrowser.Model/Providers/RemoteSearchResult.cs | 4 ++-- MediaBrowser.Model/Querying/LatestItemsQuery.cs | 2 +- MediaBrowser.Model/Querying/NextUpQuery.cs | 6 +++--- MediaBrowser.Model/Querying/QueryFilters.cs | 4 ++-- MediaBrowser.Model/Querying/ThemeMediaResult.cs | 4 ++-- MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs | 2 +- MediaBrowser.Model/Services/IHttpRequest.cs | 7 +------ MediaBrowser.Model/Services/IHttpResponse.cs | 6 +----- MediaBrowser.Model/Services/IHttpResult.cs | 6 +----- MediaBrowser.Model/Session/ClientCapabilities.cs | 4 ++-- MediaBrowser.Model/Session/GeneralCommand.cs | 4 ++-- MediaBrowser.Model/Session/PlayRequest.cs | 4 ++-- MediaBrowser.Model/Session/PlaybackProgressInfo.cs | 7 ++++--- MediaBrowser.Model/Session/PlaybackStopInfo.cs | 4 ++-- MediaBrowser.Model/Session/TranscodingInfo.cs | 2 -- MediaBrowser.Model/Session/UserDataChangeInfo.cs | 1 - MediaBrowser.Model/System/SystemInfo.cs | 4 ++-- MediaBrowser.Model/Tasks/ITaskTrigger.cs | 1 - MediaBrowser.Model/Tasks/TaskInfo.cs | 6 ++---- MediaBrowser.Model/Text/ITextEncoding.cs | 3 +-- MediaBrowser.Model/Updates/PackageInfo.cs | 1 - MediaBrowser.Model/Users/UserPolicy.cs | 4 ++-- 74 files changed, 127 insertions(+), 189 deletions(-) (limited to 'MediaBrowser.Model/System') diff --git a/MediaBrowser.Model/Activity/ActivityLogEntry.cs b/MediaBrowser.Model/Activity/ActivityLogEntry.cs index a61ebc268..7e936ce53 100644 --- a/MediaBrowser.Model/Activity/ActivityLogEntry.cs +++ b/MediaBrowser.Model/Activity/ActivityLogEntry.cs @@ -1,5 +1,5 @@ -using Microsoft.Extensions.Logging; -using System; +using System; +using Microsoft.Extensions.Logging; namespace MediaBrowser.Model.Activity { diff --git a/MediaBrowser.Model/Channels/ChannelQuery.cs b/MediaBrowser.Model/Channels/ChannelQuery.cs index 9651cb6c2..d6282874d 100644 --- a/MediaBrowser.Model/Channels/ChannelQuery.cs +++ b/MediaBrowser.Model/Channels/ChannelQuery.cs @@ -1,6 +1,6 @@ -using MediaBrowser.Model.Entities; +using System; +using MediaBrowser.Model.Entities; using MediaBrowser.Model.Querying; -using System; namespace MediaBrowser.Model.Channels { diff --git a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs index 76b5924e9..d9a746211 100644 --- a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs +++ b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs @@ -1,6 +1,4 @@ -using MediaBrowser.Model.Updates; - -namespace MediaBrowser.Model.Configuration +namespace MediaBrowser.Model.Configuration { /// /// Serves as a common base class for the Server and UI application Configurations diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs index cc70cc888..bb3b613e8 100644 --- a/MediaBrowser.Model/Configuration/LibraryOptions.cs +++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs @@ -1,6 +1,6 @@ using System; -using MediaBrowser.Model.Entities; using System.Collections.Generic; +using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Configuration { diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index 565d5f74b..2faa52da5 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -1,6 +1,5 @@ -using MediaBrowser.Model.Dto; -using MediaBrowser.Model.Entities; -using System; +using System; +using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.Configuration { diff --git a/MediaBrowser.Model/Devices/ContentUploadHistory.cs b/MediaBrowser.Model/Devices/ContentUploadHistory.cs index 2b344df24..65c83b0ad 100644 --- a/MediaBrowser.Model/Devices/ContentUploadHistory.cs +++ b/MediaBrowser.Model/Devices/ContentUploadHistory.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; - -namespace MediaBrowser.Model.Devices +namespace MediaBrowser.Model.Devices { public class ContentUploadHistory { diff --git a/MediaBrowser.Model/Devices/DeviceInfo.cs b/MediaBrowser.Model/Devices/DeviceInfo.cs index a588ce029..245dd7bb6 100644 --- a/MediaBrowser.Model/Devices/DeviceInfo.cs +++ b/MediaBrowser.Model/Devices/DeviceInfo.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.Session; -using System; +using System; +using MediaBrowser.Model.Session; namespace MediaBrowser.Model.Devices { diff --git a/MediaBrowser.Model/Diagnostics/IProcessFactory.cs b/MediaBrowser.Model/Diagnostics/IProcessFactory.cs index c4ad02fab..15e3d7123 100644 --- a/MediaBrowser.Model/Diagnostics/IProcessFactory.cs +++ b/MediaBrowser.Model/Diagnostics/IProcessFactory.cs @@ -1,6 +1,4 @@ -using System; - -namespace MediaBrowser.Model.Diagnostics +namespace MediaBrowser.Model.Diagnostics { public interface IProcessFactory { diff --git a/MediaBrowser.Model/Dlna/AudioOptions.cs b/MediaBrowser.Model/Dlna/AudioOptions.cs index 9480311b5..88f118fe1 100644 --- a/MediaBrowser.Model/Dlna/AudioOptions.cs +++ b/MediaBrowser.Model/Dlna/AudioOptions.cs @@ -1,6 +1,5 @@ -using MediaBrowser.Model.Dto; -using System.Collections.Generic; -using System; +using System; +using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/CodecProfile.cs b/MediaBrowser.Model/Dlna/CodecProfile.cs index c40408e9b..6965d3059 100644 --- a/MediaBrowser.Model/Dlna/CodecProfile.cs +++ b/MediaBrowser.Model/Dlna/CodecProfile.cs @@ -1,7 +1,5 @@ -using MediaBrowser.Model.Extensions; -using System.Collections.Generic; -using System.Xml.Serialization; -using MediaBrowser.Model.Dlna; +using System.Xml.Serialization; +using MediaBrowser.Model.Extensions; namespace MediaBrowser.Model.Dlna { @@ -22,7 +20,7 @@ namespace MediaBrowser.Model.Dlna public CodecProfile() { - Conditions = new ProfileCondition[] {}; + Conditions = new ProfileCondition[] { }; ApplyConditions = new ProfileCondition[] { }; } diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.cs index 5bcee6de2..1a5bf7515 100644 --- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs +++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs @@ -1,8 +1,7 @@ -using MediaBrowser.Model.Extensions; -using MediaBrowser.Model.MediaInfo; -using System; -using System.Collections.Generic; +using System; using System.Globalization; +using MediaBrowser.Model.Extensions; +using MediaBrowser.Model.MediaInfo; namespace MediaBrowser.Model.Dlna { @@ -24,7 +23,7 @@ namespace MediaBrowser.Model.Dlna int? numVideoStreams, int? numAudioStreams, string videoCodecTag, - bool? isAvc ) + bool? isAvc) { switch (condition.Property) { diff --git a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs index 88d7573e6..aca351305 100644 --- a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs +++ b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs @@ -1,6 +1,6 @@ -using MediaBrowser.Model.MediaInfo; -using System; +using System; using System.Collections.Generic; +using MediaBrowser.Model.MediaInfo; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/DeviceIdentification.cs b/MediaBrowser.Model/Dlna/DeviceIdentification.cs index 97f4409da..cbde2d710 100644 --- a/MediaBrowser.Model/Dlna/DeviceIdentification.cs +++ b/MediaBrowser.Model/Dlna/DeviceIdentification.cs @@ -55,7 +55,7 @@ public DeviceIdentification() { - Headers = new HttpHeaderInfo[] {}; + Headers = new HttpHeaderInfo[] { }; } } } diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs index 4bf7d6b8d..2e4e942d9 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfile.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs @@ -1,8 +1,7 @@ -using MediaBrowser.Model.Extensions; -using MediaBrowser.Model.MediaInfo; -using System.Collections.Generic; +using System; using System.Xml.Serialization; -using System; +using MediaBrowser.Model.Extensions; +using MediaBrowser.Model.MediaInfo; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs index 4279b545d..e6b7a5721 100644 --- a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs +++ b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Xml.Serialization; +using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs b/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs index b4fa4e0af..926963ef6 100644 --- a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs +++ b/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs @@ -1,5 +1,4 @@ using System.Xml.Serialization; -using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs index 81d58336b..1b20ab567 100644 --- a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs +++ b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs @@ -1,8 +1,8 @@ -using MediaBrowser.Model.Extensions; -using MediaBrowser.Model.MediaInfo; -using System; +using System; using System.Collections.Generic; using System.Linq; +using MediaBrowser.Model.Extensions; +using MediaBrowser.Model.MediaInfo; namespace MediaBrowser.Model.Dlna { @@ -167,7 +167,7 @@ namespace MediaBrowser.Model.Dlna return new MediaFormatProfile[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_AC3{0}", suffix)) }; } - return new MediaFormatProfile[]{}; + return new MediaFormatProfile[] { }; } private MediaFormatProfile ValueOf(string value) diff --git a/MediaBrowser.Model/Dlna/ResponseProfile.cs b/MediaBrowser.Model/Dlna/ResponseProfile.cs index 742253fa3..d69dc9868 100644 --- a/MediaBrowser.Model/Dlna/ResponseProfile.cs +++ b/MediaBrowser.Model/Dlna/ResponseProfile.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using System.Xml.Serialization; -using MediaBrowser.Model.Dlna; +using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna { @@ -28,7 +26,7 @@ namespace MediaBrowser.Model.Dlna public ResponseProfile() { - Conditions = new ProfileCondition[] {}; + Conditions = new ProfileCondition[] { }; } public string[] GetContainers() diff --git a/MediaBrowser.Model/Dlna/SearchCriteria.cs b/MediaBrowser.Model/Dlna/SearchCriteria.cs index 50ee4a378..4f47c2821 100644 --- a/MediaBrowser.Model/Dlna/SearchCriteria.cs +++ b/MediaBrowser.Model/Dlna/SearchCriteria.cs @@ -1,6 +1,6 @@ -using MediaBrowser.Model.Extensions; using System; using System.Text.RegularExpressions; +using MediaBrowser.Model.Extensions; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index c571d8384..d7335907a 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -1,13 +1,13 @@ -using MediaBrowser.Model.Dto; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Extensions; -using Microsoft.Extensions.Logging; using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.Session; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; +using Microsoft.Extensions.Logging; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs index ec76d93f0..61bba4126 100644 --- a/MediaBrowser.Model/Dlna/StreamInfo.cs +++ b/MediaBrowser.Model/Dlna/StreamInfo.cs @@ -1,13 +1,13 @@ -using MediaBrowser.Model.Drawing; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.Session; -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/SubtitleProfile.cs b/MediaBrowser.Model/Dlna/SubtitleProfile.cs index f85ba4a7a..77451e346 100644 --- a/MediaBrowser.Model/Dlna/SubtitleProfile.cs +++ b/MediaBrowser.Model/Dlna/SubtitleProfile.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.Extensions; -using System.Xml.Serialization; +using System.Xml.Serialization; +using MediaBrowser.Model.Extensions; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/TranscodingProfile.cs b/MediaBrowser.Model/Dlna/TranscodingProfile.cs index 8453fdf6d..a37b29259 100644 --- a/MediaBrowser.Model/Dlna/TranscodingProfile.cs +++ b/MediaBrowser.Model/Dlna/TranscodingProfile.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; -using System.Xml.Serialization; -using MediaBrowser.Model.Dlna; +using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index 7ff883798..241ddfce6 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -1,11 +1,10 @@ -using MediaBrowser.Model.Drawing; +using System; +using System.Collections.Generic; +using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Library; using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Providers; -using System; -using System.Collections.Generic; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs index be9c2dff3..ea851f3c2 100644 --- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs +++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs @@ -1,9 +1,9 @@ -using MediaBrowser.Model.Entities; -using MediaBrowser.Model.MediaInfo; +using System; using System.Collections.Generic; +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.Serialization; using MediaBrowser.Model.Session; -using System; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Dto/MetadataEditorInfo.cs b/MediaBrowser.Model/Dto/MetadataEditorInfo.cs index b7093da71..5dacbeef6 100644 --- a/MediaBrowser.Model/Dto/MetadataEditorInfo.cs +++ b/MediaBrowser.Model/Dto/MetadataEditorInfo.cs @@ -1,7 +1,7 @@ -using MediaBrowser.Model.Entities; +using System; +using MediaBrowser.Model.Entities; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.Providers; -using System; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Dto/UserDto.cs b/MediaBrowser.Model/Dto/UserDto.cs index eb4979632..de945dec0 100644 --- a/MediaBrowser.Model/Dto/UserDto.cs +++ b/MediaBrowser.Model/Dto/UserDto.cs @@ -1,7 +1,7 @@ -using MediaBrowser.Model.Configuration; +using System; +using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Connect; using MediaBrowser.Model.Users; -using System; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Entities/DisplayPreferences.cs b/MediaBrowser.Model/Entities/DisplayPreferences.cs index dc386f775..2bc0c2e1d 100644 --- a/MediaBrowser.Model/Entities/DisplayPreferences.cs +++ b/MediaBrowser.Model/Entities/DisplayPreferences.cs @@ -1,6 +1,4 @@ -using MediaBrowser.Model.Drawing; -using System; -using System.Collections.Generic; +using System.Collections.Generic; namespace MediaBrowser.Model.Entities { diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs index 454e6ff16..256fd3cef 100644 --- a/MediaBrowser.Model/Entities/MediaStream.cs +++ b/MediaBrowser.Model/Entities/MediaStream.cs @@ -1,10 +1,9 @@ using System; -using System.Linq; using System.Collections.Generic; +using System.Globalization; using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.MediaInfo; -using System.Globalization; namespace MediaBrowser.Model.Entities { diff --git a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs index c8374f620..cae0aa58c 100644 --- a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs +++ b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs @@ -1,6 +1,5 @@ -using System.Collections.Generic; +using System; using MediaBrowser.Model.Configuration; -using System; namespace MediaBrowser.Model.Entities { diff --git a/MediaBrowser.Model/Globalization/ILocalizationManager.cs b/MediaBrowser.Model/Globalization/ILocalizationManager.cs index 9c7a937f3..a3fb3ecee 100644 --- a/MediaBrowser.Model/Globalization/ILocalizationManager.cs +++ b/MediaBrowser.Model/Globalization/ILocalizationManager.cs @@ -1,6 +1,5 @@ -using System.Collections.Generic; +using System.Globalization; using MediaBrowser.Model.Entities; -using System.Globalization; namespace MediaBrowser.Model.Globalization { diff --git a/MediaBrowser.Model/IO/IFileSystem.cs b/MediaBrowser.Model/IO/IFileSystem.cs index 37fca6ea1..b8a315ccc 100644 --- a/MediaBrowser.Model/IO/IFileSystem.cs +++ b/MediaBrowser.Model/IO/IFileSystem.cs @@ -201,7 +201,7 @@ namespace MediaBrowser.Model.IO /// IEnumerable GetFiles(string path, bool recursive = false); - IEnumerable GetFiles(string path, string [] extensions, bool enableCaseSensitiveExtensions, bool recursive); + IEnumerable GetFiles(string path, string[] extensions, bool enableCaseSensitiveExtensions, bool recursive); /// /// Gets the file system entries. diff --git a/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs b/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs index b5bd6ced0..3b1828e28 100644 --- a/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs @@ -1,6 +1,5 @@ -using MediaBrowser.Model.Dto; -using System; -using System.Collections.Generic; +using System; +using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.LiveTv { diff --git a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs index a9546bb95..a2953bc83 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.Entities; -using System; +using System; +using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.LiveTv { diff --git a/MediaBrowser.Model/LiveTv/LiveTvInfo.cs b/MediaBrowser.Model/LiveTv/LiveTvInfo.cs index 68281d79b..60cb27331 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvInfo.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvInfo.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using System; namespace MediaBrowser.Model.LiveTv diff --git a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs index 6a688c7b4..d604124e0 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.Dto; -using System; +using System; +using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.LiveTv { @@ -76,10 +76,10 @@ namespace MediaBrowser.Model.LiveTv public ListingsProviderInfo() { - NewsCategories = new [] { "news", "journalism", "documentary", "current affairs" }; - SportsCategories = new [] { "sports", "basketball", "baseball", "football" }; - KidsCategories = new [] { "kids", "family", "children", "childrens", "disney" }; - MovieCategories = new [] { "movie" }; + NewsCategories = new[] { "news", "journalism", "documentary", "current affairs" }; + SportsCategories = new[] { "sports", "basketball", "baseball", "football" }; + KidsCategories = new[] { "kids", "family", "children", "childrens", "disney" }; + MovieCategories = new[] { "movie" }; EnabledTuners = Array.Empty(); EnableAllTuners = true; ChannelMappings = Array.Empty(); diff --git a/MediaBrowser.Model/LiveTv/RecordingQuery.cs b/MediaBrowser.Model/LiveTv/RecordingQuery.cs index 7d20441a5..79f7fac43 100644 --- a/MediaBrowser.Model/LiveTv/RecordingQuery.cs +++ b/MediaBrowser.Model/LiveTv/RecordingQuery.cs @@ -1,6 +1,6 @@ -using MediaBrowser.Model.Entities; +using System; +using MediaBrowser.Model.Entities; using MediaBrowser.Model.Querying; -using System; namespace MediaBrowser.Model.LiveTv { diff --git a/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs b/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs index 593996352..6ebc5ce29 100644 --- a/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs @@ -1,7 +1,6 @@ -using MediaBrowser.Model.Entities; -using System; +using System; using System.Collections.Generic; -using MediaBrowser.Model.Serialization; +using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.LiveTv { diff --git a/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs b/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs index 1b573fba7..a08f8adbf 100644 --- a/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs +++ b/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs @@ -1,5 +1,4 @@ using MediaBrowser.Model.Entities; -using System.Collections.Generic; namespace MediaBrowser.Model.MediaInfo { diff --git a/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs b/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs index d36aa9944..6013be054 100644 --- a/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs +++ b/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.Dlna; -using System; +using System; +using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.MediaInfo { diff --git a/MediaBrowser.Model/MediaInfo/MediaInfo.cs b/MediaBrowser.Model/MediaInfo/MediaInfo.cs index eb8a4434e..9d45a2af1 100644 --- a/MediaBrowser.Model/MediaInfo/MediaInfo.cs +++ b/MediaBrowser.Model/MediaInfo/MediaInfo.cs @@ -1,7 +1,7 @@ -using MediaBrowser.Model.Dto; -using MediaBrowser.Model.Entities; using System; using System.Collections.Generic; +using MediaBrowser.Model.Dto; +using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.MediaInfo { diff --git a/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs b/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs index 91673da9e..71847d809 100644 --- a/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs +++ b/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.Dlna; -using System; +using System; +using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.MediaInfo { diff --git a/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs b/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs index b38fec7d4..10d26c900 100644 --- a/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs +++ b/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs @@ -1,6 +1,5 @@ using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dto; -using System.Collections.Generic; namespace MediaBrowser.Model.MediaInfo { diff --git a/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs b/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs index d3a3bb1d0..42070b9ff 100644 --- a/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs +++ b/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; - -namespace MediaBrowser.Model.MediaInfo +namespace MediaBrowser.Model.MediaInfo { public class SubtitleTrackInfo { diff --git a/MediaBrowser.Model/Net/ISocket.cs b/MediaBrowser.Model/Net/ISocket.cs index 6a6781026..58eb1b941 100644 --- a/MediaBrowser.Model/Net/ISocket.cs +++ b/MediaBrowser.Model/Net/ISocket.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; using System.Threading; using System.Threading.Tasks; diff --git a/MediaBrowser.Model/Net/IpEndPointInfo.cs b/MediaBrowser.Model/Net/IpEndPointInfo.cs index b5cadc429..2a04f447f 100644 --- a/MediaBrowser.Model/Net/IpEndPointInfo.cs +++ b/MediaBrowser.Model/Net/IpEndPointInfo.cs @@ -1,5 +1,4 @@ -using System; -using System.Globalization; +using System.Globalization; namespace MediaBrowser.Model.Net { diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs index 93e51633e..2245a564f 100644 --- a/MediaBrowser.Model/Net/MimeTypes.cs +++ b/MediaBrowser.Model/Net/MimeTypes.cs @@ -1,8 +1,8 @@ -using MediaBrowser.Model.Extensions; -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; +using MediaBrowser.Model.Extensions; namespace MediaBrowser.Model.Net { diff --git a/MediaBrowser.Model/Notifications/NotificationOptions.cs b/MediaBrowser.Model/Notifications/NotificationOptions.cs index 158e00b39..154379692 100644 --- a/MediaBrowser.Model/Notifications/NotificationOptions.cs +++ b/MediaBrowser.Model/Notifications/NotificationOptions.cs @@ -1,6 +1,6 @@ -using MediaBrowser.Model.Extensions; +using System; +using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Users; -using System; namespace MediaBrowser.Model.Notifications { diff --git a/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs b/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs index 203712fa8..95e83e076 100644 --- a/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs +++ b/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs @@ -1,6 +1,4 @@ -using System; - -namespace MediaBrowser.Model.Notifications +namespace MediaBrowser.Model.Notifications { public class NotificationTypeInfo { diff --git a/MediaBrowser.Model/Plugins/PluginInfo.cs b/MediaBrowser.Model/Plugins/PluginInfo.cs index e7b16b0ec..b8ac5fe99 100644 --- a/MediaBrowser.Model/Plugins/PluginInfo.cs +++ b/MediaBrowser.Model/Plugins/PluginInfo.cs @@ -1,6 +1,4 @@ -using System; - -namespace MediaBrowser.Model.Plugins +namespace MediaBrowser.Model.Plugins { /// /// This is a serializable stub class that is used by the api to provide information about installed plugins. diff --git a/MediaBrowser.Model/Providers/ImageProviderInfo.cs b/MediaBrowser.Model/Providers/ImageProviderInfo.cs index 199552640..fed6cb744 100644 --- a/MediaBrowser.Model/Providers/ImageProviderInfo.cs +++ b/MediaBrowser.Model/Providers/ImageProviderInfo.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Providers { diff --git a/MediaBrowser.Model/Providers/RemoteImageResult.cs b/MediaBrowser.Model/Providers/RemoteImageResult.cs index 7e38badfc..a7d3a5c88 100644 --- a/MediaBrowser.Model/Providers/RemoteImageResult.cs +++ b/MediaBrowser.Model/Providers/RemoteImageResult.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; - -namespace MediaBrowser.Model.Providers +namespace MediaBrowser.Model.Providers { /// /// Class RemoteImageResult. diff --git a/MediaBrowser.Model/Providers/RemoteSearchResult.cs b/MediaBrowser.Model/Providers/RemoteSearchResult.cs index b63cf2a9f..03b369926 100644 --- a/MediaBrowser.Model/Providers/RemoteSearchResult.cs +++ b/MediaBrowser.Model/Providers/RemoteSearchResult.cs @@ -1,6 +1,6 @@ -using MediaBrowser.Model.Entities; -using System; +using System; using System.Collections.Generic; +using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Providers { diff --git a/MediaBrowser.Model/Querying/LatestItemsQuery.cs b/MediaBrowser.Model/Querying/LatestItemsQuery.cs index 88b079595..dfd0fcb5b 100644 --- a/MediaBrowser.Model/Querying/LatestItemsQuery.cs +++ b/MediaBrowser.Model/Querying/LatestItemsQuery.cs @@ -70,7 +70,7 @@ namespace MediaBrowser.Model.Querying public LatestItemsQuery() { - EnableImageTypes = new ImageType[] {}; + EnableImageTypes = new ImageType[] { }; } } } diff --git a/MediaBrowser.Model/Querying/NextUpQuery.cs b/MediaBrowser.Model/Querying/NextUpQuery.cs index 2af8738d7..af44841b3 100644 --- a/MediaBrowser.Model/Querying/NextUpQuery.cs +++ b/MediaBrowser.Model/Querying/NextUpQuery.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.Entities; -using System; +using System; +using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Querying { @@ -60,7 +60,7 @@ namespace MediaBrowser.Model.Querying public NextUpQuery() { - EnableImageTypes = new ImageType[] {}; + EnableImageTypes = new ImageType[] { }; EnableTotalRecordCount = true; } } diff --git a/MediaBrowser.Model/Querying/QueryFilters.cs b/MediaBrowser.Model/Querying/QueryFilters.cs index f46650a03..0b224ca45 100644 --- a/MediaBrowser.Model/Querying/QueryFilters.cs +++ b/MediaBrowser.Model/Querying/QueryFilters.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.Dto; -using System; +using System; +using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.Querying { diff --git a/MediaBrowser.Model/Querying/ThemeMediaResult.cs b/MediaBrowser.Model/Querying/ThemeMediaResult.cs index eae102bae..0387ec830 100644 --- a/MediaBrowser.Model/Querying/ThemeMediaResult.cs +++ b/MediaBrowser.Model/Querying/ThemeMediaResult.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.Dto; -using System; +using System; +using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.Querying { diff --git a/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs b/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs index 665b980eb..14aa2a8fb 100644 --- a/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs +++ b/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs @@ -51,7 +51,7 @@ namespace MediaBrowser.Model.Querying public UpcomingEpisodesQuery() { - EnableImageTypes = new ImageType[] {}; + EnableImageTypes = new ImageType[] { }; } } } \ No newline at end of file diff --git a/MediaBrowser.Model/Services/IHttpRequest.cs b/MediaBrowser.Model/Services/IHttpRequest.cs index e1480f30a..ceb25c8d2 100644 --- a/MediaBrowser.Model/Services/IHttpRequest.cs +++ b/MediaBrowser.Model/Services/IHttpRequest.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading.Tasks; - -namespace MediaBrowser.Model.Services +namespace MediaBrowser.Model.Services { public interface IHttpRequest : IRequest { diff --git a/MediaBrowser.Model/Services/IHttpResponse.cs b/MediaBrowser.Model/Services/IHttpResponse.cs index 9d77eefc9..fa3442a7f 100644 --- a/MediaBrowser.Model/Services/IHttpResponse.cs +++ b/MediaBrowser.Model/Services/IHttpResponse.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Net; -using System.Text; -using System.Threading.Tasks; +using System.Net; namespace MediaBrowser.Model.Services { diff --git a/MediaBrowser.Model/Services/IHttpResult.cs b/MediaBrowser.Model/Services/IHttpResult.cs index b912ef023..11831adea 100644 --- a/MediaBrowser.Model/Services/IHttpResult.cs +++ b/MediaBrowser.Model/Services/IHttpResult.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Net; -using System.Text; -using System.Threading.Tasks; +using System.Net; namespace MediaBrowser.Model.Services { diff --git a/MediaBrowser.Model/Session/ClientCapabilities.cs b/MediaBrowser.Model/Session/ClientCapabilities.cs index 0ba9988bb..1dbc02f09 100644 --- a/MediaBrowser.Model/Session/ClientCapabilities.cs +++ b/MediaBrowser.Model/Session/ClientCapabilities.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.Dlna; -using System; +using System; +using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.Session { diff --git a/MediaBrowser.Model/Session/GeneralCommand.cs b/MediaBrowser.Model/Session/GeneralCommand.cs index 5cfe3e67b..e86b44dca 100644 --- a/MediaBrowser.Model/Session/GeneralCommand.cs +++ b/MediaBrowser.Model/Session/GeneralCommand.cs @@ -1,5 +1,5 @@ -using System.Collections.Generic; -using System; +using System; +using System.Collections.Generic; namespace MediaBrowser.Model.Session { diff --git a/MediaBrowser.Model/Session/PlayRequest.cs b/MediaBrowser.Model/Session/PlayRequest.cs index 2ee489f96..4eb92bf23 100644 --- a/MediaBrowser.Model/Session/PlayRequest.cs +++ b/MediaBrowser.Model/Session/PlayRequest.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.Services; -using System; +using System; +using MediaBrowser.Model.Services; namespace MediaBrowser.Model.Session { diff --git a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs index dfdd42c36..2ce7b7c42 100644 --- a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs +++ b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.Dto; -using System; +using System; +using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.Session { @@ -112,7 +112,8 @@ namespace MediaBrowser.Model.Session RepeatOne = 2 } - public class QueueItem { + public class QueueItem + { public Guid Id { get; set; } public string PlaylistItemId { get; set; } } diff --git a/MediaBrowser.Model/Session/PlaybackStopInfo.cs b/MediaBrowser.Model/Session/PlaybackStopInfo.cs index 6f3351eef..1f466fcf3 100644 --- a/MediaBrowser.Model/Session/PlaybackStopInfo.cs +++ b/MediaBrowser.Model/Session/PlaybackStopInfo.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.Dto; -using System; +using System; +using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.Session { diff --git a/MediaBrowser.Model/Session/TranscodingInfo.cs b/MediaBrowser.Model/Session/TranscodingInfo.cs index ed86d2358..076dd81ce 100644 --- a/MediaBrowser.Model/Session/TranscodingInfo.cs +++ b/MediaBrowser.Model/Session/TranscodingInfo.cs @@ -1,5 +1,3 @@ -using System.Collections.Generic; - namespace MediaBrowser.Model.Session { public class TranscodingInfo diff --git a/MediaBrowser.Model/Session/UserDataChangeInfo.cs b/MediaBrowser.Model/Session/UserDataChangeInfo.cs index c6b03200d..9c8b441e2 100644 --- a/MediaBrowser.Model/Session/UserDataChangeInfo.cs +++ b/MediaBrowser.Model/Session/UserDataChangeInfo.cs @@ -1,5 +1,4 @@ using MediaBrowser.Model.Dto; -using System.Collections.Generic; namespace MediaBrowser.Model.Session { diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs index 5d019932a..a28ce1070 100644 --- a/MediaBrowser.Model/System/SystemInfo.cs +++ b/MediaBrowser.Model/System/SystemInfo.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.Updates; -using System.Runtime.InteropServices; +using System.Runtime.InteropServices; +using MediaBrowser.Model.Updates; namespace MediaBrowser.Model.System { diff --git a/MediaBrowser.Model/Tasks/ITaskTrigger.cs b/MediaBrowser.Model/Tasks/ITaskTrigger.cs index 9db0041b4..00e780352 100644 --- a/MediaBrowser.Model/Tasks/ITaskTrigger.cs +++ b/MediaBrowser.Model/Tasks/ITaskTrigger.cs @@ -1,5 +1,4 @@ using System; -using MediaBrowser.Model.Events; using Microsoft.Extensions.Logging; namespace MediaBrowser.Model.Tasks diff --git a/MediaBrowser.Model/Tasks/TaskInfo.cs b/MediaBrowser.Model/Tasks/TaskInfo.cs index 8792ce952..49bf198ef 100644 --- a/MediaBrowser.Model/Tasks/TaskInfo.cs +++ b/MediaBrowser.Model/Tasks/TaskInfo.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; - -namespace MediaBrowser.Model.Tasks +namespace MediaBrowser.Model.Tasks { /// /// Class TaskInfo @@ -72,7 +70,7 @@ namespace MediaBrowser.Model.Tasks /// public TaskInfo() { - Triggers = new TaskTriggerInfo[]{}; + Triggers = new TaskTriggerInfo[] { }; } } } diff --git a/MediaBrowser.Model/Text/ITextEncoding.cs b/MediaBrowser.Model/Text/ITextEncoding.cs index 619d90a2b..d6fd3463b 100644 --- a/MediaBrowser.Model/Text/ITextEncoding.cs +++ b/MediaBrowser.Model/Text/ITextEncoding.cs @@ -1,5 +1,4 @@ -using System.IO; -using System.Text; +using System.Text; namespace MediaBrowser.Model.Text { diff --git a/MediaBrowser.Model/Updates/PackageInfo.cs b/MediaBrowser.Model/Updates/PackageInfo.cs index 464ea295d..b8afd8981 100644 --- a/MediaBrowser.Model/Updates/PackageInfo.cs +++ b/MediaBrowser.Model/Updates/PackageInfo.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; namespace MediaBrowser.Model.Updates { diff --git a/MediaBrowser.Model/Users/UserPolicy.cs b/MediaBrowser.Model/Users/UserPolicy.cs index e3f6d8620..55eeb78bf 100644 --- a/MediaBrowser.Model/Users/UserPolicy.cs +++ b/MediaBrowser.Model/Users/UserPolicy.cs @@ -1,5 +1,5 @@ -using MediaBrowser.Model.Configuration; -using System; +using System; +using MediaBrowser.Model.Configuration; namespace MediaBrowser.Model.Users { -- cgit v1.2.3 From 382e8699a24992216f973c9e6d2f0b9a7bbd7187 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Sun, 13 Jan 2019 20:31:15 +0100 Subject: EditorConfig reformat: MediaBrowser.Model --- MediaBrowser.Model/Channels/ChannelFolderType.cs | 2 +- MediaBrowser.Model/Channels/ChannelItemSortField.cs | 2 +- MediaBrowser.Model/Channels/ChannelMediaContentType.cs | 2 +- MediaBrowser.Model/Channels/ChannelMediaType.cs | 2 +- MediaBrowser.Model/Configuration/ImageOption.cs | 2 +- MediaBrowser.Model/Configuration/ImageSavingConvention.cs | 2 +- MediaBrowser.Model/Configuration/MetadataPluginType.cs | 2 +- MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs | 2 +- MediaBrowser.Model/Configuration/UnratedItem.cs | 2 +- MediaBrowser.Model/Cryptography/ICryptoProvider.cs | 2 +- MediaBrowser.Model/Dlna/AudioOptions.cs | 2 +- MediaBrowser.Model/Dlna/CodecType.cs | 2 +- MediaBrowser.Model/Dlna/DeviceProfileType.cs | 2 +- MediaBrowser.Model/Dlna/DlnaProfileType.cs | 2 +- MediaBrowser.Model/Dlna/EncodingContext.cs | 2 +- MediaBrowser.Model/Dlna/HeaderMatchType.cs | 2 +- MediaBrowser.Model/Dlna/HttpHeaderInfo.cs | 2 +- MediaBrowser.Model/Dlna/ProfileCondition.cs | 2 +- MediaBrowser.Model/Dlna/ProfileConditionType.cs | 2 +- MediaBrowser.Model/Dlna/ProfileConditionValue.cs | 2 +- MediaBrowser.Model/Dlna/ResolutionConfiguration.cs | 2 +- MediaBrowser.Model/Dlna/ResolutionOptions.cs | 2 +- MediaBrowser.Model/Dlna/SearchType.cs | 2 +- MediaBrowser.Model/Dlna/SubtitleDeliveryMethod.cs | 2 +- MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs | 2 +- MediaBrowser.Model/Dlna/TranscodeSeekInfo.cs | 2 +- MediaBrowser.Model/Dlna/VideoOptions.cs | 2 +- MediaBrowser.Model/Dlna/XmlAttribute.cs | 2 +- MediaBrowser.Model/Drawing/ImageSize.cs | 2 +- MediaBrowser.Model/Dto/MediaSourceType.cs | 2 +- MediaBrowser.Model/Dto/RatingType.cs | 2 +- MediaBrowser.Model/Dto/RecommendationType.cs | 2 +- MediaBrowser.Model/Entities/CollectionType.cs | 2 +- MediaBrowser.Model/Entities/IsoType.cs | 2 +- MediaBrowser.Model/Entities/MBRegistrationRecord.cs | 2 +- MediaBrowser.Model/Entities/MediaStreamType.cs | 2 +- MediaBrowser.Model/Entities/ProviderIdsExtensions.cs | 2 +- MediaBrowser.Model/Entities/ScrollDirection.cs | 2 +- MediaBrowser.Model/Entities/SortOrder.cs | 2 +- MediaBrowser.Model/Entities/TrailerType.cs | 2 +- MediaBrowser.Model/Globalization/LocalizatonOption.cs | 2 +- MediaBrowser.Model/IO/FileSystemEntryType.cs | 2 +- MediaBrowser.Model/IO/IIsoManager.cs | 2 +- MediaBrowser.Model/IO/IIsoMount.cs | 2 +- MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs | 2 +- MediaBrowser.Model/LiveTv/DayPattern.cs | 2 +- MediaBrowser.Model/LiveTv/GuideInfo.cs | 2 +- MediaBrowser.Model/LiveTv/LiveTvServiceStatus.cs | 2 +- MediaBrowser.Model/LiveTv/LiveTvTunerStatus.cs | 2 +- MediaBrowser.Model/LiveTv/ProgramAudio.cs | 2 +- MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs | 2 +- MediaBrowser.Model/LiveTv/TimerQuery.cs | 2 +- MediaBrowser.Model/MediaInfo/AudioCodec.cs | 2 +- MediaBrowser.Model/MediaInfo/MediaProtocol.cs | 2 +- MediaBrowser.Model/MediaInfo/SubtitleFormat.cs | 2 +- MediaBrowser.Model/MediaInfo/TransportStreamTimestamp.cs | 2 +- MediaBrowser.Model/MediaInfo/VideoCodec.cs | 2 +- MediaBrowser.Model/Net/ISocket.cs | 2 +- MediaBrowser.Model/Notifications/NotificationType.cs | 2 +- MediaBrowser.Model/Notifications/SendToUserType.cs | 2 +- MediaBrowser.Model/Providers/ExternalUrl.cs | 2 +- MediaBrowser.Model/Providers/RemoteImageQuery.cs | 2 +- MediaBrowser.Model/Providers/SubtitleProviderInfo.cs | 2 +- MediaBrowser.Model/Querying/AllThemeMediaResult.cs | 2 +- MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs | 2 +- MediaBrowser.Model/Serialization/IXmlSerializer.cs | 2 +- MediaBrowser.Model/Session/BrowseRequest.cs | 2 +- MediaBrowser.Model/Session/GeneralCommandType.cs | 2 +- MediaBrowser.Model/Session/MessageCommand.cs | 2 +- MediaBrowser.Model/Session/PlayCommand.cs | 2 +- MediaBrowser.Model/Session/PlayMethod.cs | 2 +- MediaBrowser.Model/Session/PlayRequest.cs | 2 +- MediaBrowser.Model/Session/PlayerStateInfo.cs | 2 +- MediaBrowser.Model/Session/PlaystateCommand.cs | 2 +- MediaBrowser.Model/Session/PlaystateRequest.cs | 2 +- MediaBrowser.Model/Session/SessionUserInfo.cs | 2 +- MediaBrowser.Model/Session/TranscodingInfo.cs | 2 +- MediaBrowser.Model/System/PublicSystemInfo.cs | 2 +- MediaBrowser.Model/System/WakeOnLanInfo.cs | 2 +- MediaBrowser.Model/Tasks/IConfigurableScheduledTask.cs | 2 +- MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs | 2 +- MediaBrowser.Model/Tasks/ITaskManager.cs | 2 +- MediaBrowser.Model/Updates/PackageTargetSystem.cs | 2 +- MediaBrowser.Model/Updates/PackageVersionClass.cs | 2 +- MediaBrowser.Model/Updates/PackageVersionInfo.cs | 2 +- 85 files changed, 85 insertions(+), 85 deletions(-) (limited to 'MediaBrowser.Model/System') diff --git a/MediaBrowser.Model/Channels/ChannelFolderType.cs b/MediaBrowser.Model/Channels/ChannelFolderType.cs index 7c97afd02..6039eb929 100644 --- a/MediaBrowser.Model/Channels/ChannelFolderType.cs +++ b/MediaBrowser.Model/Channels/ChannelFolderType.cs @@ -14,4 +14,4 @@ namespace MediaBrowser.Model.Channels Season = 5 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Channels/ChannelItemSortField.cs b/MediaBrowser.Model/Channels/ChannelItemSortField.cs index 6b5015b77..af75e3edd 100644 --- a/MediaBrowser.Model/Channels/ChannelItemSortField.cs +++ b/MediaBrowser.Model/Channels/ChannelItemSortField.cs @@ -10,4 +10,4 @@ namespace MediaBrowser.Model.Channels PlayCount = 5, CommunityPlayCount = 6 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Channels/ChannelMediaContentType.cs b/MediaBrowser.Model/Channels/ChannelMediaContentType.cs index efb5021c0..20c4446d4 100644 --- a/MediaBrowser.Model/Channels/ChannelMediaContentType.cs +++ b/MediaBrowser.Model/Channels/ChannelMediaContentType.cs @@ -20,4 +20,4 @@ GameExtra = 8 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Channels/ChannelMediaType.cs b/MediaBrowser.Model/Channels/ChannelMediaType.cs index 102cb6644..8ceb3cce5 100644 --- a/MediaBrowser.Model/Channels/ChannelMediaType.cs +++ b/MediaBrowser.Model/Channels/ChannelMediaType.cs @@ -8,4 +8,4 @@ Photo = 2 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Configuration/ImageOption.cs b/MediaBrowser.Model/Configuration/ImageOption.cs index ade0af83e..3b985bb1b 100644 --- a/MediaBrowser.Model/Configuration/ImageOption.cs +++ b/MediaBrowser.Model/Configuration/ImageOption.cs @@ -26,4 +26,4 @@ namespace MediaBrowser.Model.Configuration Limit = 1; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Configuration/ImageSavingConvention.cs b/MediaBrowser.Model/Configuration/ImageSavingConvention.cs index 611678e67..c9a49afd7 100644 --- a/MediaBrowser.Model/Configuration/ImageSavingConvention.cs +++ b/MediaBrowser.Model/Configuration/ImageSavingConvention.cs @@ -5,4 +5,4 @@ Legacy, Compatible } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Configuration/MetadataPluginType.cs b/MediaBrowser.Model/Configuration/MetadataPluginType.cs index 5ba0b395e..985107ac9 100644 --- a/MediaBrowser.Model/Configuration/MetadataPluginType.cs +++ b/MediaBrowser.Model/Configuration/MetadataPluginType.cs @@ -13,4 +13,4 @@ namespace MediaBrowser.Model.Configuration MetadataSaver, SubtitleFetcher } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs b/MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs index fbee912d9..678abd858 100644 --- a/MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs +++ b/MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs @@ -8,4 +8,4 @@ None = 3, Smart = 4 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Configuration/UnratedItem.cs b/MediaBrowser.Model/Configuration/UnratedItem.cs index 1082d684b..2d0bce47f 100644 --- a/MediaBrowser.Model/Configuration/UnratedItem.cs +++ b/MediaBrowser.Model/Configuration/UnratedItem.cs @@ -13,4 +13,4 @@ namespace MediaBrowser.Model.Configuration ChannelContent, Other } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Cryptography/ICryptoProvider.cs b/MediaBrowser.Model/Cryptography/ICryptoProvider.cs index 7a82dee52..2e9778d66 100644 --- a/MediaBrowser.Model/Cryptography/ICryptoProvider.cs +++ b/MediaBrowser.Model/Cryptography/ICryptoProvider.cs @@ -10,4 +10,4 @@ namespace MediaBrowser.Model.Cryptography byte[] ComputeMD5(byte[] bytes); byte[] ComputeSHA1(byte[] bytes); } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/AudioOptions.cs b/MediaBrowser.Model/Dlna/AudioOptions.cs index 88f118fe1..29a7a1154 100644 --- a/MediaBrowser.Model/Dlna/AudioOptions.cs +++ b/MediaBrowser.Model/Dlna/AudioOptions.cs @@ -83,4 +83,4 @@ namespace MediaBrowser.Model.Dlna return null; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/CodecType.cs b/MediaBrowser.Model/Dlna/CodecType.cs index 415cae7ac..e4eabcd18 100644 --- a/MediaBrowser.Model/Dlna/CodecType.cs +++ b/MediaBrowser.Model/Dlna/CodecType.cs @@ -6,4 +6,4 @@ VideoAudio = 1, Audio = 2 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/DeviceProfileType.cs b/MediaBrowser.Model/Dlna/DeviceProfileType.cs index f881a4539..19d866f51 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfileType.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfileType.cs @@ -5,4 +5,4 @@ System = 0, User = 1 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/DlnaProfileType.cs b/MediaBrowser.Model/Dlna/DlnaProfileType.cs index 1bad14081..39b4b688e 100644 --- a/MediaBrowser.Model/Dlna/DlnaProfileType.cs +++ b/MediaBrowser.Model/Dlna/DlnaProfileType.cs @@ -6,4 +6,4 @@ Video = 1, Photo = 2 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/EncodingContext.cs b/MediaBrowser.Model/Dlna/EncodingContext.cs index f83d8ddc8..7352bdd19 100644 --- a/MediaBrowser.Model/Dlna/EncodingContext.cs +++ b/MediaBrowser.Model/Dlna/EncodingContext.cs @@ -5,4 +5,4 @@ namespace MediaBrowser.Model.Dlna Streaming = 0, Static = 1 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/HeaderMatchType.cs b/MediaBrowser.Model/Dlna/HeaderMatchType.cs index 7a0d5c24f..764a512ac 100644 --- a/MediaBrowser.Model/Dlna/HeaderMatchType.cs +++ b/MediaBrowser.Model/Dlna/HeaderMatchType.cs @@ -6,4 +6,4 @@ Regex = 1, Substring = 2 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs b/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs index 926963ef6..791d5967f 100644 --- a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs +++ b/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs @@ -13,4 +13,4 @@ namespace MediaBrowser.Model.Dlna [XmlAttribute("match")] public HeaderMatchType Match { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/ProfileCondition.cs b/MediaBrowser.Model/Dlna/ProfileCondition.cs index 39f99b92e..5464daf22 100644 --- a/MediaBrowser.Model/Dlna/ProfileCondition.cs +++ b/MediaBrowser.Model/Dlna/ProfileCondition.cs @@ -35,4 +35,4 @@ namespace MediaBrowser.Model.Dlna IsRequired = isRequired; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/ProfileConditionType.cs b/MediaBrowser.Model/Dlna/ProfileConditionType.cs index b0a94c5b3..71afd54bf 100644 --- a/MediaBrowser.Model/Dlna/ProfileConditionType.cs +++ b/MediaBrowser.Model/Dlna/ProfileConditionType.cs @@ -8,4 +8,4 @@ GreaterThanEqual = 3, EqualsAny = 4 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/ProfileConditionValue.cs b/MediaBrowser.Model/Dlna/ProfileConditionValue.cs index a96e9ac36..e28d9e5cb 100644 --- a/MediaBrowser.Model/Dlna/ProfileConditionValue.cs +++ b/MediaBrowser.Model/Dlna/ProfileConditionValue.cs @@ -26,4 +26,4 @@ AudioSampleRate = 22, AudioBitDepth = 23 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/ResolutionConfiguration.cs b/MediaBrowser.Model/Dlna/ResolutionConfiguration.cs index 8efdb0660..6b1f85440 100644 --- a/MediaBrowser.Model/Dlna/ResolutionConfiguration.cs +++ b/MediaBrowser.Model/Dlna/ResolutionConfiguration.cs @@ -11,4 +11,4 @@ namespace MediaBrowser.Model.Dlna MaxBitrate = maxBitrate; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/ResolutionOptions.cs b/MediaBrowser.Model/Dlna/ResolutionOptions.cs index 6b711cfa0..30c078b55 100644 --- a/MediaBrowser.Model/Dlna/ResolutionOptions.cs +++ b/MediaBrowser.Model/Dlna/ResolutionOptions.cs @@ -5,4 +5,4 @@ namespace MediaBrowser.Model.Dlna public int? MaxWidth { get; set; } public int? MaxHeight { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/SearchType.cs b/MediaBrowser.Model/Dlna/SearchType.cs index 27b207879..a34d3862d 100644 --- a/MediaBrowser.Model/Dlna/SearchType.cs +++ b/MediaBrowser.Model/Dlna/SearchType.cs @@ -9,4 +9,4 @@ Playlist = 4, MusicAlbum = 5 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/SubtitleDeliveryMethod.cs b/MediaBrowser.Model/Dlna/SubtitleDeliveryMethod.cs index b4e13c5ba..925c1f9fc 100644 --- a/MediaBrowser.Model/Dlna/SubtitleDeliveryMethod.cs +++ b/MediaBrowser.Model/Dlna/SubtitleDeliveryMethod.cs @@ -19,4 +19,4 @@ namespace MediaBrowser.Model.Dlna /// Hls = 3 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs b/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs index 7a89308dc..e81c26e69 100644 --- a/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs +++ b/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs @@ -12,4 +12,4 @@ namespace MediaBrowser.Model.Dlna public SubtitleDeliveryMethod DeliveryMethod { get; set; } public bool IsExternalUrl { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/TranscodeSeekInfo.cs b/MediaBrowser.Model/Dlna/TranscodeSeekInfo.cs index 564ce5c60..e8973fce0 100644 --- a/MediaBrowser.Model/Dlna/TranscodeSeekInfo.cs +++ b/MediaBrowser.Model/Dlna/TranscodeSeekInfo.cs @@ -5,4 +5,4 @@ Auto = 0, Bytes = 1 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/VideoOptions.cs b/MediaBrowser.Model/Dlna/VideoOptions.cs index 041d2cd5d..35d0dd18c 100644 --- a/MediaBrowser.Model/Dlna/VideoOptions.cs +++ b/MediaBrowser.Model/Dlna/VideoOptions.cs @@ -8,4 +8,4 @@ public int? AudioStreamIndex { get; set; } public int? SubtitleStreamIndex { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dlna/XmlAttribute.cs b/MediaBrowser.Model/Dlna/XmlAttribute.cs index e8e13ba0d..7ee15233a 100644 --- a/MediaBrowser.Model/Dlna/XmlAttribute.cs +++ b/MediaBrowser.Model/Dlna/XmlAttribute.cs @@ -10,4 +10,4 @@ namespace MediaBrowser.Model.Dlna [XmlAttribute("value")] public string Value { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Drawing/ImageSize.cs b/MediaBrowser.Model/Drawing/ImageSize.cs index c2b0291bd..b6866d38e 100644 --- a/MediaBrowser.Model/Drawing/ImageSize.cs +++ b/MediaBrowser.Model/Drawing/ImageSize.cs @@ -90,4 +90,4 @@ namespace MediaBrowser.Model.Drawing } } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dto/MediaSourceType.cs b/MediaBrowser.Model/Dto/MediaSourceType.cs index e04978502..b643cad9a 100644 --- a/MediaBrowser.Model/Dto/MediaSourceType.cs +++ b/MediaBrowser.Model/Dto/MediaSourceType.cs @@ -6,4 +6,4 @@ namespace MediaBrowser.Model.Dto Grouping = 1, Placeholder = 2 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dto/RatingType.cs b/MediaBrowser.Model/Dto/RatingType.cs index f151adce9..fc1f7ea0f 100644 --- a/MediaBrowser.Model/Dto/RatingType.cs +++ b/MediaBrowser.Model/Dto/RatingType.cs @@ -5,4 +5,4 @@ namespace MediaBrowser.Model.Dto Score, Likes } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Dto/RecommendationType.cs b/MediaBrowser.Model/Dto/RecommendationType.cs index 1adf9b082..55a0a8091 100644 --- a/MediaBrowser.Model/Dto/RecommendationType.cs +++ b/MediaBrowser.Model/Dto/RecommendationType.cs @@ -14,4 +14,4 @@ namespace MediaBrowser.Model.Dto HasLikedActor = 5 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Entities/CollectionType.cs b/MediaBrowser.Model/Entities/CollectionType.cs index f49e73c16..12945eddd 100644 --- a/MediaBrowser.Model/Entities/CollectionType.cs +++ b/MediaBrowser.Model/Entities/CollectionType.cs @@ -55,4 +55,4 @@ public const string MusicFavoriteAlbums = "MusicFavoriteAlbums"; public const string MusicFavoriteSongs = "MusicFavoriteSongs"; } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Entities/IsoType.cs b/MediaBrowser.Model/Entities/IsoType.cs index 567b98ab9..8e4f0d63a 100644 --- a/MediaBrowser.Model/Entities/IsoType.cs +++ b/MediaBrowser.Model/Entities/IsoType.cs @@ -14,4 +14,4 @@ namespace MediaBrowser.Model.Entities /// BluRay } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Entities/MBRegistrationRecord.cs b/MediaBrowser.Model/Entities/MBRegistrationRecord.cs index 00176fb34..4132585a0 100644 --- a/MediaBrowser.Model/Entities/MBRegistrationRecord.cs +++ b/MediaBrowser.Model/Entities/MBRegistrationRecord.cs @@ -11,4 +11,4 @@ namespace MediaBrowser.Model.Entities public bool TrialVersion { get; set; } public bool IsValid { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Entities/MediaStreamType.cs b/MediaBrowser.Model/Entities/MediaStreamType.cs index 084a411f9..4fc1e5372 100644 --- a/MediaBrowser.Model/Entities/MediaStreamType.cs +++ b/MediaBrowser.Model/Entities/MediaStreamType.cs @@ -22,4 +22,4 @@ namespace MediaBrowser.Model.Entities /// EmbeddedImage } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs index 3f8873798..3957f9dbe 100644 --- a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs +++ b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs @@ -100,4 +100,4 @@ namespace MediaBrowser.Model.Entities instance.SetProviderId(provider.ToString(), value); } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Entities/ScrollDirection.cs b/MediaBrowser.Model/Entities/ScrollDirection.cs index ed2210300..bc66364f7 100644 --- a/MediaBrowser.Model/Entities/ScrollDirection.cs +++ b/MediaBrowser.Model/Entities/ScrollDirection.cs @@ -14,4 +14,4 @@ namespace MediaBrowser.Model.Entities /// Vertical } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Entities/SortOrder.cs b/MediaBrowser.Model/Entities/SortOrder.cs index 5130449ba..558ebeac2 100644 --- a/MediaBrowser.Model/Entities/SortOrder.cs +++ b/MediaBrowser.Model/Entities/SortOrder.cs @@ -14,4 +14,4 @@ namespace MediaBrowser.Model.Entities /// Descending } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Entities/TrailerType.cs b/MediaBrowser.Model/Entities/TrailerType.cs index 085f461cf..73be5d7ca 100644 --- a/MediaBrowser.Model/Entities/TrailerType.cs +++ b/MediaBrowser.Model/Entities/TrailerType.cs @@ -8,4 +8,4 @@ namespace MediaBrowser.Model.Entities Archive = 4, LocalTrailer = 5 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Globalization/LocalizatonOption.cs b/MediaBrowser.Model/Globalization/LocalizatonOption.cs index 61749cbc3..7fbc8135d 100644 --- a/MediaBrowser.Model/Globalization/LocalizatonOption.cs +++ b/MediaBrowser.Model/Globalization/LocalizatonOption.cs @@ -5,4 +5,4 @@ namespace MediaBrowser.Model.Globalization public string Name { get; set; } public string Value { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/IO/FileSystemEntryType.cs b/MediaBrowser.Model/IO/FileSystemEntryType.cs index e7c67c606..a4ed2334d 100644 --- a/MediaBrowser.Model/IO/FileSystemEntryType.cs +++ b/MediaBrowser.Model/IO/FileSystemEntryType.cs @@ -22,4 +22,4 @@ namespace MediaBrowser.Model.IO /// NetworkShare } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/IO/IIsoManager.cs b/MediaBrowser.Model/IO/IIsoManager.cs index 92c4d5aee..2e684b976 100644 --- a/MediaBrowser.Model/IO/IIsoManager.cs +++ b/MediaBrowser.Model/IO/IIsoManager.cs @@ -31,4 +31,4 @@ namespace MediaBrowser.Model.IO /// The mounters. void AddParts(IEnumerable mounters); } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/IO/IIsoMount.cs b/MediaBrowser.Model/IO/IIsoMount.cs index 4f8f8b5d2..1cc3de19e 100644 --- a/MediaBrowser.Model/IO/IIsoMount.cs +++ b/MediaBrowser.Model/IO/IIsoMount.cs @@ -19,4 +19,4 @@ namespace MediaBrowser.Model.IO /// The mounted path. string MountedPath { get; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs b/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs index 3b1828e28..660542314 100644 --- a/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs @@ -123,4 +123,4 @@ namespace MediaBrowser.Model.LiveTv public bool IsPostPaddingRequired { get; set; } public KeepUntil KeepUntil { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/LiveTv/DayPattern.cs b/MediaBrowser.Model/LiveTv/DayPattern.cs index 8251795dc..57d4ac461 100644 --- a/MediaBrowser.Model/LiveTv/DayPattern.cs +++ b/MediaBrowser.Model/LiveTv/DayPattern.cs @@ -6,4 +6,4 @@ Weekdays, Weekends } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/LiveTv/GuideInfo.cs b/MediaBrowser.Model/LiveTv/GuideInfo.cs index c21f6d871..1303c278e 100644 --- a/MediaBrowser.Model/LiveTv/GuideInfo.cs +++ b/MediaBrowser.Model/LiveTv/GuideInfo.cs @@ -16,4 +16,4 @@ namespace MediaBrowser.Model.LiveTv /// The end date. public DateTime EndDate { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/LiveTv/LiveTvServiceStatus.cs b/MediaBrowser.Model/LiveTv/LiveTvServiceStatus.cs index 20fe84500..7578f329a 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvServiceStatus.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvServiceStatus.cs @@ -5,4 +5,4 @@ namespace MediaBrowser.Model.LiveTv Ok = 0, Unavailable = 1 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/LiveTv/LiveTvTunerStatus.cs b/MediaBrowser.Model/LiveTv/LiveTvTunerStatus.cs index 055199fca..f7f521e43 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvTunerStatus.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvTunerStatus.cs @@ -7,4 +7,4 @@ namespace MediaBrowser.Model.LiveTv RecordingTv = 2, LiveTv = 3 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/LiveTv/ProgramAudio.cs b/MediaBrowser.Model/LiveTv/ProgramAudio.cs index 9a272492c..6059a4174 100644 --- a/MediaBrowser.Model/LiveTv/ProgramAudio.cs +++ b/MediaBrowser.Model/LiveTv/ProgramAudio.cs @@ -9,4 +9,4 @@ Thx, Atmos } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs b/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs index 95260cc0e..2369a53b6 100644 --- a/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs +++ b/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs @@ -16,4 +16,4 @@ namespace MediaBrowser.Model.LiveTv /// The sort order. public SortOrder SortOrder { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/LiveTv/TimerQuery.cs b/MediaBrowser.Model/LiveTv/TimerQuery.cs index c6202680c..9a6552fb9 100644 --- a/MediaBrowser.Model/LiveTv/TimerQuery.cs +++ b/MediaBrowser.Model/LiveTv/TimerQuery.cs @@ -20,4 +20,4 @@ public bool? IsScheduled { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/MediaInfo/AudioCodec.cs b/MediaBrowser.Model/MediaInfo/AudioCodec.cs index 93aba2f43..51dddd902 100644 --- a/MediaBrowser.Model/MediaInfo/AudioCodec.cs +++ b/MediaBrowser.Model/MediaInfo/AudioCodec.cs @@ -23,4 +23,4 @@ } } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/MediaInfo/MediaProtocol.cs b/MediaBrowser.Model/MediaInfo/MediaProtocol.cs index 5882ecde0..a993f6075 100644 --- a/MediaBrowser.Model/MediaInfo/MediaProtocol.cs +++ b/MediaBrowser.Model/MediaInfo/MediaProtocol.cs @@ -10,4 +10,4 @@ namespace MediaBrowser.Model.MediaInfo Rtp = 5, Ftp = 6 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs b/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs index 60b0bb54d..cdcb6f666 100644 --- a/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs +++ b/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs @@ -10,4 +10,4 @@ public const string SMI = "smi"; public const string TTML = "ttml"; } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/MediaInfo/TransportStreamTimestamp.cs b/MediaBrowser.Model/MediaInfo/TransportStreamTimestamp.cs index 4c808a8dc..edfe2fda6 100644 --- a/MediaBrowser.Model/MediaInfo/TransportStreamTimestamp.cs +++ b/MediaBrowser.Model/MediaInfo/TransportStreamTimestamp.cs @@ -6,4 +6,4 @@ Zero, Valid } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/MediaInfo/VideoCodec.cs b/MediaBrowser.Model/MediaInfo/VideoCodec.cs index 81755dac9..cc24c7ad9 100644 --- a/MediaBrowser.Model/MediaInfo/VideoCodec.cs +++ b/MediaBrowser.Model/MediaInfo/VideoCodec.cs @@ -11,4 +11,4 @@ public const string MSMPEG4 = "msmpeg4"; public const string VC1 = "vc1"; } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Net/ISocket.cs b/MediaBrowser.Model/Net/ISocket.cs index 58eb1b941..a9d772855 100644 --- a/MediaBrowser.Model/Net/ISocket.cs +++ b/MediaBrowser.Model/Net/ISocket.cs @@ -23,4 +23,4 @@ namespace MediaBrowser.Model.Net /// Task SendToAsync(byte[] buffer, int offset, int bytes, IpEndPointInfo endPoint, CancellationToken cancellationToken); } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Notifications/NotificationType.cs b/MediaBrowser.Model/Notifications/NotificationType.cs index eefd15808..9d16e4a16 100644 --- a/MediaBrowser.Model/Notifications/NotificationType.cs +++ b/MediaBrowser.Model/Notifications/NotificationType.cs @@ -21,4 +21,4 @@ namespace MediaBrowser.Model.Notifications CameraImageUploaded, UserLockedOut } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Notifications/SendToUserType.cs b/MediaBrowser.Model/Notifications/SendToUserType.cs index 1998d3102..9f63d24bf 100644 --- a/MediaBrowser.Model/Notifications/SendToUserType.cs +++ b/MediaBrowser.Model/Notifications/SendToUserType.cs @@ -6,4 +6,4 @@ namespace MediaBrowser.Model.Notifications Admins = 1, Custom = 2 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Providers/ExternalUrl.cs b/MediaBrowser.Model/Providers/ExternalUrl.cs index fb744f446..36e631434 100644 --- a/MediaBrowser.Model/Providers/ExternalUrl.cs +++ b/MediaBrowser.Model/Providers/ExternalUrl.cs @@ -14,4 +14,4 @@ /// The type of the item. public string Url { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Providers/RemoteImageQuery.cs b/MediaBrowser.Model/Providers/RemoteImageQuery.cs index 8d5231a25..bf59de84b 100644 --- a/MediaBrowser.Model/Providers/RemoteImageQuery.cs +++ b/MediaBrowser.Model/Providers/RemoteImageQuery.cs @@ -12,4 +12,4 @@ namespace MediaBrowser.Model.Providers public bool IncludeAllLanguages { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Providers/SubtitleProviderInfo.cs b/MediaBrowser.Model/Providers/SubtitleProviderInfo.cs index ecce18bd5..48a247818 100644 --- a/MediaBrowser.Model/Providers/SubtitleProviderInfo.cs +++ b/MediaBrowser.Model/Providers/SubtitleProviderInfo.cs @@ -5,4 +5,4 @@ namespace MediaBrowser.Model.Providers public string Name { get; set; } public string Id { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Querying/AllThemeMediaResult.cs b/MediaBrowser.Model/Querying/AllThemeMediaResult.cs index 57114cc4a..1ca9136c4 100644 --- a/MediaBrowser.Model/Querying/AllThemeMediaResult.cs +++ b/MediaBrowser.Model/Querying/AllThemeMediaResult.cs @@ -17,4 +17,4 @@ SoundtrackSongsResult = new ThemeMediaResult(); } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs b/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs index 14aa2a8fb..bdac249bd 100644 --- a/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs +++ b/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs @@ -54,4 +54,4 @@ namespace MediaBrowser.Model.Querying EnableImageTypes = new ImageType[] { }; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Serialization/IXmlSerializer.cs b/MediaBrowser.Model/Serialization/IXmlSerializer.cs index eb23d784f..0fa35c133 100644 --- a/MediaBrowser.Model/Serialization/IXmlSerializer.cs +++ b/MediaBrowser.Model/Serialization/IXmlSerializer.cs @@ -43,4 +43,4 @@ namespace MediaBrowser.Model.Serialization /// System.Object. object DeserializeFromBytes(Type type, byte[] buffer); } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Session/BrowseRequest.cs b/MediaBrowser.Model/Session/BrowseRequest.cs index 0a13c0549..a4fdbcc38 100644 --- a/MediaBrowser.Model/Session/BrowseRequest.cs +++ b/MediaBrowser.Model/Session/BrowseRequest.cs @@ -24,4 +24,4 @@ namespace MediaBrowser.Model.Session /// The name of the item. public string ItemName { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Session/GeneralCommandType.cs b/MediaBrowser.Model/Session/GeneralCommandType.cs index 9044dc3ec..e40c5e43b 100644 --- a/MediaBrowser.Model/Session/GeneralCommandType.cs +++ b/MediaBrowser.Model/Session/GeneralCommandType.cs @@ -43,4 +43,4 @@ PlayMediaSource = 34, PlayTrailers = 35 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Session/MessageCommand.cs b/MediaBrowser.Model/Session/MessageCommand.cs index b028765ed..3e4f32349 100644 --- a/MediaBrowser.Model/Session/MessageCommand.cs +++ b/MediaBrowser.Model/Session/MessageCommand.cs @@ -9,4 +9,4 @@ namespace MediaBrowser.Model.Session public long? TimeoutMs { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Session/PlayCommand.cs b/MediaBrowser.Model/Session/PlayCommand.cs index 3a5a951d7..413553ac8 100644 --- a/MediaBrowser.Model/Session/PlayCommand.cs +++ b/MediaBrowser.Model/Session/PlayCommand.cs @@ -26,4 +26,4 @@ /// PlayShuffle = 4 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Session/PlayMethod.cs b/MediaBrowser.Model/Session/PlayMethod.cs index 87b728627..c782ec9c1 100644 --- a/MediaBrowser.Model/Session/PlayMethod.cs +++ b/MediaBrowser.Model/Session/PlayMethod.cs @@ -6,4 +6,4 @@ DirectStream = 1, DirectPlay = 2 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Session/PlayRequest.cs b/MediaBrowser.Model/Session/PlayRequest.cs index 4eb92bf23..eedf5772e 100644 --- a/MediaBrowser.Model/Session/PlayRequest.cs +++ b/MediaBrowser.Model/Session/PlayRequest.cs @@ -40,4 +40,4 @@ namespace MediaBrowser.Model.Session public string MediaSourceId { get; set; } public int? StartIndex { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Session/PlayerStateInfo.cs b/MediaBrowser.Model/Session/PlayerStateInfo.cs index f78842e29..2ac91a66c 100644 --- a/MediaBrowser.Model/Session/PlayerStateInfo.cs +++ b/MediaBrowser.Model/Session/PlayerStateInfo.cs @@ -62,4 +62,4 @@ /// The repeat mode. public RepeatMode RepeatMode { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Session/PlaystateCommand.cs b/MediaBrowser.Model/Session/PlaystateCommand.cs index 3b70d5454..a1af96b6a 100644 --- a/MediaBrowser.Model/Session/PlaystateCommand.cs +++ b/MediaBrowser.Model/Session/PlaystateCommand.cs @@ -40,4 +40,4 @@ namespace MediaBrowser.Model.Session FastForward, PlayPause } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Session/PlaystateRequest.cs b/MediaBrowser.Model/Session/PlaystateRequest.cs index 8a046b503..1cf9a1fa4 100644 --- a/MediaBrowser.Model/Session/PlaystateRequest.cs +++ b/MediaBrowser.Model/Session/PlaystateRequest.cs @@ -12,4 +12,4 @@ /// The controlling user identifier. public string ControllingUserId { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Session/SessionUserInfo.cs b/MediaBrowser.Model/Session/SessionUserInfo.cs index 7746bc2d6..75be49f1e 100644 --- a/MediaBrowser.Model/Session/SessionUserInfo.cs +++ b/MediaBrowser.Model/Session/SessionUserInfo.cs @@ -18,4 +18,4 @@ namespace MediaBrowser.Model.Session /// The name of the user. public string UserName { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Session/TranscodingInfo.cs b/MediaBrowser.Model/Session/TranscodingInfo.cs index 076dd81ce..5161882fd 100644 --- a/MediaBrowser.Model/Session/TranscodingInfo.cs +++ b/MediaBrowser.Model/Session/TranscodingInfo.cs @@ -50,4 +50,4 @@ namespace MediaBrowser.Model.Session SubtitleCodecNotSupported = 21, DirectPlayError = 22 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/System/PublicSystemInfo.cs b/MediaBrowser.Model/System/PublicSystemInfo.cs index b9a3260b0..bc8983fd1 100644 --- a/MediaBrowser.Model/System/PublicSystemInfo.cs +++ b/MediaBrowser.Model/System/PublicSystemInfo.cs @@ -38,4 +38,4 @@ namespace MediaBrowser.Model.System /// The id. public string Id { get; set; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/System/WakeOnLanInfo.cs b/MediaBrowser.Model/System/WakeOnLanInfo.cs index cde867176..031458735 100644 --- a/MediaBrowser.Model/System/WakeOnLanInfo.cs +++ b/MediaBrowser.Model/System/WakeOnLanInfo.cs @@ -10,4 +10,4 @@ namespace MediaBrowser.Model.System Port = 9; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Tasks/IConfigurableScheduledTask.cs b/MediaBrowser.Model/Tasks/IConfigurableScheduledTask.cs index ed981a905..ab58f091c 100644 --- a/MediaBrowser.Model/Tasks/IConfigurableScheduledTask.cs +++ b/MediaBrowser.Model/Tasks/IConfigurableScheduledTask.cs @@ -15,4 +15,4 @@ bool IsLogged { get; } } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs b/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs index 415207f8f..c0140b6cb 100644 --- a/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs +++ b/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs @@ -73,4 +73,4 @@ namespace MediaBrowser.Model.Tasks /// void ReloadTriggerEvents(); } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Tasks/ITaskManager.cs b/MediaBrowser.Model/Tasks/ITaskManager.cs index dd29cdb65..f183336ae 100644 --- a/MediaBrowser.Model/Tasks/ITaskManager.cs +++ b/MediaBrowser.Model/Tasks/ITaskManager.cs @@ -75,4 +75,4 @@ namespace MediaBrowser.Model.Tasks void RunTaskOnNextStartup(string key); } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Updates/PackageTargetSystem.cs b/MediaBrowser.Model/Updates/PackageTargetSystem.cs index c80dddde3..a0646f959 100644 --- a/MediaBrowser.Model/Updates/PackageTargetSystem.cs +++ b/MediaBrowser.Model/Updates/PackageTargetSystem.cs @@ -18,4 +18,4 @@ namespace MediaBrowser.Model.Updates /// MBClassic } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Updates/PackageVersionClass.cs b/MediaBrowser.Model/Updates/PackageVersionClass.cs index 3f51e1b3c..52f08b73b 100644 --- a/MediaBrowser.Model/Updates/PackageVersionClass.cs +++ b/MediaBrowser.Model/Updates/PackageVersionClass.cs @@ -18,4 +18,4 @@ namespace MediaBrowser.Model.Updates /// Dev = 2 } -} \ No newline at end of file +} diff --git a/MediaBrowser.Model/Updates/PackageVersionInfo.cs b/MediaBrowser.Model/Updates/PackageVersionInfo.cs index 3ac518187..7126ae7a5 100644 --- a/MediaBrowser.Model/Updates/PackageVersionInfo.cs +++ b/MediaBrowser.Model/Updates/PackageVersionInfo.cs @@ -92,4 +92,4 @@ namespace MediaBrowser.Model.Updates public string runtimes { get; set; } } -} \ No newline at end of file +} -- cgit v1.2.3 From 8f41ba4d3aa0a7001748c0282e39baf50f0af13f Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Sun, 13 Jan 2019 21:02:23 +0100 Subject: Find+Sed BOM removal *.cs: MediaBrowser.LocalMetadata-MediaBrowser.Model --- MediaBrowser.LocalMetadata/BaseXmlProvider.cs | 2 +- MediaBrowser.LocalMetadata/Images/CollectionFolderImageProvider.cs | 2 +- MediaBrowser.LocalMetadata/Images/EpisodeLocalImageProvider.cs | 2 +- .../Images/InternalMetadataFolderImageProvider.cs | 2 +- MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs | 2 +- MediaBrowser.LocalMetadata/Parsers/BoxSetXmlParser.cs | 2 +- MediaBrowser.LocalMetadata/Parsers/GameSystemXmlParser.cs | 2 +- MediaBrowser.LocalMetadata/Parsers/GameXmlParser.cs | 2 +- MediaBrowser.LocalMetadata/Parsers/PlaylistXmlParser.cs | 2 +- MediaBrowser.LocalMetadata/Providers/BoxSetXmlProvider.cs | 2 +- MediaBrowser.LocalMetadata/Providers/GameSystemXmlProvider.cs | 2 +- MediaBrowser.LocalMetadata/Providers/GameXmlProvider.cs | 2 +- MediaBrowser.LocalMetadata/Providers/PlaylistXmlProvider.cs | 2 +- MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs | 2 +- MediaBrowser.LocalMetadata/Savers/BoxSetXmlSaver.cs | 2 +- MediaBrowser.LocalMetadata/Savers/GameSystemXmlSaver.cs | 2 +- MediaBrowser.LocalMetadata/Savers/GameXmlSaver.cs | 2 +- MediaBrowser.LocalMetadata/Savers/PersonXmlSaver.cs | 2 +- MediaBrowser.LocalMetadata/Savers/PlaylistXmlSaver.cs | 2 +- .../Configuration/EncodingConfigurationFactory.cs | 2 +- MediaBrowser.MediaEncoding/Encoder/AudioEncoder.cs | 2 +- MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs | 2 +- MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs | 2 +- MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs | 2 +- MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs | 2 +- MediaBrowser.MediaEncoding/Encoder/EncodingUtils.cs | 2 +- MediaBrowser.MediaEncoding/Encoder/VideoEncoder.cs | 2 +- MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs | 2 +- MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs | 2 +- MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs | 2 +- MediaBrowser.MediaEncoding/Subtitles/AssParser.cs | 2 +- MediaBrowser.MediaEncoding/Subtitles/ConfigurationExtension.cs | 2 +- MediaBrowser.MediaEncoding/Subtitles/ISubtitleParser.cs | 2 +- MediaBrowser.MediaEncoding/Subtitles/ISubtitleWriter.cs | 2 +- MediaBrowser.MediaEncoding/Subtitles/JsonWriter.cs | 2 +- MediaBrowser.MediaEncoding/Subtitles/OpenSubtitleDownloader.cs | 2 +- MediaBrowser.MediaEncoding/Subtitles/ParserValues.cs | 2 +- MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs | 2 +- MediaBrowser.MediaEncoding/Subtitles/SrtWriter.cs | 2 +- MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs | 2 +- MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs | 2 +- MediaBrowser.MediaEncoding/Subtitles/TtmlWriter.cs | 2 +- MediaBrowser.MediaEncoding/Subtitles/VttWriter.cs | 2 +- MediaBrowser.Model/Activity/ActivityLogEntry.cs | 2 +- MediaBrowser.Model/Activity/IActivityManager.cs | 2 +- MediaBrowser.Model/Activity/IActivityRepository.cs | 2 +- MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs | 2 +- MediaBrowser.Model/Branding/BrandingOptions.cs | 2 +- MediaBrowser.Model/Channels/ChannelFeatures.cs | 2 +- MediaBrowser.Model/Channels/ChannelInfo.cs | 2 +- MediaBrowser.Model/Channels/ChannelMediaContentType.cs | 2 +- MediaBrowser.Model/Channels/ChannelMediaType.cs | 2 +- MediaBrowser.Model/Channels/ChannelQuery.cs | 2 +- MediaBrowser.Model/Collections/CollectionCreationResult.cs | 2 +- MediaBrowser.Model/Configuration/AccessSchedule.cs | 2 +- MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs | 2 +- MediaBrowser.Model/Configuration/DynamicDayOfWeek.cs | 2 +- MediaBrowser.Model/Configuration/EncodingOptions.cs | 2 +- MediaBrowser.Model/Configuration/FanartOptions.cs | 2 +- MediaBrowser.Model/Configuration/ImageSavingConvention.cs | 2 +- MediaBrowser.Model/Configuration/LibraryOptions.cs | 2 +- MediaBrowser.Model/Configuration/MetadataConfiguration.cs | 2 +- MediaBrowser.Model/Configuration/MetadataOptions.cs | 2 +- MediaBrowser.Model/Configuration/MetadataPlugin.cs | 2 +- MediaBrowser.Model/Configuration/ServerConfiguration.cs | 2 +- MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs | 2 +- MediaBrowser.Model/Configuration/UserConfiguration.cs | 2 +- MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs | 2 +- MediaBrowser.Model/Connect/ConnectAuthorization.cs | 2 +- MediaBrowser.Model/Connect/ConnectUser.cs | 2 +- MediaBrowser.Model/Connect/ConnectUserQuery.cs | 2 +- MediaBrowser.Model/Connect/UserLinkType.cs | 2 +- MediaBrowser.Model/Cryptography/ICryptoProvider.cs | 2 +- MediaBrowser.Model/Devices/ContentUploadHistory.cs | 2 +- MediaBrowser.Model/Devices/DeviceInfo.cs | 2 +- MediaBrowser.Model/Devices/DeviceQuery.cs | 2 +- MediaBrowser.Model/Devices/DevicesOptions.cs | 2 +- MediaBrowser.Model/Devices/LocalFileInfo.cs | 2 +- MediaBrowser.Model/Diagnostics/IProcess.cs | 2 +- MediaBrowser.Model/Diagnostics/IProcessFactory.cs | 2 +- MediaBrowser.Model/Dlna/AudioOptions.cs | 2 +- MediaBrowser.Model/Dlna/CodecProfile.cs | 2 +- MediaBrowser.Model/Dlna/CodecType.cs | 2 +- MediaBrowser.Model/Dlna/ConditionProcessor.cs | 2 +- MediaBrowser.Model/Dlna/ContainerProfile.cs | 2 +- MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs | 2 +- MediaBrowser.Model/Dlna/DeviceIdentification.cs | 2 +- MediaBrowser.Model/Dlna/DeviceProfile.cs | 2 +- MediaBrowser.Model/Dlna/DeviceProfileInfo.cs | 2 +- MediaBrowser.Model/Dlna/DeviceProfileType.cs | 2 +- MediaBrowser.Model/Dlna/DirectPlayProfile.cs | 2 +- MediaBrowser.Model/Dlna/DlnaFlags.cs | 2 +- MediaBrowser.Model/Dlna/DlnaMaps.cs | 2 +- MediaBrowser.Model/Dlna/DlnaProfileType.cs | 2 +- MediaBrowser.Model/Dlna/HeaderMatchType.cs | 2 +- MediaBrowser.Model/Dlna/HttpHeaderInfo.cs | 2 +- MediaBrowser.Model/Dlna/IDeviceDiscovery.cs | 2 +- MediaBrowser.Model/Dlna/ITranscoderSupport.cs | 2 +- MediaBrowser.Model/Dlna/MediaFormatProfile.cs | 2 +- MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs | 2 +- MediaBrowser.Model/Dlna/PlaybackErrorCode.cs | 2 +- MediaBrowser.Model/Dlna/ProfileCondition.cs | 2 +- MediaBrowser.Model/Dlna/ProfileConditionType.cs | 2 +- MediaBrowser.Model/Dlna/ProfileConditionValue.cs | 2 +- MediaBrowser.Model/Dlna/ResolutionNormalizer.cs | 2 +- MediaBrowser.Model/Dlna/ResponseProfile.cs | 2 +- MediaBrowser.Model/Dlna/SearchType.cs | 2 +- MediaBrowser.Model/Dlna/SortCriteria.cs | 2 +- MediaBrowser.Model/Dlna/StreamBuilder.cs | 2 +- MediaBrowser.Model/Dlna/StreamInfo.cs | 2 +- MediaBrowser.Model/Dlna/SubtitleProfile.cs | 2 +- MediaBrowser.Model/Dlna/TranscodeSeekInfo.cs | 2 +- MediaBrowser.Model/Dlna/TranscodingProfile.cs | 2 +- MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs | 2 +- MediaBrowser.Model/Dlna/VideoOptions.cs | 2 +- MediaBrowser.Model/Dlna/XmlAttribute.cs | 2 +- MediaBrowser.Model/Drawing/DrawingUtils.cs | 2 +- MediaBrowser.Model/Drawing/ImageFormat.cs | 2 +- MediaBrowser.Model/Drawing/ImageOrientation.cs | 2 +- MediaBrowser.Model/Dto/BaseItemDto.cs | 2 +- MediaBrowser.Model/Dto/BaseItemPerson.cs | 2 +- MediaBrowser.Model/Dto/GameSystemSummary.cs | 2 +- MediaBrowser.Model/Dto/IHasServerId.cs | 2 +- MediaBrowser.Model/Dto/IItemDto.cs | 2 +- MediaBrowser.Model/Dto/ImageByNameInfo.cs | 2 +- MediaBrowser.Model/Dto/ImageInfo.cs | 2 +- MediaBrowser.Model/Dto/ImageOptions.cs | 2 +- MediaBrowser.Model/Dto/ItemCounts.cs | 2 +- MediaBrowser.Model/Dto/ItemIndex.cs | 2 +- MediaBrowser.Model/Dto/MediaSourceInfo.cs | 2 +- MediaBrowser.Model/Dto/MetadataEditorInfo.cs | 2 +- MediaBrowser.Model/Dto/NameIdPair.cs | 2 +- MediaBrowser.Model/Dto/NameValuePair.cs | 2 +- MediaBrowser.Model/Dto/RecommendationDto.cs | 2 +- MediaBrowser.Model/Dto/UserDto.cs | 2 +- MediaBrowser.Model/Dto/UserItemDataDto.cs | 2 +- MediaBrowser.Model/Entities/ChapterInfo.cs | 2 +- MediaBrowser.Model/Entities/CollectionType.cs | 2 +- MediaBrowser.Model/Entities/DisplayPreferences.cs | 2 +- MediaBrowser.Model/Entities/EmptyRequestResult.cs | 2 +- MediaBrowser.Model/Entities/ExtraType.cs | 2 +- MediaBrowser.Model/Entities/IHasProviderIds.cs | 2 +- MediaBrowser.Model/Entities/ImageType.cs | 2 +- MediaBrowser.Model/Entities/LibraryUpdateInfo.cs | 2 +- MediaBrowser.Model/Entities/LocationType.cs | 2 +- MediaBrowser.Model/Entities/MediaStream.cs | 2 +- MediaBrowser.Model/Entities/MediaType.cs | 2 +- MediaBrowser.Model/Entities/MediaUrl.cs | 2 +- MediaBrowser.Model/Entities/MetadataFields.cs | 2 +- MediaBrowser.Model/Entities/MetadataProviders.cs | 2 +- MediaBrowser.Model/Entities/PackageReviewInfo.cs | 2 +- MediaBrowser.Model/Entities/ParentalRating.cs | 2 +- MediaBrowser.Model/Entities/PersonType.cs | 2 +- MediaBrowser.Model/Entities/PluginSecurityInfo.cs | 2 +- MediaBrowser.Model/Entities/SeriesStatus.cs | 2 +- MediaBrowser.Model/Entities/UserDataSaveReason.cs | 2 +- MediaBrowser.Model/Entities/Video3DFormat.cs | 2 +- MediaBrowser.Model/Entities/VideoType.cs | 2 +- MediaBrowser.Model/Entities/VirtualFolderInfo.cs | 2 +- MediaBrowser.Model/Events/GenericEventArgs.cs | 2 +- MediaBrowser.Model/Extensions/LinqExtensions.cs | 2 +- MediaBrowser.Model/Extensions/ListHelper.cs | 2 +- MediaBrowser.Model/Extensions/StringHelper.cs | 2 +- MediaBrowser.Model/Globalization/CountryInfo.cs | 2 +- MediaBrowser.Model/Globalization/CultureDto.cs | 2 +- MediaBrowser.Model/Globalization/ILocalizationManager.cs | 2 +- MediaBrowser.Model/IO/FileSystemEntryInfo.cs | 2 +- MediaBrowser.Model/IO/FileSystemMetadata.cs | 2 +- MediaBrowser.Model/IO/IIsoManager.cs | 2 +- MediaBrowser.Model/IO/IIsoMount.cs | 2 +- MediaBrowser.Model/IO/IShortcutHandler.cs | 2 +- MediaBrowser.Model/IO/IStreamHelper.cs | 2 +- MediaBrowser.Model/IO/IZipClient.cs | 2 +- MediaBrowser.Model/IO/StreamDefaults.cs | 2 +- MediaBrowser.Model/Library/PlayAccess.cs | 2 +- MediaBrowser.Model/Library/UserViewQuery.cs | 2 +- MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs | 2 +- MediaBrowser.Model/LiveTv/ChannelType.cs | 2 +- MediaBrowser.Model/LiveTv/DayPattern.cs | 2 +- MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs | 2 +- MediaBrowser.Model/LiveTv/LiveTvOptions.cs | 2 +- MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs | 2 +- MediaBrowser.Model/LiveTv/ProgramAudio.cs | 2 +- MediaBrowser.Model/LiveTv/RecordingQuery.cs | 2 +- MediaBrowser.Model/LiveTv/RecordingStatus.cs | 2 +- MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs | 2 +- MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs | 2 +- MediaBrowser.Model/LiveTv/TimerInfoDto.cs | 2 +- MediaBrowser.Model/LiveTv/TimerQuery.cs | 2 +- MediaBrowser.Model/MediaInfo/AudioCodec.cs | 2 +- MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs | 2 +- MediaBrowser.Model/MediaInfo/Container.cs | 2 +- MediaBrowser.Model/MediaInfo/IBlurayExaminer.cs | 2 +- MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs | 2 +- MediaBrowser.Model/MediaInfo/LiveStreamResponse.cs | 2 +- MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs | 2 +- MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs | 2 +- MediaBrowser.Model/MediaInfo/SubtitleFormat.cs | 2 +- MediaBrowser.Model/MediaInfo/SubtitleTrackEvent.cs | 2 +- MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs | 2 +- MediaBrowser.Model/MediaInfo/TransportStreamTimestamp.cs | 2 +- MediaBrowser.Model/MediaInfo/VideoCodec.cs | 2 +- MediaBrowser.Model/Net/EndPointInfo.cs | 2 +- MediaBrowser.Model/Net/HttpException.cs | 2 +- MediaBrowser.Model/Net/HttpResponse.cs | 2 +- MediaBrowser.Model/Net/IAcceptSocket.cs | 2 +- MediaBrowser.Model/Net/ISocket.cs | 2 +- MediaBrowser.Model/Net/ISocketFactory.cs | 2 +- MediaBrowser.Model/Net/IpAddressInfo.cs | 2 +- MediaBrowser.Model/Net/IpEndPointInfo.cs | 2 +- MediaBrowser.Model/Net/MimeTypes.cs | 2 +- MediaBrowser.Model/Net/NetworkShare.cs | 2 +- MediaBrowser.Model/Net/NetworkShareType.cs | 2 +- MediaBrowser.Model/Net/SocketReceiveResult.cs | 2 +- MediaBrowser.Model/Net/WebSocketMessage.cs | 2 +- MediaBrowser.Model/Notifications/NotificationLevel.cs | 2 +- MediaBrowser.Model/Notifications/NotificationOptions.cs | 2 +- MediaBrowser.Model/Notifications/NotificationRequest.cs | 2 +- MediaBrowser.Model/Notifications/NotificationTypeInfo.cs | 2 +- MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs | 2 +- MediaBrowser.Model/Playlists/PlaylistCreationResult.cs | 2 +- MediaBrowser.Model/Playlists/PlaylistItemQuery.cs | 2 +- MediaBrowser.Model/Plugins/BasePluginConfiguration.cs | 2 +- MediaBrowser.Model/Plugins/IHasWebPages.cs | 2 +- MediaBrowser.Model/Plugins/PluginInfo.cs | 2 +- MediaBrowser.Model/Plugins/PluginPageInfo.cs | 2 +- MediaBrowser.Model/Providers/ExternalIdInfo.cs | 2 +- MediaBrowser.Model/Providers/ExternalUrl.cs | 2 +- MediaBrowser.Model/Providers/ImageProviderInfo.cs | 2 +- MediaBrowser.Model/Providers/RemoteImageInfo.cs | 2 +- MediaBrowser.Model/Providers/RemoteImageQuery.cs | 2 +- MediaBrowser.Model/Providers/RemoteImageResult.cs | 2 +- MediaBrowser.Model/Providers/RemoteSearchResult.cs | 2 +- MediaBrowser.Model/Providers/RemoteSubtitleInfo.cs | 2 +- MediaBrowser.Model/Querying/AllThemeMediaResult.cs | 2 +- MediaBrowser.Model/Querying/EpisodeQuery.cs | 2 +- MediaBrowser.Model/Querying/ItemCountsQuery.cs | 2 +- MediaBrowser.Model/Querying/ItemFields.cs | 2 +- MediaBrowser.Model/Querying/ItemFilter.cs | 2 +- MediaBrowser.Model/Querying/ItemSortBy.cs | 2 +- MediaBrowser.Model/Querying/LatestItemsQuery.cs | 2 +- MediaBrowser.Model/Querying/MovieRecommendationQuery.cs | 2 +- MediaBrowser.Model/Querying/NextUpQuery.cs | 2 +- MediaBrowser.Model/Querying/QueryFilters.cs | 2 +- MediaBrowser.Model/Querying/QueryResult.cs | 2 +- MediaBrowser.Model/Querying/SessionQuery.cs | 2 +- MediaBrowser.Model/Querying/SimilarItemsQuery.cs | 2 +- MediaBrowser.Model/Querying/ThemeMediaResult.cs | 2 +- MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs | 2 +- MediaBrowser.Model/Querying/UserQuery.cs | 2 +- MediaBrowser.Model/Reflection/IAssemblyInfo.cs | 2 +- MediaBrowser.Model/Search/SearchHint.cs | 2 +- MediaBrowser.Model/Search/SearchHintResult.cs | 2 +- MediaBrowser.Model/Search/SearchQuery.cs | 2 +- MediaBrowser.Model/Serialization/IJsonSerializer.cs | 2 +- MediaBrowser.Model/Serialization/IXmlSerializer.cs | 2 +- MediaBrowser.Model/Serialization/IgnoreDataMemberAttribute.cs | 2 +- MediaBrowser.Model/Services/ApiMemberAttribute.cs | 2 +- MediaBrowser.Model/Services/HttpUtility.cs | 2 +- MediaBrowser.Model/Services/IAsyncStreamWriter.cs | 2 +- MediaBrowser.Model/Services/IHasHeaders.cs | 2 +- MediaBrowser.Model/Services/IHasRequestFilter.cs | 2 +- MediaBrowser.Model/Services/IHttpRequest.cs | 2 +- MediaBrowser.Model/Services/IHttpResponse.cs | 2 +- MediaBrowser.Model/Services/IHttpResult.cs | 2 +- MediaBrowser.Model/Services/IRequest.cs | 2 +- MediaBrowser.Model/Services/IRequiresRequestStream.cs | 2 +- MediaBrowser.Model/Services/IService.cs | 2 +- MediaBrowser.Model/Services/IStreamWriter.cs | 2 +- MediaBrowser.Model/Services/RouteAttribute.cs | 2 +- MediaBrowser.Model/Session/BrowseRequest.cs | 2 +- MediaBrowser.Model/Session/ClientCapabilities.cs | 2 +- MediaBrowser.Model/Session/GeneralCommand.cs | 2 +- MediaBrowser.Model/Session/GeneralCommandType.cs | 2 +- MediaBrowser.Model/Session/MessageCommand.cs | 2 +- MediaBrowser.Model/Session/PlayCommand.cs | 2 +- MediaBrowser.Model/Session/PlayMethod.cs | 2 +- MediaBrowser.Model/Session/PlayRequest.cs | 2 +- MediaBrowser.Model/Session/PlaybackProgressInfo.cs | 2 +- MediaBrowser.Model/Session/PlaybackStartInfo.cs | 2 +- MediaBrowser.Model/Session/PlaybackStopInfo.cs | 2 +- MediaBrowser.Model/Session/PlayerStateInfo.cs | 2 +- MediaBrowser.Model/Session/PlaystateCommand.cs | 2 +- MediaBrowser.Model/Session/PlaystateRequest.cs | 2 +- MediaBrowser.Model/Session/SessionUserInfo.cs | 2 +- MediaBrowser.Model/Session/UserDataChangeInfo.cs | 2 +- MediaBrowser.Model/Sync/SyncCategory.cs | 2 +- MediaBrowser.Model/Sync/SyncJob.cs | 2 +- MediaBrowser.Model/Sync/SyncJobStatus.cs | 2 +- MediaBrowser.Model/Sync/SyncTarget.cs | 2 +- MediaBrowser.Model/System/IEnvironmentInfo.cs | 2 +- MediaBrowser.Model/System/ISystemEvents.cs | 2 +- MediaBrowser.Model/System/LogFile.cs | 2 +- MediaBrowser.Model/System/SystemInfo.cs | 2 +- MediaBrowser.Model/Tasks/IConfigurableScheduledTask.cs | 2 +- MediaBrowser.Model/Tasks/IScheduledTask.cs | 2 +- MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs | 2 +- MediaBrowser.Model/Tasks/ITaskManager.cs | 2 +- MediaBrowser.Model/Tasks/ITaskTrigger.cs | 2 +- MediaBrowser.Model/Tasks/ScheduledTaskHelpers.cs | 2 +- MediaBrowser.Model/Tasks/SystemEvent.cs | 2 +- MediaBrowser.Model/Tasks/TaskCompletionEventArgs.cs | 2 +- MediaBrowser.Model/Tasks/TaskCompletionStatus.cs | 2 +- MediaBrowser.Model/Tasks/TaskInfo.cs | 2 +- MediaBrowser.Model/Tasks/TaskOptions.cs | 2 +- MediaBrowser.Model/Tasks/TaskResult.cs | 2 +- MediaBrowser.Model/Tasks/TaskState.cs | 2 +- MediaBrowser.Model/Tasks/TaskTriggerInfo.cs | 2 +- MediaBrowser.Model/Text/ITextEncoding.cs | 2 +- MediaBrowser.Model/Threading/ITimer.cs | 2 +- MediaBrowser.Model/Threading/ITimerFactory.cs | 2 +- MediaBrowser.Model/Updates/CheckForUpdateResult.cs | 2 +- MediaBrowser.Model/Updates/InstallationInfo.cs | 2 +- MediaBrowser.Model/Updates/PackageInfo.cs | 2 +- MediaBrowser.Model/Updates/PackageVersionInfo.cs | 2 +- MediaBrowser.Model/Users/ForgotPasswordAction.cs | 2 +- MediaBrowser.Model/Users/ForgotPasswordResult.cs | 2 +- MediaBrowser.Model/Users/PinRedeemResult.cs | 2 +- MediaBrowser.Model/Users/UserAction.cs | 2 +- MediaBrowser.Model/Users/UserActionType.cs | 2 +- MediaBrowser.Model/Users/UserPolicy.cs | 2 +- MediaBrowser.Model/Xml/IXmlReaderSettingsFactory.cs | 2 +- 322 files changed, 322 insertions(+), 322 deletions(-) (limited to 'MediaBrowser.Model/System') diff --git a/MediaBrowser.LocalMetadata/BaseXmlProvider.cs b/MediaBrowser.LocalMetadata/BaseXmlProvider.cs index f0fe983c3..2e4de4d93 100644 --- a/MediaBrowser.LocalMetadata/BaseXmlProvider.cs +++ b/MediaBrowser.LocalMetadata/BaseXmlProvider.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Entities; diff --git a/MediaBrowser.LocalMetadata/Images/CollectionFolderImageProvider.cs b/MediaBrowser.LocalMetadata/Images/CollectionFolderImageProvider.cs index 3fee60452..73f9b69c8 100644 --- a/MediaBrowser.LocalMetadata/Images/CollectionFolderImageProvider.cs +++ b/MediaBrowser.LocalMetadata/Images/CollectionFolderImageProvider.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.IO; diff --git a/MediaBrowser.LocalMetadata/Images/EpisodeLocalImageProvider.cs b/MediaBrowser.LocalMetadata/Images/EpisodeLocalImageProvider.cs index b4d5f4121..589cbf4df 100644 --- a/MediaBrowser.LocalMetadata/Images/EpisodeLocalImageProvider.cs +++ b/MediaBrowser.LocalMetadata/Images/EpisodeLocalImageProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using MediaBrowser.Controller.Entities; diff --git a/MediaBrowser.LocalMetadata/Images/InternalMetadataFolderImageProvider.cs b/MediaBrowser.LocalMetadata/Images/InternalMetadataFolderImageProvider.cs index 0a3a6bbbe..23d65e5ac 100644 --- a/MediaBrowser.LocalMetadata/Images/InternalMetadataFolderImageProvider.cs +++ b/MediaBrowser.LocalMetadata/Images/InternalMetadataFolderImageProvider.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities; diff --git a/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs index b06756df3..fef673bfd 100644 --- a/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/MediaBrowser.LocalMetadata/Parsers/BoxSetXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/BoxSetXmlParser.cs index e4d1c1a7d..e595e9d06 100644 --- a/MediaBrowser.LocalMetadata/Parsers/BoxSetXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/BoxSetXmlParser.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Xml; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Movies; diff --git a/MediaBrowser.LocalMetadata/Parsers/GameSystemXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/GameSystemXmlParser.cs index a0022b919..a4997270f 100644 --- a/MediaBrowser.LocalMetadata/Parsers/GameSystemXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/GameSystemXmlParser.cs @@ -1,4 +1,4 @@ -using System.Threading; +using System.Threading; using System.Threading.Tasks; using System.Xml; using MediaBrowser.Controller.Entities; diff --git a/MediaBrowser.LocalMetadata/Parsers/GameXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/GameXmlParser.cs index bdd35e76e..cc908b97b 100644 --- a/MediaBrowser.LocalMetadata/Parsers/GameXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/GameXmlParser.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using System.Threading; using System.Threading.Tasks; using System.Xml; diff --git a/MediaBrowser.LocalMetadata/Parsers/PlaylistXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/PlaylistXmlParser.cs index 86040465a..ff69cb023 100644 --- a/MediaBrowser.LocalMetadata/Parsers/PlaylistXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/PlaylistXmlParser.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Xml; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Playlists; diff --git a/MediaBrowser.LocalMetadata/Providers/BoxSetXmlProvider.cs b/MediaBrowser.LocalMetadata/Providers/BoxSetXmlProvider.cs index 981b5cb3a..539f818c6 100644 --- a/MediaBrowser.LocalMetadata/Providers/BoxSetXmlProvider.cs +++ b/MediaBrowser.LocalMetadata/Providers/BoxSetXmlProvider.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Threading; using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Providers; diff --git a/MediaBrowser.LocalMetadata/Providers/GameSystemXmlProvider.cs b/MediaBrowser.LocalMetadata/Providers/GameSystemXmlProvider.cs index 4225c5f66..62f31d4fa 100644 --- a/MediaBrowser.LocalMetadata/Providers/GameSystemXmlProvider.cs +++ b/MediaBrowser.LocalMetadata/Providers/GameSystemXmlProvider.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Threading; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Providers; diff --git a/MediaBrowser.LocalMetadata/Providers/GameXmlProvider.cs b/MediaBrowser.LocalMetadata/Providers/GameXmlProvider.cs index 2fa1c97ea..537bd073c 100644 --- a/MediaBrowser.LocalMetadata/Providers/GameXmlProvider.cs +++ b/MediaBrowser.LocalMetadata/Providers/GameXmlProvider.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Threading; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Providers; diff --git a/MediaBrowser.LocalMetadata/Providers/PlaylistXmlProvider.cs b/MediaBrowser.LocalMetadata/Providers/PlaylistXmlProvider.cs index 81f48b96d..4180a4f15 100644 --- a/MediaBrowser.LocalMetadata/Providers/PlaylistXmlProvider.cs +++ b/MediaBrowser.LocalMetadata/Providers/PlaylistXmlProvider.cs @@ -1,4 +1,4 @@ -using System.Threading; +using System.Threading; using MediaBrowser.Controller.Playlists; using MediaBrowser.Controller.Providers; using MediaBrowser.LocalMetadata.Parsers; diff --git a/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs b/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs index 20cc4ffba..4fef3055b 100644 --- a/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs +++ b/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/MediaBrowser.LocalMetadata/Savers/BoxSetXmlSaver.cs b/MediaBrowser.LocalMetadata/Savers/BoxSetXmlSaver.cs index 02be72259..b4d5440a5 100644 --- a/MediaBrowser.LocalMetadata/Savers/BoxSetXmlSaver.cs +++ b/MediaBrowser.LocalMetadata/Savers/BoxSetXmlSaver.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Xml; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities; diff --git a/MediaBrowser.LocalMetadata/Savers/GameSystemXmlSaver.cs b/MediaBrowser.LocalMetadata/Savers/GameSystemXmlSaver.cs index c26e9a9bb..cf123171a 100644 --- a/MediaBrowser.LocalMetadata/Savers/GameSystemXmlSaver.cs +++ b/MediaBrowser.LocalMetadata/Savers/GameSystemXmlSaver.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Xml; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities; diff --git a/MediaBrowser.LocalMetadata/Savers/GameXmlSaver.cs b/MediaBrowser.LocalMetadata/Savers/GameXmlSaver.cs index 51a5e4df9..3b7929618 100644 --- a/MediaBrowser.LocalMetadata/Savers/GameXmlSaver.cs +++ b/MediaBrowser.LocalMetadata/Savers/GameXmlSaver.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using System.IO; using System.Xml; using MediaBrowser.Controller.Configuration; diff --git a/MediaBrowser.LocalMetadata/Savers/PersonXmlSaver.cs b/MediaBrowser.LocalMetadata/Savers/PersonXmlSaver.cs index fd481e9d3..7dd2c589f 100644 --- a/MediaBrowser.LocalMetadata/Savers/PersonXmlSaver.cs +++ b/MediaBrowser.LocalMetadata/Savers/PersonXmlSaver.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.LocalMetadata.Savers +namespace MediaBrowser.LocalMetadata.Savers { ///// ///// Class PersonXmlSaver diff --git a/MediaBrowser.LocalMetadata/Savers/PlaylistXmlSaver.cs b/MediaBrowser.LocalMetadata/Savers/PlaylistXmlSaver.cs index 502489f85..09bb6d8f7 100644 --- a/MediaBrowser.LocalMetadata/Savers/PlaylistXmlSaver.cs +++ b/MediaBrowser.LocalMetadata/Savers/PlaylistXmlSaver.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Xml; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities; diff --git a/MediaBrowser.MediaEncoding/Configuration/EncodingConfigurationFactory.cs b/MediaBrowser.MediaEncoding/Configuration/EncodingConfigurationFactory.cs index b475c99c4..1af4146bc 100644 --- a/MediaBrowser.MediaEncoding/Configuration/EncodingConfigurationFactory.cs +++ b/MediaBrowser.MediaEncoding/Configuration/EncodingConfigurationFactory.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using MediaBrowser.Common.Configuration; using MediaBrowser.Model.Configuration; diff --git a/MediaBrowser.MediaEncoding/Encoder/AudioEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/AudioEncoder.cs index 22fc54564..05a2d84e9 100644 --- a/MediaBrowser.MediaEncoding/Encoder/AudioEncoder.cs +++ b/MediaBrowser.MediaEncoding/Encoder/AudioEncoder.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.MediaEncoding; diff --git a/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs index b4e623f3a..ed4c445cd 100644 --- a/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs +++ b/MediaBrowser.MediaEncoding/Encoder/BaseEncoder.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.IO; using System.Text; diff --git a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs index 578e9f264..262772959 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; diff --git a/MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs b/MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs index 60289feda..a3a6506bc 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncodingJob.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Threading.Tasks; using MediaBrowser.Controller.Library; diff --git a/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs b/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs index 35d26a5e2..95454c447 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncodingJobFactory.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; diff --git a/MediaBrowser.MediaEncoding/Encoder/EncodingUtils.cs b/MediaBrowser.MediaEncoding/Encoder/EncodingUtils.cs index 50ba48529..44e62446b 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncodingUtils.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncodingUtils.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using MediaBrowser.Model.MediaInfo; diff --git a/MediaBrowser.MediaEncoding/Encoder/VideoEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/VideoEncoder.cs index 3dd37b4ed..fe315d83c 100644 --- a/MediaBrowser.MediaEncoding/Encoder/VideoEncoder.cs +++ b/MediaBrowser.MediaEncoding/Encoder/VideoEncoder.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.MediaEncoding; diff --git a/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs b/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs index 12d906bb2..f4d0899b6 100644 --- a/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs +++ b/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; namespace MediaBrowser.MediaEncoding.Probing diff --git a/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs b/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs index 350a2e3e5..cc9d27608 100644 --- a/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs +++ b/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace MediaBrowser.MediaEncoding.Probing { diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs index 411a69ed3..51d2bcba7 100644 --- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs +++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs b/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs index a0fa7ceb4..0aa6a3e44 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/MediaBrowser.MediaEncoding/Subtitles/ConfigurationExtension.cs b/MediaBrowser.MediaEncoding/Subtitles/ConfigurationExtension.cs index 973c653a4..92544f4f6 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/ConfigurationExtension.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/ConfigurationExtension.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using MediaBrowser.Common.Configuration; using MediaBrowser.Model.Providers; diff --git a/MediaBrowser.MediaEncoding/Subtitles/ISubtitleParser.cs b/MediaBrowser.MediaEncoding/Subtitles/ISubtitleParser.cs index 75de81f46..f0d107196 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/ISubtitleParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/ISubtitleParser.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Threading; using MediaBrowser.Model.MediaInfo; diff --git a/MediaBrowser.MediaEncoding/Subtitles/ISubtitleWriter.cs b/MediaBrowser.MediaEncoding/Subtitles/ISubtitleWriter.cs index e28da9185..3401c2d67 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/ISubtitleWriter.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/ISubtitleWriter.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Threading; using MediaBrowser.Model.MediaInfo; diff --git a/MediaBrowser.MediaEncoding/Subtitles/JsonWriter.cs b/MediaBrowser.MediaEncoding/Subtitles/JsonWriter.cs index 0c791aeda..8995fcfe1 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/JsonWriter.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/JsonWriter.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Text; using System.Threading; using MediaBrowser.Model.MediaInfo; diff --git a/MediaBrowser.MediaEncoding/Subtitles/OpenSubtitleDownloader.cs b/MediaBrowser.MediaEncoding/Subtitles/OpenSubtitleDownloader.cs index 1c1906de7..0e418ecf7 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/OpenSubtitleDownloader.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/OpenSubtitleDownloader.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/MediaBrowser.MediaEncoding/Subtitles/ParserValues.cs b/MediaBrowser.MediaEncoding/Subtitles/ParserValues.cs index b8c2fef1e..bf8808eb8 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/ParserValues.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/ParserValues.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.MediaEncoding.Subtitles +namespace MediaBrowser.MediaEncoding.Subtitles { public class ParserValues { diff --git a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs index 943d86ee5..c3f6d4947 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/MediaBrowser.MediaEncoding/Subtitles/SrtWriter.cs b/MediaBrowser.MediaEncoding/Subtitles/SrtWriter.cs index c05929fde..6f96a641e 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SrtWriter.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SrtWriter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.IO; using System.Text; diff --git a/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs b/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs index d88fea07e..1cd714f32 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Text; diff --git a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs index 3e6ec460f..58a05e2f3 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Globalization; using System.IO; diff --git a/MediaBrowser.MediaEncoding/Subtitles/TtmlWriter.cs b/MediaBrowser.MediaEncoding/Subtitles/TtmlWriter.cs index f0cf3b31a..cdaf94964 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/TtmlWriter.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/TtmlWriter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Text; using System.Text.RegularExpressions; diff --git a/MediaBrowser.MediaEncoding/Subtitles/VttWriter.cs b/MediaBrowser.MediaEncoding/Subtitles/VttWriter.cs index 092add992..d67d1dad8 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/VttWriter.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/VttWriter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Text; using System.Text.RegularExpressions; diff --git a/MediaBrowser.Model/Activity/ActivityLogEntry.cs b/MediaBrowser.Model/Activity/ActivityLogEntry.cs index 7e936ce53..186fd89ee 100644 --- a/MediaBrowser.Model/Activity/ActivityLogEntry.cs +++ b/MediaBrowser.Model/Activity/ActivityLogEntry.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.Extensions.Logging; namespace MediaBrowser.Model.Activity diff --git a/MediaBrowser.Model/Activity/IActivityManager.cs b/MediaBrowser.Model/Activity/IActivityManager.cs index 7fff26987..897d93d79 100644 --- a/MediaBrowser.Model/Activity/IActivityManager.cs +++ b/MediaBrowser.Model/Activity/IActivityManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Events; using MediaBrowser.Model.Querying; diff --git a/MediaBrowser.Model/Activity/IActivityRepository.cs b/MediaBrowser.Model/Activity/IActivityRepository.cs index 5a2c52400..f0e3b902c 100644 --- a/MediaBrowser.Model/Activity/IActivityRepository.cs +++ b/MediaBrowser.Model/Activity/IActivityRepository.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Querying; namespace MediaBrowser.Model.Activity diff --git a/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs b/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs index e2f780605..8e0fd2624 100644 --- a/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs +++ b/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.ApiClient { public class ServerDiscoveryInfo diff --git a/MediaBrowser.Model/Branding/BrandingOptions.cs b/MediaBrowser.Model/Branding/BrandingOptions.cs index 3b207d345..3f05b97b8 100644 --- a/MediaBrowser.Model/Branding/BrandingOptions.cs +++ b/MediaBrowser.Model/Branding/BrandingOptions.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Branding { public class BrandingOptions diff --git a/MediaBrowser.Model/Channels/ChannelFeatures.cs b/MediaBrowser.Model/Channels/ChannelFeatures.cs index 259370b7e..ee1d11bc0 100644 --- a/MediaBrowser.Model/Channels/ChannelFeatures.cs +++ b/MediaBrowser.Model/Channels/ChannelFeatures.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Channels { diff --git a/MediaBrowser.Model/Channels/ChannelInfo.cs b/MediaBrowser.Model/Channels/ChannelInfo.cs index 36e3c17d9..39cd92e01 100644 --- a/MediaBrowser.Model/Channels/ChannelInfo.cs +++ b/MediaBrowser.Model/Channels/ChannelInfo.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Channels { public class ChannelInfo diff --git a/MediaBrowser.Model/Channels/ChannelMediaContentType.cs b/MediaBrowser.Model/Channels/ChannelMediaContentType.cs index 20c4446d4..010ff8048 100644 --- a/MediaBrowser.Model/Channels/ChannelMediaContentType.cs +++ b/MediaBrowser.Model/Channels/ChannelMediaContentType.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Channels +namespace MediaBrowser.Model.Channels { public enum ChannelMediaContentType { diff --git a/MediaBrowser.Model/Channels/ChannelMediaType.cs b/MediaBrowser.Model/Channels/ChannelMediaType.cs index 8ceb3cce5..a3fa5cdf9 100644 --- a/MediaBrowser.Model/Channels/ChannelMediaType.cs +++ b/MediaBrowser.Model/Channels/ChannelMediaType.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Channels +namespace MediaBrowser.Model.Channels { public enum ChannelMediaType { diff --git a/MediaBrowser.Model/Channels/ChannelQuery.cs b/MediaBrowser.Model/Channels/ChannelQuery.cs index d6282874d..32b368922 100644 --- a/MediaBrowser.Model/Channels/ChannelQuery.cs +++ b/MediaBrowser.Model/Channels/ChannelQuery.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Querying; diff --git a/MediaBrowser.Model/Collections/CollectionCreationResult.cs b/MediaBrowser.Model/Collections/CollectionCreationResult.cs index 689625ac3..2691f7970 100644 --- a/MediaBrowser.Model/Collections/CollectionCreationResult.cs +++ b/MediaBrowser.Model/Collections/CollectionCreationResult.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Collections { diff --git a/MediaBrowser.Model/Configuration/AccessSchedule.cs b/MediaBrowser.Model/Configuration/AccessSchedule.cs index 3a66cf5bb..73a17f18c 100644 --- a/MediaBrowser.Model/Configuration/AccessSchedule.cs +++ b/MediaBrowser.Model/Configuration/AccessSchedule.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Configuration { public class AccessSchedule diff --git a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs index d9a746211..ce4ef1cfe 100644 --- a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs +++ b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Configuration +namespace MediaBrowser.Model.Configuration { /// /// Serves as a common base class for the Server and UI application Configurations diff --git a/MediaBrowser.Model/Configuration/DynamicDayOfWeek.cs b/MediaBrowser.Model/Configuration/DynamicDayOfWeek.cs index 1c7de11fd..298141af7 100644 --- a/MediaBrowser.Model/Configuration/DynamicDayOfWeek.cs +++ b/MediaBrowser.Model/Configuration/DynamicDayOfWeek.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Configuration { public enum DynamicDayOfWeek diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs index fbc5e1b37..dddf8b89c 100644 --- a/MediaBrowser.Model/Configuration/EncodingOptions.cs +++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Configuration { public class EncodingOptions diff --git a/MediaBrowser.Model/Configuration/FanartOptions.cs b/MediaBrowser.Model/Configuration/FanartOptions.cs index 6924b25d7..0c991e089 100644 --- a/MediaBrowser.Model/Configuration/FanartOptions.cs +++ b/MediaBrowser.Model/Configuration/FanartOptions.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Configuration { public class FanartOptions diff --git a/MediaBrowser.Model/Configuration/ImageSavingConvention.cs b/MediaBrowser.Model/Configuration/ImageSavingConvention.cs index c9a49afd7..7206fa5fc 100644 --- a/MediaBrowser.Model/Configuration/ImageSavingConvention.cs +++ b/MediaBrowser.Model/Configuration/ImageSavingConvention.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Configuration +namespace MediaBrowser.Model.Configuration { public enum ImageSavingConvention { diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs index bb3b613e8..ec9b276a0 100644 --- a/MediaBrowser.Model/Configuration/LibraryOptions.cs +++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using MediaBrowser.Model.Entities; diff --git a/MediaBrowser.Model/Configuration/MetadataConfiguration.cs b/MediaBrowser.Model/Configuration/MetadataConfiguration.cs index d1658e5d6..91549ee66 100644 --- a/MediaBrowser.Model/Configuration/MetadataConfiguration.cs +++ b/MediaBrowser.Model/Configuration/MetadataConfiguration.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Configuration { public class MetadataConfiguration diff --git a/MediaBrowser.Model/Configuration/MetadataOptions.cs b/MediaBrowser.Model/Configuration/MetadataOptions.cs index dde2bd090..c095b8cdd 100644 --- a/MediaBrowser.Model/Configuration/MetadataOptions.cs +++ b/MediaBrowser.Model/Configuration/MetadataOptions.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Configuration { diff --git a/MediaBrowser.Model/Configuration/MetadataPlugin.cs b/MediaBrowser.Model/Configuration/MetadataPlugin.cs index f3e0ce106..d6f863e55 100644 --- a/MediaBrowser.Model/Configuration/MetadataPlugin.cs +++ b/MediaBrowser.Model/Configuration/MetadataPlugin.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Configuration +namespace MediaBrowser.Model.Configuration { public class MetadataPlugin { diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index 2faa52da5..ed5800329 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.Configuration diff --git a/MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs b/MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs index 678abd858..fc429934f 100644 --- a/MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs +++ b/MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Configuration +namespace MediaBrowser.Model.Configuration { public enum SubtitlePlaybackMode { diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs index 39b956138..689459eba 100644 --- a/MediaBrowser.Model/Configuration/UserConfiguration.cs +++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Configuration { diff --git a/MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs b/MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs index de8a59a3d..40c97c7f9 100644 --- a/MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs +++ b/MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Configuration { public class XbmcMetadataOptions diff --git a/MediaBrowser.Model/Connect/ConnectAuthorization.cs b/MediaBrowser.Model/Connect/ConnectAuthorization.cs index a949612ab..cdb3172d9 100644 --- a/MediaBrowser.Model/Connect/ConnectAuthorization.cs +++ b/MediaBrowser.Model/Connect/ConnectAuthorization.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Connect { diff --git a/MediaBrowser.Model/Connect/ConnectUser.cs b/MediaBrowser.Model/Connect/ConnectUser.cs index da290da12..919bb50c6 100644 --- a/MediaBrowser.Model/Connect/ConnectUser.cs +++ b/MediaBrowser.Model/Connect/ConnectUser.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Connect { public class ConnectUser diff --git a/MediaBrowser.Model/Connect/ConnectUserQuery.cs b/MediaBrowser.Model/Connect/ConnectUserQuery.cs index a7dc649a8..607f6bab9 100644 --- a/MediaBrowser.Model/Connect/ConnectUserQuery.cs +++ b/MediaBrowser.Model/Connect/ConnectUserQuery.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Connect { public class ConnectUserQuery diff --git a/MediaBrowser.Model/Connect/UserLinkType.cs b/MediaBrowser.Model/Connect/UserLinkType.cs index 4ac5bfde1..d86772c96 100644 --- a/MediaBrowser.Model/Connect/UserLinkType.cs +++ b/MediaBrowser.Model/Connect/UserLinkType.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Connect { public enum UserLinkType diff --git a/MediaBrowser.Model/Cryptography/ICryptoProvider.cs b/MediaBrowser.Model/Cryptography/ICryptoProvider.cs index 2e9778d66..b027d2ad0 100644 --- a/MediaBrowser.Model/Cryptography/ICryptoProvider.cs +++ b/MediaBrowser.Model/Cryptography/ICryptoProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace MediaBrowser.Model.Cryptography diff --git a/MediaBrowser.Model/Devices/ContentUploadHistory.cs b/MediaBrowser.Model/Devices/ContentUploadHistory.cs index 65c83b0ad..5dd9bf2d0 100644 --- a/MediaBrowser.Model/Devices/ContentUploadHistory.cs +++ b/MediaBrowser.Model/Devices/ContentUploadHistory.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Devices +namespace MediaBrowser.Model.Devices { public class ContentUploadHistory { diff --git a/MediaBrowser.Model/Devices/DeviceInfo.cs b/MediaBrowser.Model/Devices/DeviceInfo.cs index 245dd7bb6..214c49e5e 100644 --- a/MediaBrowser.Model/Devices/DeviceInfo.cs +++ b/MediaBrowser.Model/Devices/DeviceInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Session; namespace MediaBrowser.Model.Devices diff --git a/MediaBrowser.Model/Devices/DeviceQuery.cs b/MediaBrowser.Model/Devices/DeviceQuery.cs index 2838239e4..84d1f2a9e 100644 --- a/MediaBrowser.Model/Devices/DeviceQuery.cs +++ b/MediaBrowser.Model/Devices/DeviceQuery.cs @@ -1,4 +1,4 @@ - + using System; namespace MediaBrowser.Model.Devices diff --git a/MediaBrowser.Model/Devices/DevicesOptions.cs b/MediaBrowser.Model/Devices/DevicesOptions.cs index 8e478d005..5bbd33b73 100644 --- a/MediaBrowser.Model/Devices/DevicesOptions.cs +++ b/MediaBrowser.Model/Devices/DevicesOptions.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Devices { diff --git a/MediaBrowser.Model/Devices/LocalFileInfo.cs b/MediaBrowser.Model/Devices/LocalFileInfo.cs index e7a78bf8b..4d67e3c69 100644 --- a/MediaBrowser.Model/Devices/LocalFileInfo.cs +++ b/MediaBrowser.Model/Devices/LocalFileInfo.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Devices { public class LocalFileInfo diff --git a/MediaBrowser.Model/Diagnostics/IProcess.cs b/MediaBrowser.Model/Diagnostics/IProcess.cs index 7cd26af00..cade631c9 100644 --- a/MediaBrowser.Model/Diagnostics/IProcess.cs +++ b/MediaBrowser.Model/Diagnostics/IProcess.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Threading.Tasks; diff --git a/MediaBrowser.Model/Diagnostics/IProcessFactory.cs b/MediaBrowser.Model/Diagnostics/IProcessFactory.cs index 15e3d7123..a11be8f4e 100644 --- a/MediaBrowser.Model/Diagnostics/IProcessFactory.cs +++ b/MediaBrowser.Model/Diagnostics/IProcessFactory.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Diagnostics +namespace MediaBrowser.Model.Diagnostics { public interface IProcessFactory { diff --git a/MediaBrowser.Model/Dlna/AudioOptions.cs b/MediaBrowser.Model/Dlna/AudioOptions.cs index 29a7a1154..33e2982e9 100644 --- a/MediaBrowser.Model/Dlna/AudioOptions.cs +++ b/MediaBrowser.Model/Dlna/AudioOptions.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.Dlna diff --git a/MediaBrowser.Model/Dlna/CodecProfile.cs b/MediaBrowser.Model/Dlna/CodecProfile.cs index 6965d3059..9ea248908 100644 --- a/MediaBrowser.Model/Dlna/CodecProfile.cs +++ b/MediaBrowser.Model/Dlna/CodecProfile.cs @@ -1,4 +1,4 @@ -using System.Xml.Serialization; +using System.Xml.Serialization; using MediaBrowser.Model.Extensions; namespace MediaBrowser.Model.Dlna diff --git a/MediaBrowser.Model/Dlna/CodecType.cs b/MediaBrowser.Model/Dlna/CodecType.cs index e4eabcd18..d777be4c2 100644 --- a/MediaBrowser.Model/Dlna/CodecType.cs +++ b/MediaBrowser.Model/Dlna/CodecType.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Dlna +namespace MediaBrowser.Model.Dlna { public enum CodecType { diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.cs index 1a5bf7515..fe8926735 100644 --- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs +++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.MediaInfo; diff --git a/MediaBrowser.Model/Dlna/ContainerProfile.cs b/MediaBrowser.Model/Dlna/ContainerProfile.cs index ccad4cead..073324c26 100644 --- a/MediaBrowser.Model/Dlna/ContainerProfile.cs +++ b/MediaBrowser.Model/Dlna/ContainerProfile.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Xml.Serialization; using MediaBrowser.Model.Extensions; diff --git a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs index aca351305..ecca415d3 100644 --- a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs +++ b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using MediaBrowser.Model.MediaInfo; diff --git a/MediaBrowser.Model/Dlna/DeviceIdentification.cs b/MediaBrowser.Model/Dlna/DeviceIdentification.cs index cbde2d710..84573521a 100644 --- a/MediaBrowser.Model/Dlna/DeviceIdentification.cs +++ b/MediaBrowser.Model/Dlna/DeviceIdentification.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Dlna +namespace MediaBrowser.Model.Dlna { public class DeviceIdentification { diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs index 2e4e942d9..3a626deaa 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfile.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Xml.Serialization; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.MediaInfo; diff --git a/MediaBrowser.Model/Dlna/DeviceProfileInfo.cs b/MediaBrowser.Model/Dlna/DeviceProfileInfo.cs index b2afdf292..9b3515fc3 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfileInfo.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfileInfo.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Dlna { public class DeviceProfileInfo diff --git a/MediaBrowser.Model/Dlna/DeviceProfileType.cs b/MediaBrowser.Model/Dlna/DeviceProfileType.cs index 19d866f51..2449fa434 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfileType.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfileType.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Dlna +namespace MediaBrowser.Model.Dlna { public enum DeviceProfileType { diff --git a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs index e6b7a5721..5a54847d7 100644 --- a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs +++ b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs @@ -1,4 +1,4 @@ -using System.Xml.Serialization; +using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/DlnaFlags.cs b/MediaBrowser.Model/Dlna/DlnaFlags.cs index 28c93464d..d076e73ec 100644 --- a/MediaBrowser.Model/Dlna/DlnaFlags.cs +++ b/MediaBrowser.Model/Dlna/DlnaFlags.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/DlnaMaps.cs b/MediaBrowser.Model/Dlna/DlnaMaps.cs index 8dadc32d6..880d05724 100644 --- a/MediaBrowser.Model/Dlna/DlnaMaps.cs +++ b/MediaBrowser.Model/Dlna/DlnaMaps.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Dlna +namespace MediaBrowser.Model.Dlna { public class DlnaMaps { diff --git a/MediaBrowser.Model/Dlna/DlnaProfileType.cs b/MediaBrowser.Model/Dlna/DlnaProfileType.cs index 39b4b688e..6a23bbb04 100644 --- a/MediaBrowser.Model/Dlna/DlnaProfileType.cs +++ b/MediaBrowser.Model/Dlna/DlnaProfileType.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Dlna +namespace MediaBrowser.Model.Dlna { public enum DlnaProfileType { diff --git a/MediaBrowser.Model/Dlna/HeaderMatchType.cs b/MediaBrowser.Model/Dlna/HeaderMatchType.cs index 764a512ac..b0a1438f6 100644 --- a/MediaBrowser.Model/Dlna/HeaderMatchType.cs +++ b/MediaBrowser.Model/Dlna/HeaderMatchType.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Dlna +namespace MediaBrowser.Model.Dlna { public enum HeaderMatchType { diff --git a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs b/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs index 791d5967f..d15727504 100644 --- a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs +++ b/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs @@ -1,4 +1,4 @@ -using System.Xml.Serialization; +using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/IDeviceDiscovery.cs b/MediaBrowser.Model/Dlna/IDeviceDiscovery.cs index 70191ff23..3de3fe761 100644 --- a/MediaBrowser.Model/Dlna/IDeviceDiscovery.cs +++ b/MediaBrowser.Model/Dlna/IDeviceDiscovery.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Events; namespace MediaBrowser.Model.Dlna diff --git a/MediaBrowser.Model/Dlna/ITranscoderSupport.cs b/MediaBrowser.Model/Dlna/ITranscoderSupport.cs index 14723bd27..c0ff54c3f 100644 --- a/MediaBrowser.Model/Dlna/ITranscoderSupport.cs +++ b/MediaBrowser.Model/Dlna/ITranscoderSupport.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Dlna +namespace MediaBrowser.Model.Dlna { public interface ITranscoderSupport { diff --git a/MediaBrowser.Model/Dlna/MediaFormatProfile.cs b/MediaBrowser.Model/Dlna/MediaFormatProfile.cs index f3d04335f..376849c43 100644 --- a/MediaBrowser.Model/Dlna/MediaFormatProfile.cs +++ b/MediaBrowser.Model/Dlna/MediaFormatProfile.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Dlna { public enum MediaFormatProfile diff --git a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs index 1b20ab567..42c78e335 100644 --- a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs +++ b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using MediaBrowser.Model.Extensions; diff --git a/MediaBrowser.Model/Dlna/PlaybackErrorCode.cs b/MediaBrowser.Model/Dlna/PlaybackErrorCode.cs index 4ed412985..9412cd1b6 100644 --- a/MediaBrowser.Model/Dlna/PlaybackErrorCode.cs +++ b/MediaBrowser.Model/Dlna/PlaybackErrorCode.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Dlna { public enum PlaybackErrorCode diff --git a/MediaBrowser.Model/Dlna/ProfileCondition.cs b/MediaBrowser.Model/Dlna/ProfileCondition.cs index 5464daf22..b83566f6e 100644 --- a/MediaBrowser.Model/Dlna/ProfileCondition.cs +++ b/MediaBrowser.Model/Dlna/ProfileCondition.cs @@ -1,4 +1,4 @@ -using System.Xml.Serialization; +using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/ProfileConditionType.cs b/MediaBrowser.Model/Dlna/ProfileConditionType.cs index 71afd54bf..262841262 100644 --- a/MediaBrowser.Model/Dlna/ProfileConditionType.cs +++ b/MediaBrowser.Model/Dlna/ProfileConditionType.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Dlna +namespace MediaBrowser.Model.Dlna { public enum ProfileConditionType { diff --git a/MediaBrowser.Model/Dlna/ProfileConditionValue.cs b/MediaBrowser.Model/Dlna/ProfileConditionValue.cs index e28d9e5cb..bae46bdcf 100644 --- a/MediaBrowser.Model/Dlna/ProfileConditionValue.cs +++ b/MediaBrowser.Model/Dlna/ProfileConditionValue.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Dlna +namespace MediaBrowser.Model.Dlna { public enum ProfileConditionValue { diff --git a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs index 4cde26a03..cf92633c3 100644 --- a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs +++ b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Extensions; namespace MediaBrowser.Model.Dlna diff --git a/MediaBrowser.Model/Dlna/ResponseProfile.cs b/MediaBrowser.Model/Dlna/ResponseProfile.cs index d69dc9868..8c6b0806f 100644 --- a/MediaBrowser.Model/Dlna/ResponseProfile.cs +++ b/MediaBrowser.Model/Dlna/ResponseProfile.cs @@ -1,4 +1,4 @@ -using System.Xml.Serialization; +using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/SearchType.cs b/MediaBrowser.Model/Dlna/SearchType.cs index a34d3862d..05c59f5de 100644 --- a/MediaBrowser.Model/Dlna/SearchType.cs +++ b/MediaBrowser.Model/Dlna/SearchType.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Dlna +namespace MediaBrowser.Model.Dlna { public enum SearchType { diff --git a/MediaBrowser.Model/Dlna/SortCriteria.cs b/MediaBrowser.Model/Dlna/SortCriteria.cs index ecaf32614..7465e05f8 100644 --- a/MediaBrowser.Model/Dlna/SortCriteria.cs +++ b/MediaBrowser.Model/Dlna/SortCriteria.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index d7335907a..f1ec71d1d 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs index 61bba4126..2bc6908db 100644 --- a/MediaBrowser.Model/Dlna/StreamInfo.cs +++ b/MediaBrowser.Model/Dlna/StreamInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; diff --git a/MediaBrowser.Model/Dlna/SubtitleProfile.cs b/MediaBrowser.Model/Dlna/SubtitleProfile.cs index 77451e346..f950b6cb8 100644 --- a/MediaBrowser.Model/Dlna/SubtitleProfile.cs +++ b/MediaBrowser.Model/Dlna/SubtitleProfile.cs @@ -1,4 +1,4 @@ -using System.Xml.Serialization; +using System.Xml.Serialization; using MediaBrowser.Model.Extensions; namespace MediaBrowser.Model.Dlna diff --git a/MediaBrowser.Model/Dlna/TranscodeSeekInfo.cs b/MediaBrowser.Model/Dlna/TranscodeSeekInfo.cs index e8973fce0..eac5d4b36 100644 --- a/MediaBrowser.Model/Dlna/TranscodeSeekInfo.cs +++ b/MediaBrowser.Model/Dlna/TranscodeSeekInfo.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Dlna +namespace MediaBrowser.Model.Dlna { public enum TranscodeSeekInfo { diff --git a/MediaBrowser.Model/Dlna/TranscodingProfile.cs b/MediaBrowser.Model/Dlna/TranscodingProfile.cs index a37b29259..dc2f0c90d 100644 --- a/MediaBrowser.Model/Dlna/TranscodingProfile.cs +++ b/MediaBrowser.Model/Dlna/TranscodingProfile.cs @@ -1,4 +1,4 @@ -using System.Xml.Serialization; +using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs b/MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs index f4b9d1e9b..4edbb503b 100644 --- a/MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs +++ b/MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using MediaBrowser.Model.Net; diff --git a/MediaBrowser.Model/Dlna/VideoOptions.cs b/MediaBrowser.Model/Dlna/VideoOptions.cs index 35d0dd18c..9c4a38292 100644 --- a/MediaBrowser.Model/Dlna/VideoOptions.cs +++ b/MediaBrowser.Model/Dlna/VideoOptions.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Dlna +namespace MediaBrowser.Model.Dlna { /// /// Class VideoOptions. diff --git a/MediaBrowser.Model/Dlna/XmlAttribute.cs b/MediaBrowser.Model/Dlna/XmlAttribute.cs index 7ee15233a..aa64177a8 100644 --- a/MediaBrowser.Model/Dlna/XmlAttribute.cs +++ b/MediaBrowser.Model/Dlna/XmlAttribute.cs @@ -1,4 +1,4 @@ -using System.Xml.Serialization; +using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna { diff --git a/MediaBrowser.Model/Drawing/DrawingUtils.cs b/MediaBrowser.Model/Drawing/DrawingUtils.cs index e6235cb06..fbd074218 100644 --- a/MediaBrowser.Model/Drawing/DrawingUtils.cs +++ b/MediaBrowser.Model/Drawing/DrawingUtils.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Drawing +namespace MediaBrowser.Model.Drawing { /// /// Class DrawingUtils diff --git a/MediaBrowser.Model/Drawing/ImageFormat.cs b/MediaBrowser.Model/Drawing/ImageFormat.cs index 0172c9754..31619a472 100644 --- a/MediaBrowser.Model/Drawing/ImageFormat.cs +++ b/MediaBrowser.Model/Drawing/ImageFormat.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Drawing { /// diff --git a/MediaBrowser.Model/Drawing/ImageOrientation.cs b/MediaBrowser.Model/Drawing/ImageOrientation.cs index c320a8224..0df72411c 100644 --- a/MediaBrowser.Model/Drawing/ImageOrientation.cs +++ b/MediaBrowser.Model/Drawing/ImageOrientation.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Drawing { public enum ImageOrientation diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index 241ddfce6..3e267a39d 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Entities; diff --git a/MediaBrowser.Model/Dto/BaseItemPerson.cs b/MediaBrowser.Model/Dto/BaseItemPerson.cs index 35b4e9249..f42ef4c91 100644 --- a/MediaBrowser.Model/Dto/BaseItemPerson.cs +++ b/MediaBrowser.Model/Dto/BaseItemPerson.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Serialization; +using MediaBrowser.Model.Serialization; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Dto/GameSystemSummary.cs b/MediaBrowser.Model/Dto/GameSystemSummary.cs index b42e98842..e2400a744 100644 --- a/MediaBrowser.Model/Dto/GameSystemSummary.cs +++ b/MediaBrowser.Model/Dto/GameSystemSummary.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Dto/IHasServerId.cs b/MediaBrowser.Model/Dto/IHasServerId.cs index 0515203da..19991c622 100644 --- a/MediaBrowser.Model/Dto/IHasServerId.cs +++ b/MediaBrowser.Model/Dto/IHasServerId.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Dto { public interface IHasServerId diff --git a/MediaBrowser.Model/Dto/IItemDto.cs b/MediaBrowser.Model/Dto/IItemDto.cs index 3e7d1c608..60c579cdd 100644 --- a/MediaBrowser.Model/Dto/IItemDto.cs +++ b/MediaBrowser.Model/Dto/IItemDto.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Dto { /// diff --git a/MediaBrowser.Model/Dto/ImageByNameInfo.cs b/MediaBrowser.Model/Dto/ImageByNameInfo.cs index b7921d993..2bda8bf20 100644 --- a/MediaBrowser.Model/Dto/ImageByNameInfo.cs +++ b/MediaBrowser.Model/Dto/ImageByNameInfo.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Dto { public class ImageByNameInfo diff --git a/MediaBrowser.Model/Dto/ImageInfo.cs b/MediaBrowser.Model/Dto/ImageInfo.cs index 5eabb16a5..792eaff03 100644 --- a/MediaBrowser.Model/Dto/ImageInfo.cs +++ b/MediaBrowser.Model/Dto/ImageInfo.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Dto/ImageOptions.cs b/MediaBrowser.Model/Dto/ImageOptions.cs index e98d54435..1fd4a5383 100644 --- a/MediaBrowser.Model/Dto/ImageOptions.cs +++ b/MediaBrowser.Model/Dto/ImageOptions.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Drawing; +using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Dto diff --git a/MediaBrowser.Model/Dto/ItemCounts.cs b/MediaBrowser.Model/Dto/ItemCounts.cs index 8ceb3a86b..da941d258 100644 --- a/MediaBrowser.Model/Dto/ItemCounts.cs +++ b/MediaBrowser.Model/Dto/ItemCounts.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Dto +namespace MediaBrowser.Model.Dto { /// /// Class LibrarySummary diff --git a/MediaBrowser.Model/Dto/ItemIndex.cs b/MediaBrowser.Model/Dto/ItemIndex.cs index 96cef622b..de29f97d4 100644 --- a/MediaBrowser.Model/Dto/ItemIndex.cs +++ b/MediaBrowser.Model/Dto/ItemIndex.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Dto { /// diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs index ea851f3c2..c2219dc33 100644 --- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs +++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using MediaBrowser.Model.Entities; using MediaBrowser.Model.MediaInfo; diff --git a/MediaBrowser.Model/Dto/MetadataEditorInfo.cs b/MediaBrowser.Model/Dto/MetadataEditorInfo.cs index 5dacbeef6..46bcb62f4 100644 --- a/MediaBrowser.Model/Dto/MetadataEditorInfo.cs +++ b/MediaBrowser.Model/Dto/MetadataEditorInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.Providers; diff --git a/MediaBrowser.Model/Dto/NameIdPair.cs b/MediaBrowser.Model/Dto/NameIdPair.cs index 50318ac95..ccd42f17f 100644 --- a/MediaBrowser.Model/Dto/NameIdPair.cs +++ b/MediaBrowser.Model/Dto/NameIdPair.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Dto/NameValuePair.cs b/MediaBrowser.Model/Dto/NameValuePair.cs index 564e32dcd..f0971c076 100644 --- a/MediaBrowser.Model/Dto/NameValuePair.cs +++ b/MediaBrowser.Model/Dto/NameValuePair.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Dto { public class NameValuePair diff --git a/MediaBrowser.Model/Dto/RecommendationDto.cs b/MediaBrowser.Model/Dto/RecommendationDto.cs index 79d3d6c6f..0a890573b 100644 --- a/MediaBrowser.Model/Dto/RecommendationDto.cs +++ b/MediaBrowser.Model/Dto/RecommendationDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Dto/UserDto.cs b/MediaBrowser.Model/Dto/UserDto.cs index de945dec0..b00f5919f 100644 --- a/MediaBrowser.Model/Dto/UserDto.cs +++ b/MediaBrowser.Model/Dto/UserDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Connect; using MediaBrowser.Model.Users; diff --git a/MediaBrowser.Model/Dto/UserItemDataDto.cs b/MediaBrowser.Model/Dto/UserItemDataDto.cs index 507dbb06d..fa512e94c 100644 --- a/MediaBrowser.Model/Dto/UserItemDataDto.cs +++ b/MediaBrowser.Model/Dto/UserItemDataDto.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Dto { diff --git a/MediaBrowser.Model/Entities/ChapterInfo.cs b/MediaBrowser.Model/Entities/ChapterInfo.cs index c24ca553b..dfd6fdf4a 100644 --- a/MediaBrowser.Model/Entities/ChapterInfo.cs +++ b/MediaBrowser.Model/Entities/ChapterInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Entities { diff --git a/MediaBrowser.Model/Entities/CollectionType.cs b/MediaBrowser.Model/Entities/CollectionType.cs index 12945eddd..bda166118 100644 --- a/MediaBrowser.Model/Entities/CollectionType.cs +++ b/MediaBrowser.Model/Entities/CollectionType.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Entities +namespace MediaBrowser.Model.Entities { public static class CollectionType { diff --git a/MediaBrowser.Model/Entities/DisplayPreferences.cs b/MediaBrowser.Model/Entities/DisplayPreferences.cs index 2bc0c2e1d..f9b3ac7b3 100644 --- a/MediaBrowser.Model/Entities/DisplayPreferences.cs +++ b/MediaBrowser.Model/Entities/DisplayPreferences.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace MediaBrowser.Model.Entities { diff --git a/MediaBrowser.Model/Entities/EmptyRequestResult.cs b/MediaBrowser.Model/Entities/EmptyRequestResult.cs index 5c9a725fd..2b2b9bee9 100644 --- a/MediaBrowser.Model/Entities/EmptyRequestResult.cs +++ b/MediaBrowser.Model/Entities/EmptyRequestResult.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Entities { public class EmptyRequestResult diff --git a/MediaBrowser.Model/Entities/ExtraType.cs b/MediaBrowser.Model/Entities/ExtraType.cs index ab8da58c0..b632e7754 100644 --- a/MediaBrowser.Model/Entities/ExtraType.cs +++ b/MediaBrowser.Model/Entities/ExtraType.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Entities { public enum ExtraType diff --git a/MediaBrowser.Model/Entities/IHasProviderIds.cs b/MediaBrowser.Model/Entities/IHasProviderIds.cs index 796850dbd..3b8d74cb4 100644 --- a/MediaBrowser.Model/Entities/IHasProviderIds.cs +++ b/MediaBrowser.Model/Entities/IHasProviderIds.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace MediaBrowser.Model.Entities { diff --git a/MediaBrowser.Model/Entities/ImageType.cs b/MediaBrowser.Model/Entities/ImageType.cs index 6e0ba717f..c2427f96d 100644 --- a/MediaBrowser.Model/Entities/ImageType.cs +++ b/MediaBrowser.Model/Entities/ImageType.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Entities { /// diff --git a/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs b/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs index 2ae7bead2..9c9b3ef67 100644 --- a/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs +++ b/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Entities { diff --git a/MediaBrowser.Model/Entities/LocationType.cs b/MediaBrowser.Model/Entities/LocationType.cs index 84de803aa..828e238b2 100644 --- a/MediaBrowser.Model/Entities/LocationType.cs +++ b/MediaBrowser.Model/Entities/LocationType.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Entities { /// diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs index 256fd3cef..b51942af8 100644 --- a/MediaBrowser.Model/Entities/MediaStream.cs +++ b/MediaBrowser.Model/Entities/MediaStream.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using MediaBrowser.Model.Dlna; diff --git a/MediaBrowser.Model/Entities/MediaType.cs b/MediaBrowser.Model/Entities/MediaType.cs index 0c9bde6fb..65236c792 100644 --- a/MediaBrowser.Model/Entities/MediaType.cs +++ b/MediaBrowser.Model/Entities/MediaType.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Entities { /// diff --git a/MediaBrowser.Model/Entities/MediaUrl.cs b/MediaBrowser.Model/Entities/MediaUrl.cs index 2e17bba8a..cffb5b857 100644 --- a/MediaBrowser.Model/Entities/MediaUrl.cs +++ b/MediaBrowser.Model/Entities/MediaUrl.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Entities { public class MediaUrl diff --git a/MediaBrowser.Model/Entities/MetadataFields.cs b/MediaBrowser.Model/Entities/MetadataFields.cs index 85f2da31e..e76f51249 100644 --- a/MediaBrowser.Model/Entities/MetadataFields.cs +++ b/MediaBrowser.Model/Entities/MetadataFields.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Entities { /// diff --git a/MediaBrowser.Model/Entities/MetadataProviders.cs b/MediaBrowser.Model/Entities/MetadataProviders.cs index efd4339d5..2d639a63e 100644 --- a/MediaBrowser.Model/Entities/MetadataProviders.cs +++ b/MediaBrowser.Model/Entities/MetadataProviders.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Entities { /// diff --git a/MediaBrowser.Model/Entities/PackageReviewInfo.cs b/MediaBrowser.Model/Entities/PackageReviewInfo.cs index 52500a41e..b73ba8dd0 100644 --- a/MediaBrowser.Model/Entities/PackageReviewInfo.cs +++ b/MediaBrowser.Model/Entities/PackageReviewInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Entities { diff --git a/MediaBrowser.Model/Entities/ParentalRating.cs b/MediaBrowser.Model/Entities/ParentalRating.cs index 302c1e299..5dbbf7cb9 100644 --- a/MediaBrowser.Model/Entities/ParentalRating.cs +++ b/MediaBrowser.Model/Entities/ParentalRating.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Entities { /// diff --git a/MediaBrowser.Model/Entities/PersonType.cs b/MediaBrowser.Model/Entities/PersonType.cs index bc274972d..20d585ab0 100644 --- a/MediaBrowser.Model/Entities/PersonType.cs +++ b/MediaBrowser.Model/Entities/PersonType.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Entities { /// diff --git a/MediaBrowser.Model/Entities/PluginSecurityInfo.cs b/MediaBrowser.Model/Entities/PluginSecurityInfo.cs index 5cab55013..28a68aa18 100644 --- a/MediaBrowser.Model/Entities/PluginSecurityInfo.cs +++ b/MediaBrowser.Model/Entities/PluginSecurityInfo.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Entities { /// diff --git a/MediaBrowser.Model/Entities/SeriesStatus.cs b/MediaBrowser.Model/Entities/SeriesStatus.cs index d04a2856c..558a1cd02 100644 --- a/MediaBrowser.Model/Entities/SeriesStatus.cs +++ b/MediaBrowser.Model/Entities/SeriesStatus.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Entities { /// diff --git a/MediaBrowser.Model/Entities/UserDataSaveReason.cs b/MediaBrowser.Model/Entities/UserDataSaveReason.cs index d9691f395..b1590e62f 100644 --- a/MediaBrowser.Model/Entities/UserDataSaveReason.cs +++ b/MediaBrowser.Model/Entities/UserDataSaveReason.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Entities { /// diff --git a/MediaBrowser.Model/Entities/Video3DFormat.cs b/MediaBrowser.Model/Entities/Video3DFormat.cs index 722df4281..c9e6590d2 100644 --- a/MediaBrowser.Model/Entities/Video3DFormat.cs +++ b/MediaBrowser.Model/Entities/Video3DFormat.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Entities { public enum Video3DFormat diff --git a/MediaBrowser.Model/Entities/VideoType.cs b/MediaBrowser.Model/Entities/VideoType.cs index 05c2fa32c..d8f4cf6d0 100644 --- a/MediaBrowser.Model/Entities/VideoType.cs +++ b/MediaBrowser.Model/Entities/VideoType.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Entities { /// diff --git a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs index cae0aa58c..6bdbdb489 100644 --- a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs +++ b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Configuration; namespace MediaBrowser.Model.Entities diff --git a/MediaBrowser.Model/Events/GenericEventArgs.cs b/MediaBrowser.Model/Events/GenericEventArgs.cs index 3c558577a..fc8bc620f 100644 --- a/MediaBrowser.Model/Events/GenericEventArgs.cs +++ b/MediaBrowser.Model/Events/GenericEventArgs.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Events { diff --git a/MediaBrowser.Model/Extensions/LinqExtensions.cs b/MediaBrowser.Model/Extensions/LinqExtensions.cs index 4e33edb41..f0febf1d0 100644 --- a/MediaBrowser.Model/Extensions/LinqExtensions.cs +++ b/MediaBrowser.Model/Extensions/LinqExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; // TODO: @bond Remove diff --git a/MediaBrowser.Model/Extensions/ListHelper.cs b/MediaBrowser.Model/Extensions/ListHelper.cs index 68379d463..b5bd07702 100644 --- a/MediaBrowser.Model/Extensions/ListHelper.cs +++ b/MediaBrowser.Model/Extensions/ListHelper.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Extensions { diff --git a/MediaBrowser.Model/Extensions/StringHelper.cs b/MediaBrowser.Model/Extensions/StringHelper.cs index fa79d09db..78e23e767 100644 --- a/MediaBrowser.Model/Extensions/StringHelper.cs +++ b/MediaBrowser.Model/Extensions/StringHelper.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Text; namespace MediaBrowser.Model.Extensions diff --git a/MediaBrowser.Model/Globalization/CountryInfo.cs b/MediaBrowser.Model/Globalization/CountryInfo.cs index 16aea8436..3ae26a158 100644 --- a/MediaBrowser.Model/Globalization/CountryInfo.cs +++ b/MediaBrowser.Model/Globalization/CountryInfo.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Globalization { /// diff --git a/MediaBrowser.Model/Globalization/CultureDto.cs b/MediaBrowser.Model/Globalization/CultureDto.cs index c0eb8b2ad..f229f2055 100644 --- a/MediaBrowser.Model/Globalization/CultureDto.cs +++ b/MediaBrowser.Model/Globalization/CultureDto.cs @@ -1,4 +1,4 @@ -using global::System; +using global::System; namespace MediaBrowser.Model.Globalization { diff --git a/MediaBrowser.Model/Globalization/ILocalizationManager.cs b/MediaBrowser.Model/Globalization/ILocalizationManager.cs index a3fb3ecee..a2531e504 100644 --- a/MediaBrowser.Model/Globalization/ILocalizationManager.cs +++ b/MediaBrowser.Model/Globalization/ILocalizationManager.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Globalization diff --git a/MediaBrowser.Model/IO/FileSystemEntryInfo.cs b/MediaBrowser.Model/IO/FileSystemEntryInfo.cs index f17e2e5c3..40877680f 100644 --- a/MediaBrowser.Model/IO/FileSystemEntryInfo.cs +++ b/MediaBrowser.Model/IO/FileSystemEntryInfo.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.IO { /// diff --git a/MediaBrowser.Model/IO/FileSystemMetadata.cs b/MediaBrowser.Model/IO/FileSystemMetadata.cs index 665bc255c..2a6d13959 100644 --- a/MediaBrowser.Model/IO/FileSystemMetadata.cs +++ b/MediaBrowser.Model/IO/FileSystemMetadata.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.IO { diff --git a/MediaBrowser.Model/IO/IIsoManager.cs b/MediaBrowser.Model/IO/IIsoManager.cs index 2e684b976..24b6e5f05 100644 --- a/MediaBrowser.Model/IO/IIsoManager.cs +++ b/MediaBrowser.Model/IO/IIsoManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Threading; diff --git a/MediaBrowser.Model/IO/IIsoMount.cs b/MediaBrowser.Model/IO/IIsoMount.cs index 1cc3de19e..825c0c243 100644 --- a/MediaBrowser.Model/IO/IIsoMount.cs +++ b/MediaBrowser.Model/IO/IIsoMount.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.IO { diff --git a/MediaBrowser.Model/IO/IShortcutHandler.cs b/MediaBrowser.Model/IO/IShortcutHandler.cs index 16255e51f..4c72a8e77 100644 --- a/MediaBrowser.Model/IO/IShortcutHandler.cs +++ b/MediaBrowser.Model/IO/IShortcutHandler.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.IO { public interface IShortcutHandler diff --git a/MediaBrowser.Model/IO/IStreamHelper.cs b/MediaBrowser.Model/IO/IStreamHelper.cs index 7ed6015c0..97d985df6 100644 --- a/MediaBrowser.Model/IO/IStreamHelper.cs +++ b/MediaBrowser.Model/IO/IStreamHelper.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Threading; using System.Threading.Tasks; diff --git a/MediaBrowser.Model/IO/IZipClient.cs b/MediaBrowser.Model/IO/IZipClient.cs index c1dfc6cd6..eaddd6df3 100644 --- a/MediaBrowser.Model/IO/IZipClient.cs +++ b/MediaBrowser.Model/IO/IZipClient.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; namespace MediaBrowser.Model.IO { diff --git a/MediaBrowser.Model/IO/StreamDefaults.cs b/MediaBrowser.Model/IO/StreamDefaults.cs index 1e99ff4b5..2ca12a74d 100644 --- a/MediaBrowser.Model/IO/StreamDefaults.cs +++ b/MediaBrowser.Model/IO/StreamDefaults.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.IO { /// diff --git a/MediaBrowser.Model/Library/PlayAccess.cs b/MediaBrowser.Model/Library/PlayAccess.cs index 6ec845fc7..1962d48ba 100644 --- a/MediaBrowser.Model/Library/PlayAccess.cs +++ b/MediaBrowser.Model/Library/PlayAccess.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Library { public enum PlayAccess diff --git a/MediaBrowser.Model/Library/UserViewQuery.cs b/MediaBrowser.Model/Library/UserViewQuery.cs index 9801b8e8e..c2e189603 100644 --- a/MediaBrowser.Model/Library/UserViewQuery.cs +++ b/MediaBrowser.Model/Library/UserViewQuery.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Library { diff --git a/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs b/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs index 660542314..311b5b0c5 100644 --- a/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.LiveTv diff --git a/MediaBrowser.Model/LiveTv/ChannelType.cs b/MediaBrowser.Model/LiveTv/ChannelType.cs index bca16f839..56221ab49 100644 --- a/MediaBrowser.Model/LiveTv/ChannelType.cs +++ b/MediaBrowser.Model/LiveTv/ChannelType.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.LiveTv { /// diff --git a/MediaBrowser.Model/LiveTv/DayPattern.cs b/MediaBrowser.Model/LiveTv/DayPattern.cs index 57d4ac461..73b15507b 100644 --- a/MediaBrowser.Model/LiveTv/DayPattern.cs +++ b/MediaBrowser.Model/LiveTv/DayPattern.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.LiveTv +namespace MediaBrowser.Model.LiveTv { public enum DayPattern { diff --git a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs index a2953bc83..eedf89db0 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.LiveTv diff --git a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs index d604124e0..36fe0c3d2 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.LiveTv diff --git a/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs b/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs index 4b7ee971c..9ad13391a 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.LiveTv { diff --git a/MediaBrowser.Model/LiveTv/ProgramAudio.cs b/MediaBrowser.Model/LiveTv/ProgramAudio.cs index 6059a4174..158d67eb9 100644 --- a/MediaBrowser.Model/LiveTv/ProgramAudio.cs +++ b/MediaBrowser.Model/LiveTv/ProgramAudio.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.LiveTv +namespace MediaBrowser.Model.LiveTv { public enum ProgramAudio { diff --git a/MediaBrowser.Model/LiveTv/RecordingQuery.cs b/MediaBrowser.Model/LiveTv/RecordingQuery.cs index 79f7fac43..f98d7fe86 100644 --- a/MediaBrowser.Model/LiveTv/RecordingQuery.cs +++ b/MediaBrowser.Model/LiveTv/RecordingQuery.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Querying; diff --git a/MediaBrowser.Model/LiveTv/RecordingStatus.cs b/MediaBrowser.Model/LiveTv/RecordingStatus.cs index 496e6f421..bb93fedbc 100644 --- a/MediaBrowser.Model/LiveTv/RecordingStatus.cs +++ b/MediaBrowser.Model/LiveTv/RecordingStatus.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.LiveTv { public enum RecordingStatus diff --git a/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs b/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs index 6ebc5ce29..72c7a0c90 100644 --- a/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using MediaBrowser.Model.Entities; diff --git a/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs b/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs index 2369a53b6..a15ba7a12 100644 --- a/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs +++ b/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.LiveTv { diff --git a/MediaBrowser.Model/LiveTv/TimerInfoDto.cs b/MediaBrowser.Model/LiveTv/TimerInfoDto.cs index d1aa3118f..208f731c5 100644 --- a/MediaBrowser.Model/LiveTv/TimerInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/TimerInfoDto.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dto; +using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.LiveTv { diff --git a/MediaBrowser.Model/LiveTv/TimerQuery.cs b/MediaBrowser.Model/LiveTv/TimerQuery.cs index 9a6552fb9..1478cc148 100644 --- a/MediaBrowser.Model/LiveTv/TimerQuery.cs +++ b/MediaBrowser.Model/LiveTv/TimerQuery.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.LiveTv +namespace MediaBrowser.Model.LiveTv { public class TimerQuery { diff --git a/MediaBrowser.Model/MediaInfo/AudioCodec.cs b/MediaBrowser.Model/MediaInfo/AudioCodec.cs index 51dddd902..5ed67fd78 100644 --- a/MediaBrowser.Model/MediaInfo/AudioCodec.cs +++ b/MediaBrowser.Model/MediaInfo/AudioCodec.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.MediaInfo +namespace MediaBrowser.Model.MediaInfo { public class AudioCodec { diff --git a/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs b/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs index a08f8adbf..e728ecdfd 100644 --- a/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs +++ b/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.MediaInfo { diff --git a/MediaBrowser.Model/MediaInfo/Container.cs b/MediaBrowser.Model/MediaInfo/Container.cs index 3762edf9f..10b22d16b 100644 --- a/MediaBrowser.Model/MediaInfo/Container.cs +++ b/MediaBrowser.Model/MediaInfo/Container.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.MediaInfo { public class Container diff --git a/MediaBrowser.Model/MediaInfo/IBlurayExaminer.cs b/MediaBrowser.Model/MediaInfo/IBlurayExaminer.cs index 78d5b197f..600f18e7e 100644 --- a/MediaBrowser.Model/MediaInfo/IBlurayExaminer.cs +++ b/MediaBrowser.Model/MediaInfo/IBlurayExaminer.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.MediaInfo { /// diff --git a/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs b/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs index 6013be054..edede8ba9 100644 --- a/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs +++ b/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.MediaInfo diff --git a/MediaBrowser.Model/MediaInfo/LiveStreamResponse.cs b/MediaBrowser.Model/MediaInfo/LiveStreamResponse.cs index e79e37a71..dd4b69469 100644 --- a/MediaBrowser.Model/MediaInfo/LiveStreamResponse.cs +++ b/MediaBrowser.Model/MediaInfo/LiveStreamResponse.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dto; +using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.MediaInfo { diff --git a/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs b/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs index 71847d809..e5fad4e11 100644 --- a/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs +++ b/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.MediaInfo diff --git a/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs b/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs index 10d26c900..38638af42 100644 --- a/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs +++ b/MediaBrowser.Model/MediaInfo/PlaybackInfoResponse.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.MediaInfo diff --git a/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs b/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs index cdcb6f666..208e9bab9 100644 --- a/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs +++ b/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.MediaInfo +namespace MediaBrowser.Model.MediaInfo { public class SubtitleFormat { diff --git a/MediaBrowser.Model/MediaInfo/SubtitleTrackEvent.cs b/MediaBrowser.Model/MediaInfo/SubtitleTrackEvent.cs index b4ab6ed97..37734fe45 100644 --- a/MediaBrowser.Model/MediaInfo/SubtitleTrackEvent.cs +++ b/MediaBrowser.Model/MediaInfo/SubtitleTrackEvent.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.MediaInfo { public class SubtitleTrackEvent diff --git a/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs b/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs index 42070b9ff..962f4d2fe 100644 --- a/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs +++ b/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.MediaInfo +namespace MediaBrowser.Model.MediaInfo { public class SubtitleTrackInfo { diff --git a/MediaBrowser.Model/MediaInfo/TransportStreamTimestamp.cs b/MediaBrowser.Model/MediaInfo/TransportStreamTimestamp.cs index edfe2fda6..46ce2302e 100644 --- a/MediaBrowser.Model/MediaInfo/TransportStreamTimestamp.cs +++ b/MediaBrowser.Model/MediaInfo/TransportStreamTimestamp.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.MediaInfo +namespace MediaBrowser.Model.MediaInfo { public enum TransportStreamTimestamp { diff --git a/MediaBrowser.Model/MediaInfo/VideoCodec.cs b/MediaBrowser.Model/MediaInfo/VideoCodec.cs index cc24c7ad9..a26ce1b70 100644 --- a/MediaBrowser.Model/MediaInfo/VideoCodec.cs +++ b/MediaBrowser.Model/MediaInfo/VideoCodec.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.MediaInfo +namespace MediaBrowser.Model.MediaInfo { public class VideoCodec { diff --git a/MediaBrowser.Model/Net/EndPointInfo.cs b/MediaBrowser.Model/Net/EndPointInfo.cs index 5a158e785..b73799ea8 100644 --- a/MediaBrowser.Model/Net/EndPointInfo.cs +++ b/MediaBrowser.Model/Net/EndPointInfo.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Net +namespace MediaBrowser.Model.Net { public class EndPointInfo { diff --git a/MediaBrowser.Model/Net/HttpException.cs b/MediaBrowser.Model/Net/HttpException.cs index 2f45299e3..16253ed6c 100644 --- a/MediaBrowser.Model/Net/HttpException.cs +++ b/MediaBrowser.Model/Net/HttpException.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Net; namespace MediaBrowser.Model.Net diff --git a/MediaBrowser.Model/Net/HttpResponse.cs b/MediaBrowser.Model/Net/HttpResponse.cs index f4bd8e681..286b1c0af 100644 --- a/MediaBrowser.Model/Net/HttpResponse.cs +++ b/MediaBrowser.Model/Net/HttpResponse.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Net; diff --git a/MediaBrowser.Model/Net/IAcceptSocket.cs b/MediaBrowser.Model/Net/IAcceptSocket.cs index af5a1fcfb..2b21d3e66 100644 --- a/MediaBrowser.Model/Net/IAcceptSocket.cs +++ b/MediaBrowser.Model/Net/IAcceptSocket.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Net { diff --git a/MediaBrowser.Model/Net/ISocket.cs b/MediaBrowser.Model/Net/ISocket.cs index a9d772855..992ccb49b 100644 --- a/MediaBrowser.Model/Net/ISocket.cs +++ b/MediaBrowser.Model/Net/ISocket.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; diff --git a/MediaBrowser.Model/Net/ISocketFactory.cs b/MediaBrowser.Model/Net/ISocketFactory.cs index 2100aae2a..a878f84b0 100644 --- a/MediaBrowser.Model/Net/ISocketFactory.cs +++ b/MediaBrowser.Model/Net/ISocketFactory.cs @@ -1,4 +1,4 @@ - + using System.IO; namespace MediaBrowser.Model.Net diff --git a/MediaBrowser.Model/Net/IpAddressInfo.cs b/MediaBrowser.Model/Net/IpAddressInfo.cs index c2c228faf..7a278d4d4 100644 --- a/MediaBrowser.Model/Net/IpAddressInfo.cs +++ b/MediaBrowser.Model/Net/IpAddressInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Net { diff --git a/MediaBrowser.Model/Net/IpEndPointInfo.cs b/MediaBrowser.Model/Net/IpEndPointInfo.cs index 2a04f447f..f8c125144 100644 --- a/MediaBrowser.Model/Net/IpEndPointInfo.cs +++ b/MediaBrowser.Model/Net/IpEndPointInfo.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; namespace MediaBrowser.Model.Net { diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs index 2245a564f..e5d1ab462 100644 --- a/MediaBrowser.Model/Net/MimeTypes.cs +++ b/MediaBrowser.Model/Net/MimeTypes.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/MediaBrowser.Model/Net/NetworkShare.cs b/MediaBrowser.Model/Net/NetworkShare.cs index 5ce84eeed..5aab59d1c 100644 --- a/MediaBrowser.Model/Net/NetworkShare.cs +++ b/MediaBrowser.Model/Net/NetworkShare.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Net { public class NetworkShare diff --git a/MediaBrowser.Model/Net/NetworkShareType.cs b/MediaBrowser.Model/Net/NetworkShareType.cs index 41dc9003e..3270d5b74 100644 --- a/MediaBrowser.Model/Net/NetworkShareType.cs +++ b/MediaBrowser.Model/Net/NetworkShareType.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Net { /// diff --git a/MediaBrowser.Model/Net/SocketReceiveResult.cs b/MediaBrowser.Model/Net/SocketReceiveResult.cs index 5a5004de6..cffc2ad27 100644 --- a/MediaBrowser.Model/Net/SocketReceiveResult.cs +++ b/MediaBrowser.Model/Net/SocketReceiveResult.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Net { /// diff --git a/MediaBrowser.Model/Net/WebSocketMessage.cs b/MediaBrowser.Model/Net/WebSocketMessage.cs index c049a96ef..a6e0ca632 100644 --- a/MediaBrowser.Model/Net/WebSocketMessage.cs +++ b/MediaBrowser.Model/Net/WebSocketMessage.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Net { /// diff --git a/MediaBrowser.Model/Notifications/NotificationLevel.cs b/MediaBrowser.Model/Notifications/NotificationLevel.cs index a49ee2fe6..4427b9677 100644 --- a/MediaBrowser.Model/Notifications/NotificationLevel.cs +++ b/MediaBrowser.Model/Notifications/NotificationLevel.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Notifications { public enum NotificationLevel diff --git a/MediaBrowser.Model/Notifications/NotificationOptions.cs b/MediaBrowser.Model/Notifications/NotificationOptions.cs index 154379692..f48b5ee7f 100644 --- a/MediaBrowser.Model/Notifications/NotificationOptions.cs +++ b/MediaBrowser.Model/Notifications/NotificationOptions.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Users; diff --git a/MediaBrowser.Model/Notifications/NotificationRequest.cs b/MediaBrowser.Model/Notifications/NotificationRequest.cs index 7fa57ca9a..5a2634e73 100644 --- a/MediaBrowser.Model/Notifications/NotificationRequest.cs +++ b/MediaBrowser.Model/Notifications/NotificationRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Notifications { diff --git a/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs b/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs index 95e83e076..ff957e644 100644 --- a/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs +++ b/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Notifications +namespace MediaBrowser.Model.Notifications { public class NotificationTypeInfo { diff --git a/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs b/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs index db2724efa..007965c0f 100644 --- a/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs +++ b/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Playlists { diff --git a/MediaBrowser.Model/Playlists/PlaylistCreationResult.cs b/MediaBrowser.Model/Playlists/PlaylistCreationResult.cs index bbab8a18d..bb7c7b140 100644 --- a/MediaBrowser.Model/Playlists/PlaylistCreationResult.cs +++ b/MediaBrowser.Model/Playlists/PlaylistCreationResult.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Playlists { public class PlaylistCreationResult diff --git a/MediaBrowser.Model/Playlists/PlaylistItemQuery.cs b/MediaBrowser.Model/Playlists/PlaylistItemQuery.cs index 0f6a0c8c5..1f03c14d3 100644 --- a/MediaBrowser.Model/Playlists/PlaylistItemQuery.cs +++ b/MediaBrowser.Model/Playlists/PlaylistItemQuery.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Querying; +using MediaBrowser.Model.Querying; namespace MediaBrowser.Model.Playlists { diff --git a/MediaBrowser.Model/Plugins/BasePluginConfiguration.cs b/MediaBrowser.Model/Plugins/BasePluginConfiguration.cs index 9a8bfadd1..3dc5c6773 100644 --- a/MediaBrowser.Model/Plugins/BasePluginConfiguration.cs +++ b/MediaBrowser.Model/Plugins/BasePluginConfiguration.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Plugins { /// diff --git a/MediaBrowser.Model/Plugins/IHasWebPages.cs b/MediaBrowser.Model/Plugins/IHasWebPages.cs index 0745c3c60..5bda7e65e 100644 --- a/MediaBrowser.Model/Plugins/IHasWebPages.cs +++ b/MediaBrowser.Model/Plugins/IHasWebPages.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace MediaBrowser.Model.Plugins { diff --git a/MediaBrowser.Model/Plugins/PluginInfo.cs b/MediaBrowser.Model/Plugins/PluginInfo.cs index b8ac5fe99..9ff9ea457 100644 --- a/MediaBrowser.Model/Plugins/PluginInfo.cs +++ b/MediaBrowser.Model/Plugins/PluginInfo.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Plugins +namespace MediaBrowser.Model.Plugins { /// /// This is a serializable stub class that is used by the api to provide information about installed plugins. diff --git a/MediaBrowser.Model/Plugins/PluginPageInfo.cs b/MediaBrowser.Model/Plugins/PluginPageInfo.cs index 045a0072c..8ed2064b9 100644 --- a/MediaBrowser.Model/Plugins/PluginPageInfo.cs +++ b/MediaBrowser.Model/Plugins/PluginPageInfo.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Plugins +namespace MediaBrowser.Model.Plugins { public class PluginPageInfo { diff --git a/MediaBrowser.Model/Providers/ExternalIdInfo.cs b/MediaBrowser.Model/Providers/ExternalIdInfo.cs index 2c5cfe91b..3ccc3cc93 100644 --- a/MediaBrowser.Model/Providers/ExternalIdInfo.cs +++ b/MediaBrowser.Model/Providers/ExternalIdInfo.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Providers { public class ExternalIdInfo diff --git a/MediaBrowser.Model/Providers/ExternalUrl.cs b/MediaBrowser.Model/Providers/ExternalUrl.cs index 36e631434..69cead92a 100644 --- a/MediaBrowser.Model/Providers/ExternalUrl.cs +++ b/MediaBrowser.Model/Providers/ExternalUrl.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Providers +namespace MediaBrowser.Model.Providers { public class ExternalUrl { diff --git a/MediaBrowser.Model/Providers/ImageProviderInfo.cs b/MediaBrowser.Model/Providers/ImageProviderInfo.cs index fed6cb744..1c4cff373 100644 --- a/MediaBrowser.Model/Providers/ImageProviderInfo.cs +++ b/MediaBrowser.Model/Providers/ImageProviderInfo.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Providers { diff --git a/MediaBrowser.Model/Providers/RemoteImageInfo.cs b/MediaBrowser.Model/Providers/RemoteImageInfo.cs index 90c1ba0af..aacd108ec 100644 --- a/MediaBrowser.Model/Providers/RemoteImageInfo.cs +++ b/MediaBrowser.Model/Providers/RemoteImageInfo.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dto; +using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Providers diff --git a/MediaBrowser.Model/Providers/RemoteImageQuery.cs b/MediaBrowser.Model/Providers/RemoteImageQuery.cs index bf59de84b..7c9216ce7 100644 --- a/MediaBrowser.Model/Providers/RemoteImageQuery.cs +++ b/MediaBrowser.Model/Providers/RemoteImageQuery.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Providers { diff --git a/MediaBrowser.Model/Providers/RemoteImageResult.cs b/MediaBrowser.Model/Providers/RemoteImageResult.cs index a7d3a5c88..5ca00f770 100644 --- a/MediaBrowser.Model/Providers/RemoteImageResult.cs +++ b/MediaBrowser.Model/Providers/RemoteImageResult.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Providers +namespace MediaBrowser.Model.Providers { /// /// Class RemoteImageResult. diff --git a/MediaBrowser.Model/Providers/RemoteSearchResult.cs b/MediaBrowser.Model/Providers/RemoteSearchResult.cs index 03b369926..88e3bc69c 100644 --- a/MediaBrowser.Model/Providers/RemoteSearchResult.cs +++ b/MediaBrowser.Model/Providers/RemoteSearchResult.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using MediaBrowser.Model.Entities; diff --git a/MediaBrowser.Model/Providers/RemoteSubtitleInfo.cs b/MediaBrowser.Model/Providers/RemoteSubtitleInfo.cs index 0a4a52cd5..861aabf72 100644 --- a/MediaBrowser.Model/Providers/RemoteSubtitleInfo.cs +++ b/MediaBrowser.Model/Providers/RemoteSubtitleInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Providers { diff --git a/MediaBrowser.Model/Querying/AllThemeMediaResult.cs b/MediaBrowser.Model/Querying/AllThemeMediaResult.cs index 1ca9136c4..f843a33e6 100644 --- a/MediaBrowser.Model/Querying/AllThemeMediaResult.cs +++ b/MediaBrowser.Model/Querying/AllThemeMediaResult.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Querying +namespace MediaBrowser.Model.Querying { public class AllThemeMediaResult { diff --git a/MediaBrowser.Model/Querying/EpisodeQuery.cs b/MediaBrowser.Model/Querying/EpisodeQuery.cs index cae87b852..e2231d356 100644 --- a/MediaBrowser.Model/Querying/EpisodeQuery.cs +++ b/MediaBrowser.Model/Querying/EpisodeQuery.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Querying { public class EpisodeQuery diff --git a/MediaBrowser.Model/Querying/ItemCountsQuery.cs b/MediaBrowser.Model/Querying/ItemCountsQuery.cs index 0bf681537..c12ada345 100644 --- a/MediaBrowser.Model/Querying/ItemCountsQuery.cs +++ b/MediaBrowser.Model/Querying/ItemCountsQuery.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Querying { /// diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs index ceccf5ee5..af1aaf486 100644 --- a/MediaBrowser.Model/Querying/ItemFields.cs +++ b/MediaBrowser.Model/Querying/ItemFields.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Querying +namespace MediaBrowser.Model.Querying { /// /// Used to control the data that gets attached to DtoBaseItems diff --git a/MediaBrowser.Model/Querying/ItemFilter.cs b/MediaBrowser.Model/Querying/ItemFilter.cs index ff28bd08c..ee7e49fb0 100644 --- a/MediaBrowser.Model/Querying/ItemFilter.cs +++ b/MediaBrowser.Model/Querying/ItemFilter.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Querying { /// diff --git a/MediaBrowser.Model/Querying/ItemSortBy.cs b/MediaBrowser.Model/Querying/ItemSortBy.cs index 66bdc8aa5..541990eb9 100644 --- a/MediaBrowser.Model/Querying/ItemSortBy.cs +++ b/MediaBrowser.Model/Querying/ItemSortBy.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Querying { /// diff --git a/MediaBrowser.Model/Querying/LatestItemsQuery.cs b/MediaBrowser.Model/Querying/LatestItemsQuery.cs index dfd0fcb5b..4a5818ac5 100644 --- a/MediaBrowser.Model/Querying/LatestItemsQuery.cs +++ b/MediaBrowser.Model/Querying/LatestItemsQuery.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Querying diff --git a/MediaBrowser.Model/Querying/MovieRecommendationQuery.cs b/MediaBrowser.Model/Querying/MovieRecommendationQuery.cs index 91417a4a7..ec63abb64 100644 --- a/MediaBrowser.Model/Querying/MovieRecommendationQuery.cs +++ b/MediaBrowser.Model/Querying/MovieRecommendationQuery.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Querying { public class MovieRecommendationQuery diff --git a/MediaBrowser.Model/Querying/NextUpQuery.cs b/MediaBrowser.Model/Querying/NextUpQuery.cs index af44841b3..ff146cede 100644 --- a/MediaBrowser.Model/Querying/NextUpQuery.cs +++ b/MediaBrowser.Model/Querying/NextUpQuery.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Querying diff --git a/MediaBrowser.Model/Querying/QueryFilters.cs b/MediaBrowser.Model/Querying/QueryFilters.cs index 0b224ca45..2f38299db 100644 --- a/MediaBrowser.Model/Querying/QueryFilters.cs +++ b/MediaBrowser.Model/Querying/QueryFilters.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.Querying diff --git a/MediaBrowser.Model/Querying/QueryResult.cs b/MediaBrowser.Model/Querying/QueryResult.cs index 6f9923d08..992c7e623 100644 --- a/MediaBrowser.Model/Querying/QueryResult.cs +++ b/MediaBrowser.Model/Querying/QueryResult.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Querying { public class QueryResult diff --git a/MediaBrowser.Model/Querying/SessionQuery.cs b/MediaBrowser.Model/Querying/SessionQuery.cs index fa7df315c..d02768ed7 100644 --- a/MediaBrowser.Model/Querying/SessionQuery.cs +++ b/MediaBrowser.Model/Querying/SessionQuery.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Querying { /// diff --git a/MediaBrowser.Model/Querying/SimilarItemsQuery.cs b/MediaBrowser.Model/Querying/SimilarItemsQuery.cs index 0dd491550..68f761bd4 100644 --- a/MediaBrowser.Model/Querying/SimilarItemsQuery.cs +++ b/MediaBrowser.Model/Querying/SimilarItemsQuery.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Querying +namespace MediaBrowser.Model.Querying { public class SimilarItemsQuery { diff --git a/MediaBrowser.Model/Querying/ThemeMediaResult.cs b/MediaBrowser.Model/Querying/ThemeMediaResult.cs index 0387ec830..bae954d78 100644 --- a/MediaBrowser.Model/Querying/ThemeMediaResult.cs +++ b/MediaBrowser.Model/Querying/ThemeMediaResult.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.Querying diff --git a/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs b/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs index bdac249bd..5eac2860d 100644 --- a/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs +++ b/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Querying { diff --git a/MediaBrowser.Model/Querying/UserQuery.cs b/MediaBrowser.Model/Querying/UserQuery.cs index 48dbd30aa..c668f9d8c 100644 --- a/MediaBrowser.Model/Querying/UserQuery.cs +++ b/MediaBrowser.Model/Querying/UserQuery.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Querying { public class UserQuery diff --git a/MediaBrowser.Model/Reflection/IAssemblyInfo.cs b/MediaBrowser.Model/Reflection/IAssemblyInfo.cs index e8e9c414c..5c4536c1c 100644 --- a/MediaBrowser.Model/Reflection/IAssemblyInfo.cs +++ b/MediaBrowser.Model/Reflection/IAssemblyInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Reflection; diff --git a/MediaBrowser.Model/Search/SearchHint.cs b/MediaBrowser.Model/Search/SearchHint.cs index 48da8e4bc..8a187f18e 100644 --- a/MediaBrowser.Model/Search/SearchHint.cs +++ b/MediaBrowser.Model/Search/SearchHint.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Search { diff --git a/MediaBrowser.Model/Search/SearchHintResult.cs b/MediaBrowser.Model/Search/SearchHintResult.cs index 372528f82..3d82bfceb 100644 --- a/MediaBrowser.Model/Search/SearchHintResult.cs +++ b/MediaBrowser.Model/Search/SearchHintResult.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Search { /// diff --git a/MediaBrowser.Model/Search/SearchQuery.cs b/MediaBrowser.Model/Search/SearchQuery.cs index 9ed2f4ffb..96a8cb00c 100644 --- a/MediaBrowser.Model/Search/SearchQuery.cs +++ b/MediaBrowser.Model/Search/SearchQuery.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Search { diff --git a/MediaBrowser.Model/Serialization/IJsonSerializer.cs b/MediaBrowser.Model/Serialization/IJsonSerializer.cs index 06e48f412..ae0cf6f36 100644 --- a/MediaBrowser.Model/Serialization/IJsonSerializer.cs +++ b/MediaBrowser.Model/Serialization/IJsonSerializer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Threading.Tasks; diff --git a/MediaBrowser.Model/Serialization/IXmlSerializer.cs b/MediaBrowser.Model/Serialization/IXmlSerializer.cs index 0fa35c133..902ebd4d1 100644 --- a/MediaBrowser.Model/Serialization/IXmlSerializer.cs +++ b/MediaBrowser.Model/Serialization/IXmlSerializer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace MediaBrowser.Model.Serialization diff --git a/MediaBrowser.Model/Serialization/IgnoreDataMemberAttribute.cs b/MediaBrowser.Model/Serialization/IgnoreDataMemberAttribute.cs index 8e23edc24..b43949fe3 100644 --- a/MediaBrowser.Model/Serialization/IgnoreDataMemberAttribute.cs +++ b/MediaBrowser.Model/Serialization/IgnoreDataMemberAttribute.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Serialization { diff --git a/MediaBrowser.Model/Services/ApiMemberAttribute.cs b/MediaBrowser.Model/Services/ApiMemberAttribute.cs index 9e5faad29..8b155c8ab 100644 --- a/MediaBrowser.Model/Services/ApiMemberAttribute.cs +++ b/MediaBrowser.Model/Services/ApiMemberAttribute.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Services { diff --git a/MediaBrowser.Model/Services/HttpUtility.cs b/MediaBrowser.Model/Services/HttpUtility.cs index 1bf3b28d1..98882e114 100644 --- a/MediaBrowser.Model/Services/HttpUtility.cs +++ b/MediaBrowser.Model/Services/HttpUtility.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using System.Text; diff --git a/MediaBrowser.Model/Services/IAsyncStreamWriter.cs b/MediaBrowser.Model/Services/IAsyncStreamWriter.cs index b10e12813..f16a877e6 100644 --- a/MediaBrowser.Model/Services/IAsyncStreamWriter.cs +++ b/MediaBrowser.Model/Services/IAsyncStreamWriter.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Threading; using System.Threading.Tasks; diff --git a/MediaBrowser.Model/Services/IHasHeaders.cs b/MediaBrowser.Model/Services/IHasHeaders.cs index 35e652b0f..b2d413b70 100644 --- a/MediaBrowser.Model/Services/IHasHeaders.cs +++ b/MediaBrowser.Model/Services/IHasHeaders.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace MediaBrowser.Model.Services { diff --git a/MediaBrowser.Model/Services/IHasRequestFilter.cs b/MediaBrowser.Model/Services/IHasRequestFilter.cs index 90cfc2a31..97c11e435 100644 --- a/MediaBrowser.Model/Services/IHasRequestFilter.cs +++ b/MediaBrowser.Model/Services/IHasRequestFilter.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Services { public interface IHasRequestFilter diff --git a/MediaBrowser.Model/Services/IHttpRequest.cs b/MediaBrowser.Model/Services/IHttpRequest.cs index ceb25c8d2..579f80c96 100644 --- a/MediaBrowser.Model/Services/IHttpRequest.cs +++ b/MediaBrowser.Model/Services/IHttpRequest.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Services +namespace MediaBrowser.Model.Services { public interface IHttpRequest : IRequest { diff --git a/MediaBrowser.Model/Services/IHttpResponse.cs b/MediaBrowser.Model/Services/IHttpResponse.cs index fa3442a7f..a8b79f394 100644 --- a/MediaBrowser.Model/Services/IHttpResponse.cs +++ b/MediaBrowser.Model/Services/IHttpResponse.cs @@ -1,4 +1,4 @@ -using System.Net; +using System.Net; namespace MediaBrowser.Model.Services { diff --git a/MediaBrowser.Model/Services/IHttpResult.cs b/MediaBrowser.Model/Services/IHttpResult.cs index 11831adea..bfa30f60d 100644 --- a/MediaBrowser.Model/Services/IHttpResult.cs +++ b/MediaBrowser.Model/Services/IHttpResult.cs @@ -1,4 +1,4 @@ -using System.Net; +using System.Net; namespace MediaBrowser.Model.Services { diff --git a/MediaBrowser.Model/Services/IRequest.cs b/MediaBrowser.Model/Services/IRequest.cs index 681bab294..ac9b981b9 100644 --- a/MediaBrowser.Model/Services/IRequest.cs +++ b/MediaBrowser.Model/Services/IRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Net; diff --git a/MediaBrowser.Model/Services/IRequiresRequestStream.cs b/MediaBrowser.Model/Services/IRequiresRequestStream.cs index 0b8ac3ed3..2f17c6a9a 100644 --- a/MediaBrowser.Model/Services/IRequiresRequestStream.cs +++ b/MediaBrowser.Model/Services/IRequiresRequestStream.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; namespace MediaBrowser.Model.Services { diff --git a/MediaBrowser.Model/Services/IService.cs b/MediaBrowser.Model/Services/IService.cs index 3e0ff280b..cc64e60bc 100644 --- a/MediaBrowser.Model/Services/IService.cs +++ b/MediaBrowser.Model/Services/IService.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Services { // marker interface diff --git a/MediaBrowser.Model/Services/IStreamWriter.cs b/MediaBrowser.Model/Services/IStreamWriter.cs index 1fc11049e..9d65cff63 100644 --- a/MediaBrowser.Model/Services/IStreamWriter.cs +++ b/MediaBrowser.Model/Services/IStreamWriter.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; namespace MediaBrowser.Model.Services { diff --git a/MediaBrowser.Model/Services/RouteAttribute.cs b/MediaBrowser.Model/Services/RouteAttribute.cs index 0dc52af7b..f6316e2b1 100644 --- a/MediaBrowser.Model/Services/RouteAttribute.cs +++ b/MediaBrowser.Model/Services/RouteAttribute.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Services { diff --git a/MediaBrowser.Model/Session/BrowseRequest.cs b/MediaBrowser.Model/Session/BrowseRequest.cs index a4fdbcc38..d0ad28ea6 100644 --- a/MediaBrowser.Model/Session/BrowseRequest.cs +++ b/MediaBrowser.Model/Session/BrowseRequest.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Session { /// diff --git a/MediaBrowser.Model/Session/ClientCapabilities.cs b/MediaBrowser.Model/Session/ClientCapabilities.cs index 1dbc02f09..fa74efb1b 100644 --- a/MediaBrowser.Model/Session/ClientCapabilities.cs +++ b/MediaBrowser.Model/Session/ClientCapabilities.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Dlna; namespace MediaBrowser.Model.Session diff --git a/MediaBrowser.Model/Session/GeneralCommand.cs b/MediaBrowser.Model/Session/GeneralCommand.cs index e86b44dca..74e58e678 100644 --- a/MediaBrowser.Model/Session/GeneralCommand.cs +++ b/MediaBrowser.Model/Session/GeneralCommand.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; namespace MediaBrowser.Model.Session diff --git a/MediaBrowser.Model/Session/GeneralCommandType.cs b/MediaBrowser.Model/Session/GeneralCommandType.cs index e40c5e43b..4bb0c5cc5 100644 --- a/MediaBrowser.Model/Session/GeneralCommandType.cs +++ b/MediaBrowser.Model/Session/GeneralCommandType.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Session +namespace MediaBrowser.Model.Session { /// /// This exists simply to identify a set of known commands. diff --git a/MediaBrowser.Model/Session/MessageCommand.cs b/MediaBrowser.Model/Session/MessageCommand.cs index 3e4f32349..d392f7d2e 100644 --- a/MediaBrowser.Model/Session/MessageCommand.cs +++ b/MediaBrowser.Model/Session/MessageCommand.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Session { public class MessageCommand diff --git a/MediaBrowser.Model/Session/PlayCommand.cs b/MediaBrowser.Model/Session/PlayCommand.cs index 413553ac8..b7a8f39ba 100644 --- a/MediaBrowser.Model/Session/PlayCommand.cs +++ b/MediaBrowser.Model/Session/PlayCommand.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Session +namespace MediaBrowser.Model.Session { /// /// Enum PlayCommand diff --git a/MediaBrowser.Model/Session/PlayMethod.cs b/MediaBrowser.Model/Session/PlayMethod.cs index c782ec9c1..8daf8c953 100644 --- a/MediaBrowser.Model/Session/PlayMethod.cs +++ b/MediaBrowser.Model/Session/PlayMethod.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Session +namespace MediaBrowser.Model.Session { public enum PlayMethod { diff --git a/MediaBrowser.Model/Session/PlayRequest.cs b/MediaBrowser.Model/Session/PlayRequest.cs index eedf5772e..075ae7730 100644 --- a/MediaBrowser.Model/Session/PlayRequest.cs +++ b/MediaBrowser.Model/Session/PlayRequest.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Services; namespace MediaBrowser.Model.Session diff --git a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs index 2ce7b7c42..c1d630671 100644 --- a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs +++ b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.Session diff --git a/MediaBrowser.Model/Session/PlaybackStartInfo.cs b/MediaBrowser.Model/Session/PlaybackStartInfo.cs index f6f496e4e..19e1823f4 100644 --- a/MediaBrowser.Model/Session/PlaybackStartInfo.cs +++ b/MediaBrowser.Model/Session/PlaybackStartInfo.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Session { /// diff --git a/MediaBrowser.Model/Session/PlaybackStopInfo.cs b/MediaBrowser.Model/Session/PlaybackStopInfo.cs index 1f466fcf3..8a85b1998 100644 --- a/MediaBrowser.Model/Session/PlaybackStopInfo.cs +++ b/MediaBrowser.Model/Session/PlaybackStopInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.Session diff --git a/MediaBrowser.Model/Session/PlayerStateInfo.cs b/MediaBrowser.Model/Session/PlayerStateInfo.cs index 2ac91a66c..7e54e16c8 100644 --- a/MediaBrowser.Model/Session/PlayerStateInfo.cs +++ b/MediaBrowser.Model/Session/PlayerStateInfo.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Session +namespace MediaBrowser.Model.Session { public class PlayerStateInfo { diff --git a/MediaBrowser.Model/Session/PlaystateCommand.cs b/MediaBrowser.Model/Session/PlaystateCommand.cs index a1af96b6a..018ad6138 100644 --- a/MediaBrowser.Model/Session/PlaystateCommand.cs +++ b/MediaBrowser.Model/Session/PlaystateCommand.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Session { /// diff --git a/MediaBrowser.Model/Session/PlaystateRequest.cs b/MediaBrowser.Model/Session/PlaystateRequest.cs index 1cf9a1fa4..08d3f0072 100644 --- a/MediaBrowser.Model/Session/PlaystateRequest.cs +++ b/MediaBrowser.Model/Session/PlaystateRequest.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Session +namespace MediaBrowser.Model.Session { public class PlaystateRequest { diff --git a/MediaBrowser.Model/Session/SessionUserInfo.cs b/MediaBrowser.Model/Session/SessionUserInfo.cs index 75be49f1e..42a56b92b 100644 --- a/MediaBrowser.Model/Session/SessionUserInfo.cs +++ b/MediaBrowser.Model/Session/SessionUserInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Session { diff --git a/MediaBrowser.Model/Session/UserDataChangeInfo.cs b/MediaBrowser.Model/Session/UserDataChangeInfo.cs index 9c8b441e2..ef0e2c89a 100644 --- a/MediaBrowser.Model/Session/UserDataChangeInfo.cs +++ b/MediaBrowser.Model/Session/UserDataChangeInfo.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dto; +using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.Session { diff --git a/MediaBrowser.Model/Sync/SyncCategory.cs b/MediaBrowser.Model/Sync/SyncCategory.cs index e0d748685..a01b36597 100644 --- a/MediaBrowser.Model/Sync/SyncCategory.cs +++ b/MediaBrowser.Model/Sync/SyncCategory.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Sync { public enum SyncCategory diff --git a/MediaBrowser.Model/Sync/SyncJob.cs b/MediaBrowser.Model/Sync/SyncJob.cs index 3b2e30d70..7a1f76fe9 100644 --- a/MediaBrowser.Model/Sync/SyncJob.cs +++ b/MediaBrowser.Model/Sync/SyncJob.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Sync { diff --git a/MediaBrowser.Model/Sync/SyncJobStatus.cs b/MediaBrowser.Model/Sync/SyncJobStatus.cs index 2d1d30802..e8b7c8d1b 100644 --- a/MediaBrowser.Model/Sync/SyncJobStatus.cs +++ b/MediaBrowser.Model/Sync/SyncJobStatus.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Sync { public enum SyncJobStatus diff --git a/MediaBrowser.Model/Sync/SyncTarget.cs b/MediaBrowser.Model/Sync/SyncTarget.cs index 8901f0f27..c2b36cddf 100644 --- a/MediaBrowser.Model/Sync/SyncTarget.cs +++ b/MediaBrowser.Model/Sync/SyncTarget.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Sync { public class SyncTarget diff --git a/MediaBrowser.Model/System/IEnvironmentInfo.cs b/MediaBrowser.Model/System/IEnvironmentInfo.cs index faf9f0a42..757d3c949 100644 --- a/MediaBrowser.Model/System/IEnvironmentInfo.cs +++ b/MediaBrowser.Model/System/IEnvironmentInfo.cs @@ -1,4 +1,4 @@ -using System.Runtime.InteropServices; +using System.Runtime.InteropServices; namespace MediaBrowser.Model.System { diff --git a/MediaBrowser.Model/System/ISystemEvents.cs b/MediaBrowser.Model/System/ISystemEvents.cs index dec8ed8c0..8c47d6fbf 100644 --- a/MediaBrowser.Model/System/ISystemEvents.cs +++ b/MediaBrowser.Model/System/ISystemEvents.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.System { diff --git a/MediaBrowser.Model/System/LogFile.cs b/MediaBrowser.Model/System/LogFile.cs index ba409c542..913e8e1ea 100644 --- a/MediaBrowser.Model/System/LogFile.cs +++ b/MediaBrowser.Model/System/LogFile.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.System { diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs index a28ce1070..b0432ae74 100644 --- a/MediaBrowser.Model/System/SystemInfo.cs +++ b/MediaBrowser.Model/System/SystemInfo.cs @@ -1,4 +1,4 @@ -using System.Runtime.InteropServices; +using System.Runtime.InteropServices; using MediaBrowser.Model.Updates; namespace MediaBrowser.Model.System diff --git a/MediaBrowser.Model/Tasks/IConfigurableScheduledTask.cs b/MediaBrowser.Model/Tasks/IConfigurableScheduledTask.cs index ab58f091c..9c4b75c54 100644 --- a/MediaBrowser.Model/Tasks/IConfigurableScheduledTask.cs +++ b/MediaBrowser.Model/Tasks/IConfigurableScheduledTask.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Tasks +namespace MediaBrowser.Model.Tasks { public interface IConfigurableScheduledTask { diff --git a/MediaBrowser.Model/Tasks/IScheduledTask.cs b/MediaBrowser.Model/Tasks/IScheduledTask.cs index 81ba239ad..a615ebb07 100644 --- a/MediaBrowser.Model/Tasks/IScheduledTask.cs +++ b/MediaBrowser.Model/Tasks/IScheduledTask.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs b/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs index c0140b6cb..61e3a65eb 100644 --- a/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs +++ b/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Events; namespace MediaBrowser.Model.Tasks diff --git a/MediaBrowser.Model/Tasks/ITaskManager.cs b/MediaBrowser.Model/Tasks/ITaskManager.cs index f183336ae..a7c2f6d86 100644 --- a/MediaBrowser.Model/Tasks/ITaskManager.cs +++ b/MediaBrowser.Model/Tasks/ITaskManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading.Tasks; using MediaBrowser.Model.Events; diff --git a/MediaBrowser.Model/Tasks/ITaskTrigger.cs b/MediaBrowser.Model/Tasks/ITaskTrigger.cs index 00e780352..c8433ed21 100644 --- a/MediaBrowser.Model/Tasks/ITaskTrigger.cs +++ b/MediaBrowser.Model/Tasks/ITaskTrigger.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.Extensions.Logging; namespace MediaBrowser.Model.Tasks diff --git a/MediaBrowser.Model/Tasks/ScheduledTaskHelpers.cs b/MediaBrowser.Model/Tasks/ScheduledTaskHelpers.cs index 2dec79e93..197c47f80 100644 --- a/MediaBrowser.Model/Tasks/ScheduledTaskHelpers.cs +++ b/MediaBrowser.Model/Tasks/ScheduledTaskHelpers.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Tasks { /// diff --git a/MediaBrowser.Model/Tasks/SystemEvent.cs b/MediaBrowser.Model/Tasks/SystemEvent.cs index 4d49a38cc..1e6cfe13b 100644 --- a/MediaBrowser.Model/Tasks/SystemEvent.cs +++ b/MediaBrowser.Model/Tasks/SystemEvent.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Tasks { /// diff --git a/MediaBrowser.Model/Tasks/TaskCompletionEventArgs.cs b/MediaBrowser.Model/Tasks/TaskCompletionEventArgs.cs index be9eaa613..05eaff8da 100644 --- a/MediaBrowser.Model/Tasks/TaskCompletionEventArgs.cs +++ b/MediaBrowser.Model/Tasks/TaskCompletionEventArgs.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Tasks { diff --git a/MediaBrowser.Model/Tasks/TaskCompletionStatus.cs b/MediaBrowser.Model/Tasks/TaskCompletionStatus.cs index 6ba5ba5e4..9acdf61d8 100644 --- a/MediaBrowser.Model/Tasks/TaskCompletionStatus.cs +++ b/MediaBrowser.Model/Tasks/TaskCompletionStatus.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Tasks { /// diff --git a/MediaBrowser.Model/Tasks/TaskInfo.cs b/MediaBrowser.Model/Tasks/TaskInfo.cs index 49bf198ef..8d80e68cf 100644 --- a/MediaBrowser.Model/Tasks/TaskInfo.cs +++ b/MediaBrowser.Model/Tasks/TaskInfo.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Model.Tasks +namespace MediaBrowser.Model.Tasks { /// /// Class TaskInfo diff --git a/MediaBrowser.Model/Tasks/TaskOptions.cs b/MediaBrowser.Model/Tasks/TaskOptions.cs index caca154a9..b06803429 100644 --- a/MediaBrowser.Model/Tasks/TaskOptions.cs +++ b/MediaBrowser.Model/Tasks/TaskOptions.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Tasks { public class TaskOptions diff --git a/MediaBrowser.Model/Tasks/TaskResult.cs b/MediaBrowser.Model/Tasks/TaskResult.cs index 9cc45a16b..eede9069f 100644 --- a/MediaBrowser.Model/Tasks/TaskResult.cs +++ b/MediaBrowser.Model/Tasks/TaskResult.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Tasks { diff --git a/MediaBrowser.Model/Tasks/TaskState.cs b/MediaBrowser.Model/Tasks/TaskState.cs index 889ce6875..60c4b06d1 100644 --- a/MediaBrowser.Model/Tasks/TaskState.cs +++ b/MediaBrowser.Model/Tasks/TaskState.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Tasks { /// diff --git a/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs b/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs index 901a300d0..80101ec48 100644 --- a/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs +++ b/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Tasks { diff --git a/MediaBrowser.Model/Text/ITextEncoding.cs b/MediaBrowser.Model/Text/ITextEncoding.cs index d6fd3463b..1a5918eb7 100644 --- a/MediaBrowser.Model/Text/ITextEncoding.cs +++ b/MediaBrowser.Model/Text/ITextEncoding.cs @@ -1,4 +1,4 @@ -using System.Text; +using System.Text; namespace MediaBrowser.Model.Text { diff --git a/MediaBrowser.Model/Threading/ITimer.cs b/MediaBrowser.Model/Threading/ITimer.cs index 42090250b..2bec22266 100644 --- a/MediaBrowser.Model/Threading/ITimer.cs +++ b/MediaBrowser.Model/Threading/ITimer.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Threading { diff --git a/MediaBrowser.Model/Threading/ITimerFactory.cs b/MediaBrowser.Model/Threading/ITimerFactory.cs index 5f3df1738..1161958a4 100644 --- a/MediaBrowser.Model/Threading/ITimerFactory.cs +++ b/MediaBrowser.Model/Threading/ITimerFactory.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Threading { diff --git a/MediaBrowser.Model/Updates/CheckForUpdateResult.cs b/MediaBrowser.Model/Updates/CheckForUpdateResult.cs index ff0bba197..79558b0cf 100644 --- a/MediaBrowser.Model/Updates/CheckForUpdateResult.cs +++ b/MediaBrowser.Model/Updates/CheckForUpdateResult.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Updates { /// diff --git a/MediaBrowser.Model/Updates/InstallationInfo.cs b/MediaBrowser.Model/Updates/InstallationInfo.cs index 09b4975a8..a3f19e236 100644 --- a/MediaBrowser.Model/Updates/InstallationInfo.cs +++ b/MediaBrowser.Model/Updates/InstallationInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Updates { diff --git a/MediaBrowser.Model/Updates/PackageInfo.cs b/MediaBrowser.Model/Updates/PackageInfo.cs index b8afd8981..ff4ed26d3 100644 --- a/MediaBrowser.Model/Updates/PackageInfo.cs +++ b/MediaBrowser.Model/Updates/PackageInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Updates { diff --git a/MediaBrowser.Model/Updates/PackageVersionInfo.cs b/MediaBrowser.Model/Updates/PackageVersionInfo.cs index 7126ae7a5..570fb3e02 100644 --- a/MediaBrowser.Model/Updates/PackageVersionInfo.cs +++ b/MediaBrowser.Model/Updates/PackageVersionInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Serialization; namespace MediaBrowser.Model.Updates diff --git a/MediaBrowser.Model/Users/ForgotPasswordAction.cs b/MediaBrowser.Model/Users/ForgotPasswordAction.cs index f75b1d74b..b5240cb34 100644 --- a/MediaBrowser.Model/Users/ForgotPasswordAction.cs +++ b/MediaBrowser.Model/Users/ForgotPasswordAction.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Users { public enum ForgotPasswordAction diff --git a/MediaBrowser.Model/Users/ForgotPasswordResult.cs b/MediaBrowser.Model/Users/ForgotPasswordResult.cs index 7dbb1e96b..2f9b4cf48 100644 --- a/MediaBrowser.Model/Users/ForgotPasswordResult.cs +++ b/MediaBrowser.Model/Users/ForgotPasswordResult.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Users { diff --git a/MediaBrowser.Model/Users/PinRedeemResult.cs b/MediaBrowser.Model/Users/PinRedeemResult.cs index 6a01bf2d4..0edf2f422 100644 --- a/MediaBrowser.Model/Users/PinRedeemResult.cs +++ b/MediaBrowser.Model/Users/PinRedeemResult.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Users { public class PinRedeemResult diff --git a/MediaBrowser.Model/Users/UserAction.cs b/MediaBrowser.Model/Users/UserAction.cs index 5f401b9f0..48b5bbef1 100644 --- a/MediaBrowser.Model/Users/UserAction.cs +++ b/MediaBrowser.Model/Users/UserAction.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace MediaBrowser.Model.Users { diff --git a/MediaBrowser.Model/Users/UserActionType.cs b/MediaBrowser.Model/Users/UserActionType.cs index 493de6272..110b8904e 100644 --- a/MediaBrowser.Model/Users/UserActionType.cs +++ b/MediaBrowser.Model/Users/UserActionType.cs @@ -1,4 +1,4 @@ - + namespace MediaBrowser.Model.Users { public enum UserActionType diff --git a/MediaBrowser.Model/Users/UserPolicy.cs b/MediaBrowser.Model/Users/UserPolicy.cs index 55eeb78bf..23805b79f 100644 --- a/MediaBrowser.Model/Users/UserPolicy.cs +++ b/MediaBrowser.Model/Users/UserPolicy.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Configuration; namespace MediaBrowser.Model.Users diff --git a/MediaBrowser.Model/Xml/IXmlReaderSettingsFactory.cs b/MediaBrowser.Model/Xml/IXmlReaderSettingsFactory.cs index b9628ec3e..b39325958 100644 --- a/MediaBrowser.Model/Xml/IXmlReaderSettingsFactory.cs +++ b/MediaBrowser.Model/Xml/IXmlReaderSettingsFactory.cs @@ -1,4 +1,4 @@ -using System.Xml; +using System.Xml; namespace MediaBrowser.Model.Xml { -- cgit v1.2.3 From 65bd052f3e8682d177520af57db1c8ef5cb33262 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Sun, 13 Jan 2019 21:37:13 +0100 Subject: ReSharper conform to 'var' settings --- BDInfo/BDROM.cs | 42 +- BDInfo/TSCodecDTSHD.cs | 2 +- BDInfo/TSPlaylistFile.cs | 76 +-- BDInfo/TSStream.cs | 12 +- BDInfo/TSStreamBuffer.cs | 2 +- BDInfo/TSStreamClip.cs | 4 +- BDInfo/TSStreamClipFile.cs | 12 +- BDInfo/TSStreamFile.cs | 34 +- DvdLib/Ifo/Dvd.cs | 10 +- DvdLib/Ifo/ProgramChain.cs | 4 +- DvdLib/Ifo/Title.cs | 2 +- Emby.Dlna/Api/DlnaServerService.cs | 2 +- Emby.Dlna/ContentDirectory/ControlHandler.cs | 4 +- Emby.Dlna/Didl/DidlBuilder.cs | 2 +- Emby.Dlna/PlayTo/PlayToController.cs | 2 +- Emby.Dlna/Service/BaseControlHandler.cs | 2 +- Emby.Dlna/Service/ControlErrorHandler.cs | 2 +- Emby.Drawing.Skia/StripCollageBuilder.cs | 4 +- Emby.Drawing/Common/ImageHeader.cs | 4 +- Emby.Drawing/ImageProcessor.cs | 8 +- Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs | 2 +- Emby.Naming/AudioBook/AudioBookFilePathParser.cs | 2 +- Emby.Naming/TV/EpisodePathParser.cs | 2 +- Emby.Naming/Video/VideoResolver.cs | 2 +- .../Activity/ActivityLogEntryPoint.cs | 4 +- .../AppBase/BaseConfigurationManager.cs | 4 +- Emby.Server.Implementations/ApplicationHost.cs | 12 +- .../Configuration/ServerConfigurationManager.cs | 6 +- .../Data/ManagedConnection.cs | 2 +- .../Data/SqliteDisplayPreferencesRepository.cs | 8 +- .../Data/SqliteExtensions.cs | 2 +- .../Data/SqliteItemRepository.cs | 12 +- .../Data/SqliteUserDataRepository.cs | 4 +- .../Data/SqliteUserRepository.cs | 2 +- Emby.Server.Implementations/Data/TypeMapper.cs | 2 +- Emby.Server.Implementations/Dto/DtoService.cs | 4 +- .../EntryPoints/RecordingNotifier.cs | 2 +- .../HttpClientManager/HttpClientManager.cs | 12 +- .../HttpServer/WebSocketConnection.cs | 4 +- Emby.Server.Implementations/IO/IsoManager.cs | 4 +- Emby.Server.Implementations/IO/LibraryMonitor.cs | 2 +- .../IO/ManagedFileSystem.cs | 12 +- .../Library/LibraryManager.cs | 12 +- .../Library/MediaSourceManager.cs | 2 +- .../Library/PathExtensions.cs | 2 +- .../Library/ResolverHelper.cs | 2 +- .../Library/Resolvers/BaseVideoResolver.cs | 2 +- .../Library/Resolvers/TV/SeasonResolver.cs | 2 +- .../Library/Resolvers/TV/SeriesResolver.cs | 4 +- .../Library/SearchEngine.cs | 2 +- .../Library/UserDataManager.cs | 2 +- Emby.Server.Implementations/Library/UserManager.cs | 18 +- .../LiveTv/EmbyTV/EmbyTV.cs | 6 +- .../LiveTv/Listings/SchedulesDirect.cs | 24 +- .../LiveTv/Listings/XmlTvListingsProvider.cs | 4 +- .../LiveTv/LiveTvManager.cs | 10 +- .../LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs | 2 +- .../TunerHosts/HdHomerun/HdHomerunManager.cs | 4 +- .../Net/DisposableManagedObjectBase.cs | 4 +- Emby.Server.Implementations/Net/UdpSocket.cs | 4 +- .../Networking/IPNetwork/BigIntegerExt.cs | 8 +- .../Networking/IPNetwork/IPAddressCollection.cs | 2 +- .../Networking/IPNetwork/IPNetwork.cs | 108 ++--- .../Networking/IPNetwork/IPNetworkCollection.cs | 10 +- .../Networking/NetworkManager.cs | 14 +- .../Playlists/PlaylistManager.cs | 6 +- .../ScheduledTasks/ScheduledTaskWorker.cs | 12 +- .../ScheduledTasks/TaskManager.cs | 2 +- .../Security/EncryptionManager.cs | 4 +- .../Serialization/JsonSerializer.cs | 24 +- .../Services/ServiceController.cs | 2 +- .../Session/SessionManager.cs | 22 +- .../Sorting/AlphanumComparator.cs | 4 +- Emby.Server.Implementations/TV/TVSeriesManager.cs | 4 +- .../TextEncoding/NLangDetect/Detector.cs | 12 +- .../TextEncoding/NLangDetect/DetectorFactory.cs | 2 +- .../TextEncoding/NLangDetect/GenProfile.cs | 6 +- .../TextEncoding/NLangDetect/LanguageDetector.cs | 2 +- .../TextEncoding/NLangDetect/Utils/LangProfile.cs | 6 +- .../TextEncoding/NLangDetect/Utils/Messages.cs | 2 +- .../TextEncoding/TextEncodingDetect.cs | 2 +- .../Core/CharDistributionAnalyser.cs | 4 +- .../UniversalDetector/Core/CharsetProber.cs | 4 +- .../UniversalDetector/Core/EscCharsetProber.cs | 2 +- .../UniversalDetector/Core/MBCSGroupProber.cs | 2 +- .../UniversalDetector/Core/SBCSGroupProber.cs | 4 +- .../UniversalDetector/Core/UniversalDetector.cs | 2 +- .../Updates/InstallationManager.cs | 4 +- Emby.XmlTv/Emby.XmlTv/Classes/XmlTvReader.cs | 2 +- Jellyfin.Server/Program.cs | 10 +- Jellyfin.Server/SocketSharp/RequestMono.cs | 14 +- MediaBrowser.Api/Library/LibraryService.cs | 2 +- MediaBrowser.Api/Playback/BaseStreamingService.cs | 2 +- .../ScheduledTasks/ScheduledTaskService.cs | 8 +- MediaBrowser.Api/SimilarItemsHelper.cs | 2 +- MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs | 6 +- MediaBrowser.Common/Net/IHttpClient.cs | 2 +- MediaBrowser.Common/Plugins/BasePlugin.cs | 2 +- MediaBrowser.Common/Plugins/IPlugin.cs | 2 +- .../Updates/IInstallationManager.cs | 4 +- .../Entities/AggregateFolder.cs | 4 +- MediaBrowser.Controller/Entities/BaseItem.cs | 26 +- MediaBrowser.Controller/Entities/Folder.cs | 4 +- MediaBrowser.Controller/Entities/Person.cs | 4 +- MediaBrowser.Controller/Entities/TV/Series.cs | 4 +- MediaBrowser.Controller/Entities/User.cs | 2 +- MediaBrowser.Controller/Entities/UserItemData.cs | 2 +- MediaBrowser.Controller/IO/FileData.cs | 2 +- MediaBrowser.Controller/Library/ILibraryManager.cs | 2 +- MediaBrowser.Controller/Library/IUserManager.cs | 18 +- MediaBrowser.Controller/Library/ItemResolveArgs.cs | 10 +- .../Net/IWebSocketConnection.cs | 4 +- MediaBrowser.Controller/Session/ISessionManager.cs | 4 +- MediaBrowser.Controller/Sorting/SortExtensions.cs | 4 +- .../Images/LocalImageProvider.cs | 2 +- .../Parsers/BaseItemXmlParser.cs | 14 +- MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs | 2 +- .../Encoder/EncoderValidator.cs | 2 +- MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs | 2 +- .../Probing/ProbeResultNormalizer.cs | 14 +- MediaBrowser.MediaEncoding/Subtitles/AssParser.cs | 2 +- MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs | 2 +- MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs | 2 +- .../Subtitles/SubtitleEncoder.cs | 6 +- MediaBrowser.MediaEncoding/Subtitles/VttWriter.cs | 4 +- MediaBrowser.Model/Configuration/LibraryOptions.cs | 4 +- MediaBrowser.Model/Dlna/ConditionProcessor.cs | 2 +- MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs | 16 +- MediaBrowser.Model/Dlna/DeviceProfile.cs | 8 +- .../Dlna/MediaFormatProfileResolver.cs | 2 +- MediaBrowser.Model/Dlna/StreamBuilder.cs | 114 ++--- MediaBrowser.Model/Dlna/StreamInfo.cs | 62 +-- MediaBrowser.Model/Dto/MediaSourceInfo.cs | 16 +- MediaBrowser.Model/Entities/MediaStream.cs | 6 +- MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs | 2 +- MediaBrowser.Model/Net/MimeTypes.cs | 4 +- .../Notifications/NotificationOptions.cs | 10 +- MediaBrowser.Model/Services/HttpUtility.cs | 6 +- MediaBrowser.Model/System/IEnvironmentInfo.cs | 2 +- .../Manager/GenericPriorityQueue.cs | 12 +- MediaBrowser.Providers/Manager/ImageSaver.cs | 10 +- MediaBrowser.Providers/Manager/MetadataService.cs | 2 +- .../Manager/SimplePriorityQueue.cs | 8 +- MediaBrowser.Providers/Movies/MovieDbProvider.cs | 4 +- .../Music/ArtistMetadataService.cs | 2 +- MediaBrowser.Providers/Omdb/OmdbImageProvider.cs | 2 +- MediaBrowser.Providers/Omdb/OmdbProvider.cs | 10 +- .../People/MovieDbPersonProvider.cs | 4 +- .../Playlists/PlaylistItemsProvider.cs | 2 +- .../Subtitles/SubtitleManager.cs | 4 +- .../TV/TheTVDB/TvdbSeriesProvider.cs | 2 +- MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs | 6 +- MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs | 2 +- Mono.Nat/Mapping.cs | 2 +- Mono.Nat/Pmp/PmpNatDevice.cs | 2 +- Mono.Nat/Pmp/PmpSearcher.cs | 20 +- .../Messages/Requests/CreatePortMappingMessage.cs | 6 +- Mono.Nat/Upnp/Messages/UpnpMessage.cs | 2 +- Mono.Nat/Upnp/Searchers/UpnpSearcher.cs | 2 +- Mono.Nat/Upnp/UpnpNatDevice.cs | 14 +- OpenSubtitlesHandler/Console/OSHConsole.cs | 2 +- OpenSubtitlesHandler/MovieHasher.cs | 2 +- OpenSubtitlesHandler/OpenSubtitles.cs | 526 ++++++++++----------- OpenSubtitlesHandler/Utilities.cs | 6 +- .../XML-RPC/Values/XmlRpcValueArray.cs | 8 +- OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs | 36 +- RSSDP/DeviceAvailableEventArgs.cs | 28 +- RSSDP/DeviceEventArgs.cs | 2 +- RSSDP/DeviceUnavailableEventArgs.cs | 6 +- RSSDP/DiscoveredSsdpDevice.cs | 2 +- RSSDP/DisposableManagedObjectBase.cs | 4 +- RSSDP/HttpParserBase.cs | 12 +- RSSDP/HttpRequestParser.cs | 14 +- RSSDP/HttpResponseParser.cs | 14 +- RSSDP/ISsdpDeviceLocator.cs | 2 +- RSSDP/ISsdpDevicePublisher.cs | 4 +- RSSDP/SsdpCommunicationsServer.cs | 12 +- RSSDP/SsdpDevice.cs | 6 +- RSSDP/SsdpDeviceLocator.cs | 4 +- RSSDP/SsdpDevicePublisher.cs | 10 +- SocketHttpListener/Ext.cs | 2 +- SocketHttpListener/MessageEventArgs.cs | 4 +- SocketHttpListener/Net/ChunkStream.cs | 8 +- SocketHttpListener/Net/ChunkedInputStream.cs | 14 +- SocketHttpListener/Net/HttpConnection.cs | 8 +- SocketHttpListener/Net/HttpEndPointListener.cs | 26 +- SocketHttpListener/Net/HttpEndPointManager.cs | 10 +- .../Net/HttpListenerContext.Managed.cs | 2 +- .../Net/HttpListenerRequest.Managed.cs | 4 +- SocketHttpListener/Net/HttpListenerRequest.cs | 10 +- .../Net/HttpListenerRequestUriBuilder.cs | 10 +- .../Net/HttpListenerResponse.Managed.cs | 4 +- .../Net/HttpRequestStream.Managed.cs | 4 +- .../Net/HttpResponseStream.Managed.cs | 12 +- SocketHttpListener/Net/ListenerPrefix.cs | 2 +- SocketHttpListener/Net/WebHeaderCollection.cs | 4 +- .../Net/WebSockets/HttpWebSocket.Managed.cs | 10 +- SocketHttpListener/Net/WebSockets/HttpWebSocket.cs | 2 +- .../Net/WebSockets/WebSocketValidate.cs | 2 +- 199 files changed, 1063 insertions(+), 1063 deletions(-) (limited to 'MediaBrowser.Model/System') diff --git a/BDInfo/BDROM.cs b/BDInfo/BDROM.cs index 0b2eefcc0..2fadf3b77 100644 --- a/BDInfo/BDROM.cs +++ b/BDInfo/BDROM.cs @@ -164,7 +164,7 @@ namespace BDInfo if (DirectoryPLAYLIST != null) { FileSystemMetadata[] files = GetFiles(DirectoryPLAYLIST.FullName, ".mpls").ToArray(); - foreach (FileSystemMetadata file in files) + foreach (var file in files) { PlaylistFiles.Add( file.Name.ToUpper(), new TSPlaylistFile(this, file, _fileSystem, textEncoding)); @@ -174,7 +174,7 @@ namespace BDInfo if (DirectorySTREAM != null) { FileSystemMetadata[] files = GetFiles(DirectorySTREAM.FullName, ".m2ts").ToArray(); - foreach (FileSystemMetadata file in files) + foreach (var file in files) { StreamFiles.Add( file.Name.ToUpper(), new TSStreamFile(file, _fileSystem)); @@ -184,7 +184,7 @@ namespace BDInfo if (DirectoryCLIPINF != null) { FileSystemMetadata[] files = GetFiles(DirectoryCLIPINF.FullName, ".clpi").ToArray(); - foreach (FileSystemMetadata file in files) + foreach (var file in files) { StreamClipFiles.Add( file.Name.ToUpper(), new TSStreamClipFile(file, _fileSystem, textEncoding)); @@ -194,7 +194,7 @@ namespace BDInfo if (DirectorySSIF != null) { FileSystemMetadata[] files = GetFiles(DirectorySSIF.FullName, ".ssif").ToArray(); - foreach (FileSystemMetadata file in files) + foreach (var file in files) { InterleavedFiles.Add( file.Name.ToUpper(), new TSInterleavedFile(file)); @@ -214,8 +214,8 @@ namespace BDInfo public void Scan() { - List errorStreamClipFiles = new List(); - foreach (TSStreamClipFile streamClipFile in StreamClipFiles.Values) + var errorStreamClipFiles = new List(); + foreach (var streamClipFile in StreamClipFiles.Values) { try { @@ -239,7 +239,7 @@ namespace BDInfo } } - foreach (TSStreamFile streamFile in StreamFiles.Values) + foreach (var streamFile in StreamFiles.Values) { string ssifName = Path.GetFileNameWithoutExtension(streamFile.Name) + ".SSIF"; if (InterleavedFiles.ContainsKey(ssifName)) @@ -252,8 +252,8 @@ namespace BDInfo StreamFiles.Values.CopyTo(streamFiles, 0); Array.Sort(streamFiles, CompareStreamFiles); - List errorPlaylistFiles = new List(); - foreach (TSPlaylistFile playlistFile in PlaylistFiles.Values) + var errorPlaylistFiles = new List(); + foreach (var playlistFile in PlaylistFiles.Values) { try { @@ -277,15 +277,15 @@ namespace BDInfo } } - List errorStreamFiles = new List(); - foreach (TSStreamFile streamFile in streamFiles) + var errorStreamFiles = new List(); + foreach (var streamFile in streamFiles) { try { - List playlists = new List(); - foreach (TSPlaylistFile playlist in PlaylistFiles.Values) + var playlists = new List(); + foreach (var playlist in PlaylistFiles.Values) { - foreach (TSStreamClip streamClip in playlist.StreamClips) + foreach (var streamClip in playlist.StreamClips) { if (streamClip.Name == streamFile.Name) { @@ -314,12 +314,12 @@ namespace BDInfo } } - foreach (TSPlaylistFile playlistFile in PlaylistFiles.Values) + foreach (var playlistFile in PlaylistFiles.Values) { playlistFile.Initialize(); if (!Is50Hz) { - foreach (TSVideoStream videoStream in playlistFile.VideoStreams) + foreach (var videoStream in playlistFile.VideoStreams) { if (videoStream.FrameRate == TSFrameRate.FRAMERATE_25 || videoStream.FrameRate == TSFrameRate.FRAMERATE_50) @@ -339,7 +339,7 @@ namespace BDInfo throw new ArgumentNullException(nameof(path)); } - FileSystemMetadata dir = _fileSystem.GetDirectoryInfo(path); + var dir = _fileSystem.GetDirectoryInfo(path); while (dir != null) { @@ -369,7 +369,7 @@ namespace BDInfo if (dir != null) { FileSystemMetadata[] children = _fileSystem.GetDirectories(dir.FullName).ToArray(); - foreach (FileSystemMetadata child in children) + foreach (var child in children) { if (string.Equals(child.Name, name, StringComparison.OrdinalIgnoreCase)) { @@ -378,7 +378,7 @@ namespace BDInfo } if (searchDepth > 0) { - foreach (FileSystemMetadata child in children) + foreach (var child in children) { GetDirectory( name, child, searchDepth - 1); @@ -395,7 +395,7 @@ namespace BDInfo //if (!ExcludeDirs.Contains(directoryInfo.Name.ToUpper())) // TODO: Keep? { FileSystemMetadata[] pathFiles = _fileSystem.GetFiles(directoryInfo.FullName).ToArray(); - foreach (FileSystemMetadata pathFile in pathFiles) + foreach (var pathFile in pathFiles) { if (pathFile.Extension.ToUpper() == ".SSIF") { @@ -405,7 +405,7 @@ namespace BDInfo } FileSystemMetadata[] pathChildren = _fileSystem.GetDirectories(directoryInfo.FullName).ToArray(); - foreach (FileSystemMetadata pathChild in pathChildren) + foreach (var pathChild in pathChildren) { size += GetDirectorySize(pathChild); } diff --git a/BDInfo/TSCodecDTSHD.cs b/BDInfo/TSCodecDTSHD.cs index f2315d4c5..57a136d2d 100644 --- a/BDInfo/TSCodecDTSHD.cs +++ b/BDInfo/TSCodecDTSHD.cs @@ -211,7 +211,7 @@ namespace BDInfo // TODO if (stream.CoreStream != null) { - TSAudioStream coreStream = (TSAudioStream)stream.CoreStream; + var coreStream = (TSAudioStream)stream.CoreStream; if (coreStream.AudioMode == TSAudioMode.Extended && stream.ChannelCount == 5) { diff --git a/BDInfo/TSPlaylistFile.cs b/BDInfo/TSPlaylistFile.cs index aa1f175d3..ba0b37f00 100644 --- a/BDInfo/TSPlaylistFile.cs +++ b/BDInfo/TSPlaylistFile.cs @@ -85,9 +85,9 @@ namespace BDInfo _fileSystem = fileSystem; _textEncoding = textEncoding; IsCustom = true; - foreach (TSStreamClip clip in clips) + foreach (var clip in clips) { - TSStreamClip newClip = new TSStreamClip( + var newClip = new TSStreamClip( clip.StreamFile, clip.StreamClipFile); newClip.Name = clip.Name; @@ -123,7 +123,7 @@ namespace BDInfo get { ulong size = 0; - foreach (TSStreamClip clip in StreamClips) + foreach (var clip in StreamClips) { size += clip.InterleavedFileSize; } @@ -135,7 +135,7 @@ namespace BDInfo get { ulong size = 0; - foreach (TSStreamClip clip in StreamClips) + foreach (var clip in StreamClips) { size += clip.FileSize; } @@ -147,7 +147,7 @@ namespace BDInfo get { double length = 0; - foreach (TSStreamClip clip in StreamClips) + foreach (var clip in StreamClips) { if (clip.AngleIndex == 0) { @@ -163,7 +163,7 @@ namespace BDInfo get { double length = 0; - foreach (TSStreamClip clip in StreamClips) + foreach (var clip in StreamClips) { length += clip.Length; } @@ -176,7 +176,7 @@ namespace BDInfo get { ulong size = 0; - foreach (TSStreamClip clip in StreamClips) + foreach (var clip in StreamClips) { if (clip.AngleIndex == 0) { @@ -192,7 +192,7 @@ namespace BDInfo get { ulong size = 0; - foreach (TSStreamClip clip in StreamClips) + foreach (var clip in StreamClips) { size += clip.PacketSize; } @@ -263,7 +263,7 @@ namespace BDInfo int itemCount = ReadInt16(data, ref pos); int subitemCount = ReadInt16(data, ref pos); - List chapterClips = new List(); + var chapterClips = new List(); for (int itemIndex = 0; itemIndex < itemCount; itemIndex++) { int itemStart = pos; @@ -310,7 +310,7 @@ namespace BDInfo if (outTime < 0) outTime &= 0x7FFFFFFF; double timeOut = (double)outTime / 45000; - TSStreamClip streamClip = new TSStreamClip( + var streamClip = new TSStreamClip( streamFile, streamClipFile); streamClip.Name = streamFileName; //TODO @@ -361,7 +361,7 @@ namespace BDInfo FileInfo.Name, angleClipFileName)); } - TSStreamClip angleClip = + var angleClip = new TSStreamClip(angleFile, angleClipFile); angleClip.AngleIndex = angle + 1; angleClip.TimeIn = streamClip.TimeIn; @@ -394,33 +394,33 @@ namespace BDInfo for (int i = 0; i < streamCountVideo; i++) { - TSStream stream = CreatePlaylistStream(data, ref pos); + var stream = CreatePlaylistStream(data, ref pos); if (stream != null) PlaylistStreams[stream.PID] = stream; } for (int i = 0; i < streamCountAudio; i++) { - TSStream stream = CreatePlaylistStream(data, ref pos); + var stream = CreatePlaylistStream(data, ref pos); if (stream != null) PlaylistStreams[stream.PID] = stream; } for (int i = 0; i < streamCountPG; i++) { - TSStream stream = CreatePlaylistStream(data, ref pos); + var stream = CreatePlaylistStream(data, ref pos); if (stream != null) PlaylistStreams[stream.PID] = stream; } for (int i = 0; i < streamCountIG; i++) { - TSStream stream = CreatePlaylistStream(data, ref pos); + var stream = CreatePlaylistStream(data, ref pos); if (stream != null) PlaylistStreams[stream.PID] = stream; } for (int i = 0; i < streamCountSecondaryAudio; i++) { - TSStream stream = CreatePlaylistStream(data, ref pos); + var stream = CreatePlaylistStream(data, ref pos); if (stream != null) PlaylistStreams[stream.PID] = stream; pos += 2; } for (int i = 0; i < streamCountSecondaryVideo; i++) { - TSStream stream = CreatePlaylistStream(data, ref pos); + var stream = CreatePlaylistStream(data, ref pos); if (stream != null) PlaylistStreams[stream.PID] = stream; pos += 6; } @@ -458,7 +458,7 @@ namespace BDInfo ((long)data[pos + 6] << 8) + ((long)data[pos + 7]); - TSStreamClip streamClip = chapterClips[streamFileIndex]; + var streamClip = chapterClips[streamFileIndex]; double chapterSeconds = (double)chapterTime / 45000; @@ -498,8 +498,8 @@ namespace BDInfo { LoadStreamClips(); - Dictionary> clipTimes = new Dictionary>(); - foreach (TSStreamClip clip in StreamClips) + var clipTimes = new Dictionary>(); + foreach (var clip in StreamClips) { if (clip.AngleIndex == 0) { @@ -567,7 +567,7 @@ namespace BDInfo int streamLength = data[pos++]; int streamPos = pos; - TSStreamType streamType = (TSStreamType)data[pos++]; + var streamType = (TSStreamType)data[pos++]; switch (streamType) { case TSStreamType.MVC_VIDEO: @@ -579,11 +579,11 @@ namespace BDInfo case TSStreamType.MPEG2_VIDEO: case TSStreamType.VC1_VIDEO: - TSVideoFormat videoFormat = (TSVideoFormat) + var videoFormat = (TSVideoFormat) (data[pos] >> 4); - TSFrameRate frameRate = (TSFrameRate) + var frameRate = (TSFrameRate) (data[pos] & 0xF); - TSAspectRatio aspectRatio = (TSAspectRatio) + var aspectRatio = (TSAspectRatio) (data[pos + 1] >> 4); stream = new TSVideoStream(); @@ -617,9 +617,9 @@ namespace BDInfo int audioFormat = ReadByte(data, ref pos); - TSChannelLayout channelLayout = (TSChannelLayout) + var channelLayout = (TSChannelLayout) (audioFormat >> 4); - TSSampleRate sampleRate = (TSSampleRate) + var sampleRate = (TSSampleRate) (audioFormat & 0xF); string audioLanguage = ReadString(data, 3, ref pos); @@ -712,7 +712,7 @@ namespace BDInfo { referenceClip = StreamClips[0]; } - foreach (TSStreamClip clip in StreamClips) + foreach (var clip in StreamClips) { if (clip.StreamClipFile.Streams.Count > referenceClip.StreamClipFile.Streams.Count) { @@ -738,12 +738,12 @@ namespace BDInfo } } - foreach (TSStream clipStream + foreach (var clipStream in referenceClip.StreamClipFile.Streams.Values) { if (!Streams.ContainsKey(clipStream.PID)) { - TSStream stream = clipStream.Clone(); + var stream = clipStream.Clone(); Streams[clipStream.PID] = stream; if (!IsCustom && !PlaylistStreams.ContainsKey(stream.PID)) @@ -779,7 +779,7 @@ namespace BDInfo referenceClip.StreamFile.Streams.ContainsKey(4114) && !Streams.ContainsKey(4114)) { - TSStream stream = referenceClip.StreamFile.Streams[4114].Clone(); + var stream = referenceClip.StreamFile.Streams[4114].Clone(); Streams[4114] = stream; if (stream.IsVideoStream) { @@ -787,12 +787,12 @@ namespace BDInfo } } - foreach (TSStream clipStream + foreach (var clipStream in referenceClip.StreamFile.Streams.Values) { if (Streams.ContainsKey(clipStream.PID)) { - TSStream stream = Streams[clipStream.PID]; + var stream = Streams[clipStream.PID]; if (stream.StreamType != clipStream.StreamType) continue; @@ -811,8 +811,8 @@ namespace BDInfo else if (stream.IsAudioStream && clipStream.IsAudioStream) { - TSAudioStream audioStream = (TSAudioStream)stream; - TSAudioStream clipAudioStream = (TSAudioStream)clipStream; + var audioStream = (TSAudioStream)stream; + var clipAudioStream = (TSAudioStream)clipStream; if (clipAudioStream.ChannelCount > audioStream.ChannelCount) { @@ -863,7 +863,7 @@ namespace BDInfo SortedStreams.Add(stream); for (int i = 0; i < AngleCount; i++) { - TSStream angleStream = stream.Clone(); + var angleStream = stream.Clone(); angleStream.AngleIndex = i + 1; AngleStreams[i][angleStream.PID] = angleStream; SortedStreams.Add(angleStream); @@ -900,7 +900,7 @@ namespace BDInfo public void ClearBitrates() { - foreach (TSStreamClip clip in StreamClips) + foreach (var clip in StreamClips) { clip.PayloadBytes = 0; clip.PacketCount = 0; @@ -908,7 +908,7 @@ namespace BDInfo if (clip.StreamFile != null) { - foreach (TSStream stream in clip.StreamFile.Streams.Values) + foreach (var stream in clip.StreamFile.Streams.Values) { stream.PayloadBytes = 0; stream.PacketCount = 0; @@ -923,7 +923,7 @@ namespace BDInfo } } - foreach (TSStream stream in SortedStreams) + foreach (var stream in SortedStreams) { stream.PayloadBytes = 0; stream.PacketCount = 0; diff --git a/BDInfo/TSStream.cs b/BDInfo/TSStream.cs index fad3f1acb..3c30a8597 100644 --- a/BDInfo/TSStream.cs +++ b/BDInfo/TSStream.cs @@ -109,7 +109,7 @@ namespace BDInfo public TSDescriptor Clone() { - TSDescriptor descriptor = + var descriptor = new TSDescriptor(Name, (byte)Value.Length); Value.CopyTo(descriptor.Value, 0); return descriptor; @@ -404,7 +404,7 @@ namespace BDInfo if (Descriptors != null) { stream.Descriptors = new List(); - foreach (TSDescriptor descriptor in Descriptors) + foreach (var descriptor in Descriptors) { stream.Descriptors.Add(descriptor.Clone()); } @@ -553,7 +553,7 @@ namespace BDInfo public override TSStream Clone() { - TSVideoStream stream = new TSVideoStream(); + var stream = new TSVideoStream(); CopyTo(stream); stream.VideoFormat = _VideoFormat; @@ -727,7 +727,7 @@ namespace BDInfo public override TSStream Clone() { - TSAudioStream stream = new TSAudioStream(); + var stream = new TSAudioStream(); CopyTo(stream); stream.SampleRate = SampleRate; @@ -756,7 +756,7 @@ namespace BDInfo public override TSStream Clone() { - TSGraphicsStream stream = new TSGraphicsStream(); + var stream = new TSGraphicsStream(); CopyTo(stream); return stream; } @@ -772,7 +772,7 @@ namespace BDInfo public override TSStream Clone() { - TSTextStream stream = new TSTextStream(); + var stream = new TSTextStream(); CopyTo(stream); return stream; } diff --git a/BDInfo/TSStreamBuffer.cs b/BDInfo/TSStreamBuffer.cs index 17025c2e3..30bd1a3f4 100644 --- a/BDInfo/TSStreamBuffer.cs +++ b/BDInfo/TSStreamBuffer.cs @@ -111,7 +111,7 @@ namespace BDInfo data += (Stream.ReadByte() << shift); shift -= 8; } - BitVector32 vector = new BitVector32(data); + var vector = new BitVector32(data); int value = 0; for (int i = SkipBits; i < SkipBits + bits; i++) diff --git a/BDInfo/TSStreamClip.cs b/BDInfo/TSStreamClip.cs index 20f795e53..295eeb6b1 100644 --- a/BDInfo/TSStreamClip.cs +++ b/BDInfo/TSStreamClip.cs @@ -90,11 +90,11 @@ namespace BDInfo public bool IsCompatible(TSStreamClip clip) { - foreach (TSStream stream1 in StreamFile.Streams.Values) + foreach (var stream1 in StreamFile.Streams.Values) { if (clip.StreamFile.Streams.ContainsKey(stream1.PID)) { - TSStream stream2 = clip.StreamFile.Streams[stream1.PID]; + var stream2 = clip.StreamFile.Streams[stream1.PID]; if (stream1.StreamType != stream2.StreamType) { return false; diff --git a/BDInfo/TSStreamClipFile.cs b/BDInfo/TSStreamClipFile.cs index 6aed7e4d4..be6299e1a 100644 --- a/BDInfo/TSStreamClipFile.cs +++ b/BDInfo/TSStreamClipFile.cs @@ -114,7 +114,7 @@ namespace BDInfo streamOffset += 2; - TSStreamType streamType = (TSStreamType) + var streamType = (TSStreamType) clipData[streamOffset + 1]; switch (streamType) { @@ -127,11 +127,11 @@ namespace BDInfo case TSStreamType.MPEG2_VIDEO: case TSStreamType.VC1_VIDEO: { - TSVideoFormat videoFormat = (TSVideoFormat) + var videoFormat = (TSVideoFormat) (clipData[streamOffset + 2] >> 4); - TSFrameRate frameRate = (TSFrameRate) + var frameRate = (TSFrameRate) (clipData[streamOffset + 2] & 0xF); - TSAspectRatio aspectRatio = (TSAspectRatio) + var aspectRatio = (TSAspectRatio) (clipData[streamOffset + 3] >> 4); stream = new TSVideoStream(); @@ -168,9 +168,9 @@ namespace BDInfo string languageCode = _textEncoding.GetASCIIEncoding().GetString(languageBytes, 0, languageBytes.Length); - TSChannelLayout channelLayout = (TSChannelLayout) + var channelLayout = (TSChannelLayout) (clipData[streamOffset + 2] >> 4); - TSSampleRate sampleRate = (TSSampleRate) + var sampleRate = (TSSampleRate) (clipData[streamOffset + 2] & 0xF); stream = new TSAudioStream(); diff --git a/BDInfo/TSStreamFile.cs b/BDInfo/TSStreamFile.cs index 29d105da0..ecf6609e2 100644 --- a/BDInfo/TSStreamFile.cs +++ b/BDInfo/TSStreamFile.cs @@ -283,7 +283,7 @@ namespace BDInfo bool isAVC = false; bool isMVC = false; - foreach (TSStream finishedStream in Streams.Values) + foreach (var finishedStream in Streams.Values) { if (!finishedStream.IsInitialized) { @@ -327,10 +327,10 @@ namespace BDInfo UpdateStreamBitrate(PID, PTSPID, PTS, PTSDiff); } - foreach (TSPlaylistFile playlist in Playlists) + foreach (var playlist in Playlists) { double packetSeconds = 0; - foreach (TSStreamClip clip in playlist.StreamClips) + foreach (var clip in playlist.StreamClips) { if (clip.AngleIndex == 0) { @@ -339,7 +339,7 @@ namespace BDInfo } if (packetSeconds > 0) { - foreach (TSStream playlistStream in playlist.SortedStreams) + foreach (var playlistStream in playlist.SortedStreams) { if (playlistStream.IsVBR) { @@ -366,14 +366,14 @@ namespace BDInfo { if (Playlists == null) return; - TSStreamState streamState = StreamStates[PID]; + var streamState = StreamStates[PID]; double streamTime = (double)PTS / 90000; double streamInterval = (double)PTSDiff / 90000; double streamOffset = streamTime + streamInterval; - foreach (TSPlaylistFile playlist in Playlists) + foreach (var playlist in Playlists) { - foreach (TSStreamClip clip in playlist.StreamClips) + foreach (var clip in playlist.StreamClips) { if (clip.Name != this.Name) continue; @@ -390,7 +390,7 @@ namespace BDInfo clip.PacketSeconds = streamOffset - clip.TimeIn; } - Dictionary playlistStreams = playlist.Streams; + var playlistStreams = playlist.Streams; if (clip.AngleIndex > 0 && clip.AngleIndex < playlist.AngleStreams.Count + 1) { @@ -398,7 +398,7 @@ namespace BDInfo } if (playlistStreams.ContainsKey(PID)) { - TSStream stream = playlistStreams[PID]; + var stream = playlistStreams[PID]; stream.PayloadBytes += streamState.WindowBytes; stream.PacketCount += streamState.WindowPackets; @@ -425,13 +425,13 @@ namespace BDInfo if (Streams.ContainsKey(PID)) { - TSStream stream = Streams[PID]; + var stream = Streams[PID]; stream.PayloadBytes += streamState.WindowBytes; stream.PacketCount += streamState.WindowPackets; if (stream.IsVideoStream) { - TSStreamDiagnostics diag = new TSStreamDiagnostics(); + var diag = new TSStreamDiagnostics(); diag.Marker = (double)PTS / 90000; diag.Interval = (double)PTSDiff / 90000; diag.Bytes = streamState.WindowBytes; @@ -482,7 +482,7 @@ namespace BDInfo StreamStates.Clear(); StreamDiagnostics.Clear(); - TSPacketParser parser = + var parser = new TSPacketParser(); long fileLength = (uint)fileStream.Length; @@ -839,7 +839,7 @@ namespace BDInfo if (!Streams.ContainsKey(streamPID)) { - List streamDescriptors = + var streamDescriptors = new List(); /* @@ -996,7 +996,7 @@ namespace BDInfo { --parser.PMTProgramDescriptorLength; - TSDescriptor descriptor = parser.PMTProgramDescriptors[ + var descriptor = parser.PMTProgramDescriptors[ parser.PMTProgramDescriptors.Count - 1]; int valueIndex = @@ -1026,8 +1026,8 @@ namespace BDInfo parser.StreamState != null && parser.TransportScramblingControl == 0) { - TSStream stream = parser.Stream; - TSStreamState streamState = parser.StreamState; + var stream = parser.Stream; + var streamState = parser.StreamState; streamState.Parse = (streamState.Parse << 8) + buffer[i]; @@ -1461,7 +1461,7 @@ namespace BDInfo ulong PTSLast = 0; ulong PTSDiff = 0; - foreach (TSStream stream in Streams.Values) + foreach (var stream in Streams.Values) { if (!stream.IsVideoStream) continue; diff --git a/DvdLib/Ifo/Dvd.cs b/DvdLib/Ifo/Dvd.cs index a8f2ab970..71ba2d5e4 100644 --- a/DvdLib/Ifo/Dvd.cs +++ b/DvdLib/Ifo/Dvd.cs @@ -45,7 +45,7 @@ namespace DvdLib.Ifo { using (var vmgFs = _fileSystem.GetFileStream(vmgPath.FullName, FileOpenMode.Open, FileAccessMode.Read, FileShareMode.Read)) { - using (BigEndianBinaryReader vmgRead = new BigEndianBinaryReader(vmgFs)) + using (var vmgRead = new BigEndianBinaryReader(vmgFs)) { vmgFs.Seek(0x3E, SeekOrigin.Begin); _titleSetCount = vmgRead.ReadUInt16(); @@ -71,7 +71,7 @@ namespace DvdLib.Ifo read.BaseStream.Seek(6, SeekOrigin.Current); for (uint titleNum = 1; titleNum <= _titleCount; titleNum++) { - Title t = new Title(titleNum); + var t = new Title(titleNum); t.ParseTT_SRPT(read); Titles.Add(t); } @@ -98,7 +98,7 @@ namespace DvdLib.Ifo using (var vtsFs = _fileSystem.GetFileStream(vtsPath, FileOpenMode.Open, FileAccessMode.Read, FileShareMode.Read)) { - using (BigEndianBinaryReader vtsRead = new BigEndianBinaryReader(vtsFs)) + using (var vtsRead = new BigEndianBinaryReader(vtsFs)) { // Read VTS_PTT_SRPT vtsFs.Seek(0xC8, SeekOrigin.Begin); @@ -119,7 +119,7 @@ namespace DvdLib.Ifo { uint chapNum = 1; vtsFs.Seek(baseAddr + offsets[titleNum], SeekOrigin.Begin); - Title t = Titles.FirstOrDefault(vtst => vtst.IsVTSTitle(vtsNum, titleNum + 1)); + var t = Titles.FirstOrDefault(vtst => vtst.IsVTSTitle(vtsNum, titleNum + 1)); if (t == null) continue; do @@ -149,7 +149,7 @@ namespace DvdLib.Ifo vtsFs.Seek(3, SeekOrigin.Current); uint vtsPgcOffset = vtsRead.ReadUInt32(); - Title t = Titles.FirstOrDefault(vtst => vtst.IsVTSTitle(vtsNum, titleNum)); + var t = Titles.FirstOrDefault(vtst => vtst.IsVTSTitle(vtsNum, titleNum)); if (t != null) t.AddPgc(vtsRead, startByte + vtsPgcOffset, entryPgc, pgcNum); } } diff --git a/DvdLib/Ifo/ProgramChain.cs b/DvdLib/Ifo/ProgramChain.cs index 0cdaad4cc..80889738f 100644 --- a/DvdLib/Ifo/ProgramChain.cs +++ b/DvdLib/Ifo/ProgramChain.cs @@ -87,7 +87,7 @@ namespace DvdLib.Ifo br.BaseStream.Seek(startPos + _cellPositionOffset, SeekOrigin.Begin); for (int cellNum = 0; cellNum < _cellCount; cellNum++) { - Cell c = new Cell(); + var c = new Cell(); c.ParsePosition(br); Cells.Add(c); } @@ -99,7 +99,7 @@ namespace DvdLib.Ifo } br.BaseStream.Seek(startPos + _programMapOffset, SeekOrigin.Begin); - List cellNumbers = new List(); + var cellNumbers = new List(); for (int progNum = 0; progNum < _programCount; progNum++) cellNumbers.Add(br.ReadByte() - 1); for (int i = 0; i < cellNumbers.Count; i++) diff --git a/DvdLib/Ifo/Title.cs b/DvdLib/Ifo/Title.cs index 85be9daf1..335e92992 100644 --- a/DvdLib/Ifo/Title.cs +++ b/DvdLib/Ifo/Title.cs @@ -50,7 +50,7 @@ namespace DvdLib.Ifo long curPos = br.BaseStream.Position; br.BaseStream.Seek(startByte, SeekOrigin.Begin); - ProgramChain pgc = new ProgramChain(pgcNum); + var pgc = new ProgramChain(pgcNum); pgc.ParseHeader(br); ProgramChains.Add(pgc); if (entryPgc) EntryProgramChain = pgc; diff --git a/Emby.Dlna/Api/DlnaServerService.cs b/Emby.Dlna/Api/DlnaServerService.cs index f4009ee93..01c9fe50f 100644 --- a/Emby.Dlna/Api/DlnaServerService.cs +++ b/Emby.Dlna/Api/DlnaServerService.cs @@ -241,7 +241,7 @@ namespace Emby.Dlna.Api var cacheLength = TimeSpan.FromDays(365); var cacheKey = Request.RawUrl.GetMD5(); - return _resultFactory.GetStaticResult(Request, cacheKey, null, cacheLength, contentType, () => Task.FromResult(_dlnaManager.GetIcon(request.Filename).Stream)); + return _resultFactory.GetStaticResult(Request, cacheKey, null, cacheLength, contentType, () => Task.FromResult(_dlnaManager.GetIcon(request.Filename).Stream)); } public object Subscribe(ProcessContentDirectoryEventRequest request) diff --git a/Emby.Dlna/ContentDirectory/ControlHandler.cs b/Emby.Dlna/ContentDirectory/ControlHandler.cs index 61ee45f74..5a8fd4068 100644 --- a/Emby.Dlna/ContentDirectory/ControlHandler.cs +++ b/Emby.Dlna/ContentDirectory/ControlHandler.cs @@ -242,7 +242,7 @@ namespace Emby.Dlna.ContentDirectory var dlnaOptions = _config.GetDlnaConfiguration(); - using (XmlWriter writer = XmlWriter.Create(builder, settings)) + using (var writer = XmlWriter.Create(builder, settings)) { //writer.WriteStartDocument(); @@ -358,7 +358,7 @@ namespace Emby.Dlna.ContentDirectory int totalCount = 0; int provided = 0; - using (XmlWriter writer = XmlWriter.Create(builder, settings)) + using (var writer = XmlWriter.Create(builder, settings)) { //writer.WriteStartDocument(); diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.cs index 6ecb9f3b4..d2f635e56 100644 --- a/Emby.Dlna/Didl/DidlBuilder.cs +++ b/Emby.Dlna/Didl/DidlBuilder.cs @@ -78,7 +78,7 @@ namespace Emby.Dlna.Didl using (StringWriter builder = new StringWriterWithEncoding(Encoding.UTF8)) { - using (XmlWriter writer = XmlWriter.Create(builder, settings)) + using (var writer = XmlWriter.Create(builder, settings)) { //writer.WriteStartDocument(); diff --git a/Emby.Dlna/PlayTo/PlayToController.cs b/Emby.Dlna/PlayTo/PlayToController.cs index 95be02ff4..85a37d7f8 100644 --- a/Emby.Dlna/PlayTo/PlayToController.cs +++ b/Emby.Dlna/PlayTo/PlayToController.cs @@ -854,7 +854,7 @@ namespace Emby.Dlna.PlayTo if (index == -1) return request; var query = url.Substring(index + 1); - QueryParamCollection values = MyHttpUtility.ParseQueryString(query); + var values = MyHttpUtility.ParseQueryString(query); request.DeviceProfileId = values.Get("DeviceProfileId"); request.DeviceId = values.Get("DeviceId"); diff --git a/Emby.Dlna/Service/BaseControlHandler.cs b/Emby.Dlna/Service/BaseControlHandler.cs index d65f8972b..5f78674b8 100644 --- a/Emby.Dlna/Service/BaseControlHandler.cs +++ b/Emby.Dlna/Service/BaseControlHandler.cs @@ -85,7 +85,7 @@ namespace Emby.Dlna.Service StringWriter builder = new StringWriterWithEncoding(Encoding.UTF8); - using (XmlWriter writer = XmlWriter.Create(builder, settings)) + using (var writer = XmlWriter.Create(builder, settings)) { writer.WriteStartDocument(true); diff --git a/Emby.Dlna/Service/ControlErrorHandler.cs b/Emby.Dlna/Service/ControlErrorHandler.cs index e9c2c67b9..d5eb4a887 100644 --- a/Emby.Dlna/Service/ControlErrorHandler.cs +++ b/Emby.Dlna/Service/ControlErrorHandler.cs @@ -20,7 +20,7 @@ namespace Emby.Dlna.Service StringWriter builder = new StringWriterWithEncoding(Encoding.UTF8); - using (XmlWriter writer = XmlWriter.Create(builder, settings)) + using (var writer = XmlWriter.Create(builder, settings)) { writer.WriteStartDocument(true); diff --git a/Emby.Drawing.Skia/StripCollageBuilder.cs b/Emby.Drawing.Skia/StripCollageBuilder.cs index 36d00669a..8d984de11 100644 --- a/Emby.Drawing.Skia/StripCollageBuilder.cs +++ b/Emby.Drawing.Skia/StripCollageBuilder.cs @@ -164,7 +164,7 @@ namespace Emby.Drawing.Skia private SKBitmap GetNextValidImage(string[] paths, int currentIndex, out int newIndex) { - Dictionary imagesTested = new Dictionary(); + var imagesTested = new Dictionary(); SKBitmap bitmap = null; while (imagesTested.Count < paths.Length) @@ -174,7 +174,7 @@ namespace Emby.Drawing.Skia currentIndex = 0; } - bitmap = SkiaEncoder.Decode(paths[currentIndex], false, _fileSystem, null, out SKEncodedOrigin origin); + bitmap = SkiaEncoder.Decode(paths[currentIndex], false, _fileSystem, null, out var origin); imagesTested[currentIndex] = 0; diff --git a/Emby.Drawing/Common/ImageHeader.cs b/Emby.Drawing/Common/ImageHeader.cs index 6b604bc15..3939a1664 100644 --- a/Emby.Drawing/Common/ImageHeader.cs +++ b/Emby.Drawing/Common/ImageHeader.cs @@ -73,7 +73,7 @@ namespace Emby.Drawing.Common /// /// The binary reader. /// Size. - /// binaryReader + /// binaryReader /// The image was of an unrecognized format. private static ImageSize GetDimensions(BinaryReader binaryReader) { @@ -200,7 +200,7 @@ namespace Emby.Drawing.Common /// /// The binary reader. /// Size. - /// + /// private static ImageSize DecodeJfif(BinaryReader binaryReader) { // A JPEG image consists of a sequence of segments, diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs index 57a6eb148..a88c720a7 100644 --- a/Emby.Drawing/ImageProcessor.cs +++ b/Emby.Drawing/ImageProcessor.cs @@ -491,7 +491,7 @@ namespace Emby.Drawing /// The item. /// The image. /// Guid. - /// item + /// item public string GetImageCacheTag(BaseItem item, ItemImageInfo image) { var supportedEnhancers = GetSupportedEnhancers(item, image.Type); @@ -523,7 +523,7 @@ namespace Emby.Drawing /// The image. /// The image enhancers. /// Guid. - /// item + /// item public string GetImageCacheTag(BaseItem item, ItemImageInfo image, IImageEnhancer[] imageEnhancers) { var originalImagePath = image.Path; @@ -744,7 +744,7 @@ namespace Emby.Drawing /// Name of the unique. /// The file extension. /// System.String. - /// + /// /// path /// or /// uniqueName @@ -778,7 +778,7 @@ namespace Emby.Drawing /// The path. /// The filename. /// System.String. - /// + /// /// path /// or /// filename diff --git a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs index ac486f167..4729b5b5a 100644 --- a/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs +++ b/Emby.IsoMounting/IsoMounter/LinuxIsoManager.cs @@ -141,7 +141,7 @@ namespace IsoMounter public Task Mount(string isoPath, CancellationToken cancellationToken) { - if (MountISO(isoPath, out LinuxMount mountedISO)) + if (MountISO(isoPath, out var mountedISO)) { return Task.FromResult(mountedISO); } diff --git a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs index 8c52fd9b9..b386593e7 100644 --- a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs +++ b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs @@ -16,7 +16,7 @@ namespace Emby.Naming.AudioBook public AudioBookFilePathParserResult Parse(string path, bool IsDirectory) { - AudioBookFilePathParserResult result = Parse(path); + var result = Parse(path); return !result.Success ? new AudioBookFilePathParserResult() : result; } diff --git a/Emby.Naming/TV/EpisodePathParser.cs b/Emby.Naming/TV/EpisodePathParser.cs index 76c59d38e..260cb505c 100644 --- a/Emby.Naming/TV/EpisodePathParser.cs +++ b/Emby.Naming/TV/EpisodePathParser.cs @@ -133,7 +133,7 @@ namespace Emby.Naming.TV result.EpisodeNumber = num; } - Group endingNumberGroup = match.Groups["endingepnumber"]; + var endingNumberGroup = match.Groups["endingepnumber"]; if (endingNumberGroup.Success) { // Will only set EndingEpsiodeNumber if the captured number is not followed by additional numbers diff --git a/Emby.Naming/Video/VideoResolver.cs b/Emby.Naming/Video/VideoResolver.cs index de8f96965..9bd0cb3df 100644 --- a/Emby.Naming/Video/VideoResolver.cs +++ b/Emby.Naming/Video/VideoResolver.cs @@ -40,7 +40,7 @@ namespace Emby.Naming.Video /// The path. /// if set to true [is folder]. /// VideoFileInfo. - /// path + /// path public VideoFileInfo Resolve(string path, bool IsDirectory, bool parseName = true) { if (string.IsNullOrEmpty(path)) diff --git a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs index 90a0671f2..a8e8f815a 100644 --- a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs +++ b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs @@ -527,7 +527,7 @@ namespace Emby.Server.Implementations.Activity const int DaysInMonth = 30; // Get each non-zero value from TimeSpan component - List values = new List(); + var values = new List(); // Number of years int days = span.Days; @@ -558,7 +558,7 @@ namespace Emby.Server.Implementations.Activity values.Add(CreateValueString(span.Seconds, "second")); // Combine values into string - StringBuilder builder = new StringBuilder(); + var builder = new StringBuilder(); for (int i = 0; i < values.Count; i++) { if (builder.Length > 0) diff --git a/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs b/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs index 6f393a03c..59c7c655f 100644 --- a/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs +++ b/Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs @@ -151,7 +151,7 @@ namespace Emby.Server.Implementations.AppBase /// Replaces the configuration. /// /// The new configuration. - /// newConfiguration + /// newConfiguration public virtual void ReplaceConfiguration(BaseApplicationConfiguration newConfiguration) { if (newConfiguration == null) @@ -188,7 +188,7 @@ namespace Emby.Server.Implementations.AppBase /// Replaces the cache path. /// /// The new configuration. - /// + /// private void ValidateCachePath(BaseApplicationConfiguration newConfig) { var newPath = newConfig.CachePath; diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 61b88345f..5f3508441 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -822,7 +822,7 @@ namespace Emby.Server.Implementations RegisterSingleInstance(ServerConfigurationManager); IAssemblyInfo assemblyInfo = new AssemblyInfo(); - RegisterSingleInstance(assemblyInfo); + RegisterSingleInstance(assemblyInfo); LocalizationManager = new LocalizationManager(ServerConfigurationManager, FileSystemManager, JsonSerializer, LoggerFactory.CreateLogger("LocalizationManager"), assemblyInfo, new TextLocalizer()); StringExtensions.LocalizationManager = LocalizationManager; @@ -920,7 +920,7 @@ namespace Emby.Server.Implementations RegisterSingleInstance(CollectionManager); PlaylistManager = new PlaylistManager(LibraryManager, FileSystemManager, LibraryMonitor, LoggerFactory.CreateLogger("PlaylistManager"), UserManager, ProviderManager); - RegisterSingleInstance(PlaylistManager); + RegisterSingleInstance(PlaylistManager); LiveTvManager = new LiveTvManager(this, HttpClient, ServerConfigurationManager, Logger, ItemRepository, ImageProcessor, UserDataManager, DtoService, UserManager, LibraryManager, TaskManager, LocalizationManager, JsonSerializer, ProviderManager, FileSystemManager, SecurityManager, () => ChannelManager); RegisterSingleInstance(LiveTvManager); @@ -938,7 +938,7 @@ namespace Emby.Server.Implementations RegisterMediaEncoder(assemblyInfo); - EncodingManager = new Emby.Server.Implementations.MediaEncoder.EncodingManager(FileSystemManager, Logger, MediaEncoder, ChapterManager, LibraryManager); + EncodingManager = new MediaEncoder.EncodingManager(FileSystemManager, Logger, MediaEncoder, ChapterManager, LibraryManager); RegisterSingleInstance(EncodingManager); var activityLogRepo = GetActivityLogRepository(); @@ -950,7 +950,7 @@ namespace Emby.Server.Implementations RegisterSingleInstance(new SessionContext(UserManager, authContext, SessionManager)); AuthService = new AuthService(UserManager, authContext, ServerConfigurationManager, SessionManager, NetworkManager); - RegisterSingleInstance(AuthService); + RegisterSingleInstance(AuthService); SubtitleEncoder = new MediaBrowser.MediaEncoding.Subtitles.SubtitleEncoder(LibraryManager, LoggerFactory.CreateLogger("SubtitleEncoder"), ApplicationPaths, FileSystemManager, MediaEncoder, JsonSerializer, HttpClient, MediaSourceManager, ProcessFactory, TextEncoding); RegisterSingleInstance(SubtitleEncoder); @@ -1023,7 +1023,7 @@ namespace Emby.Server.Implementations { var arr = str.ToCharArray(); - arr = Array.FindAll(arr, (c => (char.IsLetterOrDigit(c) + arr = Array.FindAll(arr, (c => (char.IsLetterOrDigit(c) || char.IsWhiteSpace(c)))); var result = new string(arr); @@ -1057,7 +1057,7 @@ namespace Emby.Server.Implementations // Don't use an empty string password var password = string.IsNullOrWhiteSpace(info.Password) ? null : info.Password; - X509Certificate2 localCert = new X509Certificate2(certificateLocation, password); + var localCert = new X509Certificate2(certificateLocation, password); //localCert.PrivateKey = PrivateKey.CreateFromFile(pvk_file).RSA; if (!localCert.HasPrivateKey) { diff --git a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs index 55f40db8f..ab2e1c9a9 100644 --- a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs +++ b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs @@ -119,7 +119,7 @@ namespace Emby.Server.Implementations.Configuration /// Replaces the configuration. /// /// The new configuration. - /// + /// public override void ReplaceConfiguration(BaseApplicationConfiguration newConfiguration) { var newConfig = (ServerConfiguration)newConfiguration; @@ -137,7 +137,7 @@ namespace Emby.Server.Implementations.Configuration /// Validates the SSL certificate. /// /// The new configuration. - /// + /// private void ValidateSslCertificate(BaseApplicationConfiguration newConfig) { var serverConfig = (ServerConfiguration)newConfig; @@ -159,7 +159,7 @@ namespace Emby.Server.Implementations.Configuration /// Validates the metadata path. /// /// The new configuration. - /// + /// private void ValidateMetadataPath(ServerConfiguration newConfig) { var newPath = newConfig.MetadataPath; diff --git a/Emby.Server.Implementations/Data/ManagedConnection.cs b/Emby.Server.Implementations/Data/ManagedConnection.cs index 2f3dfc4d1..b8f1e581a 100644 --- a/Emby.Server.Implementations/Data/ManagedConnection.cs +++ b/Emby.Server.Implementations/Data/ManagedConnection.cs @@ -47,7 +47,7 @@ namespace Emby.Server.Implementations.Data public T RunInTransaction(Func action, TransactionMode mode) { - return db.RunInTransaction(action, mode); + return db.RunInTransaction(action, mode); } public IEnumerable> Query(string sql) diff --git a/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs b/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs index 822573f20..9ed2b49e5 100644 --- a/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs @@ -83,7 +83,7 @@ namespace Emby.Server.Implementations.Data /// The client. /// The cancellation token. /// Task. - /// item + /// item public void SaveDisplayPreferences(DisplayPreferences displayPreferences, Guid userId, string client, CancellationToken cancellationToken) { if (displayPreferences == null) @@ -131,7 +131,7 @@ namespace Emby.Server.Implementations.Data /// The user id. /// The cancellation token. /// Task. - /// item + /// item public void SaveAllDisplayPreferences(IEnumerable displayPreferences, Guid userId, CancellationToken cancellationToken) { if (displayPreferences == null) @@ -163,7 +163,7 @@ namespace Emby.Server.Implementations.Data /// The user id. /// The client. /// Task{DisplayPreferences}. - /// item + /// item public DisplayPreferences GetDisplayPreferences(string displayPreferencesId, Guid userId, string client) { if (string.IsNullOrEmpty(displayPreferencesId)) @@ -202,7 +202,7 @@ namespace Emby.Server.Implementations.Data /// /// The user id. /// Task{DisplayPreferences}. - /// item + /// item public IEnumerable GetAllDisplayPreferences(Guid userId) { var list = new List(); diff --git a/Emby.Server.Implementations/Data/SqliteExtensions.cs b/Emby.Server.Implementations/Data/SqliteExtensions.cs index 5ff61d37c..edb73d2a1 100644 --- a/Emby.Server.Implementations/Data/SqliteExtensions.cs +++ b/Emby.Server.Implementations/Data/SqliteExtensions.cs @@ -128,7 +128,7 @@ namespace Emby.Server.Implementations.Data /// Serializes to bytes. /// /// System.Byte[][]. - /// obj + /// obj public static byte[] SerializeToBytes(this IJsonSerializer json, object obj) { if (obj == null) diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index 325bad501..7e7271371 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -531,7 +531,7 @@ namespace Emby.Server.Implementations.Data /// /// The item. /// The cancellation token. - /// item + /// item public void SaveItem(BaseItem item, CancellationToken cancellationToken) { if (item == null) @@ -574,7 +574,7 @@ namespace Emby.Server.Implementations.Data /// /// The items. /// The cancellation token. - /// + /// /// items /// or /// cancellationToken @@ -1198,8 +1198,8 @@ namespace Emby.Server.Implementations.Data /// /// The id. /// BaseItem. - /// id - /// + /// id + /// public BaseItem RetrieveItem(Guid id) { if (id.Equals(Guid.Empty)) @@ -1945,7 +1945,7 @@ namespace Emby.Server.Implementations.Data /// /// The item. /// IEnumerable{ChapterInfo}. - /// id + /// id public List GetChapters(BaseItem item) { CheckDisposed(); @@ -1977,7 +1977,7 @@ namespace Emby.Server.Implementations.Data /// The item. /// The index. /// ChapterInfo. - /// id + /// id public ChapterInfo GetChapter(BaseItem item, int index) { CheckDisposed(); diff --git a/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs b/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs index 469927f63..48ff9ded8 100644 --- a/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs @@ -110,7 +110,7 @@ namespace Emby.Server.Implementations.Data private List GetAllUserIdsWithUserData(IDatabaseConnection db) { - List list = new List(); + var list = new List(); using (var statement = PrepareStatement(db, "select DISTINCT UserId from UserData where UserId not null")) { @@ -271,7 +271,7 @@ namespace Emby.Server.Implementations.Data /// The user id. /// The key. /// Task{UserItemData}. - /// + /// /// userId /// or /// key diff --git a/Emby.Server.Implementations/Data/SqliteUserRepository.cs b/Emby.Server.Implementations/Data/SqliteUserRepository.cs index bf00f2e65..ad37a0275 100644 --- a/Emby.Server.Implementations/Data/SqliteUserRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteUserRepository.cs @@ -200,7 +200,7 @@ namespace Emby.Server.Implementations.Data /// /// The user. /// Task. - /// user + /// user public void DeleteUser(User user) { if (user == null) diff --git a/Emby.Server.Implementations/Data/TypeMapper.cs b/Emby.Server.Implementations/Data/TypeMapper.cs index fa6a29aa3..37c952e88 100644 --- a/Emby.Server.Implementations/Data/TypeMapper.cs +++ b/Emby.Server.Implementations/Data/TypeMapper.cs @@ -27,7 +27,7 @@ namespace Emby.Server.Implementations.Data /// /// Name of the type. /// Type. - /// + /// public Type GetType(string typeName) { if (string.IsNullOrEmpty(typeName)) diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index 68bff962f..8877fc051 100644 --- a/Emby.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -71,7 +71,7 @@ namespace Emby.Server.Implementations.Dto /// The user. /// The owner. /// Task{DtoBaseItem}. - /// item + /// item public BaseItemDto GetBaseItemDto(BaseItem item, ItemFields[] fields, User user = null, BaseItem owner = null) { var options = new DtoOptions @@ -463,7 +463,7 @@ namespace Emby.Server.Implementations.Dto /// /// The item. /// System.String. - /// item + /// item public string GetDtoId(BaseItem item) { return item.Id.ToString("N"); diff --git a/Emby.Server.Implementations/EntryPoints/RecordingNotifier.cs b/Emby.Server.Implementations/EntryPoints/RecordingNotifier.cs index c7bd03960..e37ea96a1 100644 --- a/Emby.Server.Implementations/EntryPoints/RecordingNotifier.cs +++ b/Emby.Server.Implementations/EntryPoints/RecordingNotifier.cs @@ -58,7 +58,7 @@ namespace Emby.Server.Implementations.EntryPoints try { - await _sessionManager.SendMessageToUserSessions(users, name, info, CancellationToken.None); + await _sessionManager.SendMessageToUserSessions(users, name, info, CancellationToken.None); } catch (ObjectDisposedException) { diff --git a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs index 72828f0d4..255e1476f 100644 --- a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs +++ b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs @@ -82,7 +82,7 @@ namespace Emby.Server.Implementations.HttpClientManager /// The host. /// if set to true [enable HTTP compression]. /// HttpClient. - /// host + /// host private HttpClientInfo GetHttpClient(string host, bool enableHttpCompression) { if (string.IsNullOrEmpty(host)) @@ -125,7 +125,7 @@ namespace Emby.Server.Implementations.HttpClientManager { string url = options.Url; - Uri uriAddress = new Uri(url); + var uriAddress = new Uri(url); string userInfo = uriAddress.UserInfo; if (!string.IsNullOrWhiteSpace(userInfo)) { @@ -133,7 +133,7 @@ namespace Emby.Server.Implementations.HttpClientManager url = url.Replace(userInfo + "@", string.Empty); } - WebRequest request = CreateWebRequest(url); + var request = CreateWebRequest(url); if (request is HttpWebRequest httpWebRequest) { @@ -188,7 +188,7 @@ namespace Emby.Server.Implementations.HttpClientManager private static CredentialCache GetCredential(string url, string username, string password) { //ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3; - CredentialCache credentialCache = new CredentialCache(); + var credentialCache = new CredentialCache(); credentialCache.Add(new Uri(url), "Basic", new NetworkCredential(username, password)); return credentialCache; } @@ -807,7 +807,7 @@ namespace Emby.Server.Implementations.HttpClientManager { var taskCompletion = new TaskCompletionSource(); - Task asyncTask = Task.Factory.FromAsync(request.BeginGetResponse, request.EndGetResponse, null); + var asyncTask = Task.Factory.FromAsync(request.BeginGetResponse, request.EndGetResponse, null); ThreadPool.RegisterWaitForSingleObject((asyncTask as IAsyncResult).AsyncWaitHandle, TimeoutCallback, request, timeout, true); var callback = new TaskCallback { taskCompletion = taskCompletion }; @@ -823,7 +823,7 @@ namespace Emby.Server.Implementations.HttpClientManager { if (timedOut && state != null) { - WebRequest request = (WebRequest)state; + var request = (WebRequest)state; request.Abort(); } } diff --git a/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs b/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs index 1ad92a83f..b9146d007 100644 --- a/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs +++ b/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs @@ -77,7 +77,7 @@ namespace Emby.Server.Implementations.HttpServer /// The remote end point. /// The json serializer. /// The logger. - /// socket + /// socket public WebSocketConnection(IWebSocket socket, string remoteEndPoint, IJsonSerializer jsonSerializer, ILogger logger, ITextEncoding textEncoding) { if (socket == null) @@ -215,7 +215,7 @@ namespace Emby.Server.Implementations.HttpServer /// The message. /// The cancellation token. /// Task. - /// message + /// message public Task SendAsync(WebSocketMessage message, CancellationToken cancellationToken) { if (message == null) diff --git a/Emby.Server.Implementations/IO/IsoManager.cs b/Emby.Server.Implementations/IO/IsoManager.cs index e82335d65..f0a15097c 100644 --- a/Emby.Server.Implementations/IO/IsoManager.cs +++ b/Emby.Server.Implementations/IO/IsoManager.cs @@ -23,8 +23,8 @@ namespace Emby.Server.Implementations.IO /// The iso path. /// The cancellation token. /// IsoMount. - /// isoPath - /// + /// isoPath + /// public Task Mount(string isoPath, CancellationToken cancellationToken) { if (string.IsNullOrEmpty(isoPath)) diff --git a/Emby.Server.Implementations/IO/LibraryMonitor.cs b/Emby.Server.Implementations/IO/LibraryMonitor.cs index 39ed1afa7..2c92e6543 100644 --- a/Emby.Server.Implementations/IO/LibraryMonitor.cs +++ b/Emby.Server.Implementations/IO/LibraryMonitor.cs @@ -263,7 +263,7 @@ namespace Emby.Server.Implementations.IO /// The LST. /// The path. /// true if [contains parent folder] [the specified LST]; otherwise, false. - /// path + /// path private static bool ContainsParentFolder(IEnumerable lst, string path) { if (string.IsNullOrEmpty(path)) diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.cs index 7574eb0e9..ae1470190 100644 --- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs +++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs @@ -101,7 +101,7 @@ namespace Emby.Server.Implementations.IO /// /// The filename. /// true if the specified filename is shortcut; otherwise, false. - /// filename + /// filename public virtual bool IsShortcut(string filename) { if (string.IsNullOrEmpty(filename)) @@ -118,7 +118,7 @@ namespace Emby.Server.Implementations.IO /// /// The filename. /// System.String. - /// filename + /// filename public virtual string ResolveShortcut(string filename) { if (string.IsNullOrEmpty(filename)) @@ -185,7 +185,7 @@ namespace Emby.Server.Implementations.IO /// /// The shortcut path. /// The target. - /// + /// /// shortcutPath /// or /// target @@ -344,7 +344,7 @@ namespace Emby.Server.Implementations.IO /// /// The filename. /// System.String. - /// filename + /// filename public string GetValidFilename(string filename) { var builder = new StringBuilder(filename); @@ -526,7 +526,7 @@ namespace Emby.Server.Implementations.IO } else { - FileAttributes attributes = File.GetAttributes(path); + var attributes = File.GetAttributes(path); attributes = RemoveAttribute(attributes, FileAttributes.Hidden); File.SetAttributes(path, attributes); } @@ -550,7 +550,7 @@ namespace Emby.Server.Implementations.IO } else { - FileAttributes attributes = File.GetAttributes(path); + var attributes = File.GetAttributes(path); attributes = RemoveAttribute(attributes, FileAttributes.ReadOnly); File.SetAttributes(path, attributes); } diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 9c2759f13..0d25cbc92 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -711,7 +711,7 @@ namespace Emby.Server.Implementations.Library /// Creates the root media folder /// /// AggregateFolder. - /// Cannot create the root folder until plugins have loaded + /// Cannot create the root folder until plugins have loaded public AggregateFolder CreateRootFolder() { var rootFolderPath = ConfigurationManager.ApplicationPaths.RootFolderPath; @@ -905,7 +905,7 @@ namespace Emby.Server.Implementations.Library /// /// The value. /// Task{Year}. - /// + /// public Year GetYear(int value) { if (value <= 0) @@ -1233,7 +1233,7 @@ namespace Emby.Server.Implementations.Library /// /// The id. /// BaseItem. - /// id + /// id public BaseItem GetItemById(Guid id) { if (id.Equals(Guid.Empty)) @@ -2075,7 +2075,7 @@ namespace Emby.Server.Implementations.Library public string GetConfiguredContentType(BaseItem item, bool inheritConfiguredPath) { - ICollectionFolder collectionFolder = item as ICollectionFolder; + var collectionFolder = item as ICollectionFolder; if (collectionFolder != null) { return collectionFolder.CollectionType; @@ -2417,11 +2417,11 @@ namespace Emby.Server.Implementations.Library var episodeInfo = episode.IsFileProtocol ? resolver.Resolve(episode.Path, isFolder, null, null, isAbsoluteNaming) : - new Emby.Naming.TV.EpisodeInfo(); + new Naming.TV.EpisodeInfo(); if (episodeInfo == null) { - episodeInfo = new Emby.Naming.TV.EpisodeInfo(); + episodeInfo = new Naming.TV.EpisodeInfo(); } var changed = false; diff --git a/Emby.Server.Implementations/Library/MediaSourceManager.cs b/Emby.Server.Implementations/Library/MediaSourceManager.cs index dcda95742..fb0f33a2f 100644 --- a/Emby.Server.Implementations/Library/MediaSourceManager.cs +++ b/Emby.Server.Implementations/Library/MediaSourceManager.cs @@ -127,7 +127,7 @@ namespace Emby.Server.Implementations.Library if (allowMediaProbe && mediaSources[0].Type != MediaSourceType.Placeholder && !mediaSources[0].MediaStreams.Any(i => i.Type == MediaStreamType.Audio || i.Type == MediaStreamType.Video)) { - await item.RefreshMetadata(new MediaBrowser.Controller.Providers.MetadataRefreshOptions(new DirectoryService(_logger, _fileSystem)) + await item.RefreshMetadata(new MetadataRefreshOptions(new DirectoryService(_logger, _fileSystem)) { EnableRemoteContentProbe = true, MetadataRefreshMode = MediaBrowser.Controller.Providers.MetadataRefreshMode.FullRefresh diff --git a/Emby.Server.Implementations/Library/PathExtensions.cs b/Emby.Server.Implementations/Library/PathExtensions.cs index 6a3adda5a..d3a81f622 100644 --- a/Emby.Server.Implementations/Library/PathExtensions.cs +++ b/Emby.Server.Implementations/Library/PathExtensions.cs @@ -11,7 +11,7 @@ namespace Emby.Server.Implementations.Library /// The STR. /// The attrib. /// System.String. - /// attrib + /// attrib public static string GetAttributeValue(this string str, string attrib) { if (string.IsNullOrEmpty(str)) diff --git a/Emby.Server.Implementations/Library/ResolverHelper.cs b/Emby.Server.Implementations/Library/ResolverHelper.cs index 7484fc743..96d1bff92 100644 --- a/Emby.Server.Implementations/Library/ResolverHelper.cs +++ b/Emby.Server.Implementations/Library/ResolverHelper.cs @@ -21,7 +21,7 @@ namespace Emby.Server.Implementations.Library /// The file system. /// The library manager. /// The directory service. - /// Item must have a path + /// Item must have a path public static void SetInitialItemValues(BaseItem item, Folder parent, IFileSystem fileSystem, ILibraryManager libraryManager, IDirectoryService directoryService) { // This version of the below method has no ItemResolveArgs, so we have to require the path already being set diff --git a/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs b/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs index bd5132c4b..d992f8d03 100644 --- a/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs @@ -49,7 +49,7 @@ namespace Emby.Server.Implementations.Library.Resolvers var namingOptions = ((LibraryManager)LibraryManager).GetNamingOptions(); // If the path is a file check for a matching extensions - var parser = new Emby.Naming.Video.VideoResolver(namingOptions); + var parser = new VideoResolver(namingOptions); if (args.IsDirectory) { diff --git a/Emby.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs b/Emby.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs index a806c842f..ce1386e91 100644 --- a/Emby.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs @@ -63,7 +63,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV if (!season.IndexNumber.HasValue || !seasonParserResult.IsSeasonFolder) { - var resolver = new Emby.Naming.TV.EpisodeResolver(namingOptions); + var resolver = new Naming.TV.EpisodeResolver(namingOptions); var folderName = System.IO.Path.GetFileName(path); var testPath = "\\\\test\\" + folderName; diff --git a/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs b/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs index 3bd5b78a5..16b5a2d3a 100644 --- a/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/TV/SeriesResolver.cs @@ -151,7 +151,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV var namingOptions = ((LibraryManager)libraryManager).GetNamingOptions(); - var episodeResolver = new Emby.Naming.TV.EpisodeResolver(namingOptions); + var episodeResolver = new Naming.TV.EpisodeResolver(namingOptions); bool? isNamed = null; bool? isOptimistic = null; @@ -179,7 +179,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV /// /// The path. /// true if [is place holder] [the specified path]; otherwise, false. - /// path + /// path private static bool IsVideoPlaceHolder(string path) { if (string.IsNullOrEmpty(path)) diff --git a/Emby.Server.Implementations/Library/SearchEngine.cs b/Emby.Server.Implementations/Library/SearchEngine.cs index 06f76311c..71638b197 100644 --- a/Emby.Server.Implementations/Library/SearchEngine.cs +++ b/Emby.Server.Implementations/Library/SearchEngine.cs @@ -76,7 +76,7 @@ namespace Emby.Server.Implementations.Library /// The query. /// The user. /// IEnumerable{SearchHintResult}. - /// searchTerm + /// searchTerm private List GetSearchHints(SearchQuery query, User user) { var searchTerm = query.SearchTerm; diff --git a/Emby.Server.Implementations/Library/UserDataManager.cs b/Emby.Server.Implementations/Library/UserDataManager.cs index f2921e354..dfa1edaff 100644 --- a/Emby.Server.Implementations/Library/UserDataManager.cs +++ b/Emby.Server.Implementations/Library/UserDataManager.cs @@ -193,7 +193,7 @@ namespace Emby.Server.Implementations.Library /// /// The data. /// DtoUserItemData. - /// + /// private UserItemDataDto GetUserItemDataDto(UserItemData data) { if (data == null) diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs index e4c9f775e..f06c71386 100644 --- a/Emby.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -158,7 +158,7 @@ namespace Emby.Server.Implementations.Library /// /// The id. /// User. - /// + /// public User GetUserById(Guid id) { if (id.Equals(Guid.Empty)) @@ -619,8 +619,8 @@ namespace Emby.Server.Implementations.Library /// The user. /// The new name. /// Task. - /// user - /// + /// user + /// public async Task RenameUser(User user, string newName) { if (user == null) @@ -652,8 +652,8 @@ namespace Emby.Server.Implementations.Library /// Updates the user. /// /// The user. - /// user - /// + /// user + /// public void UpdateUser(User user) { if (user == null) @@ -683,8 +683,8 @@ namespace Emby.Server.Implementations.Library /// /// The name. /// User. - /// name - /// + /// name + /// public async Task CreateUser(string name) { if (string.IsNullOrWhiteSpace(name)) @@ -731,8 +731,8 @@ namespace Emby.Server.Implementations.Library /// /// The user. /// Task. - /// user - /// + /// user + /// public async Task DeleteUser(User user) { if (user == null) diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 909e6eaee..0ee53281d 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -478,7 +478,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV private static string GetMappedChannel(string channelId, NameValuePair[] mappings) { - foreach (NameValuePair mapping in mappings) + foreach (var mapping in mappings) { if (StringHelper.EqualsIgnoreCase(mapping.Name, channelId)) { @@ -2002,7 +2002,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV CloseOutput = false }; - using (XmlWriter writer = XmlWriter.Create(stream, settings)) + using (var writer = XmlWriter.Create(stream, settings)) { writer.WriteStartDocument(true); writer.WriteStartElement("tvshow"); @@ -2069,7 +2069,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV var isSeriesEpisode = timer.IsProgramSeries; - using (XmlWriter writer = XmlWriter.Create(stream, settings)) + using (var writer = XmlWriter.Create(stream, settings)) { writer.WriteStartDocument(true); diff --git a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index 25ad02e5d..05d92dfcb 100644 --- a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -42,7 +42,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings private static List GetScheduleRequestDates(DateTime startDateUtc, DateTime endDateUtc) { - List dates = new List(); + var dates = new List(); var start = new List { startDateUtc, startDateUtc.ToLocalTime() }.Min().Date; var end = new List { endDateUtc, endDateUtc.ToLocalTime() }.Max().Date; @@ -104,7 +104,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings httpOptions.RequestHeaders["token"] = token; using (var response = await Post(httpOptions, true, info).ConfigureAwait(false)) - using (StreamReader reader = new StreamReader(response.Content)) + using (var reader = new StreamReader(response.Content)) { var dailySchedules = await _jsonSerializer.DeserializeFromStreamAsync>(response.Content).ConfigureAwait(false); _logger.LogDebug("Found {ScheduleCount} programs on {ChannelID} ScheduleDirect", dailySchedules.Count, channelId); @@ -125,7 +125,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings httpOptions.RequestContent = "[\"" + string.Join("\", \"", programsID) + "\"]"; using (var innerResponse = await Post(httpOptions, true, info).ConfigureAwait(false)) - using (StreamReader innerReader = new StreamReader(innerResponse.Content)) + using (var innerReader = new StreamReader(innerResponse.Content)) { var programDetails = await _jsonSerializer.DeserializeFromStreamAsync>(innerResponse.Content).ConfigureAwait(false); var programDict = programDetails.ToDictionary(p => p.programID, y => y); @@ -136,8 +136,8 @@ namespace Emby.Server.Implementations.LiveTv.Listings var images = await GetImageForPrograms(info, programIdsWithImages, cancellationToken).ConfigureAwait(false); - List programsInfo = new List(); - foreach (ScheduleDirect.Program schedule in dailySchedules.SelectMany(d => d.programs)) + var programsInfo = new List(); + foreach (var schedule in dailySchedules.SelectMany(d => d.programs)) { //_logger.LogDebug("Proccesing Schedule for statio ID " + stationID + // " which corresponds to channel " + channelNumber + " and program id " + @@ -222,9 +222,9 @@ namespace Emby.Server.Implementations.LiveTv.Listings private ProgramInfo GetProgram(string channelId, ScheduleDirect.Program programInfo, ScheduleDirect.ProgramDetails details) { - DateTime startAt = GetDate(programInfo.airDateTime); - DateTime endAt = startAt.AddSeconds(programInfo.duration); - ProgramAudio audioType = ProgramAudio.Stereo; + var startAt = GetDate(programInfo.airDateTime); + var endAt = startAt.AddSeconds(programInfo.duration); + var audioType = ProgramAudio.Stereo; var programId = programInfo.programID ?? string.Empty; @@ -526,15 +526,15 @@ namespace Emby.Server.Implementations.LiveTv.Listings try { using (var httpResponse = await Get(options, false, info).ConfigureAwait(false)) - using (Stream responce = httpResponse.Content) + using (var responce = httpResponse.Content) { var root = await _jsonSerializer.DeserializeFromStreamAsync>(responce).ConfigureAwait(false); if (root != null) { - foreach (ScheduleDirect.Headends headend in root) + foreach (var headend in root) { - foreach (ScheduleDirect.Lineup lineup in headend.lineups) + foreach (var lineup in headend.lineups) { lineups.Add(new NameIdPair { @@ -887,7 +887,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings var allStations = root.stations ?? Enumerable.Empty(); - foreach (ScheduleDirect.Map map in root.map) + foreach (var map in root.map) { var channelNumber = GetChannelNumber(map); diff --git a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs index 2b1ee84a8..0cbfbe0b4 100644 --- a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs +++ b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs @@ -269,7 +269,7 @@ namespace Jellyfin.Server.Implementations.LiveTv.Listings string path = await GetXml(info.Path, CancellationToken.None).ConfigureAwait(false); _logger.LogDebug("Opening XmlTvReader for {path}", path); var reader = new XmlTvReader(path, GetLanguage(info)); - IEnumerable results = reader.GetChannels(); + var results = reader.GetChannels(); // Should this method be async? return results.Select(c => new NameIdPair() { Id = c.Id, Name = c.DisplayName }).ToList(); @@ -281,7 +281,7 @@ namespace Jellyfin.Server.Implementations.LiveTv.Listings string path = await GetXml(info.Path, cancellationToken).ConfigureAwait(false); _logger.LogDebug("Opening XmlTvReader for {path}", path); var reader = new XmlTvReader(path, GetLanguage(info)); - IEnumerable results = reader.GetChannels(); + var results = reader.GetChannels(); // Should this method be async? return results.Select(c => new ChannelInfo diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs index 4ad58c7e4..379927191 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs @@ -242,7 +242,7 @@ namespace Emby.Server.Implementations.LiveTv var channel = (LiveTvChannel)_libraryManager.GetItemById(id); bool isVideo = channel.ChannelType == ChannelType.TV; - ILiveTvService service = GetService(channel); + var service = GetService(channel); _logger.LogInformation("Opening channel stream from {0}, external channel Id: {1}", service.Name, channel.ExternalId); MediaSourceInfo info; @@ -892,7 +892,7 @@ namespace Emby.Server.Implementations.LiveTv var programList = _libraryManager.QueryItems(internalQuery).Items; var totalCount = programList.Length; - IOrderedEnumerable orderedPrograms = programList.Cast().OrderBy(i => i.StartDate.Date); + var orderedPrograms = programList.Cast().OrderBy(i => i.StartDate.Date); if (query.IsAiring ?? false) { @@ -2302,7 +2302,7 @@ namespace Emby.Server.Implementations.LiveTv // ServerConfiguration.SaveConfiguration crashes during xml serialization for AddListingProvider info = _jsonSerializer.DeserializeFromString(_jsonSerializer.SerializeToString(info)); - IListingsProvider provider = _listingProviders.FirstOrDefault(i => string.Equals(info.Type, i.Type, StringComparison.OrdinalIgnoreCase)); + var provider = _listingProviders.FirstOrDefault(i => string.Equals(info.Type, i.Type, StringComparison.OrdinalIgnoreCase)); if (provider == null) { @@ -2313,9 +2313,9 @@ namespace Emby.Server.Implementations.LiveTv await provider.Validate(info, validateLogin, validateListings).ConfigureAwait(false); - LiveTvOptions config = GetConfiguration(); + var config = GetConfiguration(); - List list = config.ListingProviders.ToList(); + var list = config.ListingProviders.ToList(); int index = list.FindIndex(i => string.Equals(i.Id, info.Id, StringComparison.OrdinalIgnoreCase)); if (index == -1 || string.IsNullOrWhiteSpace(info.Id)) diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs index 3714a0321..36f688c43 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs @@ -262,7 +262,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun var name = string.Format("Tuner {0}", i + 1); var currentChannel = "none"; /// @todo Get current channel and map back to Station Id var isAvailable = await manager.CheckTunerAvailability(ipInfo, i, cancellationToken).ConfigureAwait(false); - LiveTvTunerStatus status = isAvailable ? LiveTvTunerStatus.Available : LiveTvTunerStatus.LiveTv; + var status = isAvailable ? LiveTvTunerStatus.Available : LiveTvTunerStatus.LiveTv; tuners.Add(new LiveTvTunerInfo { Name = name, diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs index 1ec5894d0..67eeec21d 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs @@ -173,7 +173,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun continue; var commandList = commands.GetCommands(); - foreach (Tuple command in commandList) + foreach (var command in commandList) { var channelMsg = CreateSetMessage(i, command.Item1, command.Item2, lockKeyValue); await tcpClient.SendToAsync(channelMsg, 0, channelMsg.Length, ipEndPoint, cancellationToken).ConfigureAwait(false); @@ -216,7 +216,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun var commandList = commands.GetCommands(); var receiveBuffer = new byte[8192]; - foreach (Tuple command in commandList) + foreach (var command in commandList) { var channelMsg = CreateSetMessage(_activeTuner, command.Item1, command.Item2, _lockkey); await tcpClient.SendToAsync(channelMsg, 0, channelMsg.Length, new IpEndPointInfo(_remoteIp, HdHomeRunPort), cancellationToken).ConfigureAwait(false); diff --git a/Emby.Server.Implementations/Net/DisposableManagedObjectBase.cs b/Emby.Server.Implementations/Net/DisposableManagedObjectBase.cs index 9d880b0c9..304b44565 100644 --- a/Emby.Server.Implementations/Net/DisposableManagedObjectBase.cs +++ b/Emby.Server.Implementations/Net/DisposableManagedObjectBase.cs @@ -19,10 +19,10 @@ namespace Emby.Server.Implementations.Net //TODO Remove and reimplement using the IsDisposed property directly. /// - /// Throws an if the property is true. + /// Throws an if the property is true. /// /// - /// Thrown if the property is true. + /// Thrown if the property is true. /// protected virtual void ThrowIfDisposed() { diff --git a/Emby.Server.Implementations/Net/UdpSocket.cs b/Emby.Server.Implementations/Net/UdpSocket.cs index cdfdb7210..d48855486 100644 --- a/Emby.Server.Implementations/Net/UdpSocket.cs +++ b/Emby.Server.Implementations/Net/UdpSocket.cs @@ -133,8 +133,8 @@ namespace Emby.Server.Implementations.Net { ThrowIfDisposed(); - IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0); - EndPoint remoteEndPoint = (EndPoint)sender; + var sender = new IPEndPoint(IPAddress.Any, 0); + var remoteEndPoint = (EndPoint)sender; var receivedBytes = _Socket.EndReceiveFrom(result, ref remoteEndPoint); diff --git a/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs b/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs index 1a2ad665b..447cbf403 100644 --- a/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs +++ b/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs @@ -7,7 +7,7 @@ namespace System.Net using System.Text; /// - /// Extension methods to convert + /// Extension methods to convert /// instances to hexadecimal, octal, and binary strings. /// public static class BigIntegerExtensions @@ -17,7 +17,7 @@ namespace System.Net /// /// A . /// - /// A containing a binary + /// A containing a binary /// representation of the supplied . /// public static string ToBinaryString(this BigInteger bigint) @@ -54,7 +54,7 @@ namespace System.Net /// /// A . /// - /// A containing a hexadecimal + /// A containing a hexadecimal /// representation of the supplied . /// public static string ToHexadecimalString(this BigInteger bigint) @@ -67,7 +67,7 @@ namespace System.Net /// /// A . /// - /// A containing an octal + /// A containing an octal /// representation of the supplied . /// public static string ToOctalString(this BigInteger bigint) diff --git a/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs b/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs index c2a6305f6..c5853135c 100644 --- a/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs +++ b/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs @@ -30,7 +30,7 @@ namespace System.Net throw new ArgumentOutOfRangeException(nameof(i)); } byte width = this._ipnetwork.AddressFamily == Sockets.AddressFamily.InterNetwork ? (byte)32 : (byte)128; - IPNetworkCollection ipn = this._ipnetwork.Subnet(width); + var ipn = this._ipnetwork.Subnet(width); return ipn[i].Network; } } diff --git a/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs b/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs index 321d4a3c5..21feaea33 100644 --- a/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs +++ b/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs @@ -33,7 +33,7 @@ namespace System.Net { get { - BigInteger uintNetwork = this._ipaddress & this._netmask; + var uintNetwork = this._ipaddress & this._netmask; return uintNetwork; } } @@ -61,7 +61,7 @@ namespace System.Net { int width = this._family == Sockets.AddressFamily.InterNetwork ? 4 : 16; - BigInteger uintBroadcast = this._network + this._netmask.PositiveReverse(width); + var uintBroadcast = this._network + this._netmask.PositiveReverse(width); return uintBroadcast; } } @@ -88,7 +88,7 @@ namespace System.Net { get { - BigInteger fisrt = this._family == Sockets.AddressFamily.InterNetworkV6 + var fisrt = this._family == Sockets.AddressFamily.InterNetworkV6 ? this._network : (this.Usable <= 0) ? this._network : this._network + 1; return IPNetwork.ToIPAddress(fisrt, this._family); @@ -102,7 +102,7 @@ namespace System.Net { get { - BigInteger last = this._family == Sockets.AddressFamily.InterNetworkV6 + var last = this._family == Sockets.AddressFamily.InterNetworkV6 ? this._broadcast : (this.Usable <= 0) ? this._network : this._broadcast - 1; return IPNetwork.ToIPAddress(last, this._family); @@ -122,8 +122,8 @@ namespace System.Net return this.Total; } byte[] mask = new byte[] { 0xff, 0xff, 0xff, 0xff, 0x00 }; - BigInteger bmask = new BigInteger(mask); - BigInteger usableIps = (_cidr > 30) ? 0 : ((bmask >> _cidr) - 1); + var bmask = new BigInteger(mask); + var usableIps = (_cidr > 30) ? 0 : ((bmask >> _cidr) - 1); return usableIps; } } @@ -137,7 +137,7 @@ namespace System.Net { int max = this._family == Sockets.AddressFamily.InterNetwork ? 32 : 128; - BigInteger count = BigInteger.Pow(2, (max - _cidr)); + var count = BigInteger.Pow(2, (max - _cidr)); return count; } } @@ -523,7 +523,7 @@ namespace System.Net return; } - BigInteger uintIpAddress = IPNetwork.ToBigInteger(ipaddress); + var uintIpAddress = IPNetwork.ToBigInteger(ipaddress); byte? cidr2 = null; bool parsed = IPNetwork.TryToCidr(netmask, out cidr2); if (parsed == false) @@ -537,7 +537,7 @@ namespace System.Net } byte cidr = (byte)cidr2; - IPNetwork ipnet = new IPNetwork(uintIpAddress, ipaddress.AddressFamily, cidr); + var ipnet = new IPNetwork(uintIpAddress, ipaddress.AddressFamily, cidr); ipnetwork = ipnet; return; @@ -754,7 +754,7 @@ namespace System.Net return; } - BigInteger mask = new BigInteger(new byte[] { + var mask = new BigInteger(new byte[] { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -762,7 +762,7 @@ namespace System.Net 0x00 }); - BigInteger masked = cidr == 0 ? 0 : mask << (128 - cidr); + var masked = cidr == 0 ? 0 : mask << (128 - cidr); byte[] m = masked.ToByteArray(); byte[] bmask = new byte[17]; int copy = m.Length > 16 ? 16 : m.Length; @@ -858,7 +858,7 @@ namespace System.Net /// cidr = null; /// return; /// } - BigInteger uintNetmask = (BigInteger)uintNetmask2; + var uintNetmask = (BigInteger)uintNetmask2; byte? cidr2 = null; IPNetwork.InternalToCidr(tryParse, uintNetmask, netmask.AddressFamily, out cidr2); @@ -951,8 +951,8 @@ namespace System.Net return; } - BigInteger mask = IPNetwork.ToUint(cidr, family); - IPAddress netmask2 = IPNetwork.ToIPAddress(mask, family); + var mask = IPNetwork.ToUint(cidr, family); + var netmask2 = IPNetwork.ToIPAddress(mask, family); netmask = netmask2; return; @@ -990,7 +990,7 @@ namespace System.Net /// public static uint BitsSet(IPAddress netmask) { - BigInteger uintNetmask = IPNetwork.ToBigInteger(netmask); + var uintNetmask = IPNetwork.ToBigInteger(netmask); uint bits = IPNetwork.BitsSet(uintNetmask, netmask.AddressFamily); return bits; } @@ -1013,7 +1013,7 @@ namespace System.Net { throw new ArgumentNullException(nameof(netmask)); } - BigInteger uintNetmask = IPNetwork.ToBigInteger(netmask); + var uintNetmask = IPNetwork.ToBigInteger(netmask); bool valid = IPNetwork.InternalValidNetmask(uintNetmask, netmask.AddressFamily); return valid; } @@ -1042,7 +1042,7 @@ namespace System.Net 0x00 }); - BigInteger neg = ((~netmask) & (mask)); + var neg = ((~netmask) & (mask)); bool isNetmask = ((neg + 1) & neg) == 0; return isNetmask; @@ -1068,7 +1068,7 @@ namespace System.Net Array.Reverse(bytes2); byte[] sized = Resize(bytes2, family); - IPAddress ip = new IPAddress(sized); + var ip = new IPAddress(sized); return ip; } @@ -1122,9 +1122,9 @@ namespace System.Net return false; } - BigInteger uintNetwork = _network; - BigInteger uintBroadcast = _broadcast; - BigInteger uintAddress = IPNetwork.ToBigInteger(ipaddress); + var uintNetwork = _network; + var uintBroadcast = _broadcast; + var uintAddress = IPNetwork.ToBigInteger(ipaddress); bool contains = (uintAddress >= uintNetwork && uintAddress <= uintBroadcast); @@ -1146,11 +1146,11 @@ namespace System.Net throw new ArgumentNullException(nameof(network2)); } - BigInteger uintNetwork = _network; - BigInteger uintBroadcast = _broadcast; + var uintNetwork = _network; + var uintBroadcast = _broadcast; - BigInteger uintFirst = network2._network; - BigInteger uintLast = network2._broadcast; + var uintFirst = network2._network; + var uintLast = network2._broadcast; bool contains = (uintFirst >= uintNetwork && uintLast <= uintBroadcast); @@ -1175,11 +1175,11 @@ namespace System.Net throw new ArgumentNullException(nameof(network2)); } - BigInteger uintNetwork = _network; - BigInteger uintBroadcast = _broadcast; + var uintNetwork = _network; + var uintBroadcast = _broadcast; - BigInteger uintFirst = network2._network; - BigInteger uintLast = network2._broadcast; + var uintFirst = network2._network; + var uintLast = network2._broadcast; bool overlap = (uintFirst >= uintNetwork && uintFirst <= uintBroadcast) @@ -1428,8 +1428,8 @@ namespace System.Net return; } - IPNetwork first = (network1._network < network2._network) ? network1 : network2; - IPNetwork last = (network1._network > network2._network) ? network1 : network2; + var first = (network1._network < network2._network) ? network1 : network2; + var last = (network1._network > network2._network) ? network1 : network2; /// Starting from here : /// network1 and network2 have the same cidr, @@ -1449,10 +1449,10 @@ namespace System.Net return; } - BigInteger uintSupernet = first._network; + var uintSupernet = first._network; byte cidrSupernet = (byte)(first._cidr - 1); - IPNetwork networkSupernet = new IPNetwork(uintSupernet, first._family, cidrSupernet); + var networkSupernet = new IPNetwork(uintSupernet, first._family, cidrSupernet); if (networkSupernet._network != first._network) { if (trySupernet == false) @@ -1535,9 +1535,9 @@ namespace System.Net return true; } - List supernetted = new List(); - List ipns = IPNetwork.Array2List(ipnetworks); - Stack current = IPNetwork.List2Stack(ipns); + var supernetted = new List(); + var ipns = IPNetwork.Array2List(ipnetworks); + var current = IPNetwork.List2Stack(ipns); int previousCount = 0; int currentCount = current.Count; @@ -1547,8 +1547,8 @@ namespace System.Net supernetted.Clear(); while (current.Count > 1) { - IPNetwork ipn1 = current.Pop(); - IPNetwork ipn2 = current.Peek(); + var ipn1 = current.Pop(); + var ipn2 = current.Peek(); IPNetwork outNetwork = null; bool success = ipn1.TrySupernet(ipn2, out outNetwork); @@ -1578,7 +1578,7 @@ namespace System.Net private static Stack List2Stack(List list) { - Stack stack = new Stack(); + var stack = new Stack(); list.ForEach(new Action( delegate (IPNetwork ipn) { @@ -1590,7 +1590,7 @@ namespace System.Net private static List Array2List(IPNetwork[] array) { - List ipns = new List(); + var ipns = new List(); ipns.AddRange(array); IPNetwork.RemoveNull(ipns); ipns.Sort(new Comparison( @@ -1659,10 +1659,10 @@ namespace System.Net throw new NotSupportedException("MixedAddressFamily"); } - IPNetwork ipnetwork = new IPNetwork(0, startIP.AddressFamily, 0); + var ipnetwork = new IPNetwork(0, startIP.AddressFamily, 0); for (byte cidr = 32; cidr >= 0; cidr--) { - IPNetwork wideSubnet = IPNetwork.Parse(start, cidr); + var wideSubnet = IPNetwork.Parse(start, cidr); if (wideSubnet.Contains(endIP)) { ipnetwork = wideSubnet; @@ -1707,7 +1707,7 @@ namespace System.Net } - IPNetwork[] nnin = Array.FindAll(ipnetworks, new Predicate( + IPNetwork[] nnin = Array.FindAll(ipnetworks, new Predicate( delegate (IPNetwork ipnet) { return ipnet != null; @@ -1726,19 +1726,19 @@ namespace System.Net if (nnin.Length == 1) { - IPNetwork ipn0 = nnin[0]; + var ipn0 = nnin[0]; ipnetwork = ipn0; return; } - Array.Sort(nnin); - IPNetwork nnin0 = nnin[0]; - BigInteger uintNnin0 = nnin0._ipaddress; + Array.Sort(nnin); + var nnin0 = nnin[0]; + var uintNnin0 = nnin0._ipaddress; - IPNetwork nninX = nnin[nnin.Length - 1]; - IPAddress ipaddressX = nninX.Broadcast; + var nninX = nnin[nnin.Length - 1]; + var ipaddressX = nninX.Broadcast; - AddressFamily family = ipnetworks[0]._family; + var family = ipnetworks[0]._family; foreach (var ipnx in ipnetworks) { if (ipnx._family != family) @@ -1747,10 +1747,10 @@ namespace System.Net } } - IPNetwork ipn = new IPNetwork(0, family, 0); + var ipn = new IPNetwork(0, family, 0); for (byte cidr = nnin0._cidr; cidr >= 0; cidr--) { - IPNetwork wideSubnet = new IPNetwork(uintNnin0, family, cidr); + var wideSubnet = new IPNetwork(uintNnin0, family, cidr); if (wideSubnet.Contains(ipaddressX)) { ipn = wideSubnet; @@ -1773,7 +1773,7 @@ namespace System.Net public string Print() { - StringWriter sw = new StringWriter(); + var sw = new StringWriter(); sw.WriteLine("IPNetwork : {0}", ToString()); sw.WriteLine("Network : {0}", Network); @@ -1819,7 +1819,7 @@ namespace System.Net cidr = 64; return true; } - BigInteger uintIPAddress = IPNetwork.ToBigInteger(ipaddress); + var uintIPAddress = IPNetwork.ToBigInteger(ipaddress); uintIPAddress = uintIPAddress >> 29; if (uintIPAddress <= 3) { diff --git a/Emby.Server.Implementations/Networking/IPNetwork/IPNetworkCollection.cs b/Emby.Server.Implementations/Networking/IPNetwork/IPNetworkCollection.cs index 1827af77a..7d3106624 100644 --- a/Emby.Server.Implementations/Networking/IPNetwork/IPNetworkCollection.cs +++ b/Emby.Server.Implementations/Networking/IPNetwork/IPNetworkCollection.cs @@ -47,7 +47,7 @@ namespace System.Net { get { - BigInteger count = BigInteger.Pow(2, this._cidrSubnet - this._cidr); + var count = BigInteger.Pow(2, this._cidrSubnet - this._cidr); return count; } } @@ -61,11 +61,11 @@ namespace System.Net throw new ArgumentOutOfRangeException(nameof(i)); } - BigInteger last = this._ipnetwork.AddressFamily == Sockets.AddressFamily.InterNetworkV6 + var last = this._ipnetwork.AddressFamily == Sockets.AddressFamily.InterNetworkV6 ? this._lastUsable : this._broadcast; - BigInteger increment = (last - this._network) / this.Count; - BigInteger uintNetwork = this._network + ((increment + 1) * i); - IPNetwork ipn = new IPNetwork(uintNetwork, this._ipnetwork.AddressFamily, this._cidrSubnet); + var increment = (last - this._network) / this.Count; + var uintNetwork = this._network + ((increment + 1) * i); + var ipn = new IPNetwork(uintNetwork, this._ipnetwork.AddressFamily, this._cidrSubnet); return ipn; } } diff --git a/Emby.Server.Implementations/Networking/NetworkManager.cs b/Emby.Server.Implementations/Networking/NetworkManager.cs index 568981abb..70d8376a9 100644 --- a/Emby.Server.Implementations/Networking/NetworkManager.cs +++ b/Emby.Server.Implementations/Networking/NetworkManager.cs @@ -214,9 +214,9 @@ namespace Emby.Server.Implementations.Networking subnets = new List(); - foreach (NetworkInterface adapter in NetworkInterface.GetAllNetworkInterfaces()) + foreach (var adapter in NetworkInterface.GetAllNetworkInterfaces()) { - foreach (UnicastIPAddressInformation unicastIPAddressInformation in adapter.GetIPProperties().UnicastAddresses) + foreach (var unicastIPAddressInformation in adapter.GetIPProperties().UnicastAddresses) { if (unicastIPAddressInformation.Address.AddressFamily == AddressFamily.InterNetwork && endpointFirstPart == unicastIPAddressInformation.Address.ToString().Split('.')[0]) { @@ -461,7 +461,7 @@ namespace Emby.Server.Implementations.Networking public int GetRandomUnusedUdpPort() { - IPEndPoint localEndPoint = new IPEndPoint(IPAddress.Any, 0); + var localEndPoint = new IPEndPoint(IPAddress.Any, 0); using (var udpClient = new UdpClient(localEndPoint)) { var port = ((IPEndPoint)(udpClient.Client.LocalEndPoint)).Port; @@ -522,8 +522,8 @@ namespace Emby.Server.Implementations.Networking /// The endpointstring. /// The defaultport. /// IPEndPoint. - /// Endpoint descriptor may not be empty. - /// + /// Endpoint descriptor may not be empty. + /// private static async Task Parse(string endpointstring, int defaultport) { if (string.IsNullOrEmpty(endpointstring) @@ -585,7 +585,7 @@ namespace Emby.Server.Implementations.Networking /// /// The p. /// System.Int32. - /// + /// private static int GetPort(string p) { int port; @@ -605,7 +605,7 @@ namespace Emby.Server.Implementations.Networking /// /// The p. /// IPAddress. - /// + /// private static async Task GetIPfromHost(string p) { var hosts = await Dns.GetHostAddressesAsync(p).ConfigureAwait(false); diff --git a/Emby.Server.Implementations/Playlists/PlaylistManager.cs b/Emby.Server.Implementations/Playlists/PlaylistManager.cs index 6dbefa910..c39897b53 100644 --- a/Emby.Server.Implementations/Playlists/PlaylistManager.cs +++ b/Emby.Server.Implementations/Playlists/PlaylistManager.cs @@ -469,12 +469,12 @@ namespace Emby.Server.Implementations.Playlists folderPath = folderPath + Path.DirectorySeparatorChar; } - Uri folderUri = new Uri(folderPath); - Uri fileAbsoluteUri = new Uri(fileAbsolutePath); + var folderUri = new Uri(folderPath); + var fileAbsoluteUri = new Uri(fileAbsolutePath); if (folderUri.Scheme != fileAbsoluteUri.Scheme) { return fileAbsolutePath; } // path can't be made relative. - Uri relativeUri = folderUri.MakeRelativeUri(fileAbsoluteUri); + var relativeUri = folderUri.MakeRelativeUri(fileAbsoluteUri); string relativePath = Uri.UnescapeDataString(relativeUri.ToString()); if (fileAbsoluteUri.Scheme.Equals("file", StringComparison.CurrentCultureIgnoreCase)) diff --git a/Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs b/Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs index dc60b9990..44f6e2d7b 100644 --- a/Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs +++ b/Emby.Server.Implementations/ScheduledTasks/ScheduledTaskWorker.cs @@ -63,7 +63,7 @@ namespace Emby.Server.Implementations.ScheduledTasks /// The task manager. /// The json serializer. /// The logger. - /// + /// /// scheduledTask /// or /// applicationPaths @@ -256,7 +256,7 @@ namespace Emby.Server.Implementations.ScheduledTasks /// Gets the triggers that define when the task will run /// /// The triggers. - /// value + /// value public TaskTriggerInfo[] Triggers { get @@ -365,7 +365,7 @@ namespace Emby.Server.Implementations.ScheduledTasks /// /// Task options. /// Task. - /// Cannot execute a Task that is already running + /// Cannot execute a Task that is already running public async Task Execute(TaskOptions options) { var task = Task.Run(async () => await ExecuteInternal(options).ConfigureAwait(false)); @@ -461,7 +461,7 @@ namespace Emby.Server.Implementations.ScheduledTasks /// /// Stops the task if it is currently executing /// - /// Cannot cancel a Task unless it is in the Running state. + /// Cannot cancel a Task unless it is in the Running state. public void Cancel() { if (State != TaskState.Running) @@ -705,8 +705,8 @@ namespace Emby.Server.Implementations.ScheduledTasks /// /// The info. /// BaseTaskTrigger. - /// - /// Invalid trigger type: + info.Type + /// + /// Invalid trigger type: + info.Type private ITaskTrigger GetTrigger(TaskTriggerInfo info) { var options = new TaskOptions diff --git a/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs b/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs index 754fb1633..ac47c9625 100644 --- a/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs +++ b/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs @@ -61,7 +61,7 @@ namespace Emby.Server.Implementations.ScheduledTasks /// The application paths. /// The json serializer. /// The logger. - /// kernel + /// kernel public TaskManager(IApplicationPaths applicationPaths, IJsonSerializer jsonSerializer, ILogger logger, IFileSystem fileSystem, ISystemEvents systemEvents) { ApplicationPaths = applicationPaths; diff --git a/Emby.Server.Implementations/Security/EncryptionManager.cs b/Emby.Server.Implementations/Security/EncryptionManager.cs index c60872346..fa8872ccc 100644 --- a/Emby.Server.Implementations/Security/EncryptionManager.cs +++ b/Emby.Server.Implementations/Security/EncryptionManager.cs @@ -11,7 +11,7 @@ namespace Emby.Server.Implementations.Security /// /// The value. /// System.String. - /// value + /// value public string EncryptString(string value) { if (value == null) @@ -27,7 +27,7 @@ namespace Emby.Server.Implementations.Security /// /// The value. /// System.String. - /// value + /// value public string DecryptString(string value) { if (value == null) diff --git a/Emby.Server.Implementations/Serialization/JsonSerializer.cs b/Emby.Server.Implementations/Serialization/JsonSerializer.cs index 26c648d72..60bf2d5a9 100644 --- a/Emby.Server.Implementations/Serialization/JsonSerializer.cs +++ b/Emby.Server.Implementations/Serialization/JsonSerializer.cs @@ -27,7 +27,7 @@ namespace Emby.Common.Implementations.Serialization /// /// The obj. /// The stream. - /// obj + /// obj public void SerializeToStream(object obj, Stream stream) { if (obj == null) @@ -48,7 +48,7 @@ namespace Emby.Common.Implementations.Serialization /// /// The obj. /// The file. - /// obj + /// obj public void SerializeToFile(object obj, string file) { if (obj == null) @@ -61,7 +61,7 @@ namespace Emby.Common.Implementations.Serialization throw new ArgumentNullException(nameof(file)); } - using (Stream stream = _fileSystem.GetFileStream(file, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read)) + using (var stream = _fileSystem.GetFileStream(file, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read)) { SerializeToStream(obj, stream); } @@ -79,7 +79,7 @@ namespace Emby.Common.Implementations.Serialization /// The type. /// The file. /// System.Object. - /// type + /// type public object DeserializeFromFile(Type type, string file) { if (type == null) @@ -92,7 +92,7 @@ namespace Emby.Common.Implementations.Serialization throw new ArgumentNullException(nameof(file)); } - using (Stream stream = OpenFile(file)) + using (var stream = OpenFile(file)) { return DeserializeFromStream(stream, type); } @@ -104,7 +104,7 @@ namespace Emby.Common.Implementations.Serialization /// /// The file. /// ``0. - /// file + /// file public T DeserializeFromFile(string file) where T : class { @@ -113,7 +113,7 @@ namespace Emby.Common.Implementations.Serialization throw new ArgumentNullException(nameof(file)); } - using (Stream stream = OpenFile(file)) + using (var stream = OpenFile(file)) { return DeserializeFromStream(stream); } @@ -125,7 +125,7 @@ namespace Emby.Common.Implementations.Serialization /// /// The stream. /// ``0. - /// stream + /// stream public T DeserializeFromStream(Stream stream) { if (stream == null) @@ -153,7 +153,7 @@ namespace Emby.Common.Implementations.Serialization /// /// The text. /// ``0. - /// text + /// text public T DeserializeFromString(string text) { if (string.IsNullOrEmpty(text)) @@ -170,7 +170,7 @@ namespace Emby.Common.Implementations.Serialization /// The stream. /// The type. /// System.Object. - /// stream + /// stream public object DeserializeFromStream(Stream stream, Type type) { if (stream == null) @@ -236,7 +236,7 @@ namespace Emby.Common.Implementations.Serialization /// The json. /// The type. /// System.Object. - /// json + /// json public object DeserializeFromString(string json, Type type) { if (string.IsNullOrEmpty(json)) @@ -257,7 +257,7 @@ namespace Emby.Common.Implementations.Serialization /// /// The obj. /// System.String. - /// obj + /// obj public string SerializeToString(object obj) { if (obj == null) diff --git a/Emby.Server.Implementations/Services/ServiceController.cs b/Emby.Server.Implementations/Services/ServiceController.cs index f82c64823..b34832f45 100644 --- a/Emby.Server.Implementations/Services/ServiceController.cs +++ b/Emby.Server.Implementations/Services/ServiceController.cs @@ -72,7 +72,7 @@ namespace Emby.Server.Implementations.Services public void RegisterRestPaths(HttpListenerHost appHost, Type requestType, Type serviceType) { var attrs = appHost.GetRouteAttributes(requestType); - foreach (RouteAttribute attr in attrs) + foreach (var attr in attrs) { var restPath = new RestPath(appHost.CreateInstance, appHost.GetParseFn, requestType, serviceType, attr.Path, attr.Verbs, attr.IsHidden, attr.Summary, attr.Description); diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index d99130228..e398b58cc 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -201,8 +201,8 @@ namespace Emby.Server.Implementations.Session /// The remote end point. /// The user. /// Task. - /// user - /// + /// user + /// public SessionInfo LogSessionActivity(string appName, string appVersion, string deviceId, @@ -365,7 +365,7 @@ namespace Emby.Server.Implementations.Session /// Removes the now playing item id. /// /// The session. - /// item + /// item private void RemoveNowPlayingItem(SessionInfo session) { session.NowPlayingItem = null; @@ -404,7 +404,7 @@ namespace Emby.Server.Implementations.Session CheckDisposed(); - SessionInfo sessionInfo = _activeConnections.GetOrAdd(key, k => + var sessionInfo = _activeConnections.GetOrAdd(key, k => { return CreateSession(k, appName, appVersion, deviceId, deviceName, remoteEndPoint, user); }); @@ -571,7 +571,7 @@ namespace Emby.Server.Implementations.Session /// /// The info. /// Task. - /// info + /// info public async Task OnPlaybackStart(PlaybackStartInfo info) { CheckDisposed(); @@ -784,8 +784,8 @@ namespace Emby.Server.Implementations.Session /// /// The info. /// Task. - /// info - /// positionTicks + /// info + /// positionTicks public async Task OnPlaybackStopped(PlaybackStopInfo info) { CheckDisposed(); @@ -1284,8 +1284,8 @@ namespace Emby.Server.Implementations.Session /// /// The session identifier. /// The user identifier. - /// Cannot modify additional users without authenticating first. - /// The requested user is already the primary user of the session. + /// Cannot modify additional users without authenticating first. + /// The requested user is already the primary user of the session. public void AddAdditionalUser(string sessionId, Guid userId) { CheckDisposed(); @@ -1318,8 +1318,8 @@ namespace Emby.Server.Implementations.Session /// /// The session identifier. /// The user identifier. - /// Cannot modify additional users without authenticating first. - /// The requested user is already the primary user of the session. + /// Cannot modify additional users without authenticating first. + /// The requested user is already the primary user of the session. public void RemoveAdditionalUser(string sessionId, Guid userId) { CheckDisposed(); diff --git a/Emby.Server.Implementations/Sorting/AlphanumComparator.cs b/Emby.Server.Implementations/Sorting/AlphanumComparator.cs index f21f905df..2e00c24d7 100644 --- a/Emby.Server.Implementations/Sorting/AlphanumComparator.cs +++ b/Emby.Server.Implementations/Sorting/AlphanumComparator.cs @@ -29,8 +29,8 @@ namespace Emby.Server.Implementations.Sorting char thisCh = s1[thisMarker]; char thatCh = s2[thatMarker]; - StringBuilder thisChunk = new StringBuilder(); - StringBuilder thatChunk = new StringBuilder(); + var thisChunk = new StringBuilder(); + var thatChunk = new StringBuilder(); while ((thisMarker < s1.Length) && (thisChunk.Length == 0 || SortHelper.InChunk(thisCh, thisChunk[0]))) { diff --git a/Emby.Server.Implementations/TV/TVSeriesManager.cs b/Emby.Server.Implementations/TV/TVSeriesManager.cs index 3a9d99aa1..630ef4893 100644 --- a/Emby.Server.Implementations/TV/TVSeriesManager.cs +++ b/Emby.Server.Implementations/TV/TVSeriesManager.cs @@ -118,7 +118,7 @@ namespace Emby.Server.Implementations.TV OrderBy = new[] { new ValueTuple(ItemSortBy.DatePlayed, SortOrder.Descending) }, SeriesPresentationUniqueKey = presentationUniqueKey, Limit = limit, - DtoOptions = new MediaBrowser.Controller.Dto.DtoOptions + DtoOptions = new DtoOptions { Fields = new ItemFields[] { @@ -196,7 +196,7 @@ namespace Emby.Server.Implementations.TV IsPlayed = true, Limit = 1, ParentIndexNumberNotEquals = 0, - DtoOptions = new MediaBrowser.Controller.Dto.DtoOptions + DtoOptions = new DtoOptions { Fields = new ItemFields[] { diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/Detector.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/Detector.cs index 507dd5e42..097c7b8b7 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/Detector.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/Detector.cs @@ -164,7 +164,7 @@ namespace NLangDetect.Core public string Detect() { - List probabilities = GetProbabilities(); + var probabilities = GetProbabilities(); return probabilities.Count > 0 @@ -179,7 +179,7 @@ namespace NLangDetect.Core DetectBlock(); } - List list = SortProbability(_langprob); + var list = SortProbability(_langprob); return list; } @@ -241,7 +241,7 @@ namespace NLangDetect.Core { CleanText(); - List ngrams = ExtractNGrams(); + var ngrams = ExtractNGrams(); if (ngrams.Count == 0) { @@ -250,7 +250,7 @@ namespace NLangDetect.Core _langprob = new double[_langlist.Count]; - Random rand = (_seed.HasValue ? new Random(_seed.Value) : new Random()); + var rand = (_seed.HasValue ? new Random(_seed.Value) : new Random()); for (int t = 0; t < _trialsCount; t++) { @@ -305,7 +305,7 @@ namespace NLangDetect.Core private List ExtractNGrams() { var list = new List(); - NGram ngram = new NGram(); + var ngram = new NGram(); for (int i = 0; i < _text.Length; i++) { @@ -332,7 +332,7 @@ namespace NLangDetect.Core return; } - ProbVector langProbMap = _wordLangProbMap[word]; + var langProbMap = _wordLangProbMap[word]; double weight = alpha / _BaseFreq; for (int i = 0; i < prob.Length; i++) diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/DetectorFactory.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/DetectorFactory.cs index c80757e68..08e98d62e 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/DetectorFactory.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/DetectorFactory.cs @@ -54,7 +54,7 @@ namespace NLangDetect.Core public static Detector Create(double alpha) { - Detector detector = CreateDetector(); + var detector = CreateDetector(); detector.SetAlpha(alpha); diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/GenProfile.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/GenProfile.cs index c2b007c05..26157483b 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/GenProfile.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/GenProfile.cs @@ -13,8 +13,8 @@ namespace NLangDetect.Core public static LangProfile load(string lang, string file) { - LangProfile profile = new LangProfile(lang); - TagExtractor tagextractor = new TagExtractor("abstract", 100); + var profile = new LangProfile(lang); + var tagextractor = new TagExtractor("abstract", 100); Stream inputStream = null; try @@ -28,7 +28,7 @@ namespace NLangDetect.Core inputStream = new GZipStream(inputStream, CompressionMode.Decompress); } - using (XmlReader xmlReader = XmlReader.Create(inputStream)) + using (var xmlReader = XmlReader.Create(inputStream)) { while (xmlReader.Read()) { diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/LanguageDetector.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/LanguageDetector.cs index 98c4f623c..a26f236a8 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/LanguageDetector.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/LanguageDetector.cs @@ -25,7 +25,7 @@ namespace NLangDetect.Core { if (string.IsNullOrEmpty(plainText)) { throw new ArgumentException("Argument can't be null nor empty.", nameof(plainText)); } - Detector detector = DetectorFactory.Create(_DefaultAlpha); + var detector = DetectorFactory.Create(_DefaultAlpha); detector.Append(plainText); diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/Utils/LangProfile.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/Utils/LangProfile.cs index 0413edfad..78b44e1fc 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/Utils/LangProfile.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/Utils/LangProfile.cs @@ -59,8 +59,8 @@ namespace NLangDetect.Core.Utils ICollection keys = freq.Keys; int roman = 0; // TODO IMM HI: move up? - Regex regex1 = new Regex("^[A-Za-z]$", RegexOptions.Compiled); - List keysToRemove = new List(); + var regex1 = new Regex("^[A-Za-z]$", RegexOptions.Compiled); + var keysToRemove = new List(); foreach (string key in keys) { @@ -93,7 +93,7 @@ namespace NLangDetect.Core.Utils ICollection keys2 = freq.Keys; // TODO IMM HI: move up? - Regex regex2 = new Regex(".*[A-Za-z].*", RegexOptions.Compiled); + var regex2 = new Regex(".*[A-Za-z].*", RegexOptions.Compiled); foreach (string key in keys2) { diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/Utils/Messages.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/Utils/Messages.cs index 058f350b2..d7dab8528 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/Utils/Messages.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/Utils/Messages.cs @@ -30,7 +30,7 @@ namespace NLangDetect.Core.Utils { var manifestName = typeof(Messages).Assembly.GetManifestResourceNames().FirstOrDefault(i => i.IndexOf("messages.properties", StringComparison.Ordinal) != -1); - Stream messagesStream = + var messagesStream = typeof(Messages).Assembly .GetManifestResourceStream(manifestName); diff --git a/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs b/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs index 49a371efa..03ff0863f 100644 --- a/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs +++ b/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs @@ -150,7 +150,7 @@ namespace Emby.Server.Implementations.TextEncoding public CharacterEncoding DetectEncoding(byte[] buffer, int size) { // First check if we have a BOM and return that if so - CharacterEncoding encoding = CheckBom(buffer, size); + var encoding = CheckBom(buffer, size); if (encoding != CharacterEncoding.None) { return encoding; diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharDistributionAnalyser.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharDistributionAnalyser.cs index 472dfdc51..601b4906a 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharDistributionAnalyser.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharDistributionAnalyser.cs @@ -83,7 +83,7 @@ namespace UniversalDetector.Core /// convert this encoding string to a number, here called order. /// This allow multiple encoding of a language to share one frequency table /// - /// A + /// A /// /// public abstract int GetOrder(byte[] buf, int offset); @@ -91,7 +91,7 @@ namespace UniversalDetector.Core /// /// Feed a character with known length /// - /// A + /// A /// buf offset public void HandleOneChar(byte[] buf, int offset, int charLen) { diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharsetProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharsetProber.cs index 158dc8969..e61e5848d 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharsetProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/CharsetProber.cs @@ -108,7 +108,7 @@ namespace UniversalDetector.Core { byte[] result = null; - using (MemoryStream ms = new MemoryStream(buf.Length)) + using (var ms = new MemoryStream(buf.Length)) { bool meetMSB = false; @@ -156,7 +156,7 @@ namespace UniversalDetector.Core { byte[] result = null; - using (MemoryStream ms = new MemoryStream(buf.Length)) + using (var ms = new MemoryStream(buf.Length)) { bool inTag = false; diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs index e8da73c1c..b10c41c77 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/EscCharsetProber.cs @@ -84,7 +84,7 @@ namespace UniversalDetector.Core } else if (j != activeSM) { - CodingStateMachine t = codingSM[activeSM]; + var t = codingSM[activeSM]; codingSM[activeSM] = codingSM[j]; codingSM[j] = t; } diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSGroupProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSGroupProber.cs index e7fa2d719..b23e499c3 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSGroupProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/MBCSGroupProber.cs @@ -122,7 +122,7 @@ namespace UniversalDetector.Core } } - ProbingState st = ProbingState.NotMe; + var st = ProbingState.NotMe; for (int i = 0; i < probers.Length; i++) { diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCSGroupProber.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCSGroupProber.cs index 336726aab..cdbc16891 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCSGroupProber.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/SBCSGroupProber.cs @@ -59,7 +59,7 @@ namespace UniversalDetector.Core probers[7] = new SingleByteCharSetProber(new Win1253Model()); probers[8] = new SingleByteCharSetProber(new Latin5BulgarianModel()); probers[9] = new SingleByteCharSetProber(new Win1251BulgarianModel()); - HebrewProber hebprober = new HebrewProber(); + var hebprober = new HebrewProber(); probers[10] = hebprober; // Logical probers[11] = new SingleByteCharSetProber(new Win1255Model(), false, hebprober); @@ -75,7 +75,7 @@ namespace UniversalDetector.Core public override ProbingState HandleData(byte[] buf, int offset, int len) { - ProbingState st = ProbingState.NotMe; + var st = ProbingState.NotMe; //apply filter to original buffer, and we got new buffer back //depend on what script it is, we will feed them the new buffer diff --git a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UniversalDetector.cs b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UniversalDetector.cs index 28a50ea3e..812a9a793 100644 --- a/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UniversalDetector.cs +++ b/Emby.Server.Implementations/TextEncoding/UniversalDetector/Core/UniversalDetector.cs @@ -168,7 +168,7 @@ namespace UniversalDetector.Core } } - ProbingState st = ProbingState.NotMe; + var st = ProbingState.NotMe; switch (inputState) { diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index 74d66fd41..68cb7821d 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -415,7 +415,7 @@ namespace Emby.Server.Implementations.Updates /// The progress. /// The cancellation token. /// Task. - /// package + /// package public async Task InstallPackage(PackageVersionInfo package, bool isPlugin, IProgress progress, CancellationToken cancellationToken) { if (package == null) @@ -626,7 +626,7 @@ namespace Emby.Server.Implementations.Updates /// Uninstalls a plugin /// /// The plugin. - /// + /// public void UninstallPlugin(IPlugin plugin) { plugin.OnUninstalling(); diff --git a/Emby.XmlTv/Emby.XmlTv/Classes/XmlTvReader.cs b/Emby.XmlTv/Emby.XmlTv/Classes/XmlTvReader.cs index aa4840664..8234393c2 100644 --- a/Emby.XmlTv/Emby.XmlTv/Classes/XmlTvReader.cs +++ b/Emby.XmlTv/Emby.XmlTv/Classes/XmlTvReader.cs @@ -34,7 +34,7 @@ namespace Emby.XmlTv.Classes private static XmlReader CreateXmlTextReader(string path) { - XmlReaderSettings settings = new XmlReaderSettings(); + var settings = new XmlReaderSettings(); // https://msdn.microsoft.com/en-us/library/system.xml.xmlreadersettings.xmlresolver(v=vs.110).aspx // Looks like we don't need this anyway? diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index 15a01ec3c..62c65d32e 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -36,8 +36,8 @@ namespace Jellyfin.Server public static async Task Main(string[] args) { - StartupOptions options = new StartupOptions(args); - Version version = Assembly.GetEntryAssembly().GetName().Version; + var options = new StartupOptions(args); + var version = Assembly.GetEntryAssembly().GetName().Version; if (options.ContainsOption("-v") || options.ContainsOption("--version")) { @@ -45,7 +45,7 @@ namespace Jellyfin.Server return 0; } - ServerApplicationPaths appPaths = createApplicationPaths(options); + var appPaths = createApplicationPaths(options); // $JELLYFIN_LOG_DIR needs to be set for the logger configuration manager Environment.SetEnvironmentVariable("JELLYFIN_LOG_DIR", appPaths.LogDirectoryPath); await createLogger(appPaths); @@ -57,7 +57,7 @@ namespace Jellyfin.Server _logger.LogInformation("Jellyfin version: {Version}", version); - EnvironmentInfo environmentInfo = new EnvironmentInfo(getOperatingSystem()); + var environmentInfo = new EnvironmentInfo(getOperatingSystem()); ApplicationHost.LogEnvironmentInfo(_logger, appPaths, environmentInfo); SQLitePCL.Batteries_V2.Init(); @@ -173,7 +173,7 @@ namespace Jellyfin.Server if (!File.Exists(configPath)) { // For some reason the csproj name is used instead of the assembly name - using (Stream rscstr = typeof(Program).Assembly + using (var rscstr = typeof(Program).Assembly .GetManifestResourceStream("Jellyfin.Server.Resources.Configuration.logging.json")) using (Stream fstr = File.Open(configPath, FileMode.CreateNew)) { diff --git a/Jellyfin.Server/SocketSharp/RequestMono.cs b/Jellyfin.Server/SocketSharp/RequestMono.cs index 6e5a4e75a..0e3d2ad65 100644 --- a/Jellyfin.Server/SocketSharp/RequestMono.cs +++ b/Jellyfin.Server/SocketSharp/RequestMono.cs @@ -75,7 +75,7 @@ namespace Jellyfin.SocketSharp // // We use a substream, as in 2.x we will support large uploads streamed to disk, // - HttpPostedFile sub = new HttpPostedFile(e.Filename, e.ContentType, input, e.Start, e.Length); + var sub = new HttpPostedFile(e.Filename, e.ContentType, input, e.Start, e.Length); files[e.Name] = sub; } } @@ -207,17 +207,17 @@ namespace Jellyfin.SocketSharp async Task LoadWwwForm(WebROCollection form) { - using (Stream input = InputStream) + using (var input = InputStream) { using (var ms = new MemoryStream()) { await input.CopyToAsync(ms).ConfigureAwait(false); ms.Position = 0; - using (StreamReader s = new StreamReader(ms, ContentEncoding)) + using (var s = new StreamReader(ms, ContentEncoding)) { - StringBuilder key = new StringBuilder(); - StringBuilder value = new StringBuilder(); + var key = new StringBuilder(); + var value = new StringBuilder(); int c; while ((c = s.Read()) != -1) @@ -269,7 +269,7 @@ namespace Jellyfin.SocketSharp { public override string ToString() { - StringBuilder result = new StringBuilder(); + var result = new StringBuilder(); foreach (var pair in this) { if (result.Length > 0) @@ -715,7 +715,7 @@ namespace Jellyfin.SocketSharp if (at_eof || ReadBoundary()) return null; - Element elem = new Element(); + var elem = new Element(); string header; while ((header = ReadHeaders()) != null) { diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs index 12d807a7e..1248f7316 100644 --- a/MediaBrowser.Api/Library/LibraryService.cs +++ b/MediaBrowser.Api/Library/LibraryService.cs @@ -902,7 +902,7 @@ namespace MediaBrowser.Api.Library var dtoOptions = GetDtoOptions(_authContext, request); - BaseItem parent = item.GetParent(); + var parent = item.GetParent(); while (parent != null) { diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index cdf9c7d0b..6d4af16e7 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -751,7 +751,7 @@ namespace MediaBrowser.Api.Playback MediaSourceInfo mediaSource = null; if (string.IsNullOrWhiteSpace(request.LiveStreamId)) { - TranscodingJob currentJob = !string.IsNullOrWhiteSpace(request.PlaySessionId) ? + var currentJob = !string.IsNullOrWhiteSpace(request.PlaySessionId) ? ApiEntryPoint.Instance.GetTranscodingJob(request.PlaySessionId) : null; diff --git a/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs b/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs index 502403cfe..16b036912 100644 --- a/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs +++ b/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs @@ -168,7 +168,7 @@ namespace MediaBrowser.Api.ScheduledTasks /// /// The request. /// IEnumerable{TaskInfo}. - /// Task not found + /// Task not found public object Get(GetScheduledTask request) { var task = TaskManager.ScheduledTasks.FirstOrDefault(i => string.Equals(i.Id, request.Id)); @@ -187,7 +187,7 @@ namespace MediaBrowser.Api.ScheduledTasks /// Posts the specified request. /// /// The request. - /// Task not found + /// Task not found public void Post(StartScheduledTask request) { var task = TaskManager.ScheduledTasks.FirstOrDefault(i => string.Equals(i.Id, request.Id)); @@ -214,7 +214,7 @@ namespace MediaBrowser.Api.ScheduledTasks /// Posts the specified request. /// /// The request. - /// Task not found + /// Task not found public void Delete(StopScheduledTask request) { var task = TaskManager.ScheduledTasks.FirstOrDefault(i => string.Equals(i.Id, request.Id)); @@ -231,7 +231,7 @@ namespace MediaBrowser.Api.ScheduledTasks /// Posts the specified request. /// /// The request. - /// Task not found + /// Task not found public void Post(UpdateScheduledTaskTriggers request) { // We need to parse this manually because we told service stack not to with IRequiresRequestStream diff --git a/MediaBrowser.Api/SimilarItemsHelper.cs b/MediaBrowser.Api/SimilarItemsHelper.cs index 20a6969df..44bb24ef2 100644 --- a/MediaBrowser.Api/SimilarItemsHelper.cs +++ b/MediaBrowser.Api/SimilarItemsHelper.cs @@ -95,7 +95,7 @@ namespace MediaBrowser.Api var items = GetSimilaritems(item, libraryManager, inputItems, getSimilarityScore) .ToList(); - List returnItems = items; + var returnItems = items; if (request.Limit.HasValue) { diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs index 3daa5779c..4cccc0cb5 100644 --- a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs +++ b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs @@ -459,7 +459,7 @@ namespace MediaBrowser.Api.UserLibrary if (string.IsNullOrEmpty(val)) { - return Array.Empty>(); + return Array.Empty>(); } var vals = val.Split(','); @@ -470,7 +470,7 @@ namespace MediaBrowser.Api.UserLibrary var sortOrders = requestedSortOrder.Split(','); - var result = new ValueTuple[vals.Length]; + var result = new ValueTuple[vals.Length]; for (var i = 0; i < vals.Length; i++) { @@ -479,7 +479,7 @@ namespace MediaBrowser.Api.UserLibrary var sortOrderValue = sortOrders.Length > sortOrderIndex ? sortOrders[sortOrderIndex] : null; var sortOrder = string.Equals(sortOrderValue, "Descending", StringComparison.OrdinalIgnoreCase) ? MediaBrowser.Model.Entities.SortOrder.Descending : MediaBrowser.Model.Entities.SortOrder.Ascending; - result[i] = new ValueTuple(vals[i], sortOrder); + result[i] = new ValueTuple(vals[i], sortOrder); } return result; diff --git a/MediaBrowser.Common/Net/IHttpClient.cs b/MediaBrowser.Common/Net/IHttpClient.cs index 5f4e3e5d1..5aaf7e0be 100644 --- a/MediaBrowser.Common/Net/IHttpClient.cs +++ b/MediaBrowser.Common/Net/IHttpClient.cs @@ -43,7 +43,7 @@ namespace MediaBrowser.Common.Net /// The options. /// Task{System.String}. /// progress - /// + /// Task GetTempFile(HttpRequestOptions options); /// diff --git a/MediaBrowser.Common/Plugins/BasePlugin.cs b/MediaBrowser.Common/Plugins/BasePlugin.cs index a14c9fb34..1ff2e98ef 100644 --- a/MediaBrowser.Common/Plugins/BasePlugin.cs +++ b/MediaBrowser.Common/Plugins/BasePlugin.cs @@ -212,7 +212,7 @@ namespace MediaBrowser.Common.Plugins /// Returns true or false indicating success or failure /// /// The configuration. - /// configuration + /// configuration public virtual void UpdateConfiguration(BasePluginConfiguration configuration) { if (configuration == null) diff --git a/MediaBrowser.Common/Plugins/IPlugin.cs b/MediaBrowser.Common/Plugins/IPlugin.cs index 037e11ce8..32527c299 100644 --- a/MediaBrowser.Common/Plugins/IPlugin.cs +++ b/MediaBrowser.Common/Plugins/IPlugin.cs @@ -69,7 +69,7 @@ namespace MediaBrowser.Common.Plugins /// Returns true or false indicating success or failure /// /// The configuration. - /// configuration + /// configuration void UpdateConfiguration(BasePluginConfiguration configuration); /// diff --git a/MediaBrowser.Common/Updates/IInstallationManager.cs b/MediaBrowser.Common/Updates/IInstallationManager.cs index 52d5d7dcb..8bef78400 100644 --- a/MediaBrowser.Common/Updates/IInstallationManager.cs +++ b/MediaBrowser.Common/Updates/IInstallationManager.cs @@ -108,14 +108,14 @@ namespace MediaBrowser.Common.Updates /// The progress. /// The cancellation token. /// Task. - /// package + /// package Task InstallPackage(PackageVersionInfo package, bool isPlugin, IProgress progress, CancellationToken cancellationToken); /// /// Uninstalls a plugin /// /// The plugin. - /// + /// void UninstallPlugin(IPlugin plugin); } } diff --git a/MediaBrowser.Controller/Entities/AggregateFolder.cs b/MediaBrowser.Controller/Entities/AggregateFolder.cs index 522b3e33e..054df21e5 100644 --- a/MediaBrowser.Controller/Entities/AggregateFolder.cs +++ b/MediaBrowser.Controller/Entities/AggregateFolder.cs @@ -164,7 +164,7 @@ namespace MediaBrowser.Controller.Entities /// Adds the virtual child. /// /// The child. - /// + /// public void AddVirtualChild(BaseItem child) { if (child == null) @@ -180,7 +180,7 @@ namespace MediaBrowser.Controller.Entities /// /// The id. /// BaseItem. - /// id + /// id public BaseItem FindVirtualChild(Guid id) { if (id.Equals(Guid.Empty)) diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 995f39483..68374c8df 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -367,7 +367,7 @@ namespace MediaBrowser.Controller.Entities } char thisCh = s1[thisMarker]; - StringBuilder thisChunk = new StringBuilder(); + var thisChunk = new StringBuilder(); while ((thisMarker < s1.Length) && (thisChunk.Length == 0 || SortHelper.InChunk(thisCh, thisChunk[0]))) { @@ -548,9 +548,9 @@ namespace MediaBrowser.Controller.Entities public static IMediaSourceManager MediaSourceManager { get; set; } /// - /// Returns a that represents this instance. + /// Returns a that represents this instance. /// - /// A that represents this instance. + /// A that represents this instance. public override string ToString() { return Name; @@ -1661,7 +1661,7 @@ namespace MediaBrowser.Controller.Entities /// /// The user. /// true if [is parental allowed] [the specified user]; otherwise, false. - /// user + /// user public bool IsParentalAllowed(User user) { if (user == null) @@ -1811,7 +1811,7 @@ namespace MediaBrowser.Controller.Entities /// /// The user. /// true if the specified user is visible; otherwise, false. - /// user + /// user public virtual bool IsVisible(User user) { if (user == null) @@ -1971,7 +1971,7 @@ namespace MediaBrowser.Controller.Entities /// Adds a studio to the item /// /// The name. - /// + /// public void AddStudio(string name) { if (string.IsNullOrEmpty(name)) @@ -2004,7 +2004,7 @@ namespace MediaBrowser.Controller.Entities /// Adds a genre to the item /// /// The name. - /// + /// public void AddGenre(string name) { if (string.IsNullOrEmpty(name)) @@ -2028,7 +2028,7 @@ namespace MediaBrowser.Controller.Entities /// The date played. /// if set to true [reset position]. /// Task. - /// + /// public virtual void MarkPlayed(User user, DateTime? datePlayed, bool resetPosition) @@ -2065,7 +2065,7 @@ namespace MediaBrowser.Controller.Entities /// /// The user. /// Task. - /// + /// public virtual void MarkUnplayed(User user) { if (user == null) @@ -2104,7 +2104,7 @@ namespace MediaBrowser.Controller.Entities /// The type. /// Index of the image. /// true if the specified type has image; otherwise, false. - /// Backdrops should be accessed using Item.Backdrops + /// Backdrops should be accessed using Item.Backdrops public bool HasImage(ImageType type, int imageIndex) { return GetImageInfo(type, imageIndex) != null; @@ -2232,9 +2232,9 @@ namespace MediaBrowser.Controller.Entities /// Type of the image. /// Index of the image. /// System.String. - /// + /// /// - /// item + /// item public string GetImagePath(ImageType imageType, int imageIndex) { var info = GetImageInfo(imageType, imageIndex); @@ -2294,7 +2294,7 @@ namespace MediaBrowser.Controller.Entities /// Type of the image. /// The images. /// true if XXXX, false otherwise. - /// Cannot call AddImages with chapter images + /// Cannot call AddImages with chapter images public bool AddImages(ImageType imageType, List images) { if (imageType == ImageType.Chapter) diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index fe53d2f05..bbee594f6 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -135,7 +135,7 @@ namespace MediaBrowser.Controller.Entities /// The item. /// The cancellation token. /// Task. - /// Unable to add + item.Name + /// Unable to add + item.Name public void AddChild(BaseItem item, CancellationToken cancellationToken) { item.SetParent(this); @@ -1261,7 +1261,7 @@ namespace MediaBrowser.Controller.Entities /// The user. /// if set to true [include linked children]. /// IEnumerable{BaseItem}. - /// + /// public IEnumerable GetRecursiveChildren(User user, bool includeLinkedChildren = true) { return GetRecursiveChildren(user, null); diff --git a/MediaBrowser.Controller/Entities/Person.cs b/MediaBrowser.Controller/Entities/Person.cs index 0ba8b3b48..dd0183489 100644 --- a/MediaBrowser.Controller/Entities/Person.cs +++ b/MediaBrowser.Controller/Entities/Person.cs @@ -175,9 +175,9 @@ namespace MediaBrowser.Controller.Entities public Dictionary ProviderIds { get; set; } /// - /// Returns a that represents this instance. + /// Returns a that represents this instance. /// - /// A that represents this instance. + /// A that represents this instance. public override string ToString() { return Name; diff --git a/MediaBrowser.Controller/Entities/TV/Series.cs b/MediaBrowser.Controller/Entities/TV/Series.cs index 5ba4613c0..4539ab0f2 100644 --- a/MediaBrowser.Controller/Entities/TV/Series.cs +++ b/MediaBrowser.Controller/Entities/TV/Series.cs @@ -119,7 +119,7 @@ namespace MediaBrowser.Controller.Entities.TV IncludeItemTypes = new[] { typeof(Season).Name }, IsVirtualItem = false, Limit = 0, - DtoOptions = new Dto.DtoOptions(false) + DtoOptions = new DtoOptions(false) { EnableImages = false } @@ -136,7 +136,7 @@ namespace MediaBrowser.Controller.Entities.TV { AncestorWithPresentationUniqueKey = null, SeriesPresentationUniqueKey = seriesKey, - DtoOptions = new Dto.DtoOptions(false) + DtoOptions = new DtoOptions(false) { EnableImages = false } diff --git a/MediaBrowser.Controller/Entities/User.cs b/MediaBrowser.Controller/Entities/User.cs index 16fef9a82..10fe096a4 100644 --- a/MediaBrowser.Controller/Entities/User.cs +++ b/MediaBrowser.Controller/Entities/User.cs @@ -149,7 +149,7 @@ namespace MediaBrowser.Controller.Entities /// /// The new name. /// Task. - /// + /// public Task Rename(string newName) { if (string.IsNullOrEmpty(newName)) diff --git a/MediaBrowser.Controller/Entities/UserItemData.cs b/MediaBrowser.Controller/Entities/UserItemData.cs index 8a87aff5f..f7136bdf2 100644 --- a/MediaBrowser.Controller/Entities/UserItemData.cs +++ b/MediaBrowser.Controller/Entities/UserItemData.cs @@ -28,7 +28,7 @@ namespace MediaBrowser.Controller.Entities /// Gets or sets the users 0-10 rating /// /// The rating. - /// Rating;A 0 to 10 rating is required for UserItemData. + /// Rating;A 0 to 10 rating is required for UserItemData. public double? Rating { get => _rating; diff --git a/MediaBrowser.Controller/IO/FileData.cs b/MediaBrowser.Controller/IO/FileData.cs index e7c27d846..4bbb60283 100644 --- a/MediaBrowser.Controller/IO/FileData.cs +++ b/MediaBrowser.Controller/IO/FileData.cs @@ -34,7 +34,7 @@ namespace MediaBrowser.Controller.IO /// The flatten folder depth. /// if set to true [resolve shortcuts]. /// Dictionary{System.StringFileSystemInfo}. - /// path + /// path public static FileSystemMetadata[] GetFilteredFileSystemEntries(IDirectoryService directoryService, string path, IFileSystem fileSystem, diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index 0ada91b2e..9d404ba1a 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -100,7 +100,7 @@ namespace MediaBrowser.Controller.Library /// /// The value. /// Task{Year}. - /// + /// Year GetYear(int value); /// diff --git a/MediaBrowser.Controller/Library/IUserManager.cs b/MediaBrowser.Controller/Library/IUserManager.cs index bf60aa25a..925d91a37 100644 --- a/MediaBrowser.Controller/Library/IUserManager.cs +++ b/MediaBrowser.Controller/Library/IUserManager.cs @@ -43,7 +43,7 @@ namespace MediaBrowser.Controller.Library /// /// The id. /// User. - /// + /// User GetUserById(Guid id); /// @@ -73,16 +73,16 @@ namespace MediaBrowser.Controller.Library /// The user. /// The new name. /// Task. - /// user - /// + /// user + /// Task RenameUser(User user, string newName); /// /// Updates the user. /// /// The user. - /// user - /// + /// user + /// void UpdateUser(User user); /// @@ -90,8 +90,8 @@ namespace MediaBrowser.Controller.Library /// /// The name. /// User. - /// name - /// + /// name + /// Task CreateUser(string name); /// @@ -99,8 +99,8 @@ namespace MediaBrowser.Controller.Library /// /// The user. /// Task. - /// user - /// + /// user + /// Task DeleteUser(User user); /// diff --git a/MediaBrowser.Controller/Library/ItemResolveArgs.cs b/MediaBrowser.Controller/Library/ItemResolveArgs.cs index eb459e890..7bb8325f8 100644 --- a/MediaBrowser.Controller/Library/ItemResolveArgs.cs +++ b/MediaBrowser.Controller/Library/ItemResolveArgs.cs @@ -138,7 +138,7 @@ namespace MediaBrowser.Controller.Library /// Adds the additional location. /// /// The path. - /// + /// public void AddAdditionalLocation(string path) { if (string.IsNullOrEmpty(path)) @@ -173,7 +173,7 @@ namespace MediaBrowser.Controller.Library /// /// The name. /// FileSystemInfo. - /// + /// public FileSystemMetadata GetFileSystemEntryByName(string name) { if (string.IsNullOrEmpty(name)) @@ -189,7 +189,7 @@ namespace MediaBrowser.Controller.Library /// /// The path. /// FileSystemInfo. - /// + /// public FileSystemMetadata GetFileSystemEntryByPath(string path) { if (string.IsNullOrEmpty(path)) @@ -228,10 +228,10 @@ namespace MediaBrowser.Controller.Library #region Equality Overrides /// - /// Determines whether the specified is equal to this instance. + /// Determines whether the specified is equal to this instance. /// /// The object to compare with the current object. - /// true if the specified is equal to this instance; otherwise, false. + /// true if the specified is equal to this instance; otherwise, false. public override bool Equals(object obj) { return Equals(obj as ItemResolveArgs); diff --git a/MediaBrowser.Controller/Net/IWebSocketConnection.cs b/MediaBrowser.Controller/Net/IWebSocketConnection.cs index 6d31c6dbb..a09b2f7a2 100644 --- a/MediaBrowser.Controller/Net/IWebSocketConnection.cs +++ b/MediaBrowser.Controller/Net/IWebSocketConnection.cs @@ -62,7 +62,7 @@ namespace MediaBrowser.Controller.Net /// The message. /// The cancellation token. /// Task. - /// message + /// message Task SendAsync(WebSocketMessage message, CancellationToken cancellationToken); /// @@ -79,7 +79,7 @@ namespace MediaBrowser.Controller.Net /// The text. /// The cancellation token. /// Task. - /// buffer + /// buffer Task SendAsync(string text, CancellationToken cancellationToken); } } diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs index 6a4f0aa08..771027103 100644 --- a/MediaBrowser.Controller/Session/ISessionManager.cs +++ b/MediaBrowser.Controller/Session/ISessionManager.cs @@ -90,7 +90,7 @@ namespace MediaBrowser.Controller.Session /// /// The info. /// Task. - /// + /// Task OnPlaybackProgress(PlaybackProgressInfo info); Task OnPlaybackProgress(PlaybackProgressInfo info, bool isAutomated); @@ -100,7 +100,7 @@ namespace MediaBrowser.Controller.Session /// /// The info. /// Task. - /// + /// Task OnPlaybackStopped(PlaybackStopInfo info); /// diff --git a/MediaBrowser.Controller/Sorting/SortExtensions.cs b/MediaBrowser.Controller/Sorting/SortExtensions.cs index 56d9c1a64..111f4f17f 100644 --- a/MediaBrowser.Controller/Sorting/SortExtensions.cs +++ b/MediaBrowser.Controller/Sorting/SortExtensions.cs @@ -72,8 +72,8 @@ namespace MediaBrowser.Controller.Sorting char thisCh = s1[thisMarker]; char thatCh = s2[thatMarker]; - StringBuilder thisChunk = new StringBuilder(); - StringBuilder thatChunk = new StringBuilder(); + var thisChunk = new StringBuilder(); + var thatChunk = new StringBuilder(); while ((thisMarker < s1.Length) && (thisChunk.Length == 0 || InChunk(thisCh, thisChunk[0]))) { diff --git a/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs b/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs index 0a4928ed7..e4efa2c35 100644 --- a/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs +++ b/MediaBrowser.LocalMetadata/Images/LocalImageProvider.cs @@ -96,7 +96,7 @@ namespace MediaBrowser.LocalMetadata.Images public List GetImages(BaseItem item, IEnumerable paths, bool arePathsInMediaFolders, IDirectoryService directoryService) { - IEnumerable files = paths.SelectMany(i => _fileSystem.GetFiles(i, BaseItem.SupportedImageExtensions, true, false)); + var files = paths.SelectMany(i => _fileSystem.GetFiles(i, BaseItem.SupportedImageExtensions, true, false)); files = files .OrderBy(i => Array.IndexOf(BaseItem.SupportedImageExtensions, i.Extension ?? string.Empty)); diff --git a/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs index fef673bfd..0ee283325 100644 --- a/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs @@ -51,7 +51,7 @@ namespace MediaBrowser.LocalMetadata.Parsers /// The item. /// The metadata file. /// The cancellation token. - /// + /// public void Fetch(MetadataResult item, string metadataFile, CancellationToken cancellationToken) { if (item == null) @@ -102,7 +102,7 @@ namespace MediaBrowser.LocalMetadata.Parsers { item.ResetPeople(); - using (Stream fileStream = FileSystem.OpenRead(metadataFile)) + using (var fileStream = FileSystem.OpenRead(metadataFile)) { using (var streamReader = new StreamReader(fileStream, encoding)) { @@ -263,7 +263,7 @@ namespace MediaBrowser.LocalMetadata.Parsers { MetadataFields field; - if (Enum.TryParse(i, true, out field)) + if (Enum.TryParse(i, true, out field)) { return (MetadataFields?)field; } @@ -384,7 +384,7 @@ namespace MediaBrowser.LocalMetadata.Parsers case "Director": { - foreach (var p in SplitNames(reader.ReadElementContentAsString()).Select(v => new Controller.Entities.PersonInfo { Name = v.Trim(), Type = PersonType.Director })) + foreach (var p in SplitNames(reader.ReadElementContentAsString()).Select(v => new PersonInfo { Name = v.Trim(), Type = PersonType.Director })) { if (string.IsNullOrWhiteSpace(p.Name)) { @@ -396,7 +396,7 @@ namespace MediaBrowser.LocalMetadata.Parsers } case "Writer": { - foreach (var p in SplitNames(reader.ReadElementContentAsString()).Select(v => new Controller.Entities.PersonInfo { Name = v.Trim(), Type = PersonType.Writer })) + foreach (var p in SplitNames(reader.ReadElementContentAsString()).Select(v => new PersonInfo { Name = v.Trim(), Type = PersonType.Writer })) { if (string.IsNullOrWhiteSpace(p.Name)) { @@ -421,7 +421,7 @@ namespace MediaBrowser.LocalMetadata.Parsers else { // Old-style piped string - foreach (var p in SplitNames(actors).Select(v => new Controller.Entities.PersonInfo { Name = v.Trim(), Type = PersonType.Actor })) + foreach (var p in SplitNames(actors).Select(v => new PersonInfo { Name = v.Trim(), Type = PersonType.Actor })) { if (string.IsNullOrWhiteSpace(p.Name)) { @@ -435,7 +435,7 @@ namespace MediaBrowser.LocalMetadata.Parsers case "GuestStars": { - foreach (var p in SplitNames(reader.ReadElementContentAsString()).Select(v => new Controller.Entities.PersonInfo { Name = v.Trim(), Type = PersonType.GuestStar })) + foreach (var p in SplitNames(reader.ReadElementContentAsString()).Select(v => new PersonInfo { Name = v.Trim(), Type = PersonType.GuestStar })) { if (string.IsNullOrWhiteSpace(p.Name)) { diff --git a/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs b/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs index 2ddf922f9..2eac35f28 100644 --- a/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs +++ b/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs @@ -130,7 +130,7 @@ namespace MediaBrowser.LocalMetadata.Savers CloseOutput = false }; - using (XmlWriter writer = XmlWriter.Create(stream, settings)) + using (var writer = XmlWriter.Create(stream, settings)) { var root = GetRootElementName(item); diff --git a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs index 262772959..c0578aad1 100644 --- a/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs +++ b/MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs @@ -152,7 +152,7 @@ namespace MediaBrowser.MediaEncoding.Encoder private string GetProcessOutput(string path, string arguments) { - IProcess process = _processFactory.Create(new ProcessOptions + var process = _processFactory.Create(new ProcessOptions { CreateNoWindow = true, UseShellExecute = false, diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs index 8489cc9b1..63642b571 100644 --- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs +++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs @@ -457,7 +457,7 @@ namespace MediaBrowser.MediaEncoding.Encoder /// The input files. /// The protocol. /// System.String. - /// Unrecognized InputType + /// Unrecognized InputType public string GetInputArgument(string[] inputFiles, MediaProtocol protocol) { return EncodingUtils.GetInputArgument(inputFiles.ToList(), protocol); diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs index 51d2bcba7..7b8964707 100644 --- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs +++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs @@ -300,7 +300,7 @@ namespace MediaBrowser.MediaEncoding.Probing private void ReadFromDictNode(XmlReader reader, MediaInfo info) { string currentKey = null; - List pairs = new List(); + var pairs = new List(); reader.MoveToContent(); reader.Read(); @@ -360,7 +360,7 @@ namespace MediaBrowser.MediaEncoding.Probing private List ReadValueArray(XmlReader reader) { - List pairs = new List(); + var pairs = new List(); reader.MoveToContent(); reader.Read(); @@ -881,7 +881,7 @@ namespace MediaBrowser.MediaEncoding.Probing } } - private void SetSize(InternalMediaInfoResult data, Model.MediaInfo.MediaInfo info) + private void SetSize(InternalMediaInfoResult data, MediaInfo info) { if (data.format != null) { @@ -901,7 +901,7 @@ namespace MediaBrowser.MediaEncoding.Probing var composer = FFProbeHelpers.GetDictionaryValue(tags, "composer"); if (!string.IsNullOrWhiteSpace(composer)) { - List peoples = new List(); + var peoples = new List(); foreach (var person in Split(composer, false)) { peoples.Add(new BaseItemPerson { Name = person, Type = PersonType.Composer }); @@ -932,7 +932,7 @@ namespace MediaBrowser.MediaEncoding.Probing if (!string.IsNullOrWhiteSpace(writer)) { - List peoples = new List(); + var peoples = new List(); foreach (var person in Split(writer, false)) { peoples.Add(new BaseItemPerson { Name = person, Type = PersonType.Writer }); @@ -1125,7 +1125,7 @@ namespace MediaBrowser.MediaEncoding.Probing if (!string.IsNullOrEmpty(val)) { var studios = Split(val, true); - List studioList = new List(); + var studioList = new List(); foreach (var studio in studios) { @@ -1160,7 +1160,7 @@ namespace MediaBrowser.MediaEncoding.Probing if (!string.IsNullOrEmpty(val)) { - List genres = new List(info.Genres); + var genres = new List(info.Genres); foreach (var genre in Split(val, true)) { genres.Add(genre); diff --git a/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs b/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs index 0aa6a3e44..7f312eaec 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs @@ -17,7 +17,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles public SubtitleTrackInfo Parse(Stream stream, CancellationToken cancellationToken) { var trackInfo = new SubtitleTrackInfo(); - List trackEvents = new List(); + var trackEvents = new List(); var eventIndex = 1; using (var reader = new StreamReader(stream)) { diff --git a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs index c3f6d4947..02ce71ec3 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs @@ -24,7 +24,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles public SubtitleTrackInfo Parse(Stream stream, CancellationToken cancellationToken) { var trackInfo = new SubtitleTrackInfo(); - List trackEvents = new List(); + var trackEvents = new List(); using (var reader = new StreamReader(stream)) { string line; diff --git a/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs b/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs index 1cd714f32..8281de764 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs @@ -16,7 +16,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles public SubtitleTrackInfo Parse(Stream stream, CancellationToken cancellationToken) { var trackInfo = new SubtitleTrackInfo(); - List trackEvents = new List(); + var trackEvents = new List(); using (var reader = new StreamReader(stream)) { diff --git a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs index 3b7514613..4f424d39b 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs @@ -408,7 +408,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles /// The output path. /// The cancellation token. /// Task. - /// + /// /// inputPath /// or /// outputPath @@ -525,7 +525,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles /// The output path. /// The cancellation token. /// Task. - /// Must use inputPath list overload + /// Must use inputPath list overload private async Task ExtractTextSubtitle( string[] inputFiles, MediaProtocol protocol, @@ -734,7 +734,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles { if (protocol == MediaProtocol.Http) { - HttpRequestOptions opts = new HttpRequestOptions() + var opts = new HttpRequestOptions() { Url = path, CancellationToken = cancellationToken diff --git a/MediaBrowser.MediaEncoding/Subtitles/VttWriter.cs b/MediaBrowser.MediaEncoding/Subtitles/VttWriter.cs index d67d1dad8..2e328ba63 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/VttWriter.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/VttWriter.cs @@ -19,8 +19,8 @@ namespace MediaBrowser.MediaEncoding.Subtitles { cancellationToken.ThrowIfCancellationRequested(); - TimeSpan startTime = TimeSpan.FromTicks(trackEvent.StartPositionTicks); - TimeSpan endTime = TimeSpan.FromTicks(trackEvent.EndPositionTicks); + var startTime = TimeSpan.FromTicks(trackEvent.StartPositionTicks); + var endTime = TimeSpan.FromTicks(trackEvent.EndPositionTicks); // make sure the start and end times are different and seqential if (endTime.TotalMilliseconds <= startTime.TotalMilliseconds) diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs index ec9b276a0..b3d035be2 100644 --- a/MediaBrowser.Model/Configuration/LibraryOptions.cs +++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs @@ -100,7 +100,7 @@ namespace MediaBrowser.Model.Configuration public ImageOption GetImageOptions(ImageType type) { - foreach (ImageOption i in ImageOptions) + foreach (var i in ImageOptions) { if (i.Type == type) { @@ -111,7 +111,7 @@ namespace MediaBrowser.Model.Configuration ImageOption[] options; if (DefaultImageOptions.TryGetValue(Type, out options)) { - foreach (ImageOption i in options) + foreach (var i in options) { if (i.Type == type) { diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.cs index fe8926735..ae7d17275 100644 --- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs +++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs @@ -267,7 +267,7 @@ namespace MediaBrowser.Model.Dlna return !condition.IsRequired; } - TransportStreamTimestamp expected = (TransportStreamTimestamp)Enum.Parse(typeof(TransportStreamTimestamp), condition.Value, true); + var expected = (TransportStreamTimestamp)Enum.Parse(typeof(TransportStreamTimestamp), condition.Value, true); switch (condition.Condition) { diff --git a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs index ecca415d3..b71531bf1 100644 --- a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs +++ b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs @@ -24,14 +24,14 @@ namespace MediaBrowser.Model.Dlna // 0 = native, 1 = transcoded var orgCi = isDirectStream ? ";DLNA.ORG_CI=0" : ";DLNA.ORG_CI=1"; - DlnaFlags flagValue = DlnaFlags.BackgroundTransferMode | + var flagValue = DlnaFlags.BackgroundTransferMode | DlnaFlags.InteractiveTransferMode | DlnaFlags.DlnaV15; string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}", DlnaMaps.FlagsToString(flagValue)); - ResponseProfile mediaProfile = _profile.GetImageMediaProfile(container, + var mediaProfile = _profile.GetImageMediaProfile(container, width, height); @@ -66,7 +66,7 @@ namespace MediaBrowser.Model.Dlna // 0 = native, 1 = transcoded string orgCi = isDirectStream ? ";DLNA.ORG_CI=0" : ";DLNA.ORG_CI=1"; - DlnaFlags flagValue = DlnaFlags.StreamingTransferMode | + var flagValue = DlnaFlags.StreamingTransferMode | DlnaFlags.BackgroundTransferMode | DlnaFlags.InteractiveTransferMode | DlnaFlags.DlnaV15; @@ -83,7 +83,7 @@ namespace MediaBrowser.Model.Dlna string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}", DlnaMaps.FlagsToString(flagValue)); - ResponseProfile mediaProfile = _profile.GetAudioMediaProfile(container, + var mediaProfile = _profile.GetAudioMediaProfile(container, audioCodec, audioChannels, audioBitrate, @@ -131,7 +131,7 @@ namespace MediaBrowser.Model.Dlna // 0 = native, 1 = transcoded string orgCi = isDirectStream ? ";DLNA.ORG_CI=0" : ";DLNA.ORG_CI=1"; - DlnaFlags flagValue = DlnaFlags.StreamingTransferMode | + var flagValue = DlnaFlags.StreamingTransferMode | DlnaFlags.BackgroundTransferMode | DlnaFlags.InteractiveTransferMode | DlnaFlags.DlnaV15; @@ -148,7 +148,7 @@ namespace MediaBrowser.Model.Dlna string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}", DlnaMaps.FlagsToString(flagValue)); - ResponseProfile mediaProfile = _profile.GetVideoMediaProfile(container, + var mediaProfile = _profile.GetVideoMediaProfile(container, audioCodec, videoCodec, width, @@ -168,7 +168,7 @@ namespace MediaBrowser.Model.Dlna videoCodecTag, isAvc); - List orgPnValues = new List(); + var orgPnValues = new List(); if (mediaProfile != null && !string.IsNullOrEmpty(mediaProfile.OrgPn)) { @@ -183,7 +183,7 @@ namespace MediaBrowser.Model.Dlna } } - List contentFeatureList = new List(); + var contentFeatureList = new List(); foreach (string orgPn in orgPnValues) { diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs index 3a626deaa..8124cf528 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfile.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs @@ -21,7 +21,7 @@ namespace MediaBrowser.Model.Dlna /// Gets or sets the identification. /// /// The identification. - public MediaBrowser.Model.Dlna.DeviceIdentification Identification { get; set; } + public DeviceIdentification Identification { get; set; } public string FriendlyName { get; set; } public string Manufacturer { get; set; } @@ -191,7 +191,7 @@ namespace MediaBrowser.Model.Dlna var conditionProcessor = new ConditionProcessor(); var anyOff = false; - foreach (ProfileCondition c in i.Conditions) + foreach (var c in i.Conditions) { if (!conditionProcessor.IsAudioConditionSatisfied(GetModelProfileCondition(c), audioChannels, audioBitrate, audioSampleRate, audioBitDepth)) { @@ -238,7 +238,7 @@ namespace MediaBrowser.Model.Dlna var conditionProcessor = new ConditionProcessor(); var anyOff = false; - foreach (ProfileCondition c in i.Conditions) + foreach (var c in i.Conditions) { if (!conditionProcessor.IsImageConditionSatisfied(GetModelProfileCondition(c), width, height)) { @@ -304,7 +304,7 @@ namespace MediaBrowser.Model.Dlna var conditionProcessor = new ConditionProcessor(); var anyOff = false; - foreach (ProfileCondition c in i.Conditions) + foreach (var c in i.Conditions) { if (!conditionProcessor.IsVideoConditionSatisfied(GetModelProfileCondition(c), width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) { diff --git a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs index 42c78e335..672784589 100644 --- a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs +++ b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs @@ -91,7 +91,7 @@ namespace MediaBrowser.Model.Dlna if (StringHelper.EqualsIgnoreCase(videoCodec, "mpeg2video")) { - List list = new List(); + var list = new List(); list.Add(ValueOf("MPEG_TS_SD_NA" + suffix)); list.Add(ValueOf("MPEG_TS_SD_EU" + suffix)); diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index f1ec71d1d..2335f0553 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -32,7 +32,7 @@ namespace MediaBrowser.Model.Dlna ValidateAudioInput(options); var mediaSources = new List(); - foreach (MediaSourceInfo i in options.MediaSources) + foreach (var i in options.MediaSources) { if (string.IsNullOrEmpty(options.MediaSourceId) || StringHelper.EqualsIgnoreCase(i.Id, options.MediaSourceId)) @@ -42,16 +42,16 @@ namespace MediaBrowser.Model.Dlna } var streams = new List(); - foreach (MediaSourceInfo i in mediaSources) + foreach (var i in mediaSources) { - StreamInfo streamInfo = BuildAudioItem(i, options); + var streamInfo = BuildAudioItem(i, options); if (streamInfo != null) { streams.Add(streamInfo); } } - foreach (StreamInfo stream in streams) + foreach (var stream in streams) { stream.DeviceId = options.DeviceId; stream.DeviceProfileId = options.Profile.Id; @@ -65,7 +65,7 @@ namespace MediaBrowser.Model.Dlna ValidateInput(options); var mediaSources = new List(); - foreach (MediaSourceInfo i in options.MediaSources) + foreach (var i in options.MediaSources) { if (string.IsNullOrEmpty(options.MediaSourceId) || StringHelper.EqualsIgnoreCase(i.Id, options.MediaSourceId)) @@ -75,16 +75,16 @@ namespace MediaBrowser.Model.Dlna } var streams = new List(); - foreach (MediaSourceInfo i in mediaSources) + foreach (var i in mediaSources) { - StreamInfo streamInfo = BuildVideoItem(i, options); + var streamInfo = BuildVideoItem(i, options); if (streamInfo != null) { streams.Add(streamInfo); } } - foreach (StreamInfo stream in streams) + foreach (var stream in streams) { stream.DeviceId = options.DeviceId; stream.DeviceProfileId = options.Profile.Id; @@ -97,7 +97,7 @@ namespace MediaBrowser.Model.Dlna { var sorted = SortMediaSources(streams, maxBitrate); - foreach (StreamInfo stream in sorted) + foreach (var stream in sorted) { return stream; } @@ -284,7 +284,7 @@ namespace MediaBrowser.Model.Dlna { var transcodeReasons = new List(); - StreamInfo playlistItem = new StreamInfo + var playlistItem = new StreamInfo { ItemId = options.ItemId, MediaType = DlnaProfileType.Audio, @@ -308,14 +308,14 @@ namespace MediaBrowser.Model.Dlna return playlistItem; } - MediaStream audioStream = item.GetDefaultAudioStream(null); + var audioStream = item.GetDefaultAudioStream(null); var directPlayInfo = GetAudioDirectPlayMethods(item, audioStream, options); var directPlayMethods = directPlayInfo.Item1; transcodeReasons.AddRange(directPlayInfo.Item2); - ConditionProcessor conditionProcessor = new ConditionProcessor(); + var conditionProcessor = new ConditionProcessor(); int? inputAudioChannels = audioStream == null ? null : audioStream.Channels; int? inputAudioBitrate = audioStream == null ? null : audioStream.BitDepth; @@ -328,12 +328,12 @@ namespace MediaBrowser.Model.Dlna // Make sure audio codec profiles are satisfied var conditions = new List(); - foreach (CodecProfile i in options.Profile.CodecProfiles) + foreach (var i in options.Profile.CodecProfiles) { if (i.Type == CodecType.Audio && i.ContainsAnyCodec(audioCodec, item.Container)) { bool applyConditions = true; - foreach (ProfileCondition applyCondition in i.ApplyConditions) + foreach (var applyCondition in i.ApplyConditions) { if (!conditionProcessor.IsAudioConditionSatisfied(applyCondition, inputAudioChannels, inputAudioBitrate, inputAudioSampleRate, inputAudioBitDepth)) { @@ -345,7 +345,7 @@ namespace MediaBrowser.Model.Dlna if (applyConditions) { - foreach (ProfileCondition c in i.Conditions) + foreach (var c in i.Conditions) { conditions.Add(c); } @@ -354,7 +354,7 @@ namespace MediaBrowser.Model.Dlna } bool all = true; - foreach (ProfileCondition c in conditions) + foreach (var c in conditions) { if (!conditionProcessor.IsAudioConditionSatisfied(c, inputAudioChannels, inputAudioBitrate, inputAudioSampleRate, inputAudioBitDepth)) { @@ -383,7 +383,7 @@ namespace MediaBrowser.Model.Dlna } TranscodingProfile transcodingProfile = null; - foreach (TranscodingProfile i in options.Profile.TranscodingProfiles) + foreach (var i in options.Profile.TranscodingProfiles) { if (i.Type == playlistItem.MediaType && i.Context == options.Context) { @@ -405,7 +405,7 @@ namespace MediaBrowser.Model.Dlna SetStreamInfoOptionsFromTranscodingProfile(playlistItem, transcodingProfile); var audioCodecProfiles = new List(); - foreach (CodecProfile i in options.Profile.CodecProfiles) + foreach (var i in options.Profile.CodecProfiles) { if (i.Type == CodecType.Audio && i.ContainsAnyCodec(transcodingProfile.AudioCodec, transcodingProfile.Container)) { @@ -416,10 +416,10 @@ namespace MediaBrowser.Model.Dlna } var audioTranscodingConditions = new List(); - foreach (CodecProfile i in audioCodecProfiles) + foreach (var i in audioCodecProfiles) { bool applyConditions = true; - foreach (ProfileCondition applyCondition in i.ApplyConditions) + foreach (var applyCondition in i.ApplyConditions) { if (!conditionProcessor.IsAudioConditionSatisfied(applyCondition, inputAudioChannels, inputAudioBitrate, inputAudioSampleRate, inputAudioBitDepth)) { @@ -431,7 +431,7 @@ namespace MediaBrowser.Model.Dlna if (applyConditions) { - foreach (ProfileCondition c in i.Conditions) + foreach (var c in i.Conditions) { audioTranscodingConditions.Add(c); } @@ -478,7 +478,7 @@ namespace MediaBrowser.Model.Dlna var transcodeReasons = new List(); DirectPlayProfile directPlayProfile = null; - foreach (DirectPlayProfile i in options.Profile.DirectPlayProfiles) + foreach (var i in options.Profile.DirectPlayProfiles) { if (i.Type == DlnaProfileType.Audio && IsAudioDirectPlaySupported(i, item, audioStream)) { @@ -607,7 +607,7 @@ namespace MediaBrowser.Model.Dlna { int highestScore = -1; - foreach (MediaStream stream in item.MediaStreams) + foreach (var stream in item.MediaStreams) { if (stream.Type == MediaStreamType.Subtitle && stream.Score.HasValue) { @@ -619,7 +619,7 @@ namespace MediaBrowser.Model.Dlna } var topStreams = new List(); - foreach (MediaStream stream in item.MediaStreams) + foreach (var stream in item.MediaStreams) { if (stream.Type == MediaStreamType.Subtitle && stream.Score.HasValue && stream.Score.Value == highestScore) { @@ -630,9 +630,9 @@ namespace MediaBrowser.Model.Dlna // If multiple streams have an equal score, try to pick the most efficient one if (topStreams.Count > 1) { - foreach (MediaStream stream in topStreams) + foreach (var stream in topStreams) { - foreach (SubtitleProfile profile in subtitleProfiles) + foreach (var profile in subtitleProfiles) { if (profile.Method == SubtitleDeliveryMethod.External && StringHelper.EqualsIgnoreCase(profile.Format, stream.Codec)) { @@ -705,7 +705,7 @@ namespace MediaBrowser.Model.Dlna var transcodeReasons = new List(); - StreamInfo playlistItem = new StreamInfo + var playlistItem = new StreamInfo { ItemId = options.ItemId, MediaType = DlnaProfileType.Video, @@ -716,15 +716,15 @@ namespace MediaBrowser.Model.Dlna }; playlistItem.SubtitleStreamIndex = options.SubtitleStreamIndex ?? GetDefaultSubtitleStreamIndex(item, options.Profile.SubtitleProfiles); - MediaStream subtitleStream = playlistItem.SubtitleStreamIndex.HasValue ? item.GetMediaStream(MediaStreamType.Subtitle, playlistItem.SubtitleStreamIndex.Value) : null; + var subtitleStream = playlistItem.SubtitleStreamIndex.HasValue ? item.GetMediaStream(MediaStreamType.Subtitle, playlistItem.SubtitleStreamIndex.Value) : null; - MediaStream audioStream = item.GetDefaultAudioStream(options.AudioStreamIndex ?? item.DefaultAudioStreamIndex); + var audioStream = item.GetDefaultAudioStream(options.AudioStreamIndex ?? item.DefaultAudioStreamIndex); if (audioStream != null) { playlistItem.AudioStreamIndex = audioStream.Index; } - MediaStream videoStream = item.VideoStream; + var videoStream = item.VideoStream; // TODO: This doesn't accout for situation of device being able to handle media bitrate, but wifi connection not fast enough var directPlayEligibilityResult = IsEligibleForDirectPlay(item, GetBitrateForDirectPlayCheck(item, options, true) ?? 0, subtitleStream, options, PlayMethod.DirectPlay); @@ -751,7 +751,7 @@ namespace MediaBrowser.Model.Dlna if (subtitleStream != null) { - SubtitleProfile subtitleProfile = GetSubtitleProfile(item, subtitleStream, options.Profile.SubtitleProfiles, directPlay.Value, _transcoderSupport, item.Container, null); + var subtitleProfile = GetSubtitleProfile(item, subtitleStream, options.Profile.SubtitleProfiles, directPlay.Value, _transcoderSupport, item.Container, null); playlistItem.SubtitleDeliveryMethod = subtitleProfile.Method; playlistItem.SubtitleFormat = subtitleProfile.Format; @@ -775,7 +775,7 @@ namespace MediaBrowser.Model.Dlna // Can't direct play, find the transcoding profile TranscodingProfile transcodingProfile = null; - foreach (TranscodingProfile i in options.Profile.TranscodingProfiles) + foreach (var i in options.Profile.TranscodingProfiles) { if (i.Type == playlistItem.MediaType && i.Context == options.Context) { @@ -793,7 +793,7 @@ namespace MediaBrowser.Model.Dlna if (subtitleStream != null) { - SubtitleProfile subtitleProfile = GetSubtitleProfile(item, subtitleStream, options.Profile.SubtitleProfiles, PlayMethod.Transcode, _transcoderSupport, transcodingProfile.Container, transcodingProfile.Protocol); + var subtitleProfile = GetSubtitleProfile(item, subtitleStream, options.Profile.SubtitleProfiles, PlayMethod.Transcode, _transcoderSupport, transcodingProfile.Container, transcodingProfile.Protocol); playlistItem.SubtitleDeliveryMethod = subtitleProfile.Method; playlistItem.SubtitleFormat = subtitleProfile.Format; @@ -804,15 +804,15 @@ namespace MediaBrowser.Model.Dlna SetStreamInfoOptionsFromTranscodingProfile(playlistItem, transcodingProfile); - ConditionProcessor conditionProcessor = new ConditionProcessor(); + var conditionProcessor = new ConditionProcessor(); var isFirstAppliedCodecProfile = true; - foreach (CodecProfile i in options.Profile.CodecProfiles) + foreach (var i in options.Profile.CodecProfiles) { if (i.Type == CodecType.Video && i.ContainsAnyCodec(transcodingProfile.VideoCodec, transcodingProfile.Container)) { bool applyConditions = true; - foreach (ProfileCondition applyCondition in i.ApplyConditions) + foreach (var applyCondition in i.ApplyConditions) { int? width = videoStream == null ? null : videoStream.Width; int? height = videoStream == null ? null : videoStream.Height; @@ -863,12 +863,12 @@ namespace MediaBrowser.Model.Dlna playlistItem.AudioBitrate = Math.Min(playlistItem.AudioBitrate ?? audioBitrate, audioBitrate); isFirstAppliedCodecProfile = true; - foreach (CodecProfile i in options.Profile.CodecProfiles) + foreach (var i in options.Profile.CodecProfiles) { if (i.Type == CodecType.VideoAudio && i.ContainsAnyCodec(transcodingProfile.AudioCodec, transcodingProfile.Container)) { bool applyConditions = true; - foreach (ProfileCondition applyCondition in i.ApplyConditions) + foreach (var applyCondition in i.ApplyConditions) { bool? isSecondaryAudio = audioStream == null ? null : item.IsSecondaryAudio(audioStream); int? inputAudioBitrate = audioStream == null ? null : audioStream.BitRate; @@ -998,7 +998,7 @@ namespace MediaBrowser.Model.Dlna bool isEligibleForDirectPlay, bool isEligibleForDirectStream) { - DeviceProfile profile = options.Profile; + var profile = options.Profile; if (options.ForceDirectPlay) { @@ -1011,7 +1011,7 @@ namespace MediaBrowser.Model.Dlna // See if it can be direct played DirectPlayProfile directPlay = null; - foreach (DirectPlayProfile i in profile.DirectPlayProfiles) + foreach (var i in profile.DirectPlayProfiles) { if (i.Type == DlnaProfileType.Video && IsVideoDirectPlaySupported(i, mediaSource, videoStream, audioStream)) { @@ -1032,19 +1032,19 @@ namespace MediaBrowser.Model.Dlna string container = mediaSource.Container; var conditions = new List(); - foreach (ContainerProfile i in profile.ContainerProfiles) + foreach (var i in profile.ContainerProfiles) { if (i.Type == DlnaProfileType.Video && i.ContainsContainer(container)) { - foreach (ProfileCondition c in i.Conditions) + foreach (var c in i.Conditions) { conditions.Add(c); } } } - ConditionProcessor conditionProcessor = new ConditionProcessor(); + var conditionProcessor = new ConditionProcessor(); int? width = videoStream == null ? null : videoStream.Width; int? height = videoStream == null ? null : videoStream.Height; @@ -1072,7 +1072,7 @@ namespace MediaBrowser.Model.Dlna int? numVideoStreams = mediaSource.GetStreamCount(MediaStreamType.Video); // Check container conditions - foreach (ProfileCondition i in conditions) + foreach (var i in conditions) { if (!conditionProcessor.IsVideoConditionSatisfied(i, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) { @@ -1090,12 +1090,12 @@ namespace MediaBrowser.Model.Dlna string videoCodec = videoStream == null ? null : videoStream.Codec; conditions = new List(); - foreach (CodecProfile i in profile.CodecProfiles) + foreach (var i in profile.CodecProfiles) { if (i.Type == CodecType.Video && i.ContainsAnyCodec(videoCodec, container)) { bool applyConditions = true; - foreach (ProfileCondition applyCondition in i.ApplyConditions) + foreach (var applyCondition in i.ApplyConditions) { if (!conditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) { @@ -1107,7 +1107,7 @@ namespace MediaBrowser.Model.Dlna if (applyConditions) { - foreach (ProfileCondition c in i.Conditions) + foreach (var c in i.Conditions) { conditions.Add(c); } @@ -1115,7 +1115,7 @@ namespace MediaBrowser.Model.Dlna } } - foreach (ProfileCondition i in conditions) + foreach (var i in conditions) { if (!conditionProcessor.IsVideoConditionSatisfied(i, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc)) { @@ -1137,12 +1137,12 @@ namespace MediaBrowser.Model.Dlna conditions = new List(); bool? isSecondaryAudio = audioStream == null ? null : mediaSource.IsSecondaryAudio(audioStream); - foreach (CodecProfile i in profile.CodecProfiles) + foreach (var i in profile.CodecProfiles) { if (i.Type == CodecType.VideoAudio && i.ContainsAnyCodec(audioCodec, container)) { bool applyConditions = true; - foreach (ProfileCondition applyCondition in i.ApplyConditions) + foreach (var applyCondition in i.ApplyConditions) { if (!conditionProcessor.IsVideoAudioConditionSatisfied(applyCondition, audioChannels, audioBitrate, audioSampleRate, audioBitDepth, audioProfile, isSecondaryAudio)) { @@ -1154,7 +1154,7 @@ namespace MediaBrowser.Model.Dlna if (applyConditions) { - foreach (ProfileCondition c in i.Conditions) + foreach (var c in i.Conditions) { conditions.Add(c); } @@ -1162,7 +1162,7 @@ namespace MediaBrowser.Model.Dlna } } - foreach (ProfileCondition i in conditions) + foreach (var i in conditions) { if (!conditionProcessor.IsVideoAudioConditionSatisfied(i, audioChannels, audioBitrate, audioSampleRate, audioBitDepth, audioProfile, isSecondaryAudio)) { @@ -1206,7 +1206,7 @@ namespace MediaBrowser.Model.Dlna { if (subtitleStream != null) { - SubtitleProfile subtitleProfile = GetSubtitleProfile(item, subtitleStream, options.Profile.SubtitleProfiles, playMethod, _transcoderSupport, item.Container, null); + var subtitleProfile = GetSubtitleProfile(item, subtitleStream, options.Profile.SubtitleProfiles, playMethod, _transcoderSupport, item.Container, null); if (subtitleProfile.Method != SubtitleDeliveryMethod.External && subtitleProfile.Method != SubtitleDeliveryMethod.Embed) { @@ -1230,7 +1230,7 @@ namespace MediaBrowser.Model.Dlna if (!subtitleStream.IsExternal && (playMethod != PlayMethod.Transcode || !string.Equals(transcodingSubProtocol, "hls", StringComparison.OrdinalIgnoreCase))) { // Look for supported embedded subs of the same format - foreach (SubtitleProfile profile in subtitleProfiles) + foreach (var profile in subtitleProfiles) { if (!profile.SupportsLanguage(subtitleStream.Language)) { @@ -1259,7 +1259,7 @@ namespace MediaBrowser.Model.Dlna } // Look for supported embedded subs of a convertible format - foreach (SubtitleProfile profile in subtitleProfiles) + foreach (var profile in subtitleProfiles) { if (!profile.SupportsLanguage(subtitleStream.Language)) { @@ -1328,7 +1328,7 @@ namespace MediaBrowser.Model.Dlna private static SubtitleProfile GetExternalSubtitleProfile(MediaSourceInfo mediaSource, MediaStream subtitleStream, SubtitleProfile[] subtitleProfiles, PlayMethod playMethod, ITranscoderSupport transcoderSupport, bool allowConversion) { - foreach (SubtitleProfile profile in subtitleProfiles) + foreach (var profile in subtitleProfiles) { if (profile.Method != SubtitleDeliveryMethod.External && profile.Method != SubtitleDeliveryMethod.Hls) { @@ -1467,7 +1467,7 @@ namespace MediaBrowser.Model.Dlna private void ApplyTranscodingConditions(StreamInfo item, IEnumerable conditions, string qualifier, bool enableQualifiedConditions, bool enableNonQualifiedConditions) { - foreach (ProfileCondition condition in conditions) + foreach (var condition in conditions) { string value = condition.Value; diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs index 86d7c9d62..84bd1f429 100644 --- a/MediaBrowser.Model/Dlna/StreamInfo.cs +++ b/MediaBrowser.Model/Dlna/StreamInfo.cs @@ -145,8 +145,8 @@ namespace MediaBrowser.Model.Dlna throw new ArgumentNullException(nameof(baseUrl)); } - List list = new List(); - foreach (NameValuePair pair in BuildParams(this, accessToken)) + var list = new List(); + foreach (var pair in BuildParams(this, accessToken)) { if (string.IsNullOrEmpty(pair.Value)) { @@ -211,7 +211,7 @@ namespace MediaBrowser.Model.Dlna private static List BuildParams(StreamInfo item, string accessToken) { - List list = new List(); + var list = new List(); string audioCodecs = item.AudioCodecs.Length == 0 ? string.Empty : @@ -346,11 +346,11 @@ namespace MediaBrowser.Model.Dlna public List GetExternalSubtitles(ITranscoderSupport transcoderSupport, bool includeSelectedTrackOnly, bool enableAllProfiles, string baseUrl, string accessToken) { - List list = GetSubtitleProfiles(transcoderSupport, includeSelectedTrackOnly, enableAllProfiles, baseUrl, accessToken); - List newList = new List(); + var list = GetSubtitleProfiles(transcoderSupport, includeSelectedTrackOnly, enableAllProfiles, baseUrl, accessToken); + var newList = new List(); // First add the selected track - foreach (SubtitleStreamInfo stream in list) + foreach (var stream in list) { if (stream.DeliveryMethod == SubtitleDeliveryMethod.External) { @@ -368,7 +368,7 @@ namespace MediaBrowser.Model.Dlna public List GetSubtitleProfiles(ITranscoderSupport transcoderSupport, bool includeSelectedTrackOnly, bool enableAllProfiles, string baseUrl, string accessToken) { - List list = new List(); + var list = new List(); // HLS will preserve timestamps so we can just grab the full subtitle stream long startPositionTicks = StringHelper.EqualsIgnoreCase(SubProtocol, "hls") @@ -378,7 +378,7 @@ namespace MediaBrowser.Model.Dlna // First add the selected track if (SubtitleStreamIndex.HasValue) { - foreach (MediaStream stream in MediaSource.MediaStreams) + foreach (var stream in MediaSource.MediaStreams) { if (stream.Type == MediaStreamType.Subtitle && stream.Index == SubtitleStreamIndex.Value) { @@ -389,7 +389,7 @@ namespace MediaBrowser.Model.Dlna if (!includeSelectedTrackOnly) { - foreach (MediaStream stream in MediaSource.MediaStreams) + foreach (var stream in MediaSource.MediaStreams) { if (stream.Type == MediaStreamType.Subtitle && (!SubtitleStreamIndex.HasValue || stream.Index != SubtitleStreamIndex.Value)) { @@ -405,16 +405,16 @@ namespace MediaBrowser.Model.Dlna { if (enableAllProfiles) { - foreach (SubtitleProfile profile in DeviceProfile.SubtitleProfiles) + foreach (var profile in DeviceProfile.SubtitleProfiles) { - SubtitleStreamInfo info = GetSubtitleStreamInfo(stream, baseUrl, accessToken, startPositionTicks, new[] { profile }, transcoderSupport); + var info = GetSubtitleStreamInfo(stream, baseUrl, accessToken, startPositionTicks, new[] { profile }, transcoderSupport); list.Add(info); } } else { - SubtitleStreamInfo info = GetSubtitleStreamInfo(stream, baseUrl, accessToken, startPositionTicks, DeviceProfile.SubtitleProfiles, transcoderSupport); + var info = GetSubtitleStreamInfo(stream, baseUrl, accessToken, startPositionTicks, DeviceProfile.SubtitleProfiles, transcoderSupport); list.Add(info); } @@ -422,8 +422,8 @@ namespace MediaBrowser.Model.Dlna private SubtitleStreamInfo GetSubtitleStreamInfo(MediaStream stream, string baseUrl, string accessToken, long startPositionTicks, SubtitleProfile[] subtitleProfiles, ITranscoderSupport transcoderSupport) { - SubtitleProfile subtitleProfile = StreamBuilder.GetSubtitleProfile(MediaSource, stream, subtitleProfiles, PlayMethod, transcoderSupport, Container, SubProtocol); - SubtitleStreamInfo info = new SubtitleStreamInfo + var subtitleProfile = StreamBuilder.GetSubtitleProfile(MediaSource, stream, subtitleProfiles, PlayMethod, transcoderSupport, Container, SubProtocol); + var info = new SubtitleStreamInfo { IsForced = stream.IsForced, Language = stream.Language, @@ -502,7 +502,7 @@ namespace MediaBrowser.Model.Dlna { get { - MediaStream stream = TargetAudioStream; + var stream = TargetAudioStream; return stream == null ? null : stream.SampleRate; } } @@ -584,7 +584,7 @@ namespace MediaBrowser.Model.Dlna { get { - MediaStream stream = TargetVideoStream; + var stream = TargetVideoStream; return MaxFramerate.HasValue && !IsDirectStream ? MaxFramerate : stream == null ? null : stream.AverageFrameRate ?? stream.RealFrameRate; @@ -689,7 +689,7 @@ namespace MediaBrowser.Model.Dlna { get { - MediaStream stream = TargetVideoStream; + var stream = TargetVideoStream; return !IsDirectStream ? null : stream == null ? null : stream.PacketLength; @@ -727,7 +727,7 @@ namespace MediaBrowser.Model.Dlna { get { - MediaStream stream = TargetVideoStream; + var stream = TargetVideoStream; return !IsDirectStream ? null : stream == null ? null : stream.CodecTag; @@ -741,7 +741,7 @@ namespace MediaBrowser.Model.Dlna { get { - MediaStream stream = TargetAudioStream; + var stream = TargetAudioStream; return AudioBitrate.HasValue && !IsDirectStream ? AudioBitrate : stream == null ? null : stream.BitRate; @@ -797,7 +797,7 @@ namespace MediaBrowser.Model.Dlna { get { - MediaStream stream = TargetAudioStream; + var stream = TargetAudioStream; string inputCodec = stream == null ? null : stream.Codec; @@ -822,7 +822,7 @@ namespace MediaBrowser.Model.Dlna { get { - MediaStream stream = TargetVideoStream; + var stream = TargetVideoStream; string inputCodec = stream == null ? null : stream.Codec; @@ -878,7 +878,7 @@ namespace MediaBrowser.Model.Dlna { get { - MediaStream stream = TargetVideoStream; + var stream = TargetVideoStream; return VideoBitrate.HasValue && !IsDirectStream ? VideoBitrate @@ -890,7 +890,7 @@ namespace MediaBrowser.Model.Dlna { get { - TransportStreamTimestamp defaultValue = StringHelper.EqualsIgnoreCase(Container, "m2ts") + var defaultValue = StringHelper.EqualsIgnoreCase(Container, "m2ts") ? TransportStreamTimestamp.Valid : TransportStreamTimestamp.None; @@ -955,11 +955,11 @@ namespace MediaBrowser.Model.Dlna { get { - MediaStream videoStream = TargetVideoStream; + var videoStream = TargetVideoStream; if (videoStream != null && videoStream.Width.HasValue && videoStream.Height.HasValue) { - ImageSize size = new ImageSize + var size = new ImageSize { Width = videoStream.Width.Value, Height = videoStream.Height.Value @@ -968,7 +968,7 @@ namespace MediaBrowser.Model.Dlna double? maxWidth = MaxWidth.HasValue ? (double)MaxWidth.Value : (double?)null; double? maxHeight = MaxHeight.HasValue ? (double)MaxHeight.Value : (double?)null; - ImageSize newSize = DrawingUtils.Resize(size, + var newSize = DrawingUtils.Resize(size, 0, 0, maxWidth ?? 0, @@ -985,11 +985,11 @@ namespace MediaBrowser.Model.Dlna { get { - MediaStream videoStream = TargetVideoStream; + var videoStream = TargetVideoStream; if (videoStream != null && videoStream.Width.HasValue && videoStream.Height.HasValue) { - ImageSize size = new ImageSize + var size = new ImageSize { Width = videoStream.Width.Value, Height = videoStream.Height.Value @@ -998,7 +998,7 @@ namespace MediaBrowser.Model.Dlna double? maxWidth = MaxWidth.HasValue ? (double)MaxWidth.Value : (double?)null; double? maxHeight = MaxHeight.HasValue ? (double)MaxHeight.Value : (double?)null; - ImageSize newSize = DrawingUtils.Resize(size, + var newSize = DrawingUtils.Resize(size, 0, 0, maxWidth ?? 0, @@ -1059,9 +1059,9 @@ namespace MediaBrowser.Model.Dlna public List GetSelectableStreams(MediaStreamType type) { - List list = new List(); + var list = new List(); - foreach (MediaStream stream in MediaSource.MediaStreams) + foreach (var stream in MediaSource.MediaStreams) { if (type == stream.Type) { diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs index c2219dc33..92e40fb01 100644 --- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs +++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs @@ -120,7 +120,7 @@ namespace MediaBrowser.Model.Dto { var val = defaultIndex.Value; - foreach (MediaStream i in MediaStreams) + foreach (var i in MediaStreams) { if (i.Type == MediaStreamType.Audio && i.Index == val) { @@ -129,7 +129,7 @@ namespace MediaBrowser.Model.Dto } } - foreach (MediaStream i in MediaStreams) + foreach (var i in MediaStreams) { if (i.Type == MediaStreamType.Audio && i.IsDefault) { @@ -137,7 +137,7 @@ namespace MediaBrowser.Model.Dto } } - foreach (MediaStream i in MediaStreams) + foreach (var i in MediaStreams) { if (i.Type == MediaStreamType.Audio) { @@ -153,7 +153,7 @@ namespace MediaBrowser.Model.Dto { get { - foreach (MediaStream i in MediaStreams) + foreach (var i in MediaStreams) { if (i.Type == MediaStreamType.Video) { @@ -167,7 +167,7 @@ namespace MediaBrowser.Model.Dto public MediaStream GetMediaStream(MediaStreamType type, int index) { - foreach (MediaStream i in MediaStreams) + foreach (var i in MediaStreams) { if (i.Type == type && i.Index == index) { @@ -183,7 +183,7 @@ namespace MediaBrowser.Model.Dto int numMatches = 0; int numStreams = 0; - foreach (MediaStream i in MediaStreams) + foreach (var i in MediaStreams) { numStreams++; if (i.Type == type) @@ -203,7 +203,7 @@ namespace MediaBrowser.Model.Dto public bool? IsSecondaryAudio(MediaStream stream) { // Look for the first audio track marked as default - foreach (MediaStream currentStream in MediaStreams) + foreach (var currentStream in MediaStreams) { if (currentStream.Type == MediaStreamType.Audio && currentStream.IsDefault) { @@ -215,7 +215,7 @@ namespace MediaBrowser.Model.Dto } // Look for the first audio track - foreach (MediaStream currentStream in MediaStreams) + foreach (var currentStream in MediaStreams) { if (currentStream.Type == MediaStreamType.Audio) { diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs index b51942af8..e0c3bead1 100644 --- a/MediaBrowser.Model/Entities/MediaStream.cs +++ b/MediaBrowser.Model/Entities/MediaStream.cs @@ -76,7 +76,7 @@ namespace MediaBrowser.Model.Entities // return AddLanguageIfNeeded(Title); //} - List attributes = new List(); + var attributes = new List(); if (!string.IsNullOrEmpty(Language)) { @@ -109,7 +109,7 @@ namespace MediaBrowser.Model.Entities if (Type == MediaStreamType.Video) { - List attributes = new List(); + var attributes = new List(); var resolutionText = GetResolutionText(); @@ -133,7 +133,7 @@ namespace MediaBrowser.Model.Entities // return AddLanguageIfNeeded(Title); //} - List attributes = new List(); + var attributes = new List(); if (!string.IsNullOrEmpty(Language)) { diff --git a/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs b/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs index edede8ba9..a5ae7c7a5 100644 --- a/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs +++ b/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs @@ -36,7 +36,7 @@ namespace MediaBrowser.Model.MediaInfo DirectPlayProtocols = new MediaProtocol[] { MediaProtocol.Http }; - VideoOptions videoOptions = options as VideoOptions; + var videoOptions = options as VideoOptions; if (videoOptions != null) { AudioStreamIndex = videoOptions.AudioStreamIndex; diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs index e5d1ab462..77cba0f71 100644 --- a/MediaBrowser.Model/Net/MimeTypes.cs +++ b/MediaBrowser.Model/Net/MimeTypes.cs @@ -48,7 +48,7 @@ namespace MediaBrowser.Model.Net private static Dictionary GetVideoFileExtensionsDictionary() { - Dictionary dict = new Dictionary(StringComparer.OrdinalIgnoreCase); + var dict = new Dictionary(StringComparer.OrdinalIgnoreCase); foreach (string ext in VideoFileExtensions) { @@ -65,7 +65,7 @@ namespace MediaBrowser.Model.Net private static Dictionary GetMimeTypeLookup() { - Dictionary dict = new Dictionary(StringComparer.OrdinalIgnoreCase); + var dict = new Dictionary(StringComparer.OrdinalIgnoreCase); dict.Add(".jpg", "image/jpeg"); dict.Add(".jpeg", "image/jpeg"); diff --git a/MediaBrowser.Model/Notifications/NotificationOptions.cs b/MediaBrowser.Model/Notifications/NotificationOptions.cs index f48b5ee7f..cf8555423 100644 --- a/MediaBrowser.Model/Notifications/NotificationOptions.cs +++ b/MediaBrowser.Model/Notifications/NotificationOptions.cs @@ -77,7 +77,7 @@ namespace MediaBrowser.Model.Notifications public NotificationOption GetOptions(string type) { - foreach (NotificationOption i in Options) + foreach (var i in Options) { if (StringHelper.EqualsIgnoreCase(type, i.Type)) return i; } @@ -86,14 +86,14 @@ namespace MediaBrowser.Model.Notifications public bool IsEnabled(string type) { - NotificationOption opt = GetOptions(type); + var opt = GetOptions(type); return opt != null && opt.Enabled; } public bool IsServiceEnabled(string service, string notificationType) { - NotificationOption opt = GetOptions(notificationType); + var opt = GetOptions(notificationType); return opt == null || !ListHelper.ContainsIgnoreCase(opt.DisabledServices, service); @@ -101,7 +101,7 @@ namespace MediaBrowser.Model.Notifications public bool IsEnabledToMonitorUser(string type, Guid userId) { - NotificationOption opt = GetOptions(type); + var opt = GetOptions(type); return opt != null && opt.Enabled && !ListHelper.ContainsIgnoreCase(opt.DisabledMonitorUsers, userId.ToString("")); @@ -109,7 +109,7 @@ namespace MediaBrowser.Model.Notifications public bool IsEnabledToSendToUser(string type, string userId, UserPolicy userPolicy) { - NotificationOption opt = GetOptions(type); + var opt = GetOptions(type); if (opt != null && opt.Enabled) { diff --git a/MediaBrowser.Model/Services/HttpUtility.cs b/MediaBrowser.Model/Services/HttpUtility.cs index 98882e114..be180334c 100644 --- a/MediaBrowser.Model/Services/HttpUtility.cs +++ b/MediaBrowser.Model/Services/HttpUtility.cs @@ -445,8 +445,8 @@ namespace MediaBrowser.Model.Services if (s.IndexOf('&') == -1) return s; - StringBuilder entity = new StringBuilder(); - StringBuilder output = new StringBuilder(); + var entity = new StringBuilder(); + var output = new StringBuilder(); int len = s.Length; // 0 -> nothing, // 1 -> right after '&' @@ -623,7 +623,7 @@ namespace MediaBrowser.Model.Services if (query[0] == '?') query = query.Substring(1); - QueryParamCollection result = new QueryParamCollection(); + var result = new QueryParamCollection(); ParseQueryString(query, encoding, result); return result; } diff --git a/MediaBrowser.Model/System/IEnvironmentInfo.cs b/MediaBrowser.Model/System/IEnvironmentInfo.cs index 757d3c949..3ffcc7de1 100644 --- a/MediaBrowser.Model/System/IEnvironmentInfo.cs +++ b/MediaBrowser.Model/System/IEnvironmentInfo.cs @@ -4,7 +4,7 @@ namespace MediaBrowser.Model.System { public interface IEnvironmentInfo { - MediaBrowser.Model.System.OperatingSystem OperatingSystem { get; } + OperatingSystem OperatingSystem { get; } string OperatingSystemName { get; } string OperatingSystemVersion { get; } Architecture SystemArchitecture { get; } diff --git a/MediaBrowser.Providers/Manager/GenericPriorityQueue.cs b/MediaBrowser.Providers/Manager/GenericPriorityQueue.cs index 2b73fdcd3..b87f688e1 100644 --- a/MediaBrowser.Providers/Manager/GenericPriorityQueue.cs +++ b/MediaBrowser.Providers/Manager/GenericPriorityQueue.cs @@ -132,7 +132,7 @@ namespace Priority_Queue int parent = node.QueueIndex / 2; while (parent >= 1) { - TItem parentNode = _nodes[parent]; + var parentNode = _nodes[parent]; if (HasHigherPriority(parentNode, node)) break; @@ -163,7 +163,7 @@ namespace Priority_Queue break; } - TItem childLeft = _nodes[childLeftIndex]; + var childLeft = _nodes[childLeftIndex]; if (HasHigherPriority(childLeft, newParent)) { newParent = childLeft; @@ -173,7 +173,7 @@ namespace Priority_Queue int childRightIndex = childLeftIndex + 1; if (childRightIndex <= _numNodes) { - TItem childRight = _nodes[childRightIndex]; + var childRight = _nodes[childRightIndex]; if (HasHigherPriority(childRight, newParent)) { newParent = childRight; @@ -234,7 +234,7 @@ namespace Priority_Queue } #endif - TItem returnMe = _nodes[1]; + var returnMe = _nodes[1]; Remove(returnMe); item = returnMe; return true; @@ -316,7 +316,7 @@ namespace Priority_Queue { //Bubble the updated node up or down as appropriate int parentIndex = node.QueueIndex / 2; - TItem parentNode = _nodes[parentIndex]; + var parentNode = _nodes[parentIndex]; if (parentIndex > 0 && HasHigherPriority(node, parentNode)) { @@ -356,7 +356,7 @@ namespace Priority_Queue } //Swap the node with the last node - TItem formerLastNode = _nodes[_numNodes]; + var formerLastNode = _nodes[_numNodes]; Swap(node, formerLastNode); _nodes[_numNodes] = null; _numNodes--; diff --git a/MediaBrowser.Providers/Manager/ImageSaver.cs b/MediaBrowser.Providers/Manager/ImageSaver.cs index 616086406..d0d00ef12 100644 --- a/MediaBrowser.Providers/Manager/ImageSaver.cs +++ b/MediaBrowser.Providers/Manager/ImageSaver.cs @@ -63,7 +63,7 @@ namespace MediaBrowser.Providers.Manager /// Index of the image. /// The cancellation token. /// Task. - /// mimeType + /// mimeType public Task SaveImage(BaseItem item, Stream source, string mimeType, ImageType type, int? imageIndex, CancellationToken cancellationToken) { return SaveImage(item, source, mimeType, type, imageIndex, null, cancellationToken); @@ -299,7 +299,7 @@ namespace MediaBrowser.Providers.Manager /// The type. /// Index of the image. /// System.String. - /// + /// /// imageIndex /// or /// imageIndex @@ -316,7 +316,7 @@ namespace MediaBrowser.Providers.Manager /// The type. /// Index of the image. /// The path. - /// imageIndex + /// imageIndex /// or /// imageIndex private void SetImagePath(BaseItem item, ImageType type, int? imageIndex, string path) @@ -333,7 +333,7 @@ namespace MediaBrowser.Providers.Manager /// Type of the MIME. /// if set to true [save locally]. /// System.String. - /// + /// /// imageIndex /// or /// imageIndex @@ -490,7 +490,7 @@ namespace MediaBrowser.Providers.Manager /// Index of the image. /// Type of the MIME. /// IEnumerable{System.String}. - /// imageIndex + /// imageIndex private string[] GetCompatibleSavePaths(BaseItem item, ImageType type, int? imageIndex, string mimeType) { var season = item as Season; diff --git a/MediaBrowser.Providers/Manager/MetadataService.cs b/MediaBrowser.Providers/Manager/MetadataService.cs index 3322582cc..1972ad290 100644 --- a/MediaBrowser.Providers/Manager/MetadataService.cs +++ b/MediaBrowser.Providers/Manager/MetadataService.cs @@ -415,7 +415,7 @@ namespace MediaBrowser.Providers.Manager var folder = item as Folder; if (folder != null && folder.SupportsDateLastMediaAdded) { - DateTime dateLastMediaAdded = DateTime.MinValue; + var dateLastMediaAdded = DateTime.MinValue; var any = false; foreach (var child in children) diff --git a/MediaBrowser.Providers/Manager/SimplePriorityQueue.cs b/MediaBrowser.Providers/Manager/SimplePriorityQueue.cs index 9cfd5ab5c..71e979e2c 100644 --- a/MediaBrowser.Providers/Manager/SimplePriorityQueue.cs +++ b/MediaBrowser.Providers/Manager/SimplePriorityQueue.cs @@ -80,7 +80,7 @@ namespace Priority_Queue throw new InvalidOperationException("Cannot call .First on an empty queue"); } - SimpleNode first = _queue.First; + var first = _queue.First; return (first != null ? first.Data : default(TItem)); } } @@ -155,7 +155,7 @@ namespace Priority_Queue { lock (_queue) { - SimpleNode node = new SimpleNode(item); + var node = new SimpleNode(item); if (_queue.Count == _queue.MaxSize) { _queue.Resize(_queue.MaxSize * 2 + 1); @@ -199,7 +199,7 @@ namespace Priority_Queue { try { - SimpleNode updateMe = GetExistingNode(item); + var updateMe = GetExistingNode(item); _queue.UpdatePriority(updateMe, priority); } catch (InvalidOperationException ex) @@ -211,7 +211,7 @@ namespace Priority_Queue public IEnumerator GetEnumerator() { - List queueData = new List(); + var queueData = new List(); lock (_queue) { //Copy to a separate list because we don't want to 'yield return' inside a lock diff --git a/MediaBrowser.Providers/Movies/MovieDbProvider.cs b/MediaBrowser.Providers/Movies/MovieDbProvider.cs index ef5c781dc..88d9a346b 100644 --- a/MediaBrowser.Providers/Movies/MovieDbProvider.cs +++ b/MediaBrowser.Providers/Movies/MovieDbProvider.cs @@ -140,7 +140,7 @@ namespace MediaBrowser.Providers.Movies return _tmdbSettings; } - using (HttpResponseInfo response = await GetMovieDbResponse(new HttpRequestOptions + using (var response = await GetMovieDbResponse(new HttpRequestOptions { Url = string.Format(TmdbConfigUrl, ApiKey), CancellationToken = cancellationToken, @@ -148,7 +148,7 @@ namespace MediaBrowser.Providers.Movies }).ConfigureAwait(false)) { - using (Stream json = response.Content) + using (var json = response.Content) { _tmdbSettings = await _jsonSerializer.DeserializeFromStreamAsync(json).ConfigureAwait(false); diff --git a/MediaBrowser.Providers/Music/ArtistMetadataService.cs b/MediaBrowser.Providers/Music/ArtistMetadataService.cs index de9551f83..5b8782554 100644 --- a/MediaBrowser.Providers/Music/ArtistMetadataService.cs +++ b/MediaBrowser.Providers/Music/ArtistMetadataService.cs @@ -16,7 +16,7 @@ namespace MediaBrowser.Providers.Music protected override IList GetChildrenForMetadataUpdates(MusicArtist item) { return item.IsAccessedByName ? - item.GetTaggedItems(new Controller.Entities.InternalItemsQuery + item.GetTaggedItems(new InternalItemsQuery { Recursive = true, IsFolder = false diff --git a/MediaBrowser.Providers/Omdb/OmdbImageProvider.cs b/MediaBrowser.Providers/Omdb/OmdbImageProvider.cs index 8592b5c67..4e6d223a7 100644 --- a/MediaBrowser.Providers/Omdb/OmdbImageProvider.cs +++ b/MediaBrowser.Providers/Omdb/OmdbImageProvider.cs @@ -50,7 +50,7 @@ namespace MediaBrowser.Providers.Omdb if (!string.IsNullOrWhiteSpace(imdbId)) { - OmdbProvider.RootObject rootObject = await provider.GetRootObject(imdbId, cancellationToken).ConfigureAwait(false); + var rootObject = await provider.GetRootObject(imdbId, cancellationToken).ConfigureAwait(false); if (!string.IsNullOrEmpty(rootObject.Poster)) { diff --git a/MediaBrowser.Providers/Omdb/OmdbProvider.cs b/MediaBrowser.Providers/Omdb/OmdbProvider.cs index c9018a42c..618e5eb2d 100644 --- a/MediaBrowser.Providers/Omdb/OmdbProvider.cs +++ b/MediaBrowser.Providers/Omdb/OmdbProvider.cs @@ -43,7 +43,7 @@ namespace MediaBrowser.Providers.Omdb throw new ArgumentNullException(nameof(imdbId)); } - T item = itemResult.Item; + var item = itemResult.Item; var result = await GetRootObject(imdbId, cancellationToken).ConfigureAwait(false); @@ -113,7 +113,7 @@ namespace MediaBrowser.Providers.Omdb throw new ArgumentNullException(nameof(seriesImdbId)); } - T item = itemResult.Item; + var item = itemResult.Item; var seasonResult = await GetSeasonRootObject(seriesImdbId, seasonNumber, cancellationToken).ConfigureAwait(false); @@ -220,7 +220,7 @@ namespace MediaBrowser.Providers.Omdb string resultString; - using (Stream stream = _fileSystem.GetFileStream(path, FileOpenMode.Open, FileAccessMode.Read, FileShareMode.Read)) + using (var stream = _fileSystem.GetFileStream(path, FileOpenMode.Open, FileAccessMode.Read, FileShareMode.Read)) { using (var reader = new StreamReader(stream, new UTF8Encoding(false))) { @@ -239,7 +239,7 @@ namespace MediaBrowser.Providers.Omdb string resultString; - using (Stream stream = _fileSystem.GetFileStream(path, FileOpenMode.Open, FileAccessMode.Read, FileShareMode.Read)) + using (var stream = _fileSystem.GetFileStream(path, FileOpenMode.Open, FileAccessMode.Read, FileShareMode.Read)) { using (var reader = new StreamReader(stream, new UTF8Encoding(false))) { @@ -394,7 +394,7 @@ namespace MediaBrowser.Providers.Omdb private void ParseAdditionalMetadata(MetadataResult itemResult, RootObject result) where T : BaseItem { - T item = itemResult.Item; + var item = itemResult.Item; var isConfiguredForEnglish = IsConfiguredForEnglish(item) || _configurationManager.Configuration.EnableNewOmdbSupport; diff --git a/MediaBrowser.Providers/People/MovieDbPersonProvider.cs b/MediaBrowser.Providers/People/MovieDbPersonProvider.cs index 8fc5f40f8..9d9d8fef3 100644 --- a/MediaBrowser.Providers/People/MovieDbPersonProvider.cs +++ b/MediaBrowser.Providers/People/MovieDbPersonProvider.cs @@ -265,7 +265,7 @@ namespace MediaBrowser.Providers.People public class PersonSearchResult { /// - /// Gets or sets a value indicating whether this is adult. + /// Gets or sets a value indicating whether this is adult. /// /// true if adult; otherwise, false. public bool Adult { get; set; } @@ -300,7 +300,7 @@ namespace MediaBrowser.Providers.People /// Gets or sets the results. /// /// The results. - public List Results { get; set; } + public List Results { get; set; } /// /// Gets or sets the total_ pages. /// diff --git a/MediaBrowser.Providers/Playlists/PlaylistItemsProvider.cs b/MediaBrowser.Providers/Playlists/PlaylistItemsProvider.cs index 2f2d8eaeb..89c4acf04 100644 --- a/MediaBrowser.Providers/Playlists/PlaylistItemsProvider.cs +++ b/MediaBrowser.Providers/Playlists/PlaylistItemsProvider.cs @@ -131,7 +131,7 @@ namespace MediaBrowser.Providers.Playlists private IEnumerable GetWplItems(Stream stream) { - WplContent content = new WplContent(); + var content = new WplContent(); var playlist = content.GetFromStream(stream); return playlist.PlaylistEntries.Select(i => new LinkedChild diff --git a/MediaBrowser.Providers/Subtitles/SubtitleManager.cs b/MediaBrowser.Providers/Subtitles/SubtitleManager.cs index 0c7fe1e0f..544cfba0d 100644 --- a/MediaBrowser.Providers/Subtitles/SubtitleManager.cs +++ b/MediaBrowser.Providers/Subtitles/SubtitleManager.cs @@ -245,7 +245,7 @@ namespace MediaBrowser.Providers.Subtitles { if (video.VideoType != VideoType.VideoFile) { - return Task.FromResult(new RemoteSubtitleInfo[] { }); + return Task.FromResult(new RemoteSubtitleInfo[] { }); } VideoContentType mediaType; @@ -261,7 +261,7 @@ namespace MediaBrowser.Providers.Subtitles else { // These are the only supported types - return Task.FromResult(new RemoteSubtitleInfo[] { }); + return Task.FromResult(new RemoteSubtitleInfo[] { }); } var request = new SubtitleSearchRequest diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs index f4fe6ee27..958312633 100644 --- a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs +++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs @@ -1118,7 +1118,7 @@ namespace MediaBrowser.Providers.TV private void FetchDataFromSeriesNode(MetadataResult result, XmlReader reader, CancellationToken cancellationToken) { - Series item = result.Item; + var item = result.Item; reader.MoveToContent(); reader.Read(); diff --git a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs index 55b49d273..3744df9b4 100644 --- a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs +++ b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs @@ -54,7 +54,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers /// The item. /// The metadata file. /// The cancellation token. - /// + /// /// public void Fetch(MetadataResult item, string metadataFile, CancellationToken cancellationToken) { @@ -225,7 +225,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers protected void ParseProviderLinks(T item, string xml) { //Look for a match for the Regex pattern "tt" followed by 7 digits - Match m = Regex.Match(xml, @"tt([0-9]{7})", RegexOptions.IgnoreCase); + var m = Regex.Match(xml, @"tt([0-9]{7})", RegexOptions.IgnoreCase); if (m.Success) { item.SetProviderId(MetadataProviders.Imdb, m.Value); @@ -379,7 +379,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers { MetadataFields field; - if (Enum.TryParse(i, true, out field)) + if (Enum.TryParse(i, true, out field)) { return (MetadataFields?)field; } diff --git a/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs b/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs index efc6b3358..1efffff3d 100644 --- a/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs +++ b/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs @@ -229,7 +229,7 @@ namespace MediaBrowser.XbmcMetadata.Savers CloseOutput = false }; - using (XmlWriter writer = XmlWriter.Create(stream, settings)) + using (var writer = XmlWriter.Create(stream, settings)) { var root = GetRootElementName(item); diff --git a/Mono.Nat/Mapping.cs b/Mono.Nat/Mapping.cs index 438068934..5b15d4e14 100644 --- a/Mono.Nat/Mapping.cs +++ b/Mono.Nat/Mapping.cs @@ -102,7 +102,7 @@ namespace Mono.Nat public override bool Equals(object obj) { - Mapping other = obj as Mapping; + var other = obj as Mapping; return other == null ? false : this.protocol == other.protocol && this.privatePort == other.privatePort && this.publicPort == other.publicPort; } diff --git a/Mono.Nat/Pmp/PmpNatDevice.cs b/Mono.Nat/Pmp/PmpNatDevice.cs index 9398e2bf9..95bd72a6c 100644 --- a/Mono.Nat/Pmp/PmpNatDevice.cs +++ b/Mono.Nat/Pmp/PmpNatDevice.cs @@ -66,7 +66,7 @@ namespace Mono.Nat.Pmp public override bool Equals(object obj) { - PmpNatDevice device = obj as PmpNatDevice; + var device = obj as PmpNatDevice; return (device == null) ? false : this.Equals(device); } diff --git a/Mono.Nat/Pmp/PmpSearcher.cs b/Mono.Nat/Pmp/PmpSearcher.cs index 5e4155841..cbd0d3686 100644 --- a/Mono.Nat/Pmp/PmpSearcher.cs +++ b/Mono.Nat/Pmp/PmpSearcher.cs @@ -81,14 +81,14 @@ namespace Mono.Nat try { - foreach (NetworkInterface n in NetworkInterface.GetAllNetworkInterfaces()) + foreach (var n in NetworkInterface.GetAllNetworkInterfaces()) { if (n.OperationalStatus != OperationalStatus.Up && n.OperationalStatus != OperationalStatus.Unknown) continue; - IPInterfaceProperties properties = n.GetIPProperties(); - List gatewayList = new List(); + var properties = n.GetIPProperties(); + var gatewayList = new List(); - foreach (GatewayIPAddressInformation gateway in properties.GatewayAddresses) + foreach (var gateway in properties.GatewayAddresses) { if (gateway.Address.AddressFamily == AddressFamily.InterNetwork) { @@ -120,7 +120,7 @@ namespace Mono.Nat if (gatewayList.Count > 0) { - foreach (UnicastIPAddressInformation address in properties.UnicastAddresses) + foreach (var address in properties.UnicastAddresses) { if (address.Address.AddressFamily == AddressFamily.InterNetwork) { @@ -150,7 +150,7 @@ namespace Mono.Nat public async void Search() { - foreach (UdpClient s in sockets) + foreach (var s in sockets) { try { @@ -181,7 +181,7 @@ namespace Mono.Nat // The nat-pmp search message. Must be sent to GatewayIP:53531 byte[] buffer = new byte[] { PmpConstants.Version, PmpConstants.OperationCode }; - foreach (IPEndPoint gatewayEndpoint in gatewayLists[client]) + foreach (var gatewayEndpoint in gatewayLists[client]) { await client.SendAsync(buffer, buffer.Length, gatewayEndpoint).ConfigureAwait(false); } @@ -189,8 +189,8 @@ namespace Mono.Nat bool IsSearchAddress(IPAddress address) { - foreach (List gatewayList in gatewayLists.Values) - foreach (IPEndPoint gatewayEndpoint in gatewayList) + foreach (var gatewayList in gatewayLists.Values) + foreach (var gatewayEndpoint in gatewayList) if (gatewayEndpoint.Address.Equals(address)) return true; return false; @@ -210,7 +210,7 @@ namespace Mono.Nat if (errorcode != 0) _logger.LogDebug("Non zero error: {0}", errorcode); - IPAddress publicIp = new IPAddress(new byte[] { response[8], response[9], response[10], response[11] }); + var publicIp = new IPAddress(new byte[] { response[8], response[9], response[10], response[11] }); nextSearch = DateTime.Now.AddMinutes(5); timeout = 250; diff --git a/Mono.Nat/Upnp/Messages/Requests/CreatePortMappingMessage.cs b/Mono.Nat/Upnp/Messages/Requests/CreatePortMappingMessage.cs index 5a2ab009a..217095e49 100644 --- a/Mono.Nat/Upnp/Messages/Requests/CreatePortMappingMessage.cs +++ b/Mono.Nat/Upnp/Messages/Requests/CreatePortMappingMessage.cs @@ -54,10 +54,10 @@ namespace Mono.Nat.Upnp public override HttpRequestOptions Encode() { - CultureInfo culture = CultureInfo.InvariantCulture; + var culture = CultureInfo.InvariantCulture; - StringBuilder builder = new StringBuilder(256); - XmlWriter writer = CreateWriter(builder); + var builder = new StringBuilder(256); + var writer = CreateWriter(builder); WriteFullElement(writer, "NewRemoteHost", string.Empty); WriteFullElement(writer, "NewExternalPort", this.mapping.PublicPort.ToString(culture)); diff --git a/Mono.Nat/Upnp/Messages/UpnpMessage.cs b/Mono.Nat/Upnp/Messages/UpnpMessage.cs index e734db8f4..1151dd997 100644 --- a/Mono.Nat/Upnp/Messages/UpnpMessage.cs +++ b/Mono.Nat/Upnp/Messages/UpnpMessage.cs @@ -91,7 +91,7 @@ namespace Mono.Nat.Upnp protected XmlWriter CreateWriter(StringBuilder sb) { - XmlWriterSettings settings = new XmlWriterSettings(); + var settings = new XmlWriterSettings(); settings.ConformanceLevel = ConformanceLevel.Fragment; return XmlWriter.Create(sb, settings); } diff --git a/Mono.Nat/Upnp/Searchers/UpnpSearcher.cs b/Mono.Nat/Upnp/Searchers/UpnpSearcher.cs index 57ecdeca9..b70768b6f 100644 --- a/Mono.Nat/Upnp/Searchers/UpnpSearcher.cs +++ b/Mono.Nat/Upnp/Searchers/UpnpSearcher.cs @@ -82,7 +82,7 @@ namespace Mono.Nat * prefix. */ // We have an internet gateway device now - UpnpNatDevice d = new UpnpNatDevice(localAddress, deviceInfo, endpoint, string.Empty, _logger, _httpClient); + var d = new UpnpNatDevice(localAddress, deviceInfo, endpoint, string.Empty, _logger, _httpClient); await d.GetServicesList().ConfigureAwait(false); diff --git a/Mono.Nat/Upnp/UpnpNatDevice.cs b/Mono.Nat/Upnp/UpnpNatDevice.cs index f37d6dd0c..63a28ebdc 100644 --- a/Mono.Nat/Upnp/UpnpNatDevice.cs +++ b/Mono.Nat/Upnp/UpnpNatDevice.cs @@ -109,8 +109,8 @@ namespace Mono.Nat.Upnp int abortCount = 0; int bytesRead = 0; byte[] buffer = new byte[10240]; - StringBuilder servicesXml = new StringBuilder(); - XmlDocument xmldoc = new XmlDocument(); + var servicesXml = new StringBuilder(); + var xmldoc = new XmlDocument(); using (var s = response.Content) { @@ -144,9 +144,9 @@ namespace Mono.Nat.Upnp } } - XmlNamespaceManager ns = new XmlNamespaceManager(xmldoc.NameTable); + var ns = new XmlNamespaceManager(xmldoc.NameTable); ns.AddNamespace("ns", "urn:schemas-upnp-org:device-1-0"); - XmlNodeList nodes = xmldoc.SelectNodes("//*/ns:serviceList", ns); + var nodes = xmldoc.SelectNodes("//*/ns:serviceList", ns); foreach (XmlNode node in nodes) { @@ -169,7 +169,7 @@ namespace Mono.Nat.Upnp { if (u.IsAbsoluteUri) { - EndPoint old = hostEndPoint; + var old = hostEndPoint; IPAddress parsedHostIpAddress; if (IPAddress.TryParse(u.Host, out parsedHostIpAddress)) { @@ -228,7 +228,7 @@ namespace Mono.Nat.Upnp public override async Task CreatePortMap(Mapping mapping) { - CreatePortMappingMessage message = new CreatePortMappingMessage(mapping, localAddress, this); + var message = new CreatePortMappingMessage(mapping, localAddress, this); using (await _httpClient.SendAsync(message.Encode(), message.Method).ConfigureAwait(false)) { @@ -237,7 +237,7 @@ namespace Mono.Nat.Upnp public override bool Equals(object obj) { - UpnpNatDevice device = obj as UpnpNatDevice; + var device = obj as UpnpNatDevice; return (device == null) ? false : this.Equals((device)); } diff --git a/OpenSubtitlesHandler/Console/OSHConsole.cs b/OpenSubtitlesHandler/Console/OSHConsole.cs index 586377e53..396b28cbc 100644 --- a/OpenSubtitlesHandler/Console/OSHConsole.cs +++ b/OpenSubtitlesHandler/Console/OSHConsole.cs @@ -58,7 +58,7 @@ namespace OpenSubtitlesHandler.Console /// /// Console Debug Args /// - public class DebugEventArgs : System.EventArgs + public class DebugEventArgs : EventArgs { public DebugCode Code { get; private set; } public string Text { get; private set; } diff --git a/OpenSubtitlesHandler/MovieHasher.cs b/OpenSubtitlesHandler/MovieHasher.cs index 5a93edd5c..25d91c1ac 100644 --- a/OpenSubtitlesHandler/MovieHasher.cs +++ b/OpenSubtitlesHandler/MovieHasher.cs @@ -37,7 +37,7 @@ namespace OpenSubtitlesHandler public static string ToHexadecimal(byte[] bytes) { - StringBuilder hexBuilder = new StringBuilder(); + var hexBuilder = new StringBuilder(); for (int i = 0; i < bytes.Length; i++) { hexBuilder.Append(bytes[i].ToString("x2")); diff --git a/OpenSubtitlesHandler/OpenSubtitles.cs b/OpenSubtitlesHandler/OpenSubtitles.cs index 4a44ccde3..ddf2e83e8 100644 --- a/OpenSubtitlesHandler/OpenSubtitles.cs +++ b/OpenSubtitlesHandler/OpenSubtitles.cs @@ -57,12 +57,12 @@ namespace OpenSubtitlesHandler public static IMethodResponse LogIn(string userName, string password, string language) { // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(userName)); parms.Add(new XmlRpcValueBasic(password)); parms.Add(new XmlRpcValueBasic(language)); parms.Add(new XmlRpcValueBasic(XML_PRC_USERAGENT)); - XmlRpcMethodCall call = new XmlRpcMethodCall("LogIn", parms); + var call = new XmlRpcMethodCall("LogIn", parms); OSHConsole.WriteLine("Sending LogIn request to the server ...", DebugCode.Good); //File.WriteAllText(".\\request.txt", Encoding.UTF8.GetString(XmlRpcGenerator.Generate(call))); @@ -77,9 +77,9 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; - MethodResponseLogIn re = new MethodResponseLogIn("Success", "Log in successful."); - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var re = new MethodResponseLogIn("Success", "Log in successful."); + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { @@ -103,12 +103,12 @@ namespace OpenSubtitlesHandler public static async Task LogInAsync(string userName, string password, string language, CancellationToken cancellationToken) { // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(userName)); parms.Add(new XmlRpcValueBasic(password)); parms.Add(new XmlRpcValueBasic(language)); parms.Add(new XmlRpcValueBasic(XML_PRC_USERAGENT)); - XmlRpcMethodCall call = new XmlRpcMethodCall("LogIn", parms); + var call = new XmlRpcMethodCall("LogIn", parms); OSHConsole.WriteLine("Sending LogIn request to the server ...", DebugCode.Good); //File.WriteAllText(".\\request.txt", Encoding.UTF8.GetString(XmlRpcGenerator.Generate(call))); @@ -126,9 +126,9 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; - MethodResponseLogIn re = new MethodResponseLogIn("Success", "Log in successful."); - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var re = new MethodResponseLogIn("Success", "Log in successful."); + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { @@ -170,9 +170,9 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); - XmlRpcMethodCall call = new XmlRpcMethodCall("LogOut", parms); + var call = new XmlRpcMethodCall("LogOut", parms); OSHConsole.WriteLine("Sending LogOut request to the server ...", DebugCode.Good); // Send the request to the server @@ -185,10 +185,10 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct strct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var strct = (XmlRpcValueStruct)calls[0].Parameters[0]; OSHConsole.WriteLine("STATUS=" + ((XmlRpcValueBasic)strct.Members[0].Data).Data.ToString()); OSHConsole.WriteLine("SECONDS=" + ((XmlRpcValueBasic)strct.Members[1].Data).Data.ToString()); - MethodResponseLogIn re = new MethodResponseLogIn("Success", "Log out successful."); + var re = new MethodResponseLogIn("Success", "Log out successful."); re.Status = ((XmlRpcValueBasic)strct.Members[0].Data).Data.ToString(); re.Seconds = (double)((XmlRpcValueBasic)strct.Members[1].Data).Data; return re; @@ -214,10 +214,10 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); parms.Add(new XmlRpcValueBasic(XML_PRC_USERAGENT, XmlRpcBasicValueType.String)); - XmlRpcMethodCall call = new XmlRpcMethodCall("NoOperation", parms); + var call = new XmlRpcMethodCall("NoOperation", parms); OSHConsole.WriteLine("Sending NoOperation request to the server ...", DebugCode.Good); // Send the request to the server @@ -230,18 +230,18 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - MethodResponseNoOperation R = new MethodResponseNoOperation(); - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var R = new MethodResponseNoOperation(); + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { case "status": R.Status = (string)MEMBER.Data.Data; OSHConsole.WriteLine(MEMBER.Name + "= " + MEMBER.Data.Data); break; case "seconds": R.Seconds = (double)MEMBER.Data.Data; OSHConsole.WriteLine(MEMBER.Name + "= " + MEMBER.Data.Data); break; case "download_limits": - XmlRpcValueStruct dlStruct = (XmlRpcValueStruct)MEMBER.Data; - foreach (XmlRpcStructMember dlmember in dlStruct.Members) + var dlStruct = (XmlRpcValueStruct)MEMBER.Data; + foreach (var dlmember in dlStruct.Members) { OSHConsole.WriteLine(" >" + dlmember.Name + "= " + dlmember.Data.Data.ToString()); switch (dlmember.Name) @@ -292,16 +292,16 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "No subtitle search parameter passed"); } // Method call .. - List parms = new List(); + var parms = new List(); // Add token param parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); // Add subtitle search parameters. Each one will be like 'array' of structs. - XmlRpcValueArray array = new XmlRpcValueArray(); - foreach (SubtitleSearchParameters param in parameters) + var array = new XmlRpcValueArray(); + foreach (var param in parameters) { - XmlRpcValueStruct strct = new XmlRpcValueStruct(new List()); + var strct = new XmlRpcValueStruct(new List()); // sublanguageid member - XmlRpcStructMember member = new XmlRpcStructMember("sublanguageid", + var member = new XmlRpcStructMember("sublanguageid", new XmlRpcValueBasic(param.SubLangaugeID, XmlRpcBasicValueType.String)); strct.Members.Add(member); // moviehash member @@ -345,7 +345,7 @@ namespace OpenSubtitlesHandler // Add the array to the parameters parms.Add(array); // Call ! - XmlRpcMethodCall call = new XmlRpcMethodCall("SearchSubtitles", parms); + var call = new XmlRpcMethodCall("SearchSubtitles", parms); OSHConsole.WriteLine("Sending SearchSubtitles request to the server ...", DebugCode.Good); // Send the request to the server string response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT)); @@ -362,11 +362,11 @@ namespace OpenSubtitlesHandler //* the first is status //* the second is [array of structs, each one includes subtitle file]. //* the third is [double basic value] represent seconds token by server. - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseSubtitleSearch R = new MethodResponseSubtitleSearch(); + var R = new MethodResponseSubtitleSearch(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { if (MEMBER.Name == "status") { @@ -384,14 +384,14 @@ namespace OpenSubtitlesHandler { OSHConsole.WriteLine("Search results: "); - XmlRpcValueArray rarray = (XmlRpcValueArray)MEMBER.Data; - foreach (IXmlRpcValue subStruct in rarray.Values) + var rarray = (XmlRpcValueArray)MEMBER.Data; + foreach (var subStruct in rarray.Values) { if (subStruct == null) continue; if (!(subStruct is XmlRpcValueStruct)) continue; - SubtitleSearchResult result = new SubtitleSearchResult(); - foreach (XmlRpcStructMember submember in ((XmlRpcValueStruct)subStruct).Members) + var result = new SubtitleSearchResult(); + foreach (var submember in ((XmlRpcValueStruct)subStruct).Members) { // To avoid errors of arranged info or missing ones, let's do it with switch.. switch (submember.Name) @@ -472,16 +472,16 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "No subtitle search parameter passed"); } // Method call .. - List parms = new List(); + var parms = new List(); // Add token param parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); // Add subtitle search parameters. Each one will be like 'array' of structs. - XmlRpcValueArray array = new XmlRpcValueArray(); - foreach (SubtitleSearchParameters param in parameters) + var array = new XmlRpcValueArray(); + foreach (var param in parameters) { - XmlRpcValueStruct strct = new XmlRpcValueStruct(new List()); + var strct = new XmlRpcValueStruct(new List()); // sublanguageid member - XmlRpcStructMember member = new XmlRpcStructMember("sublanguageid", + var member = new XmlRpcStructMember("sublanguageid", new XmlRpcValueBasic(param.SubLangaugeID, XmlRpcBasicValueType.String)); strct.Members.Add(member); // moviehash member @@ -525,7 +525,7 @@ namespace OpenSubtitlesHandler // Add the array to the parameters parms.Add(array); // Call ! - XmlRpcMethodCall call = new XmlRpcMethodCall("SearchSubtitles", parms); + var call = new XmlRpcMethodCall("SearchSubtitles", parms); OSHConsole.WriteLine("Sending SearchSubtitles request to the server ...", DebugCode.Good); // Send the request to the server string response = Utilities.GetStreamString(await Utilities.SendRequestAsync(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT, cancellationToken).ConfigureAwait(false)); @@ -542,11 +542,11 @@ namespace OpenSubtitlesHandler //* the first is status //* the second is [array of structs, each one includes subtitle file]. //* the third is [double basic value] represent seconds token by server. - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseSubtitleSearch R = new MethodResponseSubtitleSearch(); + var R = new MethodResponseSubtitleSearch(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { if (MEMBER.Name == "status") { @@ -564,14 +564,14 @@ namespace OpenSubtitlesHandler { OSHConsole.WriteLine("Search results: "); - XmlRpcValueArray rarray = (XmlRpcValueArray)MEMBER.Data; - foreach (IXmlRpcValue subStruct in rarray.Values) + var rarray = (XmlRpcValueArray)MEMBER.Data; + foreach (var subStruct in rarray.Values) { if (subStruct == null) continue; if (!(subStruct is XmlRpcValueStruct)) continue; - SubtitleSearchResult result = new SubtitleSearchResult(); - foreach (XmlRpcStructMember submember in ((XmlRpcValueStruct)subStruct).Members) + var result = new SubtitleSearchResult(); + foreach (var submember in ((XmlRpcValueStruct)subStruct).Members) { // To avoid errors of arranged info or missing ones, let's do it with switch.. switch (submember.Name) @@ -657,11 +657,11 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "No subtitle id passed"); } // Method call .. - List parms = new List(); + var parms = new List(); // Add token param parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); // Add subtitle search parameters. Each one will be like 'array' of structs. - XmlRpcValueArray array = new XmlRpcValueArray(); + var array = new XmlRpcValueArray(); foreach (int id in subIDS) { array.Values.Add(new XmlRpcValueBasic(id, XmlRpcBasicValueType.Int)); @@ -669,7 +669,7 @@ namespace OpenSubtitlesHandler // Add the array to the parameters parms.Add(array); // Call ! - XmlRpcMethodCall call = new XmlRpcMethodCall("DownloadSubtitles", parms); + var call = new XmlRpcMethodCall("DownloadSubtitles", parms); OSHConsole.WriteLine("Sending DownloadSubtitles request to the server ...", DebugCode.Good); // Send the request to the server string response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT)); @@ -685,12 +685,12 @@ namespace OpenSubtitlesHandler //* the first is status //* the second is [array of structs, each one includes subtitle file]. //* the third is [double basic value] represent seconds token by server. - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseSubtitleDownload R = new MethodResponseSubtitleDownload(); + var R = new MethodResponseSubtitleDownload(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { if (MEMBER.Name == "status") { @@ -707,14 +707,14 @@ namespace OpenSubtitlesHandler if (MEMBER.Data is XmlRpcValueArray) { OSHConsole.WriteLine("Download results:"); - XmlRpcValueArray rarray = (XmlRpcValueArray)MEMBER.Data; - foreach (IXmlRpcValue subStruct in rarray.Values) + var rarray = (XmlRpcValueArray)MEMBER.Data; + foreach (var subStruct in rarray.Values) { if (subStruct == null) continue; if (!(subStruct is XmlRpcValueStruct)) continue; - SubtitleDownloadResult result = new SubtitleDownloadResult(); - foreach (XmlRpcStructMember submember in ((XmlRpcValueStruct)subStruct).Members) + var result = new SubtitleDownloadResult(); + foreach (var submember in ((XmlRpcValueStruct)subStruct).Members) { // To avoid errors of arranged info or missing ones, let's do it with switch.. switch (submember.Name) @@ -764,11 +764,11 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "No subtitle id passed"); } // Method call .. - List parms = new List(); + var parms = new List(); // Add token param parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); // Add subtitle search parameters. Each one will be like 'array' of structs. - XmlRpcValueArray array = new XmlRpcValueArray(); + var array = new XmlRpcValueArray(); foreach (int id in subIDS) { array.Values.Add(new XmlRpcValueBasic(id, XmlRpcBasicValueType.Int)); @@ -776,7 +776,7 @@ namespace OpenSubtitlesHandler // Add the array to the parameters parms.Add(array); // Call ! - XmlRpcMethodCall call = new XmlRpcMethodCall("DownloadSubtitles", parms); + var call = new XmlRpcMethodCall("DownloadSubtitles", parms); OSHConsole.WriteLine("Sending DownloadSubtitles request to the server ...", DebugCode.Good); // Send the request to the server @@ -795,12 +795,12 @@ namespace OpenSubtitlesHandler //* the first is status //* the second is [array of structs, each one includes subtitle file]. //* the third is [double basic value] represent seconds token by server. - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseSubtitleDownload R = new MethodResponseSubtitleDownload(); + var R = new MethodResponseSubtitleDownload(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { if (MEMBER.Name == "status") { @@ -817,14 +817,14 @@ namespace OpenSubtitlesHandler if (MEMBER.Data is XmlRpcValueArray) { OSHConsole.WriteLine("Download results:"); - XmlRpcValueArray rarray = (XmlRpcValueArray)MEMBER.Data; - foreach (IXmlRpcValue subStruct in rarray.Values) + var rarray = (XmlRpcValueArray)MEMBER.Data; + foreach (var subStruct in rarray.Values) { if (subStruct == null) continue; if (!(subStruct is XmlRpcValueStruct)) continue; - SubtitleDownloadResult result = new SubtitleDownloadResult(); - foreach (XmlRpcStructMember submember in ((XmlRpcValueStruct)subStruct).Members) + var result = new SubtitleDownloadResult(); + foreach (var submember in ((XmlRpcValueStruct)subStruct).Members) { // To avoid errors of arranged info or missing ones, let's do it with switch.. switch (submember.Name) @@ -879,15 +879,15 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "No subtitle id passed"); } // Method call .. - List parms = new List(); + var parms = new List(); // Add token param parms.Add(new XmlRpcValueBasic(TOKEN)); // Add subtitle search parameters. Each one will be like 'array' of structs. - XmlRpcValueArray array = new XmlRpcValueArray(subIDS); + var array = new XmlRpcValueArray(subIDS); // Add the array to the parameters parms.Add(array); // Call ! - XmlRpcMethodCall call = new XmlRpcMethodCall("GetComments", parms); + var call = new XmlRpcMethodCall("GetComments", parms); OSHConsole.WriteLine("Sending GetComments request to the server ...", DebugCode.Good); // Send the request to the server string response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT)); @@ -899,12 +899,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseGetComments R = new MethodResponseGetComments(); + var R = new MethodResponseGetComments(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { if (MEMBER.Name == "status") { @@ -921,14 +921,14 @@ namespace OpenSubtitlesHandler if (MEMBER.Data is XmlRpcValueArray) { OSHConsole.WriteLine("Comments results:"); - XmlRpcValueArray rarray = (XmlRpcValueArray)MEMBER.Data; - foreach (IXmlRpcValue commentStruct in rarray.Values) + var rarray = (XmlRpcValueArray)MEMBER.Data; + foreach (var commentStruct in rarray.Values) { if (commentStruct == null) continue; if (!(commentStruct is XmlRpcValueStruct)) continue; - GetCommentsResult result = new GetCommentsResult(); - foreach (XmlRpcStructMember commentmember in ((XmlRpcValueStruct)commentStruct).Members) + var result = new GetCommentsResult(); + foreach (var commentmember in ((XmlRpcValueStruct)commentStruct).Members) { // To avoid errors of arranged info or missing ones, let's do it with switch.. switch (commentmember.Name) @@ -977,22 +977,22 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); // Array of sub langs - XmlRpcValueArray a = new XmlRpcValueArray(languageIDS); + var a = new XmlRpcValueArray(languageIDS); parms.Add(a); // Array of video parameters a = new XmlRpcValueArray(); - foreach (SearchToMailMovieParameter p in movies) + foreach (var p in movies) { - XmlRpcValueStruct str = new XmlRpcValueStruct(new List()); + var str = new XmlRpcValueStruct(new List()); str.Members.Add(new XmlRpcStructMember("moviehash", new XmlRpcValueBasic(p.moviehash))); str.Members.Add(new XmlRpcStructMember("moviesize", new XmlRpcValueBasic(p.moviesize))); a.Values.Add(str); } parms.Add(a); - XmlRpcMethodCall call = new XmlRpcMethodCall("SearchToMail", parms); + var call = new XmlRpcMethodCall("SearchToMail", parms); OSHConsole.WriteLine("Sending SearchToMail request to the server ...", DebugCode.Good); // Send the request to the server @@ -1005,12 +1005,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseSearchToMail R = new MethodResponseSearchToMail(); + var R = new MethodResponseSearchToMail(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { @@ -1044,13 +1044,13 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); // Add token param parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); // Add query param parms.Add(new XmlRpcValueBasic(query, XmlRpcBasicValueType.String)); // Call ! - XmlRpcMethodCall call = new XmlRpcMethodCall("SearchMoviesOnIMDB", parms); + var call = new XmlRpcMethodCall("SearchMoviesOnIMDB", parms); OSHConsole.WriteLine("Sending SearchMoviesOnIMDB request to the server ...", DebugCode.Good); // Send the request to the server string response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT)); @@ -1062,12 +1062,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseMovieSearch R = new MethodResponseMovieSearch(); + var R = new MethodResponseMovieSearch(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { if (MEMBER.Name == "status") { @@ -1084,14 +1084,14 @@ namespace OpenSubtitlesHandler if (MEMBER.Data is XmlRpcValueArray) { OSHConsole.WriteLine("Search results:"); - XmlRpcValueArray rarray = (XmlRpcValueArray)MEMBER.Data; - foreach (IXmlRpcValue subStruct in rarray.Values) + var rarray = (XmlRpcValueArray)MEMBER.Data; + foreach (var subStruct in rarray.Values) { if (subStruct == null) continue; if (!(subStruct is XmlRpcValueStruct)) continue; - MovieSearchResult result = new MovieSearchResult(); - foreach (XmlRpcStructMember submember in ((XmlRpcValueStruct)subStruct).Members) + var result = new MovieSearchResult(); + foreach (var submember in ((XmlRpcValueStruct)subStruct).Members) { // To avoid errors of arranged info or missing ones, let's do it with switch.. switch (submember.Name) @@ -1135,13 +1135,13 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); // Add token param parms.Add(new XmlRpcValueBasic(TOKEN)); // Add query param parms.Add(new XmlRpcValueBasic(imdbid)); // Call ! - XmlRpcMethodCall call = new XmlRpcMethodCall("GetIMDBMovieDetails", parms); + var call = new XmlRpcMethodCall("GetIMDBMovieDetails", parms); OSHConsole.WriteLine("Sending GetIMDBMovieDetails request to the server ...", DebugCode.Good); // Send the request to the server string response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT)); @@ -1153,12 +1153,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseMovieDetails R = new MethodResponseMovieDetails(); + var R = new MethodResponseMovieDetails(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { if (MEMBER.Name == "status") { @@ -1176,8 +1176,8 @@ namespace OpenSubtitlesHandler if (MEMBER.Data is XmlRpcValueStruct) { OSHConsole.WriteLine("Details result:"); - XmlRpcValueStruct detailsStruct = (XmlRpcValueStruct)MEMBER.Data; - foreach (XmlRpcStructMember dmem in detailsStruct.Members) + var detailsStruct = (XmlRpcValueStruct)MEMBER.Data; + foreach (var dmem in detailsStruct.Members) { switch (dmem.Name) { @@ -1193,8 +1193,8 @@ namespace OpenSubtitlesHandler case "cast": // this is another struct with cast members... OSHConsole.WriteLine(">" + dmem.Name + "= "); - XmlRpcValueStruct castStruct = (XmlRpcValueStruct)dmem.Data; - foreach (XmlRpcStructMember castMemeber in castStruct.Members) + var castStruct = (XmlRpcValueStruct)dmem.Data; + foreach (var castMemeber in castStruct.Members) { R.Cast.Add(castMemeber.Data.Data.ToString()); OSHConsole.WriteLine(" >" + castMemeber.Data.Data.ToString()); @@ -1203,8 +1203,8 @@ namespace OpenSubtitlesHandler case "directors": OSHConsole.WriteLine(">" + dmem.Name + "= "); // this is another struct with directors members... - XmlRpcValueStruct directorsStruct = (XmlRpcValueStruct)dmem.Data; - foreach (XmlRpcStructMember directorsMember in directorsStruct.Members) + var directorsStruct = (XmlRpcValueStruct)dmem.Data; + foreach (var directorsMember in directorsStruct.Members) { R.Directors.Add(directorsMember.Data.Data.ToString()); OSHConsole.WriteLine(" >" + directorsMember.Data.Data.ToString()); @@ -1213,8 +1213,8 @@ namespace OpenSubtitlesHandler case "writers": OSHConsole.WriteLine(">" + dmem.Name + "= "); // this is another struct with writers members... - XmlRpcValueStruct writersStruct = (XmlRpcValueStruct)dmem.Data; - foreach (XmlRpcStructMember writersMember in writersStruct.Members) + var writersStruct = (XmlRpcValueStruct)dmem.Data; + foreach (var writersMember in writersStruct.Members) { R.Writers.Add(writersMember.Data.Data.ToString()); OSHConsole.WriteLine("+->" + writersMember.Data.Data.ToString()); @@ -1222,7 +1222,7 @@ namespace OpenSubtitlesHandler break; case "awards": // this is an array of genres... - XmlRpcValueArray awardsArray = (XmlRpcValueArray)dmem.Data; + var awardsArray = (XmlRpcValueArray)dmem.Data; foreach (XmlRpcValueBasic award in awardsArray.Values) { R.Awards.Add(award.Data.ToString()); @@ -1232,7 +1232,7 @@ namespace OpenSubtitlesHandler case "genres": OSHConsole.WriteLine(">" + dmem.Name + "= "); // this is an array of genres... - XmlRpcValueArray genresArray = (XmlRpcValueArray)dmem.Data; + var genresArray = (XmlRpcValueArray)dmem.Data; foreach (XmlRpcValueBasic genre in genresArray.Values) { R.Genres.Add(genre.Data.ToString()); @@ -1242,7 +1242,7 @@ namespace OpenSubtitlesHandler case "country": OSHConsole.WriteLine(">" + dmem.Name + "= "); // this is an array of country... - XmlRpcValueArray countryArray = (XmlRpcValueArray)dmem.Data; + var countryArray = (XmlRpcValueArray)dmem.Data; foreach (XmlRpcValueBasic country in countryArray.Values) { R.Country.Add(country.Data.ToString()); @@ -1252,7 +1252,7 @@ namespace OpenSubtitlesHandler case "language": OSHConsole.WriteLine(">" + dmem.Name + "= "); // this is an array of language... - XmlRpcValueArray languageArray = (XmlRpcValueArray)dmem.Data; + var languageArray = (XmlRpcValueArray)dmem.Data; foreach (XmlRpcValueBasic language in languageArray.Values) { R.Language.Add(language.Data.ToString()); @@ -1262,7 +1262,7 @@ namespace OpenSubtitlesHandler case "certification": OSHConsole.WriteLine(">" + dmem.Name + "= "); // this is an array of certification... - XmlRpcValueArray certificationArray = (XmlRpcValueArray)dmem.Data; + var certificationArray = (XmlRpcValueArray)dmem.Data; foreach (XmlRpcValueBasic certification in certificationArray.Values) { R.Certification.Add(certification.Data.ToString()); @@ -1304,16 +1304,16 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); // Add token param parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); // Add movieinfo struct - XmlRpcValueStruct movieinfo = new XmlRpcValueStruct(new List()); + var movieinfo = new XmlRpcValueStruct(new List()); movieinfo.Members.Add(new XmlRpcStructMember("moviename", new XmlRpcValueBasic(movieName))); movieinfo.Members.Add(new XmlRpcStructMember("movieyear", new XmlRpcValueBasic(movieyear))); parms.Add(movieinfo); // Call ! - XmlRpcMethodCall call = new XmlRpcMethodCall("InsertMovie", parms); + var call = new XmlRpcMethodCall("InsertMovie", parms); OSHConsole.WriteLine("Sending InsertMovie request to the server ...", DebugCode.Good); // Send the request to the server string response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT)); @@ -1325,12 +1325,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseInsertMovie R = new MethodResponseInsertMovie(); + var R = new MethodResponseInsertMovie(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { if (MEMBER.Name == "status") { @@ -1373,11 +1373,11 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); - foreach (InsertMovieHashParameters p in parameters) + foreach (var p in parameters) { - XmlRpcValueStruct pstruct = new XmlRpcValueStruct(new List()); + var pstruct = new XmlRpcValueStruct(new List()); pstruct.Members.Add(new XmlRpcStructMember("moviehash", new XmlRpcValueBasic(p.moviehash))); pstruct.Members.Add(new XmlRpcStructMember("moviebytesize", new XmlRpcValueBasic(p.moviebytesize))); pstruct.Members.Add(new XmlRpcStructMember("imdbid", new XmlRpcValueBasic(p.imdbid))); @@ -1386,7 +1386,7 @@ namespace OpenSubtitlesHandler pstruct.Members.Add(new XmlRpcStructMember("moviefilename", new XmlRpcValueBasic(p.moviefilename))); parms.Add(pstruct); } - XmlRpcMethodCall call = new XmlRpcMethodCall("InsertMovieHash", parms); + var call = new XmlRpcMethodCall("InsertMovieHash", parms); OSHConsole.WriteLine("Sending InsertMovieHash request to the server ...", DebugCode.Good); // Send the request to the server @@ -1399,12 +1399,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseInsertMovieHash R = new MethodResponseInsertMovieHash(); + var R = new MethodResponseInsertMovieHash(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { @@ -1417,14 +1417,14 @@ namespace OpenSubtitlesHandler OSHConsole.WriteLine(">" + MEMBER.Name + "= " + MEMBER.Data.Data.ToString()); break; case "data": - XmlRpcValueStruct dataStruct = (XmlRpcValueStruct)MEMBER.Data; - foreach (XmlRpcStructMember dataMember in dataStruct.Members) + var dataStruct = (XmlRpcValueStruct)MEMBER.Data; + foreach (var dataMember in dataStruct.Members) { switch (dataMember.Name) { case "accepted_moviehashes": - XmlRpcValueArray mh = (XmlRpcValueArray)dataMember.Data; - foreach (IXmlRpcValue val in mh.Values) + var mh = (XmlRpcValueArray)dataMember.Data; + foreach (var val in mh.Values) { if (val is XmlRpcValueBasic) { @@ -1433,8 +1433,8 @@ namespace OpenSubtitlesHandler } break; case "new_imdbs": - XmlRpcValueArray mi = (XmlRpcValueArray)dataMember.Data; - foreach (IXmlRpcValue val in mi.Values) + var mi = (XmlRpcValueArray)dataMember.Data; + foreach (var val in mi.Values) { if (val is XmlRpcValueBasic) { @@ -1472,10 +1472,10 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); parms.Add(new XmlRpcValueBasic(XML_PRC_USERAGENT, XmlRpcBasicValueType.String)); - XmlRpcMethodCall call = new XmlRpcMethodCall("ServerInfo", parms); + var call = new XmlRpcMethodCall("ServerInfo", parms); OSHConsole.WriteLine("Sending ServerInfo request to the server ...", DebugCode.Good); // Send the request to the server @@ -1488,12 +1488,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseServerInfo R = new MethodResponseServerInfo(); + var R = new MethodResponseServerInfo(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { @@ -1568,8 +1568,8 @@ namespace OpenSubtitlesHandler case "last_update_strings": //R.total_subtitles_languages = (string)MEMBER.Data.Data; OSHConsole.WriteLine(">" + MEMBER.Name + ":"); - XmlRpcValueStruct luStruct = (XmlRpcValueStruct)MEMBER.Data; - foreach (XmlRpcStructMember luMemeber in luStruct.Members) + var luStruct = (XmlRpcValueStruct)MEMBER.Data; + foreach (var luMemeber in luStruct.Members) { R.last_update_strings.Add(luMemeber.Name + " [" + luMemeber.Data.Data.ToString() + "]"); OSHConsole.WriteLine(" >" + luMemeber.Name + "= " + luMemeber.Data.Data.ToString()); @@ -1602,10 +1602,10 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); parms.Add(new XmlRpcValueBasic(IDSubMovieFile, XmlRpcBasicValueType.String)); - XmlRpcMethodCall call = new XmlRpcMethodCall("ReportWrongMovieHash", parms); + var call = new XmlRpcMethodCall("ReportWrongMovieHash", parms); OSHConsole.WriteLine("Sending ReportWrongMovieHash request to the server ...", DebugCode.Good); // Send the request to the server @@ -1618,12 +1618,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseReportWrongMovieHash R = new MethodResponseReportWrongMovieHash(); + var R = new MethodResponseReportWrongMovieHash(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { @@ -1666,14 +1666,14 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); - XmlRpcValueStruct s = new XmlRpcValueStruct(new List()); + var s = new XmlRpcValueStruct(new List()); s.Members.Add(new XmlRpcStructMember("moviehash", new XmlRpcValueBasic(moviehash))); s.Members.Add(new XmlRpcStructMember("moviebytesize", new XmlRpcValueBasic(moviebytesize))); s.Members.Add(new XmlRpcStructMember("imdbid", new XmlRpcValueBasic(imdbid))); parms.Add(s); - XmlRpcMethodCall call = new XmlRpcMethodCall("ReportWrongImdbMovie", parms); + var call = new XmlRpcMethodCall("ReportWrongImdbMovie", parms); OSHConsole.WriteLine("Sending ReportWrongImdbMovie request to the server ...", DebugCode.Good); // Send the request to the server @@ -1686,12 +1686,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseAddComment R = new MethodResponseAddComment(); + var R = new MethodResponseAddComment(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { @@ -1725,13 +1725,13 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); - XmlRpcValueStruct s = new XmlRpcValueStruct(new List()); + var s = new XmlRpcValueStruct(new List()); s.Members.Add(new XmlRpcStructMember("idsubtitle", new XmlRpcValueBasic(idsubtitle))); s.Members.Add(new XmlRpcStructMember("score", new XmlRpcValueBasic(score))); parms.Add(s); - XmlRpcMethodCall call = new XmlRpcMethodCall("SubtitlesVote", parms); + var call = new XmlRpcMethodCall("SubtitlesVote", parms); OSHConsole.WriteLine("Sending SubtitlesVote request to the server ...", DebugCode.Good); // Send the request to the server @@ -1744,20 +1744,20 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseSubtitlesVote R = new MethodResponseSubtitlesVote(); + var R = new MethodResponseSubtitlesVote(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { case "status": R.Status = (string)MEMBER.Data.Data; OSHConsole.WriteLine(">" + MEMBER.Name + "= " + MEMBER.Data.Data.ToString()); break; case "seconds": R.Seconds = (double)MEMBER.Data.Data; OSHConsole.WriteLine(">" + MEMBER.Name + "= " + MEMBER.Data.Data.ToString()); break; case "data": - XmlRpcValueStruct dataStruct = (XmlRpcValueStruct)MEMBER.Data; - foreach (XmlRpcStructMember dataMemeber in dataStruct.Members) + var dataStruct = (XmlRpcValueStruct)MEMBER.Data; + foreach (var dataMemeber in dataStruct.Members) { OSHConsole.WriteLine(" >" + dataMemeber.Name + "= " + dataMemeber.Data.Data.ToString()); switch (dataMemeber.Name) @@ -1797,14 +1797,14 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); - XmlRpcValueStruct s = new XmlRpcValueStruct(new List()); + var s = new XmlRpcValueStruct(new List()); s.Members.Add(new XmlRpcStructMember("idsubtitle", new XmlRpcValueBasic(idsubtitle))); s.Members.Add(new XmlRpcStructMember("comment", new XmlRpcValueBasic(comment))); s.Members.Add(new XmlRpcStructMember("badsubtitle", new XmlRpcValueBasic(badsubtitle))); parms.Add(s); - XmlRpcMethodCall call = new XmlRpcMethodCall("AddComment", parms); + var call = new XmlRpcMethodCall("AddComment", parms); OSHConsole.WriteLine("Sending AddComment request to the server ...", DebugCode.Good); // Send the request to the server @@ -1817,12 +1817,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseAddComment R = new MethodResponseAddComment(); + var R = new MethodResponseAddComment(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { @@ -1857,14 +1857,14 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); - XmlRpcValueStruct s = new XmlRpcValueStruct(new List()); + var s = new XmlRpcValueStruct(new List()); s.Members.Add(new XmlRpcStructMember("sublanguageid", new XmlRpcValueBasic(sublanguageid))); s.Members.Add(new XmlRpcStructMember("idmovieimdb", new XmlRpcValueBasic(idmovieimdb))); s.Members.Add(new XmlRpcStructMember("comment", new XmlRpcValueBasic(comment))); parms.Add(s); - XmlRpcMethodCall call = new XmlRpcMethodCall("AddRequest", parms); + var call = new XmlRpcMethodCall("AddRequest", parms); OSHConsole.WriteLine("Sending AddRequest request to the server ...", DebugCode.Good); // Send the request to the server @@ -1877,20 +1877,20 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseAddRequest R = new MethodResponseAddRequest(); + var R = new MethodResponseAddRequest(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { case "status": R.Status = (string)MEMBER.Data.Data; OSHConsole.WriteLine(">" + MEMBER.Name + "= " + MEMBER.Data.Data.ToString()); break; case "seconds": R.Seconds = (double)MEMBER.Data.Data; OSHConsole.WriteLine(">" + MEMBER.Name + "= " + MEMBER.Data.Data.ToString()); break; case "data": - XmlRpcValueStruct dataStruct = (XmlRpcValueStruct)MEMBER.Data; - foreach (XmlRpcStructMember dataMemeber in dataStruct.Members) + var dataStruct = (XmlRpcValueStruct)MEMBER.Data; + foreach (var dataMemeber in dataStruct.Members) { switch (dataMemeber.Name) { @@ -1926,10 +1926,10 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN)); parms.Add(new XmlRpcValueBasic(language)); - XmlRpcMethodCall call = new XmlRpcMethodCall("GetSubLanguages", parms); + var call = new XmlRpcMethodCall("GetSubLanguages", parms); OSHConsole.WriteLine("Sending GetSubLanguages request to the server ...", DebugCode.Good); // Send the request to the server @@ -1942,27 +1942,27 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseGetSubLanguages R = new MethodResponseGetSubLanguages(); + var R = new MethodResponseGetSubLanguages(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { case "status": R.Status = (string)MEMBER.Data.Data; OSHConsole.WriteLine(">" + MEMBER.Name + "= " + MEMBER.Data.Data.ToString()); break; case "seconds": R.Seconds = (double)MEMBER.Data.Data; OSHConsole.WriteLine(">" + MEMBER.Name + "= " + MEMBER.Data.Data.ToString()); break; case "data":// array of structs - XmlRpcValueArray array = (XmlRpcValueArray)MEMBER.Data; - foreach (IXmlRpcValue value in array.Values) + var array = (XmlRpcValueArray)MEMBER.Data; + foreach (var value in array.Values) { if (value is XmlRpcValueStruct) { - XmlRpcValueStruct valueStruct = (XmlRpcValueStruct)value; - SubtitleLanguage lang = new SubtitleLanguage(); + var valueStruct = (XmlRpcValueStruct)value; + var lang = new SubtitleLanguage(); OSHConsole.WriteLine(">SubLanguage:"); - foreach (XmlRpcStructMember langMemeber in valueStruct.Members) + foreach (var langMemeber in valueStruct.Members) { OSHConsole.WriteLine(" >" + langMemeber.Name + "= " + langMemeber.Data.Data.ToString()); switch (langMemeber.Name) @@ -2009,10 +2009,10 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); // We need to gzip texts then code them with base 24 - List decodedTexts = new List(); + var decodedTexts = new List(); foreach (string text in texts) { // compress @@ -2025,7 +2025,7 @@ namespace OpenSubtitlesHandler decodedTexts.Add(Convert.ToBase64String(data)); } parms.Add(new XmlRpcValueArray(decodedTexts.ToArray())); - XmlRpcMethodCall call = new XmlRpcMethodCall("DetectLanguage", parms); + var call = new XmlRpcMethodCall("DetectLanguage", parms); OSHConsole.WriteLine("Sending DetectLanguage request to the server ...", DebugCode.Good); // Send the request to the server @@ -2038,12 +2038,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseDetectLanguage R = new MethodResponseDetectLanguage(); + var R = new MethodResponseDetectLanguage(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { @@ -2053,10 +2053,10 @@ namespace OpenSubtitlesHandler if (MEMBER.Data is XmlRpcValueStruct) { OSHConsole.WriteLine(">Languages:"); - XmlRpcValueStruct dataStruct = (XmlRpcValueStruct)MEMBER.Data; - foreach (XmlRpcStructMember dataMember in dataStruct.Members) + var dataStruct = (XmlRpcValueStruct)MEMBER.Data; + foreach (var dataMember in dataStruct.Members) { - DetectLanguageResult lang = new DetectLanguageResult(); + var lang = new DetectLanguageResult(); lang.InputSample = dataMember.Name; lang.LanguageID = dataMember.Data.Data.ToString(); R.Results.Add(lang); @@ -2095,10 +2095,10 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN)); parms.Add(new XmlRpcValueBasic(program)); - XmlRpcMethodCall call = new XmlRpcMethodCall("GetAvailableTranslations", parms); + var call = new XmlRpcMethodCall("GetAvailableTranslations", parms); OSHConsole.WriteLine("Sending GetAvailableTranslations request to the server ...", DebugCode.Good); // Send the request to the server @@ -2111,29 +2111,29 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseGetAvailableTranslations R = new MethodResponseGetAvailableTranslations(); + var R = new MethodResponseGetAvailableTranslations(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { case "status": R.Status = (string)MEMBER.Data.Data; OSHConsole.WriteLine(">" + MEMBER.Name + "= " + MEMBER.Data.Data.ToString()); break; case "seconds": R.Seconds = (double)MEMBER.Data.Data; OSHConsole.WriteLine(">" + MEMBER.Name + "= " + MEMBER.Data.Data.ToString()); break; case "data": - XmlRpcValueStruct dataStruct = (XmlRpcValueStruct)MEMBER.Data; + var dataStruct = (XmlRpcValueStruct)MEMBER.Data; OSHConsole.WriteLine(">data:"); - foreach (XmlRpcStructMember dataMember in dataStruct.Members) + foreach (var dataMember in dataStruct.Members) { if (dataMember.Data is XmlRpcValueStruct) { - XmlRpcValueStruct resStruct = (XmlRpcValueStruct)dataMember.Data; - GetAvailableTranslationsResult res = new GetAvailableTranslationsResult(); + var resStruct = (XmlRpcValueStruct)dataMember.Data; + var res = new GetAvailableTranslationsResult(); res.LanguageID = dataMember.Name; OSHConsole.WriteLine(" >LanguageID: " + dataMember.Name); - foreach (XmlRpcStructMember resMember in resStruct.Members) + foreach (var resMember in resStruct.Members) { switch (resMember.Name) { @@ -2178,12 +2178,12 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN)); parms.Add(new XmlRpcValueBasic(iso639)); parms.Add(new XmlRpcValueBasic(format)); parms.Add(new XmlRpcValueBasic(program)); - XmlRpcMethodCall call = new XmlRpcMethodCall("GetTranslation", parms); + var call = new XmlRpcMethodCall("GetTranslation", parms); OSHConsole.WriteLine("Sending GetTranslation request to the server ...", DebugCode.Good); // Send the request to the server @@ -2197,12 +2197,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseGetTranslation R = new MethodResponseGetTranslation(); + var R = new MethodResponseGetTranslation(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { @@ -2236,12 +2236,12 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); }*/ // Method call .. - List parms = new List(); + var parms = new List(); // parms.Add(new XmlRpcValueBasic(TOKEN)); parms.Add(new XmlRpcValueBasic(program)); // parms.Add(new XmlRpcValueBasic(XML_PRC_USERAGENT)); - XmlRpcMethodCall call = new XmlRpcMethodCall("AutoUpdate", parms); + var call = new XmlRpcMethodCall("AutoUpdate", parms); OSHConsole.WriteLine("Sending AutoUpdate request to the server ...", DebugCode.Good); // Send the request to the server string response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT)); @@ -2253,12 +2253,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseAutoUpdate R = new MethodResponseAutoUpdate(); + var R = new MethodResponseAutoUpdate(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { @@ -2296,10 +2296,10 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN)); parms.Add(new XmlRpcValueArray(hashes)); - XmlRpcMethodCall call = new XmlRpcMethodCall("CheckMovieHash", parms); + var call = new XmlRpcMethodCall("CheckMovieHash", parms); OSHConsole.WriteLine("Sending CheckMovieHash request to the server ...", DebugCode.Good); // Send the request to the server @@ -2312,27 +2312,27 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseCheckMovieHash R = new MethodResponseCheckMovieHash(); + var R = new MethodResponseCheckMovieHash(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { case "status": R.Status = (string)MEMBER.Data.Data; OSHConsole.WriteLine(">" + MEMBER.Name + "= " + MEMBER.Data.Data.ToString()); break; case "seconds": R.Seconds = (double)MEMBER.Data.Data; OSHConsole.WriteLine(">" + MEMBER.Name + "= " + MEMBER.Data.Data.ToString()); break; case "data": - XmlRpcValueStruct dataStruct = (XmlRpcValueStruct)MEMBER.Data; + var dataStruct = (XmlRpcValueStruct)MEMBER.Data; OSHConsole.WriteLine(">Data:"); - foreach (XmlRpcStructMember dataMember in dataStruct.Members) + foreach (var dataMember in dataStruct.Members) { - CheckMovieHashResult res = new CheckMovieHashResult(); + var res = new CheckMovieHashResult(); res.Name = dataMember.Name; OSHConsole.WriteLine(" >" + res.Name + ":"); - XmlRpcValueStruct movieStruct = (XmlRpcValueStruct)dataMember.Data; - foreach (XmlRpcStructMember movieMember in movieStruct.Members) + var movieStruct = (XmlRpcValueStruct)dataMember.Data; + foreach (var movieMember in movieStruct.Members) { switch (movieMember.Name) { @@ -2373,10 +2373,10 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN)); parms.Add(new XmlRpcValueArray(hashes)); - XmlRpcMethodCall call = new XmlRpcMethodCall("CheckMovieHash2", parms); + var call = new XmlRpcMethodCall("CheckMovieHash2", parms); OSHConsole.WriteLine("Sending CheckMovieHash2 request to the server ...", DebugCode.Good); // Send the request to the server @@ -2389,31 +2389,31 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseCheckMovieHash2 R = new MethodResponseCheckMovieHash2(); + var R = new MethodResponseCheckMovieHash2(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { case "status": R.Status = (string)MEMBER.Data.Data; OSHConsole.WriteLine(">" + MEMBER.Name + "= " + MEMBER.Data.Data.ToString()); break; case "seconds": R.Seconds = (double)MEMBER.Data.Data; OSHConsole.WriteLine(">" + MEMBER.Name + "= " + MEMBER.Data.Data.ToString()); break; case "data": - XmlRpcValueStruct dataStruct = (XmlRpcValueStruct)MEMBER.Data; + var dataStruct = (XmlRpcValueStruct)MEMBER.Data; OSHConsole.WriteLine(">Data:"); - foreach (XmlRpcStructMember dataMember in dataStruct.Members) + foreach (var dataMember in dataStruct.Members) { - CheckMovieHash2Result res = new CheckMovieHash2Result(); + var res = new CheckMovieHash2Result(); res.Name = dataMember.Name; OSHConsole.WriteLine(" >" + res.Name + ":"); - XmlRpcValueArray dataArray = (XmlRpcValueArray)dataMember.Data; + var dataArray = (XmlRpcValueArray)dataMember.Data; foreach (XmlRpcValueStruct movieStruct in dataArray.Values) { - CheckMovieHash2Data d = new CheckMovieHash2Data(); - foreach (XmlRpcStructMember movieMember in movieStruct.Members) + var d = new CheckMovieHash2Data(); + foreach (var movieMember in movieStruct.Members) { switch (movieMember.Name) { @@ -2459,10 +2459,10 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN)); parms.Add(new XmlRpcValueArray(hashes)); - XmlRpcMethodCall call = new XmlRpcMethodCall("CheckSubHash", parms); + var call = new XmlRpcMethodCall("CheckSubHash", parms); OSHConsole.WriteLine("Sending CheckSubHash request to the server ...", DebugCode.Good); // Send the request to the server @@ -2475,12 +2475,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseCheckSubHash R = new MethodResponseCheckSubHash(); + var R = new MethodResponseCheckSubHash(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { @@ -2488,11 +2488,11 @@ namespace OpenSubtitlesHandler case "seconds": R.Seconds = (double)MEMBER.Data.Data; OSHConsole.WriteLine(">" + MEMBER.Name + "= " + MEMBER.Data.Data.ToString()); break; case "data": OSHConsole.WriteLine(">Data:"); - XmlRpcValueStruct dataStruct = (XmlRpcValueStruct)MEMBER.Data; - foreach (XmlRpcStructMember dataMember in dataStruct.Members) + var dataStruct = (XmlRpcValueStruct)MEMBER.Data; + foreach (var dataMember in dataStruct.Members) { OSHConsole.WriteLine(" >" + dataMember.Name + "= " + dataMember.Data.Data.ToString()); - CheckSubHashResult r = new CheckSubHashResult(); + var r = new CheckSubHashResult(); r.Hash = dataMember.Name; r.SubID = dataMember.Data.Data.ToString(); R.Results.Add(r); @@ -2526,14 +2526,14 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN, XmlRpcBasicValueType.String)); - XmlRpcValueStruct s = new XmlRpcValueStruct(new List()); + var s = new XmlRpcValueStruct(new List()); int i = 1; - foreach (TryUploadSubtitlesParameters cd in subs) + foreach (var cd in subs) { - XmlRpcStructMember member = new XmlRpcStructMember("cd" + i, null); - XmlRpcValueStruct memberStruct = new XmlRpcValueStruct(new List()); + var member = new XmlRpcStructMember("cd" + i, null); + var memberStruct = new XmlRpcValueStruct(new List()); memberStruct.Members.Add(new XmlRpcStructMember("subhash", new XmlRpcValueBasic(cd.subhash))); memberStruct.Members.Add(new XmlRpcStructMember("subfilename", new XmlRpcValueBasic(cd.subfilename))); memberStruct.Members.Add(new XmlRpcStructMember("moviehash", new XmlRpcValueBasic(cd.moviehash))); @@ -2547,7 +2547,7 @@ namespace OpenSubtitlesHandler i++; } parms.Add(s); - XmlRpcMethodCall call = new XmlRpcMethodCall("TryUploadSubtitles", parms); + var call = new XmlRpcMethodCall("TryUploadSubtitles", parms); OSHConsole.WriteLine("Sending TryUploadSubtitles request to the server ...", DebugCode.Good); // Send the request to the server @@ -2560,12 +2560,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseTryUploadSubtitles R = new MethodResponseTryUploadSubtitles(); + var R = new MethodResponseTryUploadSubtitles(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { @@ -2577,14 +2577,14 @@ namespace OpenSubtitlesHandler { OSHConsole.WriteLine("Results: "); - XmlRpcValueArray rarray = (XmlRpcValueArray)MEMBER.Data; - foreach (IXmlRpcValue subStruct in rarray.Values) + var rarray = (XmlRpcValueArray)MEMBER.Data; + foreach (var subStruct in rarray.Values) { if (subStruct == null) continue; if (!(subStruct is XmlRpcValueStruct)) continue; - SubtitleSearchResult result = new SubtitleSearchResult(); - foreach (XmlRpcStructMember submember in ((XmlRpcValueStruct)subStruct).Members) + var result = new SubtitleSearchResult(); + foreach (var submember in ((XmlRpcValueStruct)subStruct).Members) { // To avoid errors of arranged info or missing ones, let's do it with switch.. switch (submember.Name) @@ -2658,14 +2658,14 @@ namespace OpenSubtitlesHandler return new MethodResponseError("Fail", "Can't do this call, 'token' value not set. Please use Log In method first."); } // Method call .. - List parms = new List(); + var parms = new List(); parms.Add(new XmlRpcValueBasic(TOKEN)); // Main struct - XmlRpcValueStruct s = new XmlRpcValueStruct(new List()); + var s = new XmlRpcValueStruct(new List()); // Base info member as struct - XmlRpcStructMember member = new XmlRpcStructMember("baseinfo", null); - XmlRpcValueStruct memberStruct = new XmlRpcValueStruct(new List()); + var member = new XmlRpcStructMember("baseinfo", null); + var memberStruct = new XmlRpcValueStruct(new List()); memberStruct.Members.Add(new XmlRpcStructMember("idmovieimdb", new XmlRpcValueBasic(info.idmovieimdb))); memberStruct.Members.Add(new XmlRpcStructMember("sublanguageid", new XmlRpcValueBasic(info.sublanguageid))); memberStruct.Members.Add(new XmlRpcStructMember("moviereleasename", new XmlRpcValueBasic(info.moviereleasename))); @@ -2679,10 +2679,10 @@ namespace OpenSubtitlesHandler // CDS members int i = 1; - foreach (UploadSubtitleParameters cd in info.CDS) + foreach (var cd in info.CDS) { - XmlRpcStructMember member2 = new XmlRpcStructMember("cd" + i, null); - XmlRpcValueStruct memberStruct2 = new XmlRpcValueStruct(new List()); + var member2 = new XmlRpcStructMember("cd" + i, null); + var memberStruct2 = new XmlRpcValueStruct(new List()); memberStruct2.Members.Add(new XmlRpcStructMember("subhash", new XmlRpcValueBasic(cd.subhash))); memberStruct2.Members.Add(new XmlRpcStructMember("subfilename", new XmlRpcValueBasic(cd.subfilename))); memberStruct2.Members.Add(new XmlRpcStructMember("moviehash", new XmlRpcValueBasic(cd.moviehash))); @@ -2701,7 +2701,7 @@ namespace OpenSubtitlesHandler parms.Add(s); // add user agent //parms.Add(new XmlRpcValueBasic(XML_PRC_USERAGENT)); - XmlRpcMethodCall call = new XmlRpcMethodCall("UploadSubtitles", parms); + var call = new XmlRpcMethodCall("UploadSubtitles", parms); OSHConsole.WriteLine("Sending UploadSubtitles request to the server ...", DebugCode.Good); // Send the request to the server string response = Utilities.GetStreamString(Utilities.SendRequest(XmlRpcGenerator.Generate(call), XML_PRC_USERAGENT)); @@ -2713,12 +2713,12 @@ namespace OpenSubtitlesHandler { if (calls[0].Parameters.Count > 0) { - XmlRpcValueStruct mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; + var mainStruct = (XmlRpcValueStruct)calls[0].Parameters[0]; // Create the response, we'll need it later - MethodResponseUploadSubtitles R = new MethodResponseUploadSubtitles(); + var R = new MethodResponseUploadSubtitles(); // To make sure response is not currepted by server, do it in loop - foreach (XmlRpcStructMember MEMBER in mainStruct.Members) + foreach (var MEMBER in mainStruct.Members) { switch (MEMBER.Name) { diff --git a/OpenSubtitlesHandler/Utilities.cs b/OpenSubtitlesHandler/Utilities.cs index 468fdd254..8ea0c546d 100644 --- a/OpenSubtitlesHandler/Utilities.cs +++ b/OpenSubtitlesHandler/Utilities.cs @@ -56,9 +56,9 @@ namespace OpenSubtitlesHandler /// Bytes array of decompressed data public static byte[] Decompress(Stream dataToDecompress) { - using (MemoryStream target = new MemoryStream()) + using (var target = new MemoryStream()) { - using (System.IO.Compression.GZipStream decompressionStream = new System.IO.Compression.GZipStream(dataToDecompress, System.IO.Compression.CompressionMode.Decompress)) + using (var decompressionStream = new System.IO.Compression.GZipStream(dataToDecompress, System.IO.Compression.CompressionMode.Decompress)) { decompressionStream.CopyTo(target); } @@ -116,7 +116,7 @@ namespace OpenSubtitlesHandler using (responseStream) { // Handle response, should be XML text. - List data = new List(); + var data = new List(); while (true) { int r = responseStream.ReadByte(); diff --git a/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcValueArray.cs b/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcValueArray.cs index 3303e3848..d10a80175 100644 --- a/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcValueArray.cs +++ b/OpenSubtitlesHandler/XML-RPC/Values/XmlRpcValueArray.cs @@ -82,7 +82,7 @@ namespace XmlRpcHandler base() { values = new List(); - foreach (DateTime val in dates) + foreach (var val in dates) { values.Add(new XmlRpcValueBasic(val)); } @@ -91,7 +91,7 @@ namespace XmlRpcHandler base() { values = new List(); - foreach (XmlRpcValueBasic val in basicValues) + foreach (var val in basicValues) { values.Add(val); } @@ -100,7 +100,7 @@ namespace XmlRpcHandler base() { values = new List(); - foreach (XmlRpcValueStruct val in structs) + foreach (var val in structs) { values.Add(val); } @@ -109,7 +109,7 @@ namespace XmlRpcHandler base() { values = new List(); - foreach (XmlRpcValueArray val in arrays) + foreach (var val in arrays) { values.Add(val); } diff --git a/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs b/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs index 3d02622da..b1351f9e3 100644 --- a/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs +++ b/OpenSubtitlesHandler/XML-RPC/XmlRpcGenerator.cs @@ -50,17 +50,17 @@ namespace XmlRpcHandler if (methods.Length == 0) throw new Exception("No method to write !"); // Create xml - XmlWriterSettings sett = new XmlWriterSettings(); + var sett = new XmlWriterSettings(); sett.Indent = true; sett.Encoding = Encoding.UTF8; using (var ms = new MemoryStream()) { - using (XmlWriter XMLwrt = XmlWriter.Create(ms, sett)) + using (var XMLwrt = XmlWriter.Create(ms, sett)) { // Let's write the methods - foreach (XmlRpcMethodCall method in methods) + foreach (var method in methods) { XMLwrt.WriteStartElement("methodCall");//methodCall XMLwrt.WriteStartElement("methodName");//methodName @@ -68,7 +68,7 @@ namespace XmlRpcHandler XMLwrt.WriteEndElement();//methodName XMLwrt.WriteStartElement("params");//params // Write values - foreach (IXmlRpcValue p in method.Parameters) + foreach (var p in method.Parameters) { XMLwrt.WriteStartElement("param");//param if (p is XmlRpcValueBasic) @@ -101,8 +101,8 @@ namespace XmlRpcHandler /// public static XmlRpcMethodCall[] DecodeMethodResponse(string xmlResponse) { - List methods = new List(); - XmlReaderSettings sett = new XmlReaderSettings(); + var methods = new List(); + var sett = new XmlReaderSettings(); sett.DtdProcessing = DtdProcessing.Ignore; sett.IgnoreWhitespace = true; MemoryStream str; @@ -116,15 +116,15 @@ namespace XmlRpcHandler } using (str) { - using (XmlReader XMLread = XmlReader.Create(str, sett)) + using (var XMLread = XmlReader.Create(str, sett)) { - XmlRpcMethodCall call = new XmlRpcMethodCall("methodResponse"); + var call = new XmlRpcMethodCall("methodResponse"); // Read parameters while (XMLread.Read()) { if (XMLread.Name == "param" && XMLread.IsStartElement()) { - IXmlRpcValue val = ReadValue(XMLread); + var val = ReadValue(XMLread); if (val != null) call.Parameters.Add(val); } @@ -169,7 +169,7 @@ namespace XmlRpcHandler // Get date time format if (val.Data != null) { - DateTime time = (DateTime)val.Data; + var time = (DateTime)val.Data; string dt = time.Year + time.Month.ToString("D2") + time.Day.ToString("D2") + "T" + time.Hour.ToString("D2") + ":" + time.Minute.ToString("D2") + ":" + time.Second.ToString("D2"); @@ -190,7 +190,7 @@ namespace XmlRpcHandler { XMLwrt.WriteStartElement("value");//value XMLwrt.WriteStartElement("struct");//struct - foreach (XmlRpcStructMember member in val.Members) + foreach (var member in val.Members) { XMLwrt.WriteStartElement("member");//member @@ -221,7 +221,7 @@ namespace XmlRpcHandler XMLwrt.WriteStartElement("value");//value XMLwrt.WriteStartElement("array");//array XMLwrt.WriteStartElement("data");//data - foreach (IXmlRpcValue o in val.Values) + foreach (var o in val.Values) { if (o is XmlRpcValueBasic) { @@ -283,7 +283,7 @@ namespace XmlRpcHandler int hour = int.Parse(date.Substring(9, 2), UsCulture); int minute = int.Parse(date.Substring(12, 2), UsCulture);//19980717T14:08:55 int sec = int.Parse(date.Substring(15, 2), UsCulture); - DateTime time = new DateTime(year, month, day, hour, minute, sec); + var time = new DateTime(year, month, day, hour, minute, sec); return new XmlRpcValueBasic(time, XmlRpcBasicValueType.dateTime_iso8601); } else if (xmlReader.Name == "base64" && xmlReader.IsStartElement()) @@ -293,17 +293,17 @@ namespace XmlRpcHandler } else if (xmlReader.Name == "struct" && xmlReader.IsStartElement()) { - XmlRpcValueStruct strct = new XmlRpcValueStruct(new List()); + var strct = new XmlRpcValueStruct(new List()); // Read members... while (xmlReader.Read()) { if (xmlReader.Name == "member" && xmlReader.IsStartElement()) { - XmlRpcStructMember member = new XmlRpcStructMember("", null); + var member = new XmlRpcStructMember("", null); xmlReader.Read();// read name member.Name = ReadString(xmlReader); - IXmlRpcValue val = ReadValue(xmlReader, true); + var val = ReadValue(xmlReader, true); if (val != null) { member.Data = val; @@ -319,7 +319,7 @@ namespace XmlRpcHandler } else if (xmlReader.Name == "array" && xmlReader.IsStartElement()) { - XmlRpcValueArray array = new XmlRpcValueArray(); + var array = new XmlRpcValueArray(); // Read members... while (xmlReader.Read()) { @@ -329,7 +329,7 @@ namespace XmlRpcHandler } else { - IXmlRpcValue val = ReadValue(xmlReader); + var val = ReadValue(xmlReader); if (val != null) array.Values.Add(val); } diff --git a/RSSDP/DeviceAvailableEventArgs.cs b/RSSDP/DeviceAvailableEventArgs.cs index e52e801c4..9106e27e5 100644 --- a/RSSDP/DeviceAvailableEventArgs.cs +++ b/RSSDP/DeviceAvailableEventArgs.cs @@ -7,7 +7,7 @@ using MediaBrowser.Model.Net; namespace Rssdp { /// - /// Event arguments for the event. + /// Event arguments for the event. /// public sealed class DeviceAvailableEventArgs : EventArgs { @@ -18,17 +18,17 @@ namespace Rssdp private readonly DiscoveredSsdpDevice _DiscoveredDevice; private readonly bool _IsNewlyDiscovered; - #endregion + #endregion - #region Constructors + #region Constructors - /// - /// Full constructor. - /// - /// A instance representing the available device. - /// A boolean value indicating whether or not this device came from the cache. See for more detail. - /// Thrown if the parameter is null. - public DeviceAvailableEventArgs(DiscoveredSsdpDevice discoveredDevice, bool isNewlyDiscovered) + /// + /// Full constructor. + /// + /// A instance representing the available device. + /// A boolean value indicating whether or not this device came from the cache. See for more detail. + /// Thrown if the parameter is null. + public DeviceAvailableEventArgs(DiscoveredSsdpDevice discoveredDevice, bool isNewlyDiscovered) { if (discoveredDevice == null) throw new ArgumentNullException(nameof(discoveredDevice)); @@ -48,10 +48,10 @@ namespace Rssdp get { return _IsNewlyDiscovered; } } - /// - /// A reference to a instance containing the discovered details and allowing access to the full device description. - /// - public DiscoveredSsdpDevice DiscoveredDevice + /// + /// A reference to a instance containing the discovered details and allowing access to the full device description. + /// + public DiscoveredSsdpDevice DiscoveredDevice { get { return _DiscoveredDevice; } } diff --git a/RSSDP/DeviceEventArgs.cs b/RSSDP/DeviceEventArgs.cs index 55b23b68c..3925ba248 100644 --- a/RSSDP/DeviceEventArgs.cs +++ b/RSSDP/DeviceEventArgs.cs @@ -22,7 +22,7 @@ namespace Rssdp /// Constructs a new instance for the specified . /// /// The associated with the event this argument class is being used for. - /// Thrown if the argument is null. + /// Thrown if the argument is null. public DeviceEventArgs(SsdpDevice device) { if (device == null) throw new ArgumentNullException(nameof(device)); diff --git a/RSSDP/DeviceUnavailableEventArgs.cs b/RSSDP/DeviceUnavailableEventArgs.cs index ecba7c013..d90ddfb60 100644 --- a/RSSDP/DeviceUnavailableEventArgs.cs +++ b/RSSDP/DeviceUnavailableEventArgs.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace Rssdp { /// - /// Event arguments for the event. + /// Event arguments for the event. /// public sealed class DeviceUnavailableEventArgs : EventArgs { @@ -25,7 +25,7 @@ namespace Rssdp /// /// A instance representing the device that has become unavailable. /// A boolean value indicating whether this device is unavailable because it expired, or because it explicitly sent a byebye notification.. See for more detail. - /// Thrown if the parameter is null. + /// Thrown if the parameter is null. public DeviceUnavailableEventArgs(DiscoveredSsdpDevice discoveredDevice, bool expired) { if (discoveredDevice == null) throw new ArgumentNullException(nameof(discoveredDevice)); @@ -47,7 +47,7 @@ namespace Rssdp } /// - /// A reference to a instance containing the discovery details of the removed device. + /// A reference to a instance containing the discovery details of the removed device. /// public DiscoveredSsdpDevice DiscoveredDevice { diff --git a/RSSDP/DiscoveredSsdpDevice.cs b/RSSDP/DiscoveredSsdpDevice.cs index b643e3f08..f42e7c674 100644 --- a/RSSDP/DiscoveredSsdpDevice.cs +++ b/RSSDP/DiscoveredSsdpDevice.cs @@ -11,7 +11,7 @@ namespace Rssdp /// Represents a discovered device, containing basic information about the device and the location of it's full device description document. Also provides convenience methods for retrieving the device description document. /// /// - /// + /// public sealed class DiscoveredSsdpDevice { diff --git a/RSSDP/DisposableManagedObjectBase.cs b/RSSDP/DisposableManagedObjectBase.cs index 9933194bc..0f656fb46 100644 --- a/RSSDP/DisposableManagedObjectBase.cs +++ b/RSSDP/DisposableManagedObjectBase.cs @@ -20,10 +20,10 @@ namespace Rssdp.Infrastructure protected abstract void Dispose(bool disposing); /// - /// Throws and if the property is true. + /// Throws and if the property is true. /// /// - /// Thrown if the property is true. + /// Thrown if the property is true. /// protected virtual void ThrowIfDisposed() { diff --git a/RSSDP/HttpParserBase.cs b/RSSDP/HttpParserBase.cs index db496fe6f..18712470d 100644 --- a/RSSDP/HttpParserBase.cs +++ b/RSSDP/HttpParserBase.cs @@ -26,19 +26,19 @@ namespace Rssdp.Infrastructure private static byte[] EmptyByteArray = new byte[]{}; /// - /// Parses the provided into either a or object. + /// Parses the provided into either a or object. /// /// A string containing the HTTP message to parse. - /// Either a or object containing the parsed data. + /// Either a or object containing the parsed data. public abstract T Parse(string data); /// - /// Parses a string containing either an HTTP request or response into a or object. + /// Parses a string containing either an HTTP request or response into a or object. /// - /// A or object representing the parsed message. + /// A or object representing the parsed message. /// A reference to the collection for the object. /// A string containing the data to be parsed. - /// An object containing the content of the parsed message. + /// An object containing the content of the parsed message. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times", Justification = "Honestly, it's fine. MemoryStream doesn't mind.")] protected virtual void Parse(T message, System.Net.Http.Headers.HttpHeaders headers, string data) { @@ -61,7 +61,7 @@ namespace Rssdp.Infrastructure /// Used to parse the first line of an HTTP request or response and assign the values to the appropriate properties on the . /// /// The first line of the HTTP message to be parsed. - /// Either a or to assign the parsed values to. + /// Either a or to assign the parsed values to. protected abstract void ParseStatusLine(string data, T message); /// diff --git a/RSSDP/HttpRequestParser.cs b/RSSDP/HttpRequestParser.cs index 1af7f0d51..d4505b8ad 100644 --- a/RSSDP/HttpRequestParser.cs +++ b/RSSDP/HttpRequestParser.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; namespace Rssdp.Infrastructure { /// - /// Parses a string into a or throws an exception. + /// Parses a string into a or throws an exception. /// public sealed class HttpRequestParser : HttpParserBase { @@ -26,17 +26,17 @@ namespace Rssdp.Infrastructure #region Public Methods /// - /// Parses the specified data into a instance. + /// Parses the specified data into a instance. /// /// A string containing the data to parse. - /// A instance containing the parsed data. - public override System.Net.Http.HttpRequestMessage Parse(string data) + /// A instance containing the parsed data. + public override HttpRequestMessage Parse(string data) { - System.Net.Http.HttpRequestMessage retVal = null; + HttpRequestMessage retVal = null; try { - retVal = new System.Net.Http.HttpRequestMessage(); + retVal = new HttpRequestMessage(); Parse(retVal, retVal.Headers, data); @@ -57,7 +57,7 @@ namespace Rssdp.Infrastructure /// Used to parse the first line of an HTTP request or response and assign the values to the appropriate properties on the . /// /// The first line of the HTTP message to be parsed. - /// Either a or to assign the parsed values to. + /// Either a or to assign the parsed values to. protected override void ParseStatusLine(string data, HttpRequestMessage message) { if (data == null) throw new ArgumentNullException(nameof(data)); diff --git a/RSSDP/HttpResponseParser.cs b/RSSDP/HttpResponseParser.cs index d864a8bb7..a77c898ff 100644 --- a/RSSDP/HttpResponseParser.cs +++ b/RSSDP/HttpResponseParser.cs @@ -9,9 +9,9 @@ using System.Threading.Tasks; namespace Rssdp.Infrastructure { /// - /// Parses a string into a or throws an exception. + /// Parses a string into a or throws an exception. /// - public sealed class HttpResponseParser : HttpParserBase + public sealed class HttpResponseParser : HttpParserBase { #region Fields & Constants @@ -26,16 +26,16 @@ namespace Rssdp.Infrastructure #region Public Methods /// - /// Parses the specified data into a instance. + /// Parses the specified data into a instance. /// /// A string containing the data to parse. - /// A instance containing the parsed data. + /// A instance containing the parsed data. public override HttpResponseMessage Parse(string data) { - System.Net.Http.HttpResponseMessage retVal = null; + HttpResponseMessage retVal = null; try { - retVal = new System.Net.Http.HttpResponseMessage(); + retVal = new HttpResponseMessage(); Parse(retVal, retVal.Headers, data); @@ -68,7 +68,7 @@ namespace Rssdp.Infrastructure /// Used to parse the first line of an HTTP request or response and assign the values to the appropriate properties on the . /// /// The first line of the HTTP message to be parsed. - /// Either a or to assign the parsed values to. + /// Either a or to assign the parsed values to. protected override void ParseStatusLine(string data, HttpResponseMessage message) { if (data == null) throw new ArgumentNullException(nameof(data)); diff --git a/RSSDP/ISsdpDeviceLocator.cs b/RSSDP/ISsdpDeviceLocator.cs index 2351f5d62..8f0d39e75 100644 --- a/RSSDP/ISsdpDeviceLocator.cs +++ b/RSSDP/ISsdpDeviceLocator.cs @@ -128,7 +128,7 @@ namespace Rssdp.Infrastructure /// /// Does nothing if this instance is not already listening for notifications. /// - /// Throw if the property is true. + /// Throw if the property is true. /// /// /// diff --git a/RSSDP/ISsdpDevicePublisher.cs b/RSSDP/ISsdpDevicePublisher.cs index da2607fc4..7e914c109 100644 --- a/RSSDP/ISsdpDevicePublisher.cs +++ b/RSSDP/ISsdpDevicePublisher.cs @@ -17,14 +17,14 @@ namespace Rssdp.Infrastructure /// Adds a device (and it's children) to the list of devices being published by this server, making them discoverable to SSDP clients. /// /// The instance to add. - /// An awaitable . + /// An awaitable . void AddDevice(SsdpRootDevice device); /// /// Removes a device (and it's children) from the list of devices being published by this server, making them undiscoverable. /// /// The instance to add. - /// An awaitable . + /// An awaitable . Task RemoveDevice(SsdpRootDevice device); /// diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs index 8fb33924f..abd0dbdad 100644 --- a/RSSDP/SsdpCommunicationsServer.cs +++ b/RSSDP/SsdpCommunicationsServer.cs @@ -73,7 +73,7 @@ namespace Rssdp.Infrastructure /// /// Minimum constructor. /// - /// The argument is null. + /// The argument is null. public SsdpCommunicationsServer(ISocketFactory socketFactory, INetworkManager networkManager, ILogger logger, bool enableMultiSocketBinding) : this(socketFactory, 0, SsdpConstants.SsdpDefaultMulticastTimeToLive, networkManager, logger, enableMultiSocketBinding) { @@ -82,8 +82,8 @@ namespace Rssdp.Infrastructure /// /// Full constructor. /// - /// The argument is null. - /// The argument is less than or equal to zero. + /// The argument is null. + /// The argument is less than or equal to zero. public SsdpCommunicationsServer(ISocketFactory socketFactory, int localPort, int multicastTimeToLive, INetworkManager networkManager, ILogger logger, bool enableMultiSocketBinding) { if (socketFactory == null) throw new ArgumentNullException(nameof(socketFactory)); @@ -111,7 +111,7 @@ namespace Rssdp.Infrastructure /// /// Causes the server to begin listening for multicast messages, being SSDP search requests and notifications. /// - /// Thrown if the property is true (because has been called previously). + /// Thrown if the property is true (because has been called previously). public void BeginListeningForBroadcasts() { ThrowIfDisposed(); @@ -138,7 +138,7 @@ namespace Rssdp.Infrastructure /// /// Causes the server to stop listening for multicast messages, being SSDP search requests and notifications. /// - /// Thrown if the property is true (because has been called previously). + /// Thrown if the property is true (because has been called previously). public void StopListeningForBroadcasts() { lock (_BroadcastListenSocketSynchroniser) @@ -269,7 +269,7 @@ namespace Rssdp.Infrastructure /// /// Stops listening for search responses on the local, unicast socket. /// - /// Thrown if the property is true (because has been called previously). + /// Thrown if the property is true (because has been called previously). public void StopListeningForResponses() { lock (_SendSocketSynchroniser) diff --git a/RSSDP/SsdpDevice.cs b/RSSDP/SsdpDevice.cs index 8dc1805c5..b4c4a88fd 100644 --- a/RSSDP/SsdpDevice.cs +++ b/RSSDP/SsdpDevice.cs @@ -276,8 +276,8 @@ namespace Rssdp /// If the device is already a member of the collection, this method does nothing. /// Also sets the property of the added device and all descendant devices to the relevant instance. /// - /// Thrown if the argument is null. - /// Thrown if the is already associated with a different instance than used in this tree. Can occur if you try to add the same device instance to more than one tree. Also thrown if you try to add a device to itself. + /// Thrown if the argument is null. + /// Thrown if the is already associated with a different instance than used in this tree. Can occur if you try to add the same device instance to more than one tree. Also thrown if you try to add a device to itself. /// public void AddDevice(SsdpEmbeddedDevice device) { @@ -305,7 +305,7 @@ namespace Rssdp /// If the device is not a member of the collection, this method does nothing. /// Also sets the property to null for the removed device and all descendant devices. /// - /// Thrown if the argument is null. + /// Thrown if the argument is null. /// public void RemoveDevice(SsdpEmbeddedDevice device) { diff --git a/RSSDP/SsdpDeviceLocator.cs b/RSSDP/SsdpDeviceLocator.cs index ca6093725..1348cce8d 100644 --- a/RSSDP/SsdpDeviceLocator.cs +++ b/RSSDP/SsdpDeviceLocator.cs @@ -185,7 +185,7 @@ namespace Rssdp.Infrastructure /// /// /// - /// Throw if the ty is true. + /// Throw if the ty is true. public void StartListeningForNotifications() { ThrowIfDisposed(); @@ -204,7 +204,7 @@ namespace Rssdp.Infrastructure /// /// /// - /// Throw if the property is true. + /// Throw if the property is true. public void StopListeningForNotifications() { ThrowIfDisposed(); diff --git a/RSSDP/SsdpDevicePublisher.cs b/RSSDP/SsdpDevicePublisher.cs index 031b908dd..8a73e6a2d 100644 --- a/RSSDP/SsdpDevicePublisher.cs +++ b/RSSDP/SsdpDevicePublisher.cs @@ -76,8 +76,8 @@ namespace Rssdp.Infrastructure /// This method ignores duplicate device adds (if the same device instance is added multiple times, the second and subsequent add calls do nothing). /// /// The instance to add. - /// Thrown if the argument is null. - /// Thrown if the contains property values that are not acceptable to the UPnP 1.0 specification. + /// Thrown if the argument is null. + /// Thrown if the contains property values that are not acceptable to the UPnP 1.0 specification. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "t", Justification = "Capture task to local variable supresses compiler warning, but task is not really needed.")] public void AddDevice(SsdpRootDevice device) { @@ -85,7 +85,7 @@ namespace Rssdp.Infrastructure ThrowIfDisposed(); - TimeSpan minCacheTime = TimeSpan.Zero; + var minCacheTime = TimeSpan.Zero; bool wasAdded = false; lock (_Devices) { @@ -113,13 +113,13 @@ namespace Rssdp.Infrastructure /// This method does nothing if the device was not found in the collection. /// /// The instance to add. - /// Thrown if the argument is null. + /// Thrown if the argument is null. public async Task RemoveDevice(SsdpRootDevice device) { if (device == null) throw new ArgumentNullException(nameof(device)); bool wasRemoved = false; - TimeSpan minCacheTime = TimeSpan.Zero; + var minCacheTime = TimeSpan.Zero; lock (_Devices) { if (_Devices.Contains(device)) diff --git a/SocketHttpListener/Ext.cs b/SocketHttpListener/Ext.cs index 6b7564828..1251d19c0 100644 --- a/SocketHttpListener/Ext.cs +++ b/SocketHttpListener/Ext.cs @@ -161,7 +161,7 @@ namespace SocketHttpListener internal static bool Contains(this IEnumerable source, Func condition) { - foreach (T elm in source) + foreach (var elm in source) if (condition(elm)) return true; diff --git a/SocketHttpListener/MessageEventArgs.cs b/SocketHttpListener/MessageEventArgs.cs index d9bccbf3f..8e2151cb7 100644 --- a/SocketHttpListener/MessageEventArgs.cs +++ b/SocketHttpListener/MessageEventArgs.cs @@ -9,8 +9,8 @@ namespace SocketHttpListener /// /// A event occurs when the receives /// a text or binary data frame. - /// If you want to get the received data, you access the or - /// property. + /// If you want to get the received data, you access the or + /// property. /// public class MessageEventArgs : EventArgs { diff --git a/SocketHttpListener/Net/ChunkStream.cs b/SocketHttpListener/Net/ChunkStream.cs index 4bf3a6dea..3836947d4 100644 --- a/SocketHttpListener/Net/ChunkStream.cs +++ b/SocketHttpListener/Net/ChunkStream.cs @@ -108,7 +108,7 @@ namespace SocketHttpListener.Net var chunksForRemoving = new List(count); for (int i = 0; i < count; i++) { - Chunk chunk = _chunks[i]; + var chunk = _chunks[i]; if (chunk.Offset == chunk.Bytes.Length) { @@ -189,7 +189,7 @@ namespace SocketHttpListener.Net int count = _chunks.Count; for (int i = 0; i < count; i++) { - Chunk ch = _chunks[i]; + var ch = _chunks[i]; if (ch == null || ch.Bytes == null) continue; if (ch.Bytes.Length > 0 && ch.Offset < ch.Bytes.Length) @@ -368,7 +368,7 @@ namespace SocketHttpListener.Net return State.Trailer; } - StringReader reader = new StringReader(_saved.ToString()); + var reader = new StringReader(_saved.ToString()); string line; while ((line = reader.ReadLine()) != null && line != "") _headers.Add(line); @@ -378,7 +378,7 @@ namespace SocketHttpListener.Net private static void ThrowProtocolViolation(string message) { - WebException we = new WebException(message, null, WebExceptionStatus.ServerProtocolViolation, null); + var we = new WebException(message, null, WebExceptionStatus.ServerProtocolViolation, null); throw we; } } diff --git a/SocketHttpListener/Net/ChunkedInputStream.cs b/SocketHttpListener/Net/ChunkedInputStream.cs index cdf7ac649..8d59a7907 100644 --- a/SocketHttpListener/Net/ChunkedInputStream.cs +++ b/SocketHttpListener/Net/ChunkedInputStream.cs @@ -61,7 +61,7 @@ namespace SocketHttpListener.Net : base(stream, buffer, offset, length) { _context = context; - WebHeaderCollection coll = (WebHeaderCollection)context.Request.Headers; + var coll = (WebHeaderCollection)context.Request.Headers; _decoder = new ChunkStream(coll); } @@ -73,13 +73,13 @@ namespace SocketHttpListener.Net protected override int ReadCore(byte[] buffer, int offset, int count) { - IAsyncResult ares = BeginReadCore(buffer, offset, count, null, null); + var ares = BeginReadCore(buffer, offset, count, null, null); return EndRead(ares); } protected override IAsyncResult BeginReadCore(byte[] buffer, int offset, int size, AsyncCallback cback, object state) { - HttpStreamAsyncResult ares = new HttpStreamAsyncResult(this); + var ares = new HttpStreamAsyncResult(this); ares._callback = cback; ares._state = state; if (_no_more_data || size == 0 || _closed) @@ -107,7 +107,7 @@ namespace SocketHttpListener.Net ares._buffer = new byte[8192]; ares._offset = 0; ares._count = 8192; - ReadBufferState rb = new ReadBufferState(buffer, offset, size, ares); + var rb = new ReadBufferState(buffer, offset, size, ares); rb.InitialCount += nread; base.BeginReadCore(ares._buffer, ares._offset, ares._count, OnRead, rb); return ares; @@ -115,8 +115,8 @@ namespace SocketHttpListener.Net private void OnRead(IAsyncResult base_ares) { - ReadBufferState rb = (ReadBufferState)base_ares.AsyncState; - HttpStreamAsyncResult ares = rb.Ares; + var rb = (ReadBufferState)base_ares.AsyncState; + var ares = rb.Ares; try { int nread = base.EndRead(base_ares); @@ -155,7 +155,7 @@ namespace SocketHttpListener.Net if (asyncResult == null) throw new ArgumentNullException(nameof(asyncResult)); - HttpStreamAsyncResult ares = asyncResult as HttpStreamAsyncResult; + var ares = asyncResult as HttpStreamAsyncResult; if (ares == null || !ReferenceEquals(this, ares._parent)) { throw new ArgumentException("Invalid async result"); diff --git a/SocketHttpListener/Net/HttpConnection.cs b/SocketHttpListener/Net/HttpConnection.cs index f6db5f0b2..e87503118 100644 --- a/SocketHttpListener/Net/HttpConnection.cs +++ b/SocketHttpListener/Net/HttpConnection.cs @@ -212,7 +212,7 @@ namespace SocketHttpListener.Net private static void OnRead(IAsyncResult ares) { - HttpConnection cnc = (HttpConnection)ares.AsyncState; + var cnc = (HttpConnection)ares.AsyncState; cnc.OnReadInternal(ares); } @@ -269,7 +269,7 @@ namespace SocketHttpListener.Net Close(true); return; } - HttpListener listener = _epl.Listener; + var listener = _epl.Listener; if (_lastListener != listener) { RemoveConnection(); @@ -417,7 +417,7 @@ namespace SocketHttpListener.Net { try { - HttpListenerResponse response = _context.Response; + var response = _context.Response; response.StatusCode = status; response.ContentType = "text/html"; string description = HttpStatusDescription.Get(status); @@ -509,7 +509,7 @@ namespace SocketHttpListener.Net return; } - Socket s = _socket; + var s = _socket; _socket = null; try { diff --git a/SocketHttpListener/Net/HttpEndPointListener.cs b/SocketHttpListener/Net/HttpEndPointListener.cs index 0f1ce696f..d002c13b2 100644 --- a/SocketHttpListener/Net/HttpEndPointListener.cs +++ b/SocketHttpListener/Net/HttpEndPointListener.cs @@ -160,7 +160,7 @@ namespace SocketHttpListener.Net } catch (Exception ex) { - HttpEndPointListener epl = (HttpEndPointListener)acceptEventArg.UserToken; + var epl = (HttpEndPointListener)acceptEventArg.UserToken; epl._logger.LogError(ex, "Error in socket.AcceptAsync"); } @@ -176,7 +176,7 @@ namespace SocketHttpListener.Net private static async void ProcessAccept(SocketAsyncEventArgs args) { - HttpEndPointListener epl = (HttpEndPointListener)args.UserToken; + var epl = (HttpEndPointListener)args.UserToken; if (epl._closed) { @@ -214,7 +214,7 @@ namespace SocketHttpListener.Net var localEndPointString = accepted.LocalEndPoint == null ? string.Empty : accepted.LocalEndPoint.ToString(); //_logger.LogInformation("HttpEndPointListener Accepting connection from {0} to {1} secure connection requested: {2}", remoteEndPointString, localEndPointString, _secure); - HttpConnection conn = new HttpConnection(epl._logger, accepted, epl, epl._secure, epl._cert, epl._cryptoProvider, epl._streamHelper, epl._textEncoding, epl._fileSystem, epl._environment); + var conn = new HttpConnection(epl._logger, accepted, epl, epl._secure, epl._cert, epl._cryptoProvider, epl._streamHelper, epl._textEncoding, epl._fileSystem, epl._environment); await conn.Init().ConfigureAwait(false); @@ -276,9 +276,9 @@ namespace SocketHttpListener.Net public bool BindContext(HttpListenerContext context) { - HttpListenerRequest req = context.Request; + var req = context.Request; ListenerPrefix prefix; - HttpListener listener = SearchListener(req.Url, out prefix); + var listener = SearchListener(req.Url, out prefix); if (listener == null) return false; @@ -310,8 +310,8 @@ namespace SocketHttpListener.Net if (host != null && host != "") { - Dictionary localPrefixes = _prefixes; - foreach (ListenerPrefix p in localPrefixes.Keys) + var localPrefixes = _prefixes; + foreach (var p in localPrefixes.Keys) { string ppath = p.Path; if (ppath.Length < bestLength) @@ -331,7 +331,7 @@ namespace SocketHttpListener.Net return bestMatch; } - List list = _unhandledPrefixes; + var list = _unhandledPrefixes; bestMatch = MatchFromList(host, path, list, out prefix); if (path != pathSlash && bestMatch == null) @@ -361,7 +361,7 @@ namespace SocketHttpListener.Net HttpListener bestMatch = null; int bestLength = -1; - foreach (ListenerPrefix p in list) + foreach (var p in list) { string ppath = p.Path; if (ppath.Length < bestLength) @@ -383,7 +383,7 @@ namespace SocketHttpListener.Net if (list == null) return; - foreach (ListenerPrefix p in list) + foreach (var p in list) { if (p.Path == prefix.Path) throw new Exception("net_listener_already"); @@ -399,7 +399,7 @@ namespace SocketHttpListener.Net int c = list.Count; for (int i = 0; i < c; i++) { - ListenerPrefix p = list[i]; + var p = list[i]; if (p.Path == prefix.Path) { list.RemoveAt(i); @@ -414,7 +414,7 @@ namespace SocketHttpListener.Net if (_prefixes.Count > 0) return; - List list = _unhandledPrefixes; + var list = _unhandledPrefixes; if (list != null && list.Count > 0) return; @@ -434,7 +434,7 @@ namespace SocketHttpListener.Net // Clone the list because RemoveConnection can be called from Close var connections = new List(_unregisteredConnections.Keys); - foreach (HttpConnection c in connections) + foreach (var c in connections) c.Close(true); _unregisteredConnections.Clear(); } diff --git a/SocketHttpListener/Net/HttpEndPointManager.cs b/SocketHttpListener/Net/HttpEndPointManager.cs index 787730ed4..98986333b 100644 --- a/SocketHttpListener/Net/HttpEndPointManager.cs +++ b/SocketHttpListener/Net/HttpEndPointManager.cs @@ -17,7 +17,7 @@ namespace SocketHttpListener.Net public static void AddListener(ILogger logger, HttpListener listener) { - List added = new List(); + var added = new List(); try { lock ((s_ipEndPoints as ICollection).SyncRoot) @@ -64,7 +64,7 @@ namespace SocketHttpListener.Net } } - ListenerPrefix lp = new ListenerPrefix(p); + var lp = new ListenerPrefix(p); if (lp.Host != "*" && lp.Host != "+" && Uri.CheckHostName(lp.Host) == UriHostNameType.Unknown) throw new HttpListenerException((int)HttpStatusCode.BadRequest, "net_listener_host"); @@ -75,7 +75,7 @@ namespace SocketHttpListener.Net throw new HttpListenerException((int)HttpStatusCode.BadRequest, "net_invalid_path"); // listens on all the interfaces if host name cannot be parsed by IPAddress. - HttpEndPointListener epl = GetEPListener(logger, lp.Host, lp.Port, listener, lp.Secure); + var epl = GetEPListener(logger, lp.Host, lp.Port, listener, lp.Secure); epl.AddPrefix(lp, listener); } @@ -179,14 +179,14 @@ namespace SocketHttpListener.Net private static void RemovePrefixInternal(ILogger logger, string prefix, HttpListener listener) { - ListenerPrefix lp = new ListenerPrefix(prefix); + var lp = new ListenerPrefix(prefix); if (lp.Path.IndexOf('%') != -1) return; if (lp.Path.IndexOf("//", StringComparison.Ordinal) != -1) return; - HttpEndPointListener epl = GetEPListener(logger, lp.Host, lp.Port, listener, lp.Secure); + var epl = GetEPListener(logger, lp.Host, lp.Port, listener, lp.Secure); epl.RemovePrefix(lp, listener); } } diff --git a/SocketHttpListener/Net/HttpListenerContext.Managed.cs b/SocketHttpListener/Net/HttpListenerContext.Managed.cs index a6622c479..4cdb6882e 100644 --- a/SocketHttpListener/Net/HttpListenerContext.Managed.cs +++ b/SocketHttpListener/Net/HttpListenerContext.Managed.cs @@ -44,7 +44,7 @@ namespace SocketHttpListener.Net } internal IPrincipal ParseBasicAuthentication(string authData) => - TryParseBasicAuth(authData, out HttpStatusCode errorCode, out string username, out string password) ? + TryParseBasicAuth(authData, out var errorCode, out string username, out string password) ? new GenericPrincipal(new HttpListenerBasicIdentity(username, password), Array.Empty()) : null; diff --git a/SocketHttpListener/Net/HttpListenerRequest.Managed.cs b/SocketHttpListener/Net/HttpListenerRequest.Managed.cs index 3f9e32f08..41d075045 100644 --- a/SocketHttpListener/Net/HttpListenerRequest.Managed.cs +++ b/SocketHttpListener/Net/HttpListenerRequest.Managed.cs @@ -180,7 +180,7 @@ namespace SocketHttpListener.Net if (string.Compare(Headers[HttpKnownHeaderNames.Expect], "100-continue", StringComparison.OrdinalIgnoreCase) == 0) { - HttpResponseStream output = _context.Connection.GetResponseStream(); + var output = _context.Connection.GetResponseStream(); output.InternalWrite(s_100continue, 0, s_100continue.Length); } } @@ -256,7 +256,7 @@ namespace SocketHttpListener.Net { try { - IAsyncResult ares = InputStream.BeginRead(bytes, 0, length, null, null); + var ares = InputStream.BeginRead(bytes, 0, length, null, null); if (!ares.IsCompleted && !ares.AsyncWaitHandle.WaitOne(1000)) return false; if (InputStream.EndRead(ares) <= 0) diff --git a/SocketHttpListener/Net/HttpListenerRequest.cs b/SocketHttpListener/Net/HttpListenerRequest.cs index 2e8396f6f..1c832367e 100644 --- a/SocketHttpListener/Net/HttpListenerRequest.cs +++ b/SocketHttpListener/Net/HttpListenerRequest.cs @@ -23,7 +23,7 @@ namespace SocketHttpListener.Net private static CookieCollection ParseCookies(Uri uri, string setCookieHeader) { - CookieCollection cookies = new CookieCollection(); + var cookies = new CookieCollection(); return cookies; } @@ -171,7 +171,7 @@ namespace SocketHttpListener.Net { get { - QueryParamCollection queryString = new QueryParamCollection(); + var queryString = new QueryParamCollection(); Helpers.FillFromString(queryString, Url.Query, true, ContentEncoding); return queryString; } @@ -197,7 +197,7 @@ namespace SocketHttpListener.Net return null; } - bool success = Uri.TryCreate(referrer, UriKind.RelativeOrAbsolute, out Uri urlReferrer); + bool success = Uri.TryCreate(referrer, UriKind.RelativeOrAbsolute, out var urlReferrer); return success ? urlReferrer : null; } } @@ -296,7 +296,7 @@ namespace SocketHttpListener.Net // collect comma-separated values into list - List values = new List(); + var values = new List(); int i = 0; while (i < l) @@ -341,7 +341,7 @@ namespace SocketHttpListener.Net private static string UrlDecodeStringFromStringInternal(string s, Encoding e) { int count = s.Length; - UrlDecoder helper = new UrlDecoder(count, e); + var helper = new UrlDecoder(count, e); // go through the string's chars collapsing %XX and %uXXXX and // appending each char as char, with exception of %XX constructs diff --git a/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs b/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs index f1a0af0bf..310c71a0d 100644 --- a/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs +++ b/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs @@ -54,7 +54,7 @@ namespace SocketHttpListener.Net public static Uri GetRequestUri(string rawUri, string cookedUriScheme, string cookedUriHost, string cookedUriPath, string cookedUriQuery) { - HttpListenerRequestUriBuilder builder = new HttpListenerRequestUriBuilder(rawUri, + var builder = new HttpListenerRequestUriBuilder(rawUri, cookedUriScheme, cookedUriHost, cookedUriPath, cookedUriQuery); return builder.Build(); @@ -94,10 +94,10 @@ namespace SocketHttpListener.Net // Try to check the raw path using first the primary encoding (according to http.sys settings); // if it fails try the secondary encoding. - ParsingResult result = BuildRequestUriUsingRawPath(GetEncoding(EncodingType.Primary)); + var result = BuildRequestUriUsingRawPath(GetEncoding(EncodingType.Primary)); if (result == ParsingResult.EncodingError) { - Encoding secondaryEncoding = GetEncoding(EncodingType.Secondary); + var secondaryEncoding = GetEncoding(EncodingType.Secondary); result = BuildRequestUriUsingRawPath(secondaryEncoding); } isValid = (result == ParsingResult.Success) ? true : false; @@ -136,7 +136,7 @@ namespace SocketHttpListener.Net _requestUriString.Append(Uri.SchemeDelimiter); _requestUriString.Append(_cookedUriHost); - ParsingResult result = ParseRawPath(encoding); + var result = ParseRawPath(encoding); if (result == ParsingResult.Success) { _requestUriString.Append(_cookedUriQuery); @@ -327,7 +327,7 @@ namespace SocketHttpListener.Net private static string GetOctetsAsString(IEnumerable octets) { - StringBuilder octetString = new StringBuilder(); + var octetString = new StringBuilder(); bool first = true; foreach (byte octet in octets) diff --git a/SocketHttpListener/Net/HttpListenerResponse.Managed.cs b/SocketHttpListener/Net/HttpListenerResponse.Managed.cs index 198cdcf76..9f9b8384d 100644 --- a/SocketHttpListener/Net/HttpListenerResponse.Managed.cs +++ b/SocketHttpListener/Net/HttpListenerResponse.Managed.cs @@ -263,8 +263,8 @@ namespace SocketHttpListener.Net ComputeCookies(); } - Encoding encoding = _textEncoding.GetDefaultEncoding(); - StreamWriter writer = new StreamWriter(ms, encoding, 256); + var encoding = _textEncoding.GetDefaultEncoding(); + var writer = new StreamWriter(ms, encoding, 256); writer.Write("HTTP/1.1 {0} ", _statusCode); // "1.1" matches Windows implementation, which ignores the response version writer.Flush(); byte[] statusDescriptionBytes = WebHeaderEncoding.GetBytes(StatusDescription); diff --git a/SocketHttpListener/Net/HttpRequestStream.Managed.cs b/SocketHttpListener/Net/HttpRequestStream.Managed.cs index 73a673531..42fc4d97c 100644 --- a/SocketHttpListener/Net/HttpRequestStream.Managed.cs +++ b/SocketHttpListener/Net/HttpRequestStream.Managed.cs @@ -124,7 +124,7 @@ namespace SocketHttpListener.Net { if (size == 0 || _closed) { - HttpStreamAsyncResult ares = new HttpStreamAsyncResult(this); + var ares = new HttpStreamAsyncResult(this); ares._callback = cback; ares._state = state; ares.Complete(); @@ -134,7 +134,7 @@ namespace SocketHttpListener.Net int nread = FillFromBuffer(buffer, offset, size); if (nread > 0 || nread == -1) { - HttpStreamAsyncResult ares = new HttpStreamAsyncResult(this); + var ares = new HttpStreamAsyncResult(this); ares._buffer = buffer; ares._offset = offset; ares._count = size; diff --git a/SocketHttpListener/Net/HttpResponseStream.Managed.cs b/SocketHttpListener/Net/HttpResponseStream.Managed.cs index b4c223418..cda4fe8bc 100644 --- a/SocketHttpListener/Net/HttpResponseStream.Managed.cs +++ b/SocketHttpListener/Net/HttpResponseStream.Managed.cs @@ -70,7 +70,7 @@ namespace SocketHttpListener.Net private void DisposeCore() { byte[] bytes = null; - MemoryStream ms = GetHeaders(true); + var ms = GetHeaders(true); bool chunked = _response.SendChunked; if (_stream.CanWrite) { @@ -110,7 +110,7 @@ namespace SocketHttpListener.Net if (_stream.CanWrite) { - MemoryStream ms = GetHeaders(closing: false, isWebSocketHandshake: true); + var ms = GetHeaders(closing: false, isWebSocketHandshake: true); bool chunked = _response.SendChunked; long start = ms.Position; @@ -146,7 +146,7 @@ namespace SocketHttpListener.Net return null; } - MemoryStream ms = new MemoryStream(); + var ms = new MemoryStream(); _response.SendHeaders(closing, ms, isWebSocketHandshake); return ms; } @@ -190,7 +190,7 @@ namespace SocketHttpListener.Net return; byte[] bytes = null; - MemoryStream ms = GetHeaders(false); + var ms = GetHeaders(false); bool chunked = _response.SendChunked; if (ms != null) { @@ -226,7 +226,7 @@ namespace SocketHttpListener.Net { if (_closed) { - HttpStreamAsyncResult ares = new HttpStreamAsyncResult(this); + var ares = new HttpStreamAsyncResult(this); ares._callback = cback; ares._state = state; ares.Complete(); @@ -234,7 +234,7 @@ namespace SocketHttpListener.Net } byte[] bytes = null; - MemoryStream ms = GetHeaders(false); + var ms = GetHeaders(false); bool chunked = _response.SendChunked; if (ms != null) { diff --git a/SocketHttpListener/Net/ListenerPrefix.cs b/SocketHttpListener/Net/ListenerPrefix.cs index 3e78752fd..edfcb8904 100644 --- a/SocketHttpListener/Net/ListenerPrefix.cs +++ b/SocketHttpListener/Net/ListenerPrefix.cs @@ -40,7 +40,7 @@ namespace SocketHttpListener.Net // Equals and GetHashCode are required to detect duplicates in HttpListenerPrefixCollection. public override bool Equals(object o) { - ListenerPrefix other = o as ListenerPrefix; + var other = o as ListenerPrefix; if (other == null) return false; diff --git a/SocketHttpListener/Net/WebHeaderCollection.cs b/SocketHttpListener/Net/WebHeaderCollection.cs index 8c3395df5..02d3cf61f 100644 --- a/SocketHttpListener/Net/WebHeaderCollection.cs +++ b/SocketHttpListener/Net/WebHeaderCollection.cs @@ -234,7 +234,7 @@ namespace SocketHttpListener.Net internal string ToStringMultiValue() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); int count = base.Count; for (int i = 0; i < count; i++) @@ -263,7 +263,7 @@ namespace SocketHttpListener.Net public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); int count = base.Count; for (int i = 0; i < count; i++) diff --git a/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs b/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs index 79f87dfc9..f51f72dba 100644 --- a/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs +++ b/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs @@ -16,8 +16,8 @@ namespace SocketHttpListener.Net.WebSockets ValidateOptions(subProtocol, receiveBufferSize, MinSendBufferSize, keepAliveInterval); // get property will create a new response if one doesn't exist. - HttpListenerResponse response = context.Response; - HttpListenerRequest request = context.Request; + var response = context.Response; + var request = context.Request; ValidateWebSocketHeaders(context); string secWebSocketVersion = request.Headers[HttpKnownHeaderNames.SecWebSocketVersion]; @@ -50,15 +50,15 @@ namespace SocketHttpListener.Net.WebSockets response.StatusCode = (int)HttpStatusCode.SwitchingProtocols; // HTTP 101 response.StatusDescription = HttpStatusDescription.Get(HttpStatusCode.SwitchingProtocols); - HttpResponseStream responseStream = response.OutputStream as HttpResponseStream; + var responseStream = response.OutputStream as HttpResponseStream; // Send websocket handshake headers await responseStream.WriteWebSocketHandshakeHeadersAsync().ConfigureAwait(false); //WebSocket webSocket = WebSocket.CreateFromStream(context.Connection.ConnectedStream, isServer: true, subProtocol, keepAliveInterval); - WebSocket webSocket = new WebSocket(subProtocol); + var webSocket = new WebSocket(subProtocol); - HttpListenerWebSocketContext webSocketContext = new HttpListenerWebSocketContext( + var webSocketContext = new HttpListenerWebSocketContext( request.Url, request.Headers, request.Cookies, diff --git a/SocketHttpListener/Net/WebSockets/HttpWebSocket.cs b/SocketHttpListener/Net/WebSockets/HttpWebSocket.cs index 4667275c5..b346cc98e 100644 --- a/SocketHttpListener/Net/WebSockets/HttpWebSocket.cs +++ b/SocketHttpListener/Net/WebSockets/HttpWebSocket.cs @@ -19,7 +19,7 @@ namespace SocketHttpListener.Net.WebSockets string retVal; // SHA1 used only for hashing purposes, not for crypto. Check here for FIPS compat. - using (SHA1 sha1 = SHA1.Create()) + using (var sha1 = SHA1.Create()) { string acceptString = string.Concat(secWebSocketKey, HttpWebSocket.SecWebSocketKeyGuid); byte[] toHash = Encoding.UTF8.GetBytes(acceptString); diff --git a/SocketHttpListener/Net/WebSockets/WebSocketValidate.cs b/SocketHttpListener/Net/WebSockets/WebSocketValidate.cs index 0469e3b6c..3f61e55fc 100644 --- a/SocketHttpListener/Net/WebSockets/WebSocketValidate.cs +++ b/SocketHttpListener/Net/WebSockets/WebSocketValidate.cs @@ -20,7 +20,7 @@ namespace SocketHttpListener.Net.WebSockets if (validStates != null && validStates.Length > 0) { - foreach (WebSocketState validState in validStates) + foreach (var validState in validStates) { if (currentState == validState) { -- cgit v1.2.3 From bb8df8dfa0f84f6ccc8d3d3352f8a611e156e65a Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Tue, 8 Jan 2019 01:57:01 +0100 Subject: Updates reported version in `System/Info*` set of endpoints. Added ProductName and ServerVersion to API. Added build version and build step. Addressed issues wtih indentation. Made the BuildVersion an actual object. This lets up link to the github page of that commit. Fixed class method type and styled link. Fixed languages and split out the information in the UI. Moved update-version script and gave it executable permissions. Windows correctly finds the .bat file. And linux takes the one without extension. Removed tempfiles from replace sessions from csproj. Updated version generation scripts. Will also work with pre existing version files. (Source tarballs etc.) Added simple replace for ssh github links. Add execute rights to update-version. Wrapped long line in ApplicationHost.cs Fixed some small issues. Fixed some small issues, and flipped some if's around. Converted parameter names to camelBack casing. Sealed the attribute class. Removed MPLv2 license. Fixed file headers. Added newline. Moved links in *.csproj files as well. Fix issues caused by rebase auto merging. Removed default constructor and added init values to properties, also hid the Remote value form API. --- .gitignore | 1 + BDInfo/BDInfo.csproj | 2 +- DvdLib/DvdLib.csproj | 2 +- Emby.Dlna/Emby.Dlna.csproj | 2 +- Emby.Drawing.Skia/Emby.Drawing.Skia.csproj | 2 +- Emby.Drawing/Emby.Drawing.csproj | 2 +- Emby.IsoMounting/IsoMounter/IsoMounter.csproj | 2 +- Emby.Naming/Emby.Naming.csproj | 2 +- Emby.Notifications/Emby.Notifications.csproj | 2 +- Emby.Photos/Emby.Photos.csproj | 2 +- Emby.Server.Implementations/ApplicationHost.cs | 31 ++++- .../Emby.Server.Implementations.csproj | 3 +- Emby.XmlTv/Emby.XmlTv/Emby.XmlTv.csproj | 6 +- Jellyfin.Server/Jellyfin.Server.csproj | 3 +- Jellyfin.Versioning/AssemblyExtendedVersion.cs | 48 ++++++++ Jellyfin.Versioning/ExtendedVersion.cs | 133 +++++++++++++++++++++ Jellyfin.Versioning/Jellyfin.Versioning.csproj | 20 ++++ Jellyfin.Versioning/Properties/AssemblyInfo.cs | 21 ++++ Jellyfin.Versioning/SharedVersion.cs | 8 ++ Jellyfin.Versioning/update-version | 44 +++++++ Jellyfin.Versioning/update-version.bat | 23 ++++ Jellyfin.Versioning/update-version.ps1 | 31 +++++ MediaBrowser.Api/MediaBrowser.Api.csproj | 2 +- MediaBrowser.Common/MediaBrowser.Common.csproj | 2 +- .../MediaBrowser.Controller.csproj | 2 +- .../MediaBrowser.LocalMetadata.csproj | 2 +- .../MediaBrowser.MediaEncoding.csproj | 2 +- MediaBrowser.Model/MediaBrowser.Model.csproj | 6 +- MediaBrowser.Model/System/PublicSystemInfo.cs | 16 ++- MediaBrowser.Model/System/SystemInfo.cs | 9 ++ .../MediaBrowser.Providers.csproj | 2 +- .../MediaBrowser.XbmcMetadata.csproj | 2 +- MediaBrowser.sln | 6 + Mono.Nat/Mono.Nat.csproj | 2 +- SocketHttpListener/SocketHttpListener.csproj | 2 +- 35 files changed, 421 insertions(+), 24 deletions(-) create mode 100644 Jellyfin.Versioning/AssemblyExtendedVersion.cs create mode 100644 Jellyfin.Versioning/ExtendedVersion.cs create mode 100644 Jellyfin.Versioning/Jellyfin.Versioning.csproj create mode 100644 Jellyfin.Versioning/Properties/AssemblyInfo.cs create mode 100644 Jellyfin.Versioning/SharedVersion.cs create mode 100755 Jellyfin.Versioning/update-version create mode 100644 Jellyfin.Versioning/update-version.bat create mode 100644 Jellyfin.Versioning/update-version.ps1 (limited to 'MediaBrowser.Model/System') diff --git a/.gitignore b/.gitignore index ec683f38f..aef666272 100644 --- a/.gitignore +++ b/.gitignore @@ -263,3 +263,4 @@ deployment/**/pkg-dist/ deployment/**/pkg-dist-tmp/ deployment/collect-dist/ +jellyfin_version.ini diff --git a/BDInfo/BDInfo.csproj b/BDInfo/BDInfo.csproj index 774e5709d..d1d2cefea 100644 --- a/BDInfo/BDInfo.csproj +++ b/BDInfo/BDInfo.csproj @@ -1,7 +1,7 @@ - + diff --git a/DvdLib/DvdLib.csproj b/DvdLib/DvdLib.csproj index 774e5709d..d1d2cefea 100644 --- a/DvdLib/DvdLib.csproj +++ b/DvdLib/DvdLib.csproj @@ -1,7 +1,7 @@ - + diff --git a/Emby.Dlna/Emby.Dlna.csproj b/Emby.Dlna/Emby.Dlna.csproj index f155bce6d..280dc4bfa 100644 --- a/Emby.Dlna/Emby.Dlna.csproj +++ b/Emby.Dlna/Emby.Dlna.csproj @@ -1,7 +1,7 @@ - + diff --git a/Emby.Drawing.Skia/Emby.Drawing.Skia.csproj b/Emby.Drawing.Skia/Emby.Drawing.Skia.csproj index 1eb537741..6491f44b8 100644 --- a/Emby.Drawing.Skia/Emby.Drawing.Skia.csproj +++ b/Emby.Drawing.Skia/Emby.Drawing.Skia.csproj @@ -17,7 +17,7 @@ - + diff --git a/Emby.Drawing/Emby.Drawing.csproj b/Emby.Drawing/Emby.Drawing.csproj index ba29c656b..67364380a 100644 --- a/Emby.Drawing/Emby.Drawing.csproj +++ b/Emby.Drawing/Emby.Drawing.csproj @@ -6,7 +6,7 @@ - + diff --git a/Emby.IsoMounting/IsoMounter/IsoMounter.csproj b/Emby.IsoMounting/IsoMounter/IsoMounter.csproj index 2a81f5aa0..518b2372f 100644 --- a/Emby.IsoMounting/IsoMounter/IsoMounter.csproj +++ b/Emby.IsoMounting/IsoMounter/IsoMounter.csproj @@ -1,7 +1,7 @@ - + diff --git a/Emby.Naming/Emby.Naming.csproj b/Emby.Naming/Emby.Naming.csproj index 88e3af522..419cf101d 100644 --- a/Emby.Naming/Emby.Naming.csproj +++ b/Emby.Naming/Emby.Naming.csproj @@ -6,7 +6,7 @@ - + diff --git a/Emby.Notifications/Emby.Notifications.csproj b/Emby.Notifications/Emby.Notifications.csproj index 14caa4a55..8fa21635e 100644 --- a/Emby.Notifications/Emby.Notifications.csproj +++ b/Emby.Notifications/Emby.Notifications.csproj @@ -6,7 +6,7 @@ - + diff --git a/Emby.Photos/Emby.Photos.csproj b/Emby.Photos/Emby.Photos.csproj index e6b445202..9ad2afb69 100644 --- a/Emby.Photos/Emby.Photos.csproj +++ b/Emby.Photos/Emby.Photos.csproj @@ -7,7 +7,7 @@ - + diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 91eaf9bbf..f186ccdaa 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -47,6 +47,7 @@ using Emby.Server.Implementations.Threading; using Emby.Server.Implementations.TV; using Emby.Server.Implementations.Updates; using Emby.Server.Implementations.Xml; +using Jellyfin.Versioning; using MediaBrowser.Api; using MediaBrowser.Common; using MediaBrowser.Common.Configuration; @@ -434,7 +435,30 @@ namespace Emby.Server.Implementations /// Gets the current application version /// /// The application version. - public Version ApplicationVersion => _version ?? (_version = typeof(ApplicationHost).Assembly.GetName().Version); + public Version ApplicationVersion => _version ?? (_version = ApplicationExtendedVersion.ApiVersion); + + private Version _serverVersion; + /// + /// Gets the current application server version + /// + /// The application server version. + public Version ApplicationServerVersion => _serverVersion ?? (_serverVersion = typeof(ApplicationHost).Assembly.GetName().Version); + + private ExtendedVersion _extendedVersion; + /// + /// Gets the current application server version + /// + /// The application server version. + public ExtendedVersion ApplicationExtendedVersion => _extendedVersion ?? + (_extendedVersion = typeof(ApplicationHost).Assembly.GetCustomAttributes(typeof(AssemblyExtendedVersion), false) + .Cast().FirstOrDefault().ExtendedVersion); + + private string _productName; + /// + /// Gets the current application name + /// + /// The application name. + public string ApplicationProductName => _productName ?? (_productName = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location).ProductName); private DeviceId _deviceId; public string SystemId @@ -1826,6 +1850,9 @@ namespace Emby.Server.Implementations HasPendingRestart = HasPendingRestart, IsShuttingDown = IsShuttingDown, Version = ApplicationVersion.ToString(), + ServerVersion = ApplicationServerVersion.ToString(), + ExtendedVersion = ApplicationExtendedVersion, + ProductName = ApplicationProductName, WebSocketPortNumber = HttpPort, CompletedInstallations = InstallationManager.CompletedInstallations.ToArray(), Id = SystemId, @@ -1872,6 +1899,8 @@ namespace Emby.Server.Implementations return new PublicSystemInfo { Version = ApplicationVersion.ToString(), + ServerVersion = ApplicationServerVersion.ToString(), + ExtendedVersion = ApplicationExtendedVersion, Id = SystemId, OperatingSystem = EnvironmentInfo.OperatingSystem.ToString(), WanAddress = wanAddress, diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 5a0e1da4d..843718756 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -3,6 +3,7 @@ + @@ -30,7 +31,7 @@ - + diff --git a/Emby.XmlTv/Emby.XmlTv/Emby.XmlTv.csproj b/Emby.XmlTv/Emby.XmlTv/Emby.XmlTv.csproj index baa522ee3..dfda0f170 100644 --- a/Emby.XmlTv/Emby.XmlTv/Emby.XmlTv.csproj +++ b/Emby.XmlTv/Emby.XmlTv/Emby.XmlTv.csproj @@ -6,7 +6,11 @@ - + + + + + diff --git a/Jellyfin.Server/Jellyfin.Server.csproj b/Jellyfin.Server/Jellyfin.Server.csproj index f17e06e69..c89f5131d 100644 --- a/Jellyfin.Server/Jellyfin.Server.csproj +++ b/Jellyfin.Server/Jellyfin.Server.csproj @@ -13,7 +13,7 @@ - + @@ -46,6 +46,7 @@ + diff --git a/Jellyfin.Versioning/AssemblyExtendedVersion.cs b/Jellyfin.Versioning/AssemblyExtendedVersion.cs new file mode 100644 index 000000000..b2453fc8d --- /dev/null +++ b/Jellyfin.Versioning/AssemblyExtendedVersion.cs @@ -0,0 +1,48 @@ +// Jellyfin.Versioning/AssemblyExtendedVersion.cs +// Part of the Jellyfin project (https://jellyfin.media) +// +// All copyright belongs to the Jellyfin contributors; a full list can +// be found in the file CONTRIBUTORS.md +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; + +namespace Jellyfin.Versioning +{ + [AttributeUsage(AttributeTargets.Assembly)] + public sealed class AssemblyExtendedVersion : Attribute + { + public ExtendedVersion ExtendedVersion { get; } + + public AssemblyExtendedVersion(ExtendedVersion ExtendedVersion) + { + this.ExtendedVersion = ExtendedVersion; + } + + public AssemblyExtendedVersion(string apiVersion, bool readResource = true) + { + var assembly = Assembly.GetExecutingAssembly(); + var resourceName = "Jellyfin.Versioning.jellyfin_version.ini"; + + using (var stream = assembly.GetManifestResourceStream(resourceName)) + { + ExtendedVersion = new ExtendedVersion(new Version(apiVersion), stream); + } + } + } +} diff --git a/Jellyfin.Versioning/ExtendedVersion.cs b/Jellyfin.Versioning/ExtendedVersion.cs new file mode 100644 index 000000000..de54d3829 --- /dev/null +++ b/Jellyfin.Versioning/ExtendedVersion.cs @@ -0,0 +1,133 @@ +// Jellyfin.Versioning/ExtendedVersion.cs +// Part of the Jellyfin project (https://jellyfin.media) +// +// All copyright belongs to the Jellyfin contributors; a full list can +// be found in the file CONTRIBUTORS.md +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + + +using System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.Serialization; +using System.Text; + +namespace Jellyfin.Versioning +{ + public class ExtendedVersion + { + [IgnoreDataMember] + public Version ApiVersion { get; } + + public string CommitHash { get; } = String.Empty; + + public long Revision { get; } = 0; + + public string Branch { get; } = String.Empty; + + public string TagDescription { get; } = String.Empty; + + [IgnoreDataMember] + public Uri Remote { get; } = null; + + public ExtendedVersion(Version apiVersion, Stream extendedVersionFileStream) + { + ApiVersion = apiVersion; + int line = 1; + using (var reader = new StreamReader(extendedVersionFileStream)) + { + while (!reader.EndOfStream) + { + string item = reader.ReadLine(); + + if (string.IsNullOrWhiteSpace(item.Trim())) + { + //empty line, skip + continue; + } + var kvpair = item.Split('='); + if (kvpair.Length != 2) + { + throw new ArgumentException(nameof(extendedVersionFileStream), + $"ExtendedVersionFile contains bad key-value pair '{item}' at line {line}."); + } + var key = kvpair[0].Trim().ToLower(); + var value = kvpair[1].Trim(); + switch (key) + { + case "commit": + if (value.Length < 7 || value.Length > 40) + { + throw new ArgumentException(nameof(extendedVersionFileStream), + $"ExtendedVersionFile has a bad commit hash '{value}' on line {line}, it should be a string between 7 and 40 characters."); + } + CommitHash = value; + break; + case "branch": + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException(nameof(extendedVersionFileStream), + $"ExtendedVersionFile has a bad branch '{value}' on line {line}, it can not be empty."); + } + Branch = value; + break; + case "revision": + if (!long.TryParse(value, out long rev)) + { + throw new ArgumentException(nameof(extendedVersionFileStream), + $"ExtendedVersionFile has a bad revision '{value}' on line {line}, it should be an integer."); + } + Revision = rev; + break; + case "tagdesc": + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException(nameof(extendedVersionFileStream), + $"ExtendedVersionFile has a bad tag description '{value}' on line {line}, it can not be empty."); + } + TagDescription = value; + break; + case "remote": + var remoteRepo = value.Replace(".git", string.Empty).Replace("git@github.com:", "https://github.com/"); + if (Uri.IsWellFormedUriString(remoteRepo, UriKind.Absolute)) + { + Remote = new Uri(remoteRepo); + } + else if (Uri.IsWellFormedUriString(value, UriKind.Absolute)) + { + //fallback if the replace about broke the Uri + Remote = new Uri(value); + } + else + { + throw new ArgumentException(nameof(extendedVersionFileStream), + $"ExtendedVersionFile has a bad remote URI '{value}' on line {line}, it should be a valid remote URI (ssh or https)."); + } + break; + default: + throw new ArgumentException(nameof(extendedVersionFileStream), + $"ExtendedVersionFile contains an unrecognized key-value pair '{item}' at line {line}."); + } + line++; + } + } + } + + public override string ToString() + { + return $"{ApiVersion};{CommitHash};{Revision};{Branch};{TagDescription};{Remote}"; + } + } +} diff --git a/Jellyfin.Versioning/Jellyfin.Versioning.csproj b/Jellyfin.Versioning/Jellyfin.Versioning.csproj new file mode 100644 index 000000000..8dc45dde1 --- /dev/null +++ b/Jellyfin.Versioning/Jellyfin.Versioning.csproj @@ -0,0 +1,20 @@ + + + + netstandard2.0 + false + + + + + + + + + + + + + + + diff --git a/Jellyfin.Versioning/Properties/AssemblyInfo.cs b/Jellyfin.Versioning/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..5ccba7ad5 --- /dev/null +++ b/Jellyfin.Versioning/Properties/AssemblyInfo.cs @@ -0,0 +1,21 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Jellyfin.Versioning")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Jellyfin Project")] +[assembly: AssemblyProduct("Jellyfin: The Free Software Media System")] +[assembly: AssemblyCopyright("Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License Version 2")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("en")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] diff --git a/Jellyfin.Versioning/SharedVersion.cs b/Jellyfin.Versioning/SharedVersion.cs new file mode 100644 index 000000000..574a852e4 --- /dev/null +++ b/Jellyfin.Versioning/SharedVersion.cs @@ -0,0 +1,8 @@ +using System.Reflection; +using Jellyfin.Versioning; + +//To keep compatibility with Emby do not remove the revision (fourth number) +[assembly: AssemblyVersion("10.0.1.0")] +[assembly: AssemblyFileVersion("10.0.1.0")] +[assembly: AssemblyInformationalVersion("10.0.1.0")] +[assembly: AssemblyExtendedVersion("3.5.2.0", true)] diff --git a/Jellyfin.Versioning/update-version b/Jellyfin.Versioning/update-version new file mode 100755 index 000000000..e8d4fab6d --- /dev/null +++ b/Jellyfin.Versioning/update-version @@ -0,0 +1,44 @@ +#!/usr/bin/env sh +# Jellyfin.Versioning/update-version +# Part of the Jellyfin project (https://jellyfin.media) +# +# All copyright belongs to the Jellyfin contributors; a full list can +# be found in the file CONTRIBUTORS.md +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +if [ -d "$(dirname "$0")/../.git" ]; then + commit=`git rev-parse HEAD` + count=`git rev-list HEAD --count` + branch=`git rev-parse --abbrev-ref HEAD` + desc=`git describe --tags --always --long` + remote=`git config --get remote.origin.url` + tee jellyfin_version.ini <. +:licenseblock + +powershell.exe -executionpolicy Bypass -file update-version.ps1 \ No newline at end of file diff --git a/Jellyfin.Versioning/update-version.ps1 b/Jellyfin.Versioning/update-version.ps1 new file mode 100644 index 000000000..2f9f0cf7b --- /dev/null +++ b/Jellyfin.Versioning/update-version.ps1 @@ -0,0 +1,31 @@ +# Jellyfin.Versioning/update-version.ps1 +# Part of the Jellyfin project (https://jellyfin.media) +# +# All copyright belongs to the Jellyfin contributors; a full list can +# be found in the file CONTRIBUTORS.md +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +if(Test-Path -Path '..\.git' ){ + $commit = (git rev-parse HEAD) + $count = (git rev-list HEAD --count) + $branch = (git rev-parse --abbrev-ref HEAD) + $desc = (git describe --tags --always --long) + $remote = (git config --get remote.origin.url) + Set-Content -Path "jellyfin_version.ini" -Value "commit=$commit`r`nrevision=$count`r`nbranch=$branch`r`ntagdesc=$desc`r`nremote=$remote" + Write-Host Updated build version in jellyfin_version.ini + Write-Host "commit=$commit`r`nrevision=$count`r`nbranch=$branch`r`ntagdesc=$desc`r`nremote=$remote`r`n" +} else { + Write-Host Did not update build version because there was no .git directory. +} \ No newline at end of file diff --git a/MediaBrowser.Api/MediaBrowser.Api.csproj b/MediaBrowser.Api/MediaBrowser.Api.csproj index ba29c656b..67364380a 100644 --- a/MediaBrowser.Api/MediaBrowser.Api.csproj +++ b/MediaBrowser.Api/MediaBrowser.Api.csproj @@ -6,7 +6,7 @@ - + diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj index 2220d4661..314c04010 100644 --- a/MediaBrowser.Common/MediaBrowser.Common.csproj +++ b/MediaBrowser.Common/MediaBrowser.Common.csproj @@ -12,7 +12,7 @@ - + diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 01893f1b5..9a0d2879e 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -13,7 +13,7 @@ - + diff --git a/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj b/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj index 867b82ede..968751439 100644 --- a/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj +++ b/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj @@ -6,7 +6,7 @@ - + diff --git a/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj b/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj index c5ed65734..8e40f1def 100644 --- a/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj +++ b/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj @@ -6,7 +6,7 @@ - + diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index f17fd7159..e4fd970e0 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -17,7 +17,11 @@ - + + + + + diff --git a/MediaBrowser.Model/System/PublicSystemInfo.cs b/MediaBrowser.Model/System/PublicSystemInfo.cs index bc8983fd1..eded5248e 100644 --- a/MediaBrowser.Model/System/PublicSystemInfo.cs +++ b/MediaBrowser.Model/System/PublicSystemInfo.cs @@ -1,3 +1,5 @@ +using Jellyfin.Versioning; + namespace MediaBrowser.Model.System { public class PublicSystemInfo @@ -21,11 +23,23 @@ namespace MediaBrowser.Model.System public string ServerName { get; set; } /// - /// Gets or sets the version. + /// Gets or sets the API version. /// /// The version. public string Version { get; set; } + /// + /// Gets or sets the server version. + /// + /// The server version. + public string ServerVersion { get; set; } + + /// + /// Gets or sets the build version. + /// + /// The build version. + public ExtendedVersion ExtendedVersion { get; set; } + /// /// Gets or sets the operating sytem. /// diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs index b0432ae74..26f735330 100644 --- a/MediaBrowser.Model/System/SystemInfo.cs +++ b/MediaBrowser.Model/System/SystemInfo.cs @@ -16,6 +16,15 @@ namespace MediaBrowser.Model.System /// The display name of the operating system. public string OperatingSystemDisplayName { get; set; } + /// + /// The product name. This is the AssemblyProduct name. + /// + public string ProductName { get; set; } + + /// + /// Get or sets the package name. + /// + /// The value of the '-package' command line argument. public string PackageName { get; set; } /// diff --git a/MediaBrowser.Providers/MediaBrowser.Providers.csproj b/MediaBrowser.Providers/MediaBrowser.Providers.csproj index e6ef889c3..6026e4c50 100644 --- a/MediaBrowser.Providers/MediaBrowser.Providers.csproj +++ b/MediaBrowser.Providers/MediaBrowser.Providers.csproj @@ -7,7 +7,7 @@ - + diff --git a/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj b/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj index ba29c656b..67364380a 100644 --- a/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj +++ b/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj @@ -6,7 +6,7 @@ - + diff --git a/MediaBrowser.sln b/MediaBrowser.sln index c9676553e..5065c96c8 100644 --- a/MediaBrowser.sln +++ b/MediaBrowser.sln @@ -60,6 +60,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .editorconfig = .editorconfig EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Versioning", "Jellyfin.Versioning\Jellyfin.Versioning.csproj", "{F825B88C-4C87-4439-AE20-ACA12B6A9C83}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -170,6 +172,10 @@ Global {07E39F42-A2C6-4B32-AF8C-725F957A73FF}.Debug|Any CPU.Build.0 = Debug|Any CPU {07E39F42-A2C6-4B32-AF8C-725F957A73FF}.Release|Any CPU.ActiveCfg = Release|Any CPU {07E39F42-A2C6-4B32-AF8C-725F957A73FF}.Release|Any CPU.Build.0 = Release|Any CPU + {F825B88C-4C87-4439-AE20-ACA12B6A9C83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F825B88C-4C87-4439-AE20-ACA12B6A9C83}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F825B88C-4C87-4439-AE20-ACA12B6A9C83}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F825B88C-4C87-4439-AE20-ACA12B6A9C83}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Mono.Nat/Mono.Nat.csproj b/Mono.Nat/Mono.Nat.csproj index edfd5c9bb..30ffa7b4b 100644 --- a/Mono.Nat/Mono.Nat.csproj +++ b/Mono.Nat/Mono.Nat.csproj @@ -6,7 +6,7 @@ - + diff --git a/SocketHttpListener/SocketHttpListener.csproj b/SocketHttpListener/SocketHttpListener.csproj index e700540a9..f7f184892 100644 --- a/SocketHttpListener/SocketHttpListener.csproj +++ b/SocketHttpListener/SocketHttpListener.csproj @@ -6,7 +6,7 @@ - + -- cgit v1.2.3 From 924ec0c191b66520f7ec7d3f6dc556e06305846b Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Sun, 20 Jan 2019 01:12:44 +0100 Subject: Revert Jellyfin.Versioning, Update all versions and user agents. --- BDInfo/BDInfo.csproj | 2 +- DvdLib/DvdLib.csproj | 2 +- Emby.Dlna/Emby.Dlna.csproj | 2 +- Emby.Dlna/PlayTo/PlayToManager.cs | 2 +- Emby.Drawing.Skia/Emby.Drawing.Skia.csproj | 2 +- Emby.Drawing/Emby.Drawing.csproj | 2 +- Emby.IsoMounting/IsoMounter/IsoMounter.csproj | 2 +- Emby.Naming/Emby.Naming.csproj | 2 +- Emby.Notifications/Emby.Notifications.csproj | 2 +- Emby.Photos/Emby.Photos.csproj | 2 +- Emby.Server.Implementations/ApplicationHost.cs | 35 ++---- .../Emby.Server.Implementations.csproj | 3 +- .../LiveTv/Listings/SchedulesDirect.cs | 2 +- .../LiveTv/TunerHosts/M3uParser.cs | 2 +- Emby.XmlTv/Emby.XmlTv/Emby.XmlTv.csproj | 6 +- Jellyfin.Server/Jellyfin.Server.csproj | 3 +- Jellyfin.Versioning/AssemblyExtendedVersion.cs | 48 -------- Jellyfin.Versioning/ExtendedVersion.cs | 133 --------------------- Jellyfin.Versioning/Jellyfin.Versioning.csproj | 20 ---- Jellyfin.Versioning/Properties/AssemblyInfo.cs | 21 ---- Jellyfin.Versioning/SharedVersion.cs | 8 -- Jellyfin.Versioning/update-version | 44 ------- Jellyfin.Versioning/update-version.bat | 23 ---- Jellyfin.Versioning/update-version.ps1 | 31 ----- MediaBrowser.Api/MediaBrowser.Api.csproj | 2 +- MediaBrowser.Api/Session/SessionsService.cs | 3 +- MediaBrowser.Common/IApplicationHost.cs | 12 ++ MediaBrowser.Common/MediaBrowser.Common.csproj | 2 +- .../MediaBrowser.Controller.csproj | 2 +- .../MediaBrowser.LocalMetadata.csproj | 2 +- .../MediaBrowser.MediaEncoding.csproj | 2 +- MediaBrowser.Model/MediaBrowser.Model.csproj | 6 +- MediaBrowser.Model/System/PublicSystemInfo.cs | 18 +-- .../MediaBrowser.Providers.csproj | 2 +- MediaBrowser.Providers/Movies/MovieDbProvider.cs | 2 +- .../Music/MusicBrainzAlbumProvider.cs | 2 +- MediaBrowser.WebDashboard/Api/DashboardService.cs | 8 +- .../MediaBrowser.XbmcMetadata.csproj | 2 +- MediaBrowser.sln | 11 +- Mono.Nat/Mono.Nat.csproj | 2 +- OpenSubtitlesHandler/Properties/AssemblyInfo.cs | 4 +- RSSDP/Properties/AssemblyInfo.cs | 4 +- SocketHttpListener/SocketHttpListener.csproj | 2 +- 43 files changed, 61 insertions(+), 426 deletions(-) delete mode 100644 Jellyfin.Versioning/AssemblyExtendedVersion.cs delete mode 100644 Jellyfin.Versioning/ExtendedVersion.cs delete mode 100644 Jellyfin.Versioning/Jellyfin.Versioning.csproj delete mode 100644 Jellyfin.Versioning/Properties/AssemblyInfo.cs delete mode 100644 Jellyfin.Versioning/SharedVersion.cs delete mode 100755 Jellyfin.Versioning/update-version delete mode 100644 Jellyfin.Versioning/update-version.bat delete mode 100644 Jellyfin.Versioning/update-version.ps1 (limited to 'MediaBrowser.Model/System') diff --git a/BDInfo/BDInfo.csproj b/BDInfo/BDInfo.csproj index d1d2cefea..b2c752d0c 100644 --- a/BDInfo/BDInfo.csproj +++ b/BDInfo/BDInfo.csproj @@ -1,7 +1,7 @@ - + diff --git a/DvdLib/DvdLib.csproj b/DvdLib/DvdLib.csproj index d1d2cefea..b2c752d0c 100644 --- a/DvdLib/DvdLib.csproj +++ b/DvdLib/DvdLib.csproj @@ -1,7 +1,7 @@ - + diff --git a/Emby.Dlna/Emby.Dlna.csproj b/Emby.Dlna/Emby.Dlna.csproj index 280dc4bfa..71ded2337 100644 --- a/Emby.Dlna/Emby.Dlna.csproj +++ b/Emby.Dlna/Emby.Dlna.csproj @@ -1,7 +1,7 @@ - + diff --git a/Emby.Dlna/PlayTo/PlayToManager.cs b/Emby.Dlna/PlayTo/PlayToManager.cs index 2836ee95d..cdc8f7717 100644 --- a/Emby.Dlna/PlayTo/PlayToManager.cs +++ b/Emby.Dlna/PlayTo/PlayToManager.cs @@ -164,7 +164,7 @@ namespace Emby.Dlna.PlayTo string deviceName = null; - var sessionInfo = _sessionManager.LogSessionActivity("DLNA", _appHost.ApplicationVersion.ToString(), uuid, deviceName, uri.OriginalString, null); + var sessionInfo = _sessionManager.LogSessionActivity("DLNA", _appHost.ApplicationSemanticVersion, uuid, deviceName, uri.OriginalString, null); var controller = sessionInfo.SessionControllers.OfType().FirstOrDefault(); diff --git a/Emby.Drawing.Skia/Emby.Drawing.Skia.csproj b/Emby.Drawing.Skia/Emby.Drawing.Skia.csproj index 6491f44b8..1eb537741 100644 --- a/Emby.Drawing.Skia/Emby.Drawing.Skia.csproj +++ b/Emby.Drawing.Skia/Emby.Drawing.Skia.csproj @@ -17,7 +17,7 @@ - + diff --git a/Emby.Drawing/Emby.Drawing.csproj b/Emby.Drawing/Emby.Drawing.csproj index 67364380a..ba29c656b 100644 --- a/Emby.Drawing/Emby.Drawing.csproj +++ b/Emby.Drawing/Emby.Drawing.csproj @@ -6,7 +6,7 @@ - + diff --git a/Emby.IsoMounting/IsoMounter/IsoMounter.csproj b/Emby.IsoMounting/IsoMounter/IsoMounter.csproj index 518b2372f..dafa51cd5 100644 --- a/Emby.IsoMounting/IsoMounter/IsoMounter.csproj +++ b/Emby.IsoMounting/IsoMounter/IsoMounter.csproj @@ -1,7 +1,7 @@ - + diff --git a/Emby.Naming/Emby.Naming.csproj b/Emby.Naming/Emby.Naming.csproj index 419cf101d..e344e7811 100644 --- a/Emby.Naming/Emby.Naming.csproj +++ b/Emby.Naming/Emby.Naming.csproj @@ -6,7 +6,7 @@ - + diff --git a/Emby.Notifications/Emby.Notifications.csproj b/Emby.Notifications/Emby.Notifications.csproj index 8fa21635e..5c68e48c8 100644 --- a/Emby.Notifications/Emby.Notifications.csproj +++ b/Emby.Notifications/Emby.Notifications.csproj @@ -6,7 +6,7 @@ - + diff --git a/Emby.Photos/Emby.Photos.csproj b/Emby.Photos/Emby.Photos.csproj index 9ad2afb69..e6b445202 100644 --- a/Emby.Photos/Emby.Photos.csproj +++ b/Emby.Photos/Emby.Photos.csproj @@ -7,7 +7,7 @@ - + diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index f186ccdaa..91ba3903d 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -47,7 +47,6 @@ using Emby.Server.Implementations.Threading; using Emby.Server.Implementations.TV; using Emby.Server.Implementations.Updates; using Emby.Server.Implementations.Xml; -using Jellyfin.Versioning; using MediaBrowser.Api; using MediaBrowser.Common; using MediaBrowser.Common.Configuration; @@ -430,28 +429,20 @@ namespace Emby.Server.Implementations _validAddressResults.Clear(); } - private Version _version; - /// - /// Gets the current application version - /// - /// The application version. - public Version ApplicationVersion => _version ?? (_version = ApplicationExtendedVersion.ApiVersion); - - private Version _serverVersion; + private Version _applicationVersion; /// /// Gets the current application server version /// /// The application server version. - public Version ApplicationServerVersion => _serverVersion ?? (_serverVersion = typeof(ApplicationHost).Assembly.GetName().Version); + public Version ApplicationVersion => _applicationVersion ?? (_applicationVersion = typeof(ApplicationHost).Assembly.GetName().Version); + + public string ApplicationSemanticVersion => ApplicationVersion.ToString(3); - private ExtendedVersion _extendedVersion; /// /// Gets the current application server version /// /// The application server version. - public ExtendedVersion ApplicationExtendedVersion => _extendedVersion ?? - (_extendedVersion = typeof(ApplicationHost).Assembly.GetCustomAttributes(typeof(AssemblyExtendedVersion), false) - .Cast().FirstOrDefault().ExtendedVersion); + public string ApplicationUserAgent => Name + "/" + ApplicationSemanticVersion; private string _productName; /// @@ -478,7 +469,7 @@ namespace Emby.Server.Implementations /// Gets the name. /// /// The name. - public string Name => "Emby Server"; + public string Name => "Jellyfin"; private static Tuple GetAssembly(Type type) { @@ -1028,9 +1019,7 @@ namespace Emby.Server.Implementations protected string GetDefaultUserAgent() { - var name = FormatAttribute(Name); - - return name + "/" + ApplicationVersion; + return ApplicationUserAgent; } private static string FormatAttribute(string str) @@ -1044,7 +1033,7 @@ namespace Emby.Server.Implementations if (string.IsNullOrWhiteSpace(result)) { - result = "Emby"; + result = "Jellyfin"; } return result; @@ -1849,9 +1838,7 @@ namespace Emby.Server.Implementations { HasPendingRestart = HasPendingRestart, IsShuttingDown = IsShuttingDown, - Version = ApplicationVersion.ToString(), - ServerVersion = ApplicationServerVersion.ToString(), - ExtendedVersion = ApplicationExtendedVersion, + Version = ApplicationSemanticVersion, ProductName = ApplicationProductName, WebSocketPortNumber = HttpPort, CompletedInstallations = InstallationManager.CompletedInstallations.ToArray(), @@ -1898,9 +1885,7 @@ namespace Emby.Server.Implementations var wanAddress = await GetWanApiUrl(cancellationToken).ConfigureAwait(false); return new PublicSystemInfo { - Version = ApplicationVersion.ToString(), - ServerVersion = ApplicationServerVersion.ToString(), - ExtendedVersion = ApplicationExtendedVersion, + Version = ApplicationSemanticVersion, Id = SystemId, OperatingSystem = EnvironmentInfo.OperatingSystem.ToString(), WanAddress = wanAddress, diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 843718756..5a0e1da4d 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -3,7 +3,6 @@ - @@ -31,7 +30,7 @@ - + diff --git a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs index d3066e916..0bbffb824 100644 --- a/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs +++ b/Emby.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs @@ -38,7 +38,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings _appHost = appHost; } - private string UserAgent => "Emby/" + _appHost.ApplicationVersion; + private string UserAgent => _appHost.ApplicationUserAgent; private static List GetScheduleRequestDates(DateTime startDateUtc, DateTime endDateUtc) { diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs index c77559c75..7d6c0f67b 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs @@ -58,7 +58,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts Url = url, CancellationToken = cancellationToken, // Some data providers will require a user agent - UserAgent = _appHost.FriendlyName + "/" + _appHost.ApplicationVersion + UserAgent = _appHost.ApplicationSemanticVersion }); } return Task.FromResult(_fileSystem.OpenRead(url)); diff --git a/Emby.XmlTv/Emby.XmlTv/Emby.XmlTv.csproj b/Emby.XmlTv/Emby.XmlTv/Emby.XmlTv.csproj index dfda0f170..0225be2c2 100644 --- a/Emby.XmlTv/Emby.XmlTv/Emby.XmlTv.csproj +++ b/Emby.XmlTv/Emby.XmlTv/Emby.XmlTv.csproj @@ -6,11 +6,7 @@ - - - - - + diff --git a/Jellyfin.Server/Jellyfin.Server.csproj b/Jellyfin.Server/Jellyfin.Server.csproj index c89f5131d..f17e06e69 100644 --- a/Jellyfin.Server/Jellyfin.Server.csproj +++ b/Jellyfin.Server/Jellyfin.Server.csproj @@ -13,7 +13,7 @@ - + @@ -46,7 +46,6 @@ - diff --git a/Jellyfin.Versioning/AssemblyExtendedVersion.cs b/Jellyfin.Versioning/AssemblyExtendedVersion.cs deleted file mode 100644 index b2453fc8d..000000000 --- a/Jellyfin.Versioning/AssemblyExtendedVersion.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Jellyfin.Versioning/AssemblyExtendedVersion.cs -// Part of the Jellyfin project (https://jellyfin.media) -// -// All copyright belongs to the Jellyfin contributors; a full list can -// be found in the file CONTRIBUTORS.md -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; - -namespace Jellyfin.Versioning -{ - [AttributeUsage(AttributeTargets.Assembly)] - public sealed class AssemblyExtendedVersion : Attribute - { - public ExtendedVersion ExtendedVersion { get; } - - public AssemblyExtendedVersion(ExtendedVersion ExtendedVersion) - { - this.ExtendedVersion = ExtendedVersion; - } - - public AssemblyExtendedVersion(string apiVersion, bool readResource = true) - { - var assembly = Assembly.GetExecutingAssembly(); - var resourceName = "Jellyfin.Versioning.jellyfin_version.ini"; - - using (var stream = assembly.GetManifestResourceStream(resourceName)) - { - ExtendedVersion = new ExtendedVersion(new Version(apiVersion), stream); - } - } - } -} diff --git a/Jellyfin.Versioning/ExtendedVersion.cs b/Jellyfin.Versioning/ExtendedVersion.cs deleted file mode 100644 index de54d3829..000000000 --- a/Jellyfin.Versioning/ExtendedVersion.cs +++ /dev/null @@ -1,133 +0,0 @@ -// Jellyfin.Versioning/ExtendedVersion.cs -// Part of the Jellyfin project (https://jellyfin.media) -// -// All copyright belongs to the Jellyfin contributors; a full list can -// be found in the file CONTRIBUTORS.md -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - - -using System; -using System.Collections.Generic; -using System.IO; -using System.Runtime.Serialization; -using System.Text; - -namespace Jellyfin.Versioning -{ - public class ExtendedVersion - { - [IgnoreDataMember] - public Version ApiVersion { get; } - - public string CommitHash { get; } = String.Empty; - - public long Revision { get; } = 0; - - public string Branch { get; } = String.Empty; - - public string TagDescription { get; } = String.Empty; - - [IgnoreDataMember] - public Uri Remote { get; } = null; - - public ExtendedVersion(Version apiVersion, Stream extendedVersionFileStream) - { - ApiVersion = apiVersion; - int line = 1; - using (var reader = new StreamReader(extendedVersionFileStream)) - { - while (!reader.EndOfStream) - { - string item = reader.ReadLine(); - - if (string.IsNullOrWhiteSpace(item.Trim())) - { - //empty line, skip - continue; - } - var kvpair = item.Split('='); - if (kvpair.Length != 2) - { - throw new ArgumentException(nameof(extendedVersionFileStream), - $"ExtendedVersionFile contains bad key-value pair '{item}' at line {line}."); - } - var key = kvpair[0].Trim().ToLower(); - var value = kvpair[1].Trim(); - switch (key) - { - case "commit": - if (value.Length < 7 || value.Length > 40) - { - throw new ArgumentException(nameof(extendedVersionFileStream), - $"ExtendedVersionFile has a bad commit hash '{value}' on line {line}, it should be a string between 7 and 40 characters."); - } - CommitHash = value; - break; - case "branch": - if (string.IsNullOrWhiteSpace(value)) - { - throw new ArgumentException(nameof(extendedVersionFileStream), - $"ExtendedVersionFile has a bad branch '{value}' on line {line}, it can not be empty."); - } - Branch = value; - break; - case "revision": - if (!long.TryParse(value, out long rev)) - { - throw new ArgumentException(nameof(extendedVersionFileStream), - $"ExtendedVersionFile has a bad revision '{value}' on line {line}, it should be an integer."); - } - Revision = rev; - break; - case "tagdesc": - if (string.IsNullOrWhiteSpace(value)) - { - throw new ArgumentException(nameof(extendedVersionFileStream), - $"ExtendedVersionFile has a bad tag description '{value}' on line {line}, it can not be empty."); - } - TagDescription = value; - break; - case "remote": - var remoteRepo = value.Replace(".git", string.Empty).Replace("git@github.com:", "https://github.com/"); - if (Uri.IsWellFormedUriString(remoteRepo, UriKind.Absolute)) - { - Remote = new Uri(remoteRepo); - } - else if (Uri.IsWellFormedUriString(value, UriKind.Absolute)) - { - //fallback if the replace about broke the Uri - Remote = new Uri(value); - } - else - { - throw new ArgumentException(nameof(extendedVersionFileStream), - $"ExtendedVersionFile has a bad remote URI '{value}' on line {line}, it should be a valid remote URI (ssh or https)."); - } - break; - default: - throw new ArgumentException(nameof(extendedVersionFileStream), - $"ExtendedVersionFile contains an unrecognized key-value pair '{item}' at line {line}."); - } - line++; - } - } - } - - public override string ToString() - { - return $"{ApiVersion};{CommitHash};{Revision};{Branch};{TagDescription};{Remote}"; - } - } -} diff --git a/Jellyfin.Versioning/Jellyfin.Versioning.csproj b/Jellyfin.Versioning/Jellyfin.Versioning.csproj deleted file mode 100644 index 8dc45dde1..000000000 --- a/Jellyfin.Versioning/Jellyfin.Versioning.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - netstandard2.0 - false - - - - - - - - - - - - - - - diff --git a/Jellyfin.Versioning/Properties/AssemblyInfo.cs b/Jellyfin.Versioning/Properties/AssemblyInfo.cs deleted file mode 100644 index 5ccba7ad5..000000000 --- a/Jellyfin.Versioning/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Jellyfin.Versioning")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Jellyfin Project")] -[assembly: AssemblyProduct("Jellyfin: The Free Software Media System")] -[assembly: AssemblyCopyright("Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License Version 2")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: NeutralResourcesLanguage("en")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] diff --git a/Jellyfin.Versioning/SharedVersion.cs b/Jellyfin.Versioning/SharedVersion.cs deleted file mode 100644 index 574a852e4..000000000 --- a/Jellyfin.Versioning/SharedVersion.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Reflection; -using Jellyfin.Versioning; - -//To keep compatibility with Emby do not remove the revision (fourth number) -[assembly: AssemblyVersion("10.0.1.0")] -[assembly: AssemblyFileVersion("10.0.1.0")] -[assembly: AssemblyInformationalVersion("10.0.1.0")] -[assembly: AssemblyExtendedVersion("3.5.2.0", true)] diff --git a/Jellyfin.Versioning/update-version b/Jellyfin.Versioning/update-version deleted file mode 100755 index e8d4fab6d..000000000 --- a/Jellyfin.Versioning/update-version +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env sh -# Jellyfin.Versioning/update-version -# Part of the Jellyfin project (https://jellyfin.media) -# -# All copyright belongs to the Jellyfin contributors; a full list can -# be found in the file CONTRIBUTORS.md -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -if [ -d "$(dirname "$0")/../.git" ]; then - commit=`git rev-parse HEAD` - count=`git rev-list HEAD --count` - branch=`git rev-parse --abbrev-ref HEAD` - desc=`git describe --tags --always --long` - remote=`git config --get remote.origin.url` - tee jellyfin_version.ini <. -:licenseblock - -powershell.exe -executionpolicy Bypass -file update-version.ps1 \ No newline at end of file diff --git a/Jellyfin.Versioning/update-version.ps1 b/Jellyfin.Versioning/update-version.ps1 deleted file mode 100644 index 2f9f0cf7b..000000000 --- a/Jellyfin.Versioning/update-version.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -# Jellyfin.Versioning/update-version.ps1 -# Part of the Jellyfin project (https://jellyfin.media) -# -# All copyright belongs to the Jellyfin contributors; a full list can -# be found in the file CONTRIBUTORS.md -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -if(Test-Path -Path '..\.git' ){ - $commit = (git rev-parse HEAD) - $count = (git rev-list HEAD --count) - $branch = (git rev-parse --abbrev-ref HEAD) - $desc = (git describe --tags --always --long) - $remote = (git config --get remote.origin.url) - Set-Content -Path "jellyfin_version.ini" -Value "commit=$commit`r`nrevision=$count`r`nbranch=$branch`r`ntagdesc=$desc`r`nremote=$remote" - Write-Host Updated build version in jellyfin_version.ini - Write-Host "commit=$commit`r`nrevision=$count`r`nbranch=$branch`r`ntagdesc=$desc`r`nremote=$remote`r`n" -} else { - Write-Host Did not update build version because there was no .git directory. -} \ No newline at end of file diff --git a/MediaBrowser.Api/MediaBrowser.Api.csproj b/MediaBrowser.Api/MediaBrowser.Api.csproj index 67364380a..ba29c656b 100644 --- a/MediaBrowser.Api/MediaBrowser.Api.csproj +++ b/MediaBrowser.Api/MediaBrowser.Api.csproj @@ -6,7 +6,7 @@ - + diff --git a/MediaBrowser.Api/Session/SessionsService.cs b/MediaBrowser.Api/Session/SessionsService.cs index 234ada6c0..cba278c1e 100644 --- a/MediaBrowser.Api/Session/SessionsService.cs +++ b/MediaBrowser.Api/Session/SessionsService.cs @@ -309,8 +309,7 @@ namespace MediaBrowser.Api.Session DateCreated = DateTime.UtcNow, DeviceId = _appHost.SystemId, DeviceName = _appHost.FriendlyName, - AppVersion = _appHost.ApplicationVersion.ToString() - + AppVersion = _appHost.ApplicationSemanticVersion }); } diff --git a/MediaBrowser.Common/IApplicationHost.cs b/MediaBrowser.Common/IApplicationHost.cs index bc6c3a984..94dd251cf 100644 --- a/MediaBrowser.Common/IApplicationHost.cs +++ b/MediaBrowser.Common/IApplicationHost.cs @@ -71,6 +71,18 @@ namespace MediaBrowser.Common /// The application version. Version ApplicationVersion { get; } + /// + /// Gets the application semantic version. + /// + /// The application semantic version. + string ApplicationSemanticVersion { get; } + + /// + /// Gets the application user agent. + /// + /// The application user agent. + string ApplicationUserAgent { get; } + /// /// Gets or sets a value indicating whether this instance can self update. /// diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj index 314c04010..2220d4661 100644 --- a/MediaBrowser.Common/MediaBrowser.Common.csproj +++ b/MediaBrowser.Common/MediaBrowser.Common.csproj @@ -12,7 +12,7 @@ - + diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 9a0d2879e..01893f1b5 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -13,7 +13,7 @@ - + diff --git a/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj b/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj index 968751439..867b82ede 100644 --- a/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj +++ b/MediaBrowser.LocalMetadata/MediaBrowser.LocalMetadata.csproj @@ -6,7 +6,7 @@ - + diff --git a/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj b/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj index 8e40f1def..c5ed65734 100644 --- a/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj +++ b/MediaBrowser.MediaEncoding/MediaBrowser.MediaEncoding.csproj @@ -6,7 +6,7 @@ - + diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index e4fd970e0..f17fd7159 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -17,11 +17,7 @@ - - - - - + diff --git a/MediaBrowser.Model/System/PublicSystemInfo.cs b/MediaBrowser.Model/System/PublicSystemInfo.cs index eded5248e..accdc9e60 100644 --- a/MediaBrowser.Model/System/PublicSystemInfo.cs +++ b/MediaBrowser.Model/System/PublicSystemInfo.cs @@ -1,5 +1,3 @@ -using Jellyfin.Versioning; - namespace MediaBrowser.Model.System { public class PublicSystemInfo @@ -22,23 +20,11 @@ namespace MediaBrowser.Model.System /// The name of the server. public string ServerName { get; set; } - /// - /// Gets or sets the API version. - /// - /// The version. - public string Version { get; set; } - /// /// Gets or sets the server version. /// - /// The server version. - public string ServerVersion { get; set; } - - /// - /// Gets or sets the build version. - /// - /// The build version. - public ExtendedVersion ExtendedVersion { get; set; } + /// The version. + public string Version { get; set; } /// /// Gets or sets the operating sytem. diff --git a/MediaBrowser.Providers/MediaBrowser.Providers.csproj b/MediaBrowser.Providers/MediaBrowser.Providers.csproj index 6026e4c50..e6ef889c3 100644 --- a/MediaBrowser.Providers/MediaBrowser.Providers.csproj +++ b/MediaBrowser.Providers/MediaBrowser.Providers.csproj @@ -7,7 +7,7 @@ - + diff --git a/MediaBrowser.Providers/Movies/MovieDbProvider.cs b/MediaBrowser.Providers/Movies/MovieDbProvider.cs index aaed69459..f03a8c2c2 100644 --- a/MediaBrowser.Providers/Movies/MovieDbProvider.cs +++ b/MediaBrowser.Providers/Movies/MovieDbProvider.cs @@ -424,7 +424,7 @@ namespace MediaBrowser.Providers.Movies _lastRequestTicks = DateTime.UtcNow.Ticks; options.BufferContent = true; - options.UserAgent = "Emby/" + _appHost.ApplicationVersion; + options.UserAgent = _appHost.ApplicationUserAgent; return await _httpClient.SendAsync(options, "GET").ConfigureAwait(false); } diff --git a/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs b/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs index 3ad968449..ecae0c39d 100644 --- a/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs +++ b/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs @@ -742,7 +742,7 @@ namespace MediaBrowser.Providers.Music { Url = url, CancellationToken = cancellationToken, - UserAgent = _appHost.Name + "/" + _appHost.ApplicationVersion, + UserAgent = _appHost.ApplicationUserAgent, BufferContent = throttleMs > 0 }; diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs index 53a414649..c31f3a97e 100644 --- a/MediaBrowser.WebDashboard/Api/DashboardService.cs +++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs @@ -205,7 +205,7 @@ namespace MediaBrowser.WebDashboard.Api return _resultFactory.GetStaticResult(Request, plugin.Version.ToString().GetMD5(), null, null, MimeTypes.GetMimeType("page.html"), () => Task.FromResult(stream)); } - return _resultFactory.GetStaticResult(Request, plugin.Version.ToString().GetMD5(), null, null, MimeTypes.GetMimeType("page.html"), () => GetPackageCreator(DashboardUIPath).ModifyHtml("dummy.html", stream, null, _appHost.ApplicationVersion.ToString(), null)); + return _resultFactory.GetStaticResult(Request, plugin.Version.ToString().GetMD5(), null, null, MimeTypes.GetMimeType("page.html"), () => GetPackageCreator(DashboardUIPath).ModifyHtml("dummy.html", stream, null, _appHost.ApplicationSemanticVersion, null)); } throw new ResourceNotFoundException(); @@ -342,7 +342,7 @@ namespace MediaBrowser.WebDashboard.Api cacheDuration = TimeSpan.FromDays(365); } - var cacheKey = (_appHost.ApplicationVersion + (localizationCulture ?? string.Empty) + path).GetMD5(); + var cacheKey = (_appHost.ApplicationSemanticVersion + (localizationCulture ?? string.Empty) + path).GetMD5(); // html gets modified on the fly if (contentType.StartsWith("text/html", StringComparison.OrdinalIgnoreCase)) @@ -364,7 +364,7 @@ namespace MediaBrowser.WebDashboard.Api private Task GetResourceStream(string basePath, string virtualPath, string localizationCulture) { return GetPackageCreator(basePath) - .GetResource(virtualPath, null, localizationCulture, _appHost.ApplicationVersion.ToString()); + .GetResource(virtualPath, null, localizationCulture, _appHost.ApplicationSemanticVersion); } private PackageCreator GetPackageCreator(string basePath) @@ -400,7 +400,7 @@ namespace MediaBrowser.WebDashboard.Api CopyDirectory(inputPath, targetPath); } - var appVersion = _appHost.ApplicationVersion.ToString(); + var appVersion = _appHost.ApplicationSemanticVersion; await DumpHtml(packageCreator, inputPath, targetPath, mode, appVersion); diff --git a/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj b/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj index 67364380a..ba29c656b 100644 --- a/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj +++ b/MediaBrowser.XbmcMetadata/MediaBrowser.XbmcMetadata.csproj @@ -6,7 +6,7 @@ - + diff --git a/MediaBrowser.sln b/MediaBrowser.sln index 5065c96c8..f1976c3c7 100644 --- a/MediaBrowser.sln +++ b/MediaBrowser.sln @@ -1,4 +1,3 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26730.3 @@ -58,10 +57,9 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{41093F42-C7CC-4D07-956B-6182CBEDE2EC}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig + SharedVersion.cs = SharedVersion.cs EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfin.Versioning", "Jellyfin.Versioning\Jellyfin.Versioning.csproj", "{F825B88C-4C87-4439-AE20-ACA12B6A9C83}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -172,10 +170,6 @@ Global {07E39F42-A2C6-4B32-AF8C-725F957A73FF}.Debug|Any CPU.Build.0 = Debug|Any CPU {07E39F42-A2C6-4B32-AF8C-725F957A73FF}.Release|Any CPU.ActiveCfg = Release|Any CPU {07E39F42-A2C6-4B32-AF8C-725F957A73FF}.Release|Any CPU.Build.0 = Release|Any CPU - {F825B88C-4C87-4439-AE20-ACA12B6A9C83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F825B88C-4C87-4439-AE20-ACA12B6A9C83}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F825B88C-4C87-4439-AE20-ACA12B6A9C83}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F825B88C-4C87-4439-AE20-ACA12B6A9C83}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -184,12 +178,9 @@ Global SolutionGuid = {3448830C-EBDC-426C-85CD-7BBB9651A7FE} EndGlobalSection GlobalSection(AutomaticVersions) = postSolution - PrimaryVersionType = AssemblyFileVersionAttribute UpdateAssemblyVersion = True UpdateAssemblyFileVersion = True UpdateAssemblyInfoVersion = True - ShouldCreateLogs = True - AdvancedSettingsExpanded = True AssemblyVersionSettings = None.None.None.None AssemblyFileVersionSettings = None.None.None.None AssemblyInfoVersionSettings = None.None.None.None diff --git a/Mono.Nat/Mono.Nat.csproj b/Mono.Nat/Mono.Nat.csproj index 30ffa7b4b..edfd5c9bb 100644 --- a/Mono.Nat/Mono.Nat.csproj +++ b/Mono.Nat/Mono.Nat.csproj @@ -6,7 +6,7 @@ - + diff --git a/OpenSubtitlesHandler/Properties/AssemblyInfo.cs b/OpenSubtitlesHandler/Properties/AssemblyInfo.cs index ad4fbbb02..b5ae23021 100644 --- a/OpenSubtitlesHandler/Properties/AssemblyInfo.cs +++ b/OpenSubtitlesHandler/Properties/AssemblyInfo.cs @@ -20,5 +20,5 @@ using System.Runtime.InteropServices; // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.3.0")] +[assembly: AssemblyFileVersion("2019.1.20.3")] diff --git a/RSSDP/Properties/AssemblyInfo.cs b/RSSDP/Properties/AssemblyInfo.cs index 7098279b4..d2bb7c6f3 100644 --- a/RSSDP/Properties/AssemblyInfo.cs +++ b/RSSDP/Properties/AssemblyInfo.cs @@ -20,5 +20,5 @@ using System.Runtime.InteropServices; // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.3.0")] +[assembly: AssemblyFileVersion("2019.1.20.3")] diff --git a/SocketHttpListener/SocketHttpListener.csproj b/SocketHttpListener/SocketHttpListener.csproj index f7f184892..e700540a9 100644 --- a/SocketHttpListener/SocketHttpListener.csproj +++ b/SocketHttpListener/SocketHttpListener.csproj @@ -6,7 +6,7 @@ - + -- cgit v1.2.3