aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Providers
diff options
context:
space:
mode:
authorLuke Foust <luke@foust.com>2020-03-22 12:58:53 -0700
committerLuke Foust <luke@foust.com>2020-03-22 12:58:53 -0700
commit9bdb99fe92edaf06679ef855eae9f8bb69b970df (patch)
treee87d28c3a2255b32f83a94fb27e7f41e4fb98d1a /MediaBrowser.Providers
parentf3213d3bef8a49a5e91cafaba2eaefb5592438c6 (diff)
Add type to externalids to distinguish them in the UI
Diffstat (limited to 'MediaBrowser.Providers')
-rw-r--r--MediaBrowser.Providers/Manager/ProviderManager.cs1
-rw-r--r--MediaBrowser.Providers/Movies/MovieExternalIds.cs6
-rw-r--r--MediaBrowser.Providers/Music/MusicExternalIds.cs3
-rw-r--r--MediaBrowser.Providers/Plugins/AudioDb/ExternalIds.cs16
-rw-r--r--MediaBrowser.Providers/Plugins/MusicBrainz/ExternalIds.cs28
-rw-r--r--MediaBrowser.Providers/TV/TvExternalIds.cs12
-rw-r--r--MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetExternalId.cs3
-rw-r--r--MediaBrowser.Providers/Tmdb/Movies/TmdbMovieExternalId.cs3
-rw-r--r--MediaBrowser.Providers/Tmdb/People/TmdbPersonExternalId.cs3
-rw-r--r--MediaBrowser.Providers/Tmdb/TV/TmdbSeriesExternalId.cs3
10 files changed, 71 insertions, 7 deletions
diff --git a/MediaBrowser.Providers/Manager/ProviderManager.cs b/MediaBrowser.Providers/Manager/ProviderManager.cs
index e7b349f67..608a0cd19 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 55810b1ed..1ede0e7a5 100644
--- a/MediaBrowser.Providers/Movies/MovieExternalIds.cs
+++ b/MediaBrowser.Providers/Movies/MovieExternalIds.cs
@@ -16,6 +16,9 @@ namespace MediaBrowser.Providers.Movies
public string Key => MetadataProviders.Imdb.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.None;
+
+ /// <inheritdoc />
public string UrlFormatString => "https://www.imdb.com/title/{0}";
/// <inheritdoc />
@@ -40,6 +43,9 @@ namespace MediaBrowser.Providers.Movies
public string Key => MetadataProviders.Imdb.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.Person;
+
+ /// <inheritdoc />
public string UrlFormatString => "https://www.imdb.com/name/{0}";
/// <inheritdoc />
diff --git a/MediaBrowser.Providers/Music/MusicExternalIds.cs b/MediaBrowser.Providers/Music/MusicExternalIds.cs
index 628b9a9a1..54e034713 100644
--- a/MediaBrowser.Providers/Music/MusicExternalIds.cs
+++ b/MediaBrowser.Providers/Music/MusicExternalIds.cs
@@ -13,6 +13,9 @@ namespace MediaBrowser.Providers.Music
public string Key => "IMVDb";
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.None;
+
+ /// <inheritdoc />
public string UrlFormatString => null;
/// <inheritdoc />
diff --git a/MediaBrowser.Providers/Plugins/AudioDb/ExternalIds.cs b/MediaBrowser.Providers/Plugins/AudioDb/ExternalIds.cs
index 2d8cb431c..785185d61 100644
--- a/MediaBrowser.Providers/Plugins/AudioDb/ExternalIds.cs
+++ b/MediaBrowser.Providers/Plugins/AudioDb/ExternalIds.cs
@@ -13,6 +13,9 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
public string Key => MetadataProviders.AudioDbAlbum.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.None;
+
+ /// <inheritdoc />
public string UrlFormatString => "https://www.theaudiodb.com/album/{0}";
/// <inheritdoc />
@@ -22,12 +25,15 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
public class AudioDbOtherAlbumExternalId : IExternalId
{
/// <inheritdoc />
- public string Name => "TheAudioDb Album";
+ public string Name => "TheAudioDb";
/// <inheritdoc />
public string Key => MetadataProviders.AudioDbAlbum.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.Album;
+
+ /// <inheritdoc />
public string UrlFormatString => "https://www.theaudiodb.com/album/{0}";
/// <inheritdoc />
@@ -43,6 +49,9 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
public string Key => MetadataProviders.AudioDbArtist.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.Artist;
+
+ /// <inheritdoc />
public string UrlFormatString => "https://www.theaudiodb.com/artist/{0}";
/// <inheritdoc />
@@ -52,12 +61,15 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
public class AudioDbOtherArtistExternalId : IExternalId
{
/// <inheritdoc />
- public string Name => "TheAudioDb Artist";
+ public string Name => "TheAudioDb";
/// <inheritdoc />
public string Key => MetadataProviders.AudioDbArtist.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.OtherArtist;
+
+ /// <inheritdoc />
public string UrlFormatString => "https://www.theaudiodb.com/artist/{0}";
/// <inheritdoc />
diff --git a/MediaBrowser.Providers/Plugins/MusicBrainz/ExternalIds.cs b/MediaBrowser.Providers/Plugins/MusicBrainz/ExternalIds.cs
index 03565a34c..ed9fa6307 100644
--- a/MediaBrowser.Providers/Plugins/MusicBrainz/ExternalIds.cs
+++ b/MediaBrowser.Providers/Plugins/MusicBrainz/ExternalIds.cs
@@ -8,12 +8,15 @@ namespace MediaBrowser.Providers.Music
public class MusicBrainzReleaseGroupExternalId : IExternalId
{
/// <inheritdoc />
- public string Name => "MusicBrainz Release Group";
+ public string Name => "MusicBrainz";
/// <inheritdoc />
public string Key => MetadataProviders.MusicBrainzReleaseGroup.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.ReleaseGroup;
+
+ /// <inheritdoc />
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/release-group/{0}";
/// <inheritdoc />
@@ -23,12 +26,15 @@ namespace MediaBrowser.Providers.Music
public class MusicBrainzAlbumArtistExternalId : IExternalId
{
/// <inheritdoc />
- public string Name => "MusicBrainz Album Artist";
+ public string Name => "MusicBrainz";
/// <inheritdoc />
public string Key => MetadataProviders.MusicBrainzAlbumArtist.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.AlbumArtist;
+
+ /// <inheritdoc />
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}";
/// <inheritdoc />
@@ -38,12 +44,15 @@ namespace MediaBrowser.Providers.Music
public class MusicBrainzAlbumExternalId : IExternalId
{
/// <inheritdoc />
- public string Name => "MusicBrainz Album";
+ public string Name => "MusicBrainz";
/// <inheritdoc />
public string Key => MetadataProviders.MusicBrainzAlbum.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.Album;
+
+ /// <inheritdoc />
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/release/{0}";
/// <inheritdoc />
@@ -59,6 +68,9 @@ namespace MediaBrowser.Providers.Music
public string Key => MetadataProviders.MusicBrainzArtist.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.Artist;
+
+ /// <inheritdoc />
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}";
/// <inheritdoc />
@@ -68,13 +80,16 @@ namespace MediaBrowser.Providers.Music
public class MusicBrainzOtherArtistExternalId : IExternalId
{
/// <inheritdoc />
- public string Name => "MusicBrainz Artist";
+ public string Name => "MusicBrainz";
/// <inheritdoc />
public string Key => MetadataProviders.MusicBrainzArtist.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.OtherArtist;
+
+ /// <inheritdoc />
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/artist/{0}";
/// <inheritdoc />
@@ -84,12 +99,15 @@ namespace MediaBrowser.Providers.Music
public class MusicBrainzTrackId : IExternalId
{
/// <inheritdoc />
- public string Name => "MusicBrainz Track";
+ public string Name => "MusicBrainz";
/// <inheritdoc />
public string Key => MetadataProviders.MusicBrainzTrack.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.Track;
+
+ /// <inheritdoc />
public string UrlFormatString => Plugin.Instance.Configuration.Server + "/track/{0}";
/// <inheritdoc />
diff --git a/MediaBrowser.Providers/TV/TvExternalIds.cs b/MediaBrowser.Providers/TV/TvExternalIds.cs
index baf854285..a3c24f7dd 100644
--- a/MediaBrowser.Providers/TV/TvExternalIds.cs
+++ b/MediaBrowser.Providers/TV/TvExternalIds.cs
@@ -14,6 +14,9 @@ namespace MediaBrowser.Providers.TV
public string Key => MetadataProviders.Zap2It.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.None;
+
+ /// <inheritdoc />
public string UrlFormatString => "http://tvlistings.zap2it.com/overview.html?programSeriesId={0}";
/// <inheritdoc />
@@ -29,6 +32,9 @@ namespace MediaBrowser.Providers.TV
public string Key => MetadataProviders.Tvdb.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.None;
+
+ /// <inheritdoc />
public string UrlFormatString => TvdbUtils.TvdbBaseUrl + "?tab=series&id={0}";
/// <inheritdoc />
@@ -45,6 +51,9 @@ namespace MediaBrowser.Providers.TV
public string Key => MetadataProviders.Tvdb.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.Season;
+
+ /// <inheritdoc />
public string UrlFormatString => null;
/// <inheritdoc />
@@ -60,6 +69,9 @@ namespace MediaBrowser.Providers.TV
public string Key => MetadataProviders.Tvdb.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.Episode;
+
+ /// <inheritdoc />
public string UrlFormatString => TvdbUtils.TvdbBaseUrl + "?tab=episode&id={0}";
/// <inheritdoc />
diff --git a/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetExternalId.cs b/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetExternalId.cs
index 187295e1e..a51355254 100644
--- a/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetExternalId.cs
+++ b/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetExternalId.cs
@@ -14,6 +14,9 @@ namespace MediaBrowser.Providers.Tmdb.BoxSets
public string Key => MetadataProviders.TmdbCollection.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.BoxSet;
+
+ /// <inheritdoc />
public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "collection/{0}";
/// <inheritdoc />
diff --git a/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieExternalId.cs b/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieExternalId.cs
index fc7a4583f..af565b079 100644
--- a/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieExternalId.cs
+++ b/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieExternalId.cs
@@ -15,6 +15,9 @@ namespace MediaBrowser.Providers.Tmdb.Movies
public string Key => MetadataProviders.Tmdb.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.Movie;
+
+ /// <inheritdoc />
public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "movie/{0}";
/// <inheritdoc />
diff --git a/MediaBrowser.Providers/Tmdb/People/TmdbPersonExternalId.cs b/MediaBrowser.Providers/Tmdb/People/TmdbPersonExternalId.cs
index 2c61bc70a..1ec43c269 100644
--- a/MediaBrowser.Providers/Tmdb/People/TmdbPersonExternalId.cs
+++ b/MediaBrowser.Providers/Tmdb/People/TmdbPersonExternalId.cs
@@ -13,6 +13,9 @@ namespace MediaBrowser.Providers.Tmdb.People
public string Key => MetadataProviders.Tmdb.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.Person;
+
+ /// <inheritdoc />
public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "person/{0}";
/// <inheritdoc />
diff --git a/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesExternalId.cs b/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesExternalId.cs
index 524a3b05e..43ef06bf7 100644
--- a/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesExternalId.cs
+++ b/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesExternalId.cs
@@ -13,6 +13,9 @@ namespace MediaBrowser.Providers.Tmdb.TV
public string Key => MetadataProviders.Tmdb.ToString();
/// <inheritdoc />
+ public ExternalIdType Type => ExternalIdType.Series;
+
+ /// <inheritdoc />
public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "tv/{0}";
/// <inheritdoc />