use modular id's on edit page

This commit is contained in:
Luke Pulverenti
2014-02-21 16:44:10 -05:00
parent 0d90f1d450
commit 8f22edb503
8 changed files with 123 additions and 11 deletions

View File

@@ -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
});
}
}
}

View File

@@ -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

View File

@@ -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