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
fc4068bdcc
commit
7d89bd22b9
17 changed files with 312 additions and 59 deletions
|
@ -8,9 +8,9 @@
|
|||
|
||||
var deferred = DeferredBuilder.Deferred();
|
||||
|
||||
connectionManager.getAvailableServers().done(function (result) {
|
||||
syncNext(result, 0, options, deferred);
|
||||
});
|
||||
var servers = connectionManager.getSavedServers();
|
||||
|
||||
syncNext(servers, 0, options, deferred);
|
||||
|
||||
return deferred.promise();
|
||||
};
|
||||
|
|
|
@ -25,14 +25,14 @@
|
|||
"web-component-tester": "*",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/PolymerElements/iron-meta",
|
||||
"homepage": "https://github.com/polymerelements/iron-meta",
|
||||
"_release": "1.0.3",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.3",
|
||||
"commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-meta.git",
|
||||
"_source": "git://github.com/polymerelements/iron-meta.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-meta"
|
||||
"_originalSource": "polymerelements/iron-meta"
|
||||
}
|
|
@ -42,7 +42,7 @@
|
|||
"tag": "v1.0.4",
|
||||
"commit": "a7ac7fbdb79b4d82416ec9b41613575386d0d226"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/paper-behaviors.git",
|
||||
"_source": "git://github.com/PolymerElements/paper-behaviors.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/paper-behaviors"
|
||||
"_originalSource": "PolymerElements/paper-behaviors"
|
||||
}
|
8
dashboard-ui/cordova/ios/backgroundfetch.js
vendored
8
dashboard-ui/cordova/ios/backgroundfetch.js
vendored
|
@ -7,7 +7,7 @@
|
|||
var fetcher = window.BackgroundFetch;
|
||||
|
||||
fetcher.configure(onBackgroundFetch, onBackgroundFetchFailed, {
|
||||
stopOnTerminate: false // <-- false is default
|
||||
stopOnTerminate: true // <-- false is default
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -55,20 +55,20 @@
|
|||
Logger.log('- BackgroundFetch failed');
|
||||
}
|
||||
|
||||
var syncInterval = 3600000;
|
||||
var syncInterval = 1800000;
|
||||
|
||||
function restartInterval() {
|
||||
|
||||
setInterval(function () {
|
||||
|
||||
startSync();
|
||||
//startSync();
|
||||
|
||||
}, syncInterval);
|
||||
|
||||
if (lastStart > 0 && (new Date().getTime() - lastStart) >= syncInterval) {
|
||||
|
||||
setTimeout(function () {
|
||||
startSync();
|
||||
//startSync();
|
||||
|
||||
}, 5000);
|
||||
}
|
||||
|
|
71
dashboard-ui/cordova/localassetmanager.js
vendored
71
dashboard-ui/cordova/localassetmanager.js
vendored
|
@ -474,7 +474,74 @@
|
|||
|
||||
function downloadFile(url, localPath, enableBackground) {
|
||||
|
||||
return downloadWithFileTransfer(url, localPath, enableBackground);
|
||||
if (!enableBackground) {
|
||||
return downloadWithFileTransfer(url, localPath);
|
||||
}
|
||||
|
||||
var deferred = DeferredBuilder.Deferred();
|
||||
|
||||
if (localStorage.getItem('sync-' + url) == '1') {
|
||||
Logger.log('file was downloaded previously');
|
||||
deferred.resolveWith(null, [localPath]);
|
||||
return deferred.promise();
|
||||
}
|
||||
|
||||
Logger.log('downloading: ' + url + ' to ' + localPath);
|
||||
|
||||
createDirectory(getParentDirectoryPath(localPath)).done(function () {
|
||||
|
||||
resolveFile(localPath, { create: true }, function (targetFile) {
|
||||
|
||||
var downloader = new BackgroundTransfer.BackgroundDownloader();
|
||||
// Create a new download operation.
|
||||
var download = downloader.createDownload(url, targetFile);
|
||||
|
||||
var isResolved = false;
|
||||
|
||||
// Give it a short period of time to see if it has already been completed before. Either way, move on and resolve it.
|
||||
var timeoutHandle = setTimeout(function () {
|
||||
|
||||
isResolved = true;
|
||||
// true indicates that it's queued
|
||||
deferred.resolveWith(null, [localPath, true]);
|
||||
}, 1000);
|
||||
|
||||
// Start the download and persist the promise to be able to cancel the download.
|
||||
download.startAsync().then(function () {
|
||||
|
||||
clearTimeout(timeoutHandle);
|
||||
// on success
|
||||
Logger.log('Downloaded local url: ' + localPath);
|
||||
if (isResolved) {
|
||||
// If we've already moved on, set this property so that we'll see it later
|
||||
localStorage.setItem('sync-' + url, '1');
|
||||
} else {
|
||||
// true indicates that it's queued
|
||||
deferred.resolveWith(null, [localPath, false]);
|
||||
}
|
||||
|
||||
}, function () {
|
||||
|
||||
clearTimeout(timeoutHandle);
|
||||
|
||||
// on error
|
||||
Logger.log('Error downloading url: ' + url);
|
||||
|
||||
if (!isResolved) {
|
||||
deferred.reject();
|
||||
}
|
||||
|
||||
}, function (value) {
|
||||
|
||||
// on progress
|
||||
//Logger.log('download progress: ' + value);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}).fail(getOnFail(deferred));;
|
||||
|
||||
return deferred.promise();
|
||||
}
|
||||
|
||||
var activeDownloads = [];
|
||||
|
@ -549,7 +616,7 @@
|
|||
// true indicates that it's queued
|
||||
deferred.resolveWith(null, [localPath, isQueued]);
|
||||
}
|
||||
}, 2000);
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
}, function () {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -308,10 +308,6 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.libraryViewNav a:not(.ui-btn-active):hover {
|
||||
color: #2ad;
|
||||
}
|
||||
|
||||
@media all and (max-width: 400px) {
|
||||
|
||||
.libraryMenuButtonText {
|
||||
|
|
|
@ -774,6 +774,13 @@ textarea {
|
|||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@media all and (max-height: 800px) {
|
||||
|
||||
.header {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.btnCurrentUser {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
@ -1585,9 +1592,9 @@ progress {
|
|||
margin: 0 0 3em 0;
|
||||
}
|
||||
|
||||
.syncActivityForTarget paper-fab {
|
||||
.syncActivityForTarget paper-fab {
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 800px) {
|
||||
|
||||
|
|
|
@ -144,13 +144,15 @@
|
|||
</h1>
|
||||
<div>
|
||||
<p id="awardSummary"></p>
|
||||
<div id="criticRatingSummary" class="criticReview criticRatingSummary" style="display: none;">
|
||||
<p style="margin: 0 0 .5em -40px; font-weight: bold;">TOMATOMETER®</p>
|
||||
<div class="reviewScore">
|
||||
<img src="css/images/fresh.png">
|
||||
</div>
|
||||
<div class="paperList" id="criticRatingSummary">
|
||||
<paper-icon-item>
|
||||
<paper-fab class="listAvatar" style="background-color: transparent; background-repeat: no-repeat; background-position: center center; background-size: cover; background-image: url(css/images/fresh.png);" item-icon></paper-fab>
|
||||
<paper-item-body three-line>
|
||||
<div>TOMATOMETER®</div>
|
||||
<div class="criticRatingScore"></div>
|
||||
<div class="criticRatingSummaryText"></div>
|
||||
<div class="criticRatingSummaryText" style="white-space: normal;" secondary></div>
|
||||
</paper-item-body>
|
||||
</paper-icon-item>
|
||||
</div>
|
||||
<div id="criticReviewsContent"></div>
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<body>
|
||||
<div id="nowPlayingPage" data-role="page" class="page libraryPage nowPlayingPage noSecondaryNavPage" data-contextname="${TitleRemoteControl}" data-theme="b" data-require="jqmcollapsible,scripts/nowplayingpage">
|
||||
|
||||
<div class="libraryViewNav">
|
||||
<div class="libraryViewNav hide">
|
||||
<div>
|
||||
<a href="#" data-index="0">${TabNowPlaying}</a>
|
||||
<a href="#" data-index="1">${TabControls}</a>
|
||||
|
|
|
@ -370,7 +370,7 @@
|
|||
$('#castCollapsible', page).hide();
|
||||
} else {
|
||||
$('#castCollapsible', page).show();
|
||||
renderCast(page, item, context, 6);
|
||||
renderCast(page, item, context, enableScrollX() ? null : 6);
|
||||
}
|
||||
|
||||
if (item.PartCount && item.PartCount > 1) {
|
||||
|
@ -645,6 +645,10 @@
|
|||
return enableScrollX() ? 'overflowSquare' : 'detailPageSquare';
|
||||
}
|
||||
|
||||
function getThumbShape() {
|
||||
return enableScrollX() ? 'overflowBackdrop' : 'detailPage169';
|
||||
}
|
||||
|
||||
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") {
|
||||
|
@ -1271,6 +1275,13 @@
|
|||
|
||||
var maxWidth = LibraryBrowser.getPosterViewInfo().backdropWidth;
|
||||
|
||||
if (enableScrollX()) {
|
||||
html += '<div class="hiddenScrollX itemsContainer">';
|
||||
limit = null;
|
||||
} else {
|
||||
html += '<div class="itemsContainer">';
|
||||
}
|
||||
|
||||
for (var i = 0, length = chapters.length; i < length; i++) {
|
||||
|
||||
if (limit && i >= limit) {
|
||||
|
@ -1282,7 +1293,7 @@
|
|||
|
||||
var onclick = item.PlayAccess == 'Full' && !isStatic ? ' onclick="ItemDetailPage.play(' + chapter.StartPositionTicks + ');"' : '';
|
||||
|
||||
html += '<a class="card detailPage169Card" href="#play-Chapter-' + i + '"' + onclick + '>';
|
||||
html += '<a class="card '+getThumbShape()+'Card" href="#play-Chapter-' + i + '"' + onclick + '>';
|
||||
|
||||
html += '<div class="cardBox">';
|
||||
html += '<div class="cardScalable">';
|
||||
|
@ -1327,6 +1338,8 @@
|
|||
html += '</a>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
|
||||
if (limit && chapters.length > limit) {
|
||||
html += '<p style="margin: 0;"><paper-button raised class="more moreScenes">' + Globalize.translate('ButtonMore') + '</paper-button></p>';
|
||||
}
|
||||
|
@ -1582,6 +1595,11 @@
|
|||
|
||||
function renderCast(page, item, context, limit, isStatic) {
|
||||
|
||||
if (enableScrollX()) {
|
||||
renderHorizontalCast(page, item, context, isStatic);
|
||||
return;
|
||||
}
|
||||
|
||||
var html = '';
|
||||
|
||||
var casts = item.People || [];
|
||||
|
@ -1654,6 +1672,153 @@
|
|||
ImageLoader.lazyChildren(castContent);
|
||||
}
|
||||
|
||||
function renderHorizontalCast(page, item, context, isStatic) {
|
||||
|
||||
var html = '';
|
||||
|
||||
if (enableScrollX()) {
|
||||
html += '<div class="hiddenScrollX itemsContainer">';
|
||||
} else {
|
||||
html += '<div class="itemsContainer">';
|
||||
}
|
||||
|
||||
var casts = item.People || [];
|
||||
|
||||
casts = casts.filter(function (c) {
|
||||
|
||||
return c.PrimaryImageTag;
|
||||
});
|
||||
|
||||
for (var i = 0, length = casts.length; i < length; i++) {
|
||||
|
||||
var cast = casts[i];
|
||||
var href = isStatic ? '#' : 'itemdetails.html?id=' + cast.Id + '';
|
||||
|
||||
html += '<div class="card ' + getPortraitShape() + 'Card">';
|
||||
|
||||
html += '<div class="cardBox">';
|
||||
html += '<div class="cardScalable">';
|
||||
|
||||
var imgUrl;
|
||||
var lazy = true;
|
||||
|
||||
if (cast.PrimaryImageTag) {
|
||||
|
||||
imgUrl = ApiClient.getScaledImageUrl(cast.Id, {
|
||||
width: 100,
|
||||
tag: cast.PrimaryImageTag,
|
||||
type: "primary",
|
||||
minScale: 2
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
imgUrl = "css/images/items/list/person.png";
|
||||
lazy = false;
|
||||
}
|
||||
|
||||
html += '<div class="cardPadder"></div>';
|
||||
|
||||
html += '<a class="cardContent" href="' + href + '">';
|
||||
if (lazy) {
|
||||
html += '<div class="cardImage coveredCardImage lazy" data-src="' + imgUrl + '"></div>';
|
||||
} else {
|
||||
html += '<div class="cardImage" style="background-image:url(\'' + imgUrl + '\');"></div>';
|
||||
}
|
||||
|
||||
//cardFooter
|
||||
html += "</div>";
|
||||
|
||||
// cardContent
|
||||
html += '</a>';
|
||||
|
||||
// cardScalable
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="cardFooter outerCardFooter">';
|
||||
html += '<div class="cardText">' + cast.Name + '</div>';
|
||||
html += '<div class="cardText">';
|
||||
|
||||
var role = cast.Role ? Globalize.translate('ValueAsRole', cast.Role) : cast.Type;
|
||||
|
||||
if (role == "GuestStar") {
|
||||
role = Globalize.translate('ValueGuestStar');
|
||||
}
|
||||
|
||||
role = role || "";
|
||||
|
||||
var maxlength = 40;
|
||||
|
||||
if (role.length > maxlength) {
|
||||
role = role.substring(0, maxlength - 3) + '...';
|
||||
}
|
||||
|
||||
html += role;
|
||||
html += '</div>';
|
||||
|
||||
// cardBox
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
//html += '<a class="tileItem smallPosterTileItem" href="' + href + '">';
|
||||
|
||||
//var imgUrl;
|
||||
//var lazy = true;
|
||||
|
||||
//if (cast.PrimaryImageTag) {
|
||||
|
||||
// imgUrl = ApiClient.getScaledImageUrl(cast.Id, {
|
||||
// width: 100,
|
||||
// tag: cast.PrimaryImageTag,
|
||||
// type: "primary",
|
||||
// minScale: 2
|
||||
// });
|
||||
|
||||
//} else {
|
||||
|
||||
// imgUrl = "css/images/items/list/person.png";
|
||||
// lazy = false;
|
||||
//}
|
||||
|
||||
//if (lazy) {
|
||||
// html += '<div class="tileImage lazy" data-src="' + imgUrl + '"></div>';
|
||||
//} else {
|
||||
// html += '<div class="tileImage" style="background-image:url(\'' + imgUrl + '\');"></div>';
|
||||
//}
|
||||
|
||||
//html += '<div class="tileContent">';
|
||||
|
||||
//html += '<p>' + cast.Name + '</p>';
|
||||
|
||||
//var role = cast.Role ? Globalize.translate('ValueAsRole', cast.Role) : cast.Type;
|
||||
|
||||
//if (role == "GuestStar") {
|
||||
// role = Globalize.translate('ValueGuestStar');
|
||||
//}
|
||||
|
||||
//role = role || "";
|
||||
|
||||
//var maxlength = 40;
|
||||
|
||||
//if (role.length > maxlength) {
|
||||
// role = role.substring(0, maxlength - 3) + '...';
|
||||
//}
|
||||
|
||||
//html += '<p>' + role + '</p>';
|
||||
|
||||
//html += '</div>';
|
||||
|
||||
//html += '</a>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
|
||||
var castContent = page.querySelector('#castContent');
|
||||
castContent.innerHTML = html;
|
||||
ImageLoader.lazyChildren(castContent);
|
||||
}
|
||||
|
||||
function play(startPosition) {
|
||||
|
||||
MediaController.play({
|
||||
|
|
|
@ -26,6 +26,15 @@
|
|||
AppSettings.syncOnlyOnWifi(page.querySelector('#chkWifi').checked);
|
||||
AppSettings.syncLosslessAudio(page.querySelector('#chkSyncLosslessAudio').checked);
|
||||
|
||||
AppSettings.cameraUploadServers($(".chkUploadServer", page).get().filter(function (i) {
|
||||
|
||||
return i.checked;
|
||||
|
||||
}).map(function (i) {
|
||||
|
||||
return i.getAttribute('data-id');
|
||||
}));
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
||||
}
|
||||
|
|
|
@ -776,8 +776,10 @@
|
|||
|
||||
if (AppInfo.enableNowPlayingPageBottomTabs) {
|
||||
tabs.classList.remove('hide');
|
||||
page.querySelector('.libraryViewNav').classList.add('hide');
|
||||
} else {
|
||||
tabs.classList.add('hide');
|
||||
page.querySelector('.libraryViewNav').classList.remove('hide');
|
||||
}
|
||||
|
||||
tabs.classList.add('bottom');
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
.viewMenuBar, .libraryViewNav:not(.paperLibraryViewNav), paper-tabs {
|
||||
background-color: #1b1b1b;
|
||||
background-color: #101010;
|
||||
}
|
||||
|
||||
.viewMenuBar.semiTransparent {
|
||||
background-color: rgba(27, 27, 27, .6);
|
||||
background-color: rgba(15, 15, 15, .50);
|
||||
}
|
||||
|
||||
.background-theme-b {
|
||||
background-color: #2b2b2b;
|
||||
background-color: #202020;
|
||||
}
|
||||
|
||||
.backdropContainer .pageBackground {
|
||||
|
@ -15,7 +15,7 @@
|
|||
}
|
||||
|
||||
.defaultBackground .cardImage {
|
||||
background-color: #383838;
|
||||
background-color: #303030;
|
||||
}
|
||||
|
||||
.ui-body-b .visualCardBox {
|
||||
|
@ -29,3 +29,8 @@
|
|||
paper-tab {
|
||||
font-weight: 500 !important;
|
||||
}
|
||||
|
||||
|
||||
.libraryViewNav .ui-btn-active {
|
||||
border-bottom-color: #52B54B !important;
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ body {
|
|||
}
|
||||
|
||||
.libraryViewNav .ui-btn-active, .libraryViewNav .iron-selected, .btnActiveCast {
|
||||
color: #007AFF !important;
|
||||
color: #52B54B !important;
|
||||
}
|
||||
|
||||
.channelTimeslotHeader {
|
||||
|
|
20
dashboard-ui/thirdparty/jquery.unveil-custom.js
vendored
20
dashboard-ui/thirdparty/jquery.unveil-custom.js
vendored
|
@ -94,7 +94,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
function unveilElements(elems) {
|
||||
function unveilElements(elems, parent) {
|
||||
|
||||
if (!elems.length) {
|
||||
return;
|
||||
|
@ -105,6 +105,14 @@
|
|||
unveilId++;
|
||||
var eventNamespace = 'unveil' + unveilId;
|
||||
|
||||
var parents = [];
|
||||
if (parent) {
|
||||
parents = parent.querySelectorAll('.itemsContainer');
|
||||
if (!parents.length) {
|
||||
parents = [parent];
|
||||
}
|
||||
}
|
||||
|
||||
function unveil() {
|
||||
|
||||
var remaining = [];
|
||||
|
@ -123,12 +131,20 @@
|
|||
if (!images.length) {
|
||||
Events.off(document, 'scroll.' + eventNamespace);
|
||||
Events.off(window, 'resize.' + eventNamespace);
|
||||
|
||||
if (parents.length) {
|
||||
Events.off($(parents), 'scroll.' + eventNamespace, unveil);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Events.on(document, 'scroll.' + eventNamespace, unveil);
|
||||
Events.on(window, 'resize.' + eventNamespace, unveil);
|
||||
|
||||
if (parents.length) {
|
||||
Events.on($(parents), 'scroll.' + eventNamespace, unveil);
|
||||
}
|
||||
|
||||
unveil();
|
||||
}
|
||||
|
||||
|
@ -146,7 +162,7 @@
|
|||
|
||||
function lazyChildren(elem) {
|
||||
|
||||
unveilElements(elem.getElementsByClassName('lazy'));
|
||||
unveilElements(elem.getElementsByClassName('lazy'), elem);
|
||||
}
|
||||
|
||||
$.fn.lazyChildren = function () {
|
||||
|
|
|
@ -261,11 +261,11 @@ paper-tab {
|
|||
}
|
||||
|
||||
paper-tabs #selectionBar {
|
||||
background-color: #38c !important;
|
||||
background-color: #52B54B !important;
|
||||
}
|
||||
|
||||
paper-tabs paper-ripple {
|
||||
color: #38c !important;
|
||||
color: #52B54B !important;
|
||||
}
|
||||
|
||||
paper-fab {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue