mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update playlist query
This commit is contained in:
parent
a38b85a4df
commit
6afa97f6b8
14 changed files with 142 additions and 121 deletions
5
dashboard-ui/cordova/chromecast.js
vendored
5
dashboard-ui/cordova/chromecast.js
vendored
|
@ -559,12 +559,7 @@
|
|||
device.getWebAppLauncher().launchWebApp(ApplicationID).success(function (session) {
|
||||
|
||||
Logger.log('launchWebApp success. calling onSessionConnected');
|
||||
if ($.browser.android) {
|
||||
//tryJoinWebSession(device, true, false);
|
||||
setupWebAppSession(device, session, true);
|
||||
} else {
|
||||
setupWebAppSession(device, session, true);
|
||||
}
|
||||
|
||||
}).error(function (err1) {
|
||||
|
||||
|
|
36
dashboard-ui/cordova/ios/tabbar.js
vendored
36
dashboard-ui/cordova/ios/tabbar.js
vendored
|
@ -26,6 +26,9 @@
|
|||
case 'Sync':
|
||||
Dashboard.navigate('mysync.html');
|
||||
break;
|
||||
case 'LiveTv':
|
||||
Dashboard.navigate('livetv.html');
|
||||
break;
|
||||
case 'Settings':
|
||||
Dashboard.navigate('mypreferencesmenu.html?userId=' + Dashboard.getCurrentUserId());
|
||||
break;
|
||||
|
@ -69,6 +72,7 @@
|
|||
|
||||
var items = [
|
||||
{ name: 'Library', label: Globalize.translate('ButtonLibrary'), image: 'tabbar/tab-library.png', options: {} },
|
||||
{ name: 'LiveTv', label: Globalize.translate('HeaderLiveTV'), image: 'tabbar/tab-livetv.png', options: {} },
|
||||
{ name: 'Favorites', label: Globalize.translate('ButtonFavorites'), image: 'tabButton:Favorites', options: {} },
|
||||
{ name: 'Search', label: Globalize.translate('ButtonSearch'), image: 'tabButton:Search', options: {} },
|
||||
{ name: 'NowPlaying', label: Globalize.translate('ButtonNowPlaying'), image: 'tabbar/tab-nowplaying.png', options: {} },
|
||||
|
@ -99,7 +103,37 @@
|
|||
|
||||
function showUserTabs(user) {
|
||||
|
||||
var tabs = ['Library', 'Favorites', 'Search', 'NowPlaying'];
|
||||
if (!window.ApiClient) {
|
||||
onUserViewResponse(user, []);
|
||||
return;
|
||||
}
|
||||
|
||||
ApiClient.getUserViews({}, user.Id).done(function (result) {
|
||||
|
||||
onUserViewResponse(user, result.Items);
|
||||
|
||||
}).fail(function (result) {
|
||||
|
||||
onUserViewResponse(user, []);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function onUserViewResponse(user, views) {
|
||||
|
||||
var tabs = ['Library'];
|
||||
|
||||
if (views.filter(function (v) {
|
||||
|
||||
return v.CollectionType == 'livetv';
|
||||
|
||||
}).length) {
|
||||
tabs.push('LiveTv');
|
||||
}
|
||||
|
||||
tabs.push('Favorites');
|
||||
tabs.push('Search');
|
||||
tabs.push('NowPlaying');
|
||||
|
||||
if (user.Policy.EnableSync && Dashboard.capabilities().SupportsSync) {
|
||||
|
||||
|
|
|
@ -1818,7 +1818,8 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
|
||||
#criticReviewsContent.hiddenScrollX .paperList {
|
||||
min-width: 240px;
|
||||
max-width: 90%;
|
||||
width: 90%;
|
||||
max-width: 500px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin: 0 4px 0 0;
|
||||
|
|
|
@ -86,11 +86,15 @@ body {
|
|||
flex-grow: 0 !important;
|
||||
}
|
||||
|
||||
.ui-body-b .paperList {
|
||||
.ui-body-b .paperList:not(.criticReviewPaperList) {
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.criticReviewPaperList {
|
||||
background-color: #262626;
|
||||
}
|
||||
|
||||
.settingsMenuHeader {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -31,12 +31,12 @@
|
|||
<div class="pageTabContent suggestedTabContent" data-index="0">
|
||||
<div id="activePrograms" class="homePageSection">
|
||||
<h1 class="listHeader">${HeaderWhatsOnTV}</h1>
|
||||
<div class="activeProgramItems itemsContainer"></div>
|
||||
<div class="activeProgramItems itemsContainer noautoinit"></div>
|
||||
<br />
|
||||
</div>
|
||||
<div id="upcomingPrograms" class="homePageSection" style="margin-top:1em;">
|
||||
<h1 class="listHeader">${HeaderUpcomingPrograms}</h1>
|
||||
<div class="upcomingProgramItems itemsContainer"></div>
|
||||
<div class="upcomingProgramItems itemsContainer noautoinit"></div>
|
||||
<br />
|
||||
</div>
|
||||
<div id="upcomingTvMovies" class="homePageSection" style="margin-top:1em;">
|
||||
|
@ -44,7 +44,7 @@
|
|||
<h1 class="listHeader" style="display:inline-block;vertical-align:middle;">${HeaderUpcomingMovies}</h1>
|
||||
<a href="livetvitems.html?type=movies" class="clearLink" style="margin-left:1em;vertical-align:middle;"><paper-button raised class="more mini noIcon">${ButtonMoreItems}</paper-button></a>
|
||||
</div>
|
||||
<div class="upcomingTvMovieItems itemsContainer"></div>
|
||||
<div class="upcomingTvMovieItems itemsContainer noautoinit"></div>
|
||||
<br />
|
||||
</div>
|
||||
<div id="upcomingSports" class="homePageSection" style="margin-top:1em;">
|
||||
|
@ -52,7 +52,7 @@
|
|||
<h1 class="listHeader" style="display:inline-block;vertical-align:middle;">${HeaderUpcomingSports}</h1>
|
||||
<a href="livetvitems.html?type=sports" class="clearLink" style="margin-left:1em;vertical-align:middle;"><paper-button raised class="more mini noIcon">${ButtonMoreItems}</paper-button></a>
|
||||
</div>
|
||||
<div class="upcomingSportsItems itemsContainer"></div>
|
||||
<div class="upcomingSportsItems itemsContainer noautoinit"></div>
|
||||
<br />
|
||||
</div>
|
||||
<div id="upcomingKids" class="homePageSection" style="margin-top:1em;">
|
||||
|
@ -60,7 +60,7 @@
|
|||
<h1 class="listHeader" style="display:inline-block;vertical-align:middle;">${HeaderUpcomingForKids}</h1>
|
||||
<a href="livetvitems.html?type=kids" class="clearLink" style="margin-left:1em;vertical-align:middle;"><paper-button raised class="more mini noIcon">${ButtonMoreItems}</paper-button></a>
|
||||
</div>
|
||||
<div class="upcomingKidsItems itemsContainer"></div>
|
||||
<div class="upcomingKidsItems itemsContainer noautoinit"></div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -106,8 +106,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fldExternalPlayer" style="display: none;">
|
||||
<br />
|
||||
<div>
|
||||
<paper-checkbox class="chkExternalVideoPlayer">${OptionEnableExternalVideoPlayers}</paper-checkbox>
|
||||
<div class="fieldDescription paperCheckboxFieldDescription">
|
||||
<div style="display:none;" class="labelGenericExternalPlayers">${LabelExternalPlayersHelp}</div>
|
||||
|
|
|
@ -76,25 +76,9 @@
|
|||
function getDeviceCulture() {
|
||||
var deferred = DeferredBuilder.Deferred();
|
||||
|
||||
if (navigator.globalization && navigator.globalization.getPreferredLanguage) {
|
||||
|
||||
Logger.log('Calling navigator.globalization.getPreferredLanguage');
|
||||
|
||||
navigator.globalization.getPreferredLanguage(function (locale) {
|
||||
|
||||
var culture = locale.value || '';
|
||||
//if ($.browser.safari) {
|
||||
culture = navigator.language || navigator.userLanguage || culture;
|
||||
//}
|
||||
Logger.log('Device culture is ' + culture);
|
||||
deferred.resolveWith(null, [culture]);
|
||||
|
||||
}, function () {
|
||||
|
||||
Logger.log('navigator.globalization.getPreferredLanguage failed');
|
||||
if (AppInfo.isNativeApp) {
|
||||
|
||||
deferred.resolveWith(null, [navigator.language || navigator.userLanguage]);
|
||||
});
|
||||
|
||||
} else if (AppInfo.supportsUserDisplayLanguageSetting) {
|
||||
|
||||
|
|
|
@ -1136,7 +1136,7 @@
|
|||
|
||||
var review = reviews[i];
|
||||
|
||||
html += '<div class="paperList">';
|
||||
html += '<div class="paperList criticReviewPaperList">';
|
||||
html += '<paper-icon-item style="padding-top:.5em;padding-bottom:.5em;">';
|
||||
|
||||
if (review.Score != null) {
|
||||
|
|
|
@ -583,7 +583,7 @@
|
|||
|
||||
showPlayMenu: function (positionTo, itemId, itemType, isFolder, mediaType, resumePositionTicks) {
|
||||
|
||||
var externalPlayers = AppSettings.enableExternalPlayers();
|
||||
var externalPlayers = AppInfo.supportsExternalPlayers && AppSettings.enableExternalPlayers();
|
||||
|
||||
if (!resumePositionTicks && mediaType != "Audio" && !isFolder) {
|
||||
|
||||
|
@ -727,8 +727,10 @@
|
|||
}
|
||||
|
||||
if (item.CanDownload) {
|
||||
if (AppInfo.supportsDownloading) {
|
||||
commands.push('download');
|
||||
}
|
||||
}
|
||||
|
||||
if (LibraryBrowser.canShare(item, user)) {
|
||||
commands.push('share');
|
||||
|
|
|
@ -289,7 +289,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
if (mediaType == 'Video' && AppSettings.enableExternalPlayers()) {
|
||||
if (mediaType == 'Video' && AppInfo.supportsExternalPlayers && AppSettings.enableExternalPlayers()) {
|
||||
items.push({
|
||||
name: Globalize.translate('ButtonPlayExternalPlayer'),
|
||||
id: 'externalplayer',
|
||||
|
|
|
@ -1,5 +1,26 @@
|
|||
(function ($, document) {
|
||||
|
||||
function enableScrollX() {
|
||||
return $.browser.mobile && AppInfo.enableAppLayouts;
|
||||
}
|
||||
|
||||
function getPortraitShape() {
|
||||
return enableScrollX() ? 'overflowPortrait' : 'portrait';
|
||||
}
|
||||
|
||||
function getThumbShape() {
|
||||
return enableScrollX() ? 'overflowBackdrop' : 'backdrop';
|
||||
}
|
||||
|
||||
function getSquareShape() {
|
||||
return enableScrollX() ? 'overflowSquare' : 'square';
|
||||
}
|
||||
|
||||
function getLimit() {
|
||||
|
||||
return enableScrollX() ? 12 : 8;
|
||||
}
|
||||
|
||||
function loadRecommendedPrograms(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
@ -8,30 +29,15 @@
|
|||
|
||||
userId: Dashboard.getCurrentUserId(),
|
||||
IsAiring: true,
|
||||
limit: 16,
|
||||
limit: getLimit() * 2,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary"
|
||||
|
||||
}).done(function (result) {
|
||||
|
||||
var html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "auto",
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
centerText: true,
|
||||
coverImage: true,
|
||||
lazy: true,
|
||||
overlayPlayButton: true
|
||||
|
||||
});
|
||||
|
||||
var elem = page.querySelector('.activeProgramItems');
|
||||
elem.innerHTML = html;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
||||
renderItems(page, result.Items, 'activeProgramItems', 'play');
|
||||
LibraryBrowser.setLastRefreshed(page);
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -44,7 +50,7 @@
|
|||
userId: Dashboard.getCurrentUserId(),
|
||||
IsAiring: false,
|
||||
HasAired: false,
|
||||
limit: 8,
|
||||
limit: getLimit(),
|
||||
IsMovie: false,
|
||||
IsSports: false,
|
||||
IsKids: false,
|
||||
|
@ -52,22 +58,7 @@
|
|||
|
||||
}).done(function (result) {
|
||||
|
||||
var html = LibraryBrowser.getPosterViewHtml({
|
||||
|
||||
items: result.Items,
|
||||
shape: "auto",
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
centerText: true,
|
||||
coverImage: true,
|
||||
lazy: true,
|
||||
overlayMoreButton: true
|
||||
|
||||
});
|
||||
|
||||
var elem = page.querySelector('.upcomingProgramItems');
|
||||
elem.innerHTML = html;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
renderItems(page, result.Items, 'upcomingProgramItems');
|
||||
});
|
||||
|
||||
ApiClient.getLiveTvRecommendedPrograms({
|
||||
|
@ -75,25 +66,12 @@
|
|||
userId: Dashboard.getCurrentUserId(),
|
||||
IsAiring: false,
|
||||
HasAired: false,
|
||||
limit: 8,
|
||||
limit: getLimit(),
|
||||
IsMovie: true
|
||||
|
||||
}).done(function (result) {
|
||||
|
||||
var html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "portrait",
|
||||
showTitle: true,
|
||||
centerText: true,
|
||||
coverImage: true,
|
||||
overlayText: false,
|
||||
lazy: true,
|
||||
overlayMoreButton: true
|
||||
});
|
||||
|
||||
var elem = page.querySelector('.upcomingTvMovieItems');
|
||||
elem.innerHTML = html;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
renderItems(page, result.Items, 'upcomingTvMovieItems', null, getPortraitShape());
|
||||
});
|
||||
|
||||
ApiClient.getLiveTvRecommendedPrograms({
|
||||
|
@ -101,25 +79,12 @@
|
|||
userId: Dashboard.getCurrentUserId(),
|
||||
IsAiring: false,
|
||||
HasAired: false,
|
||||
limit: 8,
|
||||
limit: getLimit(),
|
||||
IsSports: true
|
||||
|
||||
}).done(function (result) {
|
||||
|
||||
var html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "auto",
|
||||
showTitle: true,
|
||||
centerText: true,
|
||||
coverImage: true,
|
||||
overlayText: false,
|
||||
lazy: true,
|
||||
overlayMoreButton: true
|
||||
});
|
||||
|
||||
var elem = page.querySelector('.upcomingSportsItems');
|
||||
elem.innerHTML = html;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
renderItems(page, result.Items, 'upcomingSportsItems');
|
||||
});
|
||||
|
||||
ApiClient.getLiveTvRecommendedPrograms({
|
||||
|
@ -127,26 +92,42 @@
|
|||
userId: Dashboard.getCurrentUserId(),
|
||||
IsAiring: false,
|
||||
HasAired: false,
|
||||
limit: 8,
|
||||
limit: getLimit(),
|
||||
IsKids: true
|
||||
|
||||
}).done(function (result) {
|
||||
|
||||
renderItems(page, result.Items, 'upcomingKidsItems');
|
||||
});
|
||||
}
|
||||
|
||||
function renderItems(page, items, sectionClass, overlayButton, shape) {
|
||||
|
||||
var html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "auto",
|
||||
items: items,
|
||||
shape: shape || (enableScrollX() ? getSquareShape() : 'auto'),
|
||||
showTitle: true,
|
||||
centerText: true,
|
||||
coverImage: true,
|
||||
overlayText: false,
|
||||
lazy: true,
|
||||
overlayMoreButton: true
|
||||
overlayMoreButton: overlayButton != 'play',
|
||||
overlayPlayButton: overlayButton == 'play'
|
||||
});
|
||||
|
||||
var elem = page.querySelector('.upcomingKidsItems');
|
||||
var elem = page.querySelector('.' + sectionClass);
|
||||
|
||||
elem.innerHTML = html;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
});
|
||||
}
|
||||
|
||||
function initSuggestedTab(page, tabContent) {
|
||||
|
||||
if (enableScrollX()) {
|
||||
$('.itemsContainer', tabContent).addClass('hiddenScrollX').createCardMenus();
|
||||
} else {
|
||||
$('.itemsContainer', tabContent).removeClass('hiddenScrollX').createCardMenus();
|
||||
}
|
||||
}
|
||||
|
||||
function renderSuggestedTab(page, tabContent) {
|
||||
|
@ -168,6 +149,7 @@
|
|||
|
||||
case 0:
|
||||
renderMethod = 'renderSuggestedTab';
|
||||
initMethod = 'initSuggestedTab';
|
||||
break;
|
||||
case 1:
|
||||
depends.push('scripts/registrationservices');
|
||||
|
@ -225,7 +207,8 @@
|
|||
});
|
||||
|
||||
window.LiveTvPage = {
|
||||
renderSuggestedTab: renderSuggestedTab
|
||||
renderSuggestedTab: renderSuggestedTab,
|
||||
initSuggestedTab: initSuggestedTab
|
||||
};
|
||||
|
||||
})(jQuery, document);
|
|
@ -147,7 +147,13 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
if (AppInfo.hasKnownExternalPlayerSupport) {
|
||||
if (AppInfo.supportsExternalPlayers) {
|
||||
$('.fldExternalPlayer', page).show();
|
||||
} else {
|
||||
$('.fldExternalPlayer', page).hide();
|
||||
}
|
||||
|
||||
if (AppInfo.supportsExternalPlayerMenu) {
|
||||
$('.labelNativeExternalPlayers', page).show();
|
||||
$('.labelGenericExternalPlayers', page).hide();
|
||||
} else {
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
|
||||
var view = items[i];
|
||||
|
||||
if (AppInfo.isNativeApp && $.browser.safari && view.CollectionType == 'livetv') {
|
||||
continue;
|
||||
}
|
||||
|
||||
list.push(view);
|
||||
|
||||
if (view.CollectionType == 'livetv') {
|
||||
|
|
|
@ -1801,10 +1801,16 @@ var AppInfo = {};
|
|||
AppInfo.enableMovieTrailersTab = true;
|
||||
}
|
||||
|
||||
AppInfo.supportsExternalPlayers = true;
|
||||
|
||||
if (isCordova) {
|
||||
AppInfo.enableAppLayouts = true;
|
||||
AppInfo.hasKnownExternalPlayerSupport = true;
|
||||
AppInfo.supportsExternalPlayerMenu = true;
|
||||
AppInfo.isNativeApp = true;
|
||||
|
||||
if (isIOS) {
|
||||
AppInfo.supportsExternalPlayers = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
AppInfo.enableFooterNotifications = true;
|
||||
|
@ -1824,6 +1830,8 @@ var AppInfo = {};
|
|||
}
|
||||
}
|
||||
|
||||
AppInfo.supportsDownloading = !AppInfo.isNativeApp || !$.browser.safari;
|
||||
|
||||
AppInfo.enableUserImage = true;
|
||||
AppInfo.hasPhysicalVolumeButtons = isCordova || isMobile;
|
||||
AppInfo.enableBackButton = isIOS && (window.navigator.standalone || AppInfo.isNativeApp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue