mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
support IntersectionObserver
This commit is contained in:
parent
48058e8fff
commit
b5883925e7
14 changed files with 165 additions and 181 deletions
|
@ -16,12 +16,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.3.48",
|
"version": "1.3.49",
|
||||||
"_release": "1.3.48",
|
"_release": "1.3.49",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.3.48",
|
"tag": "1.3.49",
|
||||||
"commit": "0764e35340e4625a5af560b2f46468646a7d9d10"
|
"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;
|
||||||
|
@ -119,13 +119,29 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events'], functio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 (window.IntersectionObserver) {
|
if (supportsIntersectionObserver) {
|
||||||
unveilWithIntersection(images);
|
unveilWithIntersection(images);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,14 +30,14 @@
|
||||||
"web-component-tester": "polymer/web-component-tester#^3.4.0"
|
"web-component-tester": "polymer/web-component-tester#^3.4.0"
|
||||||
},
|
},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "https://github.com/PolymerElements/iron-a11y-announcer",
|
"homepage": "https://github.com/polymerelements/iron-a11y-announcer",
|
||||||
"_release": "1.0.4",
|
"_release": "1.0.4",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.4",
|
"tag": "v1.0.4",
|
||||||
"commit": "5ce3eb8c4282bb53cd72e348858dc6be6b4c50b9"
|
"commit": "5ce3eb8c4282bb53cd72e348858dc6be6b4c50b9"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-a11y-announcer.git",
|
"_source": "git://github.com/polymerelements/iron-a11y-announcer.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/iron-a11y-announcer"
|
"_originalSource": "polymerelements/iron-a11y-announcer"
|
||||||
}
|
}
|
|
@ -36,7 +36,7 @@
|
||||||
"tag": "v1.5.2",
|
"tag": "v1.5.2",
|
||||||
"commit": "18e8e12dcd9a4560de480562f65935feed334b86"
|
"commit": "18e8e12dcd9a4560de480562f65935feed334b86"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-selector.git",
|
"_source": "git://github.com/PolymerElements/iron-selector.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/iron-selector"
|
"_originalSource": "PolymerElements/iron-selector"
|
||||||
}
|
}
|
|
@ -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"
|
||||||
}
|
}
|
|
@ -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">
|
||||||
|
|
|
@ -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);
|
||||||
|
});
|
||||||
|
};
|
||||||
});
|
});
|
|
@ -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