mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
Fully switched the TV shows over to use the other provider.
This commit is contained in:
parent
46dc9d95f1
commit
7677831bbc
14 changed files with 231 additions and 30 deletions
|
@ -85,12 +85,14 @@ function movieSearch() {
|
|||
var query = $("#movieSearchContent").val();
|
||||
|
||||
$.ajax("/search/movie/" + query).success(function (results) {
|
||||
results.forEach(function (result) {
|
||||
var context = buildMovieContext(result);
|
||||
if (results.length > 0) {
|
||||
results.forEach(function(result) {
|
||||
var context = buildMovieContext(result);
|
||||
|
||||
var html = searchTemplate(context);
|
||||
$("#movieList").append(html);
|
||||
});
|
||||
var html = searchTemplate(context);
|
||||
$("#movieList").append(html);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -99,12 +101,13 @@ function tvSearch() {
|
|||
var query = $("#tvSearchContent").val();
|
||||
|
||||
$.ajax("/search/tv/" + query).success(function (results) {
|
||||
|
||||
results.data.forEach(function (result) {
|
||||
var context = buildTvShowContext(result);
|
||||
var html = searchTemplate(context);
|
||||
$("#tvList").append(html);
|
||||
});
|
||||
if (results.length > 0) {
|
||||
results.forEach(function(result) {
|
||||
var context = buildTvShowContext(result);
|
||||
var html = searchTemplate(context);
|
||||
$("#tvList").append(html);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -30,12 +30,10 @@ function buildTvShowContext(result) {
|
|||
var date = new Date(result.firstAired);
|
||||
var year = date.getFullYear();
|
||||
var context = {
|
||||
posterPath: result.posterPath,
|
||||
posterPath: result.banner,
|
||||
id: result.id,
|
||||
title: result.name,
|
||||
title: result.seriesName,
|
||||
overview: result.overview,
|
||||
voteCount: result.voteCount,
|
||||
voteAverage: result.voteAverage,
|
||||
year: year,
|
||||
type: "tv"
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue