The Free Software Media System - Server Backend & API
Fix some warnings
Bond_0095726535a262c
diff --git a/Emby.Naming/Common/NamingOptions.cs b/Emby.Naming/Common/NamingOptions.csindex 5ddcf37fe6..7bc9fbce84 100644--- a/Emby.Naming/Common/NamingOptions.cs+++ b/Emby.Naming/Common/NamingOptions.cs@@ -1,3 +1,5 @@+#pragma warning disable CA1819+using System;using System.Linq;using System.Text.RegularExpressions;diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.csindex 9287f52728..c6b32a52c9 100644--- a/Emby.Server.Implementations/Dto/DtoService.cs+++ b/Emby.Server.Implementations/Dto/DtoService.cs@@ -497,7 +497,7 @@ namespace Emby.Server.Implementations.Dto}catch (Exception ex){- _logger.LogError(ex, "Error getting {imageType} image info for {path}", image.Type, image.Path);+ _logger.LogError(ex, "Error getting {ImageType} image info for {Path}", image.Type, image.Path);return null;}}diff --git a/Emby.Server.Implementations/IO/LibraryMonitor.cs b/Emby.Server.Implementations/IO/LibraryMonitor.csindex e9d069cd33..7ebc800b9a 100644--- a/Emby.Server.Implementations/IO/LibraryMonitor.cs+++ b/Emby.Server.Implementations/IO/LibraryMonitor.cs@@ -276,7 +276,7 @@ namespace Emby.Server.Implementations.IO}catch (Exception ex){- _logger.LogError(ex, "Error watching path: {path}", path);+ _logger.LogError(ex, "Error watching path: {Path}", path);}});}diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.csindex 1326f60fe5..2dbb569c63 100644--- a/Emby.Server.Implementations/Library/LibraryManager.cs+++ b/Emby.Server.Implementations/Library/LibraryManager.cs@@ -492,7 +492,7 @@ namespace Emby.Server.Implementations.Library}catch (Exception ex){- _logger.LogError(ex, "Error in {resolver} resolving {path}", resolver.GetType().Name, args.Path);+ _logger.LogError(ex, "Error in {Resolver} resolving {Path}", resolver.GetType().Name, args.Path);return null;}}@@ -799,7 +799,7 @@ namespace Emby.Server.Implementations.Library{var userRootPath = _configurationManager.ApplicationPaths.DefaultUserViewsPath;- _logger.LogDebug("Creating userRootPath at {path}", userRootPath);+ _logger.LogDebug("Creating userRootPath at {Path}", userRootPath);Directory.CreateDirectory(userRootPath);var newItemId = GetNewItemId(userRootPath, typeof(UserRootFolder));@@ -810,7 +810,7 @@ namespace Emby.Server.Implementations.Library}catch (Exception ex){- _logger.LogError(ex, "Error creating UserRootFolder {path}", newItemId);+ _logger.LogError(ex, "Error creating UserRootFolder {Path}", newItemId);}if (tmpItem == null)@@ -827,7 +827,7 @@ namespace Emby.Server.Implementations.Library}_userRootFolder = tmpItem;- _logger.LogDebug("Setting userRootFolder: {folder}", _userRootFolder);+ _logger.LogDebug("Setting userRootFolder: {Folder}", _userRootFolder);}}}@@ -1213,7 +1213,7 @@ namespace Emby.Server.Implementations.Library}catch (Exception ex){- _logger.LogError(ex, "Error resolving shortcut file {file}", i);+ _logger.LogError(ex, "Error resolving shortcut file {File}", i);return null;}})@@ -1698,7 +1698,7 @@ namespace Emby.Server.Implementations.Libraryif (video == null){- _logger.LogError("Intro resolver returned null for {path}.", info.Path);+ _logger.LogError("Intro resolver returned null for {Path}.", info.Path);}else{@@ -1717,7 +1717,7 @@ namespace Emby.Server.Implementations.Library}catch (Exception ex){- _logger.LogError(ex, "Error resolving path {path}.", info.Path);+ _logger.LogError(ex, "Error resolving path {Path}.", info.Path);}}elsediff --git a/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs b/Emby.Server.Implementations/Library/Validators/PeopleValidator.csindex 8739a9e1be..8a9a4b8652 100644--- a/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs+++ b/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs@@ -78,7 +78,7 @@ namespace Emby.Server.Implementations.Library.Validators}catch (Exception ex){- _logger.LogError(ex, "Error validating IBN entry {person}", person);+ _logger.LogError(ex, "Error validating IBN entry {Person}", person);}// Update progressdiff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.csindex 980b42729a..e5abb523c5 100644--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs@@ -1308,16 +1308,16 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTVawait recorder.Record(directStreamProvider, mediaStreamInfo, recordPath, duration, onStarted, activeRecordingInfo.CancellationTokenSource.Token).ConfigureAwait(false);recordingStatus = RecordingStatus.Completed;- _logger.LogInformation("Recording completed: {recordPath}", recordPath);+ _logger.LogInformation("Recording completed: {RecordPath}", recordPath);}catch (OperationCanceledException){- _logger.LogInformation("Recording stopped: {recordPath}", recordPath);+ _logger.LogInformation("Recording stopped: {RecordPath}", recordPath);recordingStatus = RecordingStatus.Completed;}catch (Exception ex){- _logger.LogError(ex, "Error recording to {recordPath}", recordPath);+ _logger.LogError(ex, "Error recording to {RecordPath}", recordPath);recordingStatus = RecordingStatus.Error;}@@ -1404,7 +1404,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV}catch (Exception ex){- _logger.LogError(ex, "Error deleting 0-byte failed recording file {path}", path);+ _logger.LogError(ex, "Error deleting 0-byte failed recording file {Path}", path);}}}diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.csindex 835028b92a..8688688e92 100644--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs@@ -225,13 +225,13 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV{try{- _logger.LogInformation("Stopping ffmpeg recording process for {path}", _targetPath);+ _logger.LogInformation("Stopping ffmpeg recording process for {Path}", _targetPath);_process.StandardInput.WriteLine("q");}catch (Exception ex){- _logger.LogError(ex, "Error stopping recording transcoding job for {path}", _targetPath);+ _logger.LogError(ex, "Error stopping recording transcoding job for {Path}", _targetPath);}if (_hasExited)@@ -241,7 +241,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTVtry{- _logger.LogInformation("Calling recording process.WaitForExit for {path}", _targetPath);+ _logger.LogInformation("Calling recording process.WaitForExit for {Path}", _targetPath);if (_process.WaitForExit(10000)){@@ -250,7 +250,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV}catch (Exception ex){- _logger.LogError(ex, "Error waiting for recording process to exit for {path}", _targetPath);+ _logger.LogError(ex, "Error waiting for recording process to exit for {Path}", _targetPath);}if (_hasExited)@@ -260,13 +260,13 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTVtry{- _logger.LogInformation("Killing ffmpeg recording process for {path}", _targetPath);+ _logger.LogInformation("Killing ffmpeg recording process for {Path}", _targetPath);_process.Kill();}catch (Exception ex){- _logger.LogError(ex, "Error killing recording transcoding job for {path}", _targetPath);+ _logger.LogError(ex, "Error killing recording transcoding job for {Path}", _targetPath);}}}diff --git a/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs b/Emby.Server.Implementations/LiveTv/LiveTvDtoService.csindex 21e1409ac0..598e3f88a6 100644--- a/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs+++ b/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs@@ -393,7 +393,7 @@ namespace Emby.Server.Implementations.LiveTv}catch (Exception ex){- _logger.LogError(ex, "Error getting image info for {name}", info.Name);+ _logger.LogError(ex, "Error getting image info for {Name}", info.Name);}return null;diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.csindex ea1a28fe86..a41b63f284 100644--- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs+++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs@@ -1054,7 +1054,7 @@ namespace Emby.Server.Implementations.LiveTv{cancellationToken.ThrowIfCancellationRequested();- _logger.LogDebug("Refreshing guide from {name}", service.Name);+ _logger.LogDebug("Refreshing guide from {Name}", service.Name);try{@@ -1135,7 +1135,7 @@ namespace Emby.Server.Implementations.LiveTv}catch (Exception ex){- _logger.LogError(ex, "Error getting channel information for {name}", channelInfo.Item2.Name);+ _logger.LogError(ex, "Error getting channel information for {Name}", channelInfo.Item2.Name);}numComplete++;@@ -1248,7 +1248,7 @@ namespace Emby.Server.Implementations.LiveTv}catch (Exception ex){- _logger.LogError(ex, "Error getting programs for channel {name}", currentChannel.Name);+ _logger.LogError(ex, "Error getting programs for channel {Name}", currentChannel.Name);}numComplete++;diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.csindex 31445e1ecc..b621055d8e 100644--- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs+++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunUdpStream.cs@@ -82,7 +82,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerunDirectory.CreateDirectory(Path.GetDirectoryName(TempFilePath));- Logger.LogInformation("Opening HDHR UDP Live stream from {host}", uri.Host);+ Logger.LogInformation("Opening HDHR UDP Live stream from {Host}", uri.Host);var remoteAddress = IPAddress.Parse(uri.Host);IPAddress localAddress = null;diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.csindex a575b260cb..0941902fcd 100644--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs@@ -161,11 +161,11 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks}catch (UnauthorizedAccessException ex){- _logger.LogError(ex, "Error deleting directory {path}", directory);+ _logger.LogError(ex, "Error deleting directory {Path}", directory);}catch (IOException ex){- _logger.LogError(ex, "Error deleting directory {path}", directory);+ _logger.LogError(ex, "Error deleting directory {Path}", directory);}}}@@ -179,11 +179,11 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks}catch (UnauthorizedAccessException ex){- _logger.LogError(ex, "Error deleting file {path}", path);+ _logger.LogError(ex, "Error deleting file {Path}", path);}catch (IOException ex){- _logger.LogError(ex, "Error deleting file {path}", path);+ _logger.LogError(ex, "Error deleting file {Path}", path);}}}diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.csindex b13fc7fc68..099d781cd9 100644--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteTranscodeFileTask.cs@@ -141,11 +141,11 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks}catch (UnauthorizedAccessException ex){- _logger.LogError(ex, "Error deleting directory {path}", directory);+ _logger.LogError(ex, "Error deleting directory {Path}", directory);}catch (IOException ex){- _logger.LogError(ex, "Error deleting directory {path}", directory);+ _logger.LogError(ex, "Error deleting directory {Path}", directory);}}}@@ -159,11 +159,11 @@ namespace Emby.Server.Implementations.ScheduledTasks.Tasks}catch (UnauthorizedAccessException ex){- _logger.LogError(ex, "Error deleting file {path}", path);+ _logger.LogError(ex, "Error deleting file {Path}", path);}catch (IOException ex){- _logger.LogError(ex, "Error deleting file {path}", path);+ _logger.LogError(ex, "Error deleting file {Path}", path);}}}diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.csindex 475b804643..049fd503bd 100644--- a/Jellyfin.Api/Controllers/DynamicHlsController.cs+++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs@@ -1794,7 +1794,7 @@ namespace Jellyfin.Api.Controllersreturn;}- _logger.LogDebug("Deleting partial HLS file {path}", path);+ _logger.LogDebug("Deleting partial HLS file {Path}", path);try{@@ -1802,7 +1802,7 @@ namespace Jellyfin.Api.Controllers}catch (IOException ex){- _logger.LogError(ex, "Error deleting partial stream file(s) {path}", path);+ _logger.LogError(ex, "Error deleting partial stream file(s) {Path}", path);var task = Task.Delay(100);task.Wait();@@ -1810,7 +1810,7 @@ namespace Jellyfin.Api.Controllers}catch (Exception ex){- _logger.LogError(ex, "Error deleting partial stream file(s) {path}", path);+ _logger.LogError(ex, "Error deleting partial stream file(s) {Path}", path);}}diff --git a/Jellyfin.Api/Controllers/SubtitleController.cs b/Jellyfin.Api/Controllers/SubtitleController.csindex db8307f284..16acedcf35 100644--- a/Jellyfin.Api/Controllers/SubtitleController.cs+++ b/Jellyfin.Api/Controllers/SubtitleController.cs@@ -528,7 +528,7 @@ namespace Jellyfin.Api.Controllersif (fontFile != null && fileSize != null && fileSize > 0){- _logger.LogDebug("Fallback font size is {fileSize} Bytes", fileSize);+ _logger.LogDebug("Fallback font size is {FileSize} Bytes", fileSize);return PhysicalFile(fontFile.FullName, MimeTypes.GetMimeType(fontFile.FullName));}elsediff --git a/Jellyfin.Server.Implementations/Events/EventManager.cs b/Jellyfin.Server.Implementations/Events/EventManager.csindex 8c5d8f2ce6..7f7c4750d8 100644--- a/Jellyfin.Server.Implementations/Events/EventManager.cs+++ b/Jellyfin.Server.Implementations/Events/EventManager.cs@@ -57,7 +57,7 @@ namespace Jellyfin.Server.Implementations.Events}catch (Exception e){- _logger.LogError(e, "Uncaught exception in EventConsumer {type}: ", service.GetType());+ _logger.LogError(e, "Uncaught exception in EventConsumer {Type}: ", service.GetType());}}}diff --git a/Jellyfin.Server/Middleware/ResponseTimeMiddleware.cs b/Jellyfin.Server/Middleware/ResponseTimeMiddleware.csindex 74874da1b0..da9b691365 100644--- a/Jellyfin.Server/Middleware/ResponseTimeMiddleware.cs+++ b/Jellyfin.Server/Middleware/ResponseTimeMiddleware.cs@@ -68,7 +68,7 @@ namespace Jellyfin.Server.Middlewareif (_enableWarning && watch.ElapsedMilliseconds > _warningThreshold){_logger.LogWarning(- "Slow HTTP Response from {url} to {remoteIp} in {elapsed:g} with Status Code {statusCode}",+ "Slow HTTP Response from {Url} to {RemoteIp} in {Elapsed:g} with Status Code {StatusCode}",context.Request.GetDisplayUrl(),context.GetNormalizedRemoteIp(),watch.Elapsed,diff --git a/Jellyfin.Server/Middleware/UrlDecodeQueryFeature.cs b/Jellyfin.Server/Middleware/UrlDecodeQueryFeature.csindex e4d2937e7e..2f1d791573 100644--- a/Jellyfin.Server/Middleware/UrlDecodeQueryFeature.cs+++ b/Jellyfin.Server/Middleware/UrlDecodeQueryFeature.cs@@ -51,7 +51,7 @@ namespace Jellyfin.Server.Middlewarereturn;}- if (!key.Contains('='))+ if (!key.Contains('=', StringComparison.Ordinal)){_store = value;return;diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.csindex 5c7012d581..6e4c2280be 100644--- a/Jellyfin.Server/Program.cs+++ b/Jellyfin.Server/Program.cs@@ -675,7 +675,7 @@ namespace Jellyfin.Serverprivate static string NormalizeCommandLineArgument(string arg){- if (!arg.Contains(" ", StringComparison.OrdinalIgnoreCase))+ if (!arg.Contains(' ', StringComparison.Ordinal)){return arg;}diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.csindex 63749b1f33..a76ca23055 100644--- a/MediaBrowser.Controller/Entities/BaseItem.cs+++ b/MediaBrowser.Controller/Entities/BaseItem.cs@@ -1452,7 +1452,7 @@ namespace MediaBrowser.Controller.Entities}catch (Exception ex){- Logger.LogError(ex, "Error refreshing owned items for {path}", Path ?? Name);+ Logger.LogError(ex, "Error refreshing owned items for {Path}", Path ?? Name);}}diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.csindex fc6380e1ad..ffd1c7f0a6 100644--- a/MediaBrowser.Controller/Entities/Folder.cs+++ b/MediaBrowser.Controller/Entities/Folder.cs@@ -303,7 +303,7 @@ namespace MediaBrowser.Controller.Entitiesif (dictionary.ContainsKey(id)){Logger.LogError(- "Found folder containing items with duplicate id. Path: {path}, Child Name: {ChildName}",+ "Found folder containing items with duplicate id. Path: {Path}, Child Name: {ChildName}",Path ?? Name,child.Path ?? child.Name);}diff --git a/MediaBrowser.Controller/IO/FileData.cs b/MediaBrowser.Controller/IO/FileData.csindex b8a0bf3315..2429ac42db 100644--- a/MediaBrowser.Controller/IO/FileData.cs+++ b/MediaBrowser.Controller/IO/FileData.cs@@ -69,7 +69,7 @@ namespace MediaBrowser.Controller.IOif (string.IsNullOrEmpty(newPath)){// invalid shortcut - could be old or target could just be unavailable- logger.LogWarning("Encountered invalid shortcut: " + fullName);+ logger.LogWarning("Encountered invalid shortcut: {Path}", fullName);continue;}@@ -83,7 +83,7 @@ namespace MediaBrowser.Controller.IO}catch (Exception ex){- logger.LogError(ex, "Error resolving shortcut from {path}", fullName);+ logger.LogError(ex, "Error resolving shortcut from {Path}", fullName);}}else if (flattenFolderDepth > 0 && isDirectory)diff --git a/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs b/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.csindex 5e7af23fc3..1a8b5bb4ee 100644--- a/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs+++ b/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs@@ -144,7 +144,7 @@ namespace MediaBrowser.LocalMetadata.Savers}catch (Exception ex){- Logger.LogError(ex, "Error setting hidden attribute on {path}", path);+ Logger.LogError(ex, "Error setting hidden attribute on {Path}", path);}}diff --git a/MediaBrowser.Providers/Manager/ItemImageProvider.cs b/MediaBrowser.Providers/Manager/ItemImageProvider.csindex 1022a3faed..5e19856111 100644--- a/MediaBrowser.Providers/Manager/ItemImageProvider.cs+++ b/MediaBrowser.Providers/Manager/ItemImageProvider.cs@@ -215,7 +215,7 @@ namespace MediaBrowser.Providers.Managercatch (Exception ex){result.ErrorMessage = ex.Message;- _logger.LogError(ex, "Error in {provider}", provider.Name);+ _logger.LogError(ex, "Error in {Provider}", provider.Name);}}@@ -331,7 +331,7 @@ namespace MediaBrowser.Providers.Managercatch (Exception ex){result.ErrorMessage = ex.Message;- _logger.LogError(ex, "Error in {provider}", provider.Name);+ _logger.LogError(ex, "Error in {Provider}", provider.Name);}}diff --git a/MediaBrowser.Providers/Manager/MetadataService.cs b/MediaBrowser.Providers/Manager/MetadataService.csindex ffb3baeb1f..90d14a9731 100644--- a/MediaBrowser.Providers/Manager/MetadataService.cs+++ b/MediaBrowser.Providers/Manager/MetadataService.cs@@ -713,7 +713,7 @@ namespace MediaBrowser.Providers.Manager}catch (Exception ex){- Logger.LogError(ex, "Error in {provider}", provider.Name);+ Logger.LogError(ex, "Error in {Provider}", provider.Name);// If a local provider fails, consider that a failurerefreshResult.ErrorMessage = ex.Message;@@ -785,7 +785,7 @@ namespace MediaBrowser.Providers.Managercatch (Exception ex){refreshResult.ErrorMessage = ex.Message;- Logger.LogError(ex, "Error in {provider}", provider.Name);+ Logger.LogError(ex, "Error in {Provider}", provider.Name);}}@@ -837,7 +837,7 @@ namespace MediaBrowser.Providers.Manager{refreshResult.Failures++;refreshResult.ErrorMessage = ex.Message;- Logger.LogError(ex, "Error in {provider}", provider.Name);+ Logger.LogError(ex, "Error in {Provider}", provider.Name);}}diff --git a/MediaBrowser.XbmcMetadata/EntryPoint.cs b/MediaBrowser.XbmcMetadata/EntryPoint.csindex d02aea5566..935ff5f59f 100644--- a/MediaBrowser.XbmcMetadata/EntryPoint.cs+++ b/MediaBrowser.XbmcMetadata/EntryPoint.cs@@ -71,7 +71,7 @@ namespace MediaBrowser.XbmcMetadata}catch (Exception ex){- _logger.LogError(ex, "Error saving metadata for {path}", item.Path ?? item.Name);+ _logger.LogError(ex, "Error saving metadata for {Path}", item.Path ?? item.Name);}}}diff --git a/jellyfin.ruleset b/jellyfin.rulesetindex dfb9911704..3bced438cd 100644--- a/jellyfin.ruleset+++ b/jellyfin.ruleset@@ -42,6 +42,8 @@<Rule Id="CA1305" Action="Error" /><!-- error on CA1725: Parameter names should match base declaration --><Rule Id="CA1725" Action="Error" />+ <!-- error on CA1725: Call async methods when in an async method -->+ <Rule Id="CA1727" Action="Error" /><!-- error on CA2016: Forward the CancellationToken parameter to methods that take oneor pass in 'CancellationToken.None' explicitly to indicate intentionally not propagating the token --><Rule Id="CA2016" Action="Error" />@@ -77,6 +79,8 @@<Rule Id="CA1822" Action="Info" /><!-- disable warning CA2000: Dispose objects before losing scope --><Rule Id="CA2000" Action="Info" />+ <!-- disable warning CA2253: Named placeholders should not be numeric values -->+ <Rule Id="CA2253" Action="Info" /><!-- disable warning CA5394: Do not use insecure randomness --><Rule Id="CA5394" Action="Info" />@@ -90,6 +94,8 @@<Rule Id="CA1303" Action="None" /><!-- disable warning CA1308: Normalize strings to uppercase --><Rule Id="CA1308" Action="None" />+ <!-- disable warning CA1848: Use the LoggerMessage delegates -->+ <Rule Id="CA1848" Action="None" /><!-- disable warning CA2101: Specify marshaling for P/Invoke string arguments --><Rule Id="CA2101" Action="None" /><!-- disable warning CA2234: Pass System.Uri objects instead of strings -->diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.csindex 8273653637..3396a94e59 100644--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs@@ -40,7 +40,7 @@ namespace Jellyfin.Server.Integration.Tests.ControllersAssert.Equal(HttpStatusCode.OK, response.StatusCode);Assert.Equal(MediaTypeNames.Text.Html, response.Content.Headers.ContentType?.MediaType);StreamReader reader = new StreamReader(typeof(TestPlugin).Assembly.GetManifestResourceStream("Jellyfin.Server.Integration.Tests.TestPage.html")!);- Assert.Equal(await response.Content.ReadAsStringAsync(), reader.ReadToEnd());+ Assert.Equal(await response.Content.ReadAsStringAsync().ConfigureAwait(false), await reader.ReadToEndAsync().ConfigureAwait(false));}[Fact]