From 5d7c94f8e9fcf7763c9326e6a34211d863e8c271 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 27 Feb 2025 20:20:15 -0800 Subject: [PATCH] Upgrade StyleCop.Analyzers to Unstable 1.2.0.556 --- src/NzbDrone.Api.Test/Sonarr.Api.Test.csproj | 5 ++ .../QualityDefinitionResourceValidatorTest.cs | 2 +- .../Sonarr.Automation.Test.csproj | 5 ++ .../Http/HttpClientFixture.cs | 2 +- .../Sonarr.Common.Test.csproj | 5 ++ src/NzbDrone.Common/Disk/OsPath.cs | 2 +- .../Extensions/DictionaryExtensions.cs | 2 +- src/NzbDrone.Common/Http/HttpResponse.cs | 2 +- .../Instrumentation/CleanseLogMessage.cs | 52 ++++++++--------- .../Instrumentation/NzbDroneLogger.cs | 4 +- src/NzbDrone.Common/Sonarr.Common.csproj | 5 ++ .../LimitedConcurrencyLevelTaskScheduler.cs | 3 +- src/NzbDrone.Common/TPL/TaskExtensions.cs | 3 +- src/NzbDrone.Console/Sonarr.Console.csproj | 7 +++ .../ImportFixture.cs | 56 ++++++++++++------- .../Download/DownloadServiceFixture.cs | 3 +- .../DownloadClientRootFolderCheckFixture.cs | 2 +- .../MoveEpisodeFileFixture.cs | 9 ++- .../SynologyIndexerFixture.cs | 6 +- .../ParsingServiceTests/GetSeriesFixture.cs | 3 +- .../Sonarr.Core.Test.csproj | 5 ++ .../Specifications/GenreSpecification.cs | 2 +- .../Specifications/MonitoredSpecification.cs | 2 +- .../OriginalLanguageSpecification.cs | 2 +- .../QualityProfileSpecification.cs | 2 +- .../Specifications/StatusSpecification.cs | 2 +- .../Specifications/TagSpecification.cs | 2 +- .../Specifications/YearSpecification.cs | 2 +- .../IndexerFlagSpecification.cs | 2 +- .../ReleaseTypeSpecification.cs | 2 +- .../Datastore/DatabaseVersionParser.cs | 2 +- .../Migration/163_mediainfo_to_ffmpeg.cs | 2 +- .../DecisionEngine/DownloadSpecDecision.cs | 2 +- .../Download/Clients/Aria2/Aria2Settings.cs | 2 +- .../Blackhole/TorrentBlackholeSettings.cs | 2 +- .../Blackhole/UsenetBlackholeSettings.cs | 2 +- .../Download/Clients/Deluge/DelugeSettings.cs | 2 +- .../DownloadStationSettings.cs | 2 +- .../Download/Clients/Flood/FloodSettings.cs | 2 +- .../FreeboxDownloadSettings.cs | 2 +- .../Clients/Hadouken/HadoukenSettings.cs | 2 +- .../Clients/NzbVortex/NzbVortexSettings.cs | 2 +- .../Download/Clients/Nzbget/NzbgetSettings.cs | 2 +- .../Clients/Pneumatic/PneumaticSettings.cs | 2 +- .../QBittorrent/QBittorrentSettings.cs | 2 +- .../Clients/Sabnzbd/SabnzbdSettings.cs | 2 +- .../Clients/TorrentSeedConfiguration.cs | 2 +- .../Transmission/TransmissionSettings.cs | 2 +- .../Clients/rTorrent/RTorrentSettings.cs | 2 +- .../Clients/uTorrent/UTorrentSettings.cs | 2 +- .../Checks/RemotePathMappingCheck.cs | 3 +- .../AniList/AniListSettingsBase.cs | 2 +- .../AniList/List/AniListSettings.cs | 2 +- .../ImportLists/Custom/CustomSettings.cs | 2 +- .../MyAnimeList/MyAnimeListSettings.cs | 2 +- .../ImportLists/Plex/PlexListSettings.cs | 2 +- .../Rss/Plex/PlexRssImportParser.cs | 2 +- .../Rss/Plex/PlexRssImportSettings.cs | 2 +- .../ImportLists/Rss/RssImportBaseSettings.cs | 2 +- .../ImportLists/Simkl/SimklSettingsBase.cs | 2 +- .../Simkl/User/SimklUserSettings.cs | 2 +- .../ImportLists/Sonarr/SonarrSettings.cs | 2 +- .../Trakt/List/TraktListSettings.cs | 2 +- .../Trakt/Popular/TraktPopularSettings.cs | 2 +- .../ImportLists/Trakt/TraktSettingsBase.cs | 2 +- .../Trakt/User/TraktUserSettings.cs | 2 +- .../BroadcastheNet/BroadcastheNetParser.cs | 2 +- .../BroadcastheNet/BroadcastheNetSettings.cs | 4 +- .../Indexers/Fanzub/FanzubSettings.cs | 2 +- .../Indexers/FileList/FileListSettings.cs | 4 +- .../Indexers/HDBits/HDBitsSettings.cs | 4 +- .../Indexers/IPTorrents/IPTorrentsSettings.cs | 4 +- .../Indexers/Newznab/NewznabSettings.cs | 4 +- .../Indexers/Nyaa/NyaaSettings.cs | 4 +- .../TorrentRss/TorrentRssIndexerSettings.cs | 4 +- .../Torrentleech/TorrentleechSettings.cs | 4 +- .../Indexers/Torznab/TorznabSettings.cs | 6 +- .../EpisodeImport/ImportSpecDecision.cs | 2 +- .../MediaInfo/VideoFileInfoReader.cs | 6 +- .../Messaging/Events/EventAggregator.cs | 6 +- .../Notifications/Apprise/AppriseSettings.cs | 2 +- .../CustomScript/CustomScriptSettings.cs | 2 +- .../Notifications/Discord/Discord.cs | 14 ++--- .../Notifications/Discord/DiscordSettings.cs | 2 +- .../Notifications/Email/EmailSettings.cs | 2 +- .../Notifications/Gotify/GotifySettings.cs | 2 +- .../Notifications/Join/JoinSettings.cs | 2 +- .../Notifications/Mailgun/MailgunSettings.cs | 2 +- .../MediaBrowser/MediaBrowserProxy.cs | 3 +- .../MediaBrowser/MediaBrowserSettings.cs | 2 +- .../Notifiarr/NotifiarrSettings.cs | 2 +- .../Notifications/Ntfy/NtfySettings.cs | 4 +- .../Plex/Server/PlexServerSettings.cs | 2 +- .../Notifications/Prowl/ProwlSettings.cs | 2 +- .../PushBullet/PushBulletSettings.cs | 2 +- .../Notifications/Pushcut/PushcutSettings.cs | 2 +- .../Pushover/PushoverSettings.cs | 2 +- .../SendGrid/SendGridSettings.cs | 2 +- .../Notifications/Signal/SignalSettings.cs | 2 +- .../Simplepush/SimplepushSettings.cs | 2 +- .../Notifications/Slack/Slack.cs | 22 ++++---- .../Notifications/Slack/SlackSettings.cs | 2 +- .../Synology/SynologyIndexerSettings.cs | 2 +- .../Telegram/TelegramSettings.cs | 2 +- .../Trakt/TraktInterlacedTypes.cs | 2 +- .../Notifications/Trakt/TraktSettings.cs | 2 +- .../Notifications/Twitter/TwitterSettings.cs | 2 +- .../Notifications/Webhook/WebhookBase.cs | 2 +- .../Notifications/Webhook/WebhookSettings.cs | 2 +- .../Notifications/Xbmc/XbmcSettings.cs | 2 +- src/NzbDrone.Core/Parser/LanguageParser.cs | 4 +- src/NzbDrone.Core/Parser/Parser.cs | 2 +- src/NzbDrone.Core/Parser/QualityParser.cs | 30 +++++----- src/NzbDrone.Core/Queue/QueueService.cs | 2 +- .../SeriesStats/SeriesStatisticsRepository.cs | 3 +- src/NzbDrone.Core/Sonarr.Core.csproj | 5 ++ .../Sonarr.Host.Test.csproj | 5 ++ src/NzbDrone.Host/Bootstrap.cs | 2 +- src/NzbDrone.Host/Sonarr.Host.csproj | 5 ++ .../IntegrationTest.cs | 2 +- .../Sonarr.Integration.Test.csproj | 5 ++ .../Sonarr.Libraries.Test.csproj | 5 ++ .../Sonarr.Mono.Test.csproj | 5 ++ src/NzbDrone.Mono/Disk/FindDriveType.cs | 2 +- .../VersionAdapters/MacOsVersionAdapter.cs | 2 +- src/NzbDrone.Mono/Sonarr.Mono.csproj | 5 ++ src/NzbDrone.SignalR/Sonarr.SignalR.csproj | 7 +++ src/NzbDrone.Test.Common/AutoMoq/AutoMoqer.cs | 3 +- src/NzbDrone.Test.Common/NzbDroneRunner.cs | 2 +- .../Sonarr.Test.Common.csproj | 5 ++ .../Sonarr.Test.Dummy.csproj | 7 +++ .../Sonarr.Update.Test.csproj | 5 ++ src/NzbDrone.Update/Sonarr.Update.csproj | 5 ++ .../Sonarr.Windows.Test.csproj | 5 ++ src/NzbDrone.Windows/Sonarr.Windows.csproj | 5 ++ src/NzbDrone/Sonarr.csproj | 5 ++ .../ServiceInstall/ServiceInstall.csproj | 5 ++ .../ServiceUninstall/ServiceUninstall.csproj | 5 ++ .../CustomFormats/CustomFormatBulkResource.cs | 2 +- .../DownloadClientController.cs | 4 +- .../ImportLists/ImportListController.cs | 4 +- .../Indexers/IndexerController.cs | 4 +- .../Indexers/ReleasePushController.cs | 2 +- .../Metadata/MetadataController.cs | 4 +- .../Notifications/NotificationController.cs | 4 +- src/Sonarr.Api.V3/Series/SeriesController.cs | 3 +- src/Sonarr.Api.V3/Sonarr.Api.V3.csproj | 5 ++ .../System/Backup/BackupController.cs | 2 +- src/Sonarr.Api.V5/Series/SeriesController.cs | 3 +- src/Sonarr.Api.V5/Series/SeriesResource.cs | 2 +- src/Sonarr.Api.V5/Sonarr.Api.V5.csproj | 5 ++ .../Frontend/Mappers/MediaCoverProxyMapper.cs | 2 +- src/Sonarr.Http/PagingResource.cs | 2 +- src/Sonarr.Http/Sonarr.Http.csproj | 5 ++ .../Sonarr.RuntimePatches.csproj | 5 ++ 155 files changed, 399 insertions(+), 227 deletions(-) diff --git a/src/NzbDrone.Api.Test/Sonarr.Api.Test.csproj b/src/NzbDrone.Api.Test/Sonarr.Api.Test.csproj index 3a47bdcc4..fd38e2d6e 100644 --- a/src/NzbDrone.Api.Test/Sonarr.Api.Test.csproj +++ b/src/NzbDrone.Api.Test/Sonarr.Api.Test.csproj @@ -5,6 +5,11 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/NzbDrone.Api.Test/v3/Qualities/QualityDefinitionResourceValidatorTest.cs b/src/NzbDrone.Api.Test/v3/Qualities/QualityDefinitionResourceValidatorTest.cs index a331de82a..207222725 100644 --- a/src/NzbDrone.Api.Test/v3/Qualities/QualityDefinitionResourceValidatorTest.cs +++ b/src/NzbDrone.Api.Test/v3/Qualities/QualityDefinitionResourceValidatorTest.cs @@ -8,7 +8,7 @@ namespace NzbDrone.Api.Test.v3.Qualities; [Parallelizable(ParallelScope.All)] public class QualityDefinitionResourceValidatorTests { - private readonly QualityDefinitionResourceValidator _validator = new (); + private readonly QualityDefinitionResourceValidator _validator = new(); [Test] public void Validate_fails_when_min_size_is_below_min_limit() diff --git a/src/NzbDrone.Automation.Test/Sonarr.Automation.Test.csproj b/src/NzbDrone.Automation.Test/Sonarr.Automation.Test.csproj index 2317dc060..bea0c5909 100644 --- a/src/NzbDrone.Automation.Test/Sonarr.Automation.Test.csproj +++ b/src/NzbDrone.Automation.Test/Sonarr.Automation.Test.csproj @@ -6,6 +6,11 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs b/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs index b27798a3e..338e7bde6 100644 --- a/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs +++ b/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs @@ -36,7 +36,7 @@ public class HttpClientFixture : TestBase private string _httpBinHost; private string _httpBinHost2; - private System.Net.Http.HttpClient _httpClient = new (); + private System.Net.Http.HttpClient _httpClient = new(); [OneTimeSetUp] public void FixtureSetUp() diff --git a/src/NzbDrone.Common.Test/Sonarr.Common.Test.csproj b/src/NzbDrone.Common.Test/Sonarr.Common.Test.csproj index 0116645bc..d9c6f051b 100644 --- a/src/NzbDrone.Common.Test/Sonarr.Common.Test.csproj +++ b/src/NzbDrone.Common.Test/Sonarr.Common.Test.csproj @@ -4,6 +4,11 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/NzbDrone.Common/Disk/OsPath.cs b/src/NzbDrone.Common/Disk/OsPath.cs index 42fdaf567..39b88e53a 100644 --- a/src/NzbDrone.Common/Disk/OsPath.cs +++ b/src/NzbDrone.Common/Disk/OsPath.cs @@ -296,7 +296,7 @@ private string[] GetFragments() return _path.Split(new char[] { '\\', '/' }, StringSplitOptions.RemoveEmptyEntries); } - public static OsPath Null => new (null); + public static OsPath Null => new(null); public override string ToString() { diff --git a/src/NzbDrone.Common/Extensions/DictionaryExtensions.cs b/src/NzbDrone.Common/Extensions/DictionaryExtensions.cs index 7f0fe06ce..3bf3c0703 100644 --- a/src/NzbDrone.Common/Extensions/DictionaryExtensions.cs +++ b/src/NzbDrone.Common/Extensions/DictionaryExtensions.cs @@ -31,7 +31,7 @@ public static void Add(this ICollection } public static IDictionary SelectDictionary(this IDictionary dictionary, - Func, ValueTuple> selection) + Func, (TNewKey Item1, TNewValue Item2)> selection) { return dictionary.Select(selection).ToDictionary(t => t.Item1, t => t.Item2); } diff --git a/src/NzbDrone.Common/Http/HttpResponse.cs b/src/NzbDrone.Common/Http/HttpResponse.cs index ddab6f435..8a8266c66 100644 --- a/src/NzbDrone.Common/Http/HttpResponse.cs +++ b/src/NzbDrone.Common/Http/HttpResponse.cs @@ -9,7 +9,7 @@ namespace NzbDrone.Common.Http { public class HttpResponse { - private static readonly Regex RegexSetCookie = new ("^(.*?)=(.*?)(?:;|$)", RegexOptions.Compiled); + private static readonly Regex RegexSetCookie = new("^(.*?)=(.*?)(?:;|$)", RegexOptions.Compiled); public HttpResponse(HttpRequest request, HttpHeader headers, byte[] binaryData, HttpStatusCode statusCode = HttpStatusCode.OK, Version version = null) { diff --git a/src/NzbDrone.Common/Instrumentation/CleanseLogMessage.cs b/src/NzbDrone.Common/Instrumentation/CleanseLogMessage.cs index 95475694e..b47a46d88 100644 --- a/src/NzbDrone.Common/Instrumentation/CleanseLogMessage.cs +++ b/src/NzbDrone.Common/Instrumentation/CleanseLogMessage.cs @@ -10,57 +10,57 @@ public class CleanseLogMessage private static readonly Regex[] CleansingRules = { // Url - new (@"(?<=\?|&)(apikey|token|passkey|auth|authkey|user|uid|api|[a-z_]*apikey|account|passwd)=(?[^&=""]+?)(?=[ ""&=]|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), - new (@"(?<=\?|&)[^=]*?(username|password)=(?[^&=]+?)(?= |&|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), - new (@"rss(24h)?\.torrentleech\.org/(?!rss)(?[0-9a-z]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase), - new (@"torrentleech\.org/rss/download/[0-9]+/(?[0-9a-z]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase), - new (@"iptorrents\.com/[/a-z0-9?&;]*?(?:[?&;](u|tp)=(?[^&=;]+?))+(?= |;|&|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), - new (@"/fetch/[a-z0-9]{32}/(?[a-z0-9]{32})", RegexOptions.Compiled), - new (@"getnzb.*?(?<=\?|&)(r)=(?[^&=]+?)(?= |&|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), - new (@"\b(\w*)?(_?(?[^&=]+?)(?= |&|$|;)", RegexOptions.Compiled | RegexOptions.IgnoreCase), - new (@"-hd.me/torrent/[a-z0-9-]\.[0-9]+\.(?[0-9a-z]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"(?<=\?|&)(apikey|token|passkey|auth|authkey|user|uid|api|[a-z_]*apikey|account|passwd)=(?[^&=""]+?)(?=[ ""&=]|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"(?<=\?|&)[^=]*?(username|password)=(?[^&=]+?)(?= |&|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"rss(24h)?\.torrentleech\.org/(?!rss)(?[0-9a-z]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"torrentleech\.org/rss/download/[0-9]+/(?[0-9a-z]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"iptorrents\.com/[/a-z0-9?&;]*?(?:[?&;](u|tp)=(?[^&=;]+?))+(?= |;|&|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"/fetch/[a-z0-9]{32}/(?[a-z0-9]{32})", RegexOptions.Compiled), + new(@"getnzb.*?(?<=\?|&)(r)=(?[^&=]+?)(?= |&|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"\b(\w*)?(_?(?[^&=]+?)(?= |&|$|;)", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"-hd.me/torrent/[a-z0-9-]\.[0-9]+\.(?[0-9a-z]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase), // Trackers Announce Keys; Designed for Qbit Json; should work for all in theory - new (@"announce(\.php)?(/|%2f|%3fpasskey%3d)(?[a-z0-9]{16,})|(?[a-z0-9]{16,})(/|%2f)announce", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"announce(\.php)?(/|%2f|%3fpasskey%3d)(?[a-z0-9]{16,})|(?[a-z0-9]{16,})(/|%2f)announce", RegexOptions.Compiled | RegexOptions.IgnoreCase), // Path - new (@"C:\\Users\\(?[^\""]+?)(\\|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), - new (@"/(home|Users)/(?[^/""]+?)(/|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"C:\\Users\\(?[^\""]+?)(\\|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"/(home|Users)/(?[^/""]+?)(/|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), // NzbGet - new (@"""Name""\s*:\s*""[^""]*(username|password)""\s*,\s*""Value""\s*:\s*""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"""Name""\s*:\s*""[^""]*(username|password)""\s*,\s*""Value""\s*:\s*""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), // Sabnzbd - new (@"""[^""]*(username|password|api_?key|nzb_key)""\s*:\s*""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), - new (@"""email_(account|to|from|pwd)""\s*:\s*""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"""[^""]*(username|password|api_?key|nzb_key)""\s*:\s*""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"""email_(account|to|from|pwd)""\s*:\s*""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), // uTorrent - new (@"\[""[a-z._]*(username|password)"",\d,""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), - new (@"\[""(boss_key|boss_key_salt|proxy\.proxy)"",\d,""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"\[""[a-z._]*(username|password)"",\d,""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"\[""(boss_key|boss_key_salt|proxy\.proxy)"",\d,""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), // Deluge - new (@"auth.login\(""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"auth.login\(""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), // BroadcastheNet - new (@"""?method""?\s*:\s*""(getTorrents)"",\s*""?params""?\s*:\s*\[\s*""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), - new (@"getTorrents\(""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), - new (@"(?<=\?|&)(authkey|torrent_pass)=(?[^&=]+?)(?=""|&|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"""?method""?\s*:\s*""(getTorrents)"",\s*""?params""?\s*:\s*\[\s*""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"getTorrents\(""(?[^""]+?)""", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"(?<=\?|&)(authkey|torrent_pass)=(?[^&=]+?)(?=""|&|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), // Plex - new (@"(?<=\?|&)(X-Plex-Client-Identifier|X-Plex-Token)=(?[^&=]+?)(?= |&|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"(?<=\?|&)(X-Plex-Client-Identifier|X-Plex-Token)=(?[^&=]+?)(?= |&|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase), // Webhooks // Notifiarr - new (@"api/v[0-9]/notification/sonarr/(?[\w-]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"api/v[0-9]/notification/sonarr/(?[\w-]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase), // Discord - new (@"discord.com/api/webhooks/((?[\w-]+)/)?(?[\w-]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase), + new(@"discord.com/api/webhooks/((?[\w-]+)/)?(?[\w-]+)", RegexOptions.Compiled | RegexOptions.IgnoreCase), // Telegram - new (@"api.telegram.org/bot(?[\d]+):(?[\w-]+)/", RegexOptions.Compiled | RegexOptions.IgnoreCase) + new(@"api.telegram.org/bot(?[\d]+):(?[\w-]+)/", RegexOptions.Compiled | RegexOptions.IgnoreCase) }; - private static readonly Regex CleanseRemoteIPRegex = new (@"(?:Auth-\w+(? + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + @@ -22,6 +26,7 @@ + diff --git a/src/NzbDrone.Common/TPL/LimitedConcurrencyLevelTaskScheduler.cs b/src/NzbDrone.Common/TPL/LimitedConcurrencyLevelTaskScheduler.cs index bec13eb3a..0cc3d21c8 100644 --- a/src/NzbDrone.Common/TPL/LimitedConcurrencyLevelTaskScheduler.cs +++ b/src/NzbDrone.Common/TPL/LimitedConcurrencyLevelTaskScheduler.cs @@ -94,7 +94,8 @@ private void NotifyThreadPoolOfPendingWork() { _currentThreadIsProcessingItems = false; } - }, null); + }, + null); } /// Attempts to execute the specified task on the current thread. diff --git a/src/NzbDrone.Common/TPL/TaskExtensions.cs b/src/NzbDrone.Common/TPL/TaskExtensions.cs index 93b884732..616f8a3c6 100644 --- a/src/NzbDrone.Common/TPL/TaskExtensions.cs +++ b/src/NzbDrone.Common/TPL/TaskExtensions.cs @@ -20,7 +20,8 @@ public static Task LogExceptions(this Task task) Logger.Error(exception, "Task Error"); } } - }, TaskContinuationOptions.OnlyOnFaulted); + }, + TaskContinuationOptions.OnlyOnFaulted); return task; } diff --git a/src/NzbDrone.Console/Sonarr.Console.csproj b/src/NzbDrone.Console/Sonarr.Console.csproj index c383c33be..7b330cd60 100644 --- a/src/NzbDrone.Console/Sonarr.Console.csproj +++ b/src/NzbDrone.Console/Sonarr.Console.csproj @@ -12,4 +12,11 @@ + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + \ No newline at end of file diff --git a/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceTests/ImportFixture.cs b/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceTests/ImportFixture.cs index 0544d7246..e8bb86fae 100644 --- a/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceTests/ImportFixture.cs +++ b/src/NzbDrone.Core.Test/Download/CompletedDownloadServiceTests/ImportFixture.cs @@ -116,17 +116,21 @@ private void GivenSeriesMatch() public void should_not_mark_as_imported_if_all_files_were_rejected() { Mocker.GetMock() - .Setup(v => v.ProcessPath(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) - .Returns(new List - { - new ImportResult( - new ImportDecision( - new LocalEpisode { Path = @"C:\TestPath\Droned.S01E01.mkv", Episodes = { _episode1 } }, new ImportRejection(ImportRejectionReason.Unknown, "Rejected!")), "Test Failure"), + .Setup(v => v.ProcessPath(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(new List + { + new ImportResult( + new ImportDecision( + new LocalEpisode { Path = @"C:\TestPath\Droned.S01E01.mkv", Episodes = { _episode1 } }, + new ImportRejection(ImportRejectionReason.Unknown, "Rejected!")), + "Test Failure"), - new ImportResult( - new ImportDecision( - new LocalEpisode { Path = @"C:\TestPath\Droned.S01E02.mkv", Episodes = { _episode2 } }, new ImportRejection(ImportRejectionReason.Unknown, "Rejected!")), "Test Failure") - }); + new ImportResult( + new ImportDecision( + new LocalEpisode { Path = @"C:\TestPath\Droned.S01E02.mkv", Episodes = { _episode2 } }, + new ImportRejection(ImportRejectionReason.Unknown, "Rejected!")), + "Test Failure") + }); Subject.Import(_trackedDownload); @@ -145,11 +149,13 @@ public void should_not_mark_as_imported_if_no_episodes_were_parsed() { new ImportResult( new ImportDecision( - new LocalEpisode { Path = @"C:\TestPath\Droned.S01E01.mkv", Episodes = { _episode1 } }, new ImportRejection(ImportRejectionReason.Unknown, "Rejected!")), "Test Failure"), + new LocalEpisode { Path = @"C:\TestPath\Droned.S01E01.mkv", Episodes = { _episode1 } }, new ImportRejection(ImportRejectionReason.Unknown, "Rejected!")), + "Test Failure"), new ImportResult( new ImportDecision( - new LocalEpisode { Path = @"C:\TestPath\Droned.S01E02.mkv", Episodes = { _episode2 } }, new ImportRejection(ImportRejectionReason.Unknown, "Rejected!")), "Test Failure") + new LocalEpisode { Path = @"C:\TestPath\Droned.S01E02.mkv", Episodes = { _episode2 } }, new ImportRejection(ImportRejectionReason.Unknown, "Rejected!")), + "Test Failure") }); _trackedDownload.RemoteEpisode.Episodes.Clear(); @@ -272,16 +278,24 @@ public void should_mark_as_imported_if_all_episodes_were_imported_including_hist Mocker.GetMock() .Setup(v => v.ProcessPath(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) - .Returns(new List - { - new ImportResult( - new ImportDecision( - new LocalEpisode { Path = @"C:\TestPath\Droned.S01E01.mkv", Episodes = new List { episode1 } })), + .Returns( + new List + { + new ImportResult( + new ImportDecision( + new LocalEpisode + { + Path = @"C:\TestPath\Droned.S01E01.mkv", Episodes = new List { episode1 } + })), - new ImportResult( - new ImportDecision( - new LocalEpisode { Path = @"C:\TestPath\Droned.S01E02.mkv", Episodes = new List { episode2 } }), "Test Failure") - }); + new ImportResult( + new ImportDecision( + new LocalEpisode + { + Path = @"C:\TestPath\Droned.S01E02.mkv", Episodes = new List { episode2 } + }), + "Test Failure") + }); var history = Builder.CreateListOfSize(2) .BuildList(); diff --git a/src/NzbDrone.Core.Test/Download/DownloadServiceFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadServiceFixture.cs index d2653a71d..0d42c6da0 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadServiceFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadServiceFixture.cs @@ -166,7 +166,8 @@ public void Download_report_should_trigger_indexer_backoff_on_http429_based_on_d Mocker.GetMock() .Verify(v => v.RecordFailure(It.IsAny(), - It.IsInRange(TimeSpan.FromMinutes(4.9), TimeSpan.FromMinutes(5.1), Moq.Range.Inclusive)), Times.Once()); + It.IsInRange(TimeSpan.FromMinutes(4.9), TimeSpan.FromMinutes(5.1), Moq.Range.Inclusive)), + Times.Once()); } [Test] diff --git a/src/NzbDrone.Core.Test/HealthCheck/Checks/DownloadClientRootFolderCheckFixture.cs b/src/NzbDrone.Core.Test/HealthCheck/Checks/DownloadClientRootFolderCheckFixture.cs index ae75242d9..1291bc23e 100644 --- a/src/NzbDrone.Core.Test/HealthCheck/Checks/DownloadClientRootFolderCheckFixture.cs +++ b/src/NzbDrone.Core.Test/HealthCheck/Checks/DownloadClientRootFolderCheckFixture.cs @@ -84,7 +84,7 @@ public void should_return_warning_if_downloading_inside_root_folder() GivenRootFolder(rootFolderPath); - _clientStatus.OutputRootFolders = new List { new (downloadRootPath) }; + _clientStatus.OutputRootFolders = new List { new(downloadRootPath) }; Subject.Check().ShouldBeWarning(); } diff --git a/src/NzbDrone.Core.Test/MediaFiles/EpisodeFileMovingServiceTests/MoveEpisodeFileFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/EpisodeFileMovingServiceTests/MoveEpisodeFileFixture.cs index 41ed18709..5f6682bd3 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/EpisodeFileMovingServiceTests/MoveEpisodeFileFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/EpisodeFileMovingServiceTests/MoveEpisodeFileFixture.cs @@ -97,7 +97,8 @@ public void should_notify_on_series_folder_creation() Mocker.GetMock() .Verify(s => s.PublishEvent(It.Is(p => - p.SeriesFolder.IsNotNullOrWhiteSpace())), Times.Once()); + p.SeriesFolder.IsNotNullOrWhiteSpace())), + Times.Once()); } [Test] @@ -107,7 +108,8 @@ public void should_notify_on_season_folder_creation() Mocker.GetMock() .Verify(s => s.PublishEvent(It.Is(p => - p.SeasonFolder.IsNotNullOrWhiteSpace())), Times.Once()); + p.SeasonFolder.IsNotNullOrWhiteSpace())), + Times.Once()); } [Test] @@ -121,7 +123,8 @@ public void should_not_notify_if_series_folder_already_exists() Mocker.GetMock() .Verify(s => s.PublishEvent(It.Is(p => - p.SeriesFolder.IsNotNullOrWhiteSpace())), Times.Never()); + p.SeriesFolder.IsNotNullOrWhiteSpace())), + Times.Never()); } } } diff --git a/src/NzbDrone.Core.Test/NotificationTests/SynologyIndexerFixture.cs b/src/NzbDrone.Core.Test/NotificationTests/SynologyIndexerFixture.cs index fbdd02ffc..8e72a8533 100644 --- a/src/NzbDrone.Core.Test/NotificationTests/SynologyIndexerFixture.cs +++ b/src/NzbDrone.Core.Test/NotificationTests/SynologyIndexerFixture.cs @@ -38,11 +38,13 @@ public void SetUp() new DeletedEpisodeFile(new EpisodeFile { RelativePath = "file1.S01E01.mkv" - }, null), + }, + null), new DeletedEpisodeFile(new EpisodeFile { RelativePath = "file1.S01E02.mkv" - }, null) + }, + null) } }; diff --git a/src/NzbDrone.Core.Test/ParserTests/ParsingServiceTests/GetSeriesFixture.cs b/src/NzbDrone.Core.Test/ParserTests/ParsingServiceTests/GetSeriesFixture.cs index 66b771dc1..d2aa4daab 100644 --- a/src/NzbDrone.Core.Test/ParserTests/ParsingServiceTests/GetSeriesFixture.cs +++ b/src/NzbDrone.Core.Test/ParserTests/ParsingServiceTests/GetSeriesFixture.cs @@ -43,7 +43,8 @@ public void should_fallback_to_title_without_year_and_year_when_title_lookup_fai Mocker.GetMock() .Verify(s => s.FindByTitle(parsedEpisodeInfo.SeriesTitleInfo.TitleWithoutYear, - parsedEpisodeInfo.SeriesTitleInfo.Year), Times.Once()); + parsedEpisodeInfo.SeriesTitleInfo.Year), + Times.Once()); } [Test] diff --git a/src/NzbDrone.Core.Test/Sonarr.Core.Test.csproj b/src/NzbDrone.Core.Test/Sonarr.Core.Test.csproj index 3b8a910d7..c484941f6 100644 --- a/src/NzbDrone.Core.Test/Sonarr.Core.Test.csproj +++ b/src/NzbDrone.Core.Test/Sonarr.Core.Test.csproj @@ -6,7 +6,12 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/NzbDrone.Core/AutoTagging/Specifications/GenreSpecification.cs b/src/NzbDrone.Core/AutoTagging/Specifications/GenreSpecification.cs index 7baab4aac..1ac197a23 100644 --- a/src/NzbDrone.Core/AutoTagging/Specifications/GenreSpecification.cs +++ b/src/NzbDrone.Core/AutoTagging/Specifications/GenreSpecification.cs @@ -18,7 +18,7 @@ public GenreSpecificationValidator() public class GenreSpecification : AutoTaggingSpecificationBase { - private static readonly GenreSpecificationValidator Validator = new (); + private static readonly GenreSpecificationValidator Validator = new(); public override int Order => 1; public override string ImplementationName => "Genre"; diff --git a/src/NzbDrone.Core/AutoTagging/Specifications/MonitoredSpecification.cs b/src/NzbDrone.Core/AutoTagging/Specifications/MonitoredSpecification.cs index 201ac4aa2..2fc26f3c6 100644 --- a/src/NzbDrone.Core/AutoTagging/Specifications/MonitoredSpecification.cs +++ b/src/NzbDrone.Core/AutoTagging/Specifications/MonitoredSpecification.cs @@ -10,7 +10,7 @@ public class MonitoredSpecificationValidator : AbstractValidator 1; public override string ImplementationName => "Monitored"; diff --git a/src/NzbDrone.Core/AutoTagging/Specifications/OriginalLanguageSpecification.cs b/src/NzbDrone.Core/AutoTagging/Specifications/OriginalLanguageSpecification.cs index 4819ce69c..f618bce72 100644 --- a/src/NzbDrone.Core/AutoTagging/Specifications/OriginalLanguageSpecification.cs +++ b/src/NzbDrone.Core/AutoTagging/Specifications/OriginalLanguageSpecification.cs @@ -16,7 +16,7 @@ public OriginalLanguageSpecificationValidator() public class OriginalLanguageSpecification : AutoTaggingSpecificationBase { - private static readonly OriginalLanguageSpecificationValidator Validator = new (); + private static readonly OriginalLanguageSpecificationValidator Validator = new(); public override int Order => 1; public override string ImplementationName => "Original Language"; diff --git a/src/NzbDrone.Core/AutoTagging/Specifications/QualityProfileSpecification.cs b/src/NzbDrone.Core/AutoTagging/Specifications/QualityProfileSpecification.cs index 35f9866c1..f10327ca8 100644 --- a/src/NzbDrone.Core/AutoTagging/Specifications/QualityProfileSpecification.cs +++ b/src/NzbDrone.Core/AutoTagging/Specifications/QualityProfileSpecification.cs @@ -15,7 +15,7 @@ public QualityProfileSpecificationValidator() public class QualityProfileSpecification : AutoTaggingSpecificationBase { - private static readonly QualityProfileSpecificationValidator Validator = new (); + private static readonly QualityProfileSpecificationValidator Validator = new(); public override int Order => 1; public override string ImplementationName => "Quality Profile"; diff --git a/src/NzbDrone.Core/AutoTagging/Specifications/StatusSpecification.cs b/src/NzbDrone.Core/AutoTagging/Specifications/StatusSpecification.cs index 454ccf2a2..d37154530 100644 --- a/src/NzbDrone.Core/AutoTagging/Specifications/StatusSpecification.cs +++ b/src/NzbDrone.Core/AutoTagging/Specifications/StatusSpecification.cs @@ -11,7 +11,7 @@ public class StatusSpecificationValidator : AbstractValidator 1; public override string ImplementationName => "Status"; diff --git a/src/NzbDrone.Core/AutoTagging/Specifications/TagSpecification.cs b/src/NzbDrone.Core/AutoTagging/Specifications/TagSpecification.cs index c736f8899..82e81ca0d 100644 --- a/src/NzbDrone.Core/AutoTagging/Specifications/TagSpecification.cs +++ b/src/NzbDrone.Core/AutoTagging/Specifications/TagSpecification.cs @@ -15,7 +15,7 @@ public TagSpecificationValidator() public class TagSpecification : AutoTaggingSpecificationBase { - private static readonly TagSpecificationValidator Validator = new (); + private static readonly TagSpecificationValidator Validator = new(); public override int Order => 1; public override string ImplementationName => "Tag"; diff --git a/src/NzbDrone.Core/AutoTagging/Specifications/YearSpecification.cs b/src/NzbDrone.Core/AutoTagging/Specifications/YearSpecification.cs index 1f04e65cd..4fe156201 100644 --- a/src/NzbDrone.Core/AutoTagging/Specifications/YearSpecification.cs +++ b/src/NzbDrone.Core/AutoTagging/Specifications/YearSpecification.cs @@ -18,7 +18,7 @@ public YearSpecificationValidator() public class YearSpecification : AutoTaggingSpecificationBase { - private static readonly YearSpecificationValidator Validator = new (); + private static readonly YearSpecificationValidator Validator = new(); public override int Order => 1; public override string ImplementationName => "Year"; diff --git a/src/NzbDrone.Core/CustomFormats/Specifications/IndexerFlagSpecification.cs b/src/NzbDrone.Core/CustomFormats/Specifications/IndexerFlagSpecification.cs index 3eaeeb5f6..7132ba4d7 100644 --- a/src/NzbDrone.Core/CustomFormats/Specifications/IndexerFlagSpecification.cs +++ b/src/NzbDrone.Core/CustomFormats/Specifications/IndexerFlagSpecification.cs @@ -23,7 +23,7 @@ public IndexerFlagSpecificationValidator() public class IndexerFlagSpecification : CustomFormatSpecificationBase { - private static readonly IndexerFlagSpecificationValidator Validator = new (); + private static readonly IndexerFlagSpecificationValidator Validator = new(); public override int Order => 4; public override string ImplementationName => "Indexer Flag"; diff --git a/src/NzbDrone.Core/CustomFormats/Specifications/ReleaseTypeSpecification.cs b/src/NzbDrone.Core/CustomFormats/Specifications/ReleaseTypeSpecification.cs index d14a6e041..fb4d1a5af 100644 --- a/src/NzbDrone.Core/CustomFormats/Specifications/ReleaseTypeSpecification.cs +++ b/src/NzbDrone.Core/CustomFormats/Specifications/ReleaseTypeSpecification.cs @@ -22,7 +22,7 @@ public SeasonPackSpecificationValidator() public class ReleaseTypeSpecification : CustomFormatSpecificationBase { - private static readonly SeasonPackSpecificationValidator Validator = new (); + private static readonly SeasonPackSpecificationValidator Validator = new(); public override int Order => 10; public override string ImplementationName => "Release Type"; diff --git a/src/NzbDrone.Core/Datastore/DatabaseVersionParser.cs b/src/NzbDrone.Core/Datastore/DatabaseVersionParser.cs index ffc77cf18..81f727e16 100644 --- a/src/NzbDrone.Core/Datastore/DatabaseVersionParser.cs +++ b/src/NzbDrone.Core/Datastore/DatabaseVersionParser.cs @@ -5,7 +5,7 @@ namespace NzbDrone.Core.Datastore; public static class DatabaseVersionParser { - private static readonly Regex VersionRegex = new (@"^[^ ]+", RegexOptions.Compiled); + private static readonly Regex VersionRegex = new(@"^[^ ]+", RegexOptions.Compiled); public static Version ParseServerVersion(string serverVersion) { diff --git a/src/NzbDrone.Core/Datastore/Migration/163_mediainfo_to_ffmpeg.cs b/src/NzbDrone.Core/Datastore/Migration/163_mediainfo_to_ffmpeg.cs index 7d3610b54..0579eaf4b 100644 --- a/src/NzbDrone.Core/Datastore/Migration/163_mediainfo_to_ffmpeg.cs +++ b/src/NzbDrone.Core/Datastore/Migration/163_mediainfo_to_ffmpeg.cs @@ -364,7 +364,7 @@ private HdrFormat MigrateHdrFormat(MediaInfo162 mediaInfo) } } - return VideoFileInfoReader.GetHdrFormat(mediaInfo.VideoBitDepth, mediaInfo.VideoColourPrimaries, mediaInfo.VideoTransferCharacteristics, new ()); + return VideoFileInfoReader.GetHdrFormat(mediaInfo.VideoBitDepth, mediaInfo.VideoColourPrimaries, mediaInfo.VideoTransferCharacteristics, new()); } private void MigrateAudioCodec(MediaInfo162 mediaInfo, MediaInfo163 m) diff --git a/src/NzbDrone.Core/DecisionEngine/DownloadSpecDecision.cs b/src/NzbDrone.Core/DecisionEngine/DownloadSpecDecision.cs index 53653293d..228925c5c 100644 --- a/src/NzbDrone.Core/DecisionEngine/DownloadSpecDecision.cs +++ b/src/NzbDrone.Core/DecisionEngine/DownloadSpecDecision.cs @@ -6,7 +6,7 @@ public class DownloadSpecDecision public DownloadRejectionReason Reason { get; set; } public string Message { get; private set; } - private static readonly DownloadSpecDecision AcceptDownloadSpecDecision = new () { Accepted = true }; + private static readonly DownloadSpecDecision AcceptDownloadSpecDecision = new() { Accepted = true }; private DownloadSpecDecision() { } diff --git a/src/NzbDrone.Core/Download/Clients/Aria2/Aria2Settings.cs b/src/NzbDrone.Core/Download/Clients/Aria2/Aria2Settings.cs index d4d01fb69..b19e9ea6c 100644 --- a/src/NzbDrone.Core/Download/Clients/Aria2/Aria2Settings.cs +++ b/src/NzbDrone.Core/Download/Clients/Aria2/Aria2Settings.cs @@ -14,7 +14,7 @@ public Aria2SettingsValidator() public class Aria2Settings : DownloadClientSettingsBase { - private static readonly Aria2SettingsValidator Validator = new (); + private static readonly Aria2SettingsValidator Validator = new(); public Aria2Settings() { diff --git a/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackholeSettings.cs b/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackholeSettings.cs index 95e1ad385..7eaedbaa4 100644 --- a/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackholeSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/Blackhole/TorrentBlackholeSettings.cs @@ -25,7 +25,7 @@ public TorrentBlackholeSettings() ReadOnly = true; } - private static readonly TorrentBlackholeSettingsValidator Validator = new (); + private static readonly TorrentBlackholeSettingsValidator Validator = new(); [FieldDefinition(0, Label = "TorrentBlackholeTorrentFolder", Type = FieldType.Path, HelpText = "BlackholeFolderHelpText")] [FieldToken(TokenField.HelpText, "TorrentBlackholeTorrentFolder", "extension", ".torrent")] diff --git a/src/NzbDrone.Core/Download/Clients/Blackhole/UsenetBlackholeSettings.cs b/src/NzbDrone.Core/Download/Clients/Blackhole/UsenetBlackholeSettings.cs index 7e97c7ae7..e0504e62b 100644 --- a/src/NzbDrone.Core/Download/Clients/Blackhole/UsenetBlackholeSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/Blackhole/UsenetBlackholeSettings.cs @@ -16,7 +16,7 @@ public UsenetBlackholeSettingsValidator() public class UsenetBlackholeSettings : DownloadClientSettingsBase { - private static readonly UsenetBlackholeSettingsValidator Validator = new (); + private static readonly UsenetBlackholeSettingsValidator Validator = new(); [FieldDefinition(0, Label = "UsenetBlackholeNzbFolder", Type = FieldType.Path, HelpText = "BlackholeFolderHelpText")] [FieldToken(TokenField.HelpText, "UsenetBlackholeNzbFolder", "extension", ".nzb")] diff --git a/src/NzbDrone.Core/Download/Clients/Deluge/DelugeSettings.cs b/src/NzbDrone.Core/Download/Clients/Deluge/DelugeSettings.cs index b5108cf24..2c1392723 100644 --- a/src/NzbDrone.Core/Download/Clients/Deluge/DelugeSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/Deluge/DelugeSettings.cs @@ -18,7 +18,7 @@ public DelugeSettingsValidator() public class DelugeSettings : DownloadClientSettingsBase { - private static readonly DelugeSettingsValidator Validator = new (); + private static readonly DelugeSettingsValidator Validator = new(); public DelugeSettings() { diff --git a/src/NzbDrone.Core/Download/Clients/DownloadStation/DownloadStationSettings.cs b/src/NzbDrone.Core/Download/Clients/DownloadStation/DownloadStationSettings.cs index 735d5f2c8..aad7b1e46 100644 --- a/src/NzbDrone.Core/Download/Clients/DownloadStation/DownloadStationSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/DownloadStation/DownloadStationSettings.cs @@ -27,7 +27,7 @@ public DownloadStationSettingsValidator() public class DownloadStationSettings : DownloadClientSettingsBase { - private static readonly DownloadStationSettingsValidator Validator = new (); + private static readonly DownloadStationSettingsValidator Validator = new(); [FieldDefinition(0, Label = "Host", Type = FieldType.Textbox)] public string Host { get; set; } diff --git a/src/NzbDrone.Core/Download/Clients/Flood/FloodSettings.cs b/src/NzbDrone.Core/Download/Clients/Flood/FloodSettings.cs index 4d582f48f..250cfe5fc 100644 --- a/src/NzbDrone.Core/Download/Clients/Flood/FloodSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/Flood/FloodSettings.cs @@ -18,7 +18,7 @@ public FloodSettingsValidator() public class FloodSettings : DownloadClientSettingsBase { - private static readonly FloodSettingsValidator Validator = new (); + private static readonly FloodSettingsValidator Validator = new(); public FloodSettings() { diff --git a/src/NzbDrone.Core/Download/Clients/FreeboxDownload/FreeboxDownloadSettings.cs b/src/NzbDrone.Core/Download/Clients/FreeboxDownload/FreeboxDownloadSettings.cs index b2ae0d160..7f65d0b15 100644 --- a/src/NzbDrone.Core/Download/Clients/FreeboxDownload/FreeboxDownloadSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/FreeboxDownload/FreeboxDownloadSettings.cs @@ -35,7 +35,7 @@ public FreeboxDownloadSettingsValidator() public class FreeboxDownloadSettings : DownloadClientSettingsBase { - private static readonly FreeboxDownloadSettingsValidator Validator = new (); + private static readonly FreeboxDownloadSettingsValidator Validator = new(); public FreeboxDownloadSettings() { diff --git a/src/NzbDrone.Core/Download/Clients/Hadouken/HadoukenSettings.cs b/src/NzbDrone.Core/Download/Clients/Hadouken/HadoukenSettings.cs index 390993df8..beab54a52 100644 --- a/src/NzbDrone.Core/Download/Clients/Hadouken/HadoukenSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/Hadouken/HadoukenSettings.cs @@ -23,7 +23,7 @@ public HadoukenSettingsValidator() public class HadoukenSettings : DownloadClientSettingsBase { - private static readonly HadoukenSettingsValidator Validator = new (); + private static readonly HadoukenSettingsValidator Validator = new(); public HadoukenSettings() { diff --git a/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortexSettings.cs b/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortexSettings.cs index 27da7065d..62f631d97 100644 --- a/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortexSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/NzbVortex/NzbVortexSettings.cs @@ -24,7 +24,7 @@ public NzbVortexSettingsValidator() public class NzbVortexSettings : DownloadClientSettingsBase { - private static readonly NzbVortexSettingsValidator Validator = new (); + private static readonly NzbVortexSettingsValidator Validator = new(); public NzbVortexSettings() { diff --git a/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetSettings.cs b/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetSettings.cs index 035dd0265..73cd1568e 100644 --- a/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetSettings.cs @@ -22,7 +22,7 @@ public NzbgetSettingsValidator() public class NzbgetSettings : DownloadClientSettingsBase { - private static readonly NzbgetSettingsValidator Validator = new (); + private static readonly NzbgetSettingsValidator Validator = new(); public NzbgetSettings() { diff --git a/src/NzbDrone.Core/Download/Clients/Pneumatic/PneumaticSettings.cs b/src/NzbDrone.Core/Download/Clients/Pneumatic/PneumaticSettings.cs index a18ad3a4b..d845f9151 100644 --- a/src/NzbDrone.Core/Download/Clients/Pneumatic/PneumaticSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/Pneumatic/PneumaticSettings.cs @@ -16,7 +16,7 @@ public PneumaticSettingsValidator() public class PneumaticSettings : DownloadClientSettingsBase { - private static readonly PneumaticSettingsValidator Validator = new (); + private static readonly PneumaticSettingsValidator Validator = new(); [FieldDefinition(0, Label = "DownloadClientPneumaticSettingsNzbFolder", Type = FieldType.Path, HelpText = "DownloadClientPneumaticSettingsNzbFolderHelpText")] public string NzbFolder { get; set; } diff --git a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentSettings.cs b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentSettings.cs index d87df8f9c..41cdb75bf 100644 --- a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentSettings.cs @@ -20,7 +20,7 @@ public QBittorrentSettingsValidator() public class QBittorrentSettings : DownloadClientSettingsBase { - private static readonly QBittorrentSettingsValidator Validator = new (); + private static readonly QBittorrentSettingsValidator Validator = new(); public QBittorrentSettings() { diff --git a/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdSettings.cs b/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdSettings.cs index 98a499ace..2559b00a1 100644 --- a/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/Sabnzbd/SabnzbdSettings.cs @@ -33,7 +33,7 @@ public SabnzbdSettingsValidator() public class SabnzbdSettings : DownloadClientSettingsBase { - private static readonly SabnzbdSettingsValidator Validator = new (); + private static readonly SabnzbdSettingsValidator Validator = new(); public SabnzbdSettings() { diff --git a/src/NzbDrone.Core/Download/Clients/TorrentSeedConfiguration.cs b/src/NzbDrone.Core/Download/Clients/TorrentSeedConfiguration.cs index 8b26f2033..50417fa5f 100644 --- a/src/NzbDrone.Core/Download/Clients/TorrentSeedConfiguration.cs +++ b/src/NzbDrone.Core/Download/Clients/TorrentSeedConfiguration.cs @@ -4,7 +4,7 @@ namespace NzbDrone.Core.Download.Clients { public class TorrentSeedConfiguration { - public static TorrentSeedConfiguration DefaultConfiguration = new (); + public static TorrentSeedConfiguration DefaultConfiguration = new(); public double? Ratio { get; set; } public TimeSpan? SeedTime { get; set; } diff --git a/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionSettings.cs b/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionSettings.cs index a7bfbcab4..3388440f8 100644 --- a/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/Transmission/TransmissionSettings.cs @@ -26,7 +26,7 @@ public TransmissionSettingsValidator() public class TransmissionSettings : DownloadClientSettingsBase { - private static readonly TransmissionSettingsValidator Validator = new (); + private static readonly TransmissionSettingsValidator Validator = new(); // This constructor is used when creating a new instance, such as the user adding a new Transmission client. public TransmissionSettings() diff --git a/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrentSettings.cs b/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrentSettings.cs index df2cbf963..935890b89 100644 --- a/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrentSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/rTorrent/RTorrentSettings.cs @@ -18,7 +18,7 @@ public RTorrentSettingsValidator() public class RTorrentSettings : DownloadClientSettingsBase { - private static readonly RTorrentSettingsValidator Validator = new (); + private static readonly RTorrentSettingsValidator Validator = new(); public RTorrentSettings() { diff --git a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentSettings.cs b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentSettings.cs index 5bbc89d6e..33b50308d 100644 --- a/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentSettings.cs +++ b/src/NzbDrone.Core/Download/Clients/uTorrent/UTorrentSettings.cs @@ -18,7 +18,7 @@ public UTorrentSettingsValidator() public class UTorrentSettings : DownloadClientSettingsBase { - private static readonly UTorrentSettingsValidator Validator = new (); + private static readonly UTorrentSettingsValidator Validator = new(); public UTorrentSettings() { diff --git a/src/NzbDrone.Core/HealthCheck/Checks/RemotePathMappingCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/RemotePathMappingCheck.cs index 82a7f1d35..1aa8f18a9 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/RemotePathMappingCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/RemotePathMappingCheck.cs @@ -332,7 +332,8 @@ public HealthCheck Check(IEvent message) { "downloadClientName", client.Definition.Name }, { "path", dlpath }, { "osName", _osInfo.Name } - }), "#bad-remote-path-mapping"); + }), + "#bad-remote-path-mapping"); } // path mappings shouldn't be needed locally so probably a permissions issue diff --git a/src/NzbDrone.Core/ImportLists/AniList/AniListSettingsBase.cs b/src/NzbDrone.Core/ImportLists/AniList/AniListSettingsBase.cs index 1f6b387cc..828c95266 100644 --- a/src/NzbDrone.Core/ImportLists/AniList/AniListSettingsBase.cs +++ b/src/NzbDrone.Core/ImportLists/AniList/AniListSettingsBase.cs @@ -32,7 +32,7 @@ public AniListSettingsBaseValidator() public class AniListSettingsBase : ImportListSettingsBase where TSettings : AniListSettingsBase { - private static readonly AniListSettingsBaseValidator Validator = new (); + private static readonly AniListSettingsBaseValidator Validator = new(); public AniListSettingsBase() { diff --git a/src/NzbDrone.Core/ImportLists/AniList/List/AniListSettings.cs b/src/NzbDrone.Core/ImportLists/AniList/List/AniListSettings.cs index 3a2511be0..3170c7f5d 100644 --- a/src/NzbDrone.Core/ImportLists/AniList/List/AniListSettings.cs +++ b/src/NzbDrone.Core/ImportLists/AniList/List/AniListSettings.cs @@ -20,7 +20,7 @@ public class AniListSettings : AniListSettingsBase { public const string SectionImport = "Import List Status"; - private static readonly AniListSettingsValidator Validator = new (); + private static readonly AniListSettingsValidator Validator = new(); public AniListSettings() { diff --git a/src/NzbDrone.Core/ImportLists/Custom/CustomSettings.cs b/src/NzbDrone.Core/ImportLists/Custom/CustomSettings.cs index 86aec5148..f53271048 100644 --- a/src/NzbDrone.Core/ImportLists/Custom/CustomSettings.cs +++ b/src/NzbDrone.Core/ImportLists/Custom/CustomSettings.cs @@ -15,7 +15,7 @@ public CustomSettingsValidator() public class CustomSettings : ImportListSettingsBase { - private static readonly CustomSettingsValidator Validator = new (); + private static readonly CustomSettingsValidator Validator = new(); [FieldDefinition(0, Label = "ImportListsCustomListSettingsUrl", HelpText = "ImportListsCustomListSettingsUrlHelpText")] public override string BaseUrl { get; set; } = string.Empty; diff --git a/src/NzbDrone.Core/ImportLists/MyAnimeList/MyAnimeListSettings.cs b/src/NzbDrone.Core/ImportLists/MyAnimeList/MyAnimeListSettings.cs index e4a76733d..6a06f3668 100644 --- a/src/NzbDrone.Core/ImportLists/MyAnimeList/MyAnimeListSettings.cs +++ b/src/NzbDrone.Core/ImportLists/MyAnimeList/MyAnimeListSettings.cs @@ -26,7 +26,7 @@ public MalSettingsValidator() public class MyAnimeListSettings : ImportListSettingsBase { - private static readonly MalSettingsValidator Validator = new (); + private static readonly MalSettingsValidator Validator = new(); public override string BaseUrl { get; set; } = "https://api.myanimelist.net/v2"; diff --git a/src/NzbDrone.Core/ImportLists/Plex/PlexListSettings.cs b/src/NzbDrone.Core/ImportLists/Plex/PlexListSettings.cs index db5bee7d5..2fa88c369 100644 --- a/src/NzbDrone.Core/ImportLists/Plex/PlexListSettings.cs +++ b/src/NzbDrone.Core/ImportLists/Plex/PlexListSettings.cs @@ -16,7 +16,7 @@ public PlexListSettingsValidator() public class PlexListSettings : ImportListSettingsBase { - private static readonly PlexListSettingsValidator Validator = new (); + private static readonly PlexListSettingsValidator Validator = new(); public PlexListSettings() { diff --git a/src/NzbDrone.Core/ImportLists/Rss/Plex/PlexRssImportParser.cs b/src/NzbDrone.Core/ImportLists/Rss/Plex/PlexRssImportParser.cs index 97c5a9d73..3fe799084 100644 --- a/src/NzbDrone.Core/ImportLists/Rss/Plex/PlexRssImportParser.cs +++ b/src/NzbDrone.Core/ImportLists/Rss/Plex/PlexRssImportParser.cs @@ -10,7 +10,7 @@ namespace NzbDrone.Core.ImportLists.Rss.Plex public class PlexRssImportParser : RssImportBaseParser { private readonly Logger _logger; - private static readonly Regex ImdbIdRegex = new (@"(tt\d{7,8})", RegexOptions.IgnoreCase | RegexOptions.Compiled); + private static readonly Regex ImdbIdRegex = new(@"(tt\d{7,8})", RegexOptions.IgnoreCase | RegexOptions.Compiled); public PlexRssImportParser(Logger logger) : base(logger) diff --git a/src/NzbDrone.Core/ImportLists/Rss/Plex/PlexRssImportSettings.cs b/src/NzbDrone.Core/ImportLists/Rss/Plex/PlexRssImportSettings.cs index 1df33858f..c8d4b3702 100644 --- a/src/NzbDrone.Core/ImportLists/Rss/Plex/PlexRssImportSettings.cs +++ b/src/NzbDrone.Core/ImportLists/Rss/Plex/PlexRssImportSettings.cs @@ -14,7 +14,7 @@ public PlexRssImportSettingsValidator() public class PlexRssImportSettings : RssImportBaseSettings { - private static readonly PlexRssImportSettingsValidator Validator = new (); + private static readonly PlexRssImportSettingsValidator Validator = new(); [FieldDefinition(0, Label = "ImportListsSettingsRssUrl", Type = FieldType.Textbox, HelpLink = "https://app.plex.tv/desktop/#!/settings/watchlist")] public override string Url { get; set; } diff --git a/src/NzbDrone.Core/ImportLists/Rss/RssImportBaseSettings.cs b/src/NzbDrone.Core/ImportLists/Rss/RssImportBaseSettings.cs index caf37e4cc..f456349fb 100644 --- a/src/NzbDrone.Core/ImportLists/Rss/RssImportBaseSettings.cs +++ b/src/NzbDrone.Core/ImportLists/Rss/RssImportBaseSettings.cs @@ -16,7 +16,7 @@ public RssImportSettingsValidator() public class RssImportBaseSettings : ImportListSettingsBase where TSettings : RssImportBaseSettings { - private static readonly RssImportSettingsValidator Validator = new (); + private static readonly RssImportSettingsValidator Validator = new(); public override string BaseUrl { get; set; } diff --git a/src/NzbDrone.Core/ImportLists/Simkl/SimklSettingsBase.cs b/src/NzbDrone.Core/ImportLists/Simkl/SimklSettingsBase.cs index d0b4cd3e3..27ed6086d 100644 --- a/src/NzbDrone.Core/ImportLists/Simkl/SimklSettingsBase.cs +++ b/src/NzbDrone.Core/ImportLists/Simkl/SimklSettingsBase.cs @@ -27,7 +27,7 @@ public SimklSettingsBaseValidator() public class SimklSettingsBase : ImportListSettingsBase where TSettings : SimklSettingsBase { - private static readonly SimklSettingsBaseValidator Validator = new (); + private static readonly SimklSettingsBaseValidator Validator = new(); public SimklSettingsBase() { diff --git a/src/NzbDrone.Core/ImportLists/Simkl/User/SimklUserSettings.cs b/src/NzbDrone.Core/ImportLists/Simkl/User/SimklUserSettings.cs index 7ce5f34ee..cabd423a9 100644 --- a/src/NzbDrone.Core/ImportLists/Simkl/User/SimklUserSettings.cs +++ b/src/NzbDrone.Core/ImportLists/Simkl/User/SimklUserSettings.cs @@ -14,7 +14,7 @@ public SimklUserSettingsValidator() public class SimklUserSettings : SimklSettingsBase { - private static readonly SimklUserSettingsValidator Validator = new (); + private static readonly SimklUserSettingsValidator Validator = new(); public SimklUserSettings() { diff --git a/src/NzbDrone.Core/ImportLists/Sonarr/SonarrSettings.cs b/src/NzbDrone.Core/ImportLists/Sonarr/SonarrSettings.cs index af1bbd0f7..f9b04fc9c 100644 --- a/src/NzbDrone.Core/ImportLists/Sonarr/SonarrSettings.cs +++ b/src/NzbDrone.Core/ImportLists/Sonarr/SonarrSettings.cs @@ -17,7 +17,7 @@ public SonarrSettingsValidator() public class SonarrSettings : ImportListSettingsBase { - private static readonly SonarrSettingsValidator Validator = new (); + private static readonly SonarrSettingsValidator Validator = new(); public SonarrSettings() { diff --git a/src/NzbDrone.Core/ImportLists/Trakt/List/TraktListSettings.cs b/src/NzbDrone.Core/ImportLists/Trakt/List/TraktListSettings.cs index 62da0dd78..59ac1acd8 100644 --- a/src/NzbDrone.Core/ImportLists/Trakt/List/TraktListSettings.cs +++ b/src/NzbDrone.Core/ImportLists/Trakt/List/TraktListSettings.cs @@ -15,7 +15,7 @@ public TraktListSettingsValidator() public class TraktListSettings : TraktSettingsBase { - private static readonly TraktListSettingsValidator Validator = new (); + private static readonly TraktListSettingsValidator Validator = new(); [FieldDefinition(1, Label = "Username", HelpText = "ImportListsTraktSettingsUsernameHelpText")] public string Username { get; set; } diff --git a/src/NzbDrone.Core/ImportLists/Trakt/Popular/TraktPopularSettings.cs b/src/NzbDrone.Core/ImportLists/Trakt/Popular/TraktPopularSettings.cs index 9e6fb38c3..0004cdb7e 100644 --- a/src/NzbDrone.Core/ImportLists/Trakt/Popular/TraktPopularSettings.cs +++ b/src/NzbDrone.Core/ImportLists/Trakt/Popular/TraktPopularSettings.cs @@ -28,7 +28,7 @@ public TraktPopularSettingsValidator() public class TraktPopularSettings : TraktSettingsBase { - private static readonly TraktPopularSettingsValidator Validator = new (); + private static readonly TraktPopularSettingsValidator Validator = new(); public TraktPopularSettings() { diff --git a/src/NzbDrone.Core/ImportLists/Trakt/TraktSettingsBase.cs b/src/NzbDrone.Core/ImportLists/Trakt/TraktSettingsBase.cs index cbb69c0d1..03834afa6 100644 --- a/src/NzbDrone.Core/ImportLists/Trakt/TraktSettingsBase.cs +++ b/src/NzbDrone.Core/ImportLists/Trakt/TraktSettingsBase.cs @@ -37,7 +37,7 @@ public TraktSettingsBaseValidator() public class TraktSettingsBase : ImportListSettingsBase where TSettings : TraktSettingsBase { - private static readonly TraktSettingsBaseValidator Validator = new (); + private static readonly TraktSettingsBaseValidator Validator = new(); public TraktSettingsBase() { diff --git a/src/NzbDrone.Core/ImportLists/Trakt/User/TraktUserSettings.cs b/src/NzbDrone.Core/ImportLists/Trakt/User/TraktUserSettings.cs index 9d70682a3..a6ae19c4d 100644 --- a/src/NzbDrone.Core/ImportLists/Trakt/User/TraktUserSettings.cs +++ b/src/NzbDrone.Core/ImportLists/Trakt/User/TraktUserSettings.cs @@ -16,7 +16,7 @@ public TraktUserSettingsValidator() public class TraktUserSettings : TraktSettingsBase { - private static readonly TraktUserSettingsValidator Validator = new (); + private static readonly TraktUserSettingsValidator Validator = new(); public TraktUserSettings() { diff --git a/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetParser.cs b/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetParser.cs index ec652879e..658e0ab66 100644 --- a/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetParser.cs +++ b/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetParser.cs @@ -11,7 +11,7 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet { public class BroadcastheNetParser : IParseIndexerResponse { - private static readonly Regex RegexProtocol = new ("^https?:", RegexOptions.Compiled); + private static readonly Regex RegexProtocol = new("^https?:", RegexOptions.Compiled); public IList ParseResponse(IndexerResponse indexerResponse) { diff --git a/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetSettings.cs b/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetSettings.cs index 6c5d2c473..3095c2807 100644 --- a/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetSettings.cs +++ b/src/NzbDrone.Core/Indexers/BroadcastheNet/BroadcastheNetSettings.cs @@ -21,7 +21,7 @@ public BroadcastheNetSettingsValidator() public class BroadcastheNetSettings : PropertywiseEquatable, ITorrentIndexerSettings { - private static readonly BroadcastheNetSettingsValidator Validator = new (); + private static readonly BroadcastheNetSettingsValidator Validator = new(); public BroadcastheNetSettings() { @@ -41,7 +41,7 @@ public BroadcastheNetSettings() public int MinimumSeeders { get; set; } [FieldDefinition(3)] - public SeedCriteriaSettings SeedCriteria { get; set; } = new (); + public SeedCriteriaSettings SeedCriteria { get; set; } = new(); [FieldDefinition(4, Type = FieldType.Checkbox, Label = "IndexerSettingsRejectBlocklistedTorrentHashes", HelpText = "IndexerSettingsRejectBlocklistedTorrentHashesHelpText", Advanced = true)] public bool RejectBlocklistedTorrentHashesWhileGrabbing { get; set; } diff --git a/src/NzbDrone.Core/Indexers/Fanzub/FanzubSettings.cs b/src/NzbDrone.Core/Indexers/Fanzub/FanzubSettings.cs index 2b6368a42..40697b2e2 100644 --- a/src/NzbDrone.Core/Indexers/Fanzub/FanzubSettings.cs +++ b/src/NzbDrone.Core/Indexers/Fanzub/FanzubSettings.cs @@ -18,7 +18,7 @@ public FanzubSettingsValidator() public class FanzubSettings : PropertywiseEquatable, IIndexerSettings { - private static readonly FanzubSettingsValidator Validator = new (); + private static readonly FanzubSettingsValidator Validator = new(); public FanzubSettings() { diff --git a/src/NzbDrone.Core/Indexers/FileList/FileListSettings.cs b/src/NzbDrone.Core/Indexers/FileList/FileListSettings.cs index 576acbe72..b50ad3fb5 100644 --- a/src/NzbDrone.Core/Indexers/FileList/FileListSettings.cs +++ b/src/NzbDrone.Core/Indexers/FileList/FileListSettings.cs @@ -22,7 +22,7 @@ public FileListSettingsValidator() public class FileListSettings : PropertywiseEquatable, ITorrentIndexerSettings { - private static readonly FileListSettingsValidator Validator = new (); + private static readonly FileListSettingsValidator Validator = new(); public FileListSettings() { @@ -63,7 +63,7 @@ public FileListSettings() public int MinimumSeeders { get; set; } [FieldDefinition(7)] - public SeedCriteriaSettings SeedCriteria { get; set; } = new (); + public SeedCriteriaSettings SeedCriteria { get; set; } = new(); [FieldDefinition(8, Type = FieldType.Checkbox, Label = "IndexerSettingsRejectBlocklistedTorrentHashes", HelpText = "IndexerSettingsRejectBlocklistedTorrentHashesHelpText", Advanced = true)] public bool RejectBlocklistedTorrentHashesWhileGrabbing { get; set; } diff --git a/src/NzbDrone.Core/Indexers/HDBits/HDBitsSettings.cs b/src/NzbDrone.Core/Indexers/HDBits/HDBitsSettings.cs index 1e2dc0d2d..ec59c0cef 100644 --- a/src/NzbDrone.Core/Indexers/HDBits/HDBitsSettings.cs +++ b/src/NzbDrone.Core/Indexers/HDBits/HDBitsSettings.cs @@ -21,7 +21,7 @@ public HDBitsSettingsValidator() public class HDBitsSettings : PropertywiseEquatable, ITorrentIndexerSettings { - private static readonly HDBitsSettingsValidator Validator = new (); + private static readonly HDBitsSettingsValidator Validator = new(); public HDBitsSettings() { @@ -57,7 +57,7 @@ public HDBitsSettings() public int MinimumSeeders { get; set; } [FieldDefinition(7)] - public SeedCriteriaSettings SeedCriteria { get; set; } = new (); + public SeedCriteriaSettings SeedCriteria { get; set; } = new(); [FieldDefinition(8, Type = FieldType.Checkbox, Label = "IndexerSettingsRejectBlocklistedTorrentHashes", HelpText = "IndexerSettingsRejectBlocklistedTorrentHashesHelpText", Advanced = true)] public bool RejectBlocklistedTorrentHashesWhileGrabbing { get; set; } diff --git a/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrentsSettings.cs b/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrentsSettings.cs index af6748186..33406b331 100644 --- a/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrentsSettings.cs +++ b/src/NzbDrone.Core/Indexers/IPTorrents/IPTorrentsSettings.cs @@ -28,7 +28,7 @@ public IPTorrentsSettingsValidator() public class IPTorrentsSettings : PropertywiseEquatable, ITorrentIndexerSettings { - private static readonly IPTorrentsSettingsValidator Validator = new (); + private static readonly IPTorrentsSettingsValidator Validator = new(); public IPTorrentsSettings() { @@ -44,7 +44,7 @@ public IPTorrentsSettings() public int MinimumSeeders { get; set; } [FieldDefinition(2)] - public SeedCriteriaSettings SeedCriteria { get; set; } = new (); + public SeedCriteriaSettings SeedCriteria { get; set; } = new(); [FieldDefinition(3, Type = FieldType.Checkbox, Label = "IndexerSettingsRejectBlocklistedTorrentHashes", HelpText = "IndexerSettingsRejectBlocklistedTorrentHashesHelpText", Advanced = true)] public bool RejectBlocklistedTorrentHashesWhileGrabbing { get; set; } diff --git a/src/NzbDrone.Core/Indexers/Newznab/NewznabSettings.cs b/src/NzbDrone.Core/Indexers/Newznab/NewznabSettings.cs index 07ab7e5cd..3324916c7 100644 --- a/src/NzbDrone.Core/Indexers/Newznab/NewznabSettings.cs +++ b/src/NzbDrone.Core/Indexers/Newznab/NewznabSettings.cs @@ -29,7 +29,7 @@ private static bool ShouldHaveApiKey(NewznabSettings settings) return settings.BaseUrl != null && ApiKeyWhiteList.Any(c => settings.BaseUrl.ToLowerInvariant().Contains(c)); } - private static readonly Regex AdditionalParametersRegex = new (@"(&.+?\=.+?)+", RegexOptions.Compiled); + private static readonly Regex AdditionalParametersRegex = new(@"(&.+?\=.+?)+", RegexOptions.Compiled); public NewznabSettingsValidator() { @@ -51,7 +51,7 @@ public NewznabSettingsValidator() public class NewznabSettings : PropertywiseEquatable, IIndexerSettings { - private static readonly NewznabSettingsValidator Validator = new (); + private static readonly NewznabSettingsValidator Validator = new(); public NewznabSettings() { diff --git a/src/NzbDrone.Core/Indexers/Nyaa/NyaaSettings.cs b/src/NzbDrone.Core/Indexers/Nyaa/NyaaSettings.cs index 6f8290530..b6700d32f 100644 --- a/src/NzbDrone.Core/Indexers/Nyaa/NyaaSettings.cs +++ b/src/NzbDrone.Core/Indexers/Nyaa/NyaaSettings.cs @@ -22,7 +22,7 @@ public NyaaSettingsValidator() public class NyaaSettings : PropertywiseEquatable, ITorrentIndexerSettings { - private static readonly NyaaSettingsValidator Validator = new (); + private static readonly NyaaSettingsValidator Validator = new(); public NyaaSettings() { @@ -46,7 +46,7 @@ public NyaaSettings() public int MinimumSeeders { get; set; } [FieldDefinition(4)] - public SeedCriteriaSettings SeedCriteria { get; set; } = new (); + public SeedCriteriaSettings SeedCriteria { get; set; } = new(); [FieldDefinition(5, Type = FieldType.Checkbox, Label = "IndexerSettingsRejectBlocklistedTorrentHashes", HelpText = "IndexerSettingsRejectBlocklistedTorrentHashesHelpText", Advanced = true)] public bool RejectBlocklistedTorrentHashesWhileGrabbing { get; set; } diff --git a/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexerSettings.cs b/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexerSettings.cs index 43c324a18..456660634 100644 --- a/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexerSettings.cs +++ b/src/NzbDrone.Core/Indexers/TorrentRss/TorrentRssIndexerSettings.cs @@ -20,7 +20,7 @@ public TorrentRssIndexerSettingsValidator() public class TorrentRssIndexerSettings : PropertywiseEquatable, ITorrentIndexerSettings { - private static readonly TorrentRssIndexerSettingsValidator Validator = new (); + private static readonly TorrentRssIndexerSettingsValidator Validator = new(); public TorrentRssIndexerSettings() { @@ -44,7 +44,7 @@ public TorrentRssIndexerSettings() public int MinimumSeeders { get; set; } [FieldDefinition(4)] - public SeedCriteriaSettings SeedCriteria { get; set; } = new (); + public SeedCriteriaSettings SeedCriteria { get; set; } = new(); [FieldDefinition(5, Type = FieldType.Checkbox, Label = "IndexerSettingsRejectBlocklistedTorrentHashes", HelpText = "IndexerSettingsRejectBlocklistedTorrentHashesHelpText", Advanced = true)] public bool RejectBlocklistedTorrentHashesWhileGrabbing { get; set; } diff --git a/src/NzbDrone.Core/Indexers/Torrentleech/TorrentleechSettings.cs b/src/NzbDrone.Core/Indexers/Torrentleech/TorrentleechSettings.cs index b2fbdb66f..4bb8f96aa 100644 --- a/src/NzbDrone.Core/Indexers/Torrentleech/TorrentleechSettings.cs +++ b/src/NzbDrone.Core/Indexers/Torrentleech/TorrentleechSettings.cs @@ -21,7 +21,7 @@ public TorrentleechSettingsValidator() public class TorrentleechSettings : PropertywiseEquatable, ITorrentIndexerSettings { - private static readonly TorrentleechSettingsValidator Validator = new (); + private static readonly TorrentleechSettingsValidator Validator = new(); public TorrentleechSettings() { @@ -41,7 +41,7 @@ public TorrentleechSettings() public int MinimumSeeders { get; set; } [FieldDefinition(3)] - public SeedCriteriaSettings SeedCriteria { get; set; } = new (); + public SeedCriteriaSettings SeedCriteria { get; set; } = new(); [FieldDefinition(4, Type = FieldType.Checkbox, Label = "IndexerSettingsRejectBlocklistedTorrentHashes", HelpText = "IndexerSettingsRejectBlocklistedTorrentHashesHelpText", Advanced = true)] public bool RejectBlocklistedTorrentHashesWhileGrabbing { get; set; } diff --git a/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs b/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs index 35951a54c..f39a4528c 100644 --- a/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs +++ b/src/NzbDrone.Core/Indexers/Torznab/TorznabSettings.cs @@ -19,7 +19,7 @@ private static bool ShouldHaveApiKey(TorznabSettings settings) return settings.BaseUrl != null && ApiKeyWhiteList.Any(c => settings.BaseUrl.ToLowerInvariant().Contains(c)); } - private static readonly Regex AdditionalParametersRegex = new (@"(&.+?\=.+?)+", RegexOptions.Compiled); + private static readonly Regex AdditionalParametersRegex = new(@"(&.+?\=.+?)+", RegexOptions.Compiled); public TorznabSettingsValidator() { @@ -43,7 +43,7 @@ public TorznabSettingsValidator() public class TorznabSettings : NewznabSettings, ITorrentIndexerSettings, IEquatable { - private static readonly TorznabSettingsValidator Validator = new (); + private static readonly TorznabSettingsValidator Validator = new(); private static readonly MemberwiseEqualityComparer Comparer = MemberwiseEqualityComparer.ByProperties; @@ -56,7 +56,7 @@ public TorznabSettings() public int MinimumSeeders { get; set; } [FieldDefinition(10)] - public SeedCriteriaSettings SeedCriteria { get; set; } = new (); + public SeedCriteriaSettings SeedCriteria { get; set; } = new(); [FieldDefinition(11, Type = FieldType.Checkbox, Label = "IndexerSettingsRejectBlocklistedTorrentHashes", HelpText = "IndexerSettingsRejectBlocklistedTorrentHashesHelpText", Advanced = true)] public bool RejectBlocklistedTorrentHashesWhileGrabbing { get; set; } diff --git a/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportSpecDecision.cs b/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportSpecDecision.cs index d4f5c5c2f..0ea08eb36 100644 --- a/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportSpecDecision.cs +++ b/src/NzbDrone.Core/MediaFiles/EpisodeImport/ImportSpecDecision.cs @@ -6,7 +6,7 @@ public class ImportSpecDecision public ImportRejectionReason Reason { get; set; } public string Message { get; private set; } - private static readonly ImportSpecDecision AcceptDecision = new () { Accepted = true }; + private static readonly ImportSpecDecision AcceptDecision = new() { Accepted = true }; private ImportSpecDecision() { } diff --git a/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs b/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs index 8279aefc5..2b9379db7 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaInfo/VideoFileInfoReader.cs @@ -117,14 +117,14 @@ public MediaInfoModel GetMediaInfo(string filename) // if it looks like PQ10 or similar HDR, do a frame analysis to figure out which type it is if (PqTransferFunctions.Contains(mediaInfoModel.VideoTransferCharacteristics)) { - var frameOutput = FFProbe.GetFrameJson(filename, ffOptions: new () { ExtraArguments = $"-read_intervals \"%+#1\" -select_streams v:{primaryVideoStream?.Index ?? 0}" }); + var frameOutput = FFProbe.GetFrameJson(filename, ffOptions: new() { ExtraArguments = $"-read_intervals \"%+#1\" -select_streams v:{primaryVideoStream?.Index ?? 0}" }); mediaInfoModel.RawFrameData = frameOutput; frames = FFProbe.AnalyseFrameJson(frameOutput); } - var streamSideData = primaryVideoStream?.SideDataList ?? new (); - var framesSideData = frames?.Frames?.Count > 0 ? frames?.Frames[0]?.SideDataList ?? new () : new (); + var streamSideData = primaryVideoStream?.SideDataList ?? new(); + var framesSideData = frames?.Frames?.Count > 0 ? frames?.Frames[0]?.SideDataList ?? new() : new(); var sideData = streamSideData.Concat(framesSideData).ToList(); mediaInfoModel.VideoHdrFormat = GetHdrFormat(mediaInfoModel.VideoBitDepth, mediaInfoModel.VideoColourPrimaries, mediaInfoModel.VideoTransferCharacteristics, sideData); diff --git a/src/NzbDrone.Core/Messaging/Events/EventAggregator.cs b/src/NzbDrone.Core/Messaging/Events/EventAggregator.cs index 3b24899ac..0a429e023 100644 --- a/src/NzbDrone.Core/Messaging/Events/EventAggregator.cs +++ b/src/NzbDrone.Core/Messaging/Events/EventAggregator.cs @@ -106,7 +106,8 @@ public void PublishEvent(TEvent @event) _taskFactory.StartNew(() => { handlerLocal.HandleAsync(@event); - }, TaskCreationOptions.PreferFairness) + }, + TaskCreationOptions.PreferFairness) .LogExceptions(); } @@ -119,7 +120,8 @@ public void PublishEvent(TEvent @event) _logger.Trace("{0} ~> {1}", eventName, handlerLocal.GetType().Name); handlerLocal.HandleAsync(@event); _logger.Trace("{0} <~ {1}", eventName, handlerLocal.GetType().Name); - }, TaskCreationOptions.PreferFairness) + }, + TaskCreationOptions.PreferFairness) .LogExceptions(); } } diff --git a/src/NzbDrone.Core/Notifications/Apprise/AppriseSettings.cs b/src/NzbDrone.Core/Notifications/Apprise/AppriseSettings.cs index 978305318..50d76a581 100644 --- a/src/NzbDrone.Core/Notifications/Apprise/AppriseSettings.cs +++ b/src/NzbDrone.Core/Notifications/Apprise/AppriseSettings.cs @@ -36,7 +36,7 @@ public AppriseSettingsValidator() public class AppriseSettings : NotificationSettingsBase { - private static readonly AppriseSettingsValidator Validator = new (); + private static readonly AppriseSettingsValidator Validator = new(); public AppriseSettings() { diff --git a/src/NzbDrone.Core/Notifications/CustomScript/CustomScriptSettings.cs b/src/NzbDrone.Core/Notifications/CustomScript/CustomScriptSettings.cs index ecd23d76b..4e4324687 100644 --- a/src/NzbDrone.Core/Notifications/CustomScript/CustomScriptSettings.cs +++ b/src/NzbDrone.Core/Notifications/CustomScript/CustomScriptSettings.cs @@ -17,7 +17,7 @@ public CustomScriptSettingsValidator() public class CustomScriptSettings : NotificationSettingsBase { - private static readonly CustomScriptSettingsValidator Validator = new (); + private static readonly CustomScriptSettingsValidator Validator = new(); [FieldDefinition(0, Label = "Path", Type = FieldType.FilePath)] public string Path { get; set; } diff --git a/src/NzbDrone.Core/Notifications/Discord/Discord.cs b/src/NzbDrone.Core/Notifications/Discord/Discord.cs index 5e579cab3..22de3ddb2 100644 --- a/src/NzbDrone.Core/Notifications/Discord/Discord.cs +++ b/src/NzbDrone.Core/Notifications/Discord/Discord.cs @@ -342,7 +342,7 @@ public override void OnRename(Series series, List renamedFil { var attachments = new List { - new () + new() { Title = series.Title, } @@ -373,8 +373,8 @@ public override void OnEpisodeFileDelete(EpisodeDeleteMessage deleteMessage) Color = (int)DiscordColors.Danger, Fields = new List { - new () { Name = "Reason", Value = reason.ToString() }, - new () { Name = "File name", Value = string.Format("```{0}```", deletedFile) } + new() { Name = "Reason", Value = reason.ToString() }, + new() { Name = "File name", Value = string.Format("```{0}```", deletedFile) } }, Timestamp = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"), }; @@ -398,7 +398,7 @@ public override void OnSeriesAdd(SeriesAddMessage message) Title = series.Title, Description = "Series Added", Color = (int)DiscordColors.Success, - Fields = new List { new () { Name = "Links", Value = GetLinksString(series) } } + Fields = new List { new() { Name = "Links", Value = GetLinksString(series) } } }; if (Settings.ImportFields.Contains((int)DiscordImportFieldType.Poster)) @@ -437,7 +437,7 @@ public override void OnSeriesDelete(SeriesDeleteMessage deleteMessage) Title = series.Title, Description = deleteMessage.DeletedFilesMessage, Color = (int)DiscordColors.Danger, - Fields = new List { new () { Name = "Links", Value = GetLinksString(series) } } + Fields = new List { new() { Name = "Links", Value = GetLinksString(series) } } }; if (Settings.ImportFields.Contains((int)DiscordImportFieldType.Poster)) @@ -515,12 +515,12 @@ public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage) Color = (int)DiscordColors.Standard, Fields = new List() { - new () + new() { Name = "Previous Version", Value = updateMessage.PreviousVersion.ToString() }, - new () + new() { Name = "New Version", Value = updateMessage.NewVersion.ToString() diff --git a/src/NzbDrone.Core/Notifications/Discord/DiscordSettings.cs b/src/NzbDrone.Core/Notifications/Discord/DiscordSettings.cs index ab6e53dcf..23bc528c7 100644 --- a/src/NzbDrone.Core/Notifications/Discord/DiscordSettings.cs +++ b/src/NzbDrone.Core/Notifications/Discord/DiscordSettings.cs @@ -65,7 +65,7 @@ public DiscordSettings() }; } - private static readonly DiscordSettingsValidator Validator = new (); + private static readonly DiscordSettingsValidator Validator = new(); [FieldDefinition(0, Label = "NotificationsSettingsWebhookUrl", HelpText = "NotificationsDiscordSettingsWebhookUrlHelpText")] public string WebHookUrl { get; set; } diff --git a/src/NzbDrone.Core/Notifications/Email/EmailSettings.cs b/src/NzbDrone.Core/Notifications/Email/EmailSettings.cs index d01feda74..1bbfcc11e 100644 --- a/src/NzbDrone.Core/Notifications/Email/EmailSettings.cs +++ b/src/NzbDrone.Core/Notifications/Email/EmailSettings.cs @@ -27,7 +27,7 @@ public EmailSettingsValidator() public class EmailSettings : NotificationSettingsBase { - private static readonly EmailSettingsValidator Validator = new (); + private static readonly EmailSettingsValidator Validator = new(); public EmailSettings() { diff --git a/src/NzbDrone.Core/Notifications/Gotify/GotifySettings.cs b/src/NzbDrone.Core/Notifications/Gotify/GotifySettings.cs index 94efd379f..0a46d3a00 100644 --- a/src/NzbDrone.Core/Notifications/Gotify/GotifySettings.cs +++ b/src/NzbDrone.Core/Notifications/Gotify/GotifySettings.cs @@ -43,7 +43,7 @@ public GotifySettingsValidator() public class GotifySettings : NotificationSettingsBase { - private static readonly GotifySettingsValidator Validator = new (); + private static readonly GotifySettingsValidator Validator = new(); public GotifySettings() { diff --git a/src/NzbDrone.Core/Notifications/Join/JoinSettings.cs b/src/NzbDrone.Core/Notifications/Join/JoinSettings.cs index 9bc429014..f2040e706 100644 --- a/src/NzbDrone.Core/Notifications/Join/JoinSettings.cs +++ b/src/NzbDrone.Core/Notifications/Join/JoinSettings.cs @@ -15,7 +15,7 @@ public JoinSettingsValidator() public class JoinSettings : NotificationSettingsBase { - private static readonly JoinSettingsValidator Validator = new (); + private static readonly JoinSettingsValidator Validator = new(); public JoinSettings() { diff --git a/src/NzbDrone.Core/Notifications/Mailgun/MailgunSettings.cs b/src/NzbDrone.Core/Notifications/Mailgun/MailgunSettings.cs index 2e267cddd..d0715c87a 100644 --- a/src/NzbDrone.Core/Notifications/Mailgun/MailgunSettings.cs +++ b/src/NzbDrone.Core/Notifications/Mailgun/MailgunSettings.cs @@ -18,7 +18,7 @@ public MailGunSettingsValidator() public class MailgunSettings : NotificationSettingsBase { - private static readonly MailGunSettingsValidator Validator = new (); + private static readonly MailGunSettingsValidator Validator = new(); public MailgunSettings() { diff --git a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs index db17d965e..9a2ebda6f 100644 --- a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs +++ b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserProxy.cs @@ -100,7 +100,8 @@ public HashSet GetPaths(MediaBrowserSettings settings, Series series) } return MediaBrowserMatchQuality.None; - }, item => item.Path).OrderBy(group => (int)group.Key).First(); + }, + item => item.Path).OrderBy(group => (int)group.Key).First(); if (paths.Key == MediaBrowserMatchQuality.None) { diff --git a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserSettings.cs b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserSettings.cs index 4ee4a0b92..69aa9691e 100644 --- a/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserSettings.cs +++ b/src/NzbDrone.Core/Notifications/MediaBrowser/MediaBrowserSettings.cs @@ -20,7 +20,7 @@ public MediaBrowserSettingsValidator() public class MediaBrowserSettings : NotificationSettingsBase { - private static readonly MediaBrowserSettingsValidator Validator = new (); + private static readonly MediaBrowserSettingsValidator Validator = new(); public MediaBrowserSettings() { diff --git a/src/NzbDrone.Core/Notifications/Notifiarr/NotifiarrSettings.cs b/src/NzbDrone.Core/Notifications/Notifiarr/NotifiarrSettings.cs index e0faaede2..3245f31d0 100644 --- a/src/NzbDrone.Core/Notifications/Notifiarr/NotifiarrSettings.cs +++ b/src/NzbDrone.Core/Notifications/Notifiarr/NotifiarrSettings.cs @@ -14,7 +14,7 @@ public NotifiarrSettingsValidator() public class NotifiarrSettings : NotificationSettingsBase { - private static readonly NotifiarrSettingsValidator Validator = new (); + private static readonly NotifiarrSettingsValidator Validator = new(); [FieldDefinition(0, Label = "ApiKey", Privacy = PrivacyLevel.ApiKey, HelpText = "NotificationsNotifiarrSettingsApiKeyHelpText", HelpLink = "https://notifiarr.com")] public string ApiKey { get; set; } diff --git a/src/NzbDrone.Core/Notifications/Ntfy/NtfySettings.cs b/src/NzbDrone.Core/Notifications/Ntfy/NtfySettings.cs index 0c6075f01..c50dc1e6f 100644 --- a/src/NzbDrone.Core/Notifications/Ntfy/NtfySettings.cs +++ b/src/NzbDrone.Core/Notifications/Ntfy/NtfySettings.cs @@ -20,12 +20,12 @@ public NtfySettingsValidator() RuleForEach(c => c.Topics).NotEmpty().Matches("[a-zA-Z0-9_-]+").Must(c => !InvalidTopics.Contains(c)).WithMessage("Invalid topic"); } - private static List InvalidTopics => new () { "announcements", "app", "docs", "settings", "stats", "mytopic-rw", "mytopic-ro", "mytopic-wo" }; + private static List InvalidTopics => new() { "announcements", "app", "docs", "settings", "stats", "mytopic-rw", "mytopic-ro", "mytopic-wo" }; } public class NtfySettings : NotificationSettingsBase { - private static readonly NtfySettingsValidator Validator = new (); + private static readonly NtfySettingsValidator Validator = new(); public NtfySettings() { diff --git a/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerSettings.cs b/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerSettings.cs index 983c05963..7271efd4c 100644 --- a/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerSettings.cs +++ b/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerSettings.cs @@ -19,7 +19,7 @@ public PlexServerSettingsValidator() public class PlexServerSettings : NotificationSettingsBase { - private static readonly PlexServerSettingsValidator Validator = new (); + private static readonly PlexServerSettingsValidator Validator = new(); public PlexServerSettings() { diff --git a/src/NzbDrone.Core/Notifications/Prowl/ProwlSettings.cs b/src/NzbDrone.Core/Notifications/Prowl/ProwlSettings.cs index 0973f202e..f7e117fef 100644 --- a/src/NzbDrone.Core/Notifications/Prowl/ProwlSettings.cs +++ b/src/NzbDrone.Core/Notifications/Prowl/ProwlSettings.cs @@ -14,7 +14,7 @@ public ProwlSettingsValidator() public class ProwlSettings : NotificationSettingsBase { - private static readonly ProwlSettingsValidator Validator = new (); + private static readonly ProwlSettingsValidator Validator = new(); [FieldDefinition(0, Label = "ApiKey", Privacy = PrivacyLevel.ApiKey, HelpLink = "https://www.prowlapp.com/api_settings.php")] public string ApiKey { get; set; } diff --git a/src/NzbDrone.Core/Notifications/PushBullet/PushBulletSettings.cs b/src/NzbDrone.Core/Notifications/PushBullet/PushBulletSettings.cs index 67fb8f5a2..66d66c924 100644 --- a/src/NzbDrone.Core/Notifications/PushBullet/PushBulletSettings.cs +++ b/src/NzbDrone.Core/Notifications/PushBullet/PushBulletSettings.cs @@ -16,7 +16,7 @@ public PushBulletSettingsValidator() public class PushBulletSettings : NotificationSettingsBase { - private static readonly PushBulletSettingsValidator Validator = new (); + private static readonly PushBulletSettingsValidator Validator = new(); public PushBulletSettings() { diff --git a/src/NzbDrone.Core/Notifications/Pushcut/PushcutSettings.cs b/src/NzbDrone.Core/Notifications/Pushcut/PushcutSettings.cs index 5b94fcef4..1bd49e46a 100644 --- a/src/NzbDrone.Core/Notifications/Pushcut/PushcutSettings.cs +++ b/src/NzbDrone.Core/Notifications/Pushcut/PushcutSettings.cs @@ -15,7 +15,7 @@ public PushcutSettingsValidator() public class PushcutSettings : NotificationSettingsBase { - private static readonly PushcutSettingsValidator Validator = new (); + private static readonly PushcutSettingsValidator Validator = new(); [FieldDefinition(0, Label = "NotificationsPushcutSettingsNotificationName", Type = FieldType.Textbox, HelpText = "NotificationsPushcutSettingsNotificationNameHelpText")] public string NotificationName { get; set; } diff --git a/src/NzbDrone.Core/Notifications/Pushover/PushoverSettings.cs b/src/NzbDrone.Core/Notifications/Pushover/PushoverSettings.cs index d5450860f..4dcec72a3 100644 --- a/src/NzbDrone.Core/Notifications/Pushover/PushoverSettings.cs +++ b/src/NzbDrone.Core/Notifications/Pushover/PushoverSettings.cs @@ -18,7 +18,7 @@ public PushoverSettingsValidator() public class PushoverSettings : NotificationSettingsBase { - private static readonly PushoverSettingsValidator Validator = new (); + private static readonly PushoverSettingsValidator Validator = new(); public PushoverSettings() { diff --git a/src/NzbDrone.Core/Notifications/SendGrid/SendGridSettings.cs b/src/NzbDrone.Core/Notifications/SendGrid/SendGridSettings.cs index 75b269510..e4019adfa 100644 --- a/src/NzbDrone.Core/Notifications/SendGrid/SendGridSettings.cs +++ b/src/NzbDrone.Core/Notifications/SendGrid/SendGridSettings.cs @@ -19,7 +19,7 @@ public SendGridSettingsValidator() public class SendGridSettings : NotificationSettingsBase { - private static readonly SendGridSettingsValidator Validator = new (); + private static readonly SendGridSettingsValidator Validator = new(); public SendGridSettings() { diff --git a/src/NzbDrone.Core/Notifications/Signal/SignalSettings.cs b/src/NzbDrone.Core/Notifications/Signal/SignalSettings.cs index 320f505b2..26b6cd2c2 100644 --- a/src/NzbDrone.Core/Notifications/Signal/SignalSettings.cs +++ b/src/NzbDrone.Core/Notifications/Signal/SignalSettings.cs @@ -17,7 +17,7 @@ public SignalSettingsValidator() public class SignalSettings : NotificationSettingsBase { - private static readonly SignalSettingsValidator Validator = new (); + private static readonly SignalSettingsValidator Validator = new(); [FieldDefinition(0, Label = "Host", Type = FieldType.Textbox, Placeholder = "localhost")] public string Host { get; set; } diff --git a/src/NzbDrone.Core/Notifications/Simplepush/SimplepushSettings.cs b/src/NzbDrone.Core/Notifications/Simplepush/SimplepushSettings.cs index 3768b71a5..5b07785a6 100644 --- a/src/NzbDrone.Core/Notifications/Simplepush/SimplepushSettings.cs +++ b/src/NzbDrone.Core/Notifications/Simplepush/SimplepushSettings.cs @@ -14,7 +14,7 @@ public SimplepushSettingsValidator() public class SimplepushSettings : NotificationSettingsBase { - private static readonly SimplepushSettingsValidator Validator = new (); + private static readonly SimplepushSettingsValidator Validator = new(); [FieldDefinition(0, Label = "NotificationsSimplepushSettingsKey", Privacy = PrivacyLevel.ApiKey, HelpLink = "https://simplepush.io/features")] public string Key { get; set; } diff --git a/src/NzbDrone.Core/Notifications/Slack/Slack.cs b/src/NzbDrone.Core/Notifications/Slack/Slack.cs index ce1fa76b3..a1b3a4923 100644 --- a/src/NzbDrone.Core/Notifications/Slack/Slack.cs +++ b/src/NzbDrone.Core/Notifications/Slack/Slack.cs @@ -29,7 +29,7 @@ public override void OnGrab(GrabMessage message) { var attachments = new List { - new () + new() { Fallback = message.Message, Title = message.Series.Title, @@ -46,7 +46,7 @@ public override void OnDownload(DownloadMessage message) { var attachments = new List { - new () + new() { Fallback = message.Message, Title = message.Series.Title, @@ -63,7 +63,7 @@ public override void OnImportComplete(ImportCompleteMessage message) { var attachments = new List { - new () + new() { Fallback = message.Message, Title = message.Series.Title, @@ -80,7 +80,7 @@ public override void OnRename(Series series, List renamedFil { var attachments = new List { - new () + new() { Title = series.Title, } @@ -95,7 +95,7 @@ public override void OnEpisodeFileDelete(EpisodeDeleteMessage deleteMessage) { var attachments = new List { - new () + new() { Title = GetTitle(deleteMessage.Series, deleteMessage.EpisodeFile.Episodes), } @@ -110,7 +110,7 @@ public override void OnSeriesAdd(SeriesAddMessage message) { var attachments = new List { - new () + new() { Title = message.Series.Title, } @@ -125,7 +125,7 @@ public override void OnSeriesDelete(SeriesDeleteMessage deleteMessage) { var attachments = new List { - new () + new() { Title = deleteMessage.Series.Title, Text = deleteMessage.DeletedFilesMessage @@ -141,7 +141,7 @@ public override void OnHealthIssue(HealthCheck.HealthCheck healthCheck) { var attachments = new List { - new () + new() { Title = healthCheck.Source.Name, Text = healthCheck.Message, @@ -158,7 +158,7 @@ public override void OnHealthRestored(HealthCheck.HealthCheck previousCheck) { var attachments = new List { - new () + new() { Title = previousCheck.Source.Name, Text = $"The following issue is now resolved: {previousCheck.Message}", @@ -175,7 +175,7 @@ public override void OnApplicationUpdate(ApplicationUpdateMessage updateMessage) { var attachments = new List { - new () + new() { Title = Environment.MachineName, Text = updateMessage.Message, @@ -192,7 +192,7 @@ public override void OnManualInteractionRequired(ManualInteractionRequiredMessag { var attachments = new List { - new () + new() { Title = Environment.MachineName, Text = message.Message, diff --git a/src/NzbDrone.Core/Notifications/Slack/SlackSettings.cs b/src/NzbDrone.Core/Notifications/Slack/SlackSettings.cs index 07b62e438..1613b77d6 100644 --- a/src/NzbDrone.Core/Notifications/Slack/SlackSettings.cs +++ b/src/NzbDrone.Core/Notifications/Slack/SlackSettings.cs @@ -15,7 +15,7 @@ public SlackSettingsValidator() public class SlackSettings : NotificationSettingsBase { - private static readonly SlackSettingsValidator Validator = new (); + private static readonly SlackSettingsValidator Validator = new(); [FieldDefinition(0, Label = "NotificationsSettingsWebhookUrl", HelpText = "NotificationsSlackSettingsWebhookUrlHelpText", Type = FieldType.Url, HelpLink = "https://my.slack.com/services/new/incoming-webhook/")] public string WebHookUrl { get; set; } diff --git a/src/NzbDrone.Core/Notifications/Synology/SynologyIndexerSettings.cs b/src/NzbDrone.Core/Notifications/Synology/SynologyIndexerSettings.cs index 966b3b4cc..5167f22d0 100644 --- a/src/NzbDrone.Core/Notifications/Synology/SynologyIndexerSettings.cs +++ b/src/NzbDrone.Core/Notifications/Synology/SynologyIndexerSettings.cs @@ -10,7 +10,7 @@ public class SynologyIndexerSettingsValidator : AbstractValidator { - private static readonly SynologyIndexerSettingsValidator Validator = new (); + private static readonly SynologyIndexerSettingsValidator Validator = new(); public SynologyIndexerSettings() { diff --git a/src/NzbDrone.Core/Notifications/Telegram/TelegramSettings.cs b/src/NzbDrone.Core/Notifications/Telegram/TelegramSettings.cs index c3a23b85f..b55bd653e 100644 --- a/src/NzbDrone.Core/Notifications/Telegram/TelegramSettings.cs +++ b/src/NzbDrone.Core/Notifications/Telegram/TelegramSettings.cs @@ -43,7 +43,7 @@ public TelegramSettingsValidator() public class TelegramSettings : NotificationSettingsBase { - private static readonly TelegramSettingsValidator Validator = new (); + private static readonly TelegramSettingsValidator Validator = new(); public TelegramSettings() { diff --git a/src/NzbDrone.Core/Notifications/Trakt/TraktInterlacedTypes.cs b/src/NzbDrone.Core/Notifications/Trakt/TraktInterlacedTypes.cs index 458ef4382..f187cacc0 100644 --- a/src/NzbDrone.Core/Notifications/Trakt/TraktInterlacedTypes.cs +++ b/src/NzbDrone.Core/Notifications/Trakt/TraktInterlacedTypes.cs @@ -5,7 +5,7 @@ namespace NzbDrone.Core.Notifications.Trakt { public static class TraktInterlacedTypes { - public static readonly HashSet InterlacedTypes = new (StringComparer.OrdinalIgnoreCase) + public static readonly HashSet InterlacedTypes = new(StringComparer.OrdinalIgnoreCase) { "Interlaced", "MBAFF", "PAFF" }; diff --git a/src/NzbDrone.Core/Notifications/Trakt/TraktSettings.cs b/src/NzbDrone.Core/Notifications/Trakt/TraktSettings.cs index cee627621..54e64b468 100644 --- a/src/NzbDrone.Core/Notifications/Trakt/TraktSettings.cs +++ b/src/NzbDrone.Core/Notifications/Trakt/TraktSettings.cs @@ -17,7 +17,7 @@ public TraktSettingsValidator() public class TraktSettings : NotificationSettingsBase { - private static readonly TraktSettingsValidator Validator = new (); + private static readonly TraktSettingsValidator Validator = new(); public TraktSettings() { diff --git a/src/NzbDrone.Core/Notifications/Twitter/TwitterSettings.cs b/src/NzbDrone.Core/Notifications/Twitter/TwitterSettings.cs index d63aac122..27e49bbdc 100644 --- a/src/NzbDrone.Core/Notifications/Twitter/TwitterSettings.cs +++ b/src/NzbDrone.Core/Notifications/Twitter/TwitterSettings.cs @@ -29,7 +29,7 @@ public TwitterSettingsValidator() public class TwitterSettings : NotificationSettingsBase { - private static readonly TwitterSettingsValidator Validator = new (); + private static readonly TwitterSettingsValidator Validator = new(); public TwitterSettings() { diff --git a/src/NzbDrone.Core/Notifications/Webhook/WebhookBase.cs b/src/NzbDrone.Core/Notifications/Webhook/WebhookBase.cs index 9b2fe22fa..c888e3673 100644 --- a/src/NzbDrone.Core/Notifications/Webhook/WebhookBase.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/WebhookBase.cs @@ -234,7 +234,7 @@ protected WebhookPayload BuildTestPayload() }, Episodes = new List { - new () + new() { Id = 123, EpisodeNumber = 1, diff --git a/src/NzbDrone.Core/Notifications/Webhook/WebhookSettings.cs b/src/NzbDrone.Core/Notifications/Webhook/WebhookSettings.cs index 51d91f7db..2154c97d4 100644 --- a/src/NzbDrone.Core/Notifications/Webhook/WebhookSettings.cs +++ b/src/NzbDrone.Core/Notifications/Webhook/WebhookSettings.cs @@ -16,7 +16,7 @@ public WebhookSettingsValidator() public class WebhookSettings : NotificationSettingsBase { - private static readonly WebhookSettingsValidator Validator = new (); + private static readonly WebhookSettingsValidator Validator = new(); public WebhookSettings() { diff --git a/src/NzbDrone.Core/Notifications/Xbmc/XbmcSettings.cs b/src/NzbDrone.Core/Notifications/Xbmc/XbmcSettings.cs index efe8741e4..aca19aaff 100644 --- a/src/NzbDrone.Core/Notifications/Xbmc/XbmcSettings.cs +++ b/src/NzbDrone.Core/Notifications/Xbmc/XbmcSettings.cs @@ -19,7 +19,7 @@ public XbmcSettingsValidator() public class XbmcSettings : NotificationSettingsBase { - private static readonly XbmcSettingsValidator Validator = new (); + private static readonly XbmcSettingsValidator Validator = new(); public XbmcSettings() { diff --git a/src/NzbDrone.Core/Parser/LanguageParser.cs b/src/NzbDrone.Core/Parser/LanguageParser.cs index 1451f47bf..94eca7a73 100644 --- a/src/NzbDrone.Core/Parser/LanguageParser.cs +++ b/src/NzbDrone.Core/Parser/LanguageParser.cs @@ -26,8 +26,8 @@ public static class LanguageParser private static readonly Regex CaseSensitiveLanguageRegex = new Regex(@"(?:(?i)(?\bLT\b)|(?\bCZ\b)|(?\bPL\b)|(?\bBG\b)|(?\bSK\b)|(?\bDE\b))(?:(?i)(?![\W|_|^]SUB))", RegexOptions.Compiled); - private static readonly Regex GermanDualLanguageRegex = new (@"(?forced|foreign|default|cc|psdh|sdh))*[-_. ](?[a-z]{2,3})([-_. ](?forced|foreign|default|cc|psdh|sdh))*$", RegexOptions.Compiled | RegexOptions.IgnoreCase); diff --git a/src/NzbDrone.Core/Parser/Parser.cs b/src/NzbDrone.Core/Parser/Parser.cs index 91f67087c..35fb08ba9 100644 --- a/src/NzbDrone.Core/Parser/Parser.cs +++ b/src/NzbDrone.Core/Parser/Parser.cs @@ -590,7 +590,7 @@ public static class Parser private static readonly string[] Numbers = new[] { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" }; - private static readonly Regex MultiRegex = new (@"[_. ](?multi)[_. ]", RegexOptions.Compiled | RegexOptions.IgnoreCase); + private static readonly Regex MultiRegex = new(@"[_. ](?multi)[_. ]", RegexOptions.Compiled | RegexOptions.IgnoreCase); public static ParsedEpisodeInfo ParsePath(string path) { diff --git a/src/NzbDrone.Core/Parser/QualityParser.cs b/src/NzbDrone.Core/Parser/QualityParser.cs index cdb297d3d..bcad95dba 100644 --- a/src/NzbDrone.Core/Parser/QualityParser.cs +++ b/src/NzbDrone.Core/Parser/QualityParser.cs @@ -14,7 +14,7 @@ public class QualityParser { private static readonly Logger Logger = NzbDroneLogger.GetLogger(typeof(QualityParser)); - private static readonly Regex SourceRegex = new (@"\b(?: + private static readonly Regex SourceRegex = new(@"\b(?: (?BluRay|Blu-Ray|HD-?DVD|BDMux|BD(?!$))| (?WEB[-_. ]DL(?:mux)?|WEBDL|AmazonHD|AmazonSD|iTunesHD|MaxdomeHD|NetflixU?HD|WebHD|HBOMaxHD|DisneyHD|[. ]WEB[. ](?:[xh][ .]?26[45]|AVC|HEVC|DDP?5[. ]1)|[. ](?-i:WEB)$|(?:720|1080|2160)p[-. ]WEB[-. ]|[-. ]WEB[-. ](?:720|1080|2160)p|\b\s\/\sWEB\s\/\s\b|(?:AMZN|NF|DP)[. -]WEB[. -](?!Rip))| (?WebRip|Web-Rip|WEBMux)| @@ -29,41 +29,41 @@ public class QualityParser )(?:\b|$|[ .])", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace); - private static readonly Regex RawHDRegex = new (@"\b(?RawHD|Raw[-_. ]HD)\b", + private static readonly Regex RawHDRegex = new(@"\b(?RawHD|Raw[-_. ]HD)\b", RegexOptions.Compiled | RegexOptions.IgnoreCase); - private static readonly Regex MPEG2Regex = new (@"\b(?MPEG[-_. ]?2)\b"); + private static readonly Regex MPEG2Regex = new(@"\b(?MPEG[-_. ]?2)\b"); - private static readonly Regex ProperRegex = new (@"\b(?proper)\b", + private static readonly Regex ProperRegex = new(@"\b(?proper)\b", RegexOptions.Compiled | RegexOptions.IgnoreCase); - private static readonly Regex RepackRegex = new (@"\b(?repack\d?|rerip\d?)\b", + private static readonly Regex RepackRegex = new(@"\b(?repack\d?|rerip\d?)\b", RegexOptions.Compiled | RegexOptions.IgnoreCase); - private static readonly Regex VersionRegex = new (@"\d[-._ ]?v(?\d)[-._ ]|\[v(?\d)\]|repack(?\d)|rerip(?\d)|(?:480|576|720|1080|2160)p[._ ]v(?\d)", + private static readonly Regex VersionRegex = new(@"\d[-._ ]?v(?\d)[-._ ]|\[v(?\d)\]|repack(?\d)|rerip(?\d)|(?:480|576|720|1080|2160)p[._ ]v(?\d)", RegexOptions.Compiled | RegexOptions.IgnoreCase); - private static readonly Regex RealRegex = new (@"\b(?REAL)\b", + private static readonly Regex RealRegex = new(@"\b(?REAL)\b", RegexOptions.Compiled); - private static readonly Regex ResolutionRegex = new (@"\b(?:(?360p)|(?480p|480i|640x480|848x480)|(?540p)|(?576p)|(?720p|1280x720|960p)|(?1080p|1920x1080|1440p|FHD|1080i|4kto1080p)|(?2160p|3840x2160|4k[-_. ](?:UHD|HEVC|BD|H265)|(?:UHD|HEVC|BD|H265)[-_. ]4k))\b", + private static readonly Regex ResolutionRegex = new(@"\b(?:(?360p)|(?480p|480i|640x480|848x480)|(?540p)|(?576p)|(?720p|1280x720|960p)|(?1080p|1920x1080|1440p|FHD|1080i|4kto1080p)|(?2160p|3840x2160|4k[-_. ](?:UHD|HEVC|BD|H265)|(?:UHD|HEVC|BD|H265)[-_. ]4k))\b", RegexOptions.Compiled | RegexOptions.IgnoreCase); // Handle cases where no resolution is in the release name (assume if UHD then 4k) or resolution is non-standard - private static readonly Regex AlternativeResolutionRegex = new (@"\b(?UHD)\b|(?\[4K\])", + private static readonly Regex AlternativeResolutionRegex = new(@"\b(?UHD)\b|(?\[4K\])", RegexOptions.Compiled | RegexOptions.IgnoreCase); - private static readonly Regex CodecRegex = new (@"\b(?:(?x264)|(?h264)|(?XvidHD)|(?Xvid)|(?divx))\b", + private static readonly Regex CodecRegex = new(@"\b(?:(?x264)|(?h264)|(?XvidHD)|(?Xvid)|(?divx))\b", RegexOptions.Compiled | RegexOptions.IgnoreCase); - private static readonly Regex OtherSourceRegex = new (@"(?HD[-_. ]TV)|(?SD[-_. ]TV)", RegexOptions.Compiled | RegexOptions.IgnoreCase); + private static readonly Regex OtherSourceRegex = new(@"(?HD[-_. ]TV)|(?SD[-_. ]TV)", RegexOptions.Compiled | RegexOptions.IgnoreCase); - private static readonly Regex AnimeBlurayRegex = new (@"bd(?:720|1080|2160)|(?<=[-_. (\[])bd(?=[-_. )\]])", RegexOptions.Compiled | RegexOptions.IgnoreCase); - private static readonly Regex AnimeWebDlRegex = new (@"\[WEB\]|[\[\(]WEB[ .]", RegexOptions.Compiled | RegexOptions.IgnoreCase); + private static readonly Regex AnimeBlurayRegex = new(@"bd(?:720|1080|2160)|(?<=[-_. (\[])bd(?=[-_. )\]])", RegexOptions.Compiled | RegexOptions.IgnoreCase); + private static readonly Regex AnimeWebDlRegex = new(@"\[WEB\]|[\[\(]WEB[ .]", RegexOptions.Compiled | RegexOptions.IgnoreCase); - private static readonly Regex HighDefPdtvRegex = new (@"hr[-_. ]ws", RegexOptions.Compiled | RegexOptions.IgnoreCase); + private static readonly Regex HighDefPdtvRegex = new(@"hr[-_. ]ws", RegexOptions.Compiled | RegexOptions.IgnoreCase); - private static readonly Regex RemuxRegex = new (@"(?:[_. ]|\d{4}p-|\bHybrid-)(?(?:(BD|UHD)[-_. ]?)?Remux)\b|(?(?:(BD|UHD)[-_. ]?)?Remux[_. ]\d{4}p)", RegexOptions.Compiled | RegexOptions.IgnoreCase); + private static readonly Regex RemuxRegex = new(@"(?:[_. ]|\d{4}p-|\bHybrid-)(?(?:(BD|UHD)[-_. ]?)?Remux)\b|(?(?:(BD|UHD)[-_. ]?)?Remux[_. ]\d{4}p)", RegexOptions.Compiled | RegexOptions.IgnoreCase); public static QualityModel ParseQuality(string name) { diff --git a/src/NzbDrone.Core/Queue/QueueService.cs b/src/NzbDrone.Core/Queue/QueueService.cs index 1735c8e7a..853993b50 100644 --- a/src/NzbDrone.Core/Queue/QueueService.cs +++ b/src/NzbDrone.Core/Queue/QueueService.cs @@ -20,7 +20,7 @@ public interface IQueueService public class QueueService : IQueueService, IHandle { private readonly IEventAggregator _eventAggregator; - private static List _queue = new (); + private static List _queue = new(); public QueueService(IEventAggregator eventAggregator) { diff --git a/src/NzbDrone.Core/SeriesStats/SeriesStatisticsRepository.cs b/src/NzbDrone.Core/SeriesStats/SeriesStatisticsRepository.cs index be64ca1b3..c7fd1bc48 100644 --- a/src/NzbDrone.Core/SeriesStats/SeriesStatisticsRepository.cs +++ b/src/NzbDrone.Core/SeriesStats/SeriesStatisticsRepository.cs @@ -81,7 +81,8 @@ private SqlBuilder EpisodesBuilder(DateTime currentDate) SUM(CASE WHEN ""EpisodeFileId"" > 0 THEN 1 ELSE 0 END) AS EpisodeFileCount, MIN(CASE WHEN ""AirDateUtc"" < @currentDate OR ""Monitored"" = {falseIndicator} THEN NULL ELSE ""AirDateUtc"" END) AS NextAiringString, MAX(CASE WHEN ""AirDateUtc"" >= @currentDate OR ""Monitored"" = {falseIndicator} THEN NULL ELSE ""AirDateUtc"" END) AS PreviousAiringString, - MAX(""AirDate"") AS LastAiredString", parameters) + MAX(""AirDate"") AS LastAiredString", + parameters) .GroupBy(x => x.SeriesId) .GroupBy(x => x.SeasonNumber); } diff --git a/src/NzbDrone.Core/Sonarr.Core.csproj b/src/NzbDrone.Core/Sonarr.Core.csproj index f651d262a..767525ab7 100644 --- a/src/NzbDrone.Core/Sonarr.Core.csproj +++ b/src/NzbDrone.Core/Sonarr.Core.csproj @@ -12,6 +12,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + @@ -27,6 +31,7 @@ + diff --git a/src/NzbDrone.Host.Test/Sonarr.Host.Test.csproj b/src/NzbDrone.Host.Test/Sonarr.Host.Test.csproj index 38a1989bf..073d2149d 100644 --- a/src/NzbDrone.Host.Test/Sonarr.Host.Test.csproj +++ b/src/NzbDrone.Host.Test/Sonarr.Host.Test.csproj @@ -4,6 +4,11 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/NzbDrone.Host/Bootstrap.cs b/src/NzbDrone.Host/Bootstrap.cs index 487fa4c68..69be7b77c 100644 --- a/src/NzbDrone.Host/Bootstrap.cs +++ b/src/NzbDrone.Host/Bootstrap.cs @@ -254,7 +254,7 @@ private static IConfiguration GetConfiguration(StartupContext context) { return new ConfigurationBuilder() .AddXmlFile(configPath, optional: true, reloadOnChange: false) - .AddInMemoryCollection(new List> { new ("dataProtectionFolder", appFolder.GetDataProtectionPath()) }) + .AddInMemoryCollection(new List> { new("dataProtectionFolder", appFolder.GetDataProtectionPath()) }) .AddEnvironmentVariables() .Build(); } diff --git a/src/NzbDrone.Host/Sonarr.Host.csproj b/src/NzbDrone.Host/Sonarr.Host.csproj index c0d18739b..f2357f89d 100644 --- a/src/NzbDrone.Host/Sonarr.Host.csproj +++ b/src/NzbDrone.Host/Sonarr.Host.csproj @@ -5,11 +5,16 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/NzbDrone.Integration.Test/IntegrationTest.cs b/src/NzbDrone.Integration.Test/IntegrationTest.cs index 9524d39d3..543b7d326 100644 --- a/src/NzbDrone.Integration.Test/IntegrationTest.cs +++ b/src/NzbDrone.Integration.Test/IntegrationTest.cs @@ -23,7 +23,7 @@ public abstract class IntegrationTest : IntegrationTestBase protected int Port { get; private set; } - protected PostgresOptions PostgresOptions { get; set; } = new (); + protected PostgresOptions PostgresOptions { get; set; } = new(); protected override string RootUrl => $"http://localhost:{Port}/"; diff --git a/src/NzbDrone.Integration.Test/Sonarr.Integration.Test.csproj b/src/NzbDrone.Integration.Test/Sonarr.Integration.Test.csproj index 4e7451429..8b612a3ed 100644 --- a/src/NzbDrone.Integration.Test/Sonarr.Integration.Test.csproj +++ b/src/NzbDrone.Integration.Test/Sonarr.Integration.Test.csproj @@ -6,6 +6,11 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/NzbDrone.Libraries.Test/Sonarr.Libraries.Test.csproj b/src/NzbDrone.Libraries.Test/Sonarr.Libraries.Test.csproj index 800aecd18..34ae081bb 100644 --- a/src/NzbDrone.Libraries.Test/Sonarr.Libraries.Test.csproj +++ b/src/NzbDrone.Libraries.Test/Sonarr.Libraries.Test.csproj @@ -4,6 +4,11 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/NzbDrone.Mono.Test/Sonarr.Mono.Test.csproj b/src/NzbDrone.Mono.Test/Sonarr.Mono.Test.csproj index d4c0a33be..725cc26bc 100644 --- a/src/NzbDrone.Mono.Test/Sonarr.Mono.Test.csproj +++ b/src/NzbDrone.Mono.Test/Sonarr.Mono.Test.csproj @@ -9,6 +9,11 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/NzbDrone.Mono/Disk/FindDriveType.cs b/src/NzbDrone.Mono/Disk/FindDriveType.cs index 08cc611de..63dea4fa0 100644 --- a/src/NzbDrone.Mono/Disk/FindDriveType.cs +++ b/src/NzbDrone.Mono/Disk/FindDriveType.cs @@ -6,7 +6,7 @@ namespace NzbDrone.Mono.Disk { public static class FindDriveType { - private static readonly Dictionary DriveTypeMap = new () + private static readonly Dictionary DriveTypeMap = new() { { "afpfs", DriveType.Network }, { "apfs", DriveType.Fixed }, diff --git a/src/NzbDrone.Mono/EnvironmentInfo/VersionAdapters/MacOsVersionAdapter.cs b/src/NzbDrone.Mono/EnvironmentInfo/VersionAdapters/MacOsVersionAdapter.cs index 55542809e..76891a5ac 100644 --- a/src/NzbDrone.Mono/EnvironmentInfo/VersionAdapters/MacOsVersionAdapter.cs +++ b/src/NzbDrone.Mono/EnvironmentInfo/VersionAdapters/MacOsVersionAdapter.cs @@ -10,7 +10,7 @@ public class MacOsVersionAdapter : IOsVersionAdapter { private const string PLIST_DIR = "/System/Library/CoreServices/"; - private static readonly Regex DarwinVersionRegex = new ("ProductVersion<\\/key>\\s*(?1\\d\\.\\d{1,2}\\.?\\d{0,2}?)<\\/string>", + private static readonly Regex DarwinVersionRegex = new("ProductVersion<\\/key>\\s*(?1\\d\\.\\d{1,2}\\.?\\d{0,2}?)<\\/string>", RegexOptions.Compiled | RegexOptions.IgnoreCase); private readonly IDiskProvider _diskProvider; diff --git a/src/NzbDrone.Mono/Sonarr.Mono.csproj b/src/NzbDrone.Mono/Sonarr.Mono.csproj index ec9e47f03..e71b04b44 100644 --- a/src/NzbDrone.Mono/Sonarr.Mono.csproj +++ b/src/NzbDrone.Mono/Sonarr.Mono.csproj @@ -9,7 +9,12 @@ --> + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/NzbDrone.SignalR/Sonarr.SignalR.csproj b/src/NzbDrone.SignalR/Sonarr.SignalR.csproj index 0dbe8812b..d106d8a3c 100644 --- a/src/NzbDrone.SignalR/Sonarr.SignalR.csproj +++ b/src/NzbDrone.SignalR/Sonarr.SignalR.csproj @@ -7,4 +7,11 @@ + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/src/NzbDrone.Test.Common/AutoMoq/AutoMoqer.cs b/src/NzbDrone.Test.Common/AutoMoq/AutoMoqer.cs index 288209030..2986a1152 100644 --- a/src/NzbDrone.Test.Common/AutoMoq/AutoMoqer.cs +++ b/src/NzbDrone.Test.Common/AutoMoq/AutoMoqer.cs @@ -112,7 +112,8 @@ private IContainer CreateTestContainer(IContainer container) var mock = (Mock)r.Resolve(mockType); SetMock(serviceType, mock); return mock.Object; - }, Reuse.Singleton); + }, + Reuse.Singleton); return new[] { new DynamicRegistration(mockFactory, IfAlreadyRegistered.Keep) }; } diff --git a/src/NzbDrone.Test.Common/NzbDroneRunner.cs b/src/NzbDrone.Test.Common/NzbDroneRunner.cs index 6caae84d3..b7eca89f0 100644 --- a/src/NzbDrone.Test.Common/NzbDroneRunner.cs +++ b/src/NzbDrone.Test.Common/NzbDroneRunner.cs @@ -136,7 +136,7 @@ public void KillAll() private void Start(string outputSonarrConsoleExe) { - StringDictionary envVars = new (); + StringDictionary envVars = new(); if (PostgresOptions?.Host != null) { envVars.Add("Sonarr__Postgres__Host", PostgresOptions.Host); diff --git a/src/NzbDrone.Test.Common/Sonarr.Test.Common.csproj b/src/NzbDrone.Test.Common/Sonarr.Test.Common.csproj index 7272110ae..2639bcd70 100644 --- a/src/NzbDrone.Test.Common/Sonarr.Test.Common.csproj +++ b/src/NzbDrone.Test.Common/Sonarr.Test.Common.csproj @@ -9,6 +9,11 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/NzbDrone.Test.Dummy/Sonarr.Test.Dummy.csproj b/src/NzbDrone.Test.Dummy/Sonarr.Test.Dummy.csproj index e9223712f..567bef706 100644 --- a/src/NzbDrone.Test.Dummy/Sonarr.Test.Dummy.csproj +++ b/src/NzbDrone.Test.Dummy/Sonarr.Test.Dummy.csproj @@ -3,4 +3,11 @@ Exe net8.0 + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + \ No newline at end of file diff --git a/src/NzbDrone.Update.Test/Sonarr.Update.Test.csproj b/src/NzbDrone.Update.Test/Sonarr.Update.Test.csproj index 52da2b8bc..b3bba2d1a 100644 --- a/src/NzbDrone.Update.Test/Sonarr.Update.Test.csproj +++ b/src/NzbDrone.Update.Test/Sonarr.Update.Test.csproj @@ -4,6 +4,11 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/NzbDrone.Update/Sonarr.Update.csproj b/src/NzbDrone.Update/Sonarr.Update.csproj index 2c3e0ee7f..16b18cf14 100644 --- a/src/NzbDrone.Update/Sonarr.Update.csproj +++ b/src/NzbDrone.Update/Sonarr.Update.csproj @@ -7,6 +7,11 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/NzbDrone.Windows.Test/Sonarr.Windows.Test.csproj b/src/NzbDrone.Windows.Test/Sonarr.Windows.Test.csproj index e4dfca744..5f3efca41 100644 --- a/src/NzbDrone.Windows.Test/Sonarr.Windows.Test.csproj +++ b/src/NzbDrone.Windows.Test/Sonarr.Windows.Test.csproj @@ -4,6 +4,11 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/NzbDrone.Windows/Sonarr.Windows.csproj b/src/NzbDrone.Windows/Sonarr.Windows.csproj index 01890bf01..6d27190cc 100644 --- a/src/NzbDrone.Windows/Sonarr.Windows.csproj +++ b/src/NzbDrone.Windows/Sonarr.Windows.csproj @@ -5,7 +5,12 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/NzbDrone/Sonarr.csproj b/src/NzbDrone/Sonarr.csproj index 097a28336..7ac0a3d45 100644 --- a/src/NzbDrone/Sonarr.csproj +++ b/src/NzbDrone/Sonarr.csproj @@ -8,7 +8,12 @@ true + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj b/src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj index fa4014f43..6edd27621 100644 --- a/src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj +++ b/src/ServiceHelpers/ServiceInstall/ServiceInstall.csproj @@ -4,6 +4,11 @@ net8.0 + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/ServiceHelpers/ServiceUninstall/ServiceUninstall.csproj b/src/ServiceHelpers/ServiceUninstall/ServiceUninstall.csproj index fa4014f43..6edd27621 100644 --- a/src/ServiceHelpers/ServiceUninstall/ServiceUninstall.csproj +++ b/src/ServiceHelpers/ServiceUninstall/ServiceUninstall.csproj @@ -4,6 +4,11 @@ net8.0 + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/Sonarr.Api.V3/CustomFormats/CustomFormatBulkResource.cs b/src/Sonarr.Api.V3/CustomFormats/CustomFormatBulkResource.cs index 18cf16301..baa0ec47d 100644 --- a/src/Sonarr.Api.V3/CustomFormats/CustomFormatBulkResource.cs +++ b/src/Sonarr.Api.V3/CustomFormats/CustomFormatBulkResource.cs @@ -4,7 +4,7 @@ namespace Sonarr.Api.V3.CustomFormats { public class CustomFormatBulkResource { - public HashSet Ids { get; set; } = new (); + public HashSet Ids { get; set; } = new(); public bool? IncludeCustomFormatWhenRenaming { get; set; } } } diff --git a/src/Sonarr.Api.V3/DownloadClient/DownloadClientController.cs b/src/Sonarr.Api.V3/DownloadClient/DownloadClientController.cs index 1c0c53605..a02a03ed6 100644 --- a/src/Sonarr.Api.V3/DownloadClient/DownloadClientController.cs +++ b/src/Sonarr.Api.V3/DownloadClient/DownloadClientController.cs @@ -7,8 +7,8 @@ namespace Sonarr.Api.V3.DownloadClient [V3ApiController] public class DownloadClientController : ProviderControllerBase { - public static readonly DownloadClientResourceMapper ResourceMapper = new (); - public static readonly DownloadClientBulkResourceMapper BulkResourceMapper = new (); + public static readonly DownloadClientResourceMapper ResourceMapper = new(); + public static readonly DownloadClientBulkResourceMapper BulkResourceMapper = new(); public DownloadClientController(IBroadcastSignalRMessage signalRBroadcaster, IDownloadClientFactory downloadClientFactory) : base(signalRBroadcaster, downloadClientFactory, "downloadclient", ResourceMapper, BulkResourceMapper) diff --git a/src/Sonarr.Api.V3/ImportLists/ImportListController.cs b/src/Sonarr.Api.V3/ImportLists/ImportListController.cs index 02a55d364..8dd8492ae 100644 --- a/src/Sonarr.Api.V3/ImportLists/ImportListController.cs +++ b/src/Sonarr.Api.V3/ImportLists/ImportListController.cs @@ -10,8 +10,8 @@ namespace Sonarr.Api.V3.ImportLists [V3ApiController] public class ImportListController : ProviderControllerBase { - public static readonly ImportListResourceMapper ResourceMapper = new (); - public static readonly ImportListBulkResourceMapper BulkResourceMapper = new (); + public static readonly ImportListResourceMapper ResourceMapper = new(); + public static readonly ImportListBulkResourceMapper BulkResourceMapper = new(); public ImportListController(IBroadcastSignalRMessage signalRBroadcaster, IImportListFactory importListFactory, diff --git a/src/Sonarr.Api.V3/Indexers/IndexerController.cs b/src/Sonarr.Api.V3/Indexers/IndexerController.cs index 90d4d6b60..ab4250bc6 100644 --- a/src/Sonarr.Api.V3/Indexers/IndexerController.cs +++ b/src/Sonarr.Api.V3/Indexers/IndexerController.cs @@ -8,8 +8,8 @@ namespace Sonarr.Api.V3.Indexers [V3ApiController] public class IndexerController : ProviderControllerBase { - public static readonly IndexerResourceMapper ResourceMapper = new (); - public static readonly IndexerBulkResourceMapper BulkResourceMapper = new (); + public static readonly IndexerResourceMapper ResourceMapper = new(); + public static readonly IndexerBulkResourceMapper BulkResourceMapper = new(); public IndexerController(IBroadcastSignalRMessage signalRBroadcaster, IndexerFactory indexerFactory, diff --git a/src/Sonarr.Api.V3/Indexers/ReleasePushController.cs b/src/Sonarr.Api.V3/Indexers/ReleasePushController.cs index 8e68c23ea..b5ad89cc7 100644 --- a/src/Sonarr.Api.V3/Indexers/ReleasePushController.cs +++ b/src/Sonarr.Api.V3/Indexers/ReleasePushController.cs @@ -76,7 +76,7 @@ public ActionResult> Create([FromBody] ReleaseResource rel if (decision?.RemoteEpisode.ParsedEpisodeInfo == null) { - throw new ValidationException(new List { new ("Title", "Unable to parse", release.Title) }); + throw new ValidationException(new List { new("Title", "Unable to parse", release.Title) }); } return MapDecisions(new[] { decision }); diff --git a/src/Sonarr.Api.V3/Metadata/MetadataController.cs b/src/Sonarr.Api.V3/Metadata/MetadataController.cs index 08f248284..bba343f58 100644 --- a/src/Sonarr.Api.V3/Metadata/MetadataController.cs +++ b/src/Sonarr.Api.V3/Metadata/MetadataController.cs @@ -9,8 +9,8 @@ namespace Sonarr.Api.V3.Metadata [V3ApiController] public class MetadataController : ProviderControllerBase { - public static readonly MetadataResourceMapper ResourceMapper = new (); - public static readonly MetadataBulkResourceMapper BulkResourceMapper = new (); + public static readonly MetadataResourceMapper ResourceMapper = new(); + public static readonly MetadataBulkResourceMapper BulkResourceMapper = new(); public MetadataController(IBroadcastSignalRMessage signalRBroadcaster, IMetadataFactory metadataFactory) : base(signalRBroadcaster, metadataFactory, "metadata", ResourceMapper, BulkResourceMapper) diff --git a/src/Sonarr.Api.V3/Notifications/NotificationController.cs b/src/Sonarr.Api.V3/Notifications/NotificationController.cs index ff69bf3d5..55dbceb30 100644 --- a/src/Sonarr.Api.V3/Notifications/NotificationController.cs +++ b/src/Sonarr.Api.V3/Notifications/NotificationController.cs @@ -9,8 +9,8 @@ namespace Sonarr.Api.V3.Notifications [V3ApiController] public class NotificationController : ProviderControllerBase { - public static readonly NotificationResourceMapper ResourceMapper = new (); - public static readonly NotificationBulkResourceMapper BulkResourceMapper = new (); + public static readonly NotificationResourceMapper ResourceMapper = new(); + public static readonly NotificationBulkResourceMapper BulkResourceMapper = new(); public NotificationController(IBroadcastSignalRMessage signalRBroadcaster, NotificationFactory notificationFactory) : base(signalRBroadcaster, notificationFactory, "notification", ResourceMapper, BulkResourceMapper) diff --git a/src/Sonarr.Api.V3/Series/SeriesController.cs b/src/Sonarr.Api.V3/Series/SeriesController.cs index bbbcdd0d5..341373167 100644 --- a/src/Sonarr.Api.V3/Series/SeriesController.cs +++ b/src/Sonarr.Api.V3/Series/SeriesController.cs @@ -192,7 +192,8 @@ public ActionResult UpdateSeries([FromBody] SeriesResource serie SeriesId = series.Id, SourcePath = sourcePath, DestinationPath = destinationPath - }, trigger: CommandTrigger.Manual); + }, + trigger: CommandTrigger.Manual); } var model = seriesResource.ToModel(series); diff --git a/src/Sonarr.Api.V3/Sonarr.Api.V3.csproj b/src/Sonarr.Api.V3/Sonarr.Api.V3.csproj index f3633faad..b40e82b3b 100644 --- a/src/Sonarr.Api.V3/Sonarr.Api.V3.csproj +++ b/src/Sonarr.Api.V3/Sonarr.Api.V3.csproj @@ -6,7 +6,12 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/Sonarr.Api.V3/System/Backup/BackupController.cs b/src/Sonarr.Api.V3/System/Backup/BackupController.cs index ce3eeb2ea..d6f6f5986 100644 --- a/src/Sonarr.Api.V3/System/Backup/BackupController.cs +++ b/src/Sonarr.Api.V3/System/Backup/BackupController.cs @@ -20,7 +20,7 @@ public class BackupController : Controller private readonly IAppFolderInfo _appFolderInfo; private readonly IDiskProvider _diskProvider; - private static readonly List ValidExtensions = new () { ".zip", ".db", ".xml" }; + private static readonly List ValidExtensions = new() { ".zip", ".db", ".xml" }; public BackupController(IBackupService backupService, IAppFolderInfo appFolderInfo, diff --git a/src/Sonarr.Api.V5/Series/SeriesController.cs b/src/Sonarr.Api.V5/Series/SeriesController.cs index d7dd96ff1..4c6c7518a 100644 --- a/src/Sonarr.Api.V5/Series/SeriesController.cs +++ b/src/Sonarr.Api.V5/Series/SeriesController.cs @@ -192,7 +192,8 @@ public ActionResult UpdateSeries([FromBody] SeriesResource serie SeriesId = series.Id, SourcePath = sourcePath, DestinationPath = destinationPath - }, trigger: CommandTrigger.Manual); + }, + trigger: CommandTrigger.Manual); } var model = seriesResource.ToModel(series); diff --git a/src/Sonarr.Api.V5/Series/SeriesResource.cs b/src/Sonarr.Api.V5/Series/SeriesResource.cs index 99b9113fe..3c7a315bd 100644 --- a/src/Sonarr.Api.V5/Series/SeriesResource.cs +++ b/src/Sonarr.Api.V5/Series/SeriesResource.cs @@ -22,7 +22,7 @@ public class SeriesResource : RestResource public List? Images { get; set; } public Language? OriginalLanguage { get; set; } public string? RemotePoster { get; set; } - public List Seasons { get; set; } = new (); + public List Seasons { get; set; } = new(); public int Year { get; set; } public string? Path { get; set; } public int QualityProfileId { get; set; } diff --git a/src/Sonarr.Api.V5/Sonarr.Api.V5.csproj b/src/Sonarr.Api.V5/Sonarr.Api.V5.csproj index a11be2f9e..6685cf5ca 100644 --- a/src/Sonarr.Api.V5/Sonarr.Api.V5.csproj +++ b/src/Sonarr.Api.V5/Sonarr.Api.V5.csproj @@ -9,7 +9,12 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/Sonarr.Http/Frontend/Mappers/MediaCoverProxyMapper.cs b/src/Sonarr.Http/Frontend/Mappers/MediaCoverProxyMapper.cs index 9c869c899..295e31645 100644 --- a/src/Sonarr.Http/Frontend/Mappers/MediaCoverProxyMapper.cs +++ b/src/Sonarr.Http/Frontend/Mappers/MediaCoverProxyMapper.cs @@ -10,7 +10,7 @@ namespace Sonarr.Http.Frontend.Mappers { public class MediaCoverProxyMapper : IMapHttpRequestsToDisk { - private readonly Regex _regex = new (@"/MediaCoverProxy/(?\w+)/(?(.+)\.(jpg|png|gif))"); + private readonly Regex _regex = new(@"/MediaCoverProxy/(?\w+)/(?(.+)\.(jpg|png|gif))"); private readonly IMediaCoverProxy _mediaCoverProxy; private readonly IContentTypeProvider _mimeTypeProvider; diff --git a/src/Sonarr.Http/PagingResource.cs b/src/Sonarr.Http/PagingResource.cs index f29c21a3f..1c8554e42 100644 --- a/src/Sonarr.Http/PagingResource.cs +++ b/src/Sonarr.Http/PagingResource.cs @@ -21,7 +21,7 @@ public class PagingResource public string SortKey { get; set; } public SortDirection SortDirection { get; set; } public int TotalRecords { get; set; } - public List Records { get; set; } = new (); + public List Records { get; set; } = new(); public PagingResource() { diff --git a/src/Sonarr.Http/Sonarr.Http.csproj b/src/Sonarr.Http/Sonarr.Http.csproj index f9d7413c9..012595192 100644 --- a/src/Sonarr.Http/Sonarr.Http.csproj +++ b/src/Sonarr.Http/Sonarr.Http.csproj @@ -6,6 +6,11 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/Sonarr.RuntimePatches/Sonarr.RuntimePatches.csproj b/src/Sonarr.RuntimePatches/Sonarr.RuntimePatches.csproj index 95221cf82..77bfa5e02 100644 --- a/src/Sonarr.RuntimePatches/Sonarr.RuntimePatches.csproj +++ b/src/Sonarr.RuntimePatches/Sonarr.RuntimePatches.csproj @@ -4,5 +4,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + +