|
|
|
@ -23,7 +23,7 @@ namespace MediaBrowser.Providers.TV
|
|
|
|
|
{
|
|
|
|
|
public class MovieDbSeriesProvider : IRemoteMetadataProvider<Series, SeriesInfo>, IHasOrder
|
|
|
|
|
{
|
|
|
|
|
private const string GetTvInfo3 = @"http://api.themoviedb.org/3/tv/{0}?api_key={1}&append_to_response=casts,images,keywords,external_ids";
|
|
|
|
|
private const string GetTvInfo3 = @"http://api.themoviedb.org/3/tv/{0}?api_key={1}&append_to_response=credits,images,keywords,external_ids,videos";
|
|
|
|
|
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
|
|
|
|
|
|
|
|
|
|
internal static MovieDbSeriesProvider Current { get; private set; }
|
|
|
|
@ -349,7 +349,7 @@ namespace MediaBrowser.Providers.TV
|
|
|
|
|
if (fileInfo.Exists)
|
|
|
|
|
{
|
|
|
|
|
// If it's recent or automatic updates are enabled, don't re-download
|
|
|
|
|
if ((DateTime.UtcNow - _fileSystem.GetLastWriteTimeUtc(fileInfo)).TotalDays <= 7)
|
|
|
|
|
if ((DateTime.UtcNow - _fileSystem.GetLastWriteTimeUtc(fileInfo)).TotalDays <= 3)
|
|
|
|
|
{
|
|
|
|
|
return _cachedTask;
|
|
|
|
|
}
|
|
|
|
@ -464,10 +464,37 @@ namespace MediaBrowser.Providers.TV
|
|
|
|
|
public class Season
|
|
|
|
|
{
|
|
|
|
|
public string air_date { get; set; }
|
|
|
|
|
public int id { get; set; }
|
|
|
|
|
public string poster_path { get; set; }
|
|
|
|
|
public int season_number { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Cast
|
|
|
|
|
{
|
|
|
|
|
public string character { get; set; }
|
|
|
|
|
public string credit_id { get; set; }
|
|
|
|
|
public int id { get; set; }
|
|
|
|
|
public string name { get; set; }
|
|
|
|
|
public string profile_path { get; set; }
|
|
|
|
|
public int order { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Crew
|
|
|
|
|
{
|
|
|
|
|
public string credit_id { get; set; }
|
|
|
|
|
public string department { get; set; }
|
|
|
|
|
public int id { get; set; }
|
|
|
|
|
public string name { get; set; }
|
|
|
|
|
public string job { get; set; }
|
|
|
|
|
public string profile_path { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Credits
|
|
|
|
|
{
|
|
|
|
|
public List<Cast> cast { get; set; }
|
|
|
|
|
public List<Crew> crew { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Backdrop
|
|
|
|
|
{
|
|
|
|
|
public double aspect_ratio { get; set; }
|
|
|
|
@ -484,6 +511,7 @@ namespace MediaBrowser.Providers.TV
|
|
|
|
|
public double aspect_ratio { get; set; }
|
|
|
|
|
public string file_path { get; set; }
|
|
|
|
|
public int height { get; set; }
|
|
|
|
|
public string id { get; set; }
|
|
|
|
|
public string iso_639_1 { get; set; }
|
|
|
|
|
public double vote_average { get; set; }
|
|
|
|
|
public int vote_count { get; set; }
|
|
|
|
@ -496,6 +524,11 @@ namespace MediaBrowser.Providers.TV
|
|
|
|
|
public List<Poster> posters { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Keywords
|
|
|
|
|
{
|
|
|
|
|
public List<object> results { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ExternalIds
|
|
|
|
|
{
|
|
|
|
|
public string imdb_id { get; set; }
|
|
|
|
@ -505,6 +538,11 @@ namespace MediaBrowser.Providers.TV
|
|
|
|
|
public int tvrage_id { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Videos
|
|
|
|
|
{
|
|
|
|
|
public List<object> results { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class RootObject
|
|
|
|
|
{
|
|
|
|
|
public string backdrop_path { get; set; }
|
|
|
|
@ -530,8 +568,11 @@ namespace MediaBrowser.Providers.TV
|
|
|
|
|
public string status { get; set; }
|
|
|
|
|
public double vote_average { get; set; }
|
|
|
|
|
public int vote_count { get; set; }
|
|
|
|
|
public Credits credits { get; set; }
|
|
|
|
|
public Images images { get; set; }
|
|
|
|
|
public Keywords keywords { get; set; }
|
|
|
|
|
public ExternalIds external_ids { get; set; }
|
|
|
|
|
public Videos videos { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int Order
|
|
|
|
|