From 081d942d0361a4ad8aa918edcbb2f20c4c3f8471 Mon Sep 17 00:00:00 2001 From: Maximilian Marschall Date: Sun, 12 Jan 2020 00:31:17 +0100 Subject: [PATCH 01/44] Enable Throttling when transcoding without Hardware-Acceleration --- CONTRIBUTORS.md | 1 + MediaBrowser.Api/Playback/BaseStreamingService.cs | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 458944778e..2d2e5712a5 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -32,6 +32,7 @@ - [nevado](https://github.com/nevado) - [mark-monteiro](https://github.com/mark-monteiro) - [ullmie02](https://github.com/ullmie02) + - [geilername](https://github.com/geilername) # Emby Contributors diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 5881e22a7c..023d373d5b 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -327,6 +327,18 @@ namespace MediaBrowser.Api.Playback private bool EnableThrottling(StreamState state) { + var encodingOptions = ServerConfigurationManager.GetEncodingOptions(); + + // enable throttling when not using hardware acceleration + if (encodingOptions.HardwareAccelerationType == string.Empty) + { + return state.InputProtocol == MediaProtocol.File && + state.RunTimeTicks.HasValue && + state.RunTimeTicks.Value >= TimeSpan.FromMinutes(5).Ticks && + state.IsInputVideo && + state.VideoType == VideoType.VideoFile && + !string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase); + } return false; //// do not use throttling with hardware encoders //return state.InputProtocol == MediaProtocol.File && From 82112b67880265c34f2dcca1ee7f0acf52a156df Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Wed, 22 Jan 2020 21:00:07 +0100 Subject: [PATCH 02/44] Improvements to dlna server * Improve response writer * Add analyzers * Error on warnings in release mode * Disable doc warnings --- Emby.Dlna/Api/DlnaServerService.cs | 3 + Emby.Dlna/Api/DlnaService.cs | 3 + Emby.Dlna/Common/Argument.cs | 2 + Emby.Dlna/Common/DeviceIcon.cs | 11 +- Emby.Dlna/Common/DeviceService.cs | 7 +- Emby.Dlna/Common/ServiceAction.cs | 14 +- Emby.Dlna/Common/StateVariable.cs | 18 +- Emby.Dlna/Configuration/DlnaOptions.cs | 27 +- Emby.Dlna/ConfigurationExtension.cs | 3 + .../ConnectionManager/ConnectionManager.cs | 3 + .../ConnectionManagerXmlBuilder.cs | 3 + Emby.Dlna/ConnectionManager/ControlHandler.cs | 30 +- .../ServiceActionListBuilder.cs | 3 + .../ContentDirectory/ContentDirectory.cs | 3 + .../ContentDirectoryXmlBuilder.cs | 3 + Emby.Dlna/ContentDirectory/ControlHandler.cs | 340 ++++++++---------- .../ServiceActionListBuilder.cs | 3 + Emby.Dlna/ControlRequest.cs | 3 + Emby.Dlna/ControlResponse.cs | 13 +- Emby.Dlna/Didl/DidlBuilder.cs | 4 +- Emby.Dlna/Didl/Filter.cs | 3 + Emby.Dlna/Didl/StringWriterWithEncoding.cs | 3 + Emby.Dlna/DlnaManager.cs | 3 + Emby.Dlna/Emby.Dlna.csproj | 13 + Emby.Dlna/EventSubscriptionResponse.cs | 14 +- Emby.Dlna/Eventing/EventManager.cs | 6 +- Emby.Dlna/Eventing/EventSubscription.cs | 7 +- Emby.Dlna/IConnectionManager.cs | 2 + Emby.Dlna/IContentDirectory.cs | 2 + Emby.Dlna/IEventManager.cs | 2 + Emby.Dlna/IMediaReceiverRegistrar.cs | 2 + Emby.Dlna/IUpnpService.cs | 3 + Emby.Dlna/Main/DlnaEntryPoint.cs | 3 + .../MediaReceiverRegistrar/ControlHandler.cs | 44 +-- .../MediaReceiverRegistrar.cs | 3 + .../MediaReceiverRegistrarXmlBuilder.cs | 3 + .../ServiceActionListBuilder.cs | 3 + Emby.Dlna/PlayTo/Device.cs | 33 +- Emby.Dlna/PlayTo/DeviceInfo.cs | 3 + Emby.Dlna/PlayTo/PlayToController.cs | 3 + Emby.Dlna/PlayTo/PlayToManager.cs | 11 +- Emby.Dlna/PlayTo/PlaybackProgressEventArgs.cs | 3 + Emby.Dlna/PlayTo/PlaybackStartEventArgs.cs | 3 + Emby.Dlna/PlayTo/PlaybackStoppedEventArgs.cs | 3 + Emby.Dlna/PlayTo/PlaylistItem.cs | 3 + Emby.Dlna/PlayTo/PlaylistItemFactory.cs | 3 + Emby.Dlna/PlayTo/SsdpHttpClient.cs | 15 +- Emby.Dlna/PlayTo/TRANSPORTSTATE.cs | 3 + Emby.Dlna/PlayTo/TransportCommands.cs | 3 + Emby.Dlna/PlayTo/UpnpContainer.cs | 3 + Emby.Dlna/PlayTo/uBaseObject.cs | 3 + Emby.Dlna/PlayTo/uPnpNamespaces.cs | 3 + Emby.Dlna/Profiles/DefaultProfile.cs | 3 + Emby.Dlna/Profiles/DenonAvrProfile.cs | 3 + Emby.Dlna/Profiles/DirectTvProfile.cs | 3 + Emby.Dlna/Profiles/DishHopperJoeyProfile.cs | 3 + Emby.Dlna/Profiles/Foobar2000Profile.cs | 3 + Emby.Dlna/Profiles/LgTvProfile.cs | 3 + Emby.Dlna/Profiles/LinksysDMA2100Profile.cs | 3 + Emby.Dlna/Profiles/MarantzProfile.cs | 3 + Emby.Dlna/Profiles/MediaMonkeyProfile.cs | 3 + Emby.Dlna/Profiles/PanasonicVieraProfile.cs | 3 + Emby.Dlna/Profiles/PopcornHourProfile.cs | 3 + Emby.Dlna/Profiles/SamsungSmartTvProfile.cs | 3 + Emby.Dlna/Profiles/SharpSmartTvProfile.cs | 3 + Emby.Dlna/Profiles/SonyBlurayPlayer2013.cs | 3 + Emby.Dlna/Profiles/SonyBlurayPlayer2014.cs | 3 + Emby.Dlna/Profiles/SonyBlurayPlayer2015.cs | 3 + Emby.Dlna/Profiles/SonyBlurayPlayer2016.cs | 3 + Emby.Dlna/Profiles/SonyBlurayPlayerProfile.cs | 3 + Emby.Dlna/Profiles/SonyBravia2010Profile.cs | 3 + Emby.Dlna/Profiles/SonyBravia2011Profile.cs | 3 + Emby.Dlna/Profiles/SonyBravia2012Profile.cs | 3 + Emby.Dlna/Profiles/SonyBravia2013Profile.cs | 3 + Emby.Dlna/Profiles/SonyBravia2014Profile.cs | 3 + Emby.Dlna/Profiles/SonyPs3Profile.cs | 3 + Emby.Dlna/Profiles/SonyPs4Profile.cs | 3 + Emby.Dlna/Profiles/WdtvLiveProfile.cs | 3 + Emby.Dlna/Profiles/XboxOneProfile.cs | 3 + Emby.Dlna/Server/DescriptionXmlBuilder.cs | 3 + Emby.Dlna/Service/BaseControlHandler.cs | 17 +- Emby.Dlna/Service/BaseService.cs | 3 + Emby.Dlna/Service/ControlErrorHandler.cs | 3 + Emby.Dlna/Service/ServiceXmlBuilder.cs | 3 + Emby.Dlna/Ssdp/DeviceDiscovery.cs | 15 +- Emby.Dlna/Ssdp/Extensions.cs | 3 + 86 files changed, 536 insertions(+), 299 deletions(-) diff --git a/Emby.Dlna/Api/DlnaServerService.cs b/Emby.Dlna/Api/DlnaServerService.cs index a7ff6e9cfd..4d9933a0cb 100644 --- a/Emby.Dlna/Api/DlnaServerService.cs +++ b/Emby.Dlna/Api/DlnaServerService.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.IO; using System.Text; diff --git a/Emby.Dlna/Api/DlnaService.cs b/Emby.Dlna/Api/DlnaService.cs index 7f51f477a7..f10695541d 100644 --- a/Emby.Dlna/Api/DlnaService.cs +++ b/Emby.Dlna/Api/DlnaService.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Linq; using MediaBrowser.Controller.Dlna; using MediaBrowser.Controller.Net; diff --git a/Emby.Dlna/Common/Argument.cs b/Emby.Dlna/Common/Argument.cs index 3e325c41ce..c6ab9959e0 100644 --- a/Emby.Dlna/Common/Argument.cs +++ b/Emby.Dlna/Common/Argument.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 namespace Emby.Dlna.Common { diff --git a/Emby.Dlna/Common/DeviceIcon.cs b/Emby.Dlna/Common/DeviceIcon.cs index 3a91b952ec..49d19992d8 100644 --- a/Emby.Dlna/Common/DeviceIcon.cs +++ b/Emby.Dlna/Common/DeviceIcon.cs @@ -1,3 +1,7 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + +using System.Globalization; namespace Emby.Dlna.Common { @@ -13,9 +17,14 @@ namespace Emby.Dlna.Common public string Depth { get; set; } + /// public override string ToString() { - return string.Format("{0}x{1}", Height, Width); + return string.Format( + CultureInfo.InvariantCulture, + "{0}x{1}", + Height, + Width); } } } diff --git a/Emby.Dlna/Common/DeviceService.cs b/Emby.Dlna/Common/DeviceService.cs index c60d652913..9947ec6b9a 100644 --- a/Emby.Dlna/Common/DeviceService.cs +++ b/Emby.Dlna/Common/DeviceService.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 namespace Emby.Dlna.Common { @@ -13,9 +15,8 @@ namespace Emby.Dlna.Common public string EventSubUrl { get; set; } + /// public override string ToString() - { - return string.Format("{0}", ServiceId); - } + => ServiceId; } } diff --git a/Emby.Dlna/Common/ServiceAction.cs b/Emby.Dlna/Common/ServiceAction.cs index 5e030d396a..15c4be8092 100644 --- a/Emby.Dlna/Common/ServiceAction.cs +++ b/Emby.Dlna/Common/ServiceAction.cs @@ -1,21 +1,25 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Collections.Generic; namespace Emby.Dlna.Common { public class ServiceAction { + public ServiceAction() + { + ArgumentList = new List(); + } + public string Name { get; set; } public List ArgumentList { get; set; } + /// public override string ToString() { return Name; } - - public ServiceAction() - { - ArgumentList = new List(); - } } } diff --git a/Emby.Dlna/Common/StateVariable.cs b/Emby.Dlna/Common/StateVariable.cs index 4ca84bf51c..bade28e4bc 100644 --- a/Emby.Dlna/Common/StateVariable.cs +++ b/Emby.Dlna/Common/StateVariable.cs @@ -1,9 +1,17 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace Emby.Dlna.Common { public class StateVariable { + public StateVariable() + { + AllowedValues = Array.Empty(); + } + public string Name { get; set; } public string DataType { get; set; } @@ -12,14 +20,8 @@ namespace Emby.Dlna.Common public string[] AllowedValues { get; set; } + /// public override string ToString() - { - return Name; - } - - public StateVariable() - { - AllowedValues = Array.Empty(); - } + => Name; } } diff --git a/Emby.Dlna/Configuration/DlnaOptions.cs b/Emby.Dlna/Configuration/DlnaOptions.cs index c7cb364a83..84587a7cee 100644 --- a/Emby.Dlna/Configuration/DlnaOptions.cs +++ b/Emby.Dlna/Configuration/DlnaOptions.cs @@ -1,17 +1,10 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 namespace Emby.Dlna.Configuration { public class DlnaOptions { - public bool EnablePlayTo { get; set; } - public bool EnableServer { get; set; } - public bool EnableDebugLog { get; set; } - public bool BlastAliveMessages { get; set; } - public bool SendOnlyMatchedHost { get; set; } - public int ClientDiscoveryIntervalSeconds { get; set; } - public int BlastAliveMessageIntervalSeconds { get; set; } - public string DefaultUserId { get; set; } - public DlnaOptions() { EnablePlayTo = true; @@ -21,5 +14,21 @@ namespace Emby.Dlna.Configuration ClientDiscoveryIntervalSeconds = 60; BlastAliveMessageIntervalSeconds = 1800; } + + public bool EnablePlayTo { get; set; } + + public bool EnableServer { get; set; } + + public bool EnableDebugLog { get; set; } + + public bool BlastAliveMessages { get; set; } + + public bool SendOnlyMatchedHost { get; set; } + + public int ClientDiscoveryIntervalSeconds { get; set; } + + public int BlastAliveMessageIntervalSeconds { get; set; } + + public string DefaultUserId { get; set; } } } diff --git a/Emby.Dlna/ConfigurationExtension.cs b/Emby.Dlna/ConfigurationExtension.cs index 82d726e018..f8125c12c3 100644 --- a/Emby.Dlna/ConfigurationExtension.cs +++ b/Emby.Dlna/ConfigurationExtension.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Collections.Generic; using Emby.Dlna.Configuration; using MediaBrowser.Common.Configuration; diff --git a/Emby.Dlna/ConnectionManager/ConnectionManager.cs b/Emby.Dlna/ConnectionManager/ConnectionManager.cs index 934b353c28..365249c54a 100644 --- a/Emby.Dlna/ConnectionManager/ConnectionManager.cs +++ b/Emby.Dlna/ConnectionManager/ConnectionManager.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Threading.Tasks; using Emby.Dlna.Service; using MediaBrowser.Common.Net; diff --git a/Emby.Dlna/ConnectionManager/ConnectionManagerXmlBuilder.cs b/Emby.Dlna/ConnectionManager/ConnectionManagerXmlBuilder.cs index f5873455a6..c8c97c79c0 100644 --- a/Emby.Dlna/ConnectionManager/ConnectionManagerXmlBuilder.cs +++ b/Emby.Dlna/ConnectionManager/ConnectionManagerXmlBuilder.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Collections.Generic; using Emby.Dlna.Common; using Emby.Dlna.Service; diff --git a/Emby.Dlna/ConnectionManager/ControlHandler.cs b/Emby.Dlna/ConnectionManager/ControlHandler.cs index 2e11047487..7e6c7eb228 100644 --- a/Emby.Dlna/ConnectionManager/ControlHandler.cs +++ b/Emby.Dlna/ConnectionManager/ControlHandler.cs @@ -1,5 +1,9 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; +using System.Xml; using Emby.Dlna.Service; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Configuration; @@ -12,29 +16,27 @@ namespace Emby.Dlna.ConnectionManager { private readonly DeviceProfile _profile; - protected override IEnumerable> GetResult(string methodName, IDictionary methodParams) + public ControlHandler(IServerConfigurationManager config, ILogger logger, DeviceProfile profile) + : base(config, logger) + { + _profile = profile; + } + + /// + protected override void WriteResult(string methodName, IDictionary methodParams, XmlWriter xmlWriter) { if (string.Equals(methodName, "GetProtocolInfo", StringComparison.OrdinalIgnoreCase)) { - return HandleGetProtocolInfo(); + HandleGetProtocolInfo(xmlWriter); } throw new ResourceNotFoundException("Unexpected control request name: " + methodName); } - private IEnumerable> HandleGetProtocolInfo() + private void HandleGetProtocolInfo(XmlWriter xmlWriter) { - return new Dictionary(StringComparer.OrdinalIgnoreCase) - { - { "Source", _profile.ProtocolInfo }, - { "Sink", "" } - }; - } - - public ControlHandler(IServerConfigurationManager config, ILogger logger, DeviceProfile profile) - : base(config, logger) - { - _profile = profile; + xmlWriter.WriteElementString("Source", _profile.ProtocolInfo); + xmlWriter.WriteElementString("Sink", string.Empty); } } } diff --git a/Emby.Dlna/ConnectionManager/ServiceActionListBuilder.cs b/Emby.Dlna/ConnectionManager/ServiceActionListBuilder.cs index b7727b5580..019a0f80f4 100644 --- a/Emby.Dlna/ConnectionManager/ServiceActionListBuilder.cs +++ b/Emby.Dlna/ConnectionManager/ServiceActionListBuilder.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Collections.Generic; using Emby.Dlna.Common; diff --git a/Emby.Dlna/ContentDirectory/ContentDirectory.cs b/Emby.Dlna/ContentDirectory/ContentDirectory.cs index a3062b18fd..523430e430 100644 --- a/Emby.Dlna/ContentDirectory/ContentDirectory.cs +++ b/Emby.Dlna/ContentDirectory/ContentDirectory.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Threading.Tasks; using Emby.Dlna.Service; diff --git a/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs b/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs index 15fdb36c4c..282a47c738 100644 --- a/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs +++ b/Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Collections.Generic; using Emby.Dlna.Common; using Emby.Dlna.Service; diff --git a/Emby.Dlna/ContentDirectory/ControlHandler.cs b/Emby.Dlna/ContentDirectory/ControlHandler.cs index 396649c5ea..e5acb92db5 100644 --- a/Emby.Dlna/ContentDirectory/ControlHandler.cs +++ b/Emby.Dlna/ContentDirectory/ControlHandler.cs @@ -1,7 +1,9 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Globalization; -using System.IO; using System.Linq; using System.Text; using System.Threading; @@ -79,114 +81,129 @@ namespace Emby.Dlna.ContentDirectory _didlBuilder = new DidlBuilder(profile, user, imageProcessor, serverAddress, accessToken, userDataManager, localization, mediaSourceManager, Logger, mediaEncoder); } - protected override IEnumerable> GetResult(string methodName, IDictionary methodParams) + /// + protected override void WriteResult(string methodName, IDictionary methodParams, XmlWriter xmlWriter) { - var deviceId = "test"; - - var user = _user; + const string DeviceId = "test"; if (string.Equals(methodName, "GetSearchCapabilities", StringComparison.OrdinalIgnoreCase)) - return HandleGetSearchCapabilities(); + { + HandleGetSearchCapabilities(xmlWriter); + return; + } if (string.Equals(methodName, "GetSortCapabilities", StringComparison.OrdinalIgnoreCase)) - return HandleGetSortCapabilities(); + { + HandleGetSortCapabilities(xmlWriter); + return; + } if (string.Equals(methodName, "GetSortExtensionCapabilities", StringComparison.OrdinalIgnoreCase)) - return HandleGetSortExtensionCapabilities(); + { + HandleGetSortExtensionCapabilities(xmlWriter); + return; + } if (string.Equals(methodName, "GetSystemUpdateID", StringComparison.OrdinalIgnoreCase)) - return HandleGetSystemUpdateID(); + { + HandleGetSystemUpdateID(xmlWriter); + return; + } if (string.Equals(methodName, "Browse", StringComparison.OrdinalIgnoreCase)) - return HandleBrowse(methodParams, user, deviceId); + { + HandleBrowse(xmlWriter, methodParams, DeviceId); + return; + } if (string.Equals(methodName, "X_GetFeatureList", StringComparison.OrdinalIgnoreCase)) - return HandleXGetFeatureList(); + { + HandleXGetFeatureList(xmlWriter); + return; + } if (string.Equals(methodName, "GetFeatureList", StringComparison.OrdinalIgnoreCase)) - return HandleGetFeatureList(); + { + HandleGetFeatureList(xmlWriter); + return; + } if (string.Equals(methodName, "X_SetBookmark", StringComparison.OrdinalIgnoreCase)) - return HandleXSetBookmark(methodParams, user); + { + HandleXSetBookmark(methodParams); + return; + } if (string.Equals(methodName, "Search", StringComparison.OrdinalIgnoreCase)) - return HandleSearch(methodParams, user, deviceId); + { + HandleSearch(xmlWriter, methodParams, DeviceId); + return; + } if (string.Equals(methodName, "X_BrowseByLetter", StringComparison.OrdinalIgnoreCase)) - return HandleX_BrowseByLetter(methodParams, user, deviceId); + { + HandleXBrowseByLetter(xmlWriter, methodParams, DeviceId); + return; + } throw new ResourceNotFoundException("Unexpected control request name: " + methodName); } - private IEnumerable> HandleXSetBookmark(IDictionary sparams, User user) + private void HandleXSetBookmark(IDictionary sparams) { var id = sparams["ObjectID"]; - var serverItem = GetItemFromObjectId(id, user); + var serverItem = GetItemFromObjectId(id, _user); var item = serverItem.Item; var newbookmark = int.Parse(sparams["PosSecond"], _usCulture); - var userdata = _userDataManager.GetUserData(user, item); + var userdata = _userDataManager.GetUserData(_user, item); userdata.PlaybackPositionTicks = TimeSpan.FromSeconds(newbookmark).Ticks; - _userDataManager.SaveUserData(user, item, userdata, UserDataSaveReason.TogglePlayed, + _userDataManager.SaveUserData(_user, item, userdata, UserDataSaveReason.TogglePlayed, CancellationToken.None); - - return new Dictionary(StringComparer.OrdinalIgnoreCase); } - private IEnumerable> HandleGetSearchCapabilities() + private void HandleGetSearchCapabilities(XmlWriter xmlWriter) { - return new Dictionary(StringComparer.OrdinalIgnoreCase) - { - { "SearchCaps", "res@resolution,res@size,res@duration,dc:title,dc:creator,upnp:actor,upnp:artist,upnp:genre,upnp:album,dc:date,upnp:class,@id,@refID,@protocolInfo,upnp:author,dc:description,pv:avKeywords" } - }; + xmlWriter.WriteElementString( + "SearchCaps", + "res@resolution,res@size,res@duration,dc:title,dc:creator,upnp:actor,upnp:artist,upnp:genre,upnp:album,dc:date,upnp:class,@id,@refID,@protocolInfo,upnp:author,dc:description,pv:avKeywords"); } - private IEnumerable> HandleGetSortCapabilities() + private void HandleGetSortCapabilities(XmlWriter xmlWriter) { - return new Dictionary(StringComparer.OrdinalIgnoreCase) - { - { "SortCaps", "res@duration,res@size,res@bitrate,dc:date,dc:title,dc:size,upnp:album,upnp:artist,upnp:albumArtist,upnp:episodeNumber,upnp:genre,upnp:originalTrackNumber,upnp:rating" } - }; + xmlWriter.WriteElementString( + "SortCaps", + "res@duration,res@size,res@bitrate,dc:date,dc:title,dc:size,upnp:album,upnp:artist,upnp:albumArtist,upnp:episodeNumber,upnp:genre,upnp:originalTrackNumber,upnp:rating"); } - private IEnumerable> HandleGetSortExtensionCapabilities() + private void HandleGetSortExtensionCapabilities(XmlWriter xmlWriter) { - return new Dictionary(StringComparer.OrdinalIgnoreCase) - { - { "SortExtensionCaps", "res@duration,res@size,res@bitrate,dc:date,dc:title,dc:size,upnp:album,upnp:artist,upnp:albumArtist,upnp:episodeNumber,upnp:genre,upnp:originalTrackNumber,upnp:rating" } - }; + xmlWriter.WriteElementString( + "SortExtensionCaps", + "res@duration,res@size,res@bitrate,dc:date,dc:title,dc:size,upnp:album,upnp:artist,upnp:albumArtist,upnp:episodeNumber,upnp:genre,upnp:originalTrackNumber,upnp:rating"); } - private IEnumerable> HandleGetSystemUpdateID() + private void HandleGetSystemUpdateID(XmlWriter xmlWriter) { - var headers = new Dictionary(StringComparer.OrdinalIgnoreCase); - headers.Add("Id", _systemUpdateId.ToString(_usCulture)); - return headers; + xmlWriter.WriteElementString("Id", _systemUpdateId.ToString(CultureInfo.InvariantCulture)); } - private IEnumerable> HandleGetFeatureList() + private void HandleGetFeatureList(XmlWriter xmlWriter) { - return new Dictionary(StringComparer.OrdinalIgnoreCase) - { - { "FeatureList", GetFeatureListXml() } - }; + xmlWriter.WriteElementString("FeatureList", WriteFeatureListXml()); } - private IEnumerable> HandleXGetFeatureList() - { - return new Dictionary(StringComparer.OrdinalIgnoreCase) - { - { "FeatureList", GetFeatureListXml() } - }; - } + private void HandleXGetFeatureList(XmlWriter xmlWriter) + => HandleGetFeatureList(xmlWriter); - private string GetFeatureListXml() + private string WriteFeatureListXml() { + // TODO: clean this up var builder = new StringBuilder(); builder.Append(""); @@ -213,7 +230,7 @@ namespace Emby.Dlna.ContentDirectory return defaultValue; } - private IEnumerable> HandleBrowse(IDictionary sparams, User user, string deviceId) + private void HandleBrowse(XmlWriter xmlWriter, IDictionary sparams, string deviceId) { var id = sparams["ObjectID"]; var flag = sparams["BrowseFlag"]; @@ -237,101 +254,81 @@ namespace Emby.Dlna.ContentDirectory start = startVal; } - var settings = new XmlWriterSettings - { - Encoding = Encoding.UTF8, - CloseOutput = false, - OmitXmlDeclaration = true, - ConformanceLevel = ConformanceLevel.Fragment - }; + xmlWriter.WriteStartElement("Result"); - StringWriter builder = new StringWriterWithEncoding(Encoding.UTF8); + xmlWriter.WriteStartElement(string.Empty, "DIDL-Lite", NS_DIDL); - int totalCount; + xmlWriter.WriteAttributeString("xmlns", "dc", null, NS_DC); + xmlWriter.WriteAttributeString("xmlns", "dlna", null, NS_DLNA); + xmlWriter.WriteAttributeString("xmlns", "upnp", null, NS_UPNP); + //didl.SetAttribute("xmlns:sec", NS_SEC); - var dlnaOptions = _config.GetDlnaConfiguration(); + DidlBuilder.WriteXmlRootAttributes(_profile, xmlWriter); - using (var writer = XmlWriter.Create(builder, settings)) + var serverItem = GetItemFromObjectId(id, _user); + var item = serverItem.Item; + + int totalCount; + if (string.Equals(flag, "BrowseMetadata")) { - //writer.WriteStartDocument(); + totalCount = 1; - writer.WriteStartElement(string.Empty, "DIDL-Lite", NS_DIDL); + if (item.IsDisplayedAsFolder || serverItem.StubType.HasValue) + { + var childrenResult = GetUserItems(item, serverItem.StubType, _user, sortCriteria, start, requestedCount); - writer.WriteAttributeString("xmlns", "dc", null, NS_DC); - writer.WriteAttributeString("xmlns", "dlna", null, NS_DLNA); - writer.WriteAttributeString("xmlns", "upnp", null, NS_UPNP); - //didl.SetAttribute("xmlns:sec", NS_SEC); + _didlBuilder.WriteFolderElement(xmlWriter, item, serverItem.StubType, null, childrenResult.TotalRecordCount, filter, id); + } + else + { + var dlnaOptions = _config.GetDlnaConfiguration(); + _didlBuilder.WriteItemElement(dlnaOptions, xmlWriter, item, _user, null, null, deviceId, filter); + } - DidlBuilder.WriteXmlRootAttributes(_profile, writer); + provided++; + } + else + { + var childrenResult = GetUserItems(item, serverItem.StubType, _user, sortCriteria, start, requestedCount); + totalCount = childrenResult.TotalRecordCount; - var serverItem = GetItemFromObjectId(id, user); - var item = serverItem.Item; + provided = childrenResult.Items.Count; - if (string.Equals(flag, "BrowseMetadata")) + var dlnaOptions = _config.GetDlnaConfiguration(); + foreach (var i in childrenResult.Items) { - totalCount = 1; + var childItem = i.Item; + var displayStubType = i.StubType; - if (item.IsDisplayedAsFolder || serverItem.StubType.HasValue) + if (childItem.IsDisplayedAsFolder || displayStubType.HasValue) { - var childrenResult = GetUserItems(item, serverItem.StubType, user, sortCriteria, start, requestedCount); + var childCount = GetUserItems(childItem, displayStubType, _user, sortCriteria, null, 0) + .TotalRecordCount; - _didlBuilder.WriteFolderElement(writer, item, serverItem.StubType, null, childrenResult.TotalRecordCount, filter, id); + _didlBuilder.WriteFolderElement(xmlWriter, childItem, displayStubType, item, childCount, filter); } else { - _didlBuilder.WriteItemElement(dlnaOptions, writer, item, user, null, null, deviceId, filter); - } - - provided++; - } - else - { - var childrenResult = GetUserItems(item, serverItem.StubType, user, sortCriteria, start, requestedCount); - totalCount = childrenResult.TotalRecordCount; - - provided = childrenResult.Items.Count; - - foreach (var i in childrenResult.Items) - { - var childItem = i.Item; - var displayStubType = i.StubType; - - if (childItem.IsDisplayedAsFolder || displayStubType.HasValue) - { - var childCount = (GetUserItems(childItem, displayStubType, user, sortCriteria, null, 0)) - .TotalRecordCount; - - _didlBuilder.WriteFolderElement(writer, childItem, displayStubType, item, childCount, filter); - } - else - { - _didlBuilder.WriteItemElement(dlnaOptions, writer, childItem, user, item, serverItem.StubType, deviceId, filter); - } + _didlBuilder.WriteItemElement(dlnaOptions, xmlWriter, childItem, _user, item, serverItem.StubType, deviceId, filter); } } - - writer.WriteFullEndElement(); - //writer.WriteEndDocument(); } - var resXML = builder.ToString(); + xmlWriter.WriteFullEndElement(); + xmlWriter.WriteFullEndElement(); - return new[] - { - new KeyValuePair("Result", resXML), - new KeyValuePair("NumberReturned", provided.ToString(_usCulture)), - new KeyValuePair("TotalMatches", totalCount.ToString(_usCulture)), - new KeyValuePair("UpdateID", _systemUpdateId.ToString(_usCulture)) - }; + xmlWriter.WriteElementString("NumberReturned", provided.ToString(_usCulture)); + xmlWriter.WriteElementString("TotalMatches", totalCount.ToString(_usCulture)); + xmlWriter.WriteElementString("UpdateID", _systemUpdateId.ToString(_usCulture)); } - private IEnumerable> HandleX_BrowseByLetter(IDictionary sparams, User user, string deviceId) + private void HandleXBrowseByLetter(XmlWriter xmlWriter, IDictionary sparams, string deviceId) { // TODO: Implement this method - return HandleSearch(sparams, user, deviceId); + HandleSearch(xmlWriter, sparams, deviceId); } - private IEnumerable> HandleSearch(IDictionary sparams, User user, string deviceId) + private void HandleSearch(XmlWriter xmlWriter, IDictionary sparams, string deviceId) { var searchCriteria = new SearchCriteria(GetValueOrDefault(sparams, "SearchCriteria", "")); var sortCriteria = new SortCriteria(GetValueOrDefault(sparams, "SortCriteria", "")); @@ -354,99 +351,74 @@ namespace Emby.Dlna.ContentDirectory start = startVal; } - var settings = new XmlWriterSettings - { - Encoding = Encoding.UTF8, - CloseOutput = false, - OmitXmlDeclaration = true, - ConformanceLevel = ConformanceLevel.Fragment - }; - - StringWriter builder = new StringWriterWithEncoding(Encoding.UTF8); - int totalCount = 0; - int provided = 0; - - using (var writer = XmlWriter.Create(builder, settings)) - { - //writer.WriteStartDocument(); + xmlWriter.WriteStartElement("Result"); - writer.WriteStartElement(string.Empty, "DIDL-Lite", NS_DIDL); + xmlWriter.WriteStartElement(string.Empty, "DIDL-Lite", NS_DIDL); - writer.WriteAttributeString("xmlns", "dc", null, NS_DC); - writer.WriteAttributeString("xmlns", "dlna", null, NS_DLNA); - writer.WriteAttributeString("xmlns", "upnp", null, NS_UPNP); - //didl.SetAttribute("xmlns:sec", NS_SEC); + xmlWriter.WriteAttributeString("xmlns", "dc", null, NS_DC); + xmlWriter.WriteAttributeString("xmlns", "dlna", null, NS_DLNA); + xmlWriter.WriteAttributeString("xmlns", "upnp", null, NS_UPNP); + //didl.SetAttribute("xmlns:sec", NS_SEC); - DidlBuilder.WriteXmlRootAttributes(_profile, writer); + DidlBuilder.WriteXmlRootAttributes(_profile, xmlWriter); - var serverItem = GetItemFromObjectId(sparams["ContainerID"], user); + var serverItem = GetItemFromObjectId(sparams["ContainerID"], _user); - var item = serverItem.Item; - - var childrenResult = (GetChildrenSorted(item, user, searchCriteria, sortCriteria, start, requestedCount)); - - totalCount = childrenResult.TotalRecordCount; + var item = serverItem.Item; - provided = childrenResult.Items.Count; + var childrenResult = GetChildrenSorted(item, _user, searchCriteria, sortCriteria, start, requestedCount); - var dlnaOptions = _config.GetDlnaConfiguration(); + var dlnaOptions = _config.GetDlnaConfiguration(); - foreach (var i in childrenResult.Items) + foreach (var i in childrenResult.Items) + { + if (i.IsDisplayedAsFolder) { - if (i.IsDisplayedAsFolder) - { - var childCount = (GetChildrenSorted(i, user, searchCriteria, sortCriteria, null, 0)) - .TotalRecordCount; + var childCount = GetChildrenSorted(i, _user, searchCriteria, sortCriteria, null, 0) + .TotalRecordCount; - _didlBuilder.WriteFolderElement(writer, i, null, item, childCount, filter); - } - else - { - _didlBuilder.WriteItemElement(dlnaOptions, writer, i, user, item, serverItem.StubType, deviceId, filter); - } + _didlBuilder.WriteFolderElement(xmlWriter, i, null, item, childCount, filter); + } + else + { + _didlBuilder.WriteItemElement(dlnaOptions, xmlWriter, i, _user, item, serverItem.StubType, deviceId, filter); } - - writer.WriteFullEndElement(); - //writer.WriteEndDocument(); } - var resXML = builder.ToString(); + xmlWriter.WriteFullEndElement(); + xmlWriter.WriteFullEndElement(); - return new List> - { - new KeyValuePair("Result", resXML), - new KeyValuePair("NumberReturned", provided.ToString(_usCulture)), - new KeyValuePair("TotalMatches", totalCount.ToString(_usCulture)), - new KeyValuePair("UpdateID", _systemUpdateId.ToString(_usCulture)) - }; + xmlWriter.WriteElementString("NumberReturned", childrenResult.Items.Count.ToString(_usCulture)); + xmlWriter.WriteElementString("TotalMatches", childrenResult.TotalRecordCount.ToString(_usCulture)); + xmlWriter.WriteElementString("UpdateID", _systemUpdateId.ToString(_usCulture)); } private QueryResult GetChildrenSorted(BaseItem item, User user, SearchCriteria search, SortCriteria sort, int? startIndex, int? limit) { var folder = (Folder)item; - var sortOrders = new List<(string, SortOrder)>(); - if (!folder.IsPreSorted) + var sortOrders = folder.IsPreSorted switch { - sortOrders.Add((ItemSortBy.SortName, sort.SortOrder)); - } + true => Array.Empty<(string, SortOrder)>(), + false => new[] { (ItemSortBy.SortName, sort.SortOrder) } + }; - var mediaTypes = new List(); + string[] mediaTypes = Array.Empty(); bool? isFolder = null; if (search.SearchType == SearchType.Audio) { - mediaTypes.Add(MediaType.Audio); + mediaTypes = new[] { MediaType.Audio }; isFolder = false; } else if (search.SearchType == SearchType.Video) { - mediaTypes.Add(MediaType.Video); + mediaTypes = new[] { MediaType.Video }; isFolder = false; } else if (search.SearchType == SearchType.Image) { - mediaTypes.Add(MediaType.Photo); + mediaTypes = new[] { MediaType.Photo }; isFolder = false; } else if (search.SearchType == SearchType.Playlist) @@ -470,7 +442,7 @@ namespace Emby.Dlna.ContentDirectory IsMissing = false, ExcludeItemTypes = new[] { typeof(Book).Name }, IsFolder = isFolder, - MediaTypes = mediaTypes.ToArray(), + MediaTypes = mediaTypes, DtoOptions = GetDtoOptions() }); } @@ -1304,11 +1276,11 @@ namespace Emby.Dlna.ContentDirectory StubType? stubType = null; // After using PlayTo, MediaMonkey sends a request to the server trying to get item info - const string paramsSrch = "Params="; - var paramsIndex = id.IndexOf(paramsSrch, StringComparison.OrdinalIgnoreCase); + const string ParamsSrch = "Params="; + var paramsIndex = id.IndexOf(ParamsSrch, StringComparison.OrdinalIgnoreCase); if (paramsIndex != -1) { - id = id.Substring(paramsIndex + paramsSrch.Length); + id = id.Substring(paramsIndex + ParamsSrch.Length); var parts = id.Split(';'); id = parts[23]; diff --git a/Emby.Dlna/ContentDirectory/ServiceActionListBuilder.cs b/Emby.Dlna/ContentDirectory/ServiceActionListBuilder.cs index e999314fa6..a385a74cfb 100644 --- a/Emby.Dlna/ContentDirectory/ServiceActionListBuilder.cs +++ b/Emby.Dlna/ContentDirectory/ServiceActionListBuilder.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Collections.Generic; using Emby.Dlna.Common; diff --git a/Emby.Dlna/ControlRequest.cs b/Emby.Dlna/ControlRequest.cs index 8c227159c4..97ad41c834 100644 --- a/Emby.Dlna/ControlRequest.cs +++ b/Emby.Dlna/ControlRequest.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.IO; using Microsoft.AspNetCore.Http; diff --git a/Emby.Dlna/ControlResponse.cs b/Emby.Dlna/ControlResponse.cs index d2b79fc585..0215a5e387 100644 --- a/Emby.Dlna/ControlResponse.cs +++ b/Emby.Dlna/ControlResponse.cs @@ -1,18 +1,21 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Collections.Generic; namespace Emby.Dlna { public class ControlResponse { + public ControlResponse() + { + Headers = new Dictionary(); + } + public IDictionary Headers { get; set; } public string Xml { get; set; } public bool IsSuccessful { get; set; } - - public ControlResponse() - { - Headers = new Dictionary(); - } } } diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.cs index 85ef9d4829..f2128d9c6d 100644 --- a/Emby.Dlna/Didl/DidlBuilder.cs +++ b/Emby.Dlna/Didl/DidlBuilder.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Globalization; using System.IO; @@ -18,7 +21,6 @@ using MediaBrowser.Controller.Playlists; using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.Net; using Microsoft.Extensions.Logging; diff --git a/Emby.Dlna/Didl/Filter.cs b/Emby.Dlna/Didl/Filter.cs index a0e67870e9..88cf7cb5a6 100644 --- a/Emby.Dlna/Didl/Filter.cs +++ b/Emby.Dlna/Didl/Filter.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Extensions; diff --git a/Emby.Dlna/Didl/StringWriterWithEncoding.cs b/Emby.Dlna/Didl/StringWriterWithEncoding.cs index c3c4bd393b..edc2588995 100644 --- a/Emby.Dlna/Didl/StringWriterWithEncoding.cs +++ b/Emby.Dlna/Didl/StringWriterWithEncoding.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.IO; using System.Text; diff --git a/Emby.Dlna/DlnaManager.cs b/Emby.Dlna/DlnaManager.cs index d5d788021d..14602485af 100644 --- a/Emby.Dlna/DlnaManager.cs +++ b/Emby.Dlna/DlnaManager.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Globalization; diff --git a/Emby.Dlna/Emby.Dlna.csproj b/Emby.Dlna/Emby.Dlna.csproj index 8d6fabdb44..0cabe43d51 100644 --- a/Emby.Dlna/Emby.Dlna.csproj +++ b/Emby.Dlna/Emby.Dlna.csproj @@ -15,6 +15,19 @@ netstandard2.1 false true + true + + + + + + + + + + + + ../jellyfin.ruleset diff --git a/Emby.Dlna/EventSubscriptionResponse.cs b/Emby.Dlna/EventSubscriptionResponse.cs index 6dc1aacf4f..f90d273c4b 100644 --- a/Emby.Dlna/EventSubscriptionResponse.cs +++ b/Emby.Dlna/EventSubscriptionResponse.cs @@ -1,17 +1,21 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Collections.Generic; namespace Emby.Dlna { public class EventSubscriptionResponse { - public string Content { get; set; } - public string ContentType { get; set; } - - public Dictionary Headers { get; set; } - public EventSubscriptionResponse() { Headers = new Dictionary(); } + + public string Content { get; set; } + + public string ContentType { get; set; } + + public Dictionary Headers { get; set; } } } diff --git a/Emby.Dlna/Eventing/EventManager.cs b/Emby.Dlna/Eventing/EventManager.cs index b76a0066d1..7881898803 100644 --- a/Emby.Dlna/Eventing/EventManager.cs +++ b/Emby.Dlna/Eventing/EventManager.cs @@ -1,8 +1,12 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Globalization; using System.Linq; +using System.Net.Http; using System.Text; using System.Threading.Tasks; using MediaBrowser.Common.Extensions; @@ -164,7 +168,7 @@ namespace Emby.Dlna.Eventing try { - using (await _httpClient.SendAsync(options, "NOTIFY").ConfigureAwait(false)) + using (await _httpClient.SendAsync(options, new HttpMethod("NOTIFY")).ConfigureAwait(false)) { } diff --git a/Emby.Dlna/Eventing/EventSubscription.cs b/Emby.Dlna/Eventing/EventSubscription.cs index eb8781e0cd..108ab48303 100644 --- a/Emby.Dlna/Eventing/EventSubscription.cs +++ b/Emby.Dlna/Eventing/EventSubscription.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace Emby.Dlna.Eventing @@ -13,6 +16,8 @@ namespace Emby.Dlna.Eventing public long TriggerCount { get; set; } + public bool IsExpired => SubscriptionTime.AddSeconds(TimeoutSeconds) >= DateTime.UtcNow; + public void IncrementTriggerCount() { if (TriggerCount == long.MaxValue) @@ -22,7 +27,5 @@ namespace Emby.Dlna.Eventing TriggerCount++; } - - public bool IsExpired => SubscriptionTime.AddSeconds(TimeoutSeconds) >= DateTime.UtcNow; } } diff --git a/Emby.Dlna/IConnectionManager.cs b/Emby.Dlna/IConnectionManager.cs index 855c4454d9..01fb869f57 100644 --- a/Emby.Dlna/IConnectionManager.cs +++ b/Emby.Dlna/IConnectionManager.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 namespace Emby.Dlna { diff --git a/Emby.Dlna/IContentDirectory.cs b/Emby.Dlna/IContentDirectory.cs index b54a17c009..a28ad2b9c8 100644 --- a/Emby.Dlna/IContentDirectory.cs +++ b/Emby.Dlna/IContentDirectory.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 namespace Emby.Dlna { diff --git a/Emby.Dlna/IEventManager.cs b/Emby.Dlna/IEventManager.cs index 4f67a1b9b6..d0960aa16c 100644 --- a/Emby.Dlna/IEventManager.cs +++ b/Emby.Dlna/IEventManager.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 namespace Emby.Dlna { diff --git a/Emby.Dlna/IMediaReceiverRegistrar.cs b/Emby.Dlna/IMediaReceiverRegistrar.cs index 5dde01f58b..d2aaa8f553 100644 --- a/Emby.Dlna/IMediaReceiverRegistrar.cs +++ b/Emby.Dlna/IMediaReceiverRegistrar.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 namespace Emby.Dlna { diff --git a/Emby.Dlna/IUpnpService.cs b/Emby.Dlna/IUpnpService.cs index 0f3d327ed2..289e2df78c 100644 --- a/Emby.Dlna/IUpnpService.cs +++ b/Emby.Dlna/IUpnpService.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Threading.Tasks; namespace Emby.Dlna diff --git a/Emby.Dlna/Main/DlnaEntryPoint.cs b/Emby.Dlna/Main/DlnaEntryPoint.cs index 77bde0ca24..1ee4151e4b 100644 --- a/Emby.Dlna/Main/DlnaEntryPoint.cs +++ b/Emby.Dlna/Main/DlnaEntryPoint.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Net.Sockets; using System.Globalization; diff --git a/Emby.Dlna/MediaReceiverRegistrar/ControlHandler.cs b/Emby.Dlna/MediaReceiverRegistrar/ControlHandler.cs index 7381e52582..815aac5c7c 100644 --- a/Emby.Dlna/MediaReceiverRegistrar/ControlHandler.cs +++ b/Emby.Dlna/MediaReceiverRegistrar/ControlHandler.cs @@ -1,5 +1,9 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; +using System.Xml; using Emby.Dlna.Service; using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Configuration; @@ -9,35 +13,33 @@ namespace Emby.Dlna.MediaReceiverRegistrar { public class ControlHandler : BaseControlHandler { - protected override IEnumerable> GetResult(string methodName, IDictionary methodParams) + public ControlHandler(IServerConfigurationManager config, ILogger logger) + : base(config, logger) { - if (string.Equals(methodName, "IsAuthorized", StringComparison.OrdinalIgnoreCase)) - return HandleIsAuthorized(); - if (string.Equals(methodName, "IsValidated", StringComparison.OrdinalIgnoreCase)) - return HandleIsValidated(); - - throw new ResourceNotFoundException("Unexpected control request name: " + methodName); } - private static IEnumerable> HandleIsAuthorized() + /// + protected override void WriteResult(string methodName, IDictionary methodParams, XmlWriter xmlWriter) { - return new Dictionary(StringComparer.OrdinalIgnoreCase) + if (string.Equals(methodName, "IsAuthorized", StringComparison.OrdinalIgnoreCase)) { - { "Result", "1" } - }; - } + HandleIsAuthorized(xmlWriter); + return; + } - private static IEnumerable> HandleIsValidated() - { - return new Dictionary(StringComparer.OrdinalIgnoreCase) + if (string.Equals(methodName, "IsValidated", StringComparison.OrdinalIgnoreCase)) { - { "Result", "1" } - }; - } + HandleIsValidated(xmlWriter); + return; + } - public ControlHandler(IServerConfigurationManager config, ILogger logger) - : base(config, logger) - { + throw new ResourceNotFoundException("Unexpected control request name: " + methodName); } + + private static void HandleIsAuthorized(XmlWriter xmlWriter) + => xmlWriter.WriteElementString("Result", "1"); + + private static void HandleIsValidated(XmlWriter xmlWriter) + => xmlWriter.WriteElementString("Result", "1"); } } diff --git a/Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrar.cs b/Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrar.cs index 5eab6aee0c..e2d48bc01f 100644 --- a/Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrar.cs +++ b/Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrar.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Threading.Tasks; using Emby.Dlna.Service; using MediaBrowser.Common.Net; diff --git a/Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrarXmlBuilder.cs b/Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrarXmlBuilder.cs index 6413411851..465b08f58e 100644 --- a/Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrarXmlBuilder.cs +++ b/Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrarXmlBuilder.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Collections.Generic; using Emby.Dlna.Common; using Emby.Dlna.Service; diff --git a/Emby.Dlna/MediaReceiverRegistrar/ServiceActionListBuilder.cs b/Emby.Dlna/MediaReceiverRegistrar/ServiceActionListBuilder.cs index 86429f6051..3e8b2dbd88 100644 --- a/Emby.Dlna/MediaReceiverRegistrar/ServiceActionListBuilder.cs +++ b/Emby.Dlna/MediaReceiverRegistrar/ServiceActionListBuilder.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Collections.Generic; using Emby.Dlna.Common; diff --git a/Emby.Dlna/PlayTo/Device.cs b/Emby.Dlna/PlayTo/Device.cs index 0c5ddee654..61db264a2f 100644 --- a/Emby.Dlna/PlayTo/Device.cs +++ b/Emby.Dlna/PlayTo/Device.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Globalization; @@ -221,7 +224,7 @@ namespace Emby.Dlna.PlayTo _logger.LogDebug("Setting mute"); var value = mute ? 1 : 0; - await new SsdpHttpClient(_httpClient, _config).SendCommandAsync(Properties.BaseUrl, service, command.Name, rendererCommands.BuildPost(command, service.ServiceType, value)) + await new SsdpHttpClient(_httpClient).SendCommandAsync(Properties.BaseUrl, service, command.Name, rendererCommands.BuildPost(command, service.ServiceType, value)) .ConfigureAwait(false); IsMuted = mute; @@ -251,7 +254,7 @@ namespace Emby.Dlna.PlayTo // Remote control will perform better Volume = value; - await new SsdpHttpClient(_httpClient, _config).SendCommandAsync(Properties.BaseUrl, service, command.Name, rendererCommands.BuildPost(command, service.ServiceType, value)) + await new SsdpHttpClient(_httpClient).SendCommandAsync(Properties.BaseUrl, service, command.Name, rendererCommands.BuildPost(command, service.ServiceType, value)) .ConfigureAwait(false); } @@ -270,7 +273,7 @@ namespace Emby.Dlna.PlayTo throw new InvalidOperationException("Unable to find service"); } - await new SsdpHttpClient(_httpClient, _config).SendCommandAsync(Properties.BaseUrl, service, command.Name, avCommands.BuildPost(command, service.ServiceType, string.Format("{0:hh}:{0:mm}:{0:ss}", value), "REL_TIME")) + await new SsdpHttpClient(_httpClient).SendCommandAsync(Properties.BaseUrl, service, command.Name, avCommands.BuildPost(command, service.ServiceType, string.Format("{0:hh}:{0:mm}:{0:ss}", value), "REL_TIME")) .ConfigureAwait(false); RestartTimer(true); @@ -302,7 +305,7 @@ namespace Emby.Dlna.PlayTo } var post = avCommands.BuildPost(command, service.ServiceType, url, dictionary); - await new SsdpHttpClient(_httpClient, _config).SendCommandAsync(Properties.BaseUrl, service, command.Name, post, header: header) + await new SsdpHttpClient(_httpClient).SendCommandAsync(Properties.BaseUrl, service, command.Name, post, header: header) .ConfigureAwait(false); await Task.Delay(50).ConfigureAwait(false); @@ -344,7 +347,7 @@ namespace Emby.Dlna.PlayTo throw new InvalidOperationException("Unable to find service"); } - return new SsdpHttpClient(_httpClient, _config).SendCommandAsync(Properties.BaseUrl, service, command.Name, avCommands.BuildPost(command, service.ServiceType, 1)); + return new SsdpHttpClient(_httpClient).SendCommandAsync(Properties.BaseUrl, service, command.Name, avCommands.BuildPost(command, service.ServiceType, 1)); } public async Task SetPlay(CancellationToken cancellationToken) @@ -368,7 +371,7 @@ namespace Emby.Dlna.PlayTo var service = GetAvTransportService(); - await new SsdpHttpClient(_httpClient, _config).SendCommandAsync(Properties.BaseUrl, service, command.Name, avCommands.BuildPost(command, service.ServiceType, 1)) + await new SsdpHttpClient(_httpClient).SendCommandAsync(Properties.BaseUrl, service, command.Name, avCommands.BuildPost(command, service.ServiceType, 1)) .ConfigureAwait(false); RestartTimer(true); @@ -386,7 +389,7 @@ namespace Emby.Dlna.PlayTo var service = GetAvTransportService(); - await new SsdpHttpClient(_httpClient, _config).SendCommandAsync(Properties.BaseUrl, service, command.Name, avCommands.BuildPost(command, service.ServiceType, 1)) + await new SsdpHttpClient(_httpClient).SendCommandAsync(Properties.BaseUrl, service, command.Name, avCommands.BuildPost(command, service.ServiceType, 1)) .ConfigureAwait(false); TransportState = TRANSPORTSTATE.PAUSED; @@ -513,7 +516,7 @@ namespace Emby.Dlna.PlayTo return; } - var result = await new SsdpHttpClient(_httpClient, _config).SendCommandAsync(Properties.BaseUrl, service, command.Name, rendererCommands.BuildPost(command, service.ServiceType), true) + var result = await new SsdpHttpClient(_httpClient).SendCommandAsync(Properties.BaseUrl, service, command.Name, rendererCommands.BuildPost(command, service.ServiceType), true) .ConfigureAwait(false); if (result == null || result.Document == null) @@ -559,7 +562,7 @@ namespace Emby.Dlna.PlayTo return; } - var result = await new SsdpHttpClient(_httpClient, _config).SendCommandAsync(Properties.BaseUrl, service, command.Name, rendererCommands.BuildPost(command, service.ServiceType), true) + var result = await new SsdpHttpClient(_httpClient).SendCommandAsync(Properties.BaseUrl, service, command.Name, rendererCommands.BuildPost(command, service.ServiceType), true) .ConfigureAwait(false); if (result == null || result.Document == null) @@ -586,7 +589,7 @@ namespace Emby.Dlna.PlayTo return null; } - var result = await new SsdpHttpClient(_httpClient, _config).SendCommandAsync(Properties.BaseUrl, service, command.Name, avCommands.BuildPost(command, service.ServiceType), false) + var result = await new SsdpHttpClient(_httpClient).SendCommandAsync(Properties.BaseUrl, service, command.Name, avCommands.BuildPost(command, service.ServiceType), false) .ConfigureAwait(false); if (result == null || result.Document == null) @@ -624,7 +627,7 @@ namespace Emby.Dlna.PlayTo var rendererCommands = await GetRenderingProtocolAsync(cancellationToken).ConfigureAwait(false); - var result = await new SsdpHttpClient(_httpClient, _config).SendCommandAsync(Properties.BaseUrl, service, command.Name, rendererCommands.BuildPost(command, service.ServiceType), false) + var result = await new SsdpHttpClient(_httpClient).SendCommandAsync(Properties.BaseUrl, service, command.Name, rendererCommands.BuildPost(command, service.ServiceType), false) .ConfigureAwait(false); if (result == null || result.Document == null) @@ -687,7 +690,7 @@ namespace Emby.Dlna.PlayTo var rendererCommands = await GetRenderingProtocolAsync(cancellationToken).ConfigureAwait(false); - var result = await new SsdpHttpClient(_httpClient, _config).SendCommandAsync(Properties.BaseUrl, service, command.Name, rendererCommands.BuildPost(command, service.ServiceType), false) + var result = await new SsdpHttpClient(_httpClient).SendCommandAsync(Properties.BaseUrl, service, command.Name, rendererCommands.BuildPost(command, service.ServiceType), false) .ConfigureAwait(false); if (result == null || result.Document == null) @@ -868,7 +871,7 @@ namespace Emby.Dlna.PlayTo string url = NormalizeUrl(Properties.BaseUrl, avService.ScpdUrl); - var httpClient = new SsdpHttpClient(_httpClient, _config); + var httpClient = new SsdpHttpClient(_httpClient); var document = await httpClient.GetDataAsync(url, cancellationToken).ConfigureAwait(false); @@ -896,7 +899,7 @@ namespace Emby.Dlna.PlayTo string url = NormalizeUrl(Properties.BaseUrl, avService.ScpdUrl); - var httpClient = new SsdpHttpClient(_httpClient, _config); + var httpClient = new SsdpHttpClient(_httpClient); _logger.LogDebug("Dlna Device.GetRenderingProtocolAsync"); var document = await httpClient.GetDataAsync(url, cancellationToken).ConfigureAwait(false); @@ -931,7 +934,7 @@ namespace Emby.Dlna.PlayTo public static async Task CreateuPnpDeviceAsync(Uri url, IHttpClient httpClient, IServerConfigurationManager config, ILogger logger, CancellationToken cancellationToken) { - var ssdpHttpClient = new SsdpHttpClient(httpClient, config); + var ssdpHttpClient = new SsdpHttpClient(httpClient); var document = await ssdpHttpClient.GetDataAsync(url.ToString(), cancellationToken).ConfigureAwait(false); diff --git a/Emby.Dlna/PlayTo/DeviceInfo.cs b/Emby.Dlna/PlayTo/DeviceInfo.cs index 9e7c04bdb3..c36f890966 100644 --- a/Emby.Dlna/PlayTo/DeviceInfo.cs +++ b/Emby.Dlna/PlayTo/DeviceInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Collections.Generic; using Emby.Dlna.Common; using MediaBrowser.Model.Dlna; diff --git a/Emby.Dlna/PlayTo/PlayToController.cs b/Emby.Dlna/PlayTo/PlayToController.cs index c58f16438b..ad01f0576d 100644 --- a/Emby.Dlna/PlayTo/PlayToController.cs +++ b/Emby.Dlna/PlayTo/PlayToController.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Globalization; diff --git a/Emby.Dlna/PlayTo/PlayToManager.cs b/Emby.Dlna/PlayTo/PlayToManager.cs index 2ca44b7ea2..5d75e33600 100644 --- a/Emby.Dlna/PlayTo/PlayToManager.cs +++ b/Emby.Dlna/PlayTo/PlayToManager.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Globalization; using System.Linq; @@ -21,7 +24,7 @@ using Microsoft.Extensions.Logging; namespace Emby.Dlna.PlayTo { - class PlayToManager : IDisposable + public class PlayToManager : IDisposable { private readonly ILogger _logger; private readonly ISessionManager _sessionManager; @@ -64,10 +67,10 @@ namespace Emby.Dlna.PlayTo public void Start() { - _deviceDiscovery.DeviceDiscovered += _deviceDiscovery_DeviceDiscovered; + _deviceDiscovery.DeviceDiscovered += OnDeviceDiscoveryDeviceDiscovered; } - async void _deviceDiscovery_DeviceDiscovered(object sender, GenericEventArgs e) + private async void OnDeviceDiscoveryDeviceDiscovered(object sender, GenericEventArgs e) { if (_disposed) { @@ -231,7 +234,7 @@ namespace Emby.Dlna.PlayTo public void Dispose() { - _deviceDiscovery.DeviceDiscovered -= _deviceDiscovery_DeviceDiscovered; + _deviceDiscovery.DeviceDiscovered -= OnDeviceDiscoveryDeviceDiscovered; try { diff --git a/Emby.Dlna/PlayTo/PlaybackProgressEventArgs.cs b/Emby.Dlna/PlayTo/PlaybackProgressEventArgs.cs index ffa56419bb..bdd2a6c3e4 100644 --- a/Emby.Dlna/PlayTo/PlaybackProgressEventArgs.cs +++ b/Emby.Dlna/PlayTo/PlaybackProgressEventArgs.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace Emby.Dlna.PlayTo diff --git a/Emby.Dlna/PlayTo/PlaybackStartEventArgs.cs b/Emby.Dlna/PlayTo/PlaybackStartEventArgs.cs index 8cd8b47acf..485f7ec103 100644 --- a/Emby.Dlna/PlayTo/PlaybackStartEventArgs.cs +++ b/Emby.Dlna/PlayTo/PlaybackStartEventArgs.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace Emby.Dlna.PlayTo diff --git a/Emby.Dlna/PlayTo/PlaybackStoppedEventArgs.cs b/Emby.Dlna/PlayTo/PlaybackStoppedEventArgs.cs index 2afdc324d9..2eddb125d4 100644 --- a/Emby.Dlna/PlayTo/PlaybackStoppedEventArgs.cs +++ b/Emby.Dlna/PlayTo/PlaybackStoppedEventArgs.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace Emby.Dlna.PlayTo diff --git a/Emby.Dlna/PlayTo/PlaylistItem.cs b/Emby.Dlna/PlayTo/PlaylistItem.cs index 1e62b61e93..42d73c38ca 100644 --- a/Emby.Dlna/PlayTo/PlaylistItem.cs +++ b/Emby.Dlna/PlayTo/PlaylistItem.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.PlayTo diff --git a/Emby.Dlna/PlayTo/PlaylistItemFactory.cs b/Emby.Dlna/PlayTo/PlaylistItemFactory.cs index 446d8e1e6e..8e279da6fc 100644 --- a/Emby.Dlna/PlayTo/PlaylistItemFactory.cs +++ b/Emby.Dlna/PlayTo/PlaylistItemFactory.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Globalization; using System.IO; using System.Linq; diff --git a/Emby.Dlna/PlayTo/SsdpHttpClient.cs b/Emby.Dlna/PlayTo/SsdpHttpClient.cs index 66c634150a..757e713e1c 100644 --- a/Emby.Dlna/PlayTo/SsdpHttpClient.cs +++ b/Emby.Dlna/PlayTo/SsdpHttpClient.cs @@ -1,13 +1,16 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Globalization; using System.IO; +using System.Net.Http; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Xml.Linq; using Emby.Dlna.Common; using MediaBrowser.Common.Net; -using MediaBrowser.Controller.Configuration; namespace Emby.Dlna.PlayTo { @@ -19,12 +22,10 @@ namespace Emby.Dlna.PlayTo private readonly CultureInfo _usCulture = new CultureInfo("en-US"); private readonly IHttpClient _httpClient; - private readonly IServerConfigurationManager _config; - public SsdpHttpClient(IHttpClient httpClient, IServerConfigurationManager config) + public SsdpHttpClient(IHttpClient httpClient) { _httpClient = httpClient; - _config = config; } public async Task SendCommandAsync( @@ -64,7 +65,9 @@ namespace Emby.Dlna.PlayTo } if (!serviceUrl.StartsWith("/")) + { serviceUrl = "/" + serviceUrl; + } return baseUrl + serviceUrl; } @@ -90,7 +93,7 @@ namespace Emby.Dlna.PlayTo options.RequestHeaders["NT"] = "upnp:event"; options.RequestHeaders["TIMEOUT"] = "Second-" + timeOut.ToString(_usCulture); - using (await _httpClient.SendAsync(options, "SUBSCRIBE").ConfigureAwait(false)) + using (await _httpClient.SendAsync(options, new HttpMethod("SUBSCRIBE")).ConfigureAwait(false)) { } @@ -110,7 +113,7 @@ namespace Emby.Dlna.PlayTo options.RequestHeaders["FriendlyName.DLNA.ORG"] = FriendlyName; - using (var response = await _httpClient.SendAsync(options, "GET").ConfigureAwait(false)) + using (var response = await _httpClient.SendAsync(options, HttpMethod.Get).ConfigureAwait(false)) using (var stream = response.Content) using (var reader = new StreamReader(stream, Encoding.UTF8)) { diff --git a/Emby.Dlna/PlayTo/TRANSPORTSTATE.cs b/Emby.Dlna/PlayTo/TRANSPORTSTATE.cs index 9f1690b04f..b312c8b6ec 100644 --- a/Emby.Dlna/PlayTo/TRANSPORTSTATE.cs +++ b/Emby.Dlna/PlayTo/TRANSPORTSTATE.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace Emby.Dlna.PlayTo { public enum TRANSPORTSTATE diff --git a/Emby.Dlna/PlayTo/TransportCommands.cs b/Emby.Dlna/PlayTo/TransportCommands.cs index 4f9e398e90..a00d154f78 100644 --- a/Emby.Dlna/PlayTo/TransportCommands.cs +++ b/Emby.Dlna/PlayTo/TransportCommands.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Linq; diff --git a/Emby.Dlna/PlayTo/UpnpContainer.cs b/Emby.Dlna/PlayTo/UpnpContainer.cs index 943e0347b2..9700d8a5d1 100644 --- a/Emby.Dlna/PlayTo/UpnpContainer.cs +++ b/Emby.Dlna/PlayTo/UpnpContainer.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Xml.Linq; using Emby.Dlna.Ssdp; diff --git a/Emby.Dlna/PlayTo/uBaseObject.cs b/Emby.Dlna/PlayTo/uBaseObject.cs index f29a126df7..6e2e31dc47 100644 --- a/Emby.Dlna/PlayTo/uBaseObject.cs +++ b/Emby.Dlna/PlayTo/uBaseObject.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace Emby.Dlna.PlayTo diff --git a/Emby.Dlna/PlayTo/uPnpNamespaces.cs b/Emby.Dlna/PlayTo/uPnpNamespaces.cs index 7132ecd15c..fc0f0f704f 100644 --- a/Emby.Dlna/PlayTo/uPnpNamespaces.cs +++ b/Emby.Dlna/PlayTo/uPnpNamespaces.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Xml.Linq; namespace Emby.Dlna.PlayTo diff --git a/Emby.Dlna/Profiles/DefaultProfile.cs b/Emby.Dlna/Profiles/DefaultProfile.cs index ea50bd4a75..97286e3472 100644 --- a/Emby.Dlna/Profiles/DefaultProfile.cs +++ b/Emby.Dlna/Profiles/DefaultProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Linq; using MediaBrowser.Model.Dlna; diff --git a/Emby.Dlna/Profiles/DenonAvrProfile.cs b/Emby.Dlna/Profiles/DenonAvrProfile.cs index a738851915..3be9805288 100644 --- a/Emby.Dlna/Profiles/DenonAvrProfile.cs +++ b/Emby.Dlna/Profiles/DenonAvrProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/DirectTvProfile.cs b/Emby.Dlna/Profiles/DirectTvProfile.cs index 317c0976a2..33bcae6044 100644 --- a/Emby.Dlna/Profiles/DirectTvProfile.cs +++ b/Emby.Dlna/Profiles/DirectTvProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs b/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs index 8d8ab41cad..26654b803c 100644 --- a/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs +++ b/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/Foobar2000Profile.cs b/Emby.Dlna/Profiles/Foobar2000Profile.cs index 947194bce4..c1aece8c8a 100644 --- a/Emby.Dlna/Profiles/Foobar2000Profile.cs +++ b/Emby.Dlna/Profiles/Foobar2000Profile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/LgTvProfile.cs b/Emby.Dlna/Profiles/LgTvProfile.cs index 145685ab12..63b5b6f311 100644 --- a/Emby.Dlna/Profiles/LgTvProfile.cs +++ b/Emby.Dlna/Profiles/LgTvProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/LinksysDMA2100Profile.cs b/Emby.Dlna/Profiles/LinksysDMA2100Profile.cs index 3f0bb4263d..3a9744e381 100644 --- a/Emby.Dlna/Profiles/LinksysDMA2100Profile.cs +++ b/Emby.Dlna/Profiles/LinksysDMA2100Profile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/MarantzProfile.cs b/Emby.Dlna/Profiles/MarantzProfile.cs index 162e284be6..05f94a2063 100644 --- a/Emby.Dlna/Profiles/MarantzProfile.cs +++ b/Emby.Dlna/Profiles/MarantzProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/MediaMonkeyProfile.cs b/Emby.Dlna/Profiles/MediaMonkeyProfile.cs index 53cae4e2ff..10218fa563 100644 --- a/Emby.Dlna/Profiles/MediaMonkeyProfile.cs +++ b/Emby.Dlna/Profiles/MediaMonkeyProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/PanasonicVieraProfile.cs b/Emby.Dlna/Profiles/PanasonicVieraProfile.cs index 5f31ec484e..945ec45187 100644 --- a/Emby.Dlna/Profiles/PanasonicVieraProfile.cs +++ b/Emby.Dlna/Profiles/PanasonicVieraProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/PopcornHourProfile.cs b/Emby.Dlna/Profiles/PopcornHourProfile.cs index aefe8c44f3..3765d01dc4 100644 --- a/Emby.Dlna/Profiles/PopcornHourProfile.cs +++ b/Emby.Dlna/Profiles/PopcornHourProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/SamsungSmartTvProfile.cs b/Emby.Dlna/Profiles/SamsungSmartTvProfile.cs index 51a1c81735..61c5f4dce9 100644 --- a/Emby.Dlna/Profiles/SamsungSmartTvProfile.cs +++ b/Emby.Dlna/Profiles/SamsungSmartTvProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/SharpSmartTvProfile.cs b/Emby.Dlna/Profiles/SharpSmartTvProfile.cs index f840cfb346..8967dc16a9 100644 --- a/Emby.Dlna/Profiles/SharpSmartTvProfile.cs +++ b/Emby.Dlna/Profiles/SharpSmartTvProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/SonyBlurayPlayer2013.cs b/Emby.Dlna/Profiles/SonyBlurayPlayer2013.cs index 2af1d3b501..308d74aa84 100644 --- a/Emby.Dlna/Profiles/SonyBlurayPlayer2013.cs +++ b/Emby.Dlna/Profiles/SonyBlurayPlayer2013.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/SonyBlurayPlayer2014.cs b/Emby.Dlna/Profiles/SonyBlurayPlayer2014.cs index 3de0b51922..496c243160 100644 --- a/Emby.Dlna/Profiles/SonyBlurayPlayer2014.cs +++ b/Emby.Dlna/Profiles/SonyBlurayPlayer2014.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/SonyBlurayPlayer2015.cs b/Emby.Dlna/Profiles/SonyBlurayPlayer2015.cs index 889484bea5..987a9af4b1 100644 --- a/Emby.Dlna/Profiles/SonyBlurayPlayer2015.cs +++ b/Emby.Dlna/Profiles/SonyBlurayPlayer2015.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/SonyBlurayPlayer2016.cs b/Emby.Dlna/Profiles/SonyBlurayPlayer2016.cs index acb90bd01b..560193dedd 100644 --- a/Emby.Dlna/Profiles/SonyBlurayPlayer2016.cs +++ b/Emby.Dlna/Profiles/SonyBlurayPlayer2016.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/SonyBlurayPlayerProfile.cs b/Emby.Dlna/Profiles/SonyBlurayPlayerProfile.cs index e1808b2052..c983d98baf 100644 --- a/Emby.Dlna/Profiles/SonyBlurayPlayerProfile.cs +++ b/Emby.Dlna/Profiles/SonyBlurayPlayerProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/SonyBravia2010Profile.cs b/Emby.Dlna/Profiles/SonyBravia2010Profile.cs index f8e8faa76d..186c894736 100644 --- a/Emby.Dlna/Profiles/SonyBravia2010Profile.cs +++ b/Emby.Dlna/Profiles/SonyBravia2010Profile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/SonyBravia2011Profile.cs b/Emby.Dlna/Profiles/SonyBravia2011Profile.cs index 111f36e9b5..a29d143f68 100644 --- a/Emby.Dlna/Profiles/SonyBravia2011Profile.cs +++ b/Emby.Dlna/Profiles/SonyBravia2011Profile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/SonyBravia2012Profile.cs b/Emby.Dlna/Profiles/SonyBravia2012Profile.cs index d5efe42707..9bcdd21b8f 100644 --- a/Emby.Dlna/Profiles/SonyBravia2012Profile.cs +++ b/Emby.Dlna/Profiles/SonyBravia2012Profile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/SonyBravia2013Profile.cs b/Emby.Dlna/Profiles/SonyBravia2013Profile.cs index 3b0228694b..900e4ff06e 100644 --- a/Emby.Dlna/Profiles/SonyBravia2013Profile.cs +++ b/Emby.Dlna/Profiles/SonyBravia2013Profile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/SonyBravia2014Profile.cs b/Emby.Dlna/Profiles/SonyBravia2014Profile.cs index e860eae346..963e7993e1 100644 --- a/Emby.Dlna/Profiles/SonyBravia2014Profile.cs +++ b/Emby.Dlna/Profiles/SonyBravia2014Profile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/SonyPs3Profile.cs b/Emby.Dlna/Profiles/SonyPs3Profile.cs index 88d0646955..31a764d8d3 100644 --- a/Emby.Dlna/Profiles/SonyPs3Profile.cs +++ b/Emby.Dlna/Profiles/SonyPs3Profile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/SonyPs4Profile.cs b/Emby.Dlna/Profiles/SonyPs4Profile.cs index 499cf88038..9376a564ba 100644 --- a/Emby.Dlna/Profiles/SonyPs4Profile.cs +++ b/Emby.Dlna/Profiles/SonyPs4Profile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/WdtvLiveProfile.cs b/Emby.Dlna/Profiles/WdtvLiveProfile.cs index bf7b1ab47e..8e056792a6 100644 --- a/Emby.Dlna/Profiles/WdtvLiveProfile.cs +++ b/Emby.Dlna/Profiles/WdtvLiveProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/XboxOneProfile.cs b/Emby.Dlna/Profiles/XboxOneProfile.cs index 710b891e3d..364c433549 100644 --- a/Emby.Dlna/Profiles/XboxOneProfile.cs +++ b/Emby.Dlna/Profiles/XboxOneProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Server/DescriptionXmlBuilder.cs b/Emby.Dlna/Server/DescriptionXmlBuilder.cs index 03d8f80abb..df48246377 100644 --- a/Emby.Dlna/Server/DescriptionXmlBuilder.cs +++ b/Emby.Dlna/Server/DescriptionXmlBuilder.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Globalization; diff --git a/Emby.Dlna/Service/BaseControlHandler.cs b/Emby.Dlna/Service/BaseControlHandler.cs index 49129f6ffd..0125c0528a 100644 --- a/Emby.Dlna/Service/BaseControlHandler.cs +++ b/Emby.Dlna/Service/BaseControlHandler.cs @@ -1,7 +1,9 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; @@ -66,8 +68,6 @@ namespace Emby.Dlna.Service Logger.LogDebug("Received control request {0}", requestInfo.LocalName); - var result = GetResult(requestInfo.LocalName, requestInfo.Headers); - var settings = new XmlWriterSettings { Encoding = Encoding.UTF8, @@ -85,12 +85,9 @@ namespace Emby.Dlna.Service writer.WriteStartElement("SOAP-ENV", "Body", NS_SOAPENV); writer.WriteStartElement("u", requestInfo.LocalName + "Response", requestInfo.NamespaceURI); - foreach (var i in result) - { - writer.WriteStartElement(i.Key); - writer.WriteString(i.Value); - writer.WriteFullEndElement(); - } + + WriteResult(requestInfo.LocalName, requestInfo.Headers, writer); + writer.WriteFullEndElement(); writer.WriteFullEndElement(); @@ -219,7 +216,7 @@ namespace Emby.Dlna.Service public Dictionary Headers { get; } = new Dictionary(StringComparer.OrdinalIgnoreCase); } - protected abstract IEnumerable> GetResult(string methodName, IDictionary methodParams); + protected abstract void WriteResult(string methodName, IDictionary methodParams, XmlWriter xmlWriter); private void LogRequest(ControlRequest request) { diff --git a/Emby.Dlna/Service/BaseService.cs b/Emby.Dlna/Service/BaseService.cs index 5359e94c44..d7e5c541d9 100644 --- a/Emby.Dlna/Service/BaseService.cs +++ b/Emby.Dlna/Service/BaseService.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using Emby.Dlna.Eventing; using MediaBrowser.Common.Net; using Microsoft.Extensions.Logging; diff --git a/Emby.Dlna/Service/ControlErrorHandler.cs b/Emby.Dlna/Service/ControlErrorHandler.cs index bbf975f384..a2f5057fb0 100644 --- a/Emby.Dlna/Service/ControlErrorHandler.cs +++ b/Emby.Dlna/Service/ControlErrorHandler.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.IO; using System.Text; diff --git a/Emby.Dlna/Service/ServiceXmlBuilder.cs b/Emby.Dlna/Service/ServiceXmlBuilder.cs index bd1f0bf05c..0787b8df94 100644 --- a/Emby.Dlna/Service/ServiceXmlBuilder.cs +++ b/Emby.Dlna/Service/ServiceXmlBuilder.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Collections.Generic; using System.Text; using Emby.Dlna.Common; diff --git a/Emby.Dlna/Ssdp/DeviceDiscovery.cs b/Emby.Dlna/Ssdp/DeviceDiscovery.cs index c5f3593da8..c5e57d0ff0 100644 --- a/Emby.Dlna/Ssdp/DeviceDiscovery.cs +++ b/Emby.Dlna/Ssdp/DeviceDiscovery.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Linq; @@ -9,16 +12,16 @@ using Rssdp.Infrastructure; namespace Emby.Dlna.Ssdp { - public class DeviceDiscovery : IDeviceDiscovery + public sealed class DeviceDiscovery : IDeviceDiscovery, IDisposable { - private bool _disposed; + private readonly object _syncLock = new object(); private readonly IServerConfigurationManager _config; - private event EventHandler> DeviceDiscoveredInternal; - private int _listenerCount; - private object _syncLock = new object(); + private bool _disposed; + + private event EventHandler> DeviceDiscoveredInternal; /// public event EventHandler> DeviceDiscovered @@ -33,6 +36,7 @@ namespace Emby.Dlna.Ssdp StartInternal(); } + remove { lock (_syncLock) @@ -130,6 +134,7 @@ namespace Emby.Dlna.Ssdp DeviceLeft?.Invoke(this, args); } + /// public void Dispose() { if (!_disposed) diff --git a/Emby.Dlna/Ssdp/Extensions.cs b/Emby.Dlna/Ssdp/Extensions.cs index c680c123ed..836d4abfd2 100644 --- a/Emby.Dlna/Ssdp/Extensions.cs +++ b/Emby.Dlna/Ssdp/Extensions.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Xml.Linq; namespace Emby.Dlna.Ssdp From 3a338c1899c754610560d8760bbf8d960666d664 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Sun, 26 Jan 2020 17:37:47 +0100 Subject: [PATCH 03/44] Address comments --- Emby.Dlna/ContentDirectory/ControlHandler.cs | 23 +++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/Emby.Dlna/ContentDirectory/ControlHandler.cs b/Emby.Dlna/ContentDirectory/ControlHandler.cs index e5acb92db5..699fb33c6c 100644 --- a/Emby.Dlna/ContentDirectory/ControlHandler.cs +++ b/Emby.Dlna/ContentDirectory/ControlHandler.cs @@ -46,7 +46,6 @@ namespace Emby.Dlna.ContentDirectory private const string NS_UPNP = "urn:schemas-upnp-org:metadata-1-0/upnp/"; private readonly int _systemUpdateId; - private readonly CultureInfo _usCulture = new CultureInfo("en-US"); private readonly DidlBuilder _didlBuilder; @@ -157,7 +156,7 @@ namespace Emby.Dlna.ContentDirectory var item = serverItem.Item; - var newbookmark = int.Parse(sparams["PosSecond"], _usCulture); + var newbookmark = int.Parse(sparams["PosSecond"], CultureInfo.InvariantCulture); var userdata = _userDataManager.GetUserData(_user, item); @@ -317,9 +316,9 @@ namespace Emby.Dlna.ContentDirectory xmlWriter.WriteFullEndElement(); xmlWriter.WriteFullEndElement(); - xmlWriter.WriteElementString("NumberReturned", provided.ToString(_usCulture)); - xmlWriter.WriteElementString("TotalMatches", totalCount.ToString(_usCulture)); - xmlWriter.WriteElementString("UpdateID", _systemUpdateId.ToString(_usCulture)); + xmlWriter.WriteElementString("NumberReturned", provided.ToString(CultureInfo.InvariantCulture)); + xmlWriter.WriteElementString("TotalMatches", totalCount.ToString(CultureInfo.InvariantCulture)); + xmlWriter.WriteElementString("UpdateID", _systemUpdateId.ToString(CultureInfo.InvariantCulture)); } private void HandleXBrowseByLetter(XmlWriter xmlWriter, IDictionary sparams, string deviceId) @@ -388,20 +387,18 @@ namespace Emby.Dlna.ContentDirectory xmlWriter.WriteFullEndElement(); xmlWriter.WriteFullEndElement(); - xmlWriter.WriteElementString("NumberReturned", childrenResult.Items.Count.ToString(_usCulture)); - xmlWriter.WriteElementString("TotalMatches", childrenResult.TotalRecordCount.ToString(_usCulture)); - xmlWriter.WriteElementString("UpdateID", _systemUpdateId.ToString(_usCulture)); + xmlWriter.WriteElementString("NumberReturned", childrenResult.Items.Count.ToString(CultureInfo.InvariantCulture)); + xmlWriter.WriteElementString("TotalMatches", childrenResult.TotalRecordCount.ToString(CultureInfo.InvariantCulture)); + xmlWriter.WriteElementString("UpdateID", _systemUpdateId.ToString(CultureInfo.InvariantCulture)); } private QueryResult GetChildrenSorted(BaseItem item, User user, SearchCriteria search, SortCriteria sort, int? startIndex, int? limit) { var folder = (Folder)item; - var sortOrders = folder.IsPreSorted switch - { - true => Array.Empty<(string, SortOrder)>(), - false => new[] { (ItemSortBy.SortName, sort.SortOrder) } - }; + var sortOrders = folder.IsPreSorted + ? Array.Empty<(string, SortOrder)>() + : new[] { (ItemSortBy.SortName, sort.SortOrder) }; string[] mediaTypes = Array.Empty(); bool? isFolder = null; From bade35958aadd6992b276aca278459ef5562d4ae Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Sun, 26 Jan 2020 17:41:34 +0100 Subject: [PATCH 04/44] Fix --- Emby.Dlna/ConnectionManager/ControlHandler.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Emby.Dlna/ConnectionManager/ControlHandler.cs b/Emby.Dlna/ConnectionManager/ControlHandler.cs index 7e6c7eb228..b390515b87 100644 --- a/Emby.Dlna/ConnectionManager/ControlHandler.cs +++ b/Emby.Dlna/ConnectionManager/ControlHandler.cs @@ -28,6 +28,7 @@ namespace Emby.Dlna.ConnectionManager if (string.Equals(methodName, "GetProtocolInfo", StringComparison.OrdinalIgnoreCase)) { HandleGetProtocolInfo(xmlWriter); + return; } throw new ResourceNotFoundException("Unexpected control request name: " + methodName); From fc578de3b3370676090da5063faaf126ea50d2ec Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Mon, 27 Jan 2020 22:43:58 +0100 Subject: [PATCH 05/44] Try possible solutions --- Emby.Dlna/Didl/DidlBuilder.cs | 2 +- Emby.Dlna/Service/BaseControlHandler.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.cs index f2128d9c6d..338c69d8c2 100644 --- a/Emby.Dlna/Didl/DidlBuilder.cs +++ b/Emby.Dlna/Didl/DidlBuilder.cs @@ -882,7 +882,7 @@ namespace Emby.Dlna.Didl var albumartUrlInfo = GetImageUrl(imageInfo, _profile.MaxAlbumArtWidth, _profile.MaxAlbumArtHeight, "jpg"); - writer.WriteStartElement("upnp", "albumArtURI", NS_UPNP); + writer.WriteStartElement("albumArtURI", NS_UPNP); writer.WriteAttributeString("dlna", "profileID", NS_DLNA, _profile.AlbumArtPn); writer.WriteString(albumartUrlInfo.Url); writer.WriteFullEndElement(); diff --git a/Emby.Dlna/Service/BaseControlHandler.cs b/Emby.Dlna/Service/BaseControlHandler.cs index 0125c0528a..2dc25f6bb5 100644 --- a/Emby.Dlna/Service/BaseControlHandler.cs +++ b/Emby.Dlna/Service/BaseControlHandler.cs @@ -71,7 +71,8 @@ namespace Emby.Dlna.Service var settings = new XmlWriterSettings { Encoding = Encoding.UTF8, - CloseOutput = false + CloseOutput = false, + NamespaceHandling = NamespaceHandling.OmitDuplicates }; StringWriter builder = new StringWriterWithEncoding(Encoding.UTF8); From 6b68521bae63ecd2c8dd3d5a912b70756c1c5e49 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Mon, 27 Jan 2020 23:34:40 +0100 Subject: [PATCH 06/44] Try again --- Emby.Dlna/ContentDirectory/ControlHandler.cs | 2 +- Emby.Dlna/Didl/DidlBuilder.cs | 4 ++-- Emby.Dlna/Service/BaseControlHandler.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Emby.Dlna/ContentDirectory/ControlHandler.cs b/Emby.Dlna/ContentDirectory/ControlHandler.cs index 699fb33c6c..bb42b93dcd 100644 --- a/Emby.Dlna/ContentDirectory/ControlHandler.cs +++ b/Emby.Dlna/ContentDirectory/ControlHandler.cs @@ -268,7 +268,7 @@ namespace Emby.Dlna.ContentDirectory var item = serverItem.Item; int totalCount; - if (string.Equals(flag, "BrowseMetadata")) + if (string.Equals(flag, "BrowseMetadata", StringComparison.Ordinal)) { totalCount = 1; diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.cs index 338c69d8c2..145639ab0e 100644 --- a/Emby.Dlna/Didl/DidlBuilder.cs +++ b/Emby.Dlna/Didl/DidlBuilder.cs @@ -634,7 +634,7 @@ namespace Emby.Dlna.Didl { if (item.PremiereDate.HasValue) { - AddValue(writer, "dc", "date", item.PremiereDate.Value.ToString("o"), NS_DC); + AddValue(writer, "dc", "date", item.PremiereDate.Value.ToString("o", CultureInfo.InvariantCulture), NS_DC); } } @@ -882,7 +882,7 @@ namespace Emby.Dlna.Didl var albumartUrlInfo = GetImageUrl(imageInfo, _profile.MaxAlbumArtWidth, _profile.MaxAlbumArtHeight, "jpg"); - writer.WriteStartElement("albumArtURI", NS_UPNP); + writer.WriteStartElement("upnp", "albumArtURI", NS_UPNP); writer.WriteAttributeString("dlna", "profileID", NS_DLNA, _profile.AlbumArtPn); writer.WriteString(albumartUrlInfo.Url); writer.WriteFullEndElement(); diff --git a/Emby.Dlna/Service/BaseControlHandler.cs b/Emby.Dlna/Service/BaseControlHandler.cs index 2dc25f6bb5..97e63167d8 100644 --- a/Emby.Dlna/Service/BaseControlHandler.cs +++ b/Emby.Dlna/Service/BaseControlHandler.cs @@ -72,7 +72,7 @@ namespace Emby.Dlna.Service { Encoding = Encoding.UTF8, CloseOutput = false, - NamespaceHandling = NamespaceHandling.OmitDuplicates + ConformanceLevel = ConformanceLevel.Fragment }; StringWriter builder = new StringWriterWithEncoding(Encoding.UTF8); @@ -96,7 +96,7 @@ namespace Emby.Dlna.Service writer.WriteEndDocument(); } - var xml = builder.ToString().Replace("xmlns:m=", "xmlns:u="); + var xml = builder.ToString().Replace("xmlns:m=", "xmlns:u=", StringComparison.Ordinal); var controlResponse = new ControlResponse { From 36d62c30930fa5b536fa5c7d1f4c85243a4b3fea Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Tue, 28 Jan 2020 13:19:25 +0100 Subject: [PATCH 07/44] Fix? --- Emby.Dlna/ContentDirectory/ControlHandler.cs | 161 +++++++++++-------- 1 file changed, 93 insertions(+), 68 deletions(-) diff --git a/Emby.Dlna/ContentDirectory/ControlHandler.cs b/Emby.Dlna/ContentDirectory/ControlHandler.cs index bb42b93dcd..2efa53d49b 100644 --- a/Emby.Dlna/ContentDirectory/ControlHandler.cs +++ b/Emby.Dlna/ContentDirectory/ControlHandler.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Globalization; +using System.IO; using System.Linq; using System.Text; using System.Threading; @@ -253,68 +254,80 @@ namespace Emby.Dlna.ContentDirectory start = startVal; } - xmlWriter.WriteStartElement("Result"); - - xmlWriter.WriteStartElement(string.Empty, "DIDL-Lite", NS_DIDL); - - xmlWriter.WriteAttributeString("xmlns", "dc", null, NS_DC); - xmlWriter.WriteAttributeString("xmlns", "dlna", null, NS_DLNA); - xmlWriter.WriteAttributeString("xmlns", "upnp", null, NS_UPNP); - //didl.SetAttribute("xmlns:sec", NS_SEC); - - DidlBuilder.WriteXmlRootAttributes(_profile, xmlWriter); + int totalCount; - var serverItem = GetItemFromObjectId(id, _user); - var item = serverItem.Item; + var settings = new XmlWriterSettings() + { + Encoding = Encoding.UTF8, + CloseOutput = false, + OmitXmlDeclaration = true, + ConformanceLevel = ConformanceLevel.Fragment + }; - int totalCount; - if (string.Equals(flag, "BrowseMetadata", StringComparison.Ordinal)) + using (StringWriter builder = new StringWriterWithEncoding(Encoding.UTF8)) + using (var writer = XmlWriter.Create(builder, settings)) { - totalCount = 1; + writer.WriteStartElement(string.Empty, "DIDL-Lite", NS_DIDL); - if (item.IsDisplayedAsFolder || serverItem.StubType.HasValue) - { - var childrenResult = GetUserItems(item, serverItem.StubType, _user, sortCriteria, start, requestedCount); + writer.WriteAttributeString("xmlns", "dc", null, NS_DC); + writer.WriteAttributeString("xmlns", "dlna", null, NS_DLNA); + writer.WriteAttributeString("xmlns", "upnp", null, NS_UPNP); - _didlBuilder.WriteFolderElement(xmlWriter, item, serverItem.StubType, null, childrenResult.TotalRecordCount, filter, id); - } - else - { - var dlnaOptions = _config.GetDlnaConfiguration(); - _didlBuilder.WriteItemElement(dlnaOptions, xmlWriter, item, _user, null, null, deviceId, filter); - } + DidlBuilder.WriteXmlRootAttributes(_profile, writer); - provided++; - } - else - { - var childrenResult = GetUserItems(item, serverItem.StubType, _user, sortCriteria, start, requestedCount); - totalCount = childrenResult.TotalRecordCount; + var serverItem = GetItemFromObjectId(id, _user); + var item = serverItem.Item; - provided = childrenResult.Items.Count; - var dlnaOptions = _config.GetDlnaConfiguration(); - foreach (var i in childrenResult.Items) + if (string.Equals(flag, "BrowseMetadata", StringComparison.Ordinal)) { - var childItem = i.Item; - var displayStubType = i.StubType; + totalCount = 1; - if (childItem.IsDisplayedAsFolder || displayStubType.HasValue) + if (item.IsDisplayedAsFolder || serverItem.StubType.HasValue) { - var childCount = GetUserItems(childItem, displayStubType, _user, sortCriteria, null, 0) - .TotalRecordCount; + var childrenResult = GetUserItems(item, serverItem.StubType, _user, sortCriteria, start, requestedCount); - _didlBuilder.WriteFolderElement(xmlWriter, childItem, displayStubType, item, childCount, filter); + _didlBuilder.WriteFolderElement(writer, item, serverItem.StubType, null, childrenResult.TotalRecordCount, filter, id); } else { - _didlBuilder.WriteItemElement(dlnaOptions, xmlWriter, childItem, _user, item, serverItem.StubType, deviceId, filter); + var dlnaOptions = _config.GetDlnaConfiguration(); + _didlBuilder.WriteItemElement(dlnaOptions, writer, item, _user, null, null, deviceId, filter); } + + provided++; } - } + else + { + var childrenResult = GetUserItems(item, serverItem.StubType, _user, sortCriteria, start, requestedCount); + totalCount = childrenResult.TotalRecordCount; - xmlWriter.WriteFullEndElement(); - xmlWriter.WriteFullEndElement(); + provided = childrenResult.Items.Count; + + var dlnaOptions = _config.GetDlnaConfiguration(); + foreach (var i in childrenResult.Items) + { + var childItem = i.Item; + var displayStubType = i.StubType; + + if (childItem.IsDisplayedAsFolder || displayStubType.HasValue) + { + var childCount = GetUserItems(childItem, displayStubType, _user, sortCriteria, null, 0) + .TotalRecordCount; + + _didlBuilder.WriteFolderElement(writer, childItem, displayStubType, item, childCount, filter); + } + else + { + _didlBuilder.WriteItemElement(dlnaOptions, writer, childItem, _user, item, serverItem.StubType, deviceId, filter); + } + } + } + + writer.WriteFullEndElement(); + + xmlWriter.WriteElementString("Result", builder.ToString()); + } xmlWriter.WriteElementString("NumberReturned", provided.ToString(CultureInfo.InvariantCulture)); xmlWriter.WriteElementString("TotalMatches", totalCount.ToString(CultureInfo.InvariantCulture)); @@ -350,42 +363,54 @@ namespace Emby.Dlna.ContentDirectory start = startVal; } - xmlWriter.WriteStartElement("Result"); + QueryResult childrenResult; - xmlWriter.WriteStartElement(string.Empty, "DIDL-Lite", NS_DIDL); + var settings = new XmlWriterSettings() + { + Encoding = Encoding.UTF8, + CloseOutput = false, + OmitXmlDeclaration = true, + ConformanceLevel = ConformanceLevel.Fragment + }; - xmlWriter.WriteAttributeString("xmlns", "dc", null, NS_DC); - xmlWriter.WriteAttributeString("xmlns", "dlna", null, NS_DLNA); - xmlWriter.WriteAttributeString("xmlns", "upnp", null, NS_UPNP); - //didl.SetAttribute("xmlns:sec", NS_SEC); + using (StringWriter builder = new StringWriterWithEncoding(Encoding.UTF8)) + using (var writer = XmlWriter.Create(builder, settings)) + { + writer.WriteStartElement(string.Empty, "DIDL-Lite", NS_DIDL); - DidlBuilder.WriteXmlRootAttributes(_profile, xmlWriter); + writer.WriteAttributeString("xmlns", "dc", null, NS_DC); + writer.WriteAttributeString("xmlns", "dlna", null, NS_DLNA); + writer.WriteAttributeString("xmlns", "upnp", null, NS_UPNP); - var serverItem = GetItemFromObjectId(sparams["ContainerID"], _user); + DidlBuilder.WriteXmlRootAttributes(_profile, writer); - var item = serverItem.Item; + var serverItem = GetItemFromObjectId(sparams["ContainerID"], _user); - var childrenResult = GetChildrenSorted(item, _user, searchCriteria, sortCriteria, start, requestedCount); + var item = serverItem.Item; - var dlnaOptions = _config.GetDlnaConfiguration(); + childrenResult = GetChildrenSorted(item, _user, searchCriteria, sortCriteria, start, requestedCount); - foreach (var i in childrenResult.Items) - { - if (i.IsDisplayedAsFolder) - { - var childCount = GetChildrenSorted(i, _user, searchCriteria, sortCriteria, null, 0) - .TotalRecordCount; + var dlnaOptions = _config.GetDlnaConfiguration(); - _didlBuilder.WriteFolderElement(xmlWriter, i, null, item, childCount, filter); - } - else + foreach (var i in childrenResult.Items) { - _didlBuilder.WriteItemElement(dlnaOptions, xmlWriter, i, _user, item, serverItem.StubType, deviceId, filter); + if (i.IsDisplayedAsFolder) + { + var childCount = GetChildrenSorted(i, _user, searchCriteria, sortCriteria, null, 0) + .TotalRecordCount; + + _didlBuilder.WriteFolderElement(writer, i, null, item, childCount, filter); + } + else + { + _didlBuilder.WriteItemElement(dlnaOptions, writer, i, _user, item, serverItem.StubType, deviceId, filter); + } } - } - xmlWriter.WriteFullEndElement(); - xmlWriter.WriteFullEndElement(); + writer.WriteFullEndElement(); + + xmlWriter.WriteElementString("Result", builder.ToString()); + } xmlWriter.WriteElementString("NumberReturned", childrenResult.Items.Count.ToString(CultureInfo.InvariantCulture)); xmlWriter.WriteElementString("TotalMatches", childrenResult.TotalRecordCount.ToString(CultureInfo.InvariantCulture)); From ae9c1e29e7ef8e2498bd8185f591ef589526105e Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Tue, 28 Jan 2020 17:50:25 +0100 Subject: [PATCH 08/44] My bad --- Emby.Dlna/Service/BaseControlHandler.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Emby.Dlna/Service/BaseControlHandler.cs b/Emby.Dlna/Service/BaseControlHandler.cs index 97e63167d8..4704ecbe69 100644 --- a/Emby.Dlna/Service/BaseControlHandler.cs +++ b/Emby.Dlna/Service/BaseControlHandler.cs @@ -71,8 +71,7 @@ namespace Emby.Dlna.Service var settings = new XmlWriterSettings { Encoding = Encoding.UTF8, - CloseOutput = false, - ConformanceLevel = ConformanceLevel.Fragment + CloseOutput = false }; StringWriter builder = new StringWriterWithEncoding(Encoding.UTF8); From 6ee04855cd112255d4b73b24cb5511a41c1db1f9 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Tue, 28 Jan 2020 21:54:51 +0100 Subject: [PATCH 09/44] Style --- Emby.Dlna/ContentDirectory/ControlHandler.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Emby.Dlna/ContentDirectory/ControlHandler.cs b/Emby.Dlna/ContentDirectory/ControlHandler.cs index 2efa53d49b..2590a92a70 100644 --- a/Emby.Dlna/ContentDirectory/ControlHandler.cs +++ b/Emby.Dlna/ContentDirectory/ControlHandler.cs @@ -60,7 +60,8 @@ namespace Emby.Dlna.ContentDirectory string accessToken, IImageProcessor imageProcessor, IUserDataManager userDataManager, - User user, int systemUpdateId, + User user, + int systemUpdateId, IServerConfigurationManager config, ILocalizationManager localization, IMediaSourceManager mediaSourceManager, From d69870680b9a12118b2e5b5e9944c91b886a12c9 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Wed, 29 Jan 2020 17:30:27 +0100 Subject: [PATCH 10/44] Close xmlwriter first --- Emby.Dlna/ContentDirectory/ControlHandler.cs | 164 ++++++++++--------- 1 file changed, 84 insertions(+), 80 deletions(-) diff --git a/Emby.Dlna/ContentDirectory/ControlHandler.cs b/Emby.Dlna/ContentDirectory/ControlHandler.cs index 2590a92a70..1278b367c7 100644 --- a/Emby.Dlna/ContentDirectory/ControlHandler.cs +++ b/Emby.Dlna/ContentDirectory/ControlHandler.cs @@ -257,75 +257,77 @@ namespace Emby.Dlna.ContentDirectory int totalCount; - var settings = new XmlWriterSettings() - { - Encoding = Encoding.UTF8, - CloseOutput = false, - OmitXmlDeclaration = true, - ConformanceLevel = ConformanceLevel.Fragment - }; - using (StringWriter builder = new StringWriterWithEncoding(Encoding.UTF8)) - using (var writer = XmlWriter.Create(builder, settings)) { - writer.WriteStartElement(string.Empty, "DIDL-Lite", NS_DIDL); - - writer.WriteAttributeString("xmlns", "dc", null, NS_DC); - writer.WriteAttributeString("xmlns", "dlna", null, NS_DLNA); - writer.WriteAttributeString("xmlns", "upnp", null, NS_UPNP); - - DidlBuilder.WriteXmlRootAttributes(_profile, writer); - - var serverItem = GetItemFromObjectId(id, _user); - var item = serverItem.Item; - + var settings = new XmlWriterSettings() + { + Encoding = Encoding.UTF8, + CloseOutput = false, + OmitXmlDeclaration = true, + ConformanceLevel = ConformanceLevel.Fragment + }; - if (string.Equals(flag, "BrowseMetadata", StringComparison.Ordinal)) + using (var writer = XmlWriter.Create(builder, settings)) { - totalCount = 1; + writer.WriteStartElement(string.Empty, "DIDL-Lite", NS_DIDL); - if (item.IsDisplayedAsFolder || serverItem.StubType.HasValue) - { - var childrenResult = GetUserItems(item, serverItem.StubType, _user, sortCriteria, start, requestedCount); + writer.WriteAttributeString("xmlns", "dc", null, NS_DC); + writer.WriteAttributeString("xmlns", "dlna", null, NS_DLNA); + writer.WriteAttributeString("xmlns", "upnp", null, NS_UPNP); - _didlBuilder.WriteFolderElement(writer, item, serverItem.StubType, null, childrenResult.TotalRecordCount, filter, id); - } - else - { - var dlnaOptions = _config.GetDlnaConfiguration(); - _didlBuilder.WriteItemElement(dlnaOptions, writer, item, _user, null, null, deviceId, filter); - } + DidlBuilder.WriteXmlRootAttributes(_profile, writer); - provided++; - } - else - { - var childrenResult = GetUserItems(item, serverItem.StubType, _user, sortCriteria, start, requestedCount); - totalCount = childrenResult.TotalRecordCount; + var serverItem = GetItemFromObjectId(id, _user); + var item = serverItem.Item; - provided = childrenResult.Items.Count; - var dlnaOptions = _config.GetDlnaConfiguration(); - foreach (var i in childrenResult.Items) + if (string.Equals(flag, "BrowseMetadata", StringComparison.Ordinal)) { - var childItem = i.Item; - var displayStubType = i.StubType; + totalCount = 1; - if (childItem.IsDisplayedAsFolder || displayStubType.HasValue) + if (item.IsDisplayedAsFolder || serverItem.StubType.HasValue) { - var childCount = GetUserItems(childItem, displayStubType, _user, sortCriteria, null, 0) - .TotalRecordCount; + var childrenResult = GetUserItems(item, serverItem.StubType, _user, sortCriteria, start, requestedCount); - _didlBuilder.WriteFolderElement(writer, childItem, displayStubType, item, childCount, filter); + _didlBuilder.WriteFolderElement(writer, item, serverItem.StubType, null, childrenResult.TotalRecordCount, filter, id); } else { - _didlBuilder.WriteItemElement(dlnaOptions, writer, childItem, _user, item, serverItem.StubType, deviceId, filter); + var dlnaOptions = _config.GetDlnaConfiguration(); + _didlBuilder.WriteItemElement(dlnaOptions, writer, item, _user, null, null, deviceId, filter); } + + provided++; } - } + else + { + var childrenResult = GetUserItems(item, serverItem.StubType, _user, sortCriteria, start, requestedCount); + totalCount = childrenResult.TotalRecordCount; + + provided = childrenResult.Items.Count; - writer.WriteFullEndElement(); + var dlnaOptions = _config.GetDlnaConfiguration(); + foreach (var i in childrenResult.Items) + { + var childItem = i.Item; + var displayStubType = i.StubType; + + if (childItem.IsDisplayedAsFolder || displayStubType.HasValue) + { + var childCount = GetUserItems(childItem, displayStubType, _user, sortCriteria, null, 0) + .TotalRecordCount; + + _didlBuilder.WriteFolderElement(writer, childItem, displayStubType, item, childCount, filter); + } + else + { + _didlBuilder.WriteItemElement(dlnaOptions, writer, childItem, _user, item, serverItem.StubType, deviceId, filter); + } + } + } + + writer.WriteFullEndElement(); + } xmlWriter.WriteElementString("Result", builder.ToString()); } @@ -366,49 +368,51 @@ namespace Emby.Dlna.ContentDirectory QueryResult childrenResult; - var settings = new XmlWriterSettings() - { - Encoding = Encoding.UTF8, - CloseOutput = false, - OmitXmlDeclaration = true, - ConformanceLevel = ConformanceLevel.Fragment - }; - using (StringWriter builder = new StringWriterWithEncoding(Encoding.UTF8)) - using (var writer = XmlWriter.Create(builder, settings)) { - writer.WriteStartElement(string.Empty, "DIDL-Lite", NS_DIDL); + var settings = new XmlWriterSettings() + { + Encoding = Encoding.UTF8, + CloseOutput = false, + OmitXmlDeclaration = true, + ConformanceLevel = ConformanceLevel.Fragment + }; - writer.WriteAttributeString("xmlns", "dc", null, NS_DC); - writer.WriteAttributeString("xmlns", "dlna", null, NS_DLNA); - writer.WriteAttributeString("xmlns", "upnp", null, NS_UPNP); + using (var writer = XmlWriter.Create(builder, settings)) + { + writer.WriteStartElement(string.Empty, "DIDL-Lite", NS_DIDL); - DidlBuilder.WriteXmlRootAttributes(_profile, writer); + writer.WriteAttributeString("xmlns", "dc", null, NS_DC); + writer.WriteAttributeString("xmlns", "dlna", null, NS_DLNA); + writer.WriteAttributeString("xmlns", "upnp", null, NS_UPNP); - var serverItem = GetItemFromObjectId(sparams["ContainerID"], _user); + DidlBuilder.WriteXmlRootAttributes(_profile, writer); - var item = serverItem.Item; + var serverItem = GetItemFromObjectId(sparams["ContainerID"], _user); - childrenResult = GetChildrenSorted(item, _user, searchCriteria, sortCriteria, start, requestedCount); + var item = serverItem.Item; - var dlnaOptions = _config.GetDlnaConfiguration(); + childrenResult = GetChildrenSorted(item, _user, searchCriteria, sortCriteria, start, requestedCount); - foreach (var i in childrenResult.Items) - { - if (i.IsDisplayedAsFolder) - { - var childCount = GetChildrenSorted(i, _user, searchCriteria, sortCriteria, null, 0) - .TotalRecordCount; + var dlnaOptions = _config.GetDlnaConfiguration(); - _didlBuilder.WriteFolderElement(writer, i, null, item, childCount, filter); - } - else + foreach (var i in childrenResult.Items) { - _didlBuilder.WriteItemElement(dlnaOptions, writer, i, _user, item, serverItem.StubType, deviceId, filter); + if (i.IsDisplayedAsFolder) + { + var childCount = GetChildrenSorted(i, _user, searchCriteria, sortCriteria, null, 0) + .TotalRecordCount; + + _didlBuilder.WriteFolderElement(writer, i, null, item, childCount, filter); + } + else + { + _didlBuilder.WriteItemElement(dlnaOptions, writer, i, _user, item, serverItem.StubType, deviceId, filter); + } } - } - writer.WriteFullEndElement(); + writer.WriteFullEndElement(); + } xmlWriter.WriteElementString("Result", builder.ToString()); } From 71abf1d3ce915289cf952a6d581a50d83fa9b259 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Fri, 31 Jan 2020 22:46:10 +0100 Subject: [PATCH 11/44] Enable TreatWarningsAsErrors and Nullable for test projects --- MediaBrowser.Controller/Net/IAuthService.cs | 4 +++- .../Auth/CustomAuthenticationHandlerTests.cs | 2 +- .../Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj | 2 ++ .../Jellyfin.Common.Tests.csproj | 2 ++ .../EncoderValidatorTests.cs | 16 ++++++++-------- .../Jellyfin.MediaEncoding.Tests.csproj | 2 ++ .../Jellyfin.Naming.Tests.csproj | 2 ++ .../Jellyfin.Server.Implementations.Tests.csproj | 2 ++ 8 files changed, 22 insertions(+), 10 deletions(-) diff --git a/MediaBrowser.Controller/Net/IAuthService.cs b/MediaBrowser.Controller/Net/IAuthService.cs index 4c9120e0c9..9132404a08 100644 --- a/MediaBrowser.Controller/Net/IAuthService.cs +++ b/MediaBrowser.Controller/Net/IAuthService.cs @@ -1,3 +1,5 @@ +#nullable enable + using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Services; using Microsoft.AspNetCore.Http; @@ -7,6 +9,6 @@ namespace MediaBrowser.Controller.Net public interface IAuthService { void Authenticate(IRequest request, IAuthenticationAttributes authAttribtues); - User Authenticate(HttpRequest request, IAuthenticationAttributes authAttribtues); + User? Authenticate(HttpRequest request, IAuthenticationAttributes authAttribtues); } } diff --git a/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs b/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs index a2f5c25016..3b3d03c8b7 100644 --- a/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs +++ b/tests/Jellyfin.Api.Tests/Auth/CustomAuthenticationHandlerTests.cs @@ -83,7 +83,7 @@ namespace Jellyfin.Api.Tests.Auth a => a.Authenticate( It.IsAny(), It.IsAny())) - .Returns((User)null); + .Returns((User?)null); var authenticateResult = await _sut.AuthenticateAsync(); diff --git a/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj b/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj index 0e8ef135ef..1d7e4f7af3 100644 --- a/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj +++ b/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj @@ -3,6 +3,8 @@ netcoreapp3.1 false + true + enable diff --git a/tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj b/tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj index da5e6576d3..86bb11bd4c 100644 --- a/tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj +++ b/tests/Jellyfin.Common.Tests/Jellyfin.Common.Tests.csproj @@ -3,6 +3,8 @@ netcoreapp3.1 false + true + enable diff --git a/tests/Jellyfin.MediaEncoding.Tests/EncoderValidatorTests.cs b/tests/Jellyfin.MediaEncoding.Tests/EncoderValidatorTests.cs index a7848316e7..e0f1f236c7 100644 --- a/tests/Jellyfin.MediaEncoding.Tests/EncoderValidatorTests.cs +++ b/tests/Jellyfin.MediaEncoding.Tests/EncoderValidatorTests.cs @@ -9,15 +9,15 @@ namespace Jellyfin.MediaEncoding.Tests { public class EncoderValidatorTests { - private class GetFFmpegVersionTestData : IEnumerable + private class GetFFmpegVersionTestData : IEnumerable { - public IEnumerator GetEnumerator() + public IEnumerator GetEnumerator() { - yield return new object[] { EncoderValidatorTestsData.FFmpegV421Output, new Version(4, 2, 1) }; - yield return new object[] { EncoderValidatorTestsData.FFmpegV42Output, new Version(4, 2) }; - yield return new object[] { EncoderValidatorTestsData.FFmpegV414Output, new Version(4, 1, 4) }; - yield return new object[] { EncoderValidatorTestsData.FFmpegV404Output, new Version(4, 0, 4) }; - yield return new object[] { EncoderValidatorTestsData.FFmpegGitUnknownOutput, null }; + yield return new object?[] { EncoderValidatorTestsData.FFmpegV421Output, new Version(4, 2, 1) }; + yield return new object?[] { EncoderValidatorTestsData.FFmpegV42Output, new Version(4, 2) }; + yield return new object?[] { EncoderValidatorTestsData.FFmpegV414Output, new Version(4, 1, 4) }; + yield return new object?[] { EncoderValidatorTestsData.FFmpegV404Output, new Version(4, 0, 4) }; + yield return new object?[] { EncoderValidatorTestsData.FFmpegGitUnknownOutput, null }; } IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); @@ -25,7 +25,7 @@ namespace Jellyfin.MediaEncoding.Tests [Theory] [ClassData(typeof(GetFFmpegVersionTestData))] - public void GetFFmpegVersionTest(string versionOutput, Version version) + public void GetFFmpegVersionTest(string versionOutput, Version? version) { Assert.Equal(version, EncoderValidator.GetFFmpegVersion(versionOutput)); } diff --git a/tests/Jellyfin.MediaEncoding.Tests/Jellyfin.MediaEncoding.Tests.csproj b/tests/Jellyfin.MediaEncoding.Tests/Jellyfin.MediaEncoding.Tests.csproj index c01edd9fed..b5e4a1287b 100644 --- a/tests/Jellyfin.MediaEncoding.Tests/Jellyfin.MediaEncoding.Tests.csproj +++ b/tests/Jellyfin.MediaEncoding.Tests/Jellyfin.MediaEncoding.Tests.csproj @@ -3,6 +3,8 @@ netcoreapp3.1 false + true + enable diff --git a/tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj b/tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj index f246d459ba..ebc1a54590 100644 --- a/tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj +++ b/tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj @@ -3,6 +3,8 @@ netcoreapp3.1 false + + enable diff --git a/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj b/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj index c554bc9372..29733a1c47 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj +++ b/tests/Jellyfin.Server.Implementations.Tests/Jellyfin.Server.Implementations.Tests.csproj @@ -3,6 +3,8 @@ netcoreapp3.1 false + true + enable Jellyfin.Server.Implementations.Tests From 6341d986a95be928a85ecd81c08fefdc5c3ec3b6 Mon Sep 17 00:00:00 2001 From: dkanada Date: Sun, 2 Feb 2020 00:07:46 +0900 Subject: [PATCH 12/44] fix a few warnings --- .../Session/SessionManager.cs | 30 +++++++++---------- MediaBrowser.Api/Session/SessionsService.cs | 10 ++----- .../UserLibrary/PlaystateService.cs | 4 --- MediaBrowser.Api/UserService.cs | 2 +- .../Session/SessionInfo.cs | 7 ----- 5 files changed, 19 insertions(+), 34 deletions(-) diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index b1d513dd4f..ec3e875732 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -67,15 +67,15 @@ namespace Emby.Server.Implementations.Session public event EventHandler> AuthenticationSucceeded; /// - /// Occurs when [playback start]. + /// Occurs when playback has started. /// public event EventHandler PlaybackStart; /// - /// Occurs when [playback progress]. + /// Occurs when playback has progressed. /// public event EventHandler PlaybackProgress; /// - /// Occurs when [playback stopped]. + /// Occurs when playback has stopped. /// public event EventHandler PlaybackStopped; @@ -685,7 +685,7 @@ namespace Emby.Server.Implementations.Session } /// - /// Used to report playback progress for an item + /// Used to report playback progress for an item. /// /// Task. public async Task OnPlaybackProgress(PlaybackProgressInfo info, bool isAutomated) @@ -1435,14 +1435,13 @@ namespace Emby.Server.Implementations.Session DeviceId = deviceId, UserId = user.Id, Limit = 1 - }).Items.FirstOrDefault(); - var allExistingForDevice = _authRepo.Get(new AuthenticationInfoQuery - { - DeviceId = deviceId - - }).Items; + var allExistingForDevice = _authRepo.Get( + new AuthenticationInfoQuery + { + DeviceId = deviceId + }).Items; foreach (var auth in allExistingForDevice) { @@ -1499,8 +1498,7 @@ namespace Emby.Server.Implementations.Session { Limit = 1, AccessToken = accessToken - - }).Items.FirstOrDefault(); + }).Items[0]; if (existing != null) { @@ -1708,7 +1706,8 @@ namespace Emby.Server.Implementations.Session public void ReportTranscodingInfo(string deviceId, TranscodingInfo info) { - var session = Sessions.FirstOrDefault(i => string.Equals(i.DeviceId, deviceId)); + var session = Sessions.FirstOrDefault(i => + string.Equals(i.DeviceId, deviceId, StringComparison.OrdinalIgnoreCase)); if (session != null) { @@ -1723,8 +1722,9 @@ namespace Emby.Server.Implementations.Session public SessionInfo GetSession(string deviceId, string client, string version) { - return Sessions.FirstOrDefault(i => string.Equals(i.DeviceId, deviceId) && - string.Equals(i.Client, client)); + return Sessions.FirstOrDefault(i => + string.Equals(i.DeviceId, deviceId, StringComparison.OrdinalIgnoreCase) + && string.Equals(i.Client, client, StringComparison.OrdinalIgnoreCase)); } public SessionInfo GetSessionByAuthenticationToken(AuthenticationInfo info, string deviceId, string remoteEndpoint, string appVersion) diff --git a/MediaBrowser.Api/Session/SessionsService.cs b/MediaBrowser.Api/Session/SessionsService.cs index 700861c554..8e53490ffc 100644 --- a/MediaBrowser.Api/Session/SessionsService.cs +++ b/MediaBrowser.Api/Session/SessionsService.cs @@ -276,7 +276,7 @@ namespace MediaBrowser.Api.Session public class SessionsService : BaseApiService { /// - /// The _session manager. + /// The session manager. /// private readonly ISessionManager _sessionManager; @@ -438,14 +438,12 @@ namespace MediaBrowser.Api.Session public Task Post(SendSystemCommand request) { var name = request.Command; - if (Enum.TryParse(name, true, out GeneralCommandType commandType)) { name = commandType.ToString(); } var currentSession = GetSession(_sessionContext); - var command = new GeneralCommand { Name = name, @@ -518,16 +516,13 @@ namespace MediaBrowser.Api.Session { request.Id = GetSession(_sessionContext).Id; } + _sessionManager.ReportCapabilities(request.Id, new ClientCapabilities { PlayableMediaTypes = SplitValue(request.PlayableMediaTypes, ','), - SupportedCommands = SplitValue(request.SupportedCommands, ','), - SupportsMediaControl = request.SupportsMediaControl, - SupportsSync = request.SupportsSync, - SupportsPersistentIdentifier = request.SupportsPersistentIdentifier }); } @@ -538,6 +533,7 @@ namespace MediaBrowser.Api.Session { request.Id = GetSession(_sessionContext).Id; } + _sessionManager.ReportCapabilities(request.Id, request); } } diff --git a/MediaBrowser.Api/UserLibrary/PlaystateService.cs b/MediaBrowser.Api/UserLibrary/PlaystateService.cs index 9d1cf5d9ee..d0faca163b 100644 --- a/MediaBrowser.Api/UserLibrary/PlaystateService.cs +++ b/MediaBrowser.Api/UserLibrary/PlaystateService.cs @@ -103,10 +103,6 @@ namespace MediaBrowser.Api.UserLibrary [ApiMember(Name = "MediaSourceId", Description = "The id of the MediaSource", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")] public string MediaSourceId { get; set; } - /// - /// Gets or sets a value indicating whether this is likes. - /// - /// true if likes; otherwise, false. [ApiMember(Name = "CanSeek", Description = "Indicates if the client can seek", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "POST")] public bool CanSeek { get; set; } diff --git a/MediaBrowser.Api/UserService.cs b/MediaBrowser.Api/UserService.cs index e1b01b012c..3b82dd9dd8 100644 --- a/MediaBrowser.Api/UserService.cs +++ b/MediaBrowser.Api/UserService.cs @@ -240,7 +240,7 @@ namespace MediaBrowser.Api public class UserService : BaseApiService { /// - /// The _user manager + /// The user manager. /// private readonly IUserManager _userManager; private readonly ISessionManager _sessionMananger; diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs index acda6a4166..964fc9b191 100644 --- a/MediaBrowser.Controller/Session/SessionInfo.cs +++ b/MediaBrowser.Controller/Session/SessionInfo.cs @@ -1,6 +1,5 @@ using System; using System.Linq; -using System.Text.Json.Serialization; using System.Threading; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Dto; @@ -123,7 +122,6 @@ namespace MediaBrowser.Controller.Session /// Gets or sets the session controller. /// /// The session controller. - [JsonIgnore] public ISessionController[] SessionControllers { get; set; } /// @@ -245,11 +243,6 @@ namespace MediaBrowser.Controller.Session SessionControllers = controllers.ToArray(); } - public bool ContainsUser(string userId) - { - return ContainsUser(new Guid(userId)); - } - public bool ContainsUser(Guid userId) { if (UserId.Equals(userId)) From 26dd67a441d251bef56c14d8058e7068e38e06af Mon Sep 17 00:00:00 2001 From: dkanada Date: Sun, 2 Feb 2020 00:09:18 +0900 Subject: [PATCH 13/44] change authentication flow --- .../Session/SessionManager.cs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index ec3e875732..659483a361 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -1379,20 +1379,16 @@ namespace Emby.Server.Implementations.Session user = _userManager.GetUserByName(request.Username); } - if (user != null) + if (user == null) { - // TODO: Move this to userManager? - if (!string.IsNullOrEmpty(request.DeviceId) - && !_deviceManager.CanAccessDevice(user, request.DeviceId)) - { - throw new SecurityException("User is not allowed access from this device."); - } + AuthenticationFailed?.Invoke(this, new GenericEventArgs(request)); + throw new SecurityException("Invalid username or password entered."); } - if (user == null) + if (!string.IsNullOrEmpty(request.DeviceId) + && !_deviceManager.CanAccessDevice(user, request.DeviceId)) { - AuthenticationFailed?.Invoke(this, new GenericEventArgs(request)); - throw new SecurityException("Invalid user or password entered."); + throw new SecurityException("User is not allowed access from this device."); } if (enforcePassword) From 1bc8ca25421dd3b66a58e1ff0938ee7874d8448e Mon Sep 17 00:00:00 2001 From: dkanada Date: Sun, 2 Feb 2020 00:16:11 +0900 Subject: [PATCH 14/44] add session view endpoint --- .../Session/SessionManager.cs | 10 +++++----- MediaBrowser.Api/Session/SessionsService.cs | 18 ++++++++++++++++++ MediaBrowser.Controller/Session/SessionInfo.cs | 2 ++ 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index 659483a361..8e52f24159 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -1686,18 +1686,18 @@ namespace Emby.Server.Implementations.Session throw new ArgumentNullException(nameof(itemId)); } - //var item = _libraryManager.GetItemById(new Guid(itemId)); + var item = _libraryManager.GetItemById(new Guid(itemId)); - //var info = GetItemInfo(item, null, null); + var info = GetItemInfo(item, null); - //ReportNowViewingItem(sessionId, info); + ReportNowViewingItem(sessionId, info); } public void ReportNowViewingItem(string sessionId, BaseItemDto item) { - //var session = GetSession(sessionId); + var session = GetSession(sessionId); - //session.NowViewingItem = item; + session.NowViewingItem = item; } public void ReportTranscodingInfo(string deviceId, TranscodingInfo info) diff --git a/MediaBrowser.Api/Session/SessionsService.cs b/MediaBrowser.Api/Session/SessionsService.cs index 8e53490ffc..df816927a5 100644 --- a/MediaBrowser.Api/Session/SessionsService.cs +++ b/MediaBrowser.Api/Session/SessionsService.cs @@ -230,6 +230,17 @@ namespace MediaBrowser.Api.Session public string Id { get; set; } } + [Route("/Sessions/Viewing", "POST", Summary = "Reports that a session is viewing an item")] + [Authenticated] + public class ReportViewing : IReturnVoid + { + [ApiMember(Name = "SessionId", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")] + public string SessionId { get; set; } + + [ApiMember(Name = "ItemId", Description = "Item Id", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")] + public string ItemId { get; set; } + } + [Route("/Sessions/Logout", "POST", Summary = "Reports that a session has ended")] [Authenticated] public class ReportSessionEnded : IReturnVoid @@ -536,5 +547,12 @@ namespace MediaBrowser.Api.Session _sessionManager.ReportCapabilities(request.Id, request); } + + public void Post(ReportViewing request) + { + request.SessionId = GetSession(_sessionContext).Id; + + _sessionManager.ReportNowViewingItem(request.SessionId, request.ItemId); + } } } diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs index 964fc9b191..7bc50eb413 100644 --- a/MediaBrowser.Controller/Session/SessionInfo.cs +++ b/MediaBrowser.Controller/Session/SessionInfo.cs @@ -106,6 +106,8 @@ namespace MediaBrowser.Controller.Session public BaseItem FullNowPlayingItem { get; set; } + public BaseItemDto NowViewingItem { get; set; } + /// /// Gets or sets the device id. /// From f93edb7ade68588f4e2e7e05932b3266105ea91a Mon Sep 17 00:00:00 2001 From: dkanada Date: Tue, 4 Feb 2020 01:29:18 +0900 Subject: [PATCH 15/44] add code suggestions --- Emby.Server.Implementations/Session/SessionManager.cs | 2 +- MediaBrowser.Controller/Session/SessionInfo.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index 8e52f24159..4aed226deb 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -1494,7 +1494,7 @@ namespace Emby.Server.Implementations.Session { Limit = 1, AccessToken = accessToken - }).Items[0]; + }).Items.FirstOrDefault(); if (existing != null) { diff --git a/MediaBrowser.Controller/Session/SessionInfo.cs b/MediaBrowser.Controller/Session/SessionInfo.cs index 7bc50eb413..cc5160d779 100644 --- a/MediaBrowser.Controller/Session/SessionInfo.cs +++ b/MediaBrowser.Controller/Session/SessionInfo.cs @@ -1,5 +1,6 @@ using System; using System.Linq; +using System.Text.Json.Serialization; using System.Threading; using MediaBrowser.Controller.Entities; using MediaBrowser.Model.Dto; @@ -124,6 +125,7 @@ namespace MediaBrowser.Controller.Session /// Gets or sets the session controller. /// /// The session controller. + [JsonIgnore] public ISessionController[] SessionControllers { get; set; } /// From f47ad85011a1251c3fda8a213c0b96dcf46d5e05 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Tue, 4 Feb 2020 01:49:27 +0100 Subject: [PATCH 16/44] Fix warnings MediaBrowser.Model --- .../Activity/ActivityLogEntry.cs | 3 ++ .../Activity/IActivityManager.cs | 3 ++ .../Activity/IActivityRepository.cs | 3 ++ .../ApiClient/ServerDiscoveryInfo.cs | 6 ++++ .../Branding/BrandingOptions.cs | 4 +++ .../Channels/ChannelFeatures.cs | 3 ++ .../Channels/ChannelFolderType.cs | 3 ++ MediaBrowser.Model/Channels/ChannelInfo.cs | 3 ++ .../Channels/ChannelItemSortField.cs | 3 ++ .../Channels/ChannelMediaContentType.cs | 3 ++ .../Channels/ChannelMediaType.cs | 3 ++ MediaBrowser.Model/Channels/ChannelQuery.cs | 3 ++ .../Collections/CollectionCreationResult.cs | 3 ++ .../Configuration/AccessSchedule.cs | 5 +++ .../Configuration/DynamicDayOfWeek.cs | 3 ++ .../Configuration/EncodingOptions.cs | 9 +++-- .../Configuration/ImageOption.cs | 4 +++ .../Configuration/ImageSavingConvention.cs | 3 ++ .../Configuration/LibraryOptions.cs | 3 ++ .../Configuration/MetadataConfiguration.cs | 3 ++ .../Configuration/MetadataOptions.cs | 3 ++ .../Configuration/MetadataPlugin.cs | 3 ++ .../Configuration/MetadataPluginSummary.cs | 3 ++ .../Configuration/MetadataPluginType.cs | 3 ++ .../Configuration/ServerConfiguration.cs | 3 ++ .../Configuration/SubtitlePlaybackMode.cs | 3 ++ .../Configuration/UnratedItem.cs | 3 ++ .../Configuration/UserConfiguration.cs | 3 ++ .../Configuration/XbmcMetadataOptions.cs | 3 ++ .../Cryptography/ICryptoProvider.cs | 3 ++ .../Devices/ContentUploadHistory.cs | 3 ++ MediaBrowser.Model/Devices/DeviceInfo.cs | 19 +++++++--- MediaBrowser.Model/Devices/DeviceQuery.cs | 4 +++ MediaBrowser.Model/Devices/DevicesOptions.cs | 3 ++ MediaBrowser.Model/Devices/LocalFileInfo.cs | 3 ++ MediaBrowser.Model/Diagnostics/IProcess.cs | 3 ++ .../Diagnostics/IProcessFactory.cs | 3 ++ MediaBrowser.Model/Dlna/AudioOptions.cs | 3 ++ MediaBrowser.Model/Dlna/CodecProfile.cs | 8 +++-- MediaBrowser.Model/Dlna/CodecType.cs | 3 ++ MediaBrowser.Model/Dlna/ConditionProcessor.cs | 3 ++ MediaBrowser.Model/Dlna/ContainerProfile.cs | 3 ++ .../Dlna/ContentFeatureBuilder.cs | 3 ++ .../Dlna/DeviceIdentification.cs | 16 ++++++++- MediaBrowser.Model/Dlna/DeviceProfile.cs | 3 ++ MediaBrowser.Model/Dlna/DeviceProfileInfo.cs | 3 ++ MediaBrowser.Model/Dlna/DeviceProfileType.cs | 3 ++ MediaBrowser.Model/Dlna/DirectPlayProfile.cs | 3 ++ MediaBrowser.Model/Dlna/DlnaFlags.cs | 3 ++ MediaBrowser.Model/Dlna/DlnaMaps.cs | 5 ++- MediaBrowser.Model/Dlna/DlnaProfileType.cs | 3 ++ MediaBrowser.Model/Dlna/EncodingContext.cs | 3 ++ MediaBrowser.Model/Dlna/HeaderMatchType.cs | 3 ++ MediaBrowser.Model/Dlna/HttpHeaderInfo.cs | 3 ++ MediaBrowser.Model/Dlna/IDeviceDiscovery.cs | 3 ++ MediaBrowser.Model/Dlna/ITranscoderSupport.cs | 3 ++ MediaBrowser.Model/Dlna/MediaFormatProfile.cs | 3 ++ .../Dlna/MediaFormatProfileResolver.cs | 4 ++- MediaBrowser.Model/Dlna/PlaybackErrorCode.cs | 3 ++ MediaBrowser.Model/Dlna/ProfileCondition.cs | 3 ++ .../Dlna/ProfileConditionType.cs | 3 ++ .../Dlna/ProfileConditionValue.cs | 3 ++ .../Dlna/ResolutionConfiguration.cs | 3 ++ .../Dlna/ResolutionNormalizer.cs | 3 ++ MediaBrowser.Model/Dlna/ResolutionOptions.cs | 3 ++ MediaBrowser.Model/Dlna/ResponseProfile.cs | 3 ++ MediaBrowser.Model/Dlna/SearchCriteria.cs | 3 ++ MediaBrowser.Model/Dlna/SearchType.cs | 3 ++ MediaBrowser.Model/Dlna/SortCriteria.cs | 3 ++ MediaBrowser.Model/Dlna/StreamBuilder.cs | 4 ++- MediaBrowser.Model/Dlna/StreamInfo.cs | 4 ++- .../Dlna/SubtitleDeliveryMethod.cs | 6 ++++ MediaBrowser.Model/Dlna/SubtitleProfile.cs | 3 ++ MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs | 3 ++ MediaBrowser.Model/Dlna/TranscodeSeekInfo.cs | 3 ++ MediaBrowser.Model/Dlna/TranscodingProfile.cs | 3 ++ MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs | 3 ++ MediaBrowser.Model/Dlna/VideoOptions.cs | 3 ++ MediaBrowser.Model/Dlna/XmlAttribute.cs | 3 ++ MediaBrowser.Model/Drawing/DrawingUtils.cs | 16 ++++----- MediaBrowser.Model/Drawing/ImageDimensions.cs | 5 ++- MediaBrowser.Model/Drawing/ImageFormat.cs | 16 +++++---- .../Drawing/ImageOrientation.cs | 3 ++ MediaBrowser.Model/Dto/BaseItemDto.cs | 3 ++ MediaBrowser.Model/Dto/BaseItemPerson.cs | 2 +- MediaBrowser.Model/Dto/IHasServerId.cs | 3 ++ MediaBrowser.Model/Dto/IItemDto.cs | 2 +- MediaBrowser.Model/Dto/ImageByNameInfo.cs | 6 ++++ MediaBrowser.Model/Dto/ImageInfo.cs | 2 +- MediaBrowser.Model/Dto/ImageOptions.cs | 2 +- MediaBrowser.Model/Dto/ItemCounts.cs | 25 ++++++++++++- MediaBrowser.Model/Dto/ItemIndex.cs | 2 +- MediaBrowser.Model/Dto/MediaSourceInfo.cs | 3 ++ MediaBrowser.Model/Dto/MediaSourceType.cs | 3 ++ MediaBrowser.Model/Dto/MetadataEditorInfo.cs | 3 ++ MediaBrowser.Model/Dto/NameIdPair.cs | 4 +++ MediaBrowser.Model/Dto/NameValuePair.cs | 4 +++ MediaBrowser.Model/Dto/RatingType.cs | 3 ++ MediaBrowser.Model/Dto/RecommendationDto.cs | 3 ++ MediaBrowser.Model/Dto/RecommendationType.cs | 3 ++ MediaBrowser.Model/Dto/UserDto.cs | 6 +++- MediaBrowser.Model/Dto/UserItemDataDto.cs | 2 +- MediaBrowser.Model/Entities/ChapterInfo.cs | 5 ++- MediaBrowser.Model/Entities/CollectionType.cs | 3 ++ .../Entities/DisplayPreferences.cs | 17 +++++++-- .../Entities/EmptyRequestResult.cs | 6 ---- MediaBrowser.Model/Entities/ExtraType.cs | 3 ++ .../Entities/IHasProviderIds.cs | 2 +- MediaBrowser.Model/Entities/ImageType.cs | 36 ++++++++++++------- MediaBrowser.Model/Entities/IsoType.cs | 7 ++-- .../Entities/LibraryUpdateInfo.cs | 3 ++ MediaBrowser.Model/Entities/LocationType.cs | 13 ++++--- .../Entities/MediaAttachment.cs | 2 +- MediaBrowser.Model/Entities/MediaStream.cs | 3 ++ .../Entities/MediaStreamType.cs | 13 ++++--- MediaBrowser.Model/Entities/MediaType.cs | 10 +++--- MediaBrowser.Model/Entities/MediaUrl.cs | 3 ++ MediaBrowser.Model/Entities/MetadataFields.cs | 28 +++++++++------ .../Entities/MetadataProviders.cs | 3 ++ .../Entities/PackageReviewInfo.cs | 3 ++ MediaBrowser.Model/Entities/ParentalRating.cs | 3 ++ MediaBrowser.Model/Entities/PersonType.cs | 25 ++++++++----- .../Entities/ProviderIdsExtensions.cs | 2 +- .../Entities/ScrollDirection.cs | 7 ++-- MediaBrowser.Model/Entities/SeriesStatus.cs | 7 ++-- MediaBrowser.Model/Entities/SortOrder.cs | 7 ++-- MediaBrowser.Model/Entities/TrailerType.cs | 3 ++ .../Entities/UserDataSaveReason.cs | 19 ++++++---- MediaBrowser.Model/Entities/Video3DFormat.cs | 3 ++ MediaBrowser.Model/Entities/VideoType.cs | 13 ++++--- .../Entities/VirtualFolderInfo.cs | 3 ++ MediaBrowser.Model/Events/GenericEventArgs.cs | 2 +- MediaBrowser.Model/Extensions/ListHelper.cs | 3 ++ .../Globalization/CountryInfo.cs | 2 +- .../Globalization/CultureDto.cs | 7 ++-- .../Globalization/ILocalizationManager.cs | 2 +- .../Globalization/LocalizationOption.cs | 3 ++ MediaBrowser.Model/IO/FileSystemEntryType.cs | 13 ++++--- MediaBrowser.Model/IO/FileSystemMetadata.cs | 10 ++++++ MediaBrowser.Model/IO/IFileSystem.cs | 5 ++- MediaBrowser.Model/IO/IIsoManager.cs | 3 ++ MediaBrowser.Model/IO/IIsoMount.cs | 2 +- MediaBrowser.Model/IO/IIsoMounter.cs | 3 ++ MediaBrowser.Model/IO/IShortcutHandler.cs | 5 +++ MediaBrowser.Model/IO/IStreamHelper.cs | 3 ++ MediaBrowser.Model/IO/IZipClient.cs | 3 ++ MediaBrowser.Model/Library/PlayAccess.cs | 3 ++ MediaBrowser.Model/Library/UserViewQuery.cs | 3 ++ MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs | 3 ++ MediaBrowser.Model/LiveTv/ChannelType.cs | 4 +-- MediaBrowser.Model/LiveTv/DayPattern.cs | 3 ++ MediaBrowser.Model/LiveTv/GuideInfo.cs | 3 ++ .../LiveTv/LiveTvChannelQuery.cs | 3 ++ MediaBrowser.Model/LiveTv/LiveTvInfo.cs | 3 ++ MediaBrowser.Model/LiveTv/LiveTvOptions.cs | 3 ++ .../LiveTv/LiveTvServiceInfo.cs | 6 +++- .../LiveTv/LiveTvServiceStatus.cs | 3 ++ .../LiveTv/LiveTvTunerStatus.cs | 3 ++ MediaBrowser.Model/LiveTv/ProgramAudio.cs | 3 ++ MediaBrowser.Model/LiveTv/RecordingQuery.cs | 3 ++ MediaBrowser.Model/LiveTv/RecordingStatus.cs | 3 ++ .../LiveTv/SeriesTimerInfoDto.cs | 3 ++ MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs | 3 ++ MediaBrowser.Model/LiveTv/TimerInfoDto.cs | 3 ++ MediaBrowser.Model/LiveTv/TimerQuery.cs | 3 ++ MediaBrowser.Model/MediaBrowser.Model.csproj | 13 +++++++ MediaBrowser.Model/MediaInfo/AudioCodec.cs | 5 ++- .../MediaInfo/BlurayDiscInfo.cs | 5 ++- MediaBrowser.Model/MediaInfo/Container.cs | 8 ----- .../MediaInfo/IBlurayExaminer.cs | 2 +- .../MediaInfo/LiveStreamRequest.cs | 3 ++ .../MediaInfo/LiveStreamResponse.cs | 3 ++ MediaBrowser.Model/MediaInfo/MediaInfo.cs | 9 +++++ MediaBrowser.Model/MediaInfo/MediaProtocol.cs | 3 ++ .../MediaInfo/PlaybackInfoRequest.cs | 3 ++ .../MediaInfo/SubtitleFormat.cs | 5 ++- .../MediaInfo/SubtitleTrackEvent.cs | 3 ++ .../MediaInfo/SubtitleTrackInfo.cs | 3 ++ .../MediaInfo/TransportStreamTimestamp.cs | 3 ++ MediaBrowser.Model/MediaInfo/VideoCodec.cs | 14 -------- MediaBrowser.Model/Net/EndPointInfo.cs | 3 ++ MediaBrowser.Model/Net/HttpException.cs | 2 +- MediaBrowser.Model/Net/ISocket.cs | 3 ++ MediaBrowser.Model/Net/ISocketFactory.cs | 3 ++ MediaBrowser.Model/Net/MimeTypes.cs | 4 ++- MediaBrowser.Model/Net/NetworkShare.cs | 3 ++ MediaBrowser.Model/Net/NetworkShareType.cs | 16 +++++---- MediaBrowser.Model/Net/SocketReceiveResult.cs | 3 ++ MediaBrowser.Model/Net/WebSocketMessage.cs | 6 +++- .../Notifications/NotificationLevel.cs | 3 ++ .../Notifications/NotificationOption.cs | 3 ++ .../Notifications/NotificationOptions.cs | 3 ++ .../Notifications/NotificationRequest.cs | 3 ++ .../Notifications/NotificationType.cs | 3 ++ .../Notifications/NotificationTypeInfo.cs | 3 ++ .../Notifications/SendToUserType.cs | 3 ++ .../Playlists/PlaylistCreationRequest.cs | 3 ++ .../Playlists/PlaylistCreationResult.cs | 3 ++ .../Playlists/PlaylistItemQuery.cs | 3 ++ MediaBrowser.Model/Plugins/IHasWebPages.cs | 3 ++ MediaBrowser.Model/Plugins/PluginPageInfo.cs | 3 ++ .../Providers/ExternalIdInfo.cs | 3 ++ MediaBrowser.Model/Providers/ExternalUrl.cs | 3 ++ .../Providers/ImageProviderInfo.cs | 6 +++- .../Providers/RemoteImageInfo.cs | 4 +-- .../Providers/RemoteImageQuery.cs | 3 ++ .../Providers/RemoteSearchResult.cs | 3 ++ .../Providers/RemoteSubtitleInfo.cs | 3 ++ .../Providers/SubtitleOptions.cs | 3 ++ .../Providers/SubtitleProviderInfo.cs | 3 ++ .../Querying/AllThemeMediaResult.cs | 3 ++ MediaBrowser.Model/Querying/EpisodeQuery.cs | 16 ++++++++- .../Querying/ItemCountsQuery.cs | 2 +- MediaBrowser.Model/Querying/ItemFields.cs | 5 ++- MediaBrowser.Model/Querying/ItemFilter.cs | 28 +++++++++------ MediaBrowser.Model/Querying/ItemSortBy.cs | 3 ++ .../Querying/LatestItemsQuery.cs | 3 ++ .../Querying/MovieRecommendationQuery.cs | 11 +++++- MediaBrowser.Model/Querying/NextUpQuery.cs | 8 ++++- MediaBrowser.Model/Querying/QueryFilters.cs | 3 ++ MediaBrowser.Model/Querying/QueryResult.cs | 3 ++ MediaBrowser.Model/Querying/SessionQuery.cs | 13 ------- .../Querying/SimilarItemsQuery.cs | 29 --------------- .../Querying/UpcomingEpisodesQuery.cs | 3 ++ MediaBrowser.Model/Querying/UserQuery.cs | 8 ----- MediaBrowser.Model/Search/SearchHint.cs | 5 ++- MediaBrowser.Model/Search/SearchHintResult.cs | 2 +- MediaBrowser.Model/Search/SearchQuery.cs | 3 ++ .../Serialization/IJsonSerializer.cs | 3 ++ .../Serialization/IXmlSerializer.cs | 3 ++ .../Services/ApiMemberAttribute.cs | 3 ++ .../Services/IAsyncStreamWriter.cs | 3 ++ MediaBrowser.Model/Services/IHasHeaders.cs | 3 ++ .../Services/IHasRequestFilter.cs | 3 ++ MediaBrowser.Model/Services/IHttpRequest.cs | 3 ++ MediaBrowser.Model/Services/IHttpResult.cs | 3 ++ MediaBrowser.Model/Services/IRequest.cs | 3 ++ .../Services/IRequiresRequestStream.cs | 3 ++ MediaBrowser.Model/Services/IService.cs | 3 ++ MediaBrowser.Model/Services/IStreamWriter.cs | 3 ++ .../Services/QueryParamCollection.cs | 3 ++ MediaBrowser.Model/Services/RouteAttribute.cs | 3 ++ MediaBrowser.Model/Session/BrowseRequest.cs | 4 +-- .../Session/ClientCapabilities.cs | 3 ++ MediaBrowser.Model/Session/GeneralCommand.cs | 3 ++ .../Session/GeneralCommandType.cs | 3 ++ MediaBrowser.Model/Session/MessageCommand.cs | 3 ++ MediaBrowser.Model/Session/PlayCommand.cs | 16 +++++---- MediaBrowser.Model/Session/PlayMethod.cs | 3 ++ MediaBrowser.Model/Session/PlayRequest.cs | 3 ++ .../Session/PlaybackProgressInfo.cs | 3 ++ .../Session/PlaybackStopInfo.cs | 10 ++++++ MediaBrowser.Model/Session/PlayerStateInfo.cs | 3 ++ .../Session/PlaystateCommand.cs | 28 ++++++++++----- .../Session/PlaystateRequest.cs | 3 ++ MediaBrowser.Model/Session/TranscodingInfo.cs | 3 ++ .../Session/UserDataChangeInfo.cs | 2 +- MediaBrowser.Model/Sync/SyncCategory.cs | 3 ++ MediaBrowser.Model/Sync/SyncJob.cs | 21 +++++++++++ MediaBrowser.Model/Sync/SyncJobStatus.cs | 3 ++ MediaBrowser.Model/Sync/SyncTarget.cs | 4 +++ MediaBrowser.Model/System/LogFile.cs | 3 ++ .../System/OperatingSystemId.cs | 3 ++ MediaBrowser.Model/System/PublicSystemInfo.cs | 3 ++ MediaBrowser.Model/System/SystemInfo.cs | 3 ++ .../Tasks/IConfigurableScheduledTask.cs | 3 ++ MediaBrowser.Model/Tasks/IScheduledTask.cs | 3 ++ .../Tasks/IScheduledTaskWorker.cs | 2 +- MediaBrowser.Model/Tasks/ITaskManager.cs | 3 ++ MediaBrowser.Model/Tasks/ITaskTrigger.cs | 8 ++--- .../Tasks/ScheduledTaskHelpers.cs | 2 +- .../Tasks/TaskCompletionEventArgs.cs | 3 ++ .../Tasks/TaskCompletionStatus.cs | 10 +++--- MediaBrowser.Model/Tasks/TaskInfo.cs | 6 ++-- MediaBrowser.Model/Tasks/TaskOptions.cs | 3 ++ MediaBrowser.Model/Tasks/TaskResult.cs | 2 +- MediaBrowser.Model/Tasks/TaskState.cs | 10 +++--- MediaBrowser.Model/Tasks/TaskTriggerInfo.cs | 5 ++- .../Updates/CheckForUpdateResult.cs | 2 +- .../Updates/InstallationInfo.cs | 2 +- MediaBrowser.Model/Updates/PackageInfo.cs | 4 +-- .../Updates/PackageTargetSystem.cs | 10 +++--- .../Updates/PackageVersionClass.cs | 10 +++--- .../Updates/PackageVersionInfo.cs | 5 ++- .../Users/ForgotPasswordAction.cs | 3 ++ .../Users/ForgotPasswordResult.cs | 5 +++ MediaBrowser.Model/Users/PinRedeemResult.cs | 4 +++ MediaBrowser.Model/Users/UserAction.cs | 3 ++ MediaBrowser.Model/Users/UserActionType.cs | 3 ++ MediaBrowser.Model/Users/UserPolicy.cs | 3 ++ 290 files changed, 1132 insertions(+), 290 deletions(-) delete mode 100644 MediaBrowser.Model/Entities/EmptyRequestResult.cs delete mode 100644 MediaBrowser.Model/MediaInfo/Container.cs delete mode 100644 MediaBrowser.Model/MediaInfo/VideoCodec.cs delete mode 100644 MediaBrowser.Model/Querying/SessionQuery.cs delete mode 100644 MediaBrowser.Model/Querying/SimilarItemsQuery.cs delete mode 100644 MediaBrowser.Model/Querying/UserQuery.cs diff --git a/MediaBrowser.Model/Activity/ActivityLogEntry.cs b/MediaBrowser.Model/Activity/ActivityLogEntry.cs index 186fd89ee0..48118b5a3f 100644 --- a/MediaBrowser.Model/Activity/ActivityLogEntry.cs +++ b/MediaBrowser.Model/Activity/ActivityLogEntry.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using Microsoft.Extensions.Logging; diff --git a/MediaBrowser.Model/Activity/IActivityManager.cs b/MediaBrowser.Model/Activity/IActivityManager.cs index 897d93d790..f3d3455173 100644 --- a/MediaBrowser.Model/Activity/IActivityManager.cs +++ b/MediaBrowser.Model/Activity/IActivityManager.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + 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 f0e3b902c4..2e45f56c96 100644 --- a/MediaBrowser.Model/Activity/IActivityRepository.cs +++ b/MediaBrowser.Model/Activity/IActivityRepository.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Querying; diff --git a/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs b/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs index d1f3577f73..6dfe8ea9bb 100644 --- a/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs +++ b/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.ApiClient { public class ServerDiscoveryInfo @@ -7,16 +10,19 @@ namespace MediaBrowser.Model.ApiClient /// /// The address. public string Address { get; set; } + /// /// Gets or sets the server identifier. /// /// The server identifier. public string Id { get; set; } + /// /// Gets or sets the name. /// /// The name. public string Name { get; set; } + /// /// Gets or sets the endpoint address. /// diff --git a/MediaBrowser.Model/Branding/BrandingOptions.cs b/MediaBrowser.Model/Branding/BrandingOptions.cs index f83558df59..f2e360cca9 100644 --- a/MediaBrowser.Model/Branding/BrandingOptions.cs +++ b/MediaBrowser.Model/Branding/BrandingOptions.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Branding { public class BrandingOptions @@ -7,6 +10,7 @@ namespace MediaBrowser.Model.Branding /// /// The login disclaimer. public string LoginDisclaimer { get; set; } + /// /// Gets or sets the custom CSS. /// diff --git a/MediaBrowser.Model/Channels/ChannelFeatures.cs b/MediaBrowser.Model/Channels/ChannelFeatures.cs index ee1d11bc05..8d4b18eaf2 100644 --- a/MediaBrowser.Model/Channels/ChannelFeatures.cs +++ b/MediaBrowser.Model/Channels/ChannelFeatures.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Channels diff --git a/MediaBrowser.Model/Channels/ChannelFolderType.cs b/MediaBrowser.Model/Channels/ChannelFolderType.cs index 6039eb9294..3411e727bb 100644 --- a/MediaBrowser.Model/Channels/ChannelFolderType.cs +++ b/MediaBrowser.Model/Channels/ChannelFolderType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Channels { public enum ChannelFolderType diff --git a/MediaBrowser.Model/Channels/ChannelInfo.cs b/MediaBrowser.Model/Channels/ChannelInfo.cs index 9b2d31bf35..2f1614b066 100644 --- a/MediaBrowser.Model/Channels/ChannelInfo.cs +++ b/MediaBrowser.Model/Channels/ChannelInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Channels { public class ChannelInfo diff --git a/MediaBrowser.Model/Channels/ChannelItemSortField.cs b/MediaBrowser.Model/Channels/ChannelItemSortField.cs index af75e3edd0..89d105e440 100644 --- a/MediaBrowser.Model/Channels/ChannelItemSortField.cs +++ b/MediaBrowser.Model/Channels/ChannelItemSortField.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Channels { public enum ChannelItemSortField diff --git a/MediaBrowser.Model/Channels/ChannelMediaContentType.cs b/MediaBrowser.Model/Channels/ChannelMediaContentType.cs index fc7c217069..b520734493 100644 --- a/MediaBrowser.Model/Channels/ChannelMediaContentType.cs +++ b/MediaBrowser.Model/Channels/ChannelMediaContentType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Channels { public enum ChannelMediaContentType diff --git a/MediaBrowser.Model/Channels/ChannelMediaType.cs b/MediaBrowser.Model/Channels/ChannelMediaType.cs index a3fa5cdf9b..16a28c8748 100644 --- a/MediaBrowser.Model/Channels/ChannelMediaType.cs +++ b/MediaBrowser.Model/Channels/ChannelMediaType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Channels { public enum ChannelMediaType diff --git a/MediaBrowser.Model/Channels/ChannelQuery.cs b/MediaBrowser.Model/Channels/ChannelQuery.cs index 32b368922d..542daa0d3e 100644 --- a/MediaBrowser.Model/Channels/ChannelQuery.cs +++ b/MediaBrowser.Model/Channels/ChannelQuery.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + 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 2691f7970d..119bfe7e49 100644 --- a/MediaBrowser.Model/Collections/CollectionCreationResult.cs +++ b/MediaBrowser.Model/Collections/CollectionCreationResult.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Collections diff --git a/MediaBrowser.Model/Configuration/AccessSchedule.cs b/MediaBrowser.Model/Configuration/AccessSchedule.cs index d34e273836..6003d74e11 100644 --- a/MediaBrowser.Model/Configuration/AccessSchedule.cs +++ b/MediaBrowser.Model/Configuration/AccessSchedule.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Configuration { public class AccessSchedule @@ -7,11 +10,13 @@ namespace MediaBrowser.Model.Configuration /// /// The day of week. public DynamicDayOfWeek DayOfWeek { get; set; } + /// /// Gets or sets the start hour. /// /// The start hour. public double StartHour { get; set; } + /// /// Gets or sets the end hour. /// diff --git a/MediaBrowser.Model/Configuration/DynamicDayOfWeek.cs b/MediaBrowser.Model/Configuration/DynamicDayOfWeek.cs index 73dda5a77a..38361cea78 100644 --- a/MediaBrowser.Model/Configuration/DynamicDayOfWeek.cs +++ b/MediaBrowser.Model/Configuration/DynamicDayOfWeek.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Configuration { public enum DynamicDayOfWeek diff --git a/MediaBrowser.Model/Configuration/EncodingOptions.cs b/MediaBrowser.Model/Configuration/EncodingOptions.cs index 9ae10d9809..ff431e44cc 100644 --- a/MediaBrowser.Model/Configuration/EncodingOptions.cs +++ b/MediaBrowser.Model/Configuration/EncodingOptions.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Configuration { public class EncodingOptions @@ -8,12 +11,14 @@ namespace MediaBrowser.Model.Configuration public bool EnableThrottling { get; set; } public int ThrottleDelaySeconds { get; set; } public string HardwareAccelerationType { get; set; } + /// - /// FFmpeg path as set by the user via the UI + /// FFmpeg path as set by the user via the UI. /// public string EncoderAppPath { get; set; } + /// - /// The current FFmpeg path being used by the system and displayed on the transcode page + /// The current FFmpeg path being used by the system and displayed on the transcode page. /// public string EncoderAppPathDisplay { get; set; } public string VaapiDevice { get; set; } diff --git a/MediaBrowser.Model/Configuration/ImageOption.cs b/MediaBrowser.Model/Configuration/ImageOption.cs index 3b985bb1bc..44e4e369c2 100644 --- a/MediaBrowser.Model/Configuration/ImageOption.cs +++ b/MediaBrowser.Model/Configuration/ImageOption.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Configuration @@ -9,6 +12,7 @@ namespace MediaBrowser.Model.Configuration /// /// The type. public ImageType Type { get; set; } + /// /// Gets or sets the limit. /// diff --git a/MediaBrowser.Model/Configuration/ImageSavingConvention.cs b/MediaBrowser.Model/Configuration/ImageSavingConvention.cs index 7206fa5fc4..9aa72212e9 100644 --- a/MediaBrowser.Model/Configuration/ImageSavingConvention.cs +++ b/MediaBrowser.Model/Configuration/ImageSavingConvention.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Configuration { public enum ImageSavingConvention diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs index ba33bee87c..3c99f9bb5c 100644 --- a/MediaBrowser.Model/Configuration/LibraryOptions.cs +++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + 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 87e02d0549..b24cae8c4a 100644 --- a/MediaBrowser.Model/Configuration/MetadataConfiguration.cs +++ b/MediaBrowser.Model/Configuration/MetadataConfiguration.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Configuration { public class MetadataConfiguration diff --git a/MediaBrowser.Model/Configuration/MetadataOptions.cs b/MediaBrowser.Model/Configuration/MetadataOptions.cs index c095b8cdd1..d52bb4a440 100644 --- a/MediaBrowser.Model/Configuration/MetadataOptions.cs +++ b/MediaBrowser.Model/Configuration/MetadataOptions.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Configuration diff --git a/MediaBrowser.Model/Configuration/MetadataPlugin.cs b/MediaBrowser.Model/Configuration/MetadataPlugin.cs index d6f863e553..fa88d4508f 100644 --- a/MediaBrowser.Model/Configuration/MetadataPlugin.cs +++ b/MediaBrowser.Model/Configuration/MetadataPlugin.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Configuration { public class MetadataPlugin diff --git a/MediaBrowser.Model/Configuration/MetadataPluginSummary.cs b/MediaBrowser.Model/Configuration/MetadataPluginSummary.cs index 0bd20f8379..b99d67f7f2 100644 --- a/MediaBrowser.Model/Configuration/MetadataPluginSummary.cs +++ b/MediaBrowser.Model/Configuration/MetadataPluginSummary.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Entities; diff --git a/MediaBrowser.Model/Configuration/MetadataPluginType.cs b/MediaBrowser.Model/Configuration/MetadataPluginType.cs index 985107ac90..46a74c94f0 100644 --- a/MediaBrowser.Model/Configuration/MetadataPluginType.cs +++ b/MediaBrowser.Model/Configuration/MetadataPluginType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Configuration { /// diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index 598ff3a808..f42aa2b447 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Dto; diff --git a/MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs b/MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs index fc429934fa..c117a918fc 100644 --- a/MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs +++ b/MediaBrowser.Model/Configuration/SubtitlePlaybackMode.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Configuration { public enum SubtitlePlaybackMode diff --git a/MediaBrowser.Model/Configuration/UnratedItem.cs b/MediaBrowser.Model/Configuration/UnratedItem.cs index 107b4e520b..b972ddf4a6 100644 --- a/MediaBrowser.Model/Configuration/UnratedItem.cs +++ b/MediaBrowser.Model/Configuration/UnratedItem.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Configuration { public enum UnratedItem diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs index 689459eba0..375c50de36 100644 --- a/MediaBrowser.Model/Configuration/UserConfiguration.cs +++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Configuration diff --git a/MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs b/MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs index 19e6be166f..7c7866c23c 100644 --- a/MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs +++ b/MediaBrowser.Model/Configuration/XbmcMetadataOptions.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Configuration { public class XbmcMetadataOptions diff --git a/MediaBrowser.Model/Cryptography/ICryptoProvider.cs b/MediaBrowser.Model/Cryptography/ICryptoProvider.cs index 2d75c9b3ec..e16e747c55 100644 --- a/MediaBrowser.Model/Cryptography/ICryptoProvider.cs +++ b/MediaBrowser.Model/Cryptography/ICryptoProvider.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Collections.Generic; namespace MediaBrowser.Model.Cryptography diff --git a/MediaBrowser.Model/Devices/ContentUploadHistory.cs b/MediaBrowser.Model/Devices/ContentUploadHistory.cs index 5dd9bf2d04..7b58eadf75 100644 --- a/MediaBrowser.Model/Devices/ContentUploadHistory.cs +++ b/MediaBrowser.Model/Devices/ContentUploadHistory.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Devices { public class ContentUploadHistory diff --git a/MediaBrowser.Model/Devices/DeviceInfo.cs b/MediaBrowser.Model/Devices/DeviceInfo.cs index 214c49e5e4..55149a02da 100644 --- a/MediaBrowser.Model/Devices/DeviceInfo.cs +++ b/MediaBrowser.Model/Devices/DeviceInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Session; @@ -5,6 +8,11 @@ namespace MediaBrowser.Model.Devices { public class DeviceInfo { + public DeviceInfo() + { + Capabilities = new ClientCapabilities(); + } + public string Name { get; set; } /// @@ -12,42 +20,43 @@ namespace MediaBrowser.Model.Devices /// /// The identifier. public string Id { get; set; } + /// /// Gets or sets the last name of the user. /// /// The last name of the user. public string LastUserName { get; set; } + /// /// Gets or sets the name of the application. /// /// The name of the application. public string AppName { get; set; } + /// /// Gets or sets the application version. /// /// The application version. public string AppVersion { get; set; } + /// /// Gets or sets the last user identifier. /// /// The last user identifier. public Guid LastUserId { get; set; } + /// /// Gets or sets the date last modified. /// /// The date last modified. public DateTime DateLastActivity { get; set; } + /// /// Gets or sets the capabilities. /// /// The capabilities. public ClientCapabilities Capabilities { get; set; } - public DeviceInfo() - { - Capabilities = new ClientCapabilities(); - } - public string IconUrl { get; set; } } } diff --git a/MediaBrowser.Model/Devices/DeviceQuery.cs b/MediaBrowser.Model/Devices/DeviceQuery.cs index 48d7ec142c..56b9c201ae 100644 --- a/MediaBrowser.Model/Devices/DeviceQuery.cs +++ b/MediaBrowser.Model/Devices/DeviceQuery.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Devices @@ -9,6 +12,7 @@ namespace MediaBrowser.Model.Devices /// /// null if [supports synchronize] contains no value, true if [supports synchronize]; otherwise, false. public bool? SupportsSync { get; set; } + /// /// Gets or sets the user identifier. /// diff --git a/MediaBrowser.Model/Devices/DevicesOptions.cs b/MediaBrowser.Model/Devices/DevicesOptions.cs index 5bbd33b73b..95bccd5597 100644 --- a/MediaBrowser.Model/Devices/DevicesOptions.cs +++ b/MediaBrowser.Model/Devices/DevicesOptions.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Devices diff --git a/MediaBrowser.Model/Devices/LocalFileInfo.cs b/MediaBrowser.Model/Devices/LocalFileInfo.cs index cc5c9250b5..7a8e31f418 100644 --- a/MediaBrowser.Model/Devices/LocalFileInfo.cs +++ b/MediaBrowser.Model/Devices/LocalFileInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Devices { public class LocalFileInfo diff --git a/MediaBrowser.Model/Diagnostics/IProcess.cs b/MediaBrowser.Model/Diagnostics/IProcess.cs index cade631c99..d86679876a 100644 --- a/MediaBrowser.Model/Diagnostics/IProcess.cs +++ b/MediaBrowser.Model/Diagnostics/IProcess.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.IO; using System.Threading.Tasks; diff --git a/MediaBrowser.Model/Diagnostics/IProcessFactory.cs b/MediaBrowser.Model/Diagnostics/IProcessFactory.cs index a11be8f4e7..8702060246 100644 --- a/MediaBrowser.Model/Diagnostics/IProcessFactory.cs +++ b/MediaBrowser.Model/Diagnostics/IProcessFactory.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Diagnostics { public interface IProcessFactory diff --git a/MediaBrowser.Model/Dlna/AudioOptions.cs b/MediaBrowser.Model/Dlna/AudioOptions.cs index 6dfe8093e5..903cb03375 100644 --- a/MediaBrowser.Model/Dlna/AudioOptions.cs +++ b/MediaBrowser.Model/Dlna/AudioOptions.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Dto; diff --git a/MediaBrowser.Model/Dlna/CodecProfile.cs b/MediaBrowser.Model/Dlna/CodecProfile.cs index 9ea248908b..2fda1a6003 100644 --- a/MediaBrowser.Model/Dlna/CodecProfile.cs +++ b/MediaBrowser.Model/Dlna/CodecProfile.cs @@ -1,3 +1,7 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + +using System; using System.Xml.Serialization; using MediaBrowser.Model.Extensions; @@ -20,8 +24,8 @@ namespace MediaBrowser.Model.Dlna public CodecProfile() { - Conditions = new ProfileCondition[] { }; - ApplyConditions = new ProfileCondition[] { }; + Conditions = Array.Empty(); + ApplyConditions = Array.Empty(); } public string[] GetCodecs() diff --git a/MediaBrowser.Model/Dlna/CodecType.cs b/MediaBrowser.Model/Dlna/CodecType.cs index d777be4c22..9ed01d842f 100644 --- a/MediaBrowser.Model/Dlna/CodecType.cs +++ b/MediaBrowser.Model/Dlna/CodecType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public enum CodecType diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.cs index caaceda1bc..d07b4022ab 100644 --- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs +++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Globalization; using MediaBrowser.Model.Extensions; diff --git a/MediaBrowser.Model/Dlna/ContainerProfile.cs b/MediaBrowser.Model/Dlna/ContainerProfile.cs index 073324c264..e53ebf6ea4 100644 --- a/MediaBrowser.Model/Dlna/ContainerProfile.cs +++ b/MediaBrowser.Model/Dlna/ContainerProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + 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 2333fa7a02..dd92381935 100644 --- a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs +++ b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Globalization; diff --git a/MediaBrowser.Model/Dlna/DeviceIdentification.cs b/MediaBrowser.Model/Dlna/DeviceIdentification.cs index 84573521aa..730c71511b 100644 --- a/MediaBrowser.Model/Dlna/DeviceIdentification.cs +++ b/MediaBrowser.Model/Dlna/DeviceIdentification.cs @@ -1,3 +1,8 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + +using System; + namespace MediaBrowser.Model.Dlna { public class DeviceIdentification @@ -7,46 +12,55 @@ namespace MediaBrowser.Model.Dlna /// /// The name of the friendly. public string FriendlyName { get; set; } + /// /// Gets or sets the model number. /// /// The model number. public string ModelNumber { get; set; } + /// /// Gets or sets the serial number. /// /// The serial number. public string SerialNumber { get; set; } + /// /// Gets or sets the name of the model. /// /// The name of the model. public string ModelName { get; set; } + /// /// Gets or sets the model description. /// /// The model description. public string ModelDescription { get; set; } + /// /// Gets or sets the device description. /// /// The device description. public string DeviceDescription { get; set; } + /// /// Gets or sets the model URL. /// /// The model URL. public string ModelUrl { get; set; } + /// /// Gets or sets the manufacturer. /// /// The manufacturer. public string Manufacturer { get; set; } + /// /// Gets or sets the manufacturer URL. /// /// The manufacturer URL. public string ManufacturerUrl { get; set; } + /// /// Gets or sets the headers. /// @@ -55,7 +69,7 @@ namespace MediaBrowser.Model.Dlna public DeviceIdentification() { - Headers = new HttpHeaderInfo[] { }; + Headers = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs index f152ee8808..32de5b0948 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfile.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Xml.Serialization; using MediaBrowser.Model.Extensions; diff --git a/MediaBrowser.Model/Dlna/DeviceProfileInfo.cs b/MediaBrowser.Model/Dlna/DeviceProfileInfo.cs index c78f0d9b2b..021d711601 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfileInfo.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfileInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public class DeviceProfileInfo diff --git a/MediaBrowser.Model/Dlna/DeviceProfileType.cs b/MediaBrowser.Model/Dlna/DeviceProfileType.cs index 2449fa434a..2d6221a9bf 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfileType.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfileType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public enum DeviceProfileType diff --git a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs index 5a54847d74..fc74c9afca 100644 --- a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs +++ b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna diff --git a/MediaBrowser.Model/Dlna/DlnaFlags.cs b/MediaBrowser.Model/Dlna/DlnaFlags.cs index d076e73ece..ada7826308 100644 --- a/MediaBrowser.Model/Dlna/DlnaFlags.cs +++ b/MediaBrowser.Model/Dlna/DlnaFlags.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Dlna diff --git a/MediaBrowser.Model/Dlna/DlnaMaps.cs b/MediaBrowser.Model/Dlna/DlnaMaps.cs index 880d057240..17d54e373f 100644 --- a/MediaBrowser.Model/Dlna/DlnaMaps.cs +++ b/MediaBrowser.Model/Dlna/DlnaMaps.cs @@ -1,6 +1,9 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { - public class DlnaMaps + public static class DlnaMaps { private static readonly string DefaultStreaming = FlagsToString(DlnaFlags.StreamingTransferMode | diff --git a/MediaBrowser.Model/Dlna/DlnaProfileType.cs b/MediaBrowser.Model/Dlna/DlnaProfileType.cs index 6a23bbb040..0431e4044c 100644 --- a/MediaBrowser.Model/Dlna/DlnaProfileType.cs +++ b/MediaBrowser.Model/Dlna/DlnaProfileType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public enum DlnaProfileType diff --git a/MediaBrowser.Model/Dlna/EncodingContext.cs b/MediaBrowser.Model/Dlna/EncodingContext.cs index 7352bdd19d..7f16b4ef7d 100644 --- a/MediaBrowser.Model/Dlna/EncodingContext.cs +++ b/MediaBrowser.Model/Dlna/EncodingContext.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public enum EncodingContext diff --git a/MediaBrowser.Model/Dlna/HeaderMatchType.cs b/MediaBrowser.Model/Dlna/HeaderMatchType.cs index b0a1438f6d..3ff42159cd 100644 --- a/MediaBrowser.Model/Dlna/HeaderMatchType.cs +++ b/MediaBrowser.Model/Dlna/HeaderMatchType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public enum HeaderMatchType diff --git a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs b/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs index d157275048..09aa9ef2d9 100644 --- a/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs +++ b/MediaBrowser.Model/Dlna/HttpHeaderInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna diff --git a/MediaBrowser.Model/Dlna/IDeviceDiscovery.cs b/MediaBrowser.Model/Dlna/IDeviceDiscovery.cs index 3de3fe761d..bf2fccbf12 100644 --- a/MediaBrowser.Model/Dlna/IDeviceDiscovery.cs +++ b/MediaBrowser.Model/Dlna/IDeviceDiscovery.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Events; diff --git a/MediaBrowser.Model/Dlna/ITranscoderSupport.cs b/MediaBrowser.Model/Dlna/ITranscoderSupport.cs index c0ff54c3fc..a5da21b944 100644 --- a/MediaBrowser.Model/Dlna/ITranscoderSupport.cs +++ b/MediaBrowser.Model/Dlna/ITranscoderSupport.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public interface ITranscoderSupport diff --git a/MediaBrowser.Model/Dlna/MediaFormatProfile.cs b/MediaBrowser.Model/Dlna/MediaFormatProfile.cs index 7c56fc5f45..aa8c53a813 100644 --- a/MediaBrowser.Model/Dlna/MediaFormatProfile.cs +++ b/MediaBrowser.Model/Dlna/MediaFormatProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public enum MediaFormatProfile diff --git a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs index 333cab60da..5e28c2e8a7 100644 --- a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs +++ b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs @@ -1,7 +1,9 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Linq; -using MediaBrowser.Model.Extensions; using MediaBrowser.Model.MediaInfo; namespace MediaBrowser.Model.Dlna diff --git a/MediaBrowser.Model/Dlna/PlaybackErrorCode.cs b/MediaBrowser.Model/Dlna/PlaybackErrorCode.cs index 5080bc2863..a006b1671d 100644 --- a/MediaBrowser.Model/Dlna/PlaybackErrorCode.cs +++ b/MediaBrowser.Model/Dlna/PlaybackErrorCode.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public enum PlaybackErrorCode diff --git a/MediaBrowser.Model/Dlna/ProfileCondition.cs b/MediaBrowser.Model/Dlna/ProfileCondition.cs index b83566f6e2..f167b9e5e2 100644 --- a/MediaBrowser.Model/Dlna/ProfileCondition.cs +++ b/MediaBrowser.Model/Dlna/ProfileCondition.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna diff --git a/MediaBrowser.Model/Dlna/ProfileConditionType.cs b/MediaBrowser.Model/Dlna/ProfileConditionType.cs index 2628412622..12434a7985 100644 --- a/MediaBrowser.Model/Dlna/ProfileConditionType.cs +++ b/MediaBrowser.Model/Dlna/ProfileConditionType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public enum ProfileConditionType diff --git a/MediaBrowser.Model/Dlna/ProfileConditionValue.cs b/MediaBrowser.Model/Dlna/ProfileConditionValue.cs index bae46bdcfc..ea30619a33 100644 --- a/MediaBrowser.Model/Dlna/ProfileConditionValue.cs +++ b/MediaBrowser.Model/Dlna/ProfileConditionValue.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public enum ProfileConditionValue diff --git a/MediaBrowser.Model/Dlna/ResolutionConfiguration.cs b/MediaBrowser.Model/Dlna/ResolutionConfiguration.cs index 6b1f854407..f2eb1f9f5c 100644 --- a/MediaBrowser.Model/Dlna/ResolutionConfiguration.cs +++ b/MediaBrowser.Model/Dlna/ResolutionConfiguration.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public class ResolutionConfiguration diff --git a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs index 8a00f4ae4f..26ca912efb 100644 --- a/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs +++ b/MediaBrowser.Model/Dlna/ResolutionNormalizer.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Extensions; diff --git a/MediaBrowser.Model/Dlna/ResolutionOptions.cs b/MediaBrowser.Model/Dlna/ResolutionOptions.cs index 30c078b55b..2b6f9f5682 100644 --- a/MediaBrowser.Model/Dlna/ResolutionOptions.cs +++ b/MediaBrowser.Model/Dlna/ResolutionOptions.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public class ResolutionOptions diff --git a/MediaBrowser.Model/Dlna/ResponseProfile.cs b/MediaBrowser.Model/Dlna/ResponseProfile.cs index 8c6b0806fd..f0d672a9de 100644 --- a/MediaBrowser.Model/Dlna/ResponseProfile.cs +++ b/MediaBrowser.Model/Dlna/ResponseProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna diff --git a/MediaBrowser.Model/Dlna/SearchCriteria.cs b/MediaBrowser.Model/Dlna/SearchCriteria.cs index 8919938814..c8ef34c1c2 100644 --- a/MediaBrowser.Model/Dlna/SearchCriteria.cs +++ b/MediaBrowser.Model/Dlna/SearchCriteria.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Text.RegularExpressions; using MediaBrowser.Model.Extensions; diff --git a/MediaBrowser.Model/Dlna/SearchType.cs b/MediaBrowser.Model/Dlna/SearchType.cs index 05c59f5de6..446a677ff4 100644 --- a/MediaBrowser.Model/Dlna/SearchType.cs +++ b/MediaBrowser.Model/Dlna/SearchType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public enum SearchType diff --git a/MediaBrowser.Model/Dlna/SortCriteria.cs b/MediaBrowser.Model/Dlna/SortCriteria.cs index b5c1ac408e..901cde8f33 100644 --- a/MediaBrowser.Model/Dlna/SortCriteria.cs +++ b/MediaBrowser.Model/Dlna/SortCriteria.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Dlna diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index e039ac5d6f..a1838acf35 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -1,10 +1,12 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + 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 MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.Session; using Microsoft.Extensions.Logging; diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs index 7962b51ce2..2699247d86 100644 --- a/MediaBrowser.Model/Dlna/StreamInfo.cs +++ b/MediaBrowser.Model/Dlna/StreamInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Globalization; @@ -5,7 +8,6 @@ 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; diff --git a/MediaBrowser.Model/Dlna/SubtitleDeliveryMethod.cs b/MediaBrowser.Model/Dlna/SubtitleDeliveryMethod.cs index 925c1f9fcb..cae9ca0195 100644 --- a/MediaBrowser.Model/Dlna/SubtitleDeliveryMethod.cs +++ b/MediaBrowser.Model/Dlna/SubtitleDeliveryMethod.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public enum SubtitleDeliveryMethod @@ -6,14 +9,17 @@ namespace MediaBrowser.Model.Dlna /// The encode /// Encode = 0, + /// /// The embed /// Embed = 1, + /// /// The external /// External = 2, + /// /// The HLS /// diff --git a/MediaBrowser.Model/Dlna/SubtitleProfile.cs b/MediaBrowser.Model/Dlna/SubtitleProfile.cs index f950b6cb82..cd2bcc0c76 100644 --- a/MediaBrowser.Model/Dlna/SubtitleProfile.cs +++ b/MediaBrowser.Model/Dlna/SubtitleProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Xml.Serialization; using MediaBrowser.Model.Extensions; diff --git a/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs b/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs index e81c26e69b..5c332ac264 100644 --- a/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs +++ b/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public class SubtitleStreamInfo diff --git a/MediaBrowser.Model/Dlna/TranscodeSeekInfo.cs b/MediaBrowser.Model/Dlna/TranscodeSeekInfo.cs index eac5d4b362..f0b294882e 100644 --- a/MediaBrowser.Model/Dlna/TranscodeSeekInfo.cs +++ b/MediaBrowser.Model/Dlna/TranscodeSeekInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { public enum TranscodeSeekInfo diff --git a/MediaBrowser.Model/Dlna/TranscodingProfile.cs b/MediaBrowser.Model/Dlna/TranscodingProfile.cs index dc2f0c90d2..de5633ae02 100644 --- a/MediaBrowser.Model/Dlna/TranscodingProfile.cs +++ b/MediaBrowser.Model/Dlna/TranscodingProfile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna diff --git a/MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs b/MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs index c443a8ad18..91cb2b68fc 100644 --- a/MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs +++ b/MediaBrowser.Model/Dlna/UpnpDeviceInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Net; diff --git a/MediaBrowser.Model/Dlna/VideoOptions.cs b/MediaBrowser.Model/Dlna/VideoOptions.cs index 9c4a38292a..6c7dafba7a 100644 --- a/MediaBrowser.Model/Dlna/VideoOptions.cs +++ b/MediaBrowser.Model/Dlna/VideoOptions.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dlna { /// diff --git a/MediaBrowser.Model/Dlna/XmlAttribute.cs b/MediaBrowser.Model/Dlna/XmlAttribute.cs index aa64177a8a..8f89969697 100644 --- a/MediaBrowser.Model/Dlna/XmlAttribute.cs +++ b/MediaBrowser.Model/Dlna/XmlAttribute.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna diff --git a/MediaBrowser.Model/Drawing/DrawingUtils.cs b/MediaBrowser.Model/Drawing/DrawingUtils.cs index 9fe85512f4..0be30b0baf 100644 --- a/MediaBrowser.Model/Drawing/DrawingUtils.cs +++ b/MediaBrowser.Model/Drawing/DrawingUtils.cs @@ -3,19 +3,19 @@ using System; namespace MediaBrowser.Model.Drawing { /// - /// Class DrawingUtils + /// Class DrawingUtils. /// public static class DrawingUtils { /// - /// Resizes a set of dimensions + /// Resizes a set of dimensions. /// - /// The original size object - /// A new fixed width, if desired - /// A new fixed height, if desired - /// A max fixed width, if desired - /// A max fixed height, if desired - /// A new size object + /// The original size object. + /// A new fixed width, if desired. + /// A new fixed height, if desired. + /// A max fixed width, if desired. + /// A max fixed height, if desired. + /// A new size object. public static ImageDimensions Resize(ImageDimensions size, int width, int height, diff --git a/MediaBrowser.Model/Drawing/ImageDimensions.cs b/MediaBrowser.Model/Drawing/ImageDimensions.cs index e7805ac494..b546dbb254 100644 --- a/MediaBrowser.Model/Drawing/ImageDimensions.cs +++ b/MediaBrowser.Model/Drawing/ImageDimensions.cs @@ -1,7 +1,10 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Drawing { /// - /// Struct ImageDimensions + /// Struct ImageDimensions. /// public struct ImageDimensions { diff --git a/MediaBrowser.Model/Drawing/ImageFormat.cs b/MediaBrowser.Model/Drawing/ImageFormat.cs index 3639c1594f..511c16a4e2 100644 --- a/MediaBrowser.Model/Drawing/ImageFormat.cs +++ b/MediaBrowser.Model/Drawing/ImageFormat.cs @@ -1,28 +1,32 @@ namespace MediaBrowser.Model.Drawing { /// - /// Enum ImageOutputFormat + /// Enum ImageOutputFormat. /// public enum ImageFormat { /// - /// The BMP + /// The BMP. /// Bmp, + /// - /// The GIF + /// The GIF. /// Gif, + /// - /// The JPG + /// The JPG. /// Jpg, + /// - /// The PNG + /// The PNG. /// Png, + /// - /// The webp + /// The webp. /// Webp } diff --git a/MediaBrowser.Model/Drawing/ImageOrientation.cs b/MediaBrowser.Model/Drawing/ImageOrientation.cs index 0fce8c3dc4..f9727a235b 100644 --- a/MediaBrowser.Model/Drawing/ImageOrientation.cs +++ b/MediaBrowser.Model/Drawing/ImageOrientation.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Drawing { public enum ImageOrientation diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index 4da5508b45..fc3e78a811 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using MediaBrowser.Model.Drawing; diff --git a/MediaBrowser.Model/Dto/BaseItemPerson.cs b/MediaBrowser.Model/Dto/BaseItemPerson.cs index 270a4683a7..5b7eefd70b 100644 --- a/MediaBrowser.Model/Dto/BaseItemPerson.cs +++ b/MediaBrowser.Model/Dto/BaseItemPerson.cs @@ -3,7 +3,7 @@ using System.Text.Json.Serialization; namespace MediaBrowser.Model.Dto { /// - /// This is used by the api to get information about a Person within a BaseItem + /// This is used by the api to get information about a Person within a BaseItem. /// public class BaseItemPerson { diff --git a/MediaBrowser.Model/Dto/IHasServerId.cs b/MediaBrowser.Model/Dto/IHasServerId.cs index 2cce5df62e..6d0a6b25e7 100644 --- a/MediaBrowser.Model/Dto/IHasServerId.cs +++ b/MediaBrowser.Model/Dto/IHasServerId.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dto { public interface IHasServerId diff --git a/MediaBrowser.Model/Dto/IItemDto.cs b/MediaBrowser.Model/Dto/IItemDto.cs index 0130adb6f1..cb8808fb6b 100644 --- a/MediaBrowser.Model/Dto/IItemDto.cs +++ b/MediaBrowser.Model/Dto/IItemDto.cs @@ -1,7 +1,7 @@ namespace MediaBrowser.Model.Dto { /// - /// Interface IItemDto + /// Interface IItemDto. /// public interface IItemDto { diff --git a/MediaBrowser.Model/Dto/ImageByNameInfo.cs b/MediaBrowser.Model/Dto/ImageByNameInfo.cs index 2bda8bf204..7dc075279f 100644 --- a/MediaBrowser.Model/Dto/ImageByNameInfo.cs +++ b/MediaBrowser.Model/Dto/ImageByNameInfo.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 namespace MediaBrowser.Model.Dto { @@ -8,21 +10,25 @@ namespace MediaBrowser.Model.Dto /// /// The name. public string Name { get; set; } + /// /// Gets or sets the theme. /// /// The theme. public string Theme { get; set; } + /// /// Gets or sets the context. /// /// The context. public string Context { get; set; } + /// /// Gets or sets the length of the file. /// /// The length of the file. public long FileLength { get; set; } + /// /// Gets or sets the format. /// diff --git a/MediaBrowser.Model/Dto/ImageInfo.cs b/MediaBrowser.Model/Dto/ImageInfo.cs index 792eaff031..57942ac23b 100644 --- a/MediaBrowser.Model/Dto/ImageInfo.cs +++ b/MediaBrowser.Model/Dto/ImageInfo.cs @@ -3,7 +3,7 @@ using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Dto { /// - /// Class ImageInfo + /// Class ImageInfo. /// public class ImageInfo { diff --git a/MediaBrowser.Model/Dto/ImageOptions.cs b/MediaBrowser.Model/Dto/ImageOptions.cs index 1fd4a5383a..4e672a007e 100644 --- a/MediaBrowser.Model/Dto/ImageOptions.cs +++ b/MediaBrowser.Model/Dto/ImageOptions.cs @@ -4,7 +4,7 @@ using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Dto { /// - /// Class ImageOptions + /// Class ImageOptions. /// public class ImageOptions { diff --git a/MediaBrowser.Model/Dto/ItemCounts.cs b/MediaBrowser.Model/Dto/ItemCounts.cs index ec5adab85a..95f4a3d772 100644 --- a/MediaBrowser.Model/Dto/ItemCounts.cs +++ b/MediaBrowser.Model/Dto/ItemCounts.cs @@ -1,7 +1,7 @@ namespace MediaBrowser.Model.Dto { /// - /// Class LibrarySummary + /// Class LibrarySummary. /// public class ItemCounts { @@ -10,48 +10,71 @@ namespace MediaBrowser.Model.Dto /// /// The movie count. public int MovieCount { get; set; } + /// /// Gets or sets the series count. /// /// The series count. public int SeriesCount { get; set; } + /// /// Gets or sets the episode count. /// /// The episode count. public int EpisodeCount { get; set; } + + /// + /// Gets or sets the artist count. + /// + /// The artist count. public int ArtistCount { get; set; } + + /// + /// Gets or sets the program count. + /// + /// The program count. public int ProgramCount { get; set; } + /// /// Gets or sets the trailer count. /// /// The trailer count. public int TrailerCount { get; set; } + /// /// Gets or sets the song count. /// /// The song count. public int SongCount { get; set; } + /// /// Gets or sets the album count. /// /// The album count. public int AlbumCount { get; set; } + /// /// Gets or sets the music video count. /// /// The music video count. public int MusicVideoCount { get; set; } + /// /// Gets or sets the box set count. /// /// The box set count. public int BoxSetCount { get; set; } + /// /// Gets or sets the book count. /// /// The book count. public int BookCount { get; set; } + + /// + /// Gets or sets the item count. + /// + /// The item count. public int ItemCount { get; set; } } } diff --git a/MediaBrowser.Model/Dto/ItemIndex.cs b/MediaBrowser.Model/Dto/ItemIndex.cs index 21e14c73e5..525576d614 100644 --- a/MediaBrowser.Model/Dto/ItemIndex.cs +++ b/MediaBrowser.Model/Dto/ItemIndex.cs @@ -1,7 +1,7 @@ namespace MediaBrowser.Model.Dto { /// - /// Class ItemIndex + /// Class ItemIndex. /// public class ItemIndex { diff --git a/MediaBrowser.Model/Dto/MediaSourceInfo.cs b/MediaBrowser.Model/Dto/MediaSourceInfo.cs index 563865ebe9..48f1e26c38 100644 --- a/MediaBrowser.Model/Dto/MediaSourceInfo.cs +++ b/MediaBrowser.Model/Dto/MediaSourceInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Text.Json.Serialization; diff --git a/MediaBrowser.Model/Dto/MediaSourceType.cs b/MediaBrowser.Model/Dto/MediaSourceType.cs index b643cad9a8..0c6dc79e20 100644 --- a/MediaBrowser.Model/Dto/MediaSourceType.cs +++ b/MediaBrowser.Model/Dto/MediaSourceType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dto { public enum MediaSourceType diff --git a/MediaBrowser.Model/Dto/MetadataEditorInfo.cs b/MediaBrowser.Model/Dto/MetadataEditorInfo.cs index 46bcb62f4a..c54db010b7 100644 --- a/MediaBrowser.Model/Dto/MetadataEditorInfo.cs +++ b/MediaBrowser.Model/Dto/MetadataEditorInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Globalization; diff --git a/MediaBrowser.Model/Dto/NameIdPair.cs b/MediaBrowser.Model/Dto/NameIdPair.cs index ccd42f17f7..c59d046911 100644 --- a/MediaBrowser.Model/Dto/NameIdPair.cs +++ b/MediaBrowser.Model/Dto/NameIdPair.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Dto @@ -9,6 +12,7 @@ namespace MediaBrowser.Model.Dto /// /// The name. public string Name { get; set; } + /// /// Gets or sets the identifier. /// diff --git a/MediaBrowser.Model/Dto/NameValuePair.cs b/MediaBrowser.Model/Dto/NameValuePair.cs index 624763211a..cb98a9e60a 100644 --- a/MediaBrowser.Model/Dto/NameValuePair.cs +++ b/MediaBrowser.Model/Dto/NameValuePair.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dto { public class NameValuePair @@ -18,6 +21,7 @@ namespace MediaBrowser.Model.Dto /// /// The name. public string Name { get; set; } + /// /// Gets or sets the value. /// diff --git a/MediaBrowser.Model/Dto/RatingType.cs b/MediaBrowser.Model/Dto/RatingType.cs index fc1f7ea0f8..b856200e59 100644 --- a/MediaBrowser.Model/Dto/RatingType.cs +++ b/MediaBrowser.Model/Dto/RatingType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dto { public enum RatingType diff --git a/MediaBrowser.Model/Dto/RecommendationDto.cs b/MediaBrowser.Model/Dto/RecommendationDto.cs index acfb85e9b9..0913fd55f2 100644 --- a/MediaBrowser.Model/Dto/RecommendationDto.cs +++ b/MediaBrowser.Model/Dto/RecommendationDto.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; diff --git a/MediaBrowser.Model/Dto/RecommendationType.cs b/MediaBrowser.Model/Dto/RecommendationType.cs index 55a0a8091d..904ec44062 100644 --- a/MediaBrowser.Model/Dto/RecommendationType.cs +++ b/MediaBrowser.Model/Dto/RecommendationType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Dto { public enum RecommendationType diff --git a/MediaBrowser.Model/Dto/UserDto.cs b/MediaBrowser.Model/Dto/UserDto.cs index 13da018a61..d36706c387 100644 --- a/MediaBrowser.Model/Dto/UserDto.cs +++ b/MediaBrowser.Model/Dto/UserDto.cs @@ -5,7 +5,7 @@ using MediaBrowser.Model.Users; namespace MediaBrowser.Model.Dto { /// - /// Class UserDto + /// Class UserDto. /// public class UserDto : IItemDto, IHasServerId { @@ -58,6 +58,9 @@ namespace MediaBrowser.Model.Dto /// true if this instance has configured easy password; otherwise, false. public bool HasConfiguredEasyPassword { get; set; } + /// + /// Gets or sets whether async login is enabled or not. + /// public bool? EnableAutoLogin { get; set; } /// @@ -99,6 +102,7 @@ namespace MediaBrowser.Model.Dto Policy = new UserPolicy(); } + /// public override string ToString() { return Name ?? base.ToString(); diff --git a/MediaBrowser.Model/Dto/UserItemDataDto.cs b/MediaBrowser.Model/Dto/UserItemDataDto.cs index fa512e94c3..92f06c9733 100644 --- a/MediaBrowser.Model/Dto/UserItemDataDto.cs +++ b/MediaBrowser.Model/Dto/UserItemDataDto.cs @@ -3,7 +3,7 @@ using System; namespace MediaBrowser.Model.Dto { /// - /// Class UserItemDataDto + /// Class UserItemDataDto. /// public class UserItemDataDto { diff --git a/MediaBrowser.Model/Entities/ChapterInfo.cs b/MediaBrowser.Model/Entities/ChapterInfo.cs index dfd6fdf4a3..c5c925c714 100644 --- a/MediaBrowser.Model/Entities/ChapterInfo.cs +++ b/MediaBrowser.Model/Entities/ChapterInfo.cs @@ -1,9 +1,12 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Entities { /// - /// Class ChapterInfo + /// Class ChapterInfo. /// public class ChapterInfo { diff --git a/MediaBrowser.Model/Entities/CollectionType.cs b/MediaBrowser.Model/Entities/CollectionType.cs index e26d1b8c3b..5d781e490f 100644 --- a/MediaBrowser.Model/Entities/CollectionType.cs +++ b/MediaBrowser.Model/Entities/CollectionType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Entities { public static class CollectionType diff --git a/MediaBrowser.Model/Entities/DisplayPreferences.cs b/MediaBrowser.Model/Entities/DisplayPreferences.cs index f9b3ac7b36..499baa0588 100644 --- a/MediaBrowser.Model/Entities/DisplayPreferences.cs +++ b/MediaBrowser.Model/Entities/DisplayPreferences.cs @@ -3,12 +3,12 @@ using System.Collections.Generic; namespace MediaBrowser.Model.Entities { /// - /// Defines the display preferences for any item that supports them (usually Folders) + /// Defines the display preferences for any item that supports them (usually Folders). /// public class DisplayPreferences { /// - /// The image scale + /// The image scale. /// private const double ImageScale = .9; @@ -29,66 +29,79 @@ namespace MediaBrowser.Model.Entities /// /// The user id. public string Id { get; set; } + /// /// Gets or sets the type of the view. /// /// The type of the view. public string ViewType { get; set; } + /// /// Gets or sets the sort by. /// /// The sort by. public string SortBy { get; set; } + /// /// Gets or sets the index by. /// /// The index by. public string IndexBy { get; set; } + /// /// Gets or sets a value indicating whether [remember indexing]. /// /// true if [remember indexing]; otherwise, false. public bool RememberIndexing { get; set; } + /// /// Gets or sets the height of the primary image. /// /// The height of the primary image. public int PrimaryImageHeight { get; set; } + /// /// Gets or sets the width of the primary image. /// /// The width of the primary image. public int PrimaryImageWidth { get; set; } + /// /// Gets or sets the custom prefs. /// /// The custom prefs. public Dictionary CustomPrefs { get; set; } + /// /// Gets or sets the scroll direction. /// /// The scroll direction. public ScrollDirection ScrollDirection { get; set; } + /// /// Gets or sets a value indicating whether to show backdrops on this item. /// /// true if showing backdrops; otherwise, false. public bool ShowBackdrop { get; set; } + /// /// Gets or sets a value indicating whether [remember sorting]. /// /// true if [remember sorting]; otherwise, false. public bool RememberSorting { get; set; } + /// /// Gets or sets the sort order. /// /// The sort order. public SortOrder SortOrder { get; set; } + /// /// Gets or sets a value indicating whether [show sidebar]. /// /// true if [show sidebar]; otherwise, false. public bool ShowSidebar { get; set; } + /// /// Gets or sets the client /// diff --git a/MediaBrowser.Model/Entities/EmptyRequestResult.cs b/MediaBrowser.Model/Entities/EmptyRequestResult.cs deleted file mode 100644 index 5d29218e3c..0000000000 --- a/MediaBrowser.Model/Entities/EmptyRequestResult.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace MediaBrowser.Model.Entities -{ - public class EmptyRequestResult - { - } -} diff --git a/MediaBrowser.Model/Entities/ExtraType.cs b/MediaBrowser.Model/Entities/ExtraType.cs index 97350b9554..ab82f73ef3 100644 --- a/MediaBrowser.Model/Entities/ExtraType.cs +++ b/MediaBrowser.Model/Entities/ExtraType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Entities { public enum ExtraType diff --git a/MediaBrowser.Model/Entities/IHasProviderIds.cs b/MediaBrowser.Model/Entities/IHasProviderIds.cs index 3b8d74cb45..c117efde94 100644 --- a/MediaBrowser.Model/Entities/IHasProviderIds.cs +++ b/MediaBrowser.Model/Entities/IHasProviderIds.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; namespace MediaBrowser.Model.Entities { /// - /// Since BaseItem and DTOBaseItem both have ProviderIds, this interface helps avoid code repition by using extension methods + /// Since BaseItem and DTOBaseItem both have ProviderIds, this interface helps avoid code repition by using extension methods. /// public interface IHasProviderIds { diff --git a/MediaBrowser.Model/Entities/ImageType.cs b/MediaBrowser.Model/Entities/ImageType.cs index ce3560e78f..0f82080906 100644 --- a/MediaBrowser.Model/Entities/ImageType.cs +++ b/MediaBrowser.Model/Entities/ImageType.cs @@ -1,56 +1,66 @@ namespace MediaBrowser.Model.Entities { /// - /// Enum ImageType + /// Enum ImageType. /// public enum ImageType { /// - /// The primary + /// The primary. /// Primary = 0, + /// - /// The art + /// The art. /// Art = 1, + /// - /// The backdrop + /// The backdrop. /// Backdrop = 2, + /// - /// The banner + /// The banner. /// Banner = 3, + /// - /// The logo + /// The logo. /// Logo = 4, + /// - /// The thumb + /// The thumb. /// Thumb = 5, + /// - /// The disc + /// The disc. /// Disc = 6, + /// - /// The box + /// The box. /// Box = 7, /// - /// The screenshot + /// The screenshot. /// Screenshot = 8, + /// - /// The menu + /// The menu. /// Menu = 9, + /// - /// The chapter image + /// The chapter image. /// Chapter = 10, + /// - /// The box rear + /// The box rear. /// BoxRear = 11 } diff --git a/MediaBrowser.Model/Entities/IsoType.cs b/MediaBrowser.Model/Entities/IsoType.cs index 8e4f0d63a4..1aa29f31d4 100644 --- a/MediaBrowser.Model/Entities/IsoType.cs +++ b/MediaBrowser.Model/Entities/IsoType.cs @@ -1,16 +1,17 @@ namespace MediaBrowser.Model.Entities { /// - /// Enum IsoType + /// Enum IsoType. /// public enum IsoType { /// - /// The DVD + /// The DVD. /// Dvd, + /// - /// The blu ray + /// The blu ray. /// BluRay } diff --git a/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs b/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs index b83df87e23..8b45e581dd 100644 --- a/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs +++ b/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Entities diff --git a/MediaBrowser.Model/Entities/LocationType.cs b/MediaBrowser.Model/Entities/LocationType.cs index 52c08b28b5..879b31c5c8 100644 --- a/MediaBrowser.Model/Entities/LocationType.cs +++ b/MediaBrowser.Model/Entities/LocationType.cs @@ -1,24 +1,27 @@ namespace MediaBrowser.Model.Entities { /// - /// Enum LocationType + /// Enum LocationType. /// public enum LocationType { /// - /// The file system + /// The file system. /// FileSystem = 0, + /// - /// The remote + /// The remote. /// Remote = 1, + /// - /// The virtual + /// The virtual. /// Virtual = 2, + /// - /// The offline + /// The offline. /// Offline = 3 } diff --git a/MediaBrowser.Model/Entities/MediaAttachment.cs b/MediaBrowser.Model/Entities/MediaAttachment.cs index 8f8c3efd20..167be18c95 100644 --- a/MediaBrowser.Model/Entities/MediaAttachment.cs +++ b/MediaBrowser.Model/Entities/MediaAttachment.cs @@ -1,7 +1,7 @@ namespace MediaBrowser.Model.Entities { /// - /// Class MediaAttachment + /// Class MediaAttachment. /// public class MediaAttachment { diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs index 5122f42b8a..7f626c69b1 100644 --- a/MediaBrowser.Model/Entities/MediaStream.cs +++ b/MediaBrowser.Model/Entities/MediaStream.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Globalization; diff --git a/MediaBrowser.Model/Entities/MediaStreamType.cs b/MediaBrowser.Model/Entities/MediaStreamType.cs index 4fc1e53727..e09aaf6d05 100644 --- a/MediaBrowser.Model/Entities/MediaStreamType.cs +++ b/MediaBrowser.Model/Entities/MediaStreamType.cs @@ -1,24 +1,27 @@ namespace MediaBrowser.Model.Entities { /// - /// Enum MediaStreamType + /// Enum MediaStreamType. /// public enum MediaStreamType { /// - /// The audio + /// The audio. /// Audio, + /// - /// The video + /// The video. /// Video, + /// - /// The subtitle + /// The subtitle. /// Subtitle, + /// - /// The embedded image + /// The embedded image. /// EmbeddedImage } diff --git a/MediaBrowser.Model/Entities/MediaType.cs b/MediaBrowser.Model/Entities/MediaType.cs index d8b02c9eae..dd2ae810be 100644 --- a/MediaBrowser.Model/Entities/MediaType.cs +++ b/MediaBrowser.Model/Entities/MediaType.cs @@ -1,27 +1,27 @@ namespace MediaBrowser.Model.Entities { /// - /// Class MediaType + /// Class MediaType. /// public static class MediaType { /// - /// The video + /// The video. /// public const string Video = "Video"; /// - /// The audio + /// The audio. /// public const string Audio = "Audio"; /// - /// The photo + /// The photo. /// public const string Photo = "Photo"; /// - /// The book + /// The book. /// public const string Book = "Book"; } diff --git a/MediaBrowser.Model/Entities/MediaUrl.cs b/MediaBrowser.Model/Entities/MediaUrl.cs index 428c895b6e..9e30648ad6 100644 --- a/MediaBrowser.Model/Entities/MediaUrl.cs +++ b/MediaBrowser.Model/Entities/MediaUrl.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Entities { public class MediaUrl diff --git a/MediaBrowser.Model/Entities/MetadataFields.cs b/MediaBrowser.Model/Entities/MetadataFields.cs index a7947a933b..d64d4f4da9 100644 --- a/MediaBrowser.Model/Entities/MetadataFields.cs +++ b/MediaBrowser.Model/Entities/MetadataFields.cs @@ -1,44 +1,52 @@ namespace MediaBrowser.Model.Entities { /// - /// Enum MetadataFields + /// Enum MetadataFields. /// public enum MetadataFields { /// - /// The cast + /// The cast. /// Cast, + /// - /// The genres + /// The genres. /// Genres, + /// - /// The production locations + /// The production locations. /// ProductionLocations, + /// - /// The studios + /// The studios. /// Studios, + /// - /// The tags + /// The tags. /// Tags, + /// - /// The name + /// The name. /// Name, + /// - /// The overview + /// The overview. /// Overview, + /// - /// The runtime + /// The runtime. /// Runtime, + /// - /// The official rating + /// The official rating. /// OfficialRating } diff --git a/MediaBrowser.Model/Entities/MetadataProviders.cs b/MediaBrowser.Model/Entities/MetadataProviders.cs index e9802cf460..38c406170a 100644 --- a/MediaBrowser.Model/Entities/MetadataProviders.cs +++ b/MediaBrowser.Model/Entities/MetadataProviders.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Entities { /// diff --git a/MediaBrowser.Model/Entities/PackageReviewInfo.cs b/MediaBrowser.Model/Entities/PackageReviewInfo.cs index b73ba8dd0e..dd6be24bc3 100644 --- a/MediaBrowser.Model/Entities/PackageReviewInfo.cs +++ b/MediaBrowser.Model/Entities/PackageReviewInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Entities diff --git a/MediaBrowser.Model/Entities/ParentalRating.cs b/MediaBrowser.Model/Entities/ParentalRating.cs index a22e119fa0..d00341c185 100644 --- a/MediaBrowser.Model/Entities/ParentalRating.cs +++ b/MediaBrowser.Model/Entities/ParentalRating.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Entities { /// diff --git a/MediaBrowser.Model/Entities/PersonType.cs b/MediaBrowser.Model/Entities/PersonType.cs index 72e3538fcb..81db9c6131 100644 --- a/MediaBrowser.Model/Entities/PersonType.cs +++ b/MediaBrowser.Model/Entities/PersonType.cs @@ -1,40 +1,47 @@ namespace MediaBrowser.Model.Entities { /// - /// Struct PersonType + /// Struct PersonType. /// public class PersonType { /// - /// The actor + /// The actor. /// public const string Actor = "Actor"; + /// - /// The director + /// The director. /// public const string Director = "Director"; + /// - /// The composer + /// The composer. /// public const string Composer = "Composer"; + /// - /// The writer + /// The writer. /// public const string Writer = "Writer"; + /// - /// The guest star + /// The guest star. /// public const string GuestStar = "GuestStar"; + /// - /// The producer + /// The producer. /// public const string Producer = "Producer"; + /// - /// The conductor + /// The conductor. /// public const string Conductor = "Conductor"; + /// - /// The lyricist + /// The lyricist. /// public const string Lyricist = "Lyricist"; } diff --git a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs index a151bb3bb1..cd387bd546 100644 --- a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs +++ b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; namespace MediaBrowser.Model.Entities { /// - /// Class ProviderIdsExtensions + /// Class ProviderIdsExtensions. /// public static class ProviderIdsExtensions { diff --git a/MediaBrowser.Model/Entities/ScrollDirection.cs b/MediaBrowser.Model/Entities/ScrollDirection.cs index bc66364f7d..a1de0edcbb 100644 --- a/MediaBrowser.Model/Entities/ScrollDirection.cs +++ b/MediaBrowser.Model/Entities/ScrollDirection.cs @@ -1,16 +1,17 @@ namespace MediaBrowser.Model.Entities { /// - /// Enum ScrollDirection + /// Enum ScrollDirection. /// public enum ScrollDirection { /// - /// The horizontal + /// The horizontal. /// Horizontal, + /// - /// The vertical + /// The vertical. /// Vertical } diff --git a/MediaBrowser.Model/Entities/SeriesStatus.cs b/MediaBrowser.Model/Entities/SeriesStatus.cs index cab6a83e8b..51351c1355 100644 --- a/MediaBrowser.Model/Entities/SeriesStatus.cs +++ b/MediaBrowser.Model/Entities/SeriesStatus.cs @@ -1,16 +1,17 @@ namespace MediaBrowser.Model.Entities { /// - /// Enum SeriesStatus + /// Enum SeriesStatus. /// public enum SeriesStatus { /// - /// The continuing + /// The continuing. /// Continuing, + /// - /// The ended + /// The ended. /// Ended } diff --git a/MediaBrowser.Model/Entities/SortOrder.cs b/MediaBrowser.Model/Entities/SortOrder.cs index 558ebeac2a..e6cb6fd09e 100644 --- a/MediaBrowser.Model/Entities/SortOrder.cs +++ b/MediaBrowser.Model/Entities/SortOrder.cs @@ -1,16 +1,17 @@ namespace MediaBrowser.Model.Entities { /// - /// Enum SortOrder + /// Enum SortOrder. /// public enum SortOrder { /// - /// The ascending + /// The ascending. /// Ascending, + /// - /// The descending + /// The descending. /// Descending } diff --git a/MediaBrowser.Model/Entities/TrailerType.cs b/MediaBrowser.Model/Entities/TrailerType.cs index 73be5d7cae..e72741d233 100644 --- a/MediaBrowser.Model/Entities/TrailerType.cs +++ b/MediaBrowser.Model/Entities/TrailerType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Entities { public enum TrailerType diff --git a/MediaBrowser.Model/Entities/UserDataSaveReason.cs b/MediaBrowser.Model/Entities/UserDataSaveReason.cs index bd7471682f..20404e6f4d 100644 --- a/MediaBrowser.Model/Entities/UserDataSaveReason.cs +++ b/MediaBrowser.Model/Entities/UserDataSaveReason.cs @@ -1,32 +1,37 @@ namespace MediaBrowser.Model.Entities { /// - /// Enum UserDataSaveReason + /// Enum UserDataSaveReason. /// public enum UserDataSaveReason { /// - /// The playback start + /// The playback start. /// PlaybackStart = 1, + /// - /// The playback progress + /// The playback progress. /// PlaybackProgress = 2, + /// - /// The playback finished + /// The playback finished. /// PlaybackFinished = 3, + /// - /// The toggle played + /// The toggle played. /// TogglePlayed = 4, + /// - /// The update user rating + /// The update user rating. /// UpdateUserRating = 5, + /// - /// The import + /// The import. /// Import = 6 } diff --git a/MediaBrowser.Model/Entities/Video3DFormat.cs b/MediaBrowser.Model/Entities/Video3DFormat.cs index 89923ae525..b7789e858c 100644 --- a/MediaBrowser.Model/Entities/Video3DFormat.cs +++ b/MediaBrowser.Model/Entities/Video3DFormat.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Entities { public enum Video3DFormat diff --git a/MediaBrowser.Model/Entities/VideoType.cs b/MediaBrowser.Model/Entities/VideoType.cs index 95d69fb7bb..172796301d 100644 --- a/MediaBrowser.Model/Entities/VideoType.cs +++ b/MediaBrowser.Model/Entities/VideoType.cs @@ -1,24 +1,27 @@ namespace MediaBrowser.Model.Entities { /// - /// Enum VideoType + /// Enum VideoType. /// public enum VideoType { /// - /// The video file + /// The video file. /// VideoFile, + /// - /// The iso + /// The iso. /// Iso, + /// - /// The DVD + /// The DVD. /// Dvd, + /// - /// The blu ray + /// The blu ray. /// BluRay } diff --git a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs index 6bdbdb489e..0d4acd18b8 100644 --- a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs +++ b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Configuration; diff --git a/MediaBrowser.Model/Events/GenericEventArgs.cs b/MediaBrowser.Model/Events/GenericEventArgs.cs index fc8bc620f9..1ef0b25c98 100644 --- a/MediaBrowser.Model/Events/GenericEventArgs.cs +++ b/MediaBrowser.Model/Events/GenericEventArgs.cs @@ -3,7 +3,7 @@ using System; namespace MediaBrowser.Model.Events { /// - /// Provides a generic EventArgs subclass that can hold any kind of object + /// Provides a generic EventArgs subclass that can hold any kind of object. /// /// public class GenericEventArgs : EventArgs diff --git a/MediaBrowser.Model/Extensions/ListHelper.cs b/MediaBrowser.Model/Extensions/ListHelper.cs index d751f77a77..16919d616e 100644 --- a/MediaBrowser.Model/Extensions/ListHelper.cs +++ b/MediaBrowser.Model/Extensions/ListHelper.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Extensions diff --git a/MediaBrowser.Model/Globalization/CountryInfo.cs b/MediaBrowser.Model/Globalization/CountryInfo.cs index 3ae59494f6..72362f4f31 100644 --- a/MediaBrowser.Model/Globalization/CountryInfo.cs +++ b/MediaBrowser.Model/Globalization/CountryInfo.cs @@ -1,7 +1,7 @@ namespace MediaBrowser.Model.Globalization { /// - /// Class CountryInfo + /// Class CountryInfo. /// public class CountryInfo { diff --git a/MediaBrowser.Model/Globalization/CultureDto.cs b/MediaBrowser.Model/Globalization/CultureDto.cs index a213d4147f..cfd8d33bd7 100644 --- a/MediaBrowser.Model/Globalization/CultureDto.cs +++ b/MediaBrowser.Model/Globalization/CultureDto.cs @@ -1,9 +1,12 @@ -using global::System; +#pragma warning disable CS1591 +#pragma warning disable SA1600 + +using System; namespace MediaBrowser.Model.Globalization { /// - /// Class CultureDto + /// Class CultureDto. /// public class CultureDto { diff --git a/MediaBrowser.Model/Globalization/ILocalizationManager.cs b/MediaBrowser.Model/Globalization/ILocalizationManager.cs index 0b6cfe1b71..613bfca695 100644 --- a/MediaBrowser.Model/Globalization/ILocalizationManager.cs +++ b/MediaBrowser.Model/Globalization/ILocalizationManager.cs @@ -5,7 +5,7 @@ using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Globalization { /// - /// Interface ILocalizationManager + /// Interface ILocalizationManager. /// public interface ILocalizationManager { diff --git a/MediaBrowser.Model/Globalization/LocalizationOption.cs b/MediaBrowser.Model/Globalization/LocalizationOption.cs index c4c9a89196..af617d975b 100644 --- a/MediaBrowser.Model/Globalization/LocalizationOption.cs +++ b/MediaBrowser.Model/Globalization/LocalizationOption.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Globalization { public class LocalizationOption diff --git a/MediaBrowser.Model/IO/FileSystemEntryType.cs b/MediaBrowser.Model/IO/FileSystemEntryType.cs index a4ed2334d6..7780d6fcc7 100644 --- a/MediaBrowser.Model/IO/FileSystemEntryType.cs +++ b/MediaBrowser.Model/IO/FileSystemEntryType.cs @@ -1,24 +1,27 @@ namespace MediaBrowser.Model.IO { /// - /// Enum FileSystemEntryType + /// Enum FileSystemEntryType. /// public enum FileSystemEntryType { /// - /// The file + /// The file. /// File, + /// - /// The directory + /// The directory. /// Directory, + /// - /// The network computer + /// The network computer. /// NetworkComputer, + /// - /// The network share + /// The network share. /// NetworkShare } diff --git a/MediaBrowser.Model/IO/FileSystemMetadata.cs b/MediaBrowser.Model/IO/FileSystemMetadata.cs index 2a6d139599..8010e2dcd0 100644 --- a/MediaBrowser.Model/IO/FileSystemMetadata.cs +++ b/MediaBrowser.Model/IO/FileSystemMetadata.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.IO @@ -9,26 +12,31 @@ namespace MediaBrowser.Model.IO /// /// true if exists; otherwise, false. public bool Exists { get; set; } + /// /// Gets or sets the full name. /// /// The full name. public string FullName { get; set; } + /// /// Gets or sets the name. /// /// The name. public string Name { get; set; } + /// /// Gets or sets the extension. /// /// The extension. public string Extension { get; set; } + /// /// Gets or sets the length. /// /// The length. public long Length { get; set; } + /// /// Gets or sets the name of the directory. /// @@ -40,11 +48,13 @@ namespace MediaBrowser.Model.IO /// /// The last write time UTC. public DateTime LastWriteTimeUtc { get; set; } + /// /// Gets or sets the creation time UTC. /// /// The creation time UTC. public DateTime CreationTimeUtc { get; set; } + /// /// Gets a value indicating whether this instance is directory. /// diff --git a/MediaBrowser.Model/IO/IFileSystem.cs b/MediaBrowser.Model/IO/IFileSystem.cs index 6a874d0470..7e6fe7c098 100644 --- a/MediaBrowser.Model/IO/IFileSystem.cs +++ b/MediaBrowser.Model/IO/IFileSystem.cs @@ -1,10 +1,13 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; namespace MediaBrowser.Model.IO { /// - /// Interface IFileSystem + /// Interface IFileSystem. /// public interface IFileSystem { diff --git a/MediaBrowser.Model/IO/IIsoManager.cs b/MediaBrowser.Model/IO/IIsoManager.cs index eb0cb4bfbb..1a11b6f700 100644 --- a/MediaBrowser.Model/IO/IIsoManager.cs +++ b/MediaBrowser.Model/IO/IIsoManager.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.IO; diff --git a/MediaBrowser.Model/IO/IIsoMount.cs b/MediaBrowser.Model/IO/IIsoMount.cs index 825c0c2435..72ec673ee1 100644 --- a/MediaBrowser.Model/IO/IIsoMount.cs +++ b/MediaBrowser.Model/IO/IIsoMount.cs @@ -3,7 +3,7 @@ using System; namespace MediaBrowser.Model.IO { /// - /// Interface IIsoMount + /// Interface IIsoMount. /// public interface IIsoMount : IDisposable { diff --git a/MediaBrowser.Model/IO/IIsoMounter.cs b/MediaBrowser.Model/IO/IIsoMounter.cs index 766a9e4e6c..1d110e82fb 100644 --- a/MediaBrowser.Model/IO/IIsoMounter.cs +++ b/MediaBrowser.Model/IO/IIsoMounter.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.IO; using System.Threading; diff --git a/MediaBrowser.Model/IO/IShortcutHandler.cs b/MediaBrowser.Model/IO/IShortcutHandler.cs index 2cc18274b6..69b6f35e71 100644 --- a/MediaBrowser.Model/IO/IShortcutHandler.cs +++ b/MediaBrowser.Model/IO/IShortcutHandler.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.IO { public interface IShortcutHandler @@ -7,12 +10,14 @@ namespace MediaBrowser.Model.IO /// /// The extension. string Extension { get; } + /// /// Resolves the specified shortcut path. /// /// The shortcut path. /// System.String. string Resolve(string shortcutPath); + /// /// Creates the specified shortcut path. /// diff --git a/MediaBrowser.Model/IO/IStreamHelper.cs b/MediaBrowser.Model/IO/IStreamHelper.cs index 97d985df6c..21a5929711 100644 --- a/MediaBrowser.Model/IO/IStreamHelper.cs +++ b/MediaBrowser.Model/IO/IStreamHelper.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.IO; using System.Threading; diff --git a/MediaBrowser.Model/IO/IZipClient.cs b/MediaBrowser.Model/IO/IZipClient.cs index eaddd6df32..1ae3893ac4 100644 --- a/MediaBrowser.Model/IO/IZipClient.cs +++ b/MediaBrowser.Model/IO/IZipClient.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.IO; namespace MediaBrowser.Model.IO diff --git a/MediaBrowser.Model/Library/PlayAccess.cs b/MediaBrowser.Model/Library/PlayAccess.cs index 2fd754f5ef..fd7cf8d32b 100644 --- a/MediaBrowser.Model/Library/PlayAccess.cs +++ b/MediaBrowser.Model/Library/PlayAccess.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Library { public enum PlayAccess diff --git a/MediaBrowser.Model/Library/UserViewQuery.cs b/MediaBrowser.Model/Library/UserViewQuery.cs index c2e1896035..ac2583179f 100644 --- a/MediaBrowser.Model/Library/UserViewQuery.cs +++ b/MediaBrowser.Model/Library/UserViewQuery.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Library diff --git a/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs b/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs index 311b5b0c5c..b5f3ccd3fe 100644 --- a/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Dto; diff --git a/MediaBrowser.Model/LiveTv/ChannelType.cs b/MediaBrowser.Model/LiveTv/ChannelType.cs index 8808aa6d2c..b6974cb085 100644 --- a/MediaBrowser.Model/LiveTv/ChannelType.cs +++ b/MediaBrowser.Model/LiveTv/ChannelType.cs @@ -1,7 +1,7 @@ namespace MediaBrowser.Model.LiveTv { /// - /// Enum ChannelType + /// Enum ChannelType. /// public enum ChannelType { @@ -11,7 +11,7 @@ namespace MediaBrowser.Model.LiveTv TV, /// - /// The radio + /// The radio. /// Radio } diff --git a/MediaBrowser.Model/LiveTv/DayPattern.cs b/MediaBrowser.Model/LiveTv/DayPattern.cs index 73b15507b6..0fd856fbff 100644 --- a/MediaBrowser.Model/LiveTv/DayPattern.cs +++ b/MediaBrowser.Model/LiveTv/DayPattern.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.LiveTv { public enum DayPattern diff --git a/MediaBrowser.Model/LiveTv/GuideInfo.cs b/MediaBrowser.Model/LiveTv/GuideInfo.cs index 1303c278ea..e0d4d83267 100644 --- a/MediaBrowser.Model/LiveTv/GuideInfo.cs +++ b/MediaBrowser.Model/LiveTv/GuideInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.LiveTv diff --git a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs index eedf89db0f..95d13761a8 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvChannelQuery.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Entities; diff --git a/MediaBrowser.Model/LiveTv/LiveTvInfo.cs b/MediaBrowser.Model/LiveTv/LiveTvInfo.cs index 60cb273311..42d5a21a22 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvInfo.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.LiveTv diff --git a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs index 36fe0c3d23..f88a0195fb 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvOptions.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvOptions.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Dto; diff --git a/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs b/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs index 9ad13391a9..ee0696176f 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvServiceInfo.cs @@ -1,9 +1,12 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.LiveTv { /// - /// Class ServiceInfo + /// Class ServiceInfo. /// public class LiveTvServiceInfo { @@ -42,6 +45,7 @@ namespace MediaBrowser.Model.LiveTv /// /// true if this instance has update available; otherwise, false. public bool HasUpdateAvailable { get; set; } + /// /// Gets or sets a value indicating whether this instance is visible. /// diff --git a/MediaBrowser.Model/LiveTv/LiveTvServiceStatus.cs b/MediaBrowser.Model/LiveTv/LiveTvServiceStatus.cs index 7578f329a8..5c0cb1baae 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvServiceStatus.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvServiceStatus.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.LiveTv { public enum LiveTvServiceStatus diff --git a/MediaBrowser.Model/LiveTv/LiveTvTunerStatus.cs b/MediaBrowser.Model/LiveTv/LiveTvTunerStatus.cs index f7f521e43e..d52efe55bf 100644 --- a/MediaBrowser.Model/LiveTv/LiveTvTunerStatus.cs +++ b/MediaBrowser.Model/LiveTv/LiveTvTunerStatus.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.LiveTv { public enum LiveTvTunerStatus diff --git a/MediaBrowser.Model/LiveTv/ProgramAudio.cs b/MediaBrowser.Model/LiveTv/ProgramAudio.cs index 158d67eb9b..f9c9ee4114 100644 --- a/MediaBrowser.Model/LiveTv/ProgramAudio.cs +++ b/MediaBrowser.Model/LiveTv/ProgramAudio.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.LiveTv { public enum ProgramAudio diff --git a/MediaBrowser.Model/LiveTv/RecordingQuery.cs b/MediaBrowser.Model/LiveTv/RecordingQuery.cs index f98d7fe867..be2e273d90 100644 --- a/MediaBrowser.Model/LiveTv/RecordingQuery.cs +++ b/MediaBrowser.Model/LiveTv/RecordingQuery.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + 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 d3270c4d37..17e498c883 100644 --- a/MediaBrowser.Model/LiveTv/RecordingStatus.cs +++ b/MediaBrowser.Model/LiveTv/RecordingStatus.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.LiveTv { public enum RecordingStatus diff --git a/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs b/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs index 72c7a0c901..bd518c1db4 100644 --- a/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + 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 a15ba7a129..22d408b048 100644 --- a/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs +++ b/MediaBrowser.Model/LiveTv/SeriesTimerQuery.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.LiveTv diff --git a/MediaBrowser.Model/LiveTv/TimerInfoDto.cs b/MediaBrowser.Model/LiveTv/TimerInfoDto.cs index 208f731c5d..d6d112572f 100644 --- a/MediaBrowser.Model/LiveTv/TimerInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/TimerInfoDto.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.LiveTv diff --git a/MediaBrowser.Model/LiveTv/TimerQuery.cs b/MediaBrowser.Model/LiveTv/TimerQuery.cs index 1478cc148b..e7f37b536e 100644 --- a/MediaBrowser.Model/LiveTv/TimerQuery.cs +++ b/MediaBrowser.Model/LiveTv/TimerQuery.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.LiveTv { public class TimerQuery diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index dc9c78ab16..6576657662 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -11,6 +11,7 @@ netstandard2.1 false true + true @@ -24,4 +25,16 @@ + + + + + + + + + + ../jellyfin.ruleset + + diff --git a/MediaBrowser.Model/MediaInfo/AudioCodec.cs b/MediaBrowser.Model/MediaInfo/AudioCodec.cs index 5ebdb99cb6..171a061147 100644 --- a/MediaBrowser.Model/MediaInfo/AudioCodec.cs +++ b/MediaBrowser.Model/MediaInfo/AudioCodec.cs @@ -1,6 +1,9 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.MediaInfo { - public class AudioCodec + public static class AudioCodec { public const string AAC = "aac"; public const string MP3 = "mp3"; diff --git a/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs b/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs index e728ecdfdb..dc46fb7b27 100644 --- a/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs +++ b/MediaBrowser.Model/MediaInfo/BlurayDiscInfo.cs @@ -1,9 +1,12 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.MediaInfo { /// - /// Represents the result of BDInfo output + /// Represents the result of BDInfo output. /// public class BlurayDiscInfo { diff --git a/MediaBrowser.Model/MediaInfo/Container.cs b/MediaBrowser.Model/MediaInfo/Container.cs deleted file mode 100644 index f8d56702df..0000000000 --- a/MediaBrowser.Model/MediaInfo/Container.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace MediaBrowser.Model.MediaInfo -{ - public class Container - { - public const string MP4 = "mp4"; - public const string MKV = "mkv"; - } -} diff --git a/MediaBrowser.Model/MediaInfo/IBlurayExaminer.cs b/MediaBrowser.Model/MediaInfo/IBlurayExaminer.cs index 27137ab261..5b7d1d03c3 100644 --- a/MediaBrowser.Model/MediaInfo/IBlurayExaminer.cs +++ b/MediaBrowser.Model/MediaInfo/IBlurayExaminer.cs @@ -1,7 +1,7 @@ namespace MediaBrowser.Model.MediaInfo { /// - /// Interface IBlurayExaminer + /// Interface IBlurayExaminer. /// public interface IBlurayExaminer { diff --git a/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs b/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs index a5ae7c7a51..94eab8d373 100644 --- a/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs +++ b/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Dlna; diff --git a/MediaBrowser.Model/MediaInfo/LiveStreamResponse.cs b/MediaBrowser.Model/MediaInfo/LiveStreamResponse.cs index dd4b694697..aa27f699f8 100644 --- a/MediaBrowser.Model/MediaInfo/LiveStreamResponse.cs +++ b/MediaBrowser.Model/MediaInfo/LiveStreamResponse.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.MediaInfo diff --git a/MediaBrowser.Model/MediaInfo/MediaInfo.cs b/MediaBrowser.Model/MediaInfo/MediaInfo.cs index 9d45a2af13..6ad766d399 100644 --- a/MediaBrowser.Model/MediaInfo/MediaInfo.cs +++ b/MediaBrowser.Model/MediaInfo/MediaInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using MediaBrowser.Model.Dto; @@ -14,16 +17,19 @@ namespace MediaBrowser.Model.MediaInfo /// /// The album. public string Album { get; set; } + /// /// Gets or sets the artists. /// /// The artists. public string[] Artists { get; set; } + /// /// Gets or sets the album artists. /// /// The album artists. public string[] AlbumArtists { get; set; } + /// /// Gets or sets the studios. /// @@ -36,16 +42,19 @@ namespace MediaBrowser.Model.MediaInfo public DateTime? PremiereDate { get; set; } public BaseItemPerson[] People { get; set; } public Dictionary ProviderIds { get; set; } + /// /// Gets or sets the official rating. /// /// The official rating. public string OfficialRating { get; set; } + /// /// Gets or sets the official rating description. /// /// The official rating description. public string OfficialRatingDescription { get; set; } + /// /// Gets or sets the overview. /// diff --git a/MediaBrowser.Model/MediaInfo/MediaProtocol.cs b/MediaBrowser.Model/MediaInfo/MediaProtocol.cs index a993f60751..8b6b036251 100644 --- a/MediaBrowser.Model/MediaInfo/MediaProtocol.cs +++ b/MediaBrowser.Model/MediaInfo/MediaProtocol.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.MediaInfo { public enum MediaProtocol diff --git a/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs b/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs index e5fad4e114..f09494039b 100644 --- a/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs +++ b/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Dlna; diff --git a/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs b/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs index 208e9bab96..58edb7e734 100644 --- a/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs +++ b/MediaBrowser.Model/MediaInfo/SubtitleFormat.cs @@ -1,6 +1,9 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.MediaInfo { - public class SubtitleFormat + public static class SubtitleFormat { public const string SRT = "srt"; public const string SSA = "ssa"; diff --git a/MediaBrowser.Model/MediaInfo/SubtitleTrackEvent.cs b/MediaBrowser.Model/MediaInfo/SubtitleTrackEvent.cs index 4eb000e58d..18ea69afb9 100644 --- a/MediaBrowser.Model/MediaInfo/SubtitleTrackEvent.cs +++ b/MediaBrowser.Model/MediaInfo/SubtitleTrackEvent.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.MediaInfo { public class SubtitleTrackEvent diff --git a/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs b/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs index c382b20c9a..bec0e02aad 100644 --- a/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs +++ b/MediaBrowser.Model/MediaInfo/SubtitleTrackInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; diff --git a/MediaBrowser.Model/MediaInfo/TransportStreamTimestamp.cs b/MediaBrowser.Model/MediaInfo/TransportStreamTimestamp.cs index 46ce2302e0..b229f44d83 100644 --- a/MediaBrowser.Model/MediaInfo/TransportStreamTimestamp.cs +++ b/MediaBrowser.Model/MediaInfo/TransportStreamTimestamp.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.MediaInfo { public enum TransportStreamTimestamp diff --git a/MediaBrowser.Model/MediaInfo/VideoCodec.cs b/MediaBrowser.Model/MediaInfo/VideoCodec.cs deleted file mode 100644 index a26ce1b708..0000000000 --- a/MediaBrowser.Model/MediaInfo/VideoCodec.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace MediaBrowser.Model.MediaInfo -{ - public class VideoCodec - { - public const string H263 = "h263"; - public const string H264 = "h264"; - public const string H265 = "h265"; - public const string MPEG4 = "mpeg4"; - public const string MPEG1 = "mpeg1video"; - public const string MPEG2 = "mpeg2video"; - public const string MSMPEG4 = "msmpeg4"; - public const string VC1 = "vc1"; - } -} diff --git a/MediaBrowser.Model/Net/EndPointInfo.cs b/MediaBrowser.Model/Net/EndPointInfo.cs index b73799ea88..f5b5a406fd 100644 --- a/MediaBrowser.Model/Net/EndPointInfo.cs +++ b/MediaBrowser.Model/Net/EndPointInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Net { public class EndPointInfo diff --git a/MediaBrowser.Model/Net/HttpException.cs b/MediaBrowser.Model/Net/HttpException.cs index 16253ed6cc..4b15e30f07 100644 --- a/MediaBrowser.Model/Net/HttpException.cs +++ b/MediaBrowser.Model/Net/HttpException.cs @@ -4,7 +4,7 @@ using System.Net; namespace MediaBrowser.Model.Net { /// - /// Class HttpException + /// Class HttpException. /// public class HttpException : Exception { diff --git a/MediaBrowser.Model/Net/ISocket.cs b/MediaBrowser.Model/Net/ISocket.cs index 3fdc40bbe2..f7e4adb91c 100644 --- a/MediaBrowser.Model/Net/ISocket.cs +++ b/MediaBrowser.Model/Net/ISocket.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Net; using System.Threading; diff --git a/MediaBrowser.Model/Net/ISocketFactory.cs b/MediaBrowser.Model/Net/ISocketFactory.cs index a7965463ae..eb81af9a71 100644 --- a/MediaBrowser.Model/Net/ISocketFactory.cs +++ b/MediaBrowser.Model/Net/ISocketFactory.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Net; namespace MediaBrowser.Model.Net diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs index 42fff3775a..d746b921f5 100644 --- a/MediaBrowser.Model/Net/MimeTypes.cs +++ b/MediaBrowser.Model/Net/MimeTypes.cs @@ -1,8 +1,10 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + 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/Net/NetworkShare.cs b/MediaBrowser.Model/Net/NetworkShare.cs index 1f61414fc0..061e9982c0 100644 --- a/MediaBrowser.Model/Net/NetworkShare.cs +++ b/MediaBrowser.Model/Net/NetworkShare.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Net { public class NetworkShare diff --git a/MediaBrowser.Model/Net/NetworkShareType.cs b/MediaBrowser.Model/Net/NetworkShareType.cs index bf2d092a6d..5d985f85d3 100644 --- a/MediaBrowser.Model/Net/NetworkShareType.cs +++ b/MediaBrowser.Model/Net/NetworkShareType.cs @@ -1,28 +1,32 @@ namespace MediaBrowser.Model.Net { /// - /// Enum NetworkShareType + /// Enum NetworkShareType. /// public enum NetworkShareType { /// - /// Disk share + /// Disk share. /// Disk, + /// - /// Printer share + /// Printer share. /// Printer, + /// - /// Device share + /// Device share. /// Device, + /// - /// IPC share + /// IPC share. /// Ipc, + /// - /// Special share + /// Special share. /// Special } diff --git a/MediaBrowser.Model/Net/SocketReceiveResult.cs b/MediaBrowser.Model/Net/SocketReceiveResult.cs index 3a4ad3738e..a49e7e6354 100644 --- a/MediaBrowser.Model/Net/SocketReceiveResult.cs +++ b/MediaBrowser.Model/Net/SocketReceiveResult.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Net; namespace MediaBrowser.Model.Net diff --git a/MediaBrowser.Model/Net/WebSocketMessage.cs b/MediaBrowser.Model/Net/WebSocketMessage.cs index c763216f12..afa8cea92d 100644 --- a/MediaBrowser.Model/Net/WebSocketMessage.cs +++ b/MediaBrowser.Model/Net/WebSocketMessage.cs @@ -1,7 +1,10 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Net { /// - /// Class WebSocketMessage + /// Class WebSocketMessage. /// /// public class WebSocketMessage @@ -13,6 +16,7 @@ namespace MediaBrowser.Model.Net public string MessageType { get; set; } public string MessageId { get; set; } public string ServerId { get; set; } + /// /// Gets or sets the data. /// diff --git a/MediaBrowser.Model/Notifications/NotificationLevel.cs b/MediaBrowser.Model/Notifications/NotificationLevel.cs index 6a838b1254..b02cb6c7ad 100644 --- a/MediaBrowser.Model/Notifications/NotificationLevel.cs +++ b/MediaBrowser.Model/Notifications/NotificationLevel.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Notifications { public enum NotificationLevel diff --git a/MediaBrowser.Model/Notifications/NotificationOption.cs b/MediaBrowser.Model/Notifications/NotificationOption.cs index 51a07370f0..16183a079d 100644 --- a/MediaBrowser.Model/Notifications/NotificationOption.cs +++ b/MediaBrowser.Model/Notifications/NotificationOption.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Notifications diff --git a/MediaBrowser.Model/Notifications/NotificationOptions.cs b/MediaBrowser.Model/Notifications/NotificationOptions.cs index 38600b9c87..3bf0fbb6fe 100644 --- a/MediaBrowser.Model/Notifications/NotificationOptions.cs +++ b/MediaBrowser.Model/Notifications/NotificationOptions.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + 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 5a2634e73d..5aca15c660 100644 --- a/MediaBrowser.Model/Notifications/NotificationRequest.cs +++ b/MediaBrowser.Model/Notifications/NotificationRequest.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Notifications diff --git a/MediaBrowser.Model/Notifications/NotificationType.cs b/MediaBrowser.Model/Notifications/NotificationType.cs index 38b519a14b..a1d8e29a40 100644 --- a/MediaBrowser.Model/Notifications/NotificationType.cs +++ b/MediaBrowser.Model/Notifications/NotificationType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Notifications { public enum NotificationType diff --git a/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs b/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs index ff957e6449..efde211ed0 100644 --- a/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs +++ b/MediaBrowser.Model/Notifications/NotificationTypeInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Notifications { public class NotificationTypeInfo diff --git a/MediaBrowser.Model/Notifications/SendToUserType.cs b/MediaBrowser.Model/Notifications/SendToUserType.cs index 9f63d24bf0..07b1ac0182 100644 --- a/MediaBrowser.Model/Notifications/SendToUserType.cs +++ b/MediaBrowser.Model/Notifications/SendToUserType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Notifications { public enum SendToUserType diff --git a/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs b/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs index 007965c0fc..d5b85a5f48 100644 --- a/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs +++ b/MediaBrowser.Model/Playlists/PlaylistCreationRequest.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Playlists diff --git a/MediaBrowser.Model/Playlists/PlaylistCreationResult.cs b/MediaBrowser.Model/Playlists/PlaylistCreationResult.cs index 301ae66a7d..91a2af7d17 100644 --- a/MediaBrowser.Model/Playlists/PlaylistCreationResult.cs +++ b/MediaBrowser.Model/Playlists/PlaylistCreationResult.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Playlists { public class PlaylistCreationResult diff --git a/MediaBrowser.Model/Playlists/PlaylistItemQuery.cs b/MediaBrowser.Model/Playlists/PlaylistItemQuery.cs index 1f03c14d31..ec8c7eb09b 100644 --- a/MediaBrowser.Model/Playlists/PlaylistItemQuery.cs +++ b/MediaBrowser.Model/Playlists/PlaylistItemQuery.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Querying; namespace MediaBrowser.Model.Playlists diff --git a/MediaBrowser.Model/Plugins/IHasWebPages.cs b/MediaBrowser.Model/Plugins/IHasWebPages.cs index 5bda7e65e4..74f2ac0eef 100644 --- a/MediaBrowser.Model/Plugins/IHasWebPages.cs +++ b/MediaBrowser.Model/Plugins/IHasWebPages.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Collections.Generic; namespace MediaBrowser.Model.Plugins diff --git a/MediaBrowser.Model/Plugins/PluginPageInfo.cs b/MediaBrowser.Model/Plugins/PluginPageInfo.cs index 8ed2064b9b..e692c44319 100644 --- a/MediaBrowser.Model/Plugins/PluginPageInfo.cs +++ b/MediaBrowser.Model/Plugins/PluginPageInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Plugins { public class PluginPageInfo diff --git a/MediaBrowser.Model/Providers/ExternalIdInfo.cs b/MediaBrowser.Model/Providers/ExternalIdInfo.cs index bff84c5533..8c23a31ed4 100644 --- a/MediaBrowser.Model/Providers/ExternalIdInfo.cs +++ b/MediaBrowser.Model/Providers/ExternalIdInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Providers { public class ExternalIdInfo diff --git a/MediaBrowser.Model/Providers/ExternalUrl.cs b/MediaBrowser.Model/Providers/ExternalUrl.cs index 69cead92ab..0143e005f4 100644 --- a/MediaBrowser.Model/Providers/ExternalUrl.cs +++ b/MediaBrowser.Model/Providers/ExternalUrl.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Providers { public class ExternalUrl diff --git a/MediaBrowser.Model/Providers/ImageProviderInfo.cs b/MediaBrowser.Model/Providers/ImageProviderInfo.cs index 1c4cff3739..765fc2ceda 100644 --- a/MediaBrowser.Model/Providers/ImageProviderInfo.cs +++ b/MediaBrowser.Model/Providers/ImageProviderInfo.cs @@ -1,3 +1,7 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + +using System; using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Providers @@ -17,7 +21,7 @@ namespace MediaBrowser.Model.Providers public ImageProviderInfo() { - SupportedImages = new ImageType[] { }; + SupportedImages = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Providers/RemoteImageInfo.cs b/MediaBrowser.Model/Providers/RemoteImageInfo.cs index aacd108ec1..ee2b9d8fd1 100644 --- a/MediaBrowser.Model/Providers/RemoteImageInfo.cs +++ b/MediaBrowser.Model/Providers/RemoteImageInfo.cs @@ -4,7 +4,7 @@ using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Providers { /// - /// Class RemoteImageInfo + /// Class RemoteImageInfo. /// public class RemoteImageInfo { @@ -21,7 +21,7 @@ namespace MediaBrowser.Model.Providers public string Url { get; set; } /// - /// Gets a url used for previewing a smaller version + /// Gets a url used for previewing a smaller version. /// public string ThumbnailUrl { get; set; } diff --git a/MediaBrowser.Model/Providers/RemoteImageQuery.cs b/MediaBrowser.Model/Providers/RemoteImageQuery.cs index 7c9216ce78..e1762e6a48 100644 --- a/MediaBrowser.Model/Providers/RemoteImageQuery.cs +++ b/MediaBrowser.Model/Providers/RemoteImageQuery.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Providers diff --git a/MediaBrowser.Model/Providers/RemoteSearchResult.cs b/MediaBrowser.Model/Providers/RemoteSearchResult.cs index 6e46b1556d..64d70e18a3 100644 --- a/MediaBrowser.Model/Providers/RemoteSearchResult.cs +++ b/MediaBrowser.Model/Providers/RemoteSearchResult.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + 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 861aabf720..c252fb6e67 100644 --- a/MediaBrowser.Model/Providers/RemoteSubtitleInfo.cs +++ b/MediaBrowser.Model/Providers/RemoteSubtitleInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Providers diff --git a/MediaBrowser.Model/Providers/SubtitleOptions.cs b/MediaBrowser.Model/Providers/SubtitleOptions.cs index fde816dd36..d53fcef3b3 100644 --- a/MediaBrowser.Model/Providers/SubtitleOptions.cs +++ b/MediaBrowser.Model/Providers/SubtitleOptions.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Providers diff --git a/MediaBrowser.Model/Providers/SubtitleProviderInfo.cs b/MediaBrowser.Model/Providers/SubtitleProviderInfo.cs index 48a247818e..66c771a2cb 100644 --- a/MediaBrowser.Model/Providers/SubtitleProviderInfo.cs +++ b/MediaBrowser.Model/Providers/SubtitleProviderInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Providers { public class SubtitleProviderInfo diff --git a/MediaBrowser.Model/Querying/AllThemeMediaResult.cs b/MediaBrowser.Model/Querying/AllThemeMediaResult.cs index f843a33e68..d94928b0d8 100644 --- a/MediaBrowser.Model/Querying/AllThemeMediaResult.cs +++ b/MediaBrowser.Model/Querying/AllThemeMediaResult.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Querying { public class AllThemeMediaResult diff --git a/MediaBrowser.Model/Querying/EpisodeQuery.cs b/MediaBrowser.Model/Querying/EpisodeQuery.cs index 0c8ea7ed4c..2aeb979258 100644 --- a/MediaBrowser.Model/Querying/EpisodeQuery.cs +++ b/MediaBrowser.Model/Querying/EpisodeQuery.cs @@ -1,3 +1,8 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + +using System; + namespace MediaBrowser.Model.Querying { public class EpisodeQuery @@ -7,46 +12,55 @@ namespace MediaBrowser.Model.Querying /// /// The user identifier. public string UserId { get; set; } + /// /// Gets or sets the season identifier. /// /// The season identifier. public string SeasonId { get; set; } + /// /// Gets or sets the series identifier. /// /// The series identifier. public string SeriesId { get; set; } + /// /// Gets or sets a value indicating whether this instance is missing. /// /// null if [is missing] contains no value, true if [is missing]; otherwise, false. public bool? IsMissing { get; set; } + /// /// Gets or sets a value indicating whether this instance is virtual unaired. /// /// null if [is virtual unaired] contains no value, true if [is virtual unaired]; otherwise, false. public bool? IsVirtualUnaired { get; set; } + /// /// Gets or sets the season number. /// /// The season number. public int? SeasonNumber { get; set; } + /// /// Gets or sets the fields. /// /// The fields. public ItemFields[] Fields { get; set; } + /// /// Gets or sets the start index. /// /// The start index. public int? StartIndex { get; set; } + /// /// Gets or sets the limit. /// /// The limit. public int? Limit { get; set; } + /// /// Gets or sets the start item identifier. /// @@ -55,7 +69,7 @@ namespace MediaBrowser.Model.Querying public EpisodeQuery() { - Fields = new ItemFields[] { }; + Fields = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Querying/ItemCountsQuery.cs b/MediaBrowser.Model/Querying/ItemCountsQuery.cs index 02b809fa88..f113cf3808 100644 --- a/MediaBrowser.Model/Querying/ItemCountsQuery.cs +++ b/MediaBrowser.Model/Querying/ItemCountsQuery.cs @@ -1,7 +1,7 @@ namespace MediaBrowser.Model.Querying { /// - /// Class ItemCountsQuery + /// Class ItemCountsQuery. /// public class ItemCountsQuery { diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs index af1aaf486c..324f242e44 100644 --- a/MediaBrowser.Model/Querying/ItemFields.cs +++ b/MediaBrowser.Model/Querying/ItemFields.cs @@ -1,7 +1,10 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Querying { /// - /// Used to control the data that gets attached to DtoBaseItems + /// Used to control the data that gets attached to DtoBaseItems. /// public enum ItemFields { diff --git a/MediaBrowser.Model/Querying/ItemFilter.cs b/MediaBrowser.Model/Querying/ItemFilter.cs index b8dcfbdad3..0ebb5185f7 100644 --- a/MediaBrowser.Model/Querying/ItemFilter.cs +++ b/MediaBrowser.Model/Querying/ItemFilter.cs @@ -1,44 +1,52 @@ namespace MediaBrowser.Model.Querying { /// - /// Enum ItemFilter + /// Enum ItemFilter. /// public enum ItemFilter { /// - /// The item is a folder + /// The item is a folder. /// IsFolder = 1, + /// - /// The item is not folder + /// The item is not folder. /// IsNotFolder = 2, + /// - /// The item is unplayed + /// The item is unplayed. /// IsUnplayed = 3, + /// - /// The item is played + /// The item is played. /// IsPlayed = 4, + /// - /// The item is a favorite + /// The item is a favorite. /// IsFavorite = 5, + /// - /// The item is resumable + /// The item is resumable. /// IsResumable = 7, + /// - /// The likes + /// The likes. /// Likes = 8, + /// - /// The dislikes + /// The dislikes. /// Dislikes = 9, + /// - /// The is favorite or likes + /// The is favorite or likes. /// IsFavoriteOrLikes = 10 } diff --git a/MediaBrowser.Model/Querying/ItemSortBy.cs b/MediaBrowser.Model/Querying/ItemSortBy.cs index 6a71e3bb3e..553ba7c49b 100644 --- a/MediaBrowser.Model/Querying/ItemSortBy.cs +++ b/MediaBrowser.Model/Querying/ItemSortBy.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Querying { /// diff --git a/MediaBrowser.Model/Querying/LatestItemsQuery.cs b/MediaBrowser.Model/Querying/LatestItemsQuery.cs index 4a5818ac5f..d08ec8420b 100644 --- a/MediaBrowser.Model/Querying/LatestItemsQuery.cs +++ b/MediaBrowser.Model/Querying/LatestItemsQuery.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Entities; diff --git a/MediaBrowser.Model/Querying/MovieRecommendationQuery.cs b/MediaBrowser.Model/Querying/MovieRecommendationQuery.cs index 52c1383558..ea6b233846 100644 --- a/MediaBrowser.Model/Querying/MovieRecommendationQuery.cs +++ b/MediaBrowser.Model/Querying/MovieRecommendationQuery.cs @@ -1,3 +1,8 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + +using System; + namespace MediaBrowser.Model.Querying { public class MovieRecommendationQuery @@ -7,21 +12,25 @@ namespace MediaBrowser.Model.Querying /// /// The user identifier. public string UserId { get; set; } + /// /// Gets or sets the parent identifier. /// /// The parent identifier. public string ParentId { get; set; } + /// /// Gets or sets the item limit. /// /// The item limit. public int ItemLimit { get; set; } + /// /// Gets or sets the category limit. /// /// The category limit. public int CategoryLimit { get; set; } + /// /// Gets or sets the fields. /// @@ -32,7 +41,7 @@ namespace MediaBrowser.Model.Querying { ItemLimit = 10; CategoryLimit = 6; - Fields = new ItemFields[] { }; + Fields = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Querying/NextUpQuery.cs b/MediaBrowser.Model/Querying/NextUpQuery.cs index ff146cedee..14b10f4ce5 100644 --- a/MediaBrowser.Model/Querying/NextUpQuery.cs +++ b/MediaBrowser.Model/Querying/NextUpQuery.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Entities; @@ -40,16 +43,19 @@ namespace MediaBrowser.Model.Querying /// /// The fields. public ItemFields[] Fields { get; set; } + /// /// Gets or sets a value indicating whether [enable images]. /// /// null if [enable images] contains no value, true if [enable images]; otherwise, false. public bool? EnableImages { get; set; } + /// /// Gets or sets the image type limit. /// /// The image type limit. public int? ImageTypeLimit { get; set; } + /// /// Gets or sets the enable image types. /// @@ -60,7 +66,7 @@ namespace MediaBrowser.Model.Querying public NextUpQuery() { - EnableImageTypes = new ImageType[] { }; + EnableImageTypes = Array.Empty(); EnableTotalRecordCount = true; } } diff --git a/MediaBrowser.Model/Querying/QueryFilters.cs b/MediaBrowser.Model/Querying/QueryFilters.cs index 2f38299db3..f32ac46639 100644 --- a/MediaBrowser.Model/Querying/QueryFilters.cs +++ b/MediaBrowser.Model/Querying/QueryFilters.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Dto; diff --git a/MediaBrowser.Model/Querying/QueryResult.cs b/MediaBrowser.Model/Querying/QueryResult.cs index 221645afbf..ad89ae38d5 100644 --- a/MediaBrowser.Model/Querying/QueryResult.cs +++ b/MediaBrowser.Model/Querying/QueryResult.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; diff --git a/MediaBrowser.Model/Querying/SessionQuery.cs b/MediaBrowser.Model/Querying/SessionQuery.cs deleted file mode 100644 index 1fac9d639b..0000000000 --- a/MediaBrowser.Model/Querying/SessionQuery.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace MediaBrowser.Model.Querying -{ - /// - /// Class SessionQuery - /// - public class SessionQuery - { - /// - /// Filter by sessions that are allowed to be controlled by a given user - /// - public string ControllableByUserId { get; set; } - } -} diff --git a/MediaBrowser.Model/Querying/SimilarItemsQuery.cs b/MediaBrowser.Model/Querying/SimilarItemsQuery.cs deleted file mode 100644 index 68f761bd4d..0000000000 --- a/MediaBrowser.Model/Querying/SimilarItemsQuery.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace MediaBrowser.Model.Querying -{ - public class SimilarItemsQuery - { - /// - /// The user to localize search results for - /// - /// The user id. - public string UserId { get; set; } - - /// - /// Gets or sets the id. - /// - /// The id. - public string Id { get; set; } - - /// - /// The maximum number of items to return - /// - /// The limit. - public int? Limit { get; set; } - - /// - /// Fields to return within the items, in addition to basic information - /// - /// The fields. - public ItemFields[] Fields { get; set; } - } -} diff --git a/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs b/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs index 5eac2860da..6831dfbfd2 100644 --- a/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs +++ b/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using MediaBrowser.Model.Entities; namespace MediaBrowser.Model.Querying diff --git a/MediaBrowser.Model/Querying/UserQuery.cs b/MediaBrowser.Model/Querying/UserQuery.cs deleted file mode 100644 index 55cef664e7..0000000000 --- a/MediaBrowser.Model/Querying/UserQuery.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace MediaBrowser.Model.Querying -{ - public class UserQuery - { - public bool? IsHidden { get; set; } - public bool? IsDisabled { get; set; } - } -} diff --git a/MediaBrowser.Model/Search/SearchHint.cs b/MediaBrowser.Model/Search/SearchHint.cs index 8f4824903f..d67876036d 100644 --- a/MediaBrowser.Model/Search/SearchHint.cs +++ b/MediaBrowser.Model/Search/SearchHint.cs @@ -1,10 +1,13 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; namespace MediaBrowser.Model.Search { /// - /// Class SearchHintResult + /// Class SearchHintResult. /// public class SearchHint { diff --git a/MediaBrowser.Model/Search/SearchHintResult.cs b/MediaBrowser.Model/Search/SearchHintResult.cs index 069e7e025b..3c4fbec9e8 100644 --- a/MediaBrowser.Model/Search/SearchHintResult.cs +++ b/MediaBrowser.Model/Search/SearchHintResult.cs @@ -1,7 +1,7 @@ namespace MediaBrowser.Model.Search { /// - /// Class SearchHintResult + /// Class SearchHintResult. /// public class SearchHintResult { diff --git a/MediaBrowser.Model/Search/SearchQuery.cs b/MediaBrowser.Model/Search/SearchQuery.cs index 96a8cb00c3..af26ee2adf 100644 --- a/MediaBrowser.Model/Search/SearchQuery.cs +++ b/MediaBrowser.Model/Search/SearchQuery.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Search diff --git a/MediaBrowser.Model/Serialization/IJsonSerializer.cs b/MediaBrowser.Model/Serialization/IJsonSerializer.cs index 18f51f6525..302cb0daeb 100644 --- a/MediaBrowser.Model/Serialization/IJsonSerializer.cs +++ b/MediaBrowser.Model/Serialization/IJsonSerializer.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.IO; using System.Threading.Tasks; diff --git a/MediaBrowser.Model/Serialization/IXmlSerializer.cs b/MediaBrowser.Model/Serialization/IXmlSerializer.cs index 902ebd4d18..64a6b5eb8d 100644 --- a/MediaBrowser.Model/Serialization/IXmlSerializer.cs +++ b/MediaBrowser.Model/Serialization/IXmlSerializer.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.IO; diff --git a/MediaBrowser.Model/Services/ApiMemberAttribute.cs b/MediaBrowser.Model/Services/ApiMemberAttribute.cs index 8b155c8abe..7267fce247 100644 --- a/MediaBrowser.Model/Services/ApiMemberAttribute.cs +++ b/MediaBrowser.Model/Services/ApiMemberAttribute.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Services diff --git a/MediaBrowser.Model/Services/IAsyncStreamWriter.cs b/MediaBrowser.Model/Services/IAsyncStreamWriter.cs index f16a877e64..c93e05c56a 100644 --- a/MediaBrowser.Model/Services/IAsyncStreamWriter.cs +++ b/MediaBrowser.Model/Services/IAsyncStreamWriter.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + 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 b2d413b70e..484346d22b 100644 --- a/MediaBrowser.Model/Services/IHasHeaders.cs +++ b/MediaBrowser.Model/Services/IHasHeaders.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Collections.Generic; namespace MediaBrowser.Model.Services diff --git a/MediaBrowser.Model/Services/IHasRequestFilter.cs b/MediaBrowser.Model/Services/IHasRequestFilter.cs index 81a2dba692..c81e49e4eb 100644 --- a/MediaBrowser.Model/Services/IHasRequestFilter.cs +++ b/MediaBrowser.Model/Services/IHasRequestFilter.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using Microsoft.AspNetCore.Http; namespace MediaBrowser.Model.Services diff --git a/MediaBrowser.Model/Services/IHttpRequest.cs b/MediaBrowser.Model/Services/IHttpRequest.cs index daf91488f0..ab0cb52dc3 100644 --- a/MediaBrowser.Model/Services/IHttpRequest.cs +++ b/MediaBrowser.Model/Services/IHttpRequest.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Services { public interface IHttpRequest : IRequest diff --git a/MediaBrowser.Model/Services/IHttpResult.cs b/MediaBrowser.Model/Services/IHttpResult.cs index bfa30f60d1..4c7bfda05a 100644 --- a/MediaBrowser.Model/Services/IHttpResult.cs +++ b/MediaBrowser.Model/Services/IHttpResult.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.Net; namespace MediaBrowser.Model.Services diff --git a/MediaBrowser.Model/Services/IRequest.cs b/MediaBrowser.Model/Services/IRequest.cs index 7a41526986..7acc0aa8ae 100644 --- a/MediaBrowser.Model/Services/IRequest.cs +++ b/MediaBrowser.Model/Services/IRequest.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.IO; diff --git a/MediaBrowser.Model/Services/IRequiresRequestStream.cs b/MediaBrowser.Model/Services/IRequiresRequestStream.cs index 2f17c6a9aa..2c7cd71f1f 100644 --- a/MediaBrowser.Model/Services/IRequiresRequestStream.cs +++ b/MediaBrowser.Model/Services/IRequiresRequestStream.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.IO; namespace MediaBrowser.Model.Services diff --git a/MediaBrowser.Model/Services/IService.cs b/MediaBrowser.Model/Services/IService.cs index 8f2e63e988..5a72ba3339 100644 --- a/MediaBrowser.Model/Services/IService.cs +++ b/MediaBrowser.Model/Services/IService.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Services { // marker interface diff --git a/MediaBrowser.Model/Services/IStreamWriter.cs b/MediaBrowser.Model/Services/IStreamWriter.cs index 9d65cff63d..0d477a1250 100644 --- a/MediaBrowser.Model/Services/IStreamWriter.cs +++ b/MediaBrowser.Model/Services/IStreamWriter.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System.IO; namespace MediaBrowser.Model.Services diff --git a/MediaBrowser.Model/Services/QueryParamCollection.cs b/MediaBrowser.Model/Services/QueryParamCollection.cs index 7708db00a8..fb100d4b40 100644 --- a/MediaBrowser.Model/Services/QueryParamCollection.cs +++ b/MediaBrowser.Model/Services/QueryParamCollection.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Linq; diff --git a/MediaBrowser.Model/Services/RouteAttribute.cs b/MediaBrowser.Model/Services/RouteAttribute.cs index f6316e2b15..054abe219c 100644 --- a/MediaBrowser.Model/Services/RouteAttribute.cs +++ b/MediaBrowser.Model/Services/RouteAttribute.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Services diff --git a/MediaBrowser.Model/Session/BrowseRequest.cs b/MediaBrowser.Model/Session/BrowseRequest.cs index 65d58501bd..f485d680e2 100644 --- a/MediaBrowser.Model/Session/BrowseRequest.cs +++ b/MediaBrowser.Model/Session/BrowseRequest.cs @@ -1,12 +1,12 @@ namespace MediaBrowser.Model.Session { /// - /// Class BrowseRequest + /// Class BrowseRequest. /// public class BrowseRequest { /// - /// Artist, Genre, Studio, Person, or any kind of BaseItem + /// Artist, Genre, Studio, Person, or any kind of BaseItem. /// /// The type of the item. public string ItemType { get; set; } diff --git a/MediaBrowser.Model/Session/ClientCapabilities.cs b/MediaBrowser.Model/Session/ClientCapabilities.cs index fa74efb1b7..1c3aa03131 100644 --- a/MediaBrowser.Model/Session/ClientCapabilities.cs +++ b/MediaBrowser.Model/Session/ClientCapabilities.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Dlna; diff --git a/MediaBrowser.Model/Session/GeneralCommand.cs b/MediaBrowser.Model/Session/GeneralCommand.cs index 74e58e6786..0d1ad1e48b 100644 --- a/MediaBrowser.Model/Session/GeneralCommand.cs +++ b/MediaBrowser.Model/Session/GeneralCommand.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; diff --git a/MediaBrowser.Model/Session/GeneralCommandType.cs b/MediaBrowser.Model/Session/GeneralCommandType.cs index 4bb0c5cc50..5d85cef06e 100644 --- a/MediaBrowser.Model/Session/GeneralCommandType.cs +++ b/MediaBrowser.Model/Session/GeneralCommandType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Session { /// diff --git a/MediaBrowser.Model/Session/MessageCommand.cs b/MediaBrowser.Model/Session/MessageCommand.cs index 1e558ef077..3c9d04c781 100644 --- a/MediaBrowser.Model/Session/MessageCommand.cs +++ b/MediaBrowser.Model/Session/MessageCommand.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Session { public class MessageCommand diff --git a/MediaBrowser.Model/Session/PlayCommand.cs b/MediaBrowser.Model/Session/PlayCommand.cs index b7a8f39ba0..3ab049320e 100644 --- a/MediaBrowser.Model/Session/PlayCommand.cs +++ b/MediaBrowser.Model/Session/PlayCommand.cs @@ -1,28 +1,32 @@ namespace MediaBrowser.Model.Session { /// - /// Enum PlayCommand + /// Enum PlayCommand. /// public enum PlayCommand { /// - /// The play now + /// The play now. /// PlayNow = 0, + /// - /// The play next + /// The play next. /// PlayNext = 1, + /// - /// The play last + /// The play last. /// PlayLast = 2, + /// - /// The play instant mix + /// The play instant mix. /// PlayInstantMix = 3, + /// - /// The play shuffle + /// The play shuffle. /// PlayShuffle = 4 } diff --git a/MediaBrowser.Model/Session/PlayMethod.cs b/MediaBrowser.Model/Session/PlayMethod.cs index 8daf8c953b..9b8f0052a1 100644 --- a/MediaBrowser.Model/Session/PlayMethod.cs +++ b/MediaBrowser.Model/Session/PlayMethod.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Session { public enum PlayMethod diff --git a/MediaBrowser.Model/Session/PlayRequest.cs b/MediaBrowser.Model/Session/PlayRequest.cs index 075ae77302..ff53db15d8 100644 --- a/MediaBrowser.Model/Session/PlayRequest.cs +++ b/MediaBrowser.Model/Session/PlayRequest.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Services; diff --git a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs index c1d6306710..6401f8dccd 100644 --- a/MediaBrowser.Model/Session/PlaybackProgressInfo.cs +++ b/MediaBrowser.Model/Session/PlaybackProgressInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Dto; diff --git a/MediaBrowser.Model/Session/PlaybackStopInfo.cs b/MediaBrowser.Model/Session/PlaybackStopInfo.cs index 8a85b1998d..8ccf3cab70 100644 --- a/MediaBrowser.Model/Session/PlaybackStopInfo.cs +++ b/MediaBrowser.Model/Session/PlaybackStopInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Dto; @@ -13,36 +16,43 @@ namespace MediaBrowser.Model.Session /// /// The item. public BaseItemDto Item { get; set; } + /// /// Gets or sets the item identifier. /// /// The item identifier. public Guid ItemId { get; set; } + /// /// Gets or sets the session id. /// /// The session id. public string SessionId { get; set; } + /// /// Gets or sets the media version identifier. /// /// The media version identifier. public string MediaSourceId { get; set; } + /// /// Gets or sets the position ticks. /// /// The position ticks. public long? PositionTicks { get; set; } + /// /// Gets or sets the live stream identifier. /// /// The live stream identifier. public string LiveStreamId { get; set; } + /// /// Gets or sets the play session identifier. /// /// The play session identifier. public string PlaySessionId { get; set; } + /// /// Gets or sets a value indicating whether this is failed. /// diff --git a/MediaBrowser.Model/Session/PlayerStateInfo.cs b/MediaBrowser.Model/Session/PlayerStateInfo.cs index 7e54e16c8f..d7b74fb6c2 100644 --- a/MediaBrowser.Model/Session/PlayerStateInfo.cs +++ b/MediaBrowser.Model/Session/PlayerStateInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Session { public class PlayerStateInfo diff --git a/MediaBrowser.Model/Session/PlaystateCommand.cs b/MediaBrowser.Model/Session/PlaystateCommand.cs index 6eb3e53c21..64dd948bf7 100644 --- a/MediaBrowser.Model/Session/PlaystateCommand.cs +++ b/MediaBrowser.Model/Session/PlaystateCommand.cs @@ -1,40 +1,50 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Session { /// - /// Enum PlaystateCommand + /// Enum PlaystateCommand. /// public enum PlaystateCommand { /// - /// The stop + /// The stop. /// Stop, + /// - /// The pause + /// The pause. /// Pause, + /// - /// The unpause + /// The unpause. /// Unpause, + /// - /// The next track + /// The next track. /// NextTrack, + /// - /// The previous track + /// The previous track. /// PreviousTrack, + /// - /// The seek + /// The seek. /// Seek, + /// - /// The rewind + /// The rewind. /// Rewind, + /// - /// The fast forward + /// The fast forward. /// FastForward, PlayPause diff --git a/MediaBrowser.Model/Session/PlaystateRequest.cs b/MediaBrowser.Model/Session/PlaystateRequest.cs index 08d3f00725..504dcd25b4 100644 --- a/MediaBrowser.Model/Session/PlaystateRequest.cs +++ b/MediaBrowser.Model/Session/PlaystateRequest.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Session { public class PlaystateRequest diff --git a/MediaBrowser.Model/Session/TranscodingInfo.cs b/MediaBrowser.Model/Session/TranscodingInfo.cs index 5161882fd8..68edb42ff9 100644 --- a/MediaBrowser.Model/Session/TranscodingInfo.cs +++ b/MediaBrowser.Model/Session/TranscodingInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Session { public class TranscodingInfo diff --git a/MediaBrowser.Model/Session/UserDataChangeInfo.cs b/MediaBrowser.Model/Session/UserDataChangeInfo.cs index ef0e2c89a7..0872eb4b11 100644 --- a/MediaBrowser.Model/Session/UserDataChangeInfo.cs +++ b/MediaBrowser.Model/Session/UserDataChangeInfo.cs @@ -3,7 +3,7 @@ using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.Session { /// - /// Class UserDataChangeInfo + /// Class UserDataChangeInfo. /// public class UserDataChangeInfo { diff --git a/MediaBrowser.Model/Sync/SyncCategory.cs b/MediaBrowser.Model/Sync/SyncCategory.cs index 637c5ba74e..8981f479b7 100644 --- a/MediaBrowser.Model/Sync/SyncCategory.cs +++ b/MediaBrowser.Model/Sync/SyncCategory.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Sync { public enum SyncCategory diff --git a/MediaBrowser.Model/Sync/SyncJob.cs b/MediaBrowser.Model/Sync/SyncJob.cs index 7a1f76fe91..4295d5a3e7 100644 --- a/MediaBrowser.Model/Sync/SyncJob.cs +++ b/MediaBrowser.Model/Sync/SyncJob.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Sync @@ -9,91 +12,109 @@ namespace MediaBrowser.Model.Sync /// /// The identifier. public string Id { get; set; } + /// /// Gets or sets the device identifier. /// /// The device identifier. public string TargetId { get; set; } + /// /// Gets or sets the name of the target. /// /// The name of the target. public string TargetName { get; set; } + /// /// Gets or sets the quality. /// /// The quality. public string Quality { get; set; } + /// /// Gets or sets the bitrate. /// /// The bitrate. public int? Bitrate { get; set; } + /// /// Gets or sets the profile. /// /// The profile. public string Profile { get; set; } + /// /// Gets or sets the category. /// /// The category. public SyncCategory? Category { get; set; } + /// /// Gets or sets the parent identifier. /// /// The parent identifier. public string ParentId { get; set; } + /// /// Gets or sets the current progress. /// /// The current progress. public double? Progress { get; set; } + /// /// Gets or sets the name. /// /// The name. public string Name { get; set; } + /// /// Gets or sets the status. /// /// The status. public SyncJobStatus Status { get; set; } + /// /// Gets or sets the user identifier. /// /// The user identifier. public string UserId { get; set; } + /// /// Gets or sets a value indicating whether [unwatched only]. /// /// true if [unwatched only]; otherwise, false. public bool UnwatchedOnly { get; set; } + /// /// Gets or sets a value indicating whether [synchronize new content]. /// /// true if [synchronize new content]; otherwise, false. public bool SyncNewContent { get; set; } + /// /// Gets or sets the item limit. /// /// The item limit. public int? ItemLimit { get; set; } + /// /// Gets or sets the requested item ids. /// /// The requested item ids. public Guid[] RequestedItemIds { get; set; } + /// /// Gets or sets the date created. /// /// The date created. public DateTime DateCreated { get; set; } + /// /// Gets or sets the date last modified. /// /// The date last modified. public DateTime DateLastModified { get; set; } + /// /// Gets or sets the item count. /// diff --git a/MediaBrowser.Model/Sync/SyncJobStatus.cs b/MediaBrowser.Model/Sync/SyncJobStatus.cs index 4ea3d3fa5f..e8cc8d2bfb 100644 --- a/MediaBrowser.Model/Sync/SyncJobStatus.cs +++ b/MediaBrowser.Model/Sync/SyncJobStatus.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Sync { public enum SyncJobStatus diff --git a/MediaBrowser.Model/Sync/SyncTarget.cs b/MediaBrowser.Model/Sync/SyncTarget.cs index a94bf9a259..b6c4dba4b4 100644 --- a/MediaBrowser.Model/Sync/SyncTarget.cs +++ b/MediaBrowser.Model/Sync/SyncTarget.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Sync { public class SyncTarget @@ -7,6 +10,7 @@ namespace MediaBrowser.Model.Sync /// /// The name. public string Name { get; set; } + /// /// Gets or sets the identifier. /// diff --git a/MediaBrowser.Model/System/LogFile.cs b/MediaBrowser.Model/System/LogFile.cs index 913e8e1eaa..1e21203d01 100644 --- a/MediaBrowser.Model/System/LogFile.cs +++ b/MediaBrowser.Model/System/LogFile.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.System diff --git a/MediaBrowser.Model/System/OperatingSystemId.cs b/MediaBrowser.Model/System/OperatingSystemId.cs index e81dd4213f..6ccbe40e2b 100644 --- a/MediaBrowser.Model/System/OperatingSystemId.cs +++ b/MediaBrowser.Model/System/OperatingSystemId.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.System { public enum OperatingSystemId diff --git a/MediaBrowser.Model/System/PublicSystemInfo.cs b/MediaBrowser.Model/System/PublicSystemInfo.cs index 23f6d378c1..34257de386 100644 --- a/MediaBrowser.Model/System/PublicSystemInfo.cs +++ b/MediaBrowser.Model/System/PublicSystemInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.System { public class PublicSystemInfo diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs index 7014a5c87c..190411c9ba 100644 --- a/MediaBrowser.Model/System/SystemInfo.cs +++ b/MediaBrowser.Model/System/SystemInfo.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Runtime.InteropServices; using MediaBrowser.Model.Updates; diff --git a/MediaBrowser.Model/Tasks/IConfigurableScheduledTask.cs b/MediaBrowser.Model/Tasks/IConfigurableScheduledTask.cs index 9c4b75c549..8a873163ac 100644 --- a/MediaBrowser.Model/Tasks/IConfigurableScheduledTask.cs +++ b/MediaBrowser.Model/Tasks/IConfigurableScheduledTask.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Tasks { public interface IConfigurableScheduledTask diff --git a/MediaBrowser.Model/Tasks/IScheduledTask.cs b/MediaBrowser.Model/Tasks/IScheduledTask.cs index 71f6e15f8e..7708cd3072 100644 --- a/MediaBrowser.Model/Tasks/IScheduledTask.cs +++ b/MediaBrowser.Model/Tasks/IScheduledTask.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Threading; diff --git a/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs b/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs index 61e3a65ebe..4dd1bb5d04 100644 --- a/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs +++ b/MediaBrowser.Model/Tasks/IScheduledTaskWorker.cs @@ -4,7 +4,7 @@ using MediaBrowser.Model.Events; namespace MediaBrowser.Model.Tasks { /// - /// Interface IScheduledTaskWorker + /// Interface IScheduledTaskWorker. /// public interface IScheduledTaskWorker : IDisposable { diff --git a/MediaBrowser.Model/Tasks/ITaskManager.cs b/MediaBrowser.Model/Tasks/ITaskManager.cs index 57b8d1af81..f962d3b30a 100644 --- a/MediaBrowser.Model/Tasks/ITaskManager.cs +++ b/MediaBrowser.Model/Tasks/ITaskManager.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Collections.Generic; using System.Threading.Tasks; diff --git a/MediaBrowser.Model/Tasks/ITaskTrigger.cs b/MediaBrowser.Model/Tasks/ITaskTrigger.cs index c8433ed21c..5c30d6c220 100644 --- a/MediaBrowser.Model/Tasks/ITaskTrigger.cs +++ b/MediaBrowser.Model/Tasks/ITaskTrigger.cs @@ -4,12 +4,12 @@ using Microsoft.Extensions.Logging; namespace MediaBrowser.Model.Tasks { /// - /// Interface ITaskTrigger + /// Interface ITaskTrigger. /// public interface ITaskTrigger { /// - /// Fires when the trigger condition is satisfied and the task should run + /// Fires when the trigger condition is satisfied and the task should run. /// event EventHandler Triggered; @@ -19,12 +19,12 @@ namespace MediaBrowser.Model.Tasks TaskOptions TaskOptions { get; set; } /// - /// Stars waiting for the trigger action + /// Stars waiting for the trigger action. /// void Start(TaskResult lastResult, ILogger logger, string taskName, bool isApplicationStartup); /// - /// Stops waiting for the trigger action + /// Stops waiting for the trigger action. /// void Stop(); } diff --git a/MediaBrowser.Model/Tasks/ScheduledTaskHelpers.cs b/MediaBrowser.Model/Tasks/ScheduledTaskHelpers.cs index e461e4a4b7..ca0743ccae 100644 --- a/MediaBrowser.Model/Tasks/ScheduledTaskHelpers.cs +++ b/MediaBrowser.Model/Tasks/ScheduledTaskHelpers.cs @@ -1,7 +1,7 @@ namespace MediaBrowser.Model.Tasks { /// - /// Class ScheduledTaskHelpers + /// Class ScheduledTaskHelpers. /// public static class ScheduledTaskHelpers { diff --git a/MediaBrowser.Model/Tasks/TaskCompletionEventArgs.cs b/MediaBrowser.Model/Tasks/TaskCompletionEventArgs.cs index 05eaff8dac..29c9b740d0 100644 --- a/MediaBrowser.Model/Tasks/TaskCompletionEventArgs.cs +++ b/MediaBrowser.Model/Tasks/TaskCompletionEventArgs.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Tasks diff --git a/MediaBrowser.Model/Tasks/TaskCompletionStatus.cs b/MediaBrowser.Model/Tasks/TaskCompletionStatus.cs index 4d7ff523d1..5c8b5f2235 100644 --- a/MediaBrowser.Model/Tasks/TaskCompletionStatus.cs +++ b/MediaBrowser.Model/Tasks/TaskCompletionStatus.cs @@ -1,27 +1,27 @@ namespace MediaBrowser.Model.Tasks { /// - /// Enum TaskCompletionStatus + /// Enum TaskCompletionStatus. /// public enum TaskCompletionStatus { /// - /// The completed + /// The completed. /// Completed, /// - /// The failed + /// The failed. /// Failed, /// - /// Manually cancelled by the user + /// Manually cancelled by the user. /// Cancelled, /// - /// Aborted due to a system failure or shutdown + /// Aborted due to a system failure or shutdown. /// Aborted } diff --git a/MediaBrowser.Model/Tasks/TaskInfo.cs b/MediaBrowser.Model/Tasks/TaskInfo.cs index 8d80e68cff..5144c035ab 100644 --- a/MediaBrowser.Model/Tasks/TaskInfo.cs +++ b/MediaBrowser.Model/Tasks/TaskInfo.cs @@ -1,7 +1,9 @@ +using System; + namespace MediaBrowser.Model.Tasks { /// - /// Class TaskInfo + /// Class TaskInfo. /// public class TaskInfo { @@ -70,7 +72,7 @@ namespace MediaBrowser.Model.Tasks /// public TaskInfo() { - Triggers = new TaskTriggerInfo[] { }; + Triggers = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Tasks/TaskOptions.cs b/MediaBrowser.Model/Tasks/TaskOptions.cs index a9f03303a0..4ff6b82d47 100644 --- a/MediaBrowser.Model/Tasks/TaskOptions.cs +++ b/MediaBrowser.Model/Tasks/TaskOptions.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Tasks { public class TaskOptions diff --git a/MediaBrowser.Model/Tasks/TaskResult.cs b/MediaBrowser.Model/Tasks/TaskResult.cs index eede9069f2..c6f92e7ed5 100644 --- a/MediaBrowser.Model/Tasks/TaskResult.cs +++ b/MediaBrowser.Model/Tasks/TaskResult.cs @@ -3,7 +3,7 @@ using System; namespace MediaBrowser.Model.Tasks { /// - /// Class TaskExecutionInfo + /// Class TaskExecutionInfo. /// public class TaskResult { diff --git a/MediaBrowser.Model/Tasks/TaskState.cs b/MediaBrowser.Model/Tasks/TaskState.cs index 91bc7f682c..619dedb70f 100644 --- a/MediaBrowser.Model/Tasks/TaskState.cs +++ b/MediaBrowser.Model/Tasks/TaskState.cs @@ -1,20 +1,22 @@ namespace MediaBrowser.Model.Tasks { /// - /// Enum TaskState + /// Enum TaskState. /// public enum TaskState { /// - /// The idle + /// The idle. /// Idle, + /// - /// The cancelling + /// The cancelling. /// Cancelling, + /// - /// The running + /// The running. /// Running } diff --git a/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs b/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs index 714f118722..e7b54f3a71 100644 --- a/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs +++ b/MediaBrowser.Model/Tasks/TaskTriggerInfo.cs @@ -1,9 +1,12 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Tasks { /// - /// Class TaskTriggerInfo + /// Class TaskTriggerInfo. /// public class TaskTriggerInfo { diff --git a/MediaBrowser.Model/Updates/CheckForUpdateResult.cs b/MediaBrowser.Model/Updates/CheckForUpdateResult.cs index 4c66c6d49c..be1b082238 100644 --- a/MediaBrowser.Model/Updates/CheckForUpdateResult.cs +++ b/MediaBrowser.Model/Updates/CheckForUpdateResult.cs @@ -1,7 +1,7 @@ namespace MediaBrowser.Model.Updates { /// - /// Class CheckForUpdateResult + /// Class CheckForUpdateResult. /// public class CheckForUpdateResult { diff --git a/MediaBrowser.Model/Updates/InstallationInfo.cs b/MediaBrowser.Model/Updates/InstallationInfo.cs index 7554e9fe20..42c2105f54 100644 --- a/MediaBrowser.Model/Updates/InstallationInfo.cs +++ b/MediaBrowser.Model/Updates/InstallationInfo.cs @@ -3,7 +3,7 @@ using System; namespace MediaBrowser.Model.Updates { /// - /// Class InstallationInfo + /// Class InstallationInfo. /// public class InstallationInfo { diff --git a/MediaBrowser.Model/Updates/PackageInfo.cs b/MediaBrowser.Model/Updates/PackageInfo.cs index 5dd9c65918..abbe91eff6 100644 --- a/MediaBrowser.Model/Updates/PackageInfo.cs +++ b/MediaBrowser.Model/Updates/PackageInfo.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; namespace MediaBrowser.Model.Updates { /// - /// Class PackageInfo + /// Class PackageInfo. /// public class PackageInfo { @@ -170,7 +170,7 @@ namespace MediaBrowser.Model.Updates /// public PackageInfo() { - versions = new PackageVersionInfo[] { }; + versions = Array.Empty(); } } } diff --git a/MediaBrowser.Model/Updates/PackageTargetSystem.cs b/MediaBrowser.Model/Updates/PackageTargetSystem.cs index a0646f9597..11af7f02dd 100644 --- a/MediaBrowser.Model/Updates/PackageTargetSystem.cs +++ b/MediaBrowser.Model/Updates/PackageTargetSystem.cs @@ -1,20 +1,22 @@ namespace MediaBrowser.Model.Updates { /// - /// Enum PackageType + /// Enum PackageType. /// public enum PackageTargetSystem { /// - /// Server + /// Server. /// Server, + /// - /// MB Theater + /// MB Theater. /// MBTheater, + /// - /// MB Classic + /// MB Classic. /// MBClassic } diff --git a/MediaBrowser.Model/Updates/PackageVersionClass.cs b/MediaBrowser.Model/Updates/PackageVersionClass.cs index 52f08b73b7..f813f2c974 100644 --- a/MediaBrowser.Model/Updates/PackageVersionClass.cs +++ b/MediaBrowser.Model/Updates/PackageVersionClass.cs @@ -1,20 +1,22 @@ namespace MediaBrowser.Model.Updates { /// - /// Enum PackageVersionClass + /// Enum PackageVersionClass. /// public enum PackageVersionClass { /// - /// The release + /// The release. /// Release = 0, + /// - /// The beta + /// The beta. /// Beta = 1, + /// - /// The dev + /// The dev. /// Dev = 2 } diff --git a/MediaBrowser.Model/Updates/PackageVersionInfo.cs b/MediaBrowser.Model/Updates/PackageVersionInfo.cs index c0790317d5..85d8fde860 100644 --- a/MediaBrowser.Model/Updates/PackageVersionInfo.cs +++ b/MediaBrowser.Model/Updates/PackageVersionInfo.cs @@ -1,10 +1,13 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using System.Text.Json.Serialization; namespace MediaBrowser.Model.Updates { /// - /// Class PackageVersionInfo + /// Class PackageVersionInfo. /// public class PackageVersionInfo { diff --git a/MediaBrowser.Model/Users/ForgotPasswordAction.cs b/MediaBrowser.Model/Users/ForgotPasswordAction.cs index 2124126c19..1e4812849b 100644 --- a/MediaBrowser.Model/Users/ForgotPasswordAction.cs +++ b/MediaBrowser.Model/Users/ForgotPasswordAction.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Users { public enum ForgotPasswordAction diff --git a/MediaBrowser.Model/Users/ForgotPasswordResult.cs b/MediaBrowser.Model/Users/ForgotPasswordResult.cs index 2f9b4cf48a..90c9313beb 100644 --- a/MediaBrowser.Model/Users/ForgotPasswordResult.cs +++ b/MediaBrowser.Model/Users/ForgotPasswordResult.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Users @@ -9,11 +12,13 @@ namespace MediaBrowser.Model.Users /// /// The action. public ForgotPasswordAction Action { get; set; } + /// /// Gets or sets the pin file. /// /// The pin file. public string PinFile { get; set; } + /// /// Gets or sets the pin expiration date. /// diff --git a/MediaBrowser.Model/Users/PinRedeemResult.cs b/MediaBrowser.Model/Users/PinRedeemResult.cs index 35663ba57f..30ad41f198 100644 --- a/MediaBrowser.Model/Users/PinRedeemResult.cs +++ b/MediaBrowser.Model/Users/PinRedeemResult.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Users { public class PinRedeemResult @@ -7,6 +10,7 @@ namespace MediaBrowser.Model.Users /// /// true if success; otherwise, false. public bool Success { get; set; } + /// /// Gets or sets the users reset. /// diff --git a/MediaBrowser.Model/Users/UserAction.cs b/MediaBrowser.Model/Users/UserAction.cs index 48b5bbef13..fdc7d5bf48 100644 --- a/MediaBrowser.Model/Users/UserAction.cs +++ b/MediaBrowser.Model/Users/UserAction.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; namespace MediaBrowser.Model.Users diff --git a/MediaBrowser.Model/Users/UserActionType.cs b/MediaBrowser.Model/Users/UserActionType.cs index 5d843a7388..241759caf7 100644 --- a/MediaBrowser.Model/Users/UserActionType.cs +++ b/MediaBrowser.Model/Users/UserActionType.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + namespace MediaBrowser.Model.Users { public enum UserActionType diff --git a/MediaBrowser.Model/Users/UserPolicy.cs b/MediaBrowser.Model/Users/UserPolicy.cs index 9c3e1f9808..e5f66b34b2 100644 --- a/MediaBrowser.Model/Users/UserPolicy.cs +++ b/MediaBrowser.Model/Users/UserPolicy.cs @@ -1,3 +1,6 @@ +#pragma warning disable CS1591 +#pragma warning disable SA1600 + using System; using MediaBrowser.Model.Configuration; From c2733ac0dc50e0447a6906a634d27ec9f111d23a Mon Sep 17 00:00:00 2001 From: dkanada Date: Thu, 6 Feb 2020 00:26:21 +0900 Subject: [PATCH 17/44] split api keys into their own service --- MediaBrowser.Api/Session/ApiKeysService.cs | 85 +++++++++++++++++++++ MediaBrowser.Api/Session/SessionsService.cs | 66 +--------------- 2 files changed, 88 insertions(+), 63 deletions(-) create mode 100644 MediaBrowser.Api/Session/ApiKeysService.cs diff --git a/MediaBrowser.Api/Session/ApiKeysService.cs b/MediaBrowser.Api/Session/ApiKeysService.cs new file mode 100644 index 0000000000..45d7ff4215 --- /dev/null +++ b/MediaBrowser.Api/Session/ApiKeysService.cs @@ -0,0 +1,85 @@ +using System; +using System.Globalization; +using MediaBrowser.Controller; +using MediaBrowser.Controller.Configuration; +using MediaBrowser.Controller.Net; +using MediaBrowser.Controller.Security; +using MediaBrowser.Controller.Session; +using MediaBrowser.Model.Services; +using Microsoft.Extensions.Logging; + +namespace MediaBrowser.Api.Session +{ + [Route("/Auth/Keys", "GET")] + [Authenticated(Roles = "Admin")] + public class GetApiKeys + { + } + + [Route("/Auth/Keys/{Key}", "DELETE")] + [Authenticated(Roles = "Admin")] + public class RevokeKey + { + [ApiMember(Name = "Key", Description = "Authentication key", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "DELETE")] + public string Key { get; set; } + } + + [Route("/Auth/Keys", "POST")] + [Authenticated(Roles = "Admin")] + public class CreateKey + { + [ApiMember(Name = "App", Description = "Name of the app using the authentication key", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")] + public string App { get; set; } + } + + public class ApiKeysService : BaseApiService + { + private readonly ISessionManager _sessionManager; + + private readonly IAuthenticationRepository _authRepo; + + private readonly IServerApplicationHost _appHost; + + public ApiKeysService( + ILogger logger, + IServerConfigurationManager serverConfigurationManager, + IHttpResultFactory httpResultFactory, + ISessionManager sessionManager, + IServerApplicationHost appHost, + IAuthenticationRepository authRepo) + : base(logger, serverConfigurationManager, httpResultFactory) + { + _sessionManager = sessionManager; + _authRepo = authRepo; + _appHost = appHost; + } + + public void Delete(RevokeKey request) + { + _sessionManager.RevokeToken(request.Key); + } + + public void Post(CreateKey request) + { + _authRepo.Create(new AuthenticationInfo + { + AppName = request.App, + AccessToken = Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture), + DateCreated = DateTime.UtcNow, + DeviceId = _appHost.SystemId, + DeviceName = _appHost.FriendlyName, + AppVersion = _appHost.ApplicationVersionString + }); + } + + public object Get(GetApiKeys request) + { + var result = _authRepo.Get(new AuthenticationInfoQuery + { + HasUser = false + }); + + return result; + } + } +} diff --git a/MediaBrowser.Api/Session/SessionsService.cs b/MediaBrowser.Api/Session/SessionsService.cs index 700861c554..01727b238b 100644 --- a/MediaBrowser.Api/Session/SessionsService.cs +++ b/MediaBrowser.Api/Session/SessionsService.cs @@ -1,14 +1,11 @@ using System; -using System.Globalization; using System.Linq; using System.Threading; using System.Threading.Tasks; -using MediaBrowser.Controller; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Devices; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Net; -using MediaBrowser.Controller.Security; using MediaBrowser.Controller.Session; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Services; @@ -24,10 +21,10 @@ namespace MediaBrowser.Api.Session [Authenticated] public class GetSessions : IReturn { - [ApiMember(Name = "ControllableByUserId", Description = "Optional. Filter by sessions that a given user is allowed to remote control.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")] + [ApiMember(Name = "ControllableByUserId", Description = "Filter by sessions that a given user is allowed to remote control.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")] public Guid ControllableByUserId { get; set; } - [ApiMember(Name = "DeviceId", Description = "Optional. Filter by device id.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")] + [ApiMember(Name = "DeviceId", Description = "Filter by device Id.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")] public string DeviceId { get; set; } public int? ActiveWithinSeconds { get; set; } @@ -182,7 +179,7 @@ namespace MediaBrowser.Api.Session [ApiMember(Name = "Id", Description = "Session Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")] public string Id { get; set; } - [ApiMember(Name = "UserId", Description = "UserId Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")] + [ApiMember(Name = "UserId", Description = "User Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")] public string UserId { get; set; } } @@ -236,12 +233,6 @@ namespace MediaBrowser.Api.Session { } - [Route("/Auth/Keys", "GET")] - [Authenticated(Roles = "Admin")] - public class GetApiKeys - { - } - [Route("/Auth/Providers", "GET")] [Authenticated(Roles = "Admin")] public class GetAuthProviders : IReturn @@ -254,22 +245,6 @@ namespace MediaBrowser.Api.Session { } - [Route("/Auth/Keys/{Key}", "DELETE")] - [Authenticated(Roles = "Admin")] - public class RevokeKey - { - [ApiMember(Name = "Key", Description = "Auth Key", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "DELETE")] - public string Key { get; set; } - } - - [Route("/Auth/Keys", "POST")] - [Authenticated(Roles = "Admin")] - public class CreateKey - { - [ApiMember(Name = "App", Description = "App", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")] - public string App { get; set; } - } - /// /// Class SessionsService. /// @@ -282,20 +257,16 @@ namespace MediaBrowser.Api.Session private readonly IUserManager _userManager; private readonly IAuthorizationContext _authContext; - private readonly IAuthenticationRepository _authRepo; private readonly IDeviceManager _deviceManager; private readonly ISessionContext _sessionContext; - private readonly IServerApplicationHost _appHost; public SessionsService( ILogger logger, IServerConfigurationManager serverConfigurationManager, IHttpResultFactory httpResultFactory, ISessionManager sessionManager, - IServerApplicationHost appHost, IUserManager userManager, IAuthorizationContext authContext, - IAuthenticationRepository authRepo, IDeviceManager deviceManager, ISessionContext sessionContext) : base(logger, serverConfigurationManager, httpResultFactory) @@ -303,10 +274,8 @@ namespace MediaBrowser.Api.Session _sessionManager = sessionManager; _userManager = userManager; _authContext = authContext; - _authRepo = authRepo; _deviceManager = deviceManager; _sessionContext = sessionContext; - _appHost = appHost; } public object Get(GetAuthProviders request) @@ -319,25 +288,6 @@ namespace MediaBrowser.Api.Session return _userManager.GetPasswordResetProviders(); } - public void Delete(RevokeKey request) - { - _sessionManager.RevokeToken(request.Key); - - } - - public void Post(CreateKey request) - { - _authRepo.Create(new AuthenticationInfo - { - AppName = request.App, - AccessToken = Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture), - DateCreated = DateTime.UtcNow, - DeviceId = _appHost.SystemId, - DeviceName = _appHost.FriendlyName, - AppVersion = _appHost.ApplicationVersionString - }); - } - public void Post(ReportSessionEnded request) { var auth = _authContext.GetAuthorizationInfo(Request); @@ -345,16 +295,6 @@ namespace MediaBrowser.Api.Session _sessionManager.Logout(auth.Token); } - public object Get(GetApiKeys request) - { - var result = _authRepo.Get(new AuthenticationInfoQuery - { - HasUser = false - }); - - return result; - } - /// /// Gets the specified request. /// From a954d5e953f97ef0ce54077a12c9ebf1e7274f53 Mon Sep 17 00:00:00 2001 From: sebpomme Date: Wed, 5 Feb 2020 16:26:51 +0100 Subject: [PATCH 18/44] Fix qui start guide url in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bbac4dd25a..ea54b8c8b0 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Jellyfin is a Free Software Media System that puts you in control of managing an For further details, please see [our documentation page](https://docs.jellyfin.org/). To receive the latest updates, get help with Jellyfin, and join the community, please visit [one of our communication channels](https://docs.jellyfin.org/general/getting-help.html). For more information about the project, please see our [about page](https://docs.jellyfin.org/general/about.html). Want to get started?
-Choose from Prebuilt Packages or Build from Source, then see our quick start guide.
+Choose from Prebuilt Packages or Build from Source, then see our quick start guide.
Something not working right?
Open an Issue on GitHub.
From 1cb51a8ac79c8cc2b2bde3e4279b18765a5851e6 Mon Sep 17 00:00:00 2001 From: dkanada Date: Thu, 6 Feb 2020 00:47:50 +0900 Subject: [PATCH 19/44] rename session folder --- .../ApiKeysService.cs => Sessions/ApiKeyService.cs} | 12 ++++++------ .../SessionInfoWebSocketListener.cs | 2 +- .../SessionService.cs} | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) rename MediaBrowser.Api/{Session/ApiKeysService.cs => Sessions/ApiKeyService.cs} (91%) rename MediaBrowser.Api/{Session => Sessions}/SessionInfoWebSocketListener.cs (98%) rename MediaBrowser.Api/{Session/SessionsService.cs => Sessions/SessionService.cs} (99%) diff --git a/MediaBrowser.Api/Session/ApiKeysService.cs b/MediaBrowser.Api/Sessions/ApiKeyService.cs similarity index 91% rename from MediaBrowser.Api/Session/ApiKeysService.cs rename to MediaBrowser.Api/Sessions/ApiKeyService.cs index 45d7ff4215..5102ce0a7c 100644 --- a/MediaBrowser.Api/Session/ApiKeysService.cs +++ b/MediaBrowser.Api/Sessions/ApiKeyService.cs @@ -8,11 +8,11 @@ using MediaBrowser.Controller.Session; using MediaBrowser.Model.Services; using Microsoft.Extensions.Logging; -namespace MediaBrowser.Api.Session +namespace MediaBrowser.Api.Sessions { [Route("/Auth/Keys", "GET")] [Authenticated(Roles = "Admin")] - public class GetApiKeys + public class GetKeys { } @@ -32,7 +32,7 @@ namespace MediaBrowser.Api.Session public string App { get; set; } } - public class ApiKeysService : BaseApiService + public class ApiKeyService : BaseApiService { private readonly ISessionManager _sessionManager; @@ -40,8 +40,8 @@ namespace MediaBrowser.Api.Session private readonly IServerApplicationHost _appHost; - public ApiKeysService( - ILogger logger, + public ApiKeyService( + ILogger logger, IServerConfigurationManager serverConfigurationManager, IHttpResultFactory httpResultFactory, ISessionManager sessionManager, @@ -72,7 +72,7 @@ namespace MediaBrowser.Api.Session }); } - public object Get(GetApiKeys request) + public object Get(GetKeys request) { var result = _authRepo.Get(new AuthenticationInfoQuery { diff --git a/MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs b/MediaBrowser.Api/Sessions/SessionInfoWebSocketListener.cs similarity index 98% rename from MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs rename to MediaBrowser.Api/Sessions/SessionInfoWebSocketListener.cs index f1a6622fb5..051d09850a 100644 --- a/MediaBrowser.Api/Session/SessionInfoWebSocketListener.cs +++ b/MediaBrowser.Api/Sessions/SessionInfoWebSocketListener.cs @@ -5,7 +5,7 @@ using MediaBrowser.Controller.Net; using MediaBrowser.Controller.Session; using Microsoft.Extensions.Logging; -namespace MediaBrowser.Api.Session +namespace MediaBrowser.Api.Sessions { /// /// Class SessionInfoWebSocketListener diff --git a/MediaBrowser.Api/Session/SessionsService.cs b/MediaBrowser.Api/Sessions/SessionService.cs similarity index 99% rename from MediaBrowser.Api/Session/SessionsService.cs rename to MediaBrowser.Api/Sessions/SessionService.cs index 01727b238b..700da5f082 100644 --- a/MediaBrowser.Api/Session/SessionsService.cs +++ b/MediaBrowser.Api/Sessions/SessionService.cs @@ -12,7 +12,7 @@ using MediaBrowser.Model.Services; using MediaBrowser.Model.Session; using Microsoft.Extensions.Logging; -namespace MediaBrowser.Api.Session +namespace MediaBrowser.Api.Sessions { /// /// Class GetSessions @@ -248,7 +248,7 @@ namespace MediaBrowser.Api.Session /// /// Class SessionsService. /// - public class SessionsService : BaseApiService + public class SessionService : BaseApiService { /// /// The _session manager. @@ -260,8 +260,8 @@ namespace MediaBrowser.Api.Session private readonly IDeviceManager _deviceManager; private readonly ISessionContext _sessionContext; - public SessionsService( - ILogger logger, + public SessionService( + ILogger logger, IServerConfigurationManager serverConfigurationManager, IHttpResultFactory httpResultFactory, ISessionManager sessionManager, From 22510909fbbe23aa250df95424dae40f08974643 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Thu, 6 Feb 2020 13:00:15 +0100 Subject: [PATCH 20/44] Update Jellyfin.Naming.Tests.csproj --- tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj b/tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj index ebc1a54590..9602d9e58a 100644 --- a/tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj +++ b/tests/Jellyfin.Naming.Tests/Jellyfin.Naming.Tests.csproj @@ -3,7 +3,6 @@ netcoreapp3.1 false - enable From e7dcaa7d085f4c01f72a915a2467d7631533741d Mon Sep 17 00:00:00 2001 From: The Iiseppi Date: Fri, 7 Feb 2020 06:10:45 +0000 Subject: [PATCH 21/44] Translated using Weblate (Finnish) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/fi/ --- Emby.Server.Implementations/Localization/Core/fi.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/Localization/Core/fi.json b/Emby.Server.Implementations/Localization/Core/fi.json index 15aa0a8eeb..1bd906b8e3 100644 --- a/Emby.Server.Implementations/Localization/Core/fi.json +++ b/Emby.Server.Implementations/Localization/Core/fi.json @@ -24,12 +24,12 @@ "HeaderFavoriteSongs": "Lempikappaleet", "HeaderFavoriteShows": "Lempisarjat", "HeaderFavoriteEpisodes": "Lempijaksot", - "HeaderCameraUploads": "Kamerasta Ladatut", + "HeaderCameraUploads": "Kamera lataukset", "HeaderFavoriteArtists": "Lempiartistit", "HeaderFavoriteAlbums": "Lempialbumit", "HeaderContinueWatching": "Jatka Katsomista", "HeaderAlbumArtists": "Albumiartistit", - "Genres": "Genret", + "Genres": "Lajipiiri", "Folders": "Kansiot", "Favorites": "Suosikit", "FailedLoginAttemptWithUserName": "Epäonnistunut kirjautumisyritys kohteesta {0}", From 77428d338db09c4f3df3121281d952851a8a89ec Mon Sep 17 00:00:00 2001 From: diegoalrey Date: Fri, 7 Feb 2020 15:06:12 +0000 Subject: [PATCH 22/44] Translated using Weblate (Galician) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/gl/ --- Emby.Server.Implementations/Localization/Core/gl.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Localization/Core/gl.json b/Emby.Server.Implementations/Localization/Core/gl.json index 0967ef424b..94034962df 100644 --- a/Emby.Server.Implementations/Localization/Core/gl.json +++ b/Emby.Server.Implementations/Localization/Core/gl.json @@ -1 +1,3 @@ -{} +{ + "Albums": "Álbumes" +} From 422c4407439e306dea0eeda3020ad5cbb890c972 Mon Sep 17 00:00:00 2001 From: David Mouse Date: Mon, 10 Feb 2020 04:12:37 -0500 Subject: [PATCH 23/44] Fix Fedora build Fedora builds were broken due to dotnet-sdk-3.1 and dotnet-runtime-3.1 not being available on the @dotnet-sig/dotnet repo as well as a lack of the git package (needed for yarn when installing jellyfin/jellyfin-noto per https://github.com/jellyfin/jellyfin-web/pull/735). Replaces the outdated repo with the official repo found in Microsoft's documentation. --- deployment/fedora-package-x64/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deployment/fedora-package-x64/Dockerfile b/deployment/fedora-package-x64/Dockerfile index f5c3ab7a66..05a4ef21f9 100644 --- a/deployment/fedora-package-x64/Dockerfile +++ b/deployment/fedora-package-x64/Dockerfile @@ -12,11 +12,11 @@ ENV ARTIFACT_DIR=/dist RUN dnf update -y # Install build dependencies -RUN dnf install -y @buildsys-build rpmdevtools dnf-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel nodejs-yarn +RUN dnf install -y @buildsys-build rpmdevtools git dnf-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel nodejs-yarn # Install DotNET SDK -RUN dnf copr enable -y @dotnet-sig/dotnet \ - && rpmdev-setuptree \ +RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc \ + && curl -o /etc/yum.repos.d/microsoft-prod.repo https://packages.microsoft.com/config/fedora/$(rpm -E %fedora)/prod.repo \ && dnf install -y dotnet-sdk-${SDK_VERSION} dotnet-runtime-${SDK_VERSION} # Create symlinks and directories From a381eb884c61ce6661f6490f88e4af7430754dca Mon Sep 17 00:00:00 2001 From: Mark Monteiro Date: Mon, 10 Feb 2020 10:26:28 +0100 Subject: [PATCH 24/44] add-some-xml-documentation --- .../Configuration/IConfigurationFactory.cs | 25 +++++++++++++++++++ .../Plugins/IServerEntryPoint.cs | 10 ++++++-- .../Services/ApiMemberAttribute.cs | 3 +++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Common/Configuration/IConfigurationFactory.cs b/MediaBrowser.Common/Configuration/IConfigurationFactory.cs index 9b4ed772db..2b4b9b082c 100644 --- a/MediaBrowser.Common/Configuration/IConfigurationFactory.cs +++ b/MediaBrowser.Common/Configuration/IConfigurationFactory.cs @@ -6,20 +6,45 @@ using System.Collections.Generic; namespace MediaBrowser.Common.Configuration { + /// + /// Provides an interface to retrieve a configuration store. Classes with this interface are scanned for at + /// application start to dynamically register configuration for various modules/plugins. + /// public interface IConfigurationFactory { + /// + /// Get the configuration store for this module. + /// + /// The configuration store. IEnumerable GetConfigurations(); } + /// + /// Describes a single entry in the application configuration. + /// public class ConfigurationStore { + /// + /// Gets or sets the unique identifier for the configuration. + /// public string Key { get; set; } + /// + /// Gets or sets the type used to store the data for this configuration entry. + /// public Type ConfigurationType { get; set; } } + /// + /// A configuration store that can be validated. + /// public interface IValidatingConfiguration { + /// + /// Validation method to be invoked before saving the configuration. + /// + /// The old configuration. + /// The new configuration. void Validate(object oldConfig, object newConfig); } } diff --git a/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs b/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs index e57929989a..5b3173ef6a 100644 --- a/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs +++ b/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs @@ -4,16 +4,22 @@ using System.Threading.Tasks; namespace MediaBrowser.Controller.Plugins { /// - /// Interface IServerEntryPoint + /// Represents an entry point for a module in the application. This interface is scanned for automatically and + /// provides a hook to initialize the module at application start. + /// The entry point can additionally be flagged as a pre-startup task by applying the + /// interface. /// public interface IServerEntryPoint : IDisposable { /// - /// Runs this instance. + /// Run the initialization for this module. This method is invoked at application start. /// Task RunAsync(); } + /// + /// Indicates that a should be invoked as a pre-startup task. + /// public interface IRunBeforeStartup { diff --git a/MediaBrowser.Model/Services/ApiMemberAttribute.cs b/MediaBrowser.Model/Services/ApiMemberAttribute.cs index 7267fce247..06a6713ee3 100644 --- a/MediaBrowser.Model/Services/ApiMemberAttribute.cs +++ b/MediaBrowser.Model/Services/ApiMemberAttribute.cs @@ -5,6 +5,9 @@ using System; namespace MediaBrowser.Model.Services { + /// + /// Identifies a single API endpoint. + /// [AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = true)] public class ApiMemberAttribute : Attribute { From 8acfc264fca7f2b35fa6c24ce7ff0628c7f01ade Mon Sep 17 00:00:00 2001 From: artiume Date: Tue, 11 Feb 2020 10:29:26 -0500 Subject: [PATCH 25/44] Update dockerfile to install git for new dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/jellyfin/jellyfin-web/pull/735 I had to install git to get it to build ✌️ --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0bccd9d646..1029a4cee1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ ARG FFMPEG_VERSION=latest FROM node:alpine as web-builder ARG JELLYFIN_WEB_VERSION=master -RUN apk add curl \ +RUN apk add curl git \ && curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \ && cd jellyfin-web-* \ && yarn install \ From e47185160e679a9dd18377c9671fd637fb592887 Mon Sep 17 00:00:00 2001 From: artiume Date: Tue, 11 Feb 2020 10:30:15 -0500 Subject: [PATCH 26/44] Add git to arm --- Dockerfile.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.arm b/Dockerfile.arm index e7cbb09094..5151d4cb64 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -3,7 +3,7 @@ ARG DOTNET_VERSION=3.1 FROM node:alpine as web-builder ARG JELLYFIN_WEB_VERSION=master -RUN apk add curl \ +RUN apk add curl git \ && curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \ && cd jellyfin-web-* \ && yarn install \ From 8fb86cb5ffc84abd974c48edbd68b6c7ee2841ad Mon Sep 17 00:00:00 2001 From: artiume Date: Tue, 11 Feb 2020 10:30:30 -0500 Subject: [PATCH 27/44] git to arm64 --- Dockerfile.arm64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index a0cd0dacc2..bf9604bbfb 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -3,7 +3,7 @@ ARG DOTNET_VERSION=3.1 FROM node:alpine as web-builder ARG JELLYFIN_WEB_VERSION=master -RUN apk add curl \ +RUN apk add curl git \ && curl -L https://github.com/jellyfin/jellyfin-web/archive/${JELLYFIN_WEB_VERSION}.tar.gz | tar zxf - \ && cd jellyfin-web-* \ && yarn install \ From a7c7d536a7b8714857955a3d794c915f3c0eed4b Mon Sep 17 00:00:00 2001 From: j7johnny Date: Tue, 11 Feb 2020 04:55:51 +0000 Subject: [PATCH 28/44] Translated using Weblate (Chinese (Traditional)) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/zh_Hant/ --- Emby.Server.Implementations/Localization/Core/zh-TW.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Emby.Server.Implementations/Localization/Core/zh-TW.json b/Emby.Server.Implementations/Localization/Core/zh-TW.json index 33bdbfb989..3b0dc4ab25 100644 --- a/Emby.Server.Implementations/Localization/Core/zh-TW.json +++ b/Emby.Server.Implementations/Localization/Core/zh-TW.json @@ -50,10 +50,10 @@ "NotificationOptionCameraImageUploaded": "相機相片已上傳", "NotificationOptionInstallationFailed": "安裝失敗", "NotificationOptionNewLibraryContent": "已新增新內容", - "NotificationOptionPluginError": "外掛失敗", - "NotificationOptionPluginInstalled": "外掛已安裝", - "NotificationOptionPluginUninstalled": "外掛已移除", - "NotificationOptionPluginUpdateInstalled": "已更新外掛", + "NotificationOptionPluginError": "擴充元件安裝失敗", + "NotificationOptionPluginInstalled": "擴充元件已安裝", + "NotificationOptionPluginUninstalled": "擴充元件已移除", + "NotificationOptionPluginUpdateInstalled": "已更新擴充元件", "NotificationOptionServerRestartRequired": "伺服器需要重新啟動", "NotificationOptionTaskFailed": "排程任務失敗", "NotificationOptionUserLockedOut": "使用者已鎖定", From 6813efd1a2cc2a43f123f938adcbf39a687ffa71 Mon Sep 17 00:00:00 2001 From: Johan Date: Mon, 10 Feb 2020 19:52:09 +0000 Subject: [PATCH 29/44] Translated using Weblate (Finnish) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/fi/ --- .../Localization/Core/fi.json | 68 ++++++++++++++++--- 1 file changed, 58 insertions(+), 10 deletions(-) diff --git a/Emby.Server.Implementations/Localization/Core/fi.json b/Emby.Server.Implementations/Localization/Core/fi.json index 1bd906b8e3..7d6ca0d799 100644 --- a/Emby.Server.Implementations/Localization/Core/fi.json +++ b/Emby.Server.Implementations/Localization/Core/fi.json @@ -1,6 +1,6 @@ { - "HeaderLiveTV": "Netti-TV", - "NewVersionIsAvailable": "Uusi versio Jellyfin palvelimesta on ladattavissa", + "HeaderLiveTV": "TV-lähetykset", + "NewVersionIsAvailable": "Uusi versio Jellyfin palvelimesta on ladattavissa.", "NameSeasonUnknown": "Tuntematon Kausi", "NameSeasonNumber": "Kausi {0}", "NameInstallFailed": "{0} asennus epäonnistui", @@ -8,9 +8,9 @@ "Music": "Musiikki", "Movies": "Elokuvat", "MixedContent": "Sekoitettu sisältö", - "MessageServerConfigurationUpdated": "Palvelimen konfiguraatio on päivitetty", - "MessageNamedServerConfigurationUpdatedWithValue": "Palvelimen konfiguraatio-osa {0} on päivitetty", - "MessageApplicationUpdatedTo": "Jellyfin palvelin on päivitetty {0}", + "MessageServerConfigurationUpdated": "Palvelimen asetukset on päivitetty", + "MessageNamedServerConfigurationUpdatedWithValue": "Palvelimen asetusryhmä {0} on päivitetty", + "MessageApplicationUpdatedTo": "Jellyfin palvelin on päivitetty versioon {0}", "MessageApplicationUpdated": "Jellyfin palvelin on päivitetty", "Latest": "Viimeisin", "LabelRunningTimeValue": "Kesto: {0}", @@ -24,12 +24,12 @@ "HeaderFavoriteSongs": "Lempikappaleet", "HeaderFavoriteShows": "Lempisarjat", "HeaderFavoriteEpisodes": "Lempijaksot", - "HeaderCameraUploads": "Kamera lataukset", + "HeaderCameraUploads": "Kamerasta lähetetyt", "HeaderFavoriteArtists": "Lempiartistit", "HeaderFavoriteAlbums": "Lempialbumit", - "HeaderContinueWatching": "Jatka Katsomista", - "HeaderAlbumArtists": "Albumiartistit", - "Genres": "Lajipiiri", + "HeaderContinueWatching": "Jatka katsomista", + "HeaderAlbumArtists": "Albumin artistit", + "Genres": "Tyylilaji", "Folders": "Kansiot", "Favorites": "Suosikit", "FailedLoginAttemptWithUserName": "Epäonnistunut kirjautumisyritys kohteesta {0}", @@ -44,5 +44,53 @@ "Artists": "Artistit", "Application": "Sovellus", "AppDeviceValues": "Sovellus: {0}, Laite: {1}", - "Albums": "Albumit" + "Albums": "Albumit", + "User": "Käyttäjä", + "System": "Järjestelmä", + "ScheduledTaskFailedWithName": "{0} epäonnistui", + "PluginUpdatedWithName": "{0} päivitetty", + "PluginInstalledWithName": "{0} asennettu", + "Photos": "Kuvat", + "ScheduledTaskStartedWithName": "{0} aloitettu", + "PluginUninstalledWithName": "{0} poistettu", + "Playlists": "Soittolistat", + "VersionNumber": "Versio {0}", + "ValueSpecialEpisodeName": "Erikois - {0}", + "ValueHasBeenAddedToLibrary": "{0} lisättiin mediakirjastoon", + "UserStoppedPlayingItemWithValues": "{0} toistaminen valmistui {1} laitteella {2}", + "UserStartedPlayingItemWithValues": "{0} toistaa {1} laitteella {2}", + "UserPolicyUpdatedWithName": "Käyttöoikeudet päivitetty käyttäjälle {0}", + "UserPasswordChangedWithName": "Salasana vaihdettu käyttäjälle {0}", + "UserOnlineFromDevice": "{0} on paikalla osoitteesta {1}", + "UserOfflineFromDevice": "{0} yhteys katkaistu {1}", + "UserLockedOutWithName": "Käyttäjä {0} kirjautui ulos", + "UserDownloadingItemWithValues": "{0} latautumassa {1}", + "UserDeletedWithName": "Poistettiin käyttäjä {0}", + "UserCreatedWithName": "Luotiin käyttäjä {0}", + "TvShows": "TV-Ohjelmat", + "Sync": "Synkronoi", + "SubtitlesDownloadedForItem": "Tekstitys ladattu {0}", + "SubtitleDownloadFailureFromForItem": "Tekstityksen lataaminen epäonnistui {0} - {1}", + "StartupEmbyServerIsLoading": "Jellyfin palvelin latautuu. Kokeile hetken kuluttua uudelleen.", + "Songs": "Kappaleet", + "Shows": "Ohjelmat", + "ServerNameNeedsToBeRestarted": "{0} vaatii uudelleenkäynnistyksen", + "ProviderValue": "Palveluntarjoaja: {0}", + "Plugin": "Laajennus", + "NotificationOptionVideoPlaybackStopped": "Videon toistaminen pysäytetty", + "NotificationOptionVideoPlayback": "Videon toistaminen aloitettu", + "NotificationOptionUserLockedOut": "Käyttäjä kirjautui ulos", + "NotificationOptionTaskFailed": "Ajastetun tehtävän ongelma", + "NotificationOptionServerRestartRequired": "Palvelimen uudelleenkäynnistys vaaditaan", + "NotificationOptionPluginUpdateInstalled": "Laajennuksen päivitys asennettu", + "NotificationOptionPluginUninstalled": "Laajennus poistettu", + "NotificationOptionPluginInstalled": "Laajennus asennettu", + "NotificationOptionPluginError": "Ongelma laajennuksessa", + "NotificationOptionNewLibraryContent": "Uusi sisältö lisätty", + "NotificationOptionInstallationFailed": "Asennusvirhe", + "NotificationOptionCameraImageUploaded": "Kameran kuva lisätty", + "NotificationOptionAudioPlaybackStopped": "Äänen toistaminen pysäytetty", + "NotificationOptionAudioPlayback": "Äänen toistaminen aloitettu", + "NotificationOptionApplicationUpdateInstalled": "Ohjelmistopäivitys asennettu", + "NotificationOptionApplicationUpdateAvailable": "Ohjelmistopäivitys saatavilla" } From a26c1ab17dd0bb4c7cefa9130c19128a08a57aee Mon Sep 17 00:00:00 2001 From: Vasily Date: Wed, 12 Feb 2020 14:19:11 +0300 Subject: [PATCH 30/44] Remove commented code --- MediaBrowser.Api/Playback/BaseStreamingService.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 43e8374467..7837aa65b0 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -329,7 +329,7 @@ namespace MediaBrowser.Api.Playback { var encodingOptions = ServerConfigurationManager.GetEncodingOptions(); - // enable throttling when not using hardware acceleration + // enable throttling when NOT using hardware acceleration if (encodingOptions.HardwareAccelerationType == string.Empty) { return state.InputProtocol == MediaProtocol.File && @@ -340,14 +340,6 @@ namespace MediaBrowser.Api.Playback !string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase); } return false; - //// do not use throttling with hardware encoders - //return state.InputProtocol == MediaProtocol.File && - // state.RunTimeTicks.HasValue && - // state.RunTimeTicks.Value >= TimeSpan.FromMinutes(5).Ticks && - // state.IsInputVideo && - // state.VideoType == VideoType.VideoFile && - // !string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase) && - // string.Equals(GetVideoEncoder(state), "libx264", StringComparison.OrdinalIgnoreCase); } /// From 33761c3658c7c2867cb55fb1c96d441c24e81f89 Mon Sep 17 00:00:00 2001 From: Mark Monteiro Date: Wed, 12 Feb 2020 14:08:06 +0100 Subject: [PATCH 31/44] Use "implement" instead of "apply" when referring to an interface --- MediaBrowser.Controller/Plugins/IServerEntryPoint.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs b/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs index 5b3173ef6a..1e8654c4dc 100644 --- a/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs +++ b/MediaBrowser.Controller/Plugins/IServerEntryPoint.cs @@ -6,7 +6,7 @@ namespace MediaBrowser.Controller.Plugins /// /// Represents an entry point for a module in the application. This interface is scanned for automatically and /// provides a hook to initialize the module at application start. - /// The entry point can additionally be flagged as a pre-startup task by applying the + /// The entry point can additionally be flagged as a pre-startup task by implementing the /// interface. /// public interface IServerEntryPoint : IDisposable From 8ffb073ccb7f6661c04e64836d90d86228937962 Mon Sep 17 00:00:00 2001 From: Mark Monteiro Date: Wed, 12 Feb 2020 20:05:26 +0100 Subject: [PATCH 32/44] Enable documentation warnings for fully documented files --- MediaBrowser.Common/Configuration/IConfigurationFactory.cs | 3 --- MediaBrowser.Model/Services/ApiMemberAttribute.cs | 3 --- 2 files changed, 6 deletions(-) diff --git a/MediaBrowser.Common/Configuration/IConfigurationFactory.cs b/MediaBrowser.Common/Configuration/IConfigurationFactory.cs index 2b4b9b082c..07ca2b58ba 100644 --- a/MediaBrowser.Common/Configuration/IConfigurationFactory.cs +++ b/MediaBrowser.Common/Configuration/IConfigurationFactory.cs @@ -1,6 +1,3 @@ -#pragma warning disable CS1591 -#pragma warning disable SA1600 - using System; using System.Collections.Generic; diff --git a/MediaBrowser.Model/Services/ApiMemberAttribute.cs b/MediaBrowser.Model/Services/ApiMemberAttribute.cs index 06a6713ee3..8e50836f4d 100644 --- a/MediaBrowser.Model/Services/ApiMemberAttribute.cs +++ b/MediaBrowser.Model/Services/ApiMemberAttribute.cs @@ -1,6 +1,3 @@ -#pragma warning disable CS1591 -#pragma warning disable SA1600 - using System; namespace MediaBrowser.Model.Services From f5db4c8402ffbbcd7a9837b9cecc01a74e778043 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Wed, 12 Feb 2020 20:57:34 +0100 Subject: [PATCH 33/44] Another baseurl related fix Baseurl always starts with a '/' (unless it's empty) --- Emby.Server.Implementations/ApplicationHost.cs | 2 +- MediaBrowser.Model/Configuration/ServerConfiguration.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index e2df8877ab..0837db251f 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1522,7 +1522,7 @@ namespace Emby.Server.Implementations string baseUrl = ServerConfigurationManager.Configuration.BaseUrl; if (baseUrl.Length != 0) { - url.Append('/').Append(baseUrl); + url.Append(baseUrl); } return url.ToString(); diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index f42aa2b447..5280d455c4 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -165,6 +165,7 @@ namespace MediaBrowser.Model.Configuration public bool SkipDeserializationForBasicTypes { get; set; } public string ServerName { get; set; } + public string BaseUrl { get => _baseUrl; From dcac99c1a462800ae7f25b6cf4925aecc37c4e02 Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Thu, 13 Feb 2020 20:03:40 -0500 Subject: [PATCH 34/44] Fix arm32 built on amd64 host dotnet doesn't support building arm32 from QEMU (fuck knows why). also change arm64 image for the sake of consistency --- Dockerfile.arm | 8 +++++++- Dockerfile.arm64 | 9 +++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Dockerfile.arm b/Dockerfile.arm index 5151d4cb64..5847de9189 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -1,3 +1,7 @@ +# DESIGNED FOR BUILDING ON AMD64 ONLY +##################################### +# Requires binfm_misc registration +# https://github.com/multiarch/qemu-user-static#binfmt_misc-register ARG DOTNET_VERSION=3.1 @@ -21,7 +25,9 @@ RUN find . -type d -name obj | xargs -r rm -r RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin" --self-contained --runtime linux-arm "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" -FROM debian:buster-slim +FROM multiarch/qemu-user-static:x86_64-arm as qemu +FROM arm32v7/debian:buster-slim +COPY --from=qemu /usr/bin/qemu-arm-static /usr/bin RUN apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \ libssl-dev ca-certificates \ diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index bf9604bbfb..a9f6c50d9f 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -1,3 +1,7 @@ +# DESIGNED FOR BUILDING ON AMD64 ONLY +##################################### +# Requires binfm_misc registration +# https://github.com/multiarch/qemu-user-static#binfmt_misc-register ARG DOTNET_VERSION=3.1 @@ -20,8 +24,9 @@ RUN find . -type d -name obj | xargs -r rm -r # Build RUN dotnet publish Jellyfin.Server --configuration Release --output="/jellyfin" --self-contained --runtime linux-arm64 "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" - -FROM debian:buster-slim +FROM multiarch/qemu-user-static:x86_64-aarch64 as qemu +FROM arm64v8/debian:buster-slim +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin RUN apt-get update \ && apt-get install --no-install-recommends --no-install-suggests -y ffmpeg \ libssl-dev ca-certificates \ From 0591d118f913db6458b8bfa941120790dce2b205 Mon Sep 17 00:00:00 2001 From: Adam Bokor Date: Fri, 14 Feb 2020 20:46:45 +0000 Subject: [PATCH 35/44] Translated using Weblate (Hungarian) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/hu/ --- Emby.Server.Implementations/Localization/Core/hu.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/Localization/Core/hu.json b/Emby.Server.Implementations/Localization/Core/hu.json index 3a6852321d..43c2ab2f80 100644 --- a/Emby.Server.Implementations/Localization/Core/hu.json +++ b/Emby.Server.Implementations/Localization/Core/hu.json @@ -1,7 +1,7 @@ { "Albums": "Albumok", "AppDeviceValues": "Program: {0}, Eszköz: {1}", - "Application": "Program", + "Application": "Alkalmazás", "Artists": "Előadók", "AuthenticationSucceededWithUserName": "{0} sikeresen azonosítva", "Books": "Könyvek", @@ -27,7 +27,7 @@ "HeaderNextUp": "Következik", "HeaderRecordingGroups": "Felvételi csoportok", "HomeVideos": "Házi videók", - "Inherit": "Inherit", + "Inherit": "Öröklés", "ItemAddedWithName": "{0} hozzáadva a könyvtárhoz", "ItemRemovedWithName": "{0} eltávolítva a könyvtárból", "LabelIpAddressValue": "IP cím: {0}", From 6b4f1f3b5bff263b0ce7a7c5b6179e8f233b8072 Mon Sep 17 00:00:00 2001 From: Pramit Biswas Date: Sat, 15 Feb 2020 17:23:53 +0000 Subject: [PATCH 36/44] Added translation using Weblate (Bengali) --- Emby.Server.Implementations/Localization/Core/bn.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 Emby.Server.Implementations/Localization/Core/bn.json diff --git a/Emby.Server.Implementations/Localization/Core/bn.json b/Emby.Server.Implementations/Localization/Core/bn.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/Emby.Server.Implementations/Localization/Core/bn.json @@ -0,0 +1 @@ +{} From ae049f7fc869fdc21b3d284e6c0a95487ee8ef57 Mon Sep 17 00:00:00 2001 From: Pramit Biswas Date: Sat, 15 Feb 2020 17:29:58 +0000 Subject: [PATCH 37/44] Translated using Weblate (Bengali) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/bn/ --- .../Localization/Core/bn.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Localization/Core/bn.json b/Emby.Server.Implementations/Localization/Core/bn.json index 0967ef424b..1b4af5e946 100644 --- a/Emby.Server.Implementations/Localization/Core/bn.json +++ b/Emby.Server.Implementations/Localization/Core/bn.json @@ -1 +1,13 @@ -{} +{ + "DeviceOnlineWithName": "{0}-এর সাথে সংযুক্ত হয়েছে", + "DeviceOfflineWithName": "{0}-এর সাথে সংযোগ বিচ্ছিন্ন হয়েছে", + "Collections": "সংকলন", + "ChapterNameValue": "অধ্যায় {0}", + "Channels": "চ্যানেল", + "CameraImageUploadedFrom": "একটি নতুন ক্যামেরার চিত্র আপলোড করা হয়েছে {0} থেকে", + "Books": "বই", + "AuthenticationSucceededWithUserName": "{0} যাচাই সফল", + "Artists": "শিল্পী", + "Application": "অ্যাপ্লিকেশন", + "Albums": "অ্যালবাম" +} From 0387c73d640a2b9b3992dc48b047a9ca77ab36d9 Mon Sep 17 00:00:00 2001 From: Protik Das Date: Sun, 16 Feb 2020 08:10:28 +0000 Subject: [PATCH 38/44] Translated using Weblate (Bengali) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/bn/ --- .../Localization/Core/bn.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Localization/Core/bn.json b/Emby.Server.Implementations/Localization/Core/bn.json index 1b4af5e946..3538497f83 100644 --- a/Emby.Server.Implementations/Localization/Core/bn.json +++ b/Emby.Server.Implementations/Localization/Core/bn.json @@ -9,5 +9,16 @@ "AuthenticationSucceededWithUserName": "{0} যাচাই সফল", "Artists": "শিল্পী", "Application": "অ্যাপ্লিকেশন", - "Albums": "অ্যালবাম" + "Albums": "অ্যালবাম", + "HeaderFavoriteEpisodes": "প্রিব পর্বগুলো", + "HeaderFavoriteArtists": "প্রিয় শিল্পীরা", + "HeaderFavoriteAlbums": "প্রিয় এলবামগুলো", + "HeaderContinueWatching": "দেখতে থাকুন", + "HeaderCameraUploads": "ক্যামেরার আপলোডগুলো", + "HeaderAlbumArtists": "এলবামের শিল্পী", + "Genres": "ঘরানা", + "Folders": "ফোল্ডারগুলো", + "Favorites": "ফেভারিটগুলো", + "FailedLoginAttemptWithUserName": "{0} থেকে লগিন করতে ব্যর্থ", + "AppDeviceValues": "এপ: {0}, ডিভাইস: {0}" } From b6ae5242c57fe267e160566fa0dea21186d74422 Mon Sep 17 00:00:00 2001 From: Daniel De Jesus Date: Wed, 19 Feb 2020 02:46:08 +0000 Subject: [PATCH 39/44] Added translation using Weblate (Spanish (Dominican Republic)) --- Emby.Server.Implementations/Localization/Core/es_DO.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 Emby.Server.Implementations/Localization/Core/es_DO.json diff --git a/Emby.Server.Implementations/Localization/Core/es_DO.json b/Emby.Server.Implementations/Localization/Core/es_DO.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/Emby.Server.Implementations/Localization/Core/es_DO.json @@ -0,0 +1 @@ +{} From 67838787110c6de57ece9ba1e8553a5e1b2089f4 Mon Sep 17 00:00:00 2001 From: Adam Bokor Date: Sat, 15 Feb 2020 09:08:42 +0000 Subject: [PATCH 40/44] Translated using Weblate (Hungarian) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/hu/ --- Emby.Server.Implementations/Localization/Core/hu.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/Localization/Core/hu.json b/Emby.Server.Implementations/Localization/Core/hu.json index 43c2ab2f80..950be68d03 100644 --- a/Emby.Server.Implementations/Localization/Core/hu.json +++ b/Emby.Server.Implementations/Localization/Core/hu.json @@ -17,7 +17,7 @@ "Genres": "Műfajok", "HeaderAlbumArtists": "Album előadók", "HeaderCameraUploads": "Kamera feltöltések", - "HeaderContinueWatching": "Folyamatban lévő filmek", + "HeaderContinueWatching": "Megtekintés folytatása", "HeaderFavoriteAlbums": "Kedvenc albumok", "HeaderFavoriteArtists": "Kedvenc előadók", "HeaderFavoriteEpisodes": "Kedvenc epizódok", @@ -42,7 +42,7 @@ "Music": "Zene", "MusicVideos": "Zenei videók", "NameInstallFailed": "{0} sikertelen telepítés", - "NameSeasonNumber": "Évad {0}", + "NameSeasonNumber": "{0}. évad", "NameSeasonUnknown": "Ismeretlen évad", "NewVersionIsAvailable": "Letölthető a Jellyfin Szerver új verziója.", "NotificationOptionApplicationUpdateAvailable": "Frissítés érhető el az alkalmazáshoz", From e2a36a5b1453320061d207c1a646be8c34827015 Mon Sep 17 00:00:00 2001 From: Kaspar Laineste Date: Sun, 16 Feb 2020 11:07:53 +0000 Subject: [PATCH 41/44] Translated using Weblate (Finnish) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/fi/ --- Emby.Server.Implementations/Localization/Core/fi.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/Localization/Core/fi.json b/Emby.Server.Implementations/Localization/Core/fi.json index 7d6ca0d799..d02f841fd1 100644 --- a/Emby.Server.Implementations/Localization/Core/fi.json +++ b/Emby.Server.Implementations/Localization/Core/fi.json @@ -13,13 +13,13 @@ "MessageApplicationUpdatedTo": "Jellyfin palvelin on päivitetty versioon {0}", "MessageApplicationUpdated": "Jellyfin palvelin on päivitetty", "Latest": "Viimeisin", - "LabelRunningTimeValue": "Kesto: {0}", + "LabelRunningTimeValue": "Toiston kesto: {0}", "LabelIpAddressValue": "IP-osoite: {0}", "ItemRemovedWithName": "{0} poistettiin kirjastosta", "ItemAddedWithName": "{0} lisättiin kirjastoon", "Inherit": "Periä", "HomeVideos": "Kotivideot", - "HeaderRecordingGroups": "Äänitysryhmä", + "HeaderRecordingGroups": "Äänitysryhmät", "HeaderNextUp": "Seuraavaksi", "HeaderFavoriteSongs": "Lempikappaleet", "HeaderFavoriteShows": "Lempisarjat", From b672d105b6b9fa3692cebf71cd509d9ed665afa7 Mon Sep 17 00:00:00 2001 From: Christian Elbrianno Date: Tue, 18 Feb 2020 02:30:41 +0000 Subject: [PATCH 42/44] Translated using Weblate (Indonesian) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/id/ --- Emby.Server.Implementations/Localization/Core/id.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/Localization/Core/id.json b/Emby.Server.Implementations/Localization/Core/id.json index 13415eda50..38c6cf54f6 100644 --- a/Emby.Server.Implementations/Localization/Core/id.json +++ b/Emby.Server.Implementations/Localization/Core/id.json @@ -86,5 +86,10 @@ "FailedLoginAttemptWithUserName": "Percobaan login gagal dari {0}", "CameraImageUploadedFrom": "Sebuah gambar baru telah diunggah dari {0}", "DeviceOfflineWithName": "{0} telah terputus", - "DeviceOnlineWithName": "{0} telah terhubung" + "DeviceOnlineWithName": "{0} telah terhubung", + "NotificationOptionVideoPlaybackStopped": "Pemutaran video berhenti", + "NotificationOptionVideoPlayback": "Pemutaran video dimulai", + "NotificationOptionAudioPlaybackStopped": "Pemutaran audio berhenti", + "NotificationOptionAudioPlayback": "Pemutaran audio dimulai", + "MixedContent": "Konten campur" } From a68d4396e5663a3e49b7f0ee0c3e4aee433d1b55 Mon Sep 17 00:00:00 2001 From: Protik Das Date: Sun, 16 Feb 2020 08:16:09 +0000 Subject: [PATCH 43/44] Translated using Weblate (Bengali) Translation: Jellyfin/Jellyfin Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/bn/ --- .../Localization/Core/bn.json | 76 ++++++++++++++++++- 1 file changed, 74 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/Localization/Core/bn.json b/Emby.Server.Implementations/Localization/Core/bn.json index 3538497f83..a7219a7254 100644 --- a/Emby.Server.Implementations/Localization/Core/bn.json +++ b/Emby.Server.Implementations/Localization/Core/bn.json @@ -9,7 +9,7 @@ "AuthenticationSucceededWithUserName": "{0} যাচাই সফল", "Artists": "শিল্পী", "Application": "অ্যাপ্লিকেশন", - "Albums": "অ্যালবাম", + "Albums": "অ্যালবামগুলো", "HeaderFavoriteEpisodes": "প্রিব পর্বগুলো", "HeaderFavoriteArtists": "প্রিয় শিল্পীরা", "HeaderFavoriteAlbums": "প্রিয় এলবামগুলো", @@ -20,5 +20,77 @@ "Folders": "ফোল্ডারগুলো", "Favorites": "ফেভারিটগুলো", "FailedLoginAttemptWithUserName": "{0} থেকে লগিন করতে ব্যর্থ", - "AppDeviceValues": "এপ: {0}, ডিভাইস: {0}" + "AppDeviceValues": "এপ: {0}, ডিভাইস: {0}", + "VersionNumber": "সংস্করণ {0}", + "ValueSpecialEpisodeName": "বিশেষ - {0}", + "ValueHasBeenAddedToLibrary": "আপনার লাইব্রেরিতে {0} যোগ করা হয়েছে", + "UserStoppedPlayingItemWithValues": "{2}তে {1} বাজানো শেষ করেছেন {0}", + "UserStartedPlayingItemWithValues": "{2}তে {1} বাজাচ্ছেন {0}", + "UserPolicyUpdatedWithName": "{0} এর জন্য ব্যবহার নীতি আপডেট করা হয়েছে", + "UserPasswordChangedWithName": "ব্যবহারকারী {0} এর পাসওয়ার্ড পরিবর্তিত হয়েছে", + "UserOnlineFromDevice": "{0}, {1} থেকে অনলাইন", + "UserOfflineFromDevice": "{0} {1} থেকে বিযুক্ত হয়ে গেছে", + "UserLockedOutWithName": "ব্যবহারকারী {0} ঢুকতে পারছে না", + "UserDownloadingItemWithValues": "{0}, {1} ডাউনলোড করছে", + "UserDeletedWithName": "ব্যবহারকারী {0}কে বাদ দেয়া হয়েছে", + "UserCreatedWithName": "ব্যবহারকারী {0} সৃষ্টি করা হয়েছে", + "User": "ব্যবহারকারী", + "TvShows": "টিভি শোগুলো", + "System": "সিস্টেম", + "Sync": "সিংক", + "SubtitlesDownloadedForItem": "{0} এর জন্য সাবটাইটেল ডাউনলোড করা হয়েছে", + "SubtitleDownloadFailureFromForItem": "{2} থেকে {1} এর জন্য সাবটাইটেল ডাউনলোড ব্যর্থ", + "StartupEmbyServerIsLoading": "জেলিফিন সার্ভার লোড হচ্ছে। দয়া করে একটু পরে আবার চেষ্টা করুন।", + "Songs": "গানগুলো", + "Shows": "টিভি পর্ব", + "ServerNameNeedsToBeRestarted": "{0} রিস্টার্ট করা প্রয়োজন", + "ScheduledTaskStartedWithName": "{0} শুরু হয়েছে", + "ScheduledTaskFailedWithName": "{0} ব্যর্থ", + "ProviderValue": "প্রদানকারী: {0}", + "PluginUpdatedWithName": "{0} আপডেট করা হয়েছে", + "PluginUninstalledWithName": "{0} বাদ দেয়া হয়েছে", + "PluginInstalledWithName": "{0} ইন্সটল করা হয়েছে", + "Plugin": "প্লাগিন", + "Playlists": "প্লেলিস্ট", + "Photos": "ছবিগুলো", + "NotificationOptionVideoPlaybackStopped": "ভিডিও চলা বন্ধ", + "NotificationOptionVideoPlayback": "ভিডিও চলা শুরু হয়েছে", + "NotificationOptionUserLockedOut": "ব্যবহারকারী ঢুকতে পারছে না", + "NotificationOptionTaskFailed": "পরিকল্পিত কাজটি ব্যর্থ", + "NotificationOptionServerRestartRequired": "সার্ভার রিস্টার্ট বাধ্যতামূলক", + "NotificationOptionPluginUpdateInstalled": "প্লাগিন আপডেট ইন্সটল করা হয়েছে", + "NotificationOptionPluginUninstalled": "প্লাগিন বাদ দেয়া হয়েছে", + "NotificationOptionPluginInstalled": "প্লাগিন ইন্সটল করা হয়েছে", + "NotificationOptionPluginError": "প্লাগিন ব্যর্থ", + "NotificationOptionNewLibraryContent": "নতুন কন্টেন্ট যোগ করা হয়েছে", + "NotificationOptionInstallationFailed": "ইন্সটল ব্যর্থ", + "NotificationOptionCameraImageUploaded": "ক্যামেরার ছবি আপলোড হয়েছে", + "NotificationOptionAudioPlaybackStopped": "গান বাজা বন্ধ হয়েছে", + "NotificationOptionAudioPlayback": "গান বাজা শুরু হয়েছে", + "NotificationOptionApplicationUpdateInstalled": "এপ্লিকেশনের আপডেট ইনস্টল করা হয়েছে", + "NotificationOptionApplicationUpdateAvailable": "এপ্লিকেশনের আপডেট রয়েছে", + "NewVersionIsAvailable": "জেলিফিন সার্ভারের একটি নতুন ভার্শন ডাউনলোডের জন্য তৈরী", + "NameSeasonUnknown": "সিজন অজানা", + "NameSeasonNumber": "সিজন {0}", + "NameInstallFailed": "{0} ইন্সটল ব্যর্থ", + "MusicVideos": "গানের ভিডিও", + "Music": "গান", + "Movies": "সিনেমা", + "MixedContent": "মিশ্র কন্টেন্ট", + "MessageServerConfigurationUpdated": "সার্ভারের কনফিগারেশন হালনাগাদ করা হয়েছে", + "HeaderRecordingGroups": "রেকর্ডিং গ্রুপ", + "MessageNamedServerConfigurationUpdatedWithValue": "সার্ভারের {0} কনফিগারেসন অংশ আপডেট করা হয়েছে", + "MessageApplicationUpdatedTo": "জেলিফিন সার্ভার {0} তে হালনাগাদ করা হয়েছে", + "MessageApplicationUpdated": "জেলিফিন সার্ভার হালনাগাদ করা হয়েছে", + "Latest": "একদম নতুন", + "LabelRunningTimeValue": "চলার সময়: {0}", + "LabelIpAddressValue": "আইপি ঠিকানা: {0}", + "ItemRemovedWithName": "{0} লাইব্রেরি থেকে বাদ দেয়া হয়েছে", + "ItemAddedWithName": "{0} লাইব্রেরিতে যোগ করা হয়েছে", + "Inherit": "থেকে পাওয়া", + "HomeVideos": "বাসার ভিডিও", + "HeaderNextUp": "এরপরে আসছে", + "HeaderLiveTV": "লাইভ টিভি", + "HeaderFavoriteSongs": "প্রিয় গানগুলো", + "HeaderFavoriteShows": "প্রিয় শোগুলো" } From cef796a5ba6dd256f425fb87c13d63c724499058 Mon Sep 17 00:00:00 2001 From: artiume Date: Tue, 18 Feb 2020 23:56:02 -0500 Subject: [PATCH 44/44] Update Bug Report for System Details (#2422) * Update bug_report.md Increase priority for system details, constantly have to ask people for their deets. also increased details that should be asked. * Update bug_report.md * Update bug_report.md * Update .github/ISSUE_TEMPLATE/bug_report.md Co-Authored-By: dkanada * Update .github/ISSUE_TEMPLATE/bug_report.md Co-Authored-By: telans * Update bug_report.md * Update bug_report.md Co-authored-by: dkanada Co-authored-by: telans --- .github/ISSUE_TEMPLATE/bug_report.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index bd13d4b00e..d67e1c98bf 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -10,6 +10,19 @@ assignees: '' **Describe the bug** +**System (please complete the following information):** + - OS: [e.g. Debian, Windows] + - Virtualization: [e.g. Docker, KVM, LXC] + - Clients: [Browser, Android, Fire Stick, etc.] + - Browser: [e.g. Firefox 72, Chrome 80, Safari 13] + - Jellyfin Version: [e.g. 10.4.3, nightly 20191231] + - Playback: [Direct Play, Remux, Direct Stream, Transcode] + - Installed Plugins: [e.g. none, Fanart, Anime, etc.] + - Reverse Proxy: [e.g. none, nginx, apache, etc.] + - Base URL: [e.g. none, yes: /example] + - Networking: [e.g. Host, Bridge/NAT] + - Storage: [e.g. local, NFS, cloud] + **To Reproduce** 1. Go to '...' @@ -26,12 +39,5 @@ assignees: '' **Screenshots** -**System (please complete the following information):** - - OS: [e.g. Docker, Debian, Windows] - - Browser: [e.g. Firefox, Chrome, Safari] - - Jellyfin Version: [e.g. 10.0.1] - - Installed Plugins: [e.g. none, Fanart, Anime, etc.] - - Reverse proxy: [e.g. no, nginx, apache, etc.] - **Additional context**