diff --git a/MediaBrowser.Controller/Providers/IExternalId.cs b/MediaBrowser.Controller/Providers/IExternalId.cs index 96d1e46223..5e38446bc9 100644 --- a/MediaBrowser.Controller/Providers/IExternalId.cs +++ b/MediaBrowser.Controller/Providers/IExternalId.cs @@ -22,11 +22,13 @@ namespace MediaBrowser.Controller.Providers /// /// Gets the specific media type for this id. This is used to distinguish between the different /// external id types for providers with multiple ids. + /// A null value indicates there is no specific media type associated with the external id, or this is the + /// default id for the external provider so there is no need to specify a type. /// /// /// This can be used along with the to localize the external id on the client. /// - ExternalIdMediaType Type { get; } + ExternalIdMediaType? Type { get; } /// /// Gets the URL format string for this id. diff --git a/MediaBrowser.Model/Providers/ExternalIdInfo.cs b/MediaBrowser.Model/Providers/ExternalIdInfo.cs index 445c86d733..7687e676f9 100644 --- a/MediaBrowser.Model/Providers/ExternalIdInfo.cs +++ b/MediaBrowser.Model/Providers/ExternalIdInfo.cs @@ -20,11 +20,13 @@ namespace MediaBrowser.Model.Providers /// /// Gets or sets the specific media type for this id. This is used to distinguish between the different /// external id types for providers with multiple ids. + /// A null value indicates there is no specific media type associated with the external id, or this is the + /// default id for the external provider so there is no need to specify a type. /// /// /// This can be used along with the to localize the external id on the client. /// - public ExternalIdMediaType Type { get; set; } + public ExternalIdMediaType? Type { get; set; } /// /// Gets or sets the URL format string. diff --git a/MediaBrowser.Model/Providers/ExternalIdMediaType.cs b/MediaBrowser.Model/Providers/ExternalIdMediaType.cs index 56f55d15cf..5303c8f58b 100644 --- a/MediaBrowser.Model/Providers/ExternalIdMediaType.cs +++ b/MediaBrowser.Model/Providers/ExternalIdMediaType.cs @@ -8,12 +8,6 @@ namespace MediaBrowser.Model.Providers /// public enum ExternalIdMediaType { - /// - /// There is no specific media type associated with the external id, or this is the default id for the external - /// provider so there is no need to specify a type. - /// - General = 0, - /// /// A music album. /// diff --git a/MediaBrowser.Providers/Movies/MovieExternalIds.cs b/MediaBrowser.Providers/Movies/MovieExternalIds.cs index 2b0c0d1c27..b43ae63ab6 100644 --- a/MediaBrowser.Providers/Movies/MovieExternalIds.cs +++ b/MediaBrowser.Providers/Movies/MovieExternalIds.cs @@ -17,7 +17,7 @@ namespace MediaBrowser.Providers.Movies public string Key => MetadataProviders.Imdb.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.General; + public ExternalIdMediaType? Type => null; /// public string UrlFormatString => "https://www.imdb.com/title/{0}"; @@ -44,7 +44,7 @@ namespace MediaBrowser.Providers.Movies public string Key => MetadataProviders.Imdb.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.Person; + public ExternalIdMediaType? Type => ExternalIdMediaType.Person; /// public string UrlFormatString => "https://www.imdb.com/name/{0}"; diff --git a/MediaBrowser.Providers/Music/MusicExternalIds.cs b/MediaBrowser.Providers/Music/MusicExternalIds.cs index 4490d0f052..42694fdee8 100644 --- a/MediaBrowser.Providers/Music/MusicExternalIds.cs +++ b/MediaBrowser.Providers/Music/MusicExternalIds.cs @@ -14,7 +14,7 @@ namespace MediaBrowser.Providers.Music public string Key => "IMVDb"; /// - public ExternalIdMediaType Type => ExternalIdMediaType.General; + public ExternalIdMediaType? Type => null; /// public string UrlFormatString => null; diff --git a/MediaBrowser.Providers/Plugins/AudioDb/ExternalIds.cs b/MediaBrowser.Providers/Plugins/AudioDb/ExternalIds.cs index e299eb3ee2..1dd5b21a9c 100644 --- a/MediaBrowser.Providers/Plugins/AudioDb/ExternalIds.cs +++ b/MediaBrowser.Providers/Plugins/AudioDb/ExternalIds.cs @@ -14,7 +14,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb public string Key => MetadataProviders.AudioDbAlbum.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.General; + public ExternalIdMediaType? Type => null; /// public string UrlFormatString => "https://www.theaudiodb.com/album/{0}"; @@ -32,7 +32,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb public string Key => MetadataProviders.AudioDbAlbum.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.Album; + public ExternalIdMediaType? Type => ExternalIdMediaType.Album; /// public string UrlFormatString => "https://www.theaudiodb.com/album/{0}"; @@ -50,7 +50,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb public string Key => MetadataProviders.AudioDbArtist.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.Artist; + public ExternalIdMediaType? Type => ExternalIdMediaType.Artist; /// public string UrlFormatString => "https://www.theaudiodb.com/artist/{0}"; @@ -68,7 +68,7 @@ namespace MediaBrowser.Providers.Plugins.AudioDb public string Key => MetadataProviders.AudioDbArtist.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.OtherArtist; + public ExternalIdMediaType? Type => ExternalIdMediaType.OtherArtist; /// public string UrlFormatString => "https://www.theaudiodb.com/artist/{0}"; diff --git a/MediaBrowser.Providers/Plugins/MusicBrainz/ExternalIds.cs b/MediaBrowser.Providers/Plugins/MusicBrainz/ExternalIds.cs index 247e87fd52..969bdd01d2 100644 --- a/MediaBrowser.Providers/Plugins/MusicBrainz/ExternalIds.cs +++ b/MediaBrowser.Providers/Plugins/MusicBrainz/ExternalIds.cs @@ -15,7 +15,7 @@ namespace MediaBrowser.Providers.Music public string Key => MetadataProviders.MusicBrainzReleaseGroup.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.ReleaseGroup; + public ExternalIdMediaType? Type => ExternalIdMediaType.ReleaseGroup; /// public string UrlFormatString => Plugin.Instance.Configuration.Server + "/release-group/{0}"; @@ -33,7 +33,7 @@ namespace MediaBrowser.Providers.Music public string Key => MetadataProviders.MusicBrainzAlbumArtist.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.AlbumArtist; + public ExternalIdMediaType? Type => ExternalIdMediaType.AlbumArtist; /// public string UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}"; @@ -51,7 +51,7 @@ namespace MediaBrowser.Providers.Music public string Key => MetadataProviders.MusicBrainzAlbum.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.Album; + public ExternalIdMediaType? Type => ExternalIdMediaType.Album; /// public string UrlFormatString => Plugin.Instance.Configuration.Server + "/release/{0}"; @@ -69,7 +69,7 @@ namespace MediaBrowser.Providers.Music public string Key => MetadataProviders.MusicBrainzArtist.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.Artist; + public ExternalIdMediaType? Type => ExternalIdMediaType.Artist; /// public string UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}"; @@ -88,7 +88,7 @@ namespace MediaBrowser.Providers.Music public string Key => MetadataProviders.MusicBrainzArtist.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.OtherArtist; + public ExternalIdMediaType? Type => ExternalIdMediaType.OtherArtist; /// public string UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}"; @@ -106,7 +106,7 @@ namespace MediaBrowser.Providers.Music public string Key => MetadataProviders.MusicBrainzTrack.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.Track; + public ExternalIdMediaType? Type => ExternalIdMediaType.Track; /// public string UrlFormatString => Plugin.Instance.Configuration.Server + "/track/{0}"; diff --git a/MediaBrowser.Providers/TV/TvExternalIds.cs b/MediaBrowser.Providers/TV/TvExternalIds.cs index 12ad3d8a22..2bf6020dd5 100644 --- a/MediaBrowser.Providers/TV/TvExternalIds.cs +++ b/MediaBrowser.Providers/TV/TvExternalIds.cs @@ -15,7 +15,7 @@ namespace MediaBrowser.Providers.TV public string Key => MetadataProviders.Zap2It.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.General; + public ExternalIdMediaType? Type => null; /// public string UrlFormatString => "http://tvlistings.zap2it.com/overview.html?programSeriesId={0}"; @@ -33,7 +33,7 @@ namespace MediaBrowser.Providers.TV public string Key => MetadataProviders.Tvdb.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.General; + public ExternalIdMediaType? Type => null; /// public string UrlFormatString => TvdbUtils.TvdbBaseUrl + "?tab=series&id={0}"; @@ -52,7 +52,7 @@ namespace MediaBrowser.Providers.TV public string Key => MetadataProviders.Tvdb.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.Season; + public ExternalIdMediaType? Type => ExternalIdMediaType.Season; /// public string UrlFormatString => null; @@ -70,7 +70,7 @@ namespace MediaBrowser.Providers.TV public string Key => MetadataProviders.Tvdb.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.Episode; + public ExternalIdMediaType? Type => ExternalIdMediaType.Episode; /// public string UrlFormatString => TvdbUtils.TvdbBaseUrl + "?tab=episode&id={0}"; diff --git a/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetExternalId.cs b/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetExternalId.cs index 1d3c80536e..bfef1e0382 100644 --- a/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetExternalId.cs +++ b/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetExternalId.cs @@ -15,7 +15,7 @@ namespace MediaBrowser.Providers.Tmdb.BoxSets public string Key => MetadataProviders.TmdbCollection.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.BoxSet; + public ExternalIdMediaType? Type => ExternalIdMediaType.BoxSet; /// public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "collection/{0}"; diff --git a/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieExternalId.cs b/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieExternalId.cs index 75e71dda49..5b0cd75092 100644 --- a/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieExternalId.cs +++ b/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieExternalId.cs @@ -16,7 +16,7 @@ namespace MediaBrowser.Providers.Tmdb.Movies public string Key => MetadataProviders.Tmdb.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.Movie; + public ExternalIdMediaType? Type => ExternalIdMediaType.Movie; /// public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "movie/{0}"; diff --git a/MediaBrowser.Providers/Tmdb/People/TmdbPersonExternalId.cs b/MediaBrowser.Providers/Tmdb/People/TmdbPersonExternalId.cs index a8685d6695..fa12a4581a 100644 --- a/MediaBrowser.Providers/Tmdb/People/TmdbPersonExternalId.cs +++ b/MediaBrowser.Providers/Tmdb/People/TmdbPersonExternalId.cs @@ -14,7 +14,7 @@ namespace MediaBrowser.Providers.Tmdb.People public string Key => MetadataProviders.Tmdb.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.Person; + public ExternalIdMediaType? Type => ExternalIdMediaType.Person; /// public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "person/{0}"; diff --git a/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesExternalId.cs b/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesExternalId.cs index fd6dd9b413..8513dadd21 100644 --- a/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesExternalId.cs +++ b/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesExternalId.cs @@ -14,7 +14,7 @@ namespace MediaBrowser.Providers.Tmdb.TV public string Key => MetadataProviders.Tmdb.ToString(); /// - public ExternalIdMediaType Type => ExternalIdMediaType.Series; + public ExternalIdMediaType? Type => ExternalIdMediaType.Series; /// public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "tv/{0}";