Fixed #940 don't show any shows without a tvdb id

Added a link to the netflix movie when you click the label
pull/952/head
tidusjar 8 years ago
parent 809d0103c3
commit e5d7c4c3ec

@ -355,7 +355,7 @@ $(function () {
if (results.result) {
// It's on Netflix
$('#' + id + 'netflixTab')
.html("<span class='label label-success'>Avaialble on Netflix</span>");
.html("<a href='https://www.netflix.com/watch/"+results.netflixId+"' target='_blank'><span class='label label-success'>Avaialble on Netflix</span></a>");
}
});

@ -54,7 +54,7 @@ namespace Ombi.UI.Modules
return Response.AsJson(new { Result = false });
}
return Response.AsJson(new { Result = true });
return Response.AsJson(new { Result = true, NetflixId = result.ShowId });
}

@ -246,6 +246,7 @@ namespace Ombi.UI.Modules
if (counter <= 5) // Let's only do it for the first 5 items
{
var movieInfoTask = await MovieApi.GetMovieInformation(movie.Id).ConfigureAwait(false);
// TODO needs to be careful about this, it's adding extra time to search...
// https://www.themoviedb.org/talk/5807f4cdc3a36812160041f2
imdbId = movieInfoTask?.ImdbId;
@ -345,6 +346,10 @@ namespace Ombi.UI.Modules
var viewTv = new List<SearchTvShowViewModel>();
foreach (var t in apiTv)
{
if (!(t.show.externals?.thetvdb.HasValue) ?? false)
{
continue;
}
var banner = t.show.image?.medium;
if (!string.IsNullOrEmpty(banner))
{

Loading…
Cancel
Save