fix subs not starting initially
This commit is contained in:
parent
3009413b24
commit
0154f42bfe
10 changed files with 30 additions and 94 deletions
|
@ -88,15 +88,6 @@
|
|||
|
||||
LibraryBrowser.saveQueryValues(getSavedQueryKey(), query);
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
|
||||
if (user.Policy.EnableMediaPlayback && result.Items.length) {
|
||||
$('.btnTrailerReel', page).show();
|
||||
} else {
|
||||
$('.btnTrailerReel', page).hide();
|
||||
}
|
||||
});
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
@ -130,36 +121,6 @@
|
|||
$('select.selectPageSize', viewPanel).val(query.Limit).selectmenu('refresh');
|
||||
}
|
||||
|
||||
function playReel(page) {
|
||||
|
||||
$('.popupTrailerReel', page).popup('close');
|
||||
|
||||
var reelQuery = {
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
SortBy: 'Random',
|
||||
Limit: 50,
|
||||
Fields: "MediaSources,Chapters"
|
||||
};
|
||||
|
||||
if ($('.chkUnwatchedOnly', page).checked()) {
|
||||
reelQuery.Filters = "IsPlayed";
|
||||
}
|
||||
|
||||
ApiClient.getJSON(ApiClient.getUrl('Trailers', reelQuery)).done(function (result) {
|
||||
|
||||
MediaController.play({
|
||||
items: result.Items
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
var page = $(this).parents('.page');
|
||||
|
||||
playReel(page);
|
||||
return false;
|
||||
}
|
||||
|
||||
function initPage(page, tabContent, viewPanel) {
|
||||
|
||||
$('.radioSortBy', viewPanel).on('click', function () {
|
||||
|
@ -222,14 +183,6 @@
|
|||
query.StartIndex = 0;
|
||||
reloadItems(tabContent, viewPanel);
|
||||
});
|
||||
|
||||
$('.btnTrailerReel', tabContent).on('click', function () {
|
||||
|
||||
$('.popupTrailerReel', page).popup('open');
|
||||
|
||||
});
|
||||
|
||||
$('.popupTrailerReelForm', page).off('submit', onSubmit).on('submit', onSubmit);
|
||||
}
|
||||
|
||||
$(document).on('pageinitdepends', "#moviesRecommendedPage", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue