Explorar o código

Enable nullable for MediaBrowser.Providers

Bond_009 %!s(int64=3) %!d(string=hai) anos
pai
achega
f5ca9cbc3b
Modificáronse 72 ficheiros con 115 adicións e 61 borrados
  1. 1 3
      MediaBrowser.Controller/Providers/IExternalId.cs
  2. 2 2
      MediaBrowser.Model/Providers/ExternalIdInfo.cs
  3. 2 0
      MediaBrowser.Providers/Manager/ImageSaver.cs
  4. 2 0
      MediaBrowser.Providers/Manager/ItemImageProvider.cs
  5. 2 0
      MediaBrowser.Providers/Manager/MetadataService.cs
  6. 2 0
      MediaBrowser.Providers/Manager/ProviderManager.cs
  7. 2 0
      MediaBrowser.Providers/Manager/ProviderUtils.cs
  8. 1 1
      MediaBrowser.Providers/Manager/RefreshResult.cs
  9. 0 1
      MediaBrowser.Providers/MediaBrowser.Providers.csproj
  10. 2 0
      MediaBrowser.Providers/MediaInfo/AudioImageProvider.cs
  11. 2 0
      MediaBrowser.Providers/MediaInfo/EmbeddedImageProvider.cs
  12. 2 0
      MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs
  13. 2 0
      MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs
  14. 2 0
      MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs
  15. 2 0
      MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs
  16. 2 0
      MediaBrowser.Providers/MediaInfo/SubtitleResolver.cs
  17. 2 0
      MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs
  18. 1 1
      MediaBrowser.Providers/Movies/ImdbExternalId.cs
  19. 1 1
      MediaBrowser.Providers/Movies/ImdbPersonExternalId.cs
  20. 6 6
      MediaBrowser.Providers/Music/AlbumInfoExtensions.cs
  21. 2 2
      MediaBrowser.Providers/Music/AlbumMetadataService.cs
  22. 1 1
      MediaBrowser.Providers/Music/ImvdbId.cs
  23. 2 0
      MediaBrowser.Providers/Playlists/PlaylistItemsProvider.cs
  24. 1 1
      MediaBrowser.Providers/Plugins/AudioDb/AudioDbAlbumExternalId.cs
  25. 2 0
      MediaBrowser.Providers/Plugins/AudioDb/AudioDbAlbumImageProvider.cs
  26. 2 0
      MediaBrowser.Providers/Plugins/AudioDb/AudioDbAlbumProvider.cs
  27. 1 1
      MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistExternalId.cs
  28. 2 0
      MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistImageProvider.cs
  29. 2 0
      MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistProvider.cs
  30. 1 1
      MediaBrowser.Providers/Plugins/AudioDb/AudioDbOtherAlbumExternalId.cs
  31. 1 1
      MediaBrowser.Providers/Plugins/AudioDb/AudioDbOtherArtistExternalId.cs
  32. 1 1
      MediaBrowser.Providers/Plugins/AudioDb/Configuration/PluginConfiguration.cs
  33. 1 0
      MediaBrowser.Providers/Plugins/AudioDb/Plugin.cs
  34. 4 15
      MediaBrowser.Providers/Plugins/MusicBrainz/Configuration/PluginConfiguration.cs
  35. 1 1
      MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzAlbumArtistExternalId.cs
  36. 1 1
      MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzAlbumExternalId.cs
  37. 2 0
      MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzAlbumProvider.cs
  38. 1 1
      MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistExternalId.cs
  39. 2 0
      MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistProvider.cs
  40. 1 1
      MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzOtherArtistExternalId.cs
  41. 1 1
      MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzReleaseGroupExternalId.cs
  42. 1 1
      MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzTrackId.cs
  43. 1 0
      MediaBrowser.Providers/Plugins/MusicBrainz/Plugin.cs
  44. 1 1
      MediaBrowser.Providers/Plugins/Omdb/Configuration/PluginConfiguration.cs
  45. 0 2
      MediaBrowser.Providers/Plugins/Omdb/JsonOmdbNotAvailableInt32Converter.cs
  46. 0 2
      MediaBrowser.Providers/Plugins/Omdb/JsonOmdbNotAvailableStringConverter.cs
  47. 1 1
      MediaBrowser.Providers/Plugins/Omdb/OmdbEpisodeProvider.cs
  48. 2 0
      MediaBrowser.Providers/Plugins/Omdb/OmdbImageProvider.cs
  49. 2 0
      MediaBrowser.Providers/Plugins/Omdb/OmdbItemProvider.cs
  50. 2 0
      MediaBrowser.Providers/Plugins/Omdb/OmdbProvider.cs
  51. 1 0
      MediaBrowser.Providers/Plugins/Omdb/Plugin.cs
  52. 1 1
      MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetExternalId.cs
  53. 2 0
      MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs
  54. 2 0
      MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetProvider.cs
  55. 1 1
      MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieExternalId.cs
  56. 2 0
      MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieImageProvider.cs
  57. 2 0
      MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieProvider.cs
  58. 1 1
      MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonExternalId.cs
  59. 2 0
      MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonProvider.cs
  60. 2 0
      MediaBrowser.Providers/Plugins/Tmdb/Plugin.cs
  61. 2 0
      MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeImageProvider.cs
  62. 2 0
      MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeProvider.cs
  63. 1 1
      MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonProvider.cs
  64. 1 1
      MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesExternalId.cs
  65. 2 0
      MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs
  66. 3 1
      MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
  67. 0 2
      MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs
  68. 2 0
      MediaBrowser.Providers/Studios/StudiosImageProvider.cs
  69. 2 1
      MediaBrowser.Providers/Subtitles/SubtitleManager.cs
  70. 1 1
      MediaBrowser.Providers/TV/SeasonMetadataService.cs
  71. 2 0
      MediaBrowser.Providers/TV/SeriesMetadataService.cs
  72. 1 1
      MediaBrowser.Providers/TV/Zap2ItExternalId.cs

+ 1 - 3
MediaBrowser.Controller/Providers/IExternalId.cs

@@ -1,5 +1,3 @@
-#nullable disable
-
 using MediaBrowser.Model.Entities;
 using MediaBrowser.Model.Providers;
 
@@ -35,7 +33,7 @@ namespace MediaBrowser.Controller.Providers
         /// <summary>
         /// Gets the URL format string for this id.
         /// </summary>
-        string UrlFormatString { get; }
+        string? UrlFormatString { get; }
 
         /// <summary>
         /// Determines whether this id supports a given item type.

+ 2 - 2
MediaBrowser.Model/Providers/ExternalIdInfo.cs

@@ -12,7 +12,7 @@ namespace MediaBrowser.Model.Providers
         /// <param name="key">Key for this id. This key should be unique across all providers.</param>
         /// <param name="type">Specific media type for this id.</param>
         /// <param name="urlFormatString">URL format string.</param>
-        public ExternalIdInfo(string name, string key, ExternalIdMediaType? type, string urlFormatString)
+        public ExternalIdInfo(string name, string key, ExternalIdMediaType? type, string? urlFormatString)
         {
             Name = name;
             Key = key;
@@ -46,6 +46,6 @@ namespace MediaBrowser.Model.Providers
         /// <summary>
         /// Gets or sets the URL format string.
         /// </summary>
-        public string UrlFormatString { get; set; }
+        public string? UrlFormatString { get; set; }
     }
 }

+ 2 - 0
MediaBrowser.Providers/Manager/ImageSaver.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 2 - 0
MediaBrowser.Providers/Manager/ItemImageProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CA1002, CS1591
 
 using System;

+ 2 - 0
MediaBrowser.Providers/Manager/MetadataService.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 2 - 0
MediaBrowser.Providers/Manager/ProviderManager.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;

+ 2 - 0
MediaBrowser.Providers/Manager/ProviderUtils.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 1 - 1
MediaBrowser.Providers/Manager/RefreshResult.cs

@@ -8,7 +8,7 @@ namespace MediaBrowser.Providers.Manager
     {
         public ItemUpdateType UpdateType { get; set; }
 
-        public string ErrorMessage { get; set; }
+        public string? ErrorMessage { get; set; }
 
         public int Failures { get; set; }
     }

+ 0 - 1
MediaBrowser.Providers/MediaBrowser.Providers.csproj

@@ -30,7 +30,6 @@
     <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
     <CodeAnalysisRuleSet>../jellyfin.ruleset</CodeAnalysisRuleSet>
-    <Nullable>disable</Nullable>
   </PropertyGroup>
 
   <!-- Code Analyzers-->

+ 2 - 0
MediaBrowser.Providers/MediaInfo/AudioImageProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CA1002, CS1591
 
 using System;

+ 2 - 0
MediaBrowser.Providers/MediaInfo/EmbeddedImageProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 using System;
 using System.Collections.Generic;
 using System.IO;

+ 2 - 0
MediaBrowser.Providers/MediaInfo/FFProbeAudioInfo.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 2 - 0
MediaBrowser.Providers/MediaInfo/FFProbeProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 2 - 0
MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CA1068, CS1591
 
 using System;

+ 2 - 0
MediaBrowser.Providers/MediaInfo/SubtitleDownloader.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CA1002, CS1591
 
 using System;

+ 2 - 0
MediaBrowser.Providers/MediaInfo/SubtitleResolver.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CA1002, CS1591
 
 using System;

+ 2 - 0
MediaBrowser.Providers/MediaInfo/SubtitleScheduledTask.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 1 - 1
MediaBrowser.Providers/Movies/ImdbExternalId.cs

@@ -22,7 +22,7 @@ namespace MediaBrowser.Providers.Movies
         public ExternalIdMediaType? Type => null;
 
         /// <inheritdoc />
-        public string UrlFormatString => "https://www.imdb.com/title/{0}";
+        public string? UrlFormatString => "https://www.imdb.com/title/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item)

+ 1 - 1
MediaBrowser.Providers/Movies/ImdbPersonExternalId.cs

@@ -19,7 +19,7 @@ namespace MediaBrowser.Providers.Movies
         public ExternalIdMediaType? Type => ExternalIdMediaType.Person;
 
         /// <inheritdoc />
-        public string UrlFormatString => "https://www.imdb.com/name/{0}";
+        public string? UrlFormatString => "https://www.imdb.com/name/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item) => item is Person;

+ 6 - 6
MediaBrowser.Providers/Music/AlbumInfoExtensions.cs

@@ -8,7 +8,7 @@ namespace MediaBrowser.Providers.Music
 {
     public static class AlbumInfoExtensions
     {
-        public static string GetAlbumArtist(this AlbumInfo info)
+        public static string? GetAlbumArtist(this AlbumInfo info)
         {
             var id = info.SongInfos.SelectMany(i => i.AlbumArtists)
                     .FirstOrDefault(i => !string.IsNullOrEmpty(i));
@@ -21,7 +21,7 @@ namespace MediaBrowser.Providers.Music
             return info.AlbumArtists.Count > 0 ? info.AlbumArtists[0] : default;
         }
 
-        public static string GetReleaseGroupId(this AlbumInfo info)
+        public static string? GetReleaseGroupId(this AlbumInfo info)
         {
             var id = info.GetProviderId(MetadataProvider.MusicBrainzReleaseGroup);
 
@@ -34,7 +34,7 @@ namespace MediaBrowser.Providers.Music
             return id;
         }
 
-        public static string GetReleaseId(this AlbumInfo info)
+        public static string? GetReleaseId(this AlbumInfo info)
         {
             var id = info.GetProviderId(MetadataProvider.MusicBrainzAlbum);
 
@@ -47,9 +47,9 @@ namespace MediaBrowser.Providers.Music
             return id;
         }
 
-        public static string GetMusicBrainzArtistId(this AlbumInfo info)
+        public static string? GetMusicBrainzArtistId(this AlbumInfo info)
         {
-            info.ProviderIds.TryGetValue(MetadataProvider.MusicBrainzAlbumArtist.ToString(), out string id);
+            info.ProviderIds.TryGetValue(MetadataProvider.MusicBrainzAlbumArtist.ToString(), out string? id);
 
             if (string.IsNullOrEmpty(id))
             {
@@ -65,7 +65,7 @@ namespace MediaBrowser.Providers.Music
             return id;
         }
 
-        public static string GetMusicBrainzArtistId(this ArtistInfo info)
+        public static string? GetMusicBrainzArtistId(this ArtistInfo info)
         {
             info.ProviderIds.TryGetValue(MetadataProvider.MusicBrainzArtist.ToString(), out var id);
 

+ 2 - 2
MediaBrowser.Providers/Music/AlbumMetadataService.cs

@@ -81,7 +81,7 @@ namespace MediaBrowser.Providers.Music
             if (!item.AlbumArtists.SequenceEqual(artists, StringComparer.OrdinalIgnoreCase))
             {
                 item.AlbumArtists = artists;
-                updateType = updateType | ItemUpdateType.MetadataEdit;
+                updateType |= ItemUpdateType.MetadataEdit;
             }
 
             return updateType;
@@ -100,7 +100,7 @@ namespace MediaBrowser.Providers.Music
             if (!item.Artists.SequenceEqual(artists, StringComparer.OrdinalIgnoreCase))
             {
                 item.Artists = artists;
-                updateType = updateType | ItemUpdateType.MetadataEdit;
+                updateType |= ItemUpdateType.MetadataEdit;
             }
 
             return updateType;

+ 1 - 1
MediaBrowser.Providers/Music/ImvdbId.cs

@@ -19,7 +19,7 @@ namespace MediaBrowser.Providers.Music
         public ExternalIdMediaType? Type => null;
 
         /// <inheritdoc />
-        public string UrlFormatString => null;
+        public string? UrlFormatString => null;
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item)

+ 2 - 0
MediaBrowser.Providers/Playlists/PlaylistItemsProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 1 - 1
MediaBrowser.Providers/Plugins/AudioDb/AudioDbAlbumExternalId.cs

@@ -19,7 +19,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
         public ExternalIdMediaType? Type => null;
 
         /// <inheritdoc />
-        public string UrlFormatString => "https://www.theaudiodb.com/album/{0}";
+        public string? UrlFormatString => "https://www.theaudiodb.com/album/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item) => item is MusicAlbum;

+ 2 - 0
MediaBrowser.Providers/Plugins/AudioDb/AudioDbAlbumImageProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System.Collections.Generic;

+ 2 - 0
MediaBrowser.Providers/Plugins/AudioDb/AudioDbAlbumProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CA1002, CS1591, SA1300
 
 using System;

+ 1 - 1
MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistExternalId.cs

@@ -19,7 +19,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
         public ExternalIdMediaType? Type => ExternalIdMediaType.Artist;
 
         /// <inheritdoc />
-        public string UrlFormatString => "https://www.theaudiodb.com/artist/{0}";
+        public string? UrlFormatString => "https://www.theaudiodb.com/artist/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item) => item is MusicArtist;

+ 2 - 0
MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistImageProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System.Collections.Generic;

+ 2 - 0
MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CA1034, CS1591, CA1002, SA1028, SA1300
 
 using System;

+ 1 - 1
MediaBrowser.Providers/Plugins/AudioDb/AudioDbOtherAlbumExternalId.cs

@@ -19,7 +19,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
         public ExternalIdMediaType? Type => ExternalIdMediaType.Album;
 
         /// <inheritdoc />
-        public string UrlFormatString => "https://www.theaudiodb.com/album/{0}";
+        public string? UrlFormatString => "https://www.theaudiodb.com/album/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item) => item is Audio;

+ 1 - 1
MediaBrowser.Providers/Plugins/AudioDb/AudioDbOtherArtistExternalId.cs

@@ -19,7 +19,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
         public ExternalIdMediaType? Type => ExternalIdMediaType.OtherArtist;
 
         /// <inheritdoc />
-        public string UrlFormatString => "https://www.theaudiodb.com/artist/{0}";
+        public string? UrlFormatString => "https://www.theaudiodb.com/artist/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item) => item is Audio || item is MusicAlbum;

+ 1 - 1
MediaBrowser.Providers/Plugins/AudioDb/Configuration/PluginConfiguration.cs

@@ -1,4 +1,4 @@
-#pragma warning disable CS1591
+#pragma warning disable CS1591
 
 using MediaBrowser.Model.Plugins;
 

+ 1 - 0
MediaBrowser.Providers/Plugins/AudioDb/Plugin.cs

@@ -1,3 +1,4 @@
+#nullable disable
 #pragma warning disable CS1591
 
 using System;

+ 4 - 15
MediaBrowser.Providers/Plugins/MusicBrainz/Configuration/PluginConfiguration.cs

@@ -1,4 +1,4 @@
-#pragma warning disable CS1591
+#pragma warning disable CS1591
 
 using MediaBrowser.Model.Plugins;
 
@@ -12,24 +12,13 @@ namespace MediaBrowser.Providers.Plugins.MusicBrainz
 
         public string Server
         {
-            get
-            {
-                return _server;
-            }
-
-            set
-            {
-                _server = value.TrimEnd('/');
-            }
+            get => _server;
+            set => _server = value.TrimEnd('/');
         }
 
         public long RateLimit
         {
-            get
-            {
-                return _rateLimit;
-            }
-
+            get => _rateLimit;
             set
             {
                 if (value < Plugin.DefaultRateLimit && _server == Plugin.DefaultServer)

+ 1 - 1
MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzAlbumArtistExternalId.cs

@@ -20,7 +20,7 @@ namespace MediaBrowser.Providers.Music
         public ExternalIdMediaType? Type => ExternalIdMediaType.AlbumArtist;
 
         /// <inheritdoc />
-        public string UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}";
+        public string? UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item) => item is Audio;

+ 1 - 1
MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzAlbumExternalId.cs

@@ -20,7 +20,7 @@ namespace MediaBrowser.Providers.Music
         public ExternalIdMediaType? Type => ExternalIdMediaType.Album;
 
         /// <inheritdoc />
-        public string UrlFormatString => Plugin.Instance.Configuration.Server + "/release/{0}";
+        public string? UrlFormatString => Plugin.Instance.Configuration.Server + "/release/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item) => item is Audio || item is MusicAlbum;

+ 2 - 0
MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzAlbumProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591, SA1401
 
 using System;

+ 1 - 1
MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistExternalId.cs

@@ -20,7 +20,7 @@ namespace MediaBrowser.Providers.Music
         public ExternalIdMediaType? Type => ExternalIdMediaType.Artist;
 
         /// <inheritdoc />
-        public string UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}";
+        public string? UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item) => item is MusicArtist;

+ 2 - 0
MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzArtistProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 1 - 1
MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzOtherArtistExternalId.cs

@@ -20,7 +20,7 @@ namespace MediaBrowser.Providers.Music
         public ExternalIdMediaType? Type => ExternalIdMediaType.OtherArtist;
 
         /// <inheritdoc />
-        public string UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}";
+        public string? UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item) => item is Audio || item is MusicAlbum;

+ 1 - 1
MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzReleaseGroupExternalId.cs

@@ -20,7 +20,7 @@ namespace MediaBrowser.Providers.Music
         public ExternalIdMediaType? Type => ExternalIdMediaType.ReleaseGroup;
 
         /// <inheritdoc />
-        public string UrlFormatString => Plugin.Instance.Configuration.Server + "/release-group/{0}";
+        public string? UrlFormatString => Plugin.Instance.Configuration.Server + "/release-group/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item) => item is Audio || item is MusicAlbum;

+ 1 - 1
MediaBrowser.Providers/Plugins/MusicBrainz/MusicBrainzTrackId.cs

@@ -20,7 +20,7 @@ namespace MediaBrowser.Providers.Music
         public ExternalIdMediaType? Type => ExternalIdMediaType.Track;
 
         /// <inheritdoc />
-        public string UrlFormatString => Plugin.Instance.Configuration.Server + "/track/{0}";
+        public string? UrlFormatString => Plugin.Instance.Configuration.Server + "/track/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item) => item is Audio;

+ 1 - 0
MediaBrowser.Providers/Plugins/MusicBrainz/Plugin.cs

@@ -1,3 +1,4 @@
+#nullable disable
 #pragma warning disable CS1591
 
 using System;

+ 1 - 1
MediaBrowser.Providers/Plugins/Omdb/Configuration/PluginConfiguration.cs

@@ -1,4 +1,4 @@
-#pragma warning disable CS1591
+#pragma warning disable CS1591
 
 using MediaBrowser.Model.Plugins;
 

+ 0 - 2
MediaBrowser.Providers/Plugins/Omdb/JsonOmdbNotAvailableInt32Converter.cs

@@ -1,5 +1,3 @@
-#nullable enable
-
 using System;
 using System.ComponentModel;
 using System.Text.Json;

+ 0 - 2
MediaBrowser.Providers/Plugins/Omdb/JsonOmdbNotAvailableStringConverter.cs

@@ -1,5 +1,3 @@
-#nullable enable
-
 using System;
 using System.Text.Json;
 using System.Text.Json.Serialization;

+ 1 - 1
MediaBrowser.Providers/Plugins/Omdb/OmdbEpisodeProvider.cs

@@ -61,7 +61,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb
                 return result;
             }
 
-            if (info.SeriesProviderIds.TryGetValue(MetadataProvider.Imdb.ToString(), out string seriesImdbId) && !string.IsNullOrEmpty(seriesImdbId))
+            if (info.SeriesProviderIds.TryGetValue(MetadataProvider.Imdb.ToString(), out string? seriesImdbId) && !string.IsNullOrEmpty(seriesImdbId))
             {
                 if (info.IndexNumber.HasValue && info.ParentIndexNumber.HasValue)
                 {

+ 2 - 0
MediaBrowser.Providers/Plugins/Omdb/OmdbImageProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System.Collections.Generic;

+ 2 - 0
MediaBrowser.Providers/Plugins/Omdb/OmdbItemProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591, SA1300
 
 using System;

+ 2 - 0
MediaBrowser.Providers/Plugins/Omdb/OmdbProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS159, SA1300
 
 using System;

+ 1 - 0
MediaBrowser.Providers/Plugins/Omdb/Plugin.cs

@@ -1,3 +1,4 @@
+#nullable disable
 #pragma warning disable CS1591
 
 using System;

+ 1 - 1
MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetExternalId.cs

@@ -21,7 +21,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets
         public ExternalIdMediaType? Type => ExternalIdMediaType.BoxSet;
 
         /// <inheritdoc />
-        public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "collection/{0}";
+        public string? UrlFormatString => TmdbUtils.BaseTmdbUrl + "collection/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item)

+ 2 - 0
MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 2 - 0
MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 1 - 1
MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieExternalId.cs

@@ -21,7 +21,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
         public ExternalIdMediaType? Type => ExternalIdMediaType.Movie;
 
         /// <inheritdoc />
-        public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "movie/{0}";
+        public string? UrlFormatString => TmdbUtils.BaseTmdbUrl + "movie/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item)

+ 2 - 0
MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieImageProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 2 - 0
MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 1 - 1
MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonExternalId.cs

@@ -20,7 +20,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.People
         public ExternalIdMediaType? Type => ExternalIdMediaType.Person;
 
         /// <inheritdoc />
-        public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "person/{0}";
+        public string? UrlFormatString => TmdbUtils.BaseTmdbUrl + "person/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item)

+ 2 - 0
MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 2 - 0
MediaBrowser.Providers/Plugins/Tmdb/Plugin.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 using System;
 using System.Collections.Generic;
 using MediaBrowser.Common.Configuration;

+ 2 - 0
MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeImageProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 2 - 0
MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 1 - 1
MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonProvider.cs

@@ -33,7 +33,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
         {
             var result = new MetadataResult<Season>();
 
-            info.SeriesProviderIds.TryGetValue(MetadataProvider.Tmdb.ToString(), out string seriesTmdbId);
+            info.SeriesProviderIds.TryGetValue(MetadataProvider.Tmdb.ToString(), out string? seriesTmdbId);
 
             var seasonNumber = info.IndexNumber;
 

+ 1 - 1
MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesExternalId.cs

@@ -20,7 +20,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
         public ExternalIdMediaType? Type => ExternalIdMediaType.Series;
 
         /// <inheritdoc />
-        public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "tv/{0}";
+        public string? UrlFormatString => TmdbUtils.BaseTmdbUrl + "tv/{0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item)

+ 2 - 0
MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 3 - 1
MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs

@@ -1,4 +1,6 @@
-using System;
+#nullable disable
+
+using System;
 using System.Collections.Generic;
 using System.Globalization;
 using System.Threading;

+ 0 - 2
MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs

@@ -1,5 +1,3 @@
-#nullable enable
-
 using System;
 using System.Collections.Generic;
 using System.Text.RegularExpressions;

+ 2 - 0
MediaBrowser.Providers/Studios/StudiosImageProvider.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;

+ 2 - 1
MediaBrowser.Providers/Subtitles/SubtitleManager.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System;
@@ -21,7 +23,6 @@ using MediaBrowser.Model.Globalization;
 using MediaBrowser.Model.IO;
 using MediaBrowser.Model.Providers;
 using Microsoft.Extensions.Logging;
-using static MediaBrowser.Model.IO.IODefaults;
 
 namespace MediaBrowser.Providers.Subtitles
 {

+ 1 - 1
MediaBrowser.Providers/TV/SeasonMetadataService.cs

@@ -42,7 +42,7 @@ namespace MediaBrowser.Providers.TV
                 if (!string.Equals(item.Name, seasonZeroDisplayName, StringComparison.OrdinalIgnoreCase))
                 {
                     item.Name = seasonZeroDisplayName;
-                    updatedType = updatedType | ItemUpdateType.MetadataEdit;
+                    updatedType |= ItemUpdateType.MetadataEdit;
                 }
             }
 

+ 2 - 0
MediaBrowser.Providers/TV/SeriesMetadataService.cs

@@ -1,3 +1,5 @@
+#nullable disable
+
 #pragma warning disable CS1591
 
 using System.Collections.Generic;

+ 1 - 1
MediaBrowser.Providers/TV/Zap2ItExternalId.cs

@@ -19,7 +19,7 @@ namespace MediaBrowser.Providers.TV
         public ExternalIdMediaType? Type => null;
 
         /// <inheritdoc />
-        public string UrlFormatString => "http://tvlistings.zap2it.com/overview.html?programSeriesId={0}";
+        public string? UrlFormatString => "http://tvlistings.zap2it.com/overview.html?programSeriesId={0}";
 
         /// <inheritdoc />
         public bool Supports(IHasProviderIds item) => item is Series;