diff --git a/Emby.Photos/Emby.Photos.csproj b/Emby.Photos/Emby.Photos.csproj
index db73cb521..b57b93a8c 100644
--- a/Emby.Photos/Emby.Photos.csproj
+++ b/Emby.Photos/Emby.Photos.csproj
@@ -17,6 +17,18 @@
netstandard2.0
false
true
+ true
+
+
+
+
+
+
+
+
+
+
+ ../jellyfin.ruleset
diff --git a/Emby.Photos/PhotoProvider.cs b/Emby.Photos/PhotoProvider.cs
index 1591609ab..63631e512 100644
--- a/Emby.Photos/PhotoProvider.cs
+++ b/Emby.Photos/PhotoProvider.cs
@@ -17,39 +17,50 @@ using TagLib.IFD.Tags;
namespace Emby.Photos
{
+ ///
+ /// Metadata provider for photos.
+ ///
public class PhotoProvider : ICustomMetadataProvider, IForcedProvider, IHasItemChangeMonitor
{
private readonly ILogger _logger;
private readonly IImageProcessor _imageProcessor;
// These are causing taglib to hang
- private string[] _includextensions = new string[] { ".jpg", ".jpeg", ".png", ".tiff", ".cr2" };
+ private readonly string[] _includeExtensions = new string[] { ".jpg", ".jpeg", ".png", ".tiff", ".cr2" };
- public PhotoProvider(ILogger logger, IImageProcessor imageProcessor)
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The logger.
+ /// The image processor.
+ public PhotoProvider(ILogger logger, IImageProcessor imageProcessor)
{
_logger = logger;
_imageProcessor = imageProcessor;
}
+ ///
public string Name => "Embedded Information";
+ ///
public bool HasChanged(BaseItem item, IDirectoryService directoryService)
{
if (item.IsFileProtocol)
{
var file = directoryService.GetFile(item.Path);
- return (file != null && file.LastWriteTimeUtc != item.DateModified);
+ return file != null && file.LastWriteTimeUtc != item.DateModified;
}
return false;
}
+ ///
public Task FetchAsync(Photo item, MetadataRefreshOptions options, CancellationToken cancellationToken)
{
item.SetImagePath(ImageType.Primary, item.Path);
// Examples: https://github.com/mono/taglib-sharp/blob/a5f6949a53d09ce63ee7495580d6802921a21f14/tests/fixtures/TagLib.Tests.Images/NullOrientationTest.cs
- if (_includextensions.Contains(Path.GetExtension(item.Path), StringComparer.OrdinalIgnoreCase))
+ if (_includeExtensions.Contains(Path.GetExtension(item.Path), StringComparer.OrdinalIgnoreCase))
{
try
{
@@ -88,14 +99,7 @@ namespace Emby.Photos
item.Height = image.Properties.PhotoHeight;
var rating = image.ImageTag.Rating;
- if (rating.HasValue)
- {
- item.CommunityRating = rating;
- }
- else
- {
- item.CommunityRating = null;
- }
+ item.CommunityRating = rating.HasValue ? rating : null;
item.Overview = image.ImageTag.Comment;
diff --git a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
index f67a09daa..c3cdcc222 100644
--- a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
+++ b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
@@ -59,10 +59,7 @@ namespace Emby.Server.Implementations.AppBase
private set => _dataPath = Directory.CreateDirectory(value).FullName;
}
- ///
- /// Gets the magic string used for virtual path manipulation.
- ///
- /// The magic string used for virtual path manipulation.
+ ///
public string VirtualDataPath { get; } = "%AppDataPath%";
///
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index f36d465dd..14315c681 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -49,7 +51,6 @@ using MediaBrowser.Api;
using MediaBrowser.Common;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Events;
-using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Net;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Common.Updates;
@@ -117,7 +118,7 @@ using OperatingSystem = MediaBrowser.Common.System.OperatingSystem;
namespace Emby.Server.Implementations
{
///
- /// Class CompositionRoot
+ /// Class CompositionRoot.
///
public abstract class ApplicationHost : IServerApplicationHost, IDisposable
{
@@ -166,6 +167,7 @@ namespace Emby.Server.Implementations
/// true if this instance has pending application restart; otherwise, false.
public bool HasPendingRestart { get; private set; }
+ ///
public bool IsShuttingDown { get; private set; }
///
@@ -217,6 +219,7 @@ namespace Emby.Server.Implementations
public IFileSystem FileSystemManager { get; set; }
+ ///
public PackageVersionClass SystemUpdateLevel
{
get
diff --git a/MediaBrowser.Common/Configuration/ConfigurationUpdateEventArgs.cs b/MediaBrowser.Common/Configuration/ConfigurationUpdateEventArgs.cs
index 0b59627cc..344aecf53 100644
--- a/MediaBrowser.Common/Configuration/ConfigurationUpdateEventArgs.cs
+++ b/MediaBrowser.Common/Configuration/ConfigurationUpdateEventArgs.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
namespace MediaBrowser.Common.Configuration
@@ -9,6 +11,7 @@ namespace MediaBrowser.Common.Configuration
///
/// The key.
public string Key { get; set; }
+
///
/// Gets or sets the new configuration.
///
diff --git a/MediaBrowser.Common/Configuration/IApplicationPaths.cs b/MediaBrowser.Common/Configuration/IApplicationPaths.cs
index fd11bf904..5bdea7d8b 100644
--- a/MediaBrowser.Common/Configuration/IApplicationPaths.cs
+++ b/MediaBrowser.Common/Configuration/IApplicationPaths.cs
@@ -77,7 +77,10 @@ namespace MediaBrowser.Common.Configuration
/// The temp directory.
string TempDirectory { get; }
+ ///
+ /// Gets the magic string used for virtual path manipulation.
+ ///
+ /// The magic string used for virtual path manipulation.
string VirtualDataPath { get; }
}
-
}
diff --git a/MediaBrowser.Common/Configuration/IConfigurationFactory.cs b/MediaBrowser.Common/Configuration/IConfigurationFactory.cs
index 0fb2b83d1..4c4060096 100644
--- a/MediaBrowser.Common/Configuration/IConfigurationFactory.cs
+++ b/MediaBrowser.Common/Configuration/IConfigurationFactory.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.Collections.Generic;
diff --git a/MediaBrowser.Common/Configuration/IConfigurationManager.cs b/MediaBrowser.Common/Configuration/IConfigurationManager.cs
index 8fed2dcdf..caf2edd83 100644
--- a/MediaBrowser.Common/Configuration/IConfigurationManager.cs
+++ b/MediaBrowser.Common/Configuration/IConfigurationManager.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.Collections.Generic;
using MediaBrowser.Model.Configuration;
diff --git a/MediaBrowser.Common/Cryptography/PasswordHash.cs b/MediaBrowser.Common/Cryptography/PasswordHash.cs
index 5b28d344f..7741571db 100644
--- a/MediaBrowser.Common/Cryptography/PasswordHash.cs
+++ b/MediaBrowser.Common/Cryptography/PasswordHash.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.Collections.Generic;
using System.IO;
diff --git a/MediaBrowser.Common/Events/EventHelper.cs b/MediaBrowser.Common/Events/EventHelper.cs
index 0ac7905a1..b67315df6 100644
--- a/MediaBrowser.Common/Events/EventHelper.cs
+++ b/MediaBrowser.Common/Events/EventHelper.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
diff --git a/MediaBrowser.Common/Extensions/CollectionExtensions.cs b/MediaBrowser.Common/Extensions/CollectionExtensions.cs
index 75b9f59f8..215224398 100644
--- a/MediaBrowser.Common/Extensions/CollectionExtensions.cs
+++ b/MediaBrowser.Common/Extensions/CollectionExtensions.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System.Collections.Generic;
namespace MediaBrowser.Common.Extensions
diff --git a/MediaBrowser.Common/Extensions/ResourceNotFoundException.cs b/MediaBrowser.Common/Extensions/ResourceNotFoundException.cs
index 9f70ae7d8..9b064a40d 100644
--- a/MediaBrowser.Common/Extensions/ResourceNotFoundException.cs
+++ b/MediaBrowser.Common/Extensions/ResourceNotFoundException.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
namespace MediaBrowser.Common.Extensions
diff --git a/MediaBrowser.Common/HexHelper.cs b/MediaBrowser.Common/HexHelper.cs
index 5587c03fd..61007b5b2 100644
--- a/MediaBrowser.Common/HexHelper.cs
+++ b/MediaBrowser.Common/HexHelper.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.Globalization;
diff --git a/MediaBrowser.Common/IApplicationHost.cs b/MediaBrowser.Common/IApplicationHost.cs
index 2248e9c85..c8da100f6 100644
--- a/MediaBrowser.Common/IApplicationHost.cs
+++ b/MediaBrowser.Common/IApplicationHost.cs
@@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using MediaBrowser.Common.Plugins;
-using MediaBrowser.Model.Events;
using MediaBrowser.Model.Updates;
using Microsoft.Extensions.DependencyInjection;
@@ -31,6 +30,10 @@ namespace MediaBrowser.Common
/// true if this instance has pending kernel reload; otherwise, false.
bool HasPendingRestart { get; }
+ ///
+ /// Gets or sets a value indicating whether this instance is currently shutting down.
+ ///
+ /// true if this instance is shutting down; otherwise, false.
bool IsShuttingDown { get; }
///
@@ -39,6 +42,12 @@ namespace MediaBrowser.Common
/// true if this instance can self restart; otherwise, false.
bool CanSelfRestart { get; }
+ ///
+ /// Get the version class of the system.
+ ///
+ /// or .
+ PackageVersionClass SystemUpdateLevel { get; }
+
///
/// Occurs when [has pending restart changed].
///
@@ -115,7 +124,5 @@ namespace MediaBrowser.Common
/// The type.
/// System.Object.
object CreateInstance(Type type);
-
- PackageVersionClass SystemUpdateLevel { get; }
}
}
diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj
index 1a40f5ea2..cf3f6c2a4 100644
--- a/MediaBrowser.Common/MediaBrowser.Common.csproj
+++ b/MediaBrowser.Common/MediaBrowser.Common.csproj
@@ -24,6 +24,7 @@
netstandard2.0
false
true
+ true
diff --git a/MediaBrowser.Common/Net/CustomHeaderNames.cs b/MediaBrowser.Common/Net/CustomHeaderNames.cs
index bda897ed9..5ca9897eb 100644
--- a/MediaBrowser.Common/Net/CustomHeaderNames.cs
+++ b/MediaBrowser.Common/Net/CustomHeaderNames.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
namespace MediaBrowser.Common.Net
{
public static class CustomHeaderNames
diff --git a/MediaBrowser.Common/Net/HttpRequestOptions.cs b/MediaBrowser.Common/Net/HttpRequestOptions.cs
index 94b972a02..18c4b181f 100644
--- a/MediaBrowser.Common/Net/HttpRequestOptions.cs
+++ b/MediaBrowser.Common/Net/HttpRequestOptions.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.Collections.Generic;
using System.Threading;
diff --git a/MediaBrowser.Common/Net/HttpResponseInfo.cs b/MediaBrowser.Common/Net/HttpResponseInfo.cs
index d65ce897a..0de034b0e 100644
--- a/MediaBrowser.Common/Net/HttpResponseInfo.cs
+++ b/MediaBrowser.Common/Net/HttpResponseInfo.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.IO;
using System.Net;
@@ -69,6 +71,7 @@ namespace MediaBrowser.Common.Net
ContentHeaders = contentHeader;
}
+ ///
public void Dispose()
{
// Only IDisposable for backwards compatibility
diff --git a/MediaBrowser.Common/Net/IHttpClient.cs b/MediaBrowser.Common/Net/IHttpClient.cs
index d84a4d664..23ba34173 100644
--- a/MediaBrowser.Common/Net/IHttpClient.cs
+++ b/MediaBrowser.Common/Net/IHttpClient.cs
@@ -1,3 +1,4 @@
+using System;
using System.IO;
using System.Threading.Tasks;
using System.Net.Http;
@@ -25,12 +26,13 @@ namespace MediaBrowser.Common.Net
///
/// Warning: Deprecated function,
- /// use 'Task SendAsync(HttpRequestOptions options, HttpMethod httpMethod);' instead
+ /// use 'Task{HttpResponseInfo} SendAsync(HttpRequestOptions options, HttpMethod httpMethod);' instead
/// Sends the asynchronous.
///
/// The options.
/// The HTTP method.
/// Task{HttpResponseInfo}.
+ [Obsolete("Use 'Task{HttpResponseInfo} SendAsync(HttpRequestOptions options, HttpMethod httpMethod);' instead")]
Task SendAsync(HttpRequestOptions options, string httpMethod);
///
diff --git a/MediaBrowser.Common/Net/INetworkManager.cs b/MediaBrowser.Common/Net/INetworkManager.cs
index 1df74d995..97504a471 100644
--- a/MediaBrowser.Common/Net/INetworkManager.cs
+++ b/MediaBrowser.Common/Net/INetworkManager.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.Collections.Generic;
using System.Net;
diff --git a/MediaBrowser.Common/Plugins/BasePlugin.cs b/MediaBrowser.Common/Plugins/BasePlugin.cs
index 1ff2e98ef..6ef891d66 100644
--- a/MediaBrowser.Common/Plugins/BasePlugin.cs
+++ b/MediaBrowser.Common/Plugins/BasePlugin.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.IO;
using MediaBrowser.Common.Configuration;
diff --git a/MediaBrowser.Common/Plugins/IPlugin.cs b/MediaBrowser.Common/Plugins/IPlugin.cs
index 32527c299..7bd90c964 100644
--- a/MediaBrowser.Common/Plugins/IPlugin.cs
+++ b/MediaBrowser.Common/Plugins/IPlugin.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using MediaBrowser.Model.Plugins;
diff --git a/MediaBrowser.Common/Progress/ActionableProgress.cs b/MediaBrowser.Common/Progress/ActionableProgress.cs
index 9fe01931f..af69055aa 100644
--- a/MediaBrowser.Common/Progress/ActionableProgress.cs
+++ b/MediaBrowser.Common/Progress/ActionableProgress.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
namespace MediaBrowser.Common.Progress
@@ -25,16 +27,9 @@ namespace MediaBrowser.Common.Progress
public void Report(T value)
{
- if (ProgressChanged != null)
- {
- ProgressChanged(this, value);
- }
+ ProgressChanged?.Invoke(this, value);
- var action = _action;
- if (action != null)
- {
- action(value);
- }
+ _action?.Invoke(value);
}
}
@@ -44,10 +39,7 @@ namespace MediaBrowser.Common.Progress
public void Report(T value)
{
- if (ProgressChanged != null)
- {
- ProgressChanged(this, value);
- }
+ ProgressChanged?.Invoke(this, value);
}
}
}
diff --git a/MediaBrowser.Common/Providers/SubtitleConfigurationFactory.cs b/MediaBrowser.Common/Providers/SubtitleConfigurationFactory.cs
index 09d974db6..0445397ad 100644
--- a/MediaBrowser.Common/Providers/SubtitleConfigurationFactory.cs
+++ b/MediaBrowser.Common/Providers/SubtitleConfigurationFactory.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System.Collections.Generic;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.Providers;
@@ -6,6 +8,7 @@ namespace MediaBrowser.Common.Providers
{
public class SubtitleConfigurationFactory : IConfigurationFactory
{
+ ///
public IEnumerable GetConfigurations()
{
yield return new ConfigurationStore()
diff --git a/MediaBrowser.Common/System/OperatingSystem.cs b/MediaBrowser.Common/System/OperatingSystem.cs
index 640821d4d..7d38ddb6e 100644
--- a/MediaBrowser.Common/System/OperatingSystem.cs
+++ b/MediaBrowser.Common/System/OperatingSystem.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.Runtime.InteropServices;
using System.Threading;
diff --git a/MediaBrowser.Common/Updates/IInstallationManager.cs b/MediaBrowser.Common/Updates/IInstallationManager.cs
index 88ac7e473..b3367f71d 100644
--- a/MediaBrowser.Common/Updates/IInstallationManager.cs
+++ b/MediaBrowser.Common/Updates/IInstallationManager.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.Collections.Generic;
using System.Threading;
diff --git a/MediaBrowser.Common/Updates/InstallationEventArgs.cs b/MediaBrowser.Common/Updates/InstallationEventArgs.cs
index 9f215e889..36e124ddf 100644
--- a/MediaBrowser.Common/Updates/InstallationEventArgs.cs
+++ b/MediaBrowser.Common/Updates/InstallationEventArgs.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using MediaBrowser.Model.Updates;
namespace MediaBrowser.Common.Updates
diff --git a/MediaBrowser.Common/Updates/InstallationFailedEventArgs.cs b/MediaBrowser.Common/Updates/InstallationFailedEventArgs.cs
index 43adfb02d..46f10c84f 100644
--- a/MediaBrowser.Common/Updates/InstallationFailedEventArgs.cs
+++ b/MediaBrowser.Common/Updates/InstallationFailedEventArgs.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
namespace MediaBrowser.Common.Updates