mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add sports to suggested tv
This commit is contained in:
parent
fd459b0744
commit
a25bc8c8a3
3 changed files with 34 additions and 28 deletions
|
@ -33,6 +33,14 @@
|
|||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<div id="upcomingSports">
|
||||
<h1 class="listHeader">${HeaderUpcomingSports}</h1>
|
||||
<div class="upcomingSportsItems itemsContainer"></div>
|
||||
<div>
|
||||
<a data-role="button" href="livetvitems.html?type=sports" data-inline="true" data-mini="true">${ButtonMoreItems}</a>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// The base query options
|
||||
var query = {
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
SortBy: "PremiereDate,SortName",
|
||||
SortBy: "StartDate,SortName",
|
||||
SortOrder: "Ascending",
|
||||
StartIndex: 0
|
||||
};
|
||||
|
@ -19,19 +19,6 @@
|
|||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', page).each(function () {
|
||||
|
||||
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.radioSortOrder', page).each(function () {
|
||||
|
||||
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('#selectView', page).val(view).selectmenu('refresh');
|
||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
||||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
||||
|
@ -58,7 +45,6 @@
|
|||
$('.listTopPaging', page).html(pagingHtml).trigger('create');
|
||||
|
||||
updateFilterControls(page);
|
||||
var trigger = false;
|
||||
|
||||
if (view == "Poster") {
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
|
@ -112,18 +98,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('#selectView', this).on('change', function () {
|
||||
|
||||
view = this.value;
|
||||
|
@ -179,6 +153,7 @@
|
|||
}
|
||||
|
||||
query.IsMovie = getParameterByName('type') == 'movies' ? true : null;
|
||||
query.IsSports = getParameterByName('type') == 'sports' ? true : null;
|
||||
|
||||
var viewkey = getSavedQueryKey();
|
||||
|
||||
|
|
|
@ -33,7 +33,8 @@
|
|||
IsAiring: false,
|
||||
HasAired: false,
|
||||
limit: 10,
|
||||
IsMovie: false
|
||||
IsMovie: false,
|
||||
IsSports: false
|
||||
|
||||
}).done(function (result) {
|
||||
|
||||
|
@ -73,6 +74,28 @@
|
|||
|
||||
$('.upcomingTvMovieItems', page).html(html).lazyChildren();
|
||||
});
|
||||
|
||||
ApiClient.getLiveTvRecommendedPrograms({
|
||||
|
||||
userId: Dashboard.getCurrentUserId(),
|
||||
IsAiring: false,
|
||||
HasAired: false,
|
||||
limit: 10,
|
||||
IsSports: true
|
||||
|
||||
}).done(function (result) {
|
||||
|
||||
var html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "auto",
|
||||
showTitle: true,
|
||||
coverImage: true,
|
||||
overlayText: false,
|
||||
lazy: true
|
||||
});
|
||||
|
||||
$('.upcomingSportsItems', page).html(html).lazyChildren();
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', "#liveTvSuggestedPage", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue