mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update now playing
This commit is contained in:
parent
ad38cf4783
commit
b5a723314b
23 changed files with 229 additions and 66 deletions
|
@ -98,6 +98,21 @@
|
|||
return appStorage.getItem('displayLanguage') || 'en-US';
|
||||
},
|
||||
|
||||
cameraUploadServers: function (val) {
|
||||
|
||||
if (val != null) {
|
||||
update('cameraUploadServers', val.join(','));
|
||||
}
|
||||
|
||||
val = appStorage.getItem('cameraUploadServers');
|
||||
|
||||
if (val) {
|
||||
return val.split(',');
|
||||
}
|
||||
|
||||
return [];
|
||||
},
|
||||
|
||||
displayPreferencesKey: function () {
|
||||
if (AppInfo.isNativeApp) {
|
||||
return 'Emby Mobile';
|
||||
|
|
|
@ -633,6 +633,18 @@
|
|||
});
|
||||
}
|
||||
|
||||
function enableScrollX() {
|
||||
return $.browser.mobile && AppInfo.enableAppLayouts;
|
||||
}
|
||||
|
||||
function getPortraitShape() {
|
||||
return enableScrollX() ? 'overflowPortrait' : 'detailPagePortrait';
|
||||
}
|
||||
|
||||
function getSquareShape() {
|
||||
return enableScrollX() ? 'overflowSquare' : 'detailPageSquare';
|
||||
}
|
||||
|
||||
function renderSimilarItems(page, item, context) {
|
||||
|
||||
if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "Series" || item.Type == "Program" || item.Type == "Recording" || item.Type == "Game" || item.Type == "MusicAlbum" || item.Type == "MusicArtist" || item.Type == "ChannelVideoItem") {
|
||||
|
@ -643,7 +655,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
var shape = item.Type == "MusicAlbum" || item.Type == "MusicArtist" ? "detailPageSquare" : "detailPagePortrait";
|
||||
var shape = item.Type == "MusicAlbum" || item.Type == "MusicArtist" ? getSquareShape() : getPortraitShape();
|
||||
var screenWidth = $(window).width();
|
||||
var screenHeight = $(window).height();
|
||||
|
||||
|
@ -657,6 +669,10 @@
|
|||
options.limit *= 2;
|
||||
}
|
||||
|
||||
if (enableScrollX()) {
|
||||
options.limit = 12;
|
||||
}
|
||||
|
||||
ApiClient.getSimilarItems(item.Id, options).done(function (result) {
|
||||
|
||||
if (!result.Items.length) {
|
||||
|
@ -669,7 +685,14 @@
|
|||
|
||||
$('.similiarHeader', elem).html(Globalize.translate('HeaderIfYouLikeCheckTheseOut', item.Name));
|
||||
|
||||
var html = LibraryBrowser.getPosterViewHtml({
|
||||
var html = '';
|
||||
|
||||
if (enableScrollX()) {
|
||||
html += '<div class="hiddenScrollX itemsContainer">';
|
||||
} else {
|
||||
html += '<div class="itemsContainer">';
|
||||
}
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: shape,
|
||||
showParentTitle: item.Type == "MusicAlbum",
|
||||
|
@ -682,6 +705,7 @@
|
|||
coverImage: item.Type == "MusicAlbum" || item.Type == "MusicArtist",
|
||||
overlayPlayButton: true
|
||||
});
|
||||
html += '</div>';
|
||||
|
||||
$('#similarContent', page).html(html).lazyChildren().createCardMenus();
|
||||
});
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
options.enableBackgroundTransfer = true;
|
||||
}
|
||||
|
||||
options.cameraUploadServers = AppSettings.cameraUploadServers();
|
||||
|
||||
syncPromise = new MediaBrowser.MultiServerSync(ConnectionManager).sync(options).done(function () {
|
||||
|
||||
syncPromise = null;
|
||||
|
|
|
@ -6,6 +6,17 @@
|
|||
page.querySelector('#chkWifi').checked = AppSettings.syncOnlyOnWifi();
|
||||
page.querySelector('#chkSyncLosslessAudio').checked = AppSettings.syncLosslessAudio();
|
||||
|
||||
var uploadServers = AppSettings.cameraUploadServers();
|
||||
|
||||
page.querySelector('.uploadServerList').innerHTML = ConnectionManager.getSavedServers().map(function (s) {
|
||||
|
||||
var checkedHtml = uploadServers.indexOf(s.Id) == -1 ? '' : ' checked';
|
||||
var html = '<paper-checkbox' + checkedHtml + ' class="chkUploadServer" data-id="' + s.Id + '">' + s.Name + '</paper-checkbox>';
|
||||
|
||||
return html;
|
||||
|
||||
}).join('');
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
|
|
|
@ -775,20 +775,37 @@
|
|||
var tabs = page.querySelector('paper-tabs');
|
||||
|
||||
if (AppInfo.enableNowPlayingPageBottomTabs) {
|
||||
tabs.alignBottom = true;
|
||||
tabs.classList.add('bottom');
|
||||
tabs.classList.remove('hide');
|
||||
//page.classList.add('noSecondaryNavPage');
|
||||
} else {
|
||||
tabs.classList.remove('bottom');
|
||||
tabs.classList.add('hide');
|
||||
//page.classList.remove('noSecondaryNavPage');
|
||||
}
|
||||
|
||||
tabs.classList.add('bottom');
|
||||
tabs.alignBottom = true;
|
||||
LibraryBrowser.configureSwipeTabs(page, tabs, page.querySelectorAll('neon-animated-pages')[0]);
|
||||
|
||||
$(tabs).on('iron-select', function () {
|
||||
page.querySelector('neon-animated-pages').selected = this.selected;
|
||||
});
|
||||
|
||||
$(page.querySelector('neon-animated-pages')).on('iron-select', function () {
|
||||
var btn = page.querySelector('.libraryViewNav a.ui-btn-active');
|
||||
|
||||
if (btn) {
|
||||
btn.classList.remove('ui-btn-active');
|
||||
}
|
||||
|
||||
page.querySelector('.libraryViewNav a[data-index=\'' + this.selected + '\']').classList.add('ui-btn-active');
|
||||
});
|
||||
|
||||
$(page.querySelectorAll('.libraryViewNav a')).on('click', function () {
|
||||
var newSelected = this.getAttribute('data-index');
|
||||
tabs.selected = newSelected;
|
||||
page.querySelector('neon-animated-pages').selected = newSelected;
|
||||
});
|
||||
|
||||
$(MediaController).on('playerchange', function () {
|
||||
updateCastIcon(page);
|
||||
});
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
|
||||
if (createIfNeeded && !elem) {
|
||||
|
||||
var html = '<div class="searchResultsOverlay ui-body-b smoothScrollY">';
|
||||
var html = '<div class="searchResultsOverlay ui-body-b smoothScrollY background-theme-b">';
|
||||
|
||||
html += '<div class="searchResultsContainer"><div class="itemsContainer"></div></div></div>';
|
||||
|
||||
|
|
|
@ -1729,6 +1729,7 @@ var AppInfo = {};
|
|||
AppInfo.enableCustomHomeSections = true;
|
||||
AppInfo.enableHomeTabs = true;
|
||||
AppInfo.enableNowPlayingPageBottomTabs = true;
|
||||
AppInfo.enableNowPlayingPageBottomTabs = false;
|
||||
|
||||
AppInfo.enableAppStorePolicy = isCordova;
|
||||
|
||||
|
@ -1776,7 +1777,6 @@ var AppInfo = {};
|
|||
AppInfo.enableMovieTrailersTab = true;
|
||||
}
|
||||
|
||||
AppInfo.enableAppLayouts = true;
|
||||
if (isCordova) {
|
||||
AppInfo.enableAppLayouts = true;
|
||||
AppInfo.hasKnownExternalPlayerSupport = true;
|
||||
|
@ -1946,6 +1946,7 @@ var AppInfo = {};
|
|||
Dashboard.importCss('themes/ios.css');
|
||||
}
|
||||
}
|
||||
Dashboard.importCss('themes/ios.css');
|
||||
|
||||
if ($.browser.msie && $.browser.tv && ($.browser.version || 11) <= 10) {
|
||||
Dashboard.importCss('thirdparty/paper-ie10.css');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue