Merge pull request #3834 from cvium/fix_tmdb_external_ids

Make external ids nullable in TMDb
This commit is contained in:
Bond-009 2020-08-06 23:52:39 +02:00 committed by GitHub
commit 8964697d8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -10,8 +10,8 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General
public string Freebase_Mid { get; set; }
public int Tvdb_Id { get; set; }
public int? Tvdb_Id { get; set; }
public int Tvrage_Id { get; set; }
public int? Tvrage_Id { get; set; }
}
}

View File

@ -111,7 +111,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
if (response.External_Ids.Tvdb_Id > 0)
{
item.SetProviderId(MetadataProvider.Tvdb, response.External_Ids.Tvdb_Id.ToString(CultureInfo.InvariantCulture));
item.SetProviderId(MetadataProvider.Tvdb, response.External_Ids.Tvdb_Id.Value.ToString(CultureInfo.InvariantCulture));
}
item.PremiereDate = response.Air_Date;

View File

@ -75,7 +75,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
if (seasonInfo.External_Ids.Tvdb_Id > 0)
{
result.Item.SetProviderId(MetadataProvider.Tvdb, seasonInfo.External_Ids.Tvdb_Id.ToString(CultureInfo.InvariantCulture));
result.Item.SetProviderId(MetadataProvider.Tvdb, seasonInfo.External_Ids.Tvdb_Id.Value.ToString(CultureInfo.InvariantCulture));
}
var credits = seasonInfo.Credits;

View File

@ -92,7 +92,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
if (obj.External_Ids.Tvdb_Id > 0)
{
remoteResult.SetProviderId(MetadataProvider.Tvdb, obj.External_Ids.Tvdb_Id.ToString(_usCulture));
remoteResult.SetProviderId(MetadataProvider.Tvdb, obj.External_Ids.Tvdb_Id.Value.ToString(_usCulture));
}
return new[] { remoteResult };
@ -268,12 +268,12 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.TV
if (ids.Tvrage_Id > 0)
{
series.SetProviderId(MetadataProvider.TvRage, ids.Tvrage_Id.ToString(_usCulture));
series.SetProviderId(MetadataProvider.TvRage, ids.Tvrage_Id.Value.ToString(_usCulture));
}
if (ids.Tvdb_Id > 0)
{
series.SetProviderId(MetadataProvider.Tvdb, ids.Tvdb_Id.ToString(_usCulture));
series.SetProviderId(MetadataProvider.Tvdb, ids.Tvdb_Id.Value.ToString(_usCulture));
}
}