diff --git a/MediaBrowser.Controller/Providers/IExternalId.cs b/MediaBrowser.Controller/Providers/IExternalId.cs
index d7e337bdab..157a2076eb 100644
--- a/MediaBrowser.Controller/Providers/IExternalId.cs
+++ b/MediaBrowser.Controller/Providers/IExternalId.cs
@@ -8,8 +8,27 @@ namespace MediaBrowser.Controller.Providers
string Key { get; }
+ ExternalIdType Type { get; }
+
string UrlFormatString { get; }
bool Supports(IHasProviderIds item);
}
+
+ public enum ExternalIdType
+ {
+ None,
+ Album,
+ AlbumArtist,
+ Artist,
+ BoxSet,
+ Episode,
+ Movie,
+ OtherArtist,
+ Person,
+ ReleaseGroup,
+ Season,
+ Series,
+ Track
+ }
}
diff --git a/MediaBrowser.Model/Providers/ExternalIdInfo.cs b/MediaBrowser.Model/Providers/ExternalIdInfo.cs
index 2b481ad7ed..8d6d911434 100644
--- a/MediaBrowser.Model/Providers/ExternalIdInfo.cs
+++ b/MediaBrowser.Model/Providers/ExternalIdInfo.cs
@@ -16,6 +16,12 @@ namespace MediaBrowser.Model.Providers
/// The key.
public string Key { get; set; }
+ ///
+ /// Gets or sets the type.
+ ///
+ /// The type.
+ public string Type { get; set; }
+
///
/// Gets or sets the URL format string.
///
diff --git a/MediaBrowser.Providers/Manager/ProviderManager.cs b/MediaBrowser.Providers/Manager/ProviderManager.cs
index e7b349f67b..608a0cd194 100644
--- a/MediaBrowser.Providers/Manager/ProviderManager.cs
+++ b/MediaBrowser.Providers/Manager/ProviderManager.cs
@@ -910,6 +910,7 @@ namespace MediaBrowser.Providers.Manager
{
Name = i.Name,
Key = i.Key,
+ Type = i.Type == ExternalIdType.None ? null : i.Type.ToString(),
UrlFormatString = i.UrlFormatString
});
diff --git a/MediaBrowser.Providers/Movies/MovieExternalIds.cs b/MediaBrowser.Providers/Movies/MovieExternalIds.cs
index 55810b1ed8..1ede0e7a5f 100644
--- a/MediaBrowser.Providers/Movies/MovieExternalIds.cs
+++ b/MediaBrowser.Providers/Movies/MovieExternalIds.cs
@@ -15,6 +15,9 @@ namespace MediaBrowser.Providers.Movies
///
public string Key => MetadataProviders.Imdb.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.None;
+
///
public string UrlFormatString => "https://www.imdb.com/title/{0}";
@@ -39,6 +42,9 @@ namespace MediaBrowser.Providers.Movies
///
public string Key => MetadataProviders.Imdb.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.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 628b9a9a10..54e0347138 100644
--- a/MediaBrowser.Providers/Music/MusicExternalIds.cs
+++ b/MediaBrowser.Providers/Music/MusicExternalIds.cs
@@ -12,6 +12,9 @@ namespace MediaBrowser.Providers.Music
///
public string Key => "IMVDb";
+ ///
+ public ExternalIdType Type => ExternalIdType.None;
+
///
public string UrlFormatString => null;
diff --git a/MediaBrowser.Providers/Plugins/AudioDb/ExternalIds.cs b/MediaBrowser.Providers/Plugins/AudioDb/ExternalIds.cs
index 2d8cb431ca..785185d61f 100644
--- a/MediaBrowser.Providers/Plugins/AudioDb/ExternalIds.cs
+++ b/MediaBrowser.Providers/Plugins/AudioDb/ExternalIds.cs
@@ -12,6 +12,9 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
///
public string Key => MetadataProviders.AudioDbAlbum.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.None;
+
///
public string UrlFormatString => "https://www.theaudiodb.com/album/{0}";
@@ -22,11 +25,14 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
public class AudioDbOtherAlbumExternalId : IExternalId
{
///
- public string Name => "TheAudioDb Album";
+ public string Name => "TheAudioDb";
///
public string Key => MetadataProviders.AudioDbAlbum.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.Album;
+
///
public string UrlFormatString => "https://www.theaudiodb.com/album/{0}";
@@ -42,6 +48,9 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
///
public string Key => MetadataProviders.AudioDbArtist.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.Artist;
+
///
public string UrlFormatString => "https://www.theaudiodb.com/artist/{0}";
@@ -52,11 +61,14 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
public class AudioDbOtherArtistExternalId : IExternalId
{
///
- public string Name => "TheAudioDb Artist";
+ public string Name => "TheAudioDb";
///
public string Key => MetadataProviders.AudioDbArtist.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.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 03565a34c4..ed9fa6307f 100644
--- a/MediaBrowser.Providers/Plugins/MusicBrainz/ExternalIds.cs
+++ b/MediaBrowser.Providers/Plugins/MusicBrainz/ExternalIds.cs
@@ -8,11 +8,14 @@ namespace MediaBrowser.Providers.Music
public class MusicBrainzReleaseGroupExternalId : IExternalId
{
///
- public string Name => "MusicBrainz Release Group";
+ public string Name => "MusicBrainz";
///
public string Key => MetadataProviders.MusicBrainzReleaseGroup.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.ReleaseGroup;
+
///
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/release-group/{0}";
@@ -23,11 +26,14 @@ namespace MediaBrowser.Providers.Music
public class MusicBrainzAlbumArtistExternalId : IExternalId
{
///
- public string Name => "MusicBrainz Album Artist";
+ public string Name => "MusicBrainz";
///
public string Key => MetadataProviders.MusicBrainzAlbumArtist.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.AlbumArtist;
+
///
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}";
@@ -38,11 +44,14 @@ namespace MediaBrowser.Providers.Music
public class MusicBrainzAlbumExternalId : IExternalId
{
///
- public string Name => "MusicBrainz Album";
+ public string Name => "MusicBrainz";
///
public string Key => MetadataProviders.MusicBrainzAlbum.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.Album;
+
///
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/release/{0}";
@@ -58,6 +67,9 @@ namespace MediaBrowser.Providers.Music
///
public string Key => MetadataProviders.MusicBrainzArtist.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.Artist;
+
///
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}";
@@ -68,12 +80,15 @@ namespace MediaBrowser.Providers.Music
public class MusicBrainzOtherArtistExternalId : IExternalId
{
///
- public string Name => "MusicBrainz Artist";
+ public string Name => "MusicBrainz";
///
public string Key => MetadataProviders.MusicBrainzArtist.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.OtherArtist;
+
///
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}";
@@ -84,11 +99,14 @@ namespace MediaBrowser.Providers.Music
public class MusicBrainzTrackId : IExternalId
{
///
- public string Name => "MusicBrainz Track";
+ public string Name => "MusicBrainz";
///
public string Key => MetadataProviders.MusicBrainzTrack.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.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 baf8542851..a3c24f7dd4 100644
--- a/MediaBrowser.Providers/TV/TvExternalIds.cs
+++ b/MediaBrowser.Providers/TV/TvExternalIds.cs
@@ -13,6 +13,9 @@ namespace MediaBrowser.Providers.TV
///
public string Key => MetadataProviders.Zap2It.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.None;
+
///
public string UrlFormatString => "http://tvlistings.zap2it.com/overview.html?programSeriesId={0}";
@@ -28,6 +31,9 @@ namespace MediaBrowser.Providers.TV
///
public string Key => MetadataProviders.Tvdb.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.None;
+
///
public string UrlFormatString => TvdbUtils.TvdbBaseUrl + "?tab=series&id={0}";
@@ -44,6 +50,9 @@ namespace MediaBrowser.Providers.TV
///
public string Key => MetadataProviders.Tvdb.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.Season;
+
///
public string UrlFormatString => null;
@@ -59,6 +68,9 @@ namespace MediaBrowser.Providers.TV
///
public string Key => MetadataProviders.Tvdb.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.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 187295e1e4..a51355254d 100644
--- a/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetExternalId.cs
+++ b/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetExternalId.cs
@@ -13,6 +13,9 @@ namespace MediaBrowser.Providers.Tmdb.BoxSets
///
public string Key => MetadataProviders.TmdbCollection.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.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 fc7a4583fd..af565b079b 100644
--- a/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieExternalId.cs
+++ b/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieExternalId.cs
@@ -14,6 +14,9 @@ namespace MediaBrowser.Providers.Tmdb.Movies
///
public string Key => MetadataProviders.Tmdb.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.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 2c61bc70aa..1ec43c2696 100644
--- a/MediaBrowser.Providers/Tmdb/People/TmdbPersonExternalId.cs
+++ b/MediaBrowser.Providers/Tmdb/People/TmdbPersonExternalId.cs
@@ -12,6 +12,9 @@ namespace MediaBrowser.Providers.Tmdb.People
///
public string Key => MetadataProviders.Tmdb.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.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 524a3b05e2..43ef06bf7a 100644
--- a/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesExternalId.cs
+++ b/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesExternalId.cs
@@ -12,6 +12,9 @@ namespace MediaBrowser.Providers.Tmdb.TV
///
public string Key => MetadataProviders.Tmdb.ToString();
+ ///
+ public ExternalIdType Type => ExternalIdType.Series;
+
///
public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "tv/{0}";