Make external ids nullable in TMDb

pull/3834/head
cvium 4 years ago
parent b7f3906446
commit f871087645

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

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

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

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

Loading…
Cancel
Save