mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
commit
5075df30c0
19 changed files with 302 additions and 273 deletions
|
@ -16,12 +16,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.3.45",
|
"version": "1.3.49",
|
||||||
"_release": "1.3.45",
|
"_release": "1.3.49",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.3.45",
|
"tag": "1.3.49",
|
||||||
"commit": "dbaa46e3aa38a939b82f305c61e875e1a30da2fe"
|
"commit": "9838b499815bcaf95d4d50c4476c3b95173ffc30"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.0",
|
"_target": "^1.2.0",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events'], function (visibleinviewport, imageFetcher, layoutManager, events) {
|
define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events', 'browser'], function (visibleinviewport, imageFetcher, layoutManager, events, browser) {
|
||||||
|
|
||||||
var thresholdX;
|
var thresholdX;
|
||||||
var thresholdY;
|
var thresholdY;
|
||||||
|
@ -88,12 +88,64 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events'], functio
|
||||||
target.addEventListener(type, handler, optionsOrCapture);
|
target.addEventListener(type, handler, optionsOrCapture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function unveilWithIntersection(images) {
|
||||||
|
|
||||||
|
var filledCount = 0;
|
||||||
|
|
||||||
|
var observer = new IntersectionObserver(function (entries) {
|
||||||
|
for (var j = 0, length2 = entries.length; j < length2; j++) {
|
||||||
|
var entry = entries[j];
|
||||||
|
var intersectionRatio = entry.intersectionRatio;
|
||||||
|
if (intersectionRatio) {
|
||||||
|
|
||||||
|
var target = entry.target;
|
||||||
|
observer.unobserve(target);
|
||||||
|
fillImage(target);
|
||||||
|
filledCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filledCount >= images.length) {
|
||||||
|
//observer.disconnect();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
/* Using default options. Details below */
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// Start observing an element
|
||||||
|
for (var i = 0, length = images.length; i < length; i++) {
|
||||||
|
observer.observe(images[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var supportsIntersectionObserver = function () {
|
||||||
|
|
||||||
|
if (window.IntersectionObserver) {
|
||||||
|
|
||||||
|
// The api exists in chrome 50 but doesn't work
|
||||||
|
if (browser.chrome) {
|
||||||
|
|
||||||
|
var version = parseInt(browser.version.split('.')[0]);
|
||||||
|
return version >= 51;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}();
|
||||||
|
|
||||||
function unveilElements(images) {
|
function unveilElements(images) {
|
||||||
|
|
||||||
if (!images.length) {
|
if (!images.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (supportsIntersectionObserver) {
|
||||||
|
unveilWithIntersection(images);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var filledImages = [];
|
var filledImages = [];
|
||||||
var cancellationTokens = [];
|
var cancellationTokens = [];
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,14 @@ define(['apphost', 'globalize', 'connectionManager'], function (appHost, globali
|
||||||
|
|
||||||
var commands = [];
|
var commands = [];
|
||||||
|
|
||||||
if (item.CanDownload && user.Policy.EnableContentDownloading && appHost.supports('filedownload')) {
|
if (item.CanDelete) {
|
||||||
|
commands.push({
|
||||||
|
name: globalize.translate('sharedcomponents#Delete'),
|
||||||
|
id: 'delete'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.CanDownload && appHost.supports('filedownload')) {
|
||||||
commands.push({
|
commands.push({
|
||||||
name: globalize.translate('sharedcomponents#Download'),
|
name: globalize.translate('sharedcomponents#Download'),
|
||||||
id: 'download'
|
id: 'download'
|
||||||
|
@ -69,6 +76,14 @@ define(['apphost', 'globalize', 'connectionManager'], function (appHost, globali
|
||||||
case 'refresh':
|
case 'refresh':
|
||||||
{
|
{
|
||||||
refresh(apiClient, itemId);
|
refresh(apiClient, itemId);
|
||||||
|
reject();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'delete':
|
||||||
|
{
|
||||||
|
deleteItem(apiClient, itemId).then(function () {
|
||||||
|
resolve(true);
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'share':
|
case 'share':
|
||||||
|
@ -83,11 +98,33 @@ define(['apphost', 'globalize', 'connectionManager'], function (appHost, globali
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
reject();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function deleteItem(apiClient, itemId) {
|
||||||
|
|
||||||
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
|
var msg = globalize.translate('sharedcomponents#ConfirmDeleteItem');
|
||||||
|
var title = globalize.translate('sharedcomponents#HeaderDeleteItem');
|
||||||
|
|
||||||
|
require(['confirm'], function (confirm) {
|
||||||
|
|
||||||
|
confirm(msg, title).then(function () {
|
||||||
|
|
||||||
|
apiClient.deleteItem(itemId).then(function () {
|
||||||
|
resolve(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
}, reject);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function refresh(apiClient, itemId) {
|
function refresh(apiClient, itemId) {
|
||||||
|
|
||||||
apiClient.refreshItem(itemId, {
|
apiClient.refreshItem(itemId, {
|
||||||
|
@ -97,7 +134,6 @@ define(['apphost', 'globalize', 'connectionManager'], function (appHost, globali
|
||||||
MetadataRefreshMode: 'FullRefresh',
|
MetadataRefreshMode: 'FullRefresh',
|
||||||
ReplaceAllImages: false,
|
ReplaceAllImages: false,
|
||||||
ReplaceAllMetadata: true
|
ReplaceAllMetadata: true
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
require(['toast'], function (toast) {
|
require(['toast'], function (toast) {
|
||||||
|
|
|
@ -203,10 +203,10 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
|
||||||
|
|
||||||
if (!isBackNav) {
|
if (!isBackNav) {
|
||||||
// Don't force a new view for home due to the back menu
|
// Don't force a new view for home due to the back menu
|
||||||
if (route.type != 'home') {
|
//if (route.type != 'home') {
|
||||||
onNewViewNeeded();
|
onNewViewNeeded();
|
||||||
return;
|
return;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
viewManager.tryRestoreView(currentRequest).then(function () {
|
viewManager.tryRestoreView(currentRequest).then(function () {
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,9 @@
|
||||||
"Edit": "Edit",
|
"Edit": "Edit",
|
||||||
"Download": "Download",
|
"Download": "Download",
|
||||||
"Advanced": "Advanced",
|
"Advanced": "Advanced",
|
||||||
|
"Delete": "Delete",
|
||||||
|
"HeaderDeleteItem": "Delete Item",
|
||||||
|
"ConfirmDeleteItem": "Deleting this item will delete it from both the file system and your media library. Are you sure you wish to continue?",
|
||||||
"Refresh": "Refresh",
|
"Refresh": "Refresh",
|
||||||
"RefreshQueued": "Refresh queued."
|
"RefreshQueued": "Refresh queued."
|
||||||
}
|
}
|
|
@ -112,76 +112,74 @@ define(['browser'], function (browser) {
|
||||||
|
|
||||||
function slide(newAnimatedPage, oldAnimatedPage, transition, isBack) {
|
function slide(newAnimatedPage, oldAnimatedPage, transition, isBack) {
|
||||||
|
|
||||||
var timings = {
|
return new Promise(function (resolve, reject) {
|
||||||
duration: 450,
|
var timings = {
|
||||||
iterations: 1,
|
duration: 450,
|
||||||
easing: 'ease-out',
|
iterations: 1,
|
||||||
fill: 'both'
|
easing: 'ease-out'
|
||||||
}
|
}
|
||||||
|
|
||||||
var animations = [];
|
var animations = [];
|
||||||
|
|
||||||
if (oldAnimatedPage) {
|
if (oldAnimatedPage) {
|
||||||
var destination = isBack ? '100%' : '-100%';
|
var destination = isBack ? '100%' : '-100%';
|
||||||
|
|
||||||
animations.push(oldAnimatedPage.animate([
|
animations.push(oldAnimatedPage.animate([
|
||||||
|
|
||||||
{ transform: 'none', offset: 0 },
|
{ transform: 'none', offset: 0 },
|
||||||
{ transform: 'translate3d(' + destination + ', 0, 0)', offset: 1 }
|
{ transform: 'translate3d(' + destination + ', 0, 0)', offset: 1 }
|
||||||
|
|
||||||
|
], timings));
|
||||||
|
}
|
||||||
|
|
||||||
|
newAnimatedPage.classList.remove('hide');
|
||||||
|
|
||||||
|
var start = isBack ? '-100%' : '100%';
|
||||||
|
|
||||||
|
animations.push(newAnimatedPage.animate([
|
||||||
|
|
||||||
|
{ transform: 'translate3d(' + start + ', 0, 0)', offset: 0 },
|
||||||
|
{ transform: 'none', offset: 1 }
|
||||||
|
|
||||||
], timings));
|
], timings));
|
||||||
}
|
|
||||||
|
|
||||||
newAnimatedPage.classList.remove('hide');
|
currentAnimations = animations;
|
||||||
|
|
||||||
var start = isBack ? '-100%' : '100%';
|
|
||||||
|
|
||||||
animations.push(newAnimatedPage.animate([
|
|
||||||
|
|
||||||
{ transform: 'translate3d(' + start + ', 0, 0)', offset: 0 },
|
|
||||||
{ transform: 'none', offset: 1 }
|
|
||||||
|
|
||||||
], timings));
|
|
||||||
|
|
||||||
currentAnimations = animations;
|
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
|
||||||
animations[animations.length - 1].onfinish = resolve;
|
animations[animations.length - 1].onfinish = resolve;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function fade(newAnimatedPage, oldAnimatedPage, transition, isBack) {
|
function fade(newAnimatedPage, oldAnimatedPage, transition, isBack) {
|
||||||
|
|
||||||
var timings = {
|
return new Promise(function (resolve, reject) {
|
||||||
duration: 200,
|
var timings = {
|
||||||
iterations: 1,
|
duration: 200,
|
||||||
easing: 'ease-out',
|
iterations: 1,
|
||||||
fill: 'both'
|
easing: 'ease-out'
|
||||||
}
|
}
|
||||||
|
|
||||||
var animations = [];
|
var animations = [];
|
||||||
|
|
||||||
if (oldAnimatedPage) {
|
if (oldAnimatedPage) {
|
||||||
animations.push(oldAnimatedPage.animate([
|
animations.push(oldAnimatedPage.animate([
|
||||||
|
|
||||||
{ opacity: 1, offset: 0 },
|
{ opacity: 1, offset: 0 },
|
||||||
{ opacity: 0, offset: 1 }
|
{ opacity: 0, offset: 1 }
|
||||||
|
|
||||||
|
], timings));
|
||||||
|
}
|
||||||
|
|
||||||
|
newAnimatedPage.classList.remove('hide');
|
||||||
|
|
||||||
|
animations.push(newAnimatedPage.animate([
|
||||||
|
|
||||||
|
{ opacity: 0, offset: 0 },
|
||||||
|
{ opacity: 1, offset: 1 }
|
||||||
|
|
||||||
], timings));
|
], timings));
|
||||||
}
|
|
||||||
|
|
||||||
newAnimatedPage.classList.remove('hide');
|
currentAnimations = animations;
|
||||||
|
|
||||||
animations.push(newAnimatedPage.animate([
|
|
||||||
|
|
||||||
{ opacity: 0, offset: 0 },
|
|
||||||
{ opacity: 1, offset: 1 }
|
|
||||||
|
|
||||||
], timings));
|
|
||||||
|
|
||||||
currentAnimations = animations;
|
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
|
||||||
animations[animations.length - 1].onfinish = resolve;
|
animations[animations.length - 1].onfinish = resolve;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
"tag": "v1.0.11",
|
"tag": "v1.0.11",
|
||||||
"commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5"
|
"commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/paper-behaviors.git",
|
"_source": "git://github.com/polymerelements/paper-behaviors.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/paper-behaviors"
|
"_originalSource": "polymerelements/paper-behaviors"
|
||||||
}
|
}
|
|
@ -32,14 +32,14 @@
|
||||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
||||||
},
|
},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "https://github.com/PolymerElements/paper-ripple",
|
"homepage": "https://github.com/polymerelements/paper-ripple",
|
||||||
"_release": "1.0.5",
|
"_release": "1.0.5",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.5",
|
"tag": "v1.0.5",
|
||||||
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
|
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/paper-ripple.git",
|
"_source": "git://github.com/polymerelements/paper-ripple.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/paper-ripple"
|
"_originalSource": "polymerelements/paper-ripple"
|
||||||
}
|
}
|
|
@ -34,6 +34,6 @@
|
||||||
"commit": "11c987b2eb3c73b388a79fc8aaea8ca01624f514"
|
"commit": "11c987b2eb3c73b388a79fc8aaea8ca01624f514"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/Polymer/polymer.git",
|
"_source": "git://github.com/Polymer/polymer.git",
|
||||||
"_target": "^1.1.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "Polymer/polymer"
|
"_originalSource": "Polymer/polymer"
|
||||||
}
|
}
|
|
@ -413,24 +413,17 @@
|
||||||
// $(".playlist", page).html(html).lazyChildren();
|
// $(".playlist", page).html(html).lazyChildren();
|
||||||
//});
|
//});
|
||||||
|
|
||||||
var playlistOpen = isPlaylistOpen(context);
|
html += libraryBrowser.getListViewHtml({
|
||||||
|
items: MediaController.playlist(),
|
||||||
|
smallIcon: true
|
||||||
|
});
|
||||||
|
|
||||||
if (playlistOpen) {
|
playlistNeedsRefresh = false;
|
||||||
|
|
||||||
html += libraryBrowser.getListViewHtml({
|
|
||||||
items: MediaController.playlist(),
|
|
||||||
smallIcon: true
|
|
||||||
});
|
|
||||||
|
|
||||||
playlistNeedsRefresh = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var deps = [];
|
var deps = [];
|
||||||
|
|
||||||
if (playlistOpen) {
|
deps.push('paper-icon-item');
|
||||||
deps.push('paper-icon-item');
|
deps.push('paper-item-body');
|
||||||
deps.push('paper-item-body');
|
|
||||||
}
|
|
||||||
|
|
||||||
require(deps, function () {
|
require(deps, function () {
|
||||||
|
|
||||||
|
@ -438,19 +431,16 @@
|
||||||
|
|
||||||
itemsContainer.innerHTML = html;
|
itemsContainer.innerHTML = html;
|
||||||
|
|
||||||
if (playlistOpen) {
|
var index = MediaController.currentPlaylistIndex();
|
||||||
|
|
||||||
var index = MediaController.currentPlaylistIndex();
|
if (index != -1) {
|
||||||
|
|
||||||
if (index != -1) {
|
var item = itemsContainer.querySelectorAll('.listItem')[index];
|
||||||
|
if (item) {
|
||||||
|
var img = item.querySelector('.listviewImage');
|
||||||
|
|
||||||
var item = itemsContainer.querySelectorAll('.listItem')[index];
|
img.classList.remove('lazy');
|
||||||
if (item) {
|
img.classList.add('playlistIndexIndicatorImage');
|
||||||
var img = item.querySelector('.listviewImage');
|
|
||||||
|
|
||||||
img.classList.remove('lazy');
|
|
||||||
img.classList.add('playlistIndexIndicatorImage');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,10 +448,6 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function isPlaylistOpen(context) {
|
|
||||||
return libraryBrowser.selectedTab(context.querySelector('.libraryViewNav')) == 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
function onStateChanged(e, state) {
|
function onStateChanged(e, state) {
|
||||||
|
|
||||||
if (e.type == 'positionchange') {
|
if (e.type == 'positionchange') {
|
||||||
|
@ -485,11 +471,7 @@
|
||||||
|
|
||||||
onStateChanged.call(player, e, state);
|
onStateChanged.call(player, e, state);
|
||||||
|
|
||||||
if (isPlaylistOpen(dlg)) {
|
loadPlaylist(dlg);
|
||||||
loadPlaylist(dlg);
|
|
||||||
} else {
|
|
||||||
playlistNeedsRefresh = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaybackStopped(e, state) {
|
function onPlaybackStopped(e, state) {
|
||||||
|
@ -500,11 +482,7 @@
|
||||||
|
|
||||||
onStateChanged.call(player, e, {});
|
onStateChanged.call(player, e, {});
|
||||||
|
|
||||||
if (isPlaylistOpen(dlg)) {
|
loadPlaylist(dlg);
|
||||||
loadPlaylist(dlg);
|
|
||||||
} else {
|
|
||||||
playlistNeedsRefresh = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function releaseCurrentPlayer() {
|
function releaseCurrentPlayer() {
|
||||||
|
@ -824,6 +802,7 @@
|
||||||
libraryBrowser.configurePaperLibraryTabs(ownerView, mdlTabs, ownerView.querySelectorAll('.pageTabContent'));
|
libraryBrowser.configurePaperLibraryTabs(ownerView, mdlTabs, ownerView.querySelectorAll('.pageTabContent'));
|
||||||
|
|
||||||
mdlTabs.addEventListener('tabchange', function (e) {
|
mdlTabs.addEventListener('tabchange', function (e) {
|
||||||
|
|
||||||
if (e.detail.selectedTabIndex == 2 && playlistNeedsRefresh) {
|
if (e.detail.selectedTabIndex == 2 && playlistNeedsRefresh) {
|
||||||
loadPlaylist(context);
|
loadPlaylist(context);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="itemDetailPage" data-role="page" class="page libraryPage itemDetailPage noSecondaryNavPage selfBackdropPage" data-theme="b" data-require="scripts/itemdetailpage,tileitemcss,scripts/livetvcomponents,paper-fab,paper-item-body,paper-icon-item,paper-button,paper-icon-button-light">
|
<div id="itemDetailPage" data-role="page" class="page libraryPage itemDetailPage noSecondaryNavPage selfBackdropPage" data-theme="b">
|
||||||
|
|
||||||
<div id="itemBackdrop" class="itemBackdrop noBackdrop">
|
<div id="itemBackdrop" class="itemBackdrop noBackdrop">
|
||||||
<div class="itemBackdropContent">
|
<div class="itemBackdropContent">
|
||||||
|
|
|
@ -28,12 +28,7 @@
|
||||||
<div class="fieldDescription">${LabelNumberOfGuideDaysHelp}</div>
|
<div class="fieldDescription">${LabelNumberOfGuideDaysHelp}</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="paperCheckboxList">
|
|
||||||
<label>${LabelEnableInternetMetadataForTvPrograms}</label>
|
|
||||||
<paper-checkbox id="chkMovies">${OptionTVMovies}</paper-checkbox>
|
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
<br />
|
|
||||||
<paper-input id="txtRecordingPath" label="${LabelRecordingPath}" style="width:84%;display:inline-block;"></paper-input>
|
<paper-input id="txtRecordingPath" label="${LabelRecordingPath}" style="width:84%;display:inline-block;"></paper-input>
|
||||||
<button type="button" is="paper-icon-button-light" id="btnSelectRecordingPath" title="${ButtonSelectDirectory}"><iron-icon icon="search"></iron-icon></button>
|
<button type="button" is="paper-icon-button-light" id="btnSelectRecordingPath" title="${ButtonSelectDirectory}"><iron-icon icon="search"></iron-icon></button>
|
||||||
<div class="fieldDescription">${LabelRecordingPathHelp}</div>
|
<div class="fieldDescription">${LabelRecordingPathHelp}</div>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
UserId: Dashboard.getCurrentUserId(),
|
UserId: Dashboard.getCurrentUserId(),
|
||||||
ImageTypeLimit: 1,
|
ImageTypeLimit: 1,
|
||||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
||||||
EnableTotalRecordCount: 0
|
EnableTotalRecordCount: false
|
||||||
};
|
};
|
||||||
|
|
||||||
ApiClient.getJSON(ApiClient.getUrl("Shows/Upcoming", query)).then(function (result) {
|
ApiClient.getJSON(ApiClient.getUrl("Shows/Upcoming", query)).then(function (result) {
|
||||||
|
|
|
@ -2,33 +2,33 @@
|
||||||
|
|
||||||
var currentItem;
|
var currentItem;
|
||||||
|
|
||||||
function getPromise() {
|
function getPromise(params) {
|
||||||
|
|
||||||
var id = getParameterByName('id');
|
var id = params.id;
|
||||||
|
|
||||||
if (id) {
|
if (id) {
|
||||||
return ApiClient.getItem(Dashboard.getCurrentUserId(), id);
|
return ApiClient.getItem(Dashboard.getCurrentUserId(), id);
|
||||||
}
|
}
|
||||||
|
|
||||||
var name = getParameterByName('genre');
|
var name = params.genre;
|
||||||
|
|
||||||
if (name) {
|
if (name) {
|
||||||
return ApiClient.getGenre(name, Dashboard.getCurrentUserId());
|
return ApiClient.getGenre(name, Dashboard.getCurrentUserId());
|
||||||
}
|
}
|
||||||
|
|
||||||
name = getParameterByName('musicgenre');
|
name = params.musicgenre;
|
||||||
|
|
||||||
if (name) {
|
if (name) {
|
||||||
return ApiClient.getMusicGenre(name, Dashboard.getCurrentUserId());
|
return ApiClient.getMusicGenre(name, Dashboard.getCurrentUserId());
|
||||||
}
|
}
|
||||||
|
|
||||||
name = getParameterByName('gamegenre');
|
name = params.gamegenre;
|
||||||
|
|
||||||
if (name) {
|
if (name) {
|
||||||
return ApiClient.getGameGenre(name, Dashboard.getCurrentUserId());
|
return ApiClient.getGameGenre(name, Dashboard.getCurrentUserId());
|
||||||
}
|
}
|
||||||
|
|
||||||
name = getParameterByName('musicartist');
|
name = params.musicartist;
|
||||||
|
|
||||||
if (name) {
|
if (name) {
|
||||||
return ApiClient.getArtist(name, Dashboard.getCurrentUserId());
|
return ApiClient.getArtist(name, Dashboard.getCurrentUserId());
|
||||||
|
@ -38,21 +38,21 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function reload(page) {
|
function reload(page, params) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
getPromise().then(function (item) {
|
getPromise(params).then(function (item) {
|
||||||
|
|
||||||
reloadFromItem(page, item);
|
reloadFromItem(page, params, item);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function reloadFromItem(page, item) {
|
function reloadFromItem(page, params, item) {
|
||||||
|
|
||||||
currentItem = item;
|
currentItem = item;
|
||||||
|
|
||||||
var context = getContext(item);
|
var context = params.context;
|
||||||
|
|
||||||
LibraryMenu.setBackButtonVisible(true);
|
LibraryMenu.setBackButtonVisible(true);
|
||||||
LibraryMenu.setMenuButtonVisible(false);
|
LibraryMenu.setMenuButtonVisible(false);
|
||||||
|
@ -300,11 +300,6 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getContext(item) {
|
|
||||||
|
|
||||||
return getParameterByName('context');
|
|
||||||
}
|
|
||||||
|
|
||||||
function renderNextUp(page, item, user) {
|
function renderNextUp(page, item, user) {
|
||||||
|
|
||||||
var section = page.querySelector('.nextUpSection');
|
var section = page.querySelector('.nextUpSection');
|
||||||
|
@ -1935,9 +1930,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function splitVersions(page) {
|
function splitVersions(page, params) {
|
||||||
|
|
||||||
var id = getParameterByName('id');
|
|
||||||
|
|
||||||
require(['confirm'], function (confirm) {
|
require(['confirm'], function (confirm) {
|
||||||
|
|
||||||
|
@ -1947,13 +1940,13 @@
|
||||||
|
|
||||||
ApiClient.ajax({
|
ApiClient.ajax({
|
||||||
type: "DELETE",
|
type: "DELETE",
|
||||||
url: ApiClient.getUrl("Videos/" + id + "/AlternateSources")
|
url: ApiClient.getUrl("Videos/" + params.id + "/AlternateSources")
|
||||||
|
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
|
|
||||||
reload(page);
|
reload(page, params);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -2002,7 +1995,7 @@
|
||||||
LibraryBrowser.showPlayMenu(button, currentItem.Id, currentItem.Type, currentItem.IsFolder, mediaType, userdata.PlaybackPositionTicks);
|
LibraryBrowser.showPlayMenu(button, currentItem.Id, currentItem.Type, currentItem.IsFolder, mediaType, userdata.PlaybackPositionTicks);
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteTimer(page, id) {
|
function deleteTimer(page, params, id) {
|
||||||
|
|
||||||
require(['confirm'], function (confirm) {
|
require(['confirm'], function (confirm) {
|
||||||
|
|
||||||
|
@ -2016,129 +2009,12 @@
|
||||||
toast(Globalize.translate('MessageRecordingCancelled'));
|
toast(Globalize.translate('MessageRecordingCancelled'));
|
||||||
});
|
});
|
||||||
|
|
||||||
reload(page);
|
reload(page, params);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
pageIdOn('pageinit', "itemDetailPage", function () {
|
|
||||||
|
|
||||||
var page = this;
|
|
||||||
|
|
||||||
$('.btnPlay', page).on('click', function () {
|
|
||||||
playCurrentItem(this);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.btnPlayTrailer', page).on('click', function () {
|
|
||||||
playTrailer(page);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.btnSplitVersions', page).on('click', function () {
|
|
||||||
|
|
||||||
splitVersions(page);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.btnSync', page).on('click', function () {
|
|
||||||
|
|
||||||
require(['syncDialog'], function (syncDialog) {
|
|
||||||
syncDialog.showMenu({
|
|
||||||
items: [currentItem]
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.btnRecord,.btnFloatingRecord', page).on('click', function () {
|
|
||||||
|
|
||||||
var id = getParameterByName('id');
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
require(['recordingCreator'], function (recordingCreator) {
|
|
||||||
recordingCreator.show(id, currentItem.ServerId).then(function () {
|
|
||||||
reload(page);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.btnCancelRecording', page).on('click', function () {
|
|
||||||
|
|
||||||
deleteTimer(page, currentItem.TimerId);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.btnMoreCommands', page).on('click', function () {
|
|
||||||
|
|
||||||
var button = this;
|
|
||||||
|
|
||||||
Dashboard.getCurrentUser().then(function (user) {
|
|
||||||
|
|
||||||
LibraryBrowser.showMoreCommands(button, currentItem.Id, currentItem.Type, LibraryBrowser.getMoreCommands(currentItem, user));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.childrenItemsContainer', page).on('playallfromhere', function (e, index) {
|
|
||||||
|
|
||||||
LibraryBrowser.playAllFromHere(_childrenItemsFunction, index);
|
|
||||||
|
|
||||||
}).on('queueallfromhere', function (e, index) {
|
|
||||||
|
|
||||||
LibraryBrowser.queueAllFromHere(_childrenItemsFunction, index);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$(page).on("click", ".moreScenes", function () {
|
|
||||||
|
|
||||||
Dashboard.getCurrentUser().then(function (user) {
|
|
||||||
renderScenes(page, currentItem, user);
|
|
||||||
});
|
|
||||||
|
|
||||||
}).on("click", ".morePeople", function () {
|
|
||||||
|
|
||||||
renderCast(page, currentItem, getContext(currentItem));
|
|
||||||
|
|
||||||
}).on("click", ".moreSpecials", function () {
|
|
||||||
|
|
||||||
Dashboard.getCurrentUser().then(function (user) {
|
|
||||||
renderSpecials(page, currentItem, user);
|
|
||||||
});
|
|
||||||
|
|
||||||
}).on("click", ".moreCriticReviews", function () {
|
|
||||||
|
|
||||||
renderCriticReviews(page, currentItem);
|
|
||||||
});
|
|
||||||
|
|
||||||
//var btnMore = page.querySelectorAll('.btnMoreCommands iron-icon');
|
|
||||||
//for (var i = 0, length = btnMore.length; i < length; i++) {
|
|
||||||
// btnMore[i].icon = AppInfo.moreIcon;
|
|
||||||
//}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
pageIdOn('pagebeforeshow', "itemDetailPage", function () {
|
|
||||||
|
|
||||||
var page = this;
|
|
||||||
|
|
||||||
reload(page);
|
|
||||||
|
|
||||||
Events.on(ApiClient, 'websocketmessage', onWebSocketMessage);
|
|
||||||
|
|
||||||
Events.on(LibraryBrowser, 'itemdeleting', onItemDeleted);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
pageIdOn('pagebeforehide', "itemDetailPage", function () {
|
|
||||||
|
|
||||||
Events.off(LibraryBrowser, 'itemdeleting', onItemDeleted);
|
|
||||||
|
|
||||||
currentItem = null;
|
|
||||||
|
|
||||||
var page = this;
|
|
||||||
|
|
||||||
Events.off(ApiClient, 'websocketmessage', onWebSocketMessage);
|
|
||||||
LibraryMenu.setTransparentMenu(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
function itemDetailPage() {
|
function itemDetailPage() {
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -2154,4 +2030,111 @@
|
||||||
|
|
||||||
window.ItemDetailPage = new itemDetailPage();
|
window.ItemDetailPage = new itemDetailPage();
|
||||||
|
|
||||||
|
return function (view, params) {
|
||||||
|
|
||||||
|
$('.btnPlay', view).on('click', function () {
|
||||||
|
playCurrentItem(this);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.btnPlayTrailer', view).on('click', function () {
|
||||||
|
playTrailer(view);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.btnSplitVersions', view).on('click', function () {
|
||||||
|
|
||||||
|
splitVersions(view, params);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.btnSync', view).on('click', function () {
|
||||||
|
|
||||||
|
require(['syncDialog'], function (syncDialog) {
|
||||||
|
syncDialog.showMenu({
|
||||||
|
items: [currentItem]
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.btnRecord,.btnFloatingRecord', view).on('click', function () {
|
||||||
|
|
||||||
|
var id = params.id;
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
require(['recordingCreator'], function (recordingCreator) {
|
||||||
|
recordingCreator.show(id, currentItem.ServerId).then(function () {
|
||||||
|
reload(view, params);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.btnCancelRecording', view).on('click', function () {
|
||||||
|
|
||||||
|
deleteTimer(view, params, currentItem.TimerId);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.btnMoreCommands', view).on('click', function () {
|
||||||
|
|
||||||
|
var button = this;
|
||||||
|
|
||||||
|
Dashboard.getCurrentUser().then(function (user) {
|
||||||
|
|
||||||
|
LibraryBrowser.showMoreCommands(button, currentItem.Id, currentItem.Type, LibraryBrowser.getMoreCommands(currentItem, user));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.childrenItemsContainer', view).on('playallfromhere', function (e, index) {
|
||||||
|
|
||||||
|
LibraryBrowser.playAllFromHere(_childrenItemsFunction, index);
|
||||||
|
|
||||||
|
}).on('queueallfromhere', function (e, index) {
|
||||||
|
|
||||||
|
LibraryBrowser.queueAllFromHere(_childrenItemsFunction, index);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$(view).on("click", ".moreScenes", function () {
|
||||||
|
|
||||||
|
Dashboard.getCurrentUser().then(function (user) {
|
||||||
|
renderScenes(view, currentItem, user);
|
||||||
|
});
|
||||||
|
|
||||||
|
}).on("click", ".morePeople", function () {
|
||||||
|
|
||||||
|
renderCast(view, currentItem, params.context);
|
||||||
|
|
||||||
|
}).on("click", ".moreSpecials", function () {
|
||||||
|
|
||||||
|
Dashboard.getCurrentUser().then(function (user) {
|
||||||
|
renderSpecials(view, currentItem, user);
|
||||||
|
});
|
||||||
|
|
||||||
|
}).on("click", ".moreCriticReviews", function () {
|
||||||
|
|
||||||
|
renderCriticReviews(view, currentItem);
|
||||||
|
});
|
||||||
|
|
||||||
|
//var btnMore = page.querySelectorAll('.btnMoreCommands iron-icon');
|
||||||
|
//for (var i = 0, length = btnMore.length; i < length; i++) {
|
||||||
|
// btnMore[i].icon = AppInfo.moreIcon;
|
||||||
|
//}
|
||||||
|
|
||||||
|
view.addEventListener('viewbeforeshow', function () {
|
||||||
|
var page = this;
|
||||||
|
|
||||||
|
reload(page, params);
|
||||||
|
|
||||||
|
Events.on(ApiClient, 'websocketmessage', onWebSocketMessage);
|
||||||
|
|
||||||
|
Events.on(LibraryBrowser, 'itemdeleting', onItemDeleted);
|
||||||
|
});
|
||||||
|
|
||||||
|
view.addEventListener('viewbeforehide', function () {
|
||||||
|
Events.off(LibraryBrowser, 'itemdeleting', onItemDeleted);
|
||||||
|
|
||||||
|
currentItem = null;
|
||||||
|
|
||||||
|
Events.off(ApiClient, 'websocketmessage', onWebSocketMessage);
|
||||||
|
LibraryMenu.setTransparentMenu(false);
|
||||||
|
});
|
||||||
|
};
|
||||||
});
|
});
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
$('#selectGuideDays', page).val(config.GuideDays || '');
|
$('#selectGuideDays', page).val(config.GuideDays || '');
|
||||||
|
|
||||||
$('#chkMovies', page).checked(config.EnableMovieProviders);
|
|
||||||
$('#chkOrganize', page).checked(config.EnableAutoOrganize);
|
$('#chkOrganize', page).checked(config.EnableAutoOrganize);
|
||||||
$('#chkConvertRecordings', page).checked(config.EnableRecordingEncoding);
|
$('#chkConvertRecordings', page).checked(config.EnableRecordingEncoding);
|
||||||
$('#chkPreserveAudio', page).checked(config.EnableOriginalAudioWithEncodedRecordings || false);
|
$('#chkPreserveAudio', page).checked(config.EnableOriginalAudioWithEncodedRecordings || false);
|
||||||
|
@ -33,7 +32,6 @@
|
||||||
ApiClient.getNamedConfiguration("livetv").then(function (config) {
|
ApiClient.getNamedConfiguration("livetv").then(function (config) {
|
||||||
|
|
||||||
config.GuideDays = $('#selectGuideDays', form).val() || null;
|
config.GuideDays = $('#selectGuideDays', form).val() || null;
|
||||||
config.EnableMovieProviders = $('#chkMovies', form).checked();
|
|
||||||
config.EnableAutoOrganize = $('#chkOrganize', form).checked();
|
config.EnableAutoOrganize = $('#chkOrganize', form).checked();
|
||||||
config.EnableRecordingEncoding = $('#chkConvertRecordings', form).checked();
|
config.EnableRecordingEncoding = $('#chkConvertRecordings', form).checked();
|
||||||
config.EnableOriginalAudioWithEncodedRecordings = $('#chkPreserveAudio', form).checked();
|
config.EnableOriginalAudioWithEncodedRecordings = $('#chkPreserveAudio', form).checked();
|
||||||
|
|
|
@ -36,10 +36,6 @@
|
||||||
return enableScrollX() ? 'overflowPortrait' : 'portrait';
|
return enableScrollX() ? 'overflowPortrait' : 'portrait';
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSquareShape() {
|
|
||||||
return enableScrollX() ? 'overflowSquare' : 'square';
|
|
||||||
}
|
|
||||||
|
|
||||||
function getLibraryButtonsHtml(items) {
|
function getLibraryButtonsHtml(items) {
|
||||||
|
|
||||||
var html = "";
|
var html = "";
|
||||||
|
@ -495,7 +491,7 @@
|
||||||
ExcludeLocationTypes: "Virtual",
|
ExcludeLocationTypes: "Virtual",
|
||||||
ImageTypeLimit: 1,
|
ImageTypeLimit: 1,
|
||||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
||||||
EnableTotalRecordCount: 0
|
EnableTotalRecordCount: false
|
||||||
};
|
};
|
||||||
|
|
||||||
return ApiClient.getItems(userId, options).then(function (result) {
|
return ApiClient.getItems(userId, options).then(function (result) {
|
||||||
|
@ -679,6 +675,7 @@
|
||||||
|
|
||||||
userId: userId,
|
userId: userId,
|
||||||
limit: 5,
|
limit: 5,
|
||||||
|
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||||
IsInProgress: false
|
IsInProgress: false
|
||||||
|
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
|
@ -702,7 +699,7 @@
|
||||||
}
|
}
|
||||||
html += LibraryBrowser.getPosterViewHtml({
|
html += LibraryBrowser.getPosterViewHtml({
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
shape: getSquareShape(),
|
shape: enableScrollX() ? 'autoOverflow' : 'auto',
|
||||||
showTitle: true,
|
showTitle: true,
|
||||||
showParentTitle: true,
|
showParentTitle: true,
|
||||||
coverImage: true,
|
coverImage: true,
|
||||||
|
|
|
@ -1280,19 +1280,6 @@ var Dashboard = {
|
||||||
Method: 'Embed'
|
Method: 'Embed'
|
||||||
});
|
});
|
||||||
|
|
||||||
// These don't play very well
|
|
||||||
profile.CodecProfiles.push({
|
|
||||||
Type: 'VideoAudio',
|
|
||||||
Codec: 'dca',
|
|
||||||
Conditions: [
|
|
||||||
{
|
|
||||||
Condition: 'LessThanEqual',
|
|
||||||
Property: 'AudioChannels',
|
|
||||||
Value: 6
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
profile.CodecProfiles.push({
|
profile.CodecProfiles.push({
|
||||||
Type: 'VideoAudio',
|
Type: 'VideoAudio',
|
||||||
Codec: 'aac,mp3',
|
Codec: 'aac,mp3',
|
||||||
|
@ -2539,7 +2526,8 @@ var AppInfo = {};
|
||||||
|
|
||||||
defineRoute({
|
defineRoute({
|
||||||
path: '/itemdetails.html',
|
path: '/itemdetails.html',
|
||||||
dependencies: ['paper-button'],
|
dependencies: ['paper-button', 'tileitemcss', 'scripts/livetvcomponents', 'paper-fab', 'paper-item-body', 'paper-icon-item', 'paper-icon-button-light'],
|
||||||
|
controller: 'scripts/itemdetailpage',
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
transition: 'fade'
|
transition: 'fade'
|
||||||
});
|
});
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
ParentId: parentId,
|
ParentId: parentId,
|
||||||
ImageTypeLimit: 1,
|
ImageTypeLimit: 1,
|
||||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
||||||
EnableTotalRecordCount: 0
|
EnableTotalRecordCount: false
|
||||||
};
|
};
|
||||||
|
|
||||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).then(function (result) {
|
ApiClient.getItems(Dashboard.getCurrentUserId(), options).then(function (result) {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
UserId: Dashboard.getCurrentUserId(),
|
UserId: Dashboard.getCurrentUserId(),
|
||||||
ImageTypeLimit: 1,
|
ImageTypeLimit: 1,
|
||||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
EnableImageTypes: "Primary,Backdrop,Banner,Thumb",
|
||||||
EnableTotalRecordCount: 0
|
EnableTotalRecordCount: false
|
||||||
};
|
};
|
||||||
|
|
||||||
query.ParentId = params.topParentId;
|
query.ParentId = params.topParentId;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue