mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -07:00
Improved the search UI and made it more consistant.
Finished the Netflix API Part #884
This commit is contained in:
parent
18b12f1a97
commit
88c0651b1e
9 changed files with 98 additions and 7 deletions
|
@ -304,6 +304,8 @@ $(function () {
|
|||
|
||||
var html = searchTemplate(context);
|
||||
$("#movieList").append(html);
|
||||
|
||||
checkNetflix(context.title, context.id);
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
@ -334,6 +336,9 @@ $(function () {
|
|||
var context = buildTvShowContext(result);
|
||||
var html = searchTemplate(context);
|
||||
$("#tvList").append(html);
|
||||
|
||||
checkNetflix(context.title, context.id);
|
||||
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
@ -343,6 +348,19 @@ $(function () {
|
|||
});
|
||||
};
|
||||
|
||||
function checkNetflix(title, id) {
|
||||
var url = createBaseUrl(base, '/searchextension/netflix/' + title);
|
||||
$.ajax(url).success(function (results) {
|
||||
|
||||
if (results.result) {
|
||||
// It's on Netflix
|
||||
$('#' + id + 'netflixTab')
|
||||
.html("<span class='label label-success'>Avaialble on Netflix</span>");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function resetTvShows() {
|
||||
$("#tvList").html("");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue