mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-30 11:38:32 -07:00
Fixed #940 don't show any shows without a tvdb id
Added a link to the netflix movie when you click the label
This commit is contained in:
parent
809d0103c3
commit
e5d7c4c3ec
3 changed files with 7 additions and 2 deletions
|
@ -355,7 +355,7 @@ $(function () {
|
||||||
if (results.result) {
|
if (results.result) {
|
||||||
// It's on Netflix
|
// It's on Netflix
|
||||||
$('#' + id + 'netflixTab')
|
$('#' + 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 = 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
|
if (counter <= 5) // Let's only do it for the first 5 items
|
||||||
{
|
{
|
||||||
var movieInfoTask = await MovieApi.GetMovieInformation(movie.Id).ConfigureAwait(false);
|
var movieInfoTask = await MovieApi.GetMovieInformation(movie.Id).ConfigureAwait(false);
|
||||||
|
|
||||||
// TODO needs to be careful about this, it's adding extra time to search...
|
// TODO needs to be careful about this, it's adding extra time to search...
|
||||||
// https://www.themoviedb.org/talk/5807f4cdc3a36812160041f2
|
// https://www.themoviedb.org/talk/5807f4cdc3a36812160041f2
|
||||||
imdbId = movieInfoTask?.ImdbId;
|
imdbId = movieInfoTask?.ImdbId;
|
||||||
|
@ -345,6 +346,10 @@ namespace Ombi.UI.Modules
|
||||||
var viewTv = new List<SearchTvShowViewModel>();
|
var viewTv = new List<SearchTvShowViewModel>();
|
||||||
foreach (var t in apiTv)
|
foreach (var t in apiTv)
|
||||||
{
|
{
|
||||||
|
if (!(t.show.externals?.thetvdb.HasValue) ?? false)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
var banner = t.show.image?.medium;
|
var banner = t.show.image?.medium;
|
||||||
if (!string.IsNullOrEmpty(banner))
|
if (!string.IsNullOrEmpty(banner))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue