mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-30 03:13:17 +01:00
use modular id's on edit page
This commit is contained in:
@@ -656,7 +656,7 @@ namespace MediaBrowser.Providers.Manager
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
var value = item.GetProviderId(i.Key);
|
||||
|
||||
if (string.IsNullOrEmpty(value))
|
||||
@@ -672,5 +672,17 @@ namespace MediaBrowser.Providers.Manager
|
||||
|
||||
}).Where(i => i != null);
|
||||
}
|
||||
|
||||
public IEnumerable<ExternalIdInfo> GetExternalIdInfos(IHasProviderIds item)
|
||||
{
|
||||
return GetExternalIds(item)
|
||||
.Select(i => new ExternalIdInfo
|
||||
{
|
||||
Name = i.Name,
|
||||
Key = i.Key,
|
||||
UrlFormatString = i.UrlFormatString
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,52 @@ namespace MediaBrowser.Providers.Movies
|
||||
}
|
||||
}
|
||||
|
||||
public class RottenTomatoesExternalId : IExternalId
|
||||
{
|
||||
public string Name
|
||||
{
|
||||
get { return "Rotten Tomatoes"; }
|
||||
}
|
||||
|
||||
public string Key
|
||||
{
|
||||
get { return MetadataProviders.RottenTomatoes.ToString(); }
|
||||
}
|
||||
|
||||
public string UrlFormatString
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public bool Supports(IHasProviderIds item)
|
||||
{
|
||||
return item is Movie || item is Trailer || item is MusicVideo;
|
||||
}
|
||||
}
|
||||
|
||||
public class MovieDbMovieCollectionExternalId : IExternalId
|
||||
{
|
||||
public string Name
|
||||
{
|
||||
get { return "TheMovieDb Collection"; }
|
||||
}
|
||||
|
||||
public string Key
|
||||
{
|
||||
get { return MetadataProviders.TmdbCollection.ToString(); }
|
||||
}
|
||||
|
||||
public string UrlFormatString
|
||||
{
|
||||
get { return "http://www.themoviedb.org/collection/{0}"; }
|
||||
}
|
||||
|
||||
public bool Supports(IHasProviderIds item)
|
||||
{
|
||||
return item is Movie || item is Trailer || item is MusicVideo;
|
||||
}
|
||||
}
|
||||
|
||||
public class MovieDbPersonExternalId : IExternalId
|
||||
{
|
||||
public string Name
|
||||
|
||||
@@ -51,6 +51,29 @@ namespace MediaBrowser.Providers.TV
|
||||
}
|
||||
}
|
||||
|
||||
public class TvdbEpisodeExternalId : IExternalId
|
||||
{
|
||||
public string Name
|
||||
{
|
||||
get { return "TheTVDB"; }
|
||||
}
|
||||
|
||||
public string Key
|
||||
{
|
||||
get { return MetadataProviders.Tvdb.ToString(); }
|
||||
}
|
||||
|
||||
public string UrlFormatString
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public bool Supports(IHasProviderIds item)
|
||||
{
|
||||
return item is Episode;
|
||||
}
|
||||
}
|
||||
|
||||
public class TvComSeriesExternalId : IExternalId
|
||||
{
|
||||
public string Name
|
||||
|
||||
Reference in New Issue
Block a user