1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update live tv

This commit is contained in:
Luke Pulverenti 2015-07-24 11:20:11 -04:00
parent 693c99f275
commit 256b44764f
7 changed files with 174 additions and 98 deletions

View file

@ -2508,10 +2508,12 @@
var tooltipPlayed = Globalize.translate('TooltipPlayed');
if (item.MediaType == 'Video' || item.Type == 'Series' || item.Type == 'Season' || item.Type == 'BoxSet' || item.Type == 'Playlist') {
if (userData.Played) {
html += LibraryBrowser.getUserDataButtonHtml('markPlayed', itemId, 'btnUserItemRating btnUserItemRatingOn', 'check', tooltipPlayed);
} else {
html += LibraryBrowser.getUserDataButtonHtml('markPlayed', itemId, 'btnUserItemRating', 'check', tooltipPlayed);
if (item.Type != 'TvChannel') {
if (userData.Played) {
html += LibraryBrowser.getUserDataButtonHtml('markPlayed', itemId, 'btnUserItemRating btnUserItemRatingOn', 'check', tooltipPlayed);
} else {
html += LibraryBrowser.getUserDataButtonHtml('markPlayed', itemId, 'btnUserItemRating', 'check', tooltipPlayed);
}
}
}
}

View file

@ -8,11 +8,9 @@
function getChannelsHtml(channels) {
return LibraryBrowser.getPosterViewHtml({
return LibraryBrowser.getListViewHtml({
items: channels,
shape: "smallBackdrop",
centerText: true,
lazy: true
smallIcon: true
});
}
@ -42,6 +40,7 @@
var elem = page.querySelector('#items');
elem.innerHTML = html;
ImageLoader.lazyChildren(elem);
$(elem).trigger('create');
$('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit;

View file

@ -1,26 +1,26 @@
(function ($, document) {
function loadRecommendedPrograms(page) {
Dashboard.showLoadingMsg();
ApiClient.getLiveTvRecommendedPrograms({
userId: Dashboard.getCurrentUserId(),
IsAiring: true,
limit: 18
limit: 16
}).done(function (result) {
var html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "auto",
showTitle: true,
showParentTitle: true,
overlayText: true,
coverImage: true,
lazy: true
lazy: true,
overlayPlayButton: true
});
@ -42,7 +42,7 @@
userId: Dashboard.getCurrentUserId(),
IsAiring: false,
HasAired: false,
limit: 9,
limit: 8,
IsMovie: false,
IsSports: false
@ -56,7 +56,8 @@
showParentTitle: true,
overlayText: true,
coverImage: true,
lazy: true
lazy: true,
overlayMoreButton: true
});
@ -70,7 +71,7 @@
userId: Dashboard.getCurrentUserId(),
IsAiring: false,
HasAired: false,
limit: 9,
limit: 8,
IsMovie: true
}).done(function (result) {
@ -81,7 +82,8 @@
showTitle: false,
coverImage: true,
overlayText: false,
lazy: true
lazy: true,
overlayMoreButton: true
});
var elem = page.querySelector('.upcomingTvMovieItems');
@ -94,7 +96,7 @@
userId: Dashboard.getCurrentUserId(),
IsAiring: false,
HasAired: false,
limit: 9,
limit: 8,
IsSports: true
}).done(function (result) {
@ -105,7 +107,8 @@
showTitle: false,
coverImage: true,
overlayText: false,
lazy: true
lazy: true,
overlayMoreButton: true
});
var elem = page.querySelector('.upcomingSportsItems');

View file

@ -407,7 +407,8 @@
centerText: true,
context: 'channels',
lazy: true,
showDetailsMenu: true
showDetailsMenu: true,
overlayPlayButton: true
});
html += '</div>';
html += '</div>';