mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update details
This commit is contained in:
parent
cade92d4ad
commit
a29d3626b0
13 changed files with 366 additions and 710 deletions
|
@ -14,12 +14,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.4.362",
|
"version": "1.4.363",
|
||||||
"_release": "1.4.362",
|
"_release": "1.4.363",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.4.362",
|
"tag": "1.4.363",
|
||||||
"commit": "74f60991dce95403508b7eb84ec362226f574bc9"
|
"commit": "391923397ea7ea23890ced20153fc896e8892f31"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.1",
|
"_target": "^1.2.1",
|
||||||
|
|
|
@ -134,18 +134,22 @@ define(['lazyLoader', 'imageFetcher', 'layoutManager', 'browser', 'appSettings',
|
||||||
|
|
||||||
function getVibrantInfoFromElement(elem, url) {
|
function getVibrantInfoFromElement(elem, url) {
|
||||||
|
|
||||||
if (elem.tagName === 'IMG') {
|
|
||||||
return Promise.resolve(getVibrantInfo(elem, url));
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
|
require(['vibrant'], function () {
|
||||||
|
|
||||||
|
if (elem.tagName === 'IMG') {
|
||||||
|
resolve(getVibrantInfo(elem, url));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var img = new Image();
|
var img = new Image();
|
||||||
img.onload = function () {
|
img.onload = function () {
|
||||||
resolve(getVibrantInfo(img, url));
|
resolve(getVibrantInfo(img, url));
|
||||||
};
|
};
|
||||||
img.src = url;
|
img.src = url;
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSettingsKey(url) {
|
function getSettingsKey(url) {
|
||||||
|
@ -157,7 +161,7 @@ define(['lazyLoader', 'imageFetcher', 'layoutManager', 'browser', 'appSettings',
|
||||||
|
|
||||||
url = url.split('?')[0];
|
url = url.split('?')[0];
|
||||||
|
|
||||||
var cacheKey = 'vibrant25';
|
var cacheKey = 'vibrant31';
|
||||||
//cacheKey = 'vibrant' + new Date().getTime();
|
//cacheKey = 'vibrant' + new Date().getTime();
|
||||||
return cacheKey + url;
|
return cacheKey + url;
|
||||||
}
|
}
|
||||||
|
@ -179,33 +183,21 @@ define(['lazyLoader', 'imageFetcher', 'layoutManager', 'browser', 'appSettings',
|
||||||
|
|
||||||
value = '';
|
value = '';
|
||||||
var swatch = swatches.DarkVibrant;
|
var swatch = swatches.DarkVibrant;
|
||||||
if (swatch) {
|
value += getSwatchString(swatch);
|
||||||
value += swatch.getHex() + '|' + swatch.getBodyTextColor();
|
|
||||||
}
|
|
||||||
//swatch = swatches.DarkMuted;
|
|
||||||
//if (swatch) {
|
|
||||||
// value += '|' + swatch.getHex() + '|' + swatch.getBodyTextColor();
|
|
||||||
//} else {
|
|
||||||
// value += '||';
|
|
||||||
//}
|
|
||||||
//swatch = swatches.Vibrant;
|
|
||||||
//if (swatch) {
|
|
||||||
// value += '|' + swatch.getHex() + '|' + swatch.getBodyTextColor();
|
|
||||||
//} else {
|
|
||||||
// value += '||';
|
|
||||||
//}
|
|
||||||
//swatch = swatches.Muted;
|
|
||||||
//if (swatch) {
|
|
||||||
// value += '|' + swatch.getHex() + '|' + swatch.getBodyTextColor();
|
|
||||||
//} else {
|
|
||||||
// value += '||';
|
|
||||||
//}
|
|
||||||
|
|
||||||
appSettings.set(getSettingsKey(url), value);
|
appSettings.set(getSettingsKey(url), value);
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getSwatchString(swatch) {
|
||||||
|
|
||||||
|
if (swatch) {
|
||||||
|
return swatch.getHex() + '|' + swatch.getBodyTextColor() + '|' + swatch.getTitleTextColor();
|
||||||
|
}
|
||||||
|
return '||';
|
||||||
|
}
|
||||||
|
|
||||||
function fadeIn(elem) {
|
function fadeIn(elem) {
|
||||||
|
|
||||||
var duration = layoutManager.tv ? 160 : 300;
|
var duration = layoutManager.tv ? 160 : 300;
|
||||||
|
@ -294,6 +286,7 @@ define(['lazyLoader', 'imageFetcher', 'layoutManager', 'browser', 'appSettings',
|
||||||
self.lazyChildren = lazyChildren;
|
self.lazyChildren = lazyChildren;
|
||||||
self.getPrimaryImageAspectRatio = getPrimaryImageAspectRatio;
|
self.getPrimaryImageAspectRatio = getPrimaryImageAspectRatio;
|
||||||
self.getCachedVibrantInfo = getCachedVibrantInfo;
|
self.getCachedVibrantInfo = getCachedVibrantInfo;
|
||||||
|
self.getVibrantInfoFromElement = getVibrantInfoFromElement;
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
});
|
});
|
|
@ -174,7 +174,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Type === 'Program') {
|
if (item.Type === 'Program' && options.record !== false) {
|
||||||
|
|
||||||
commands.push({
|
commands.push({
|
||||||
name: Globalize.translate('sharedcomponents#Record'),
|
name: Globalize.translate('sharedcomponents#Record'),
|
||||||
|
@ -184,7 +184,7 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter',
|
||||||
|
|
||||||
if (user.Policy.IsAdministrator) {
|
if (user.Policy.IsAdministrator) {
|
||||||
|
|
||||||
if (item.Type !== 'Timer' && item.Type !== 'SeriesTimer' && item.Type !== 'Program' && !(item.Type === 'Recording' && item.Status !== 'Completed')) {
|
if (item.Type !== 'Timer' && item.Type !== 'SeriesTimer' && item.Type !== 'Program' && item.Type !== 'TvChannel' && !(item.Type === 'Recording' && item.Status !== 'Completed')) {
|
||||||
commands.push({
|
commands.push({
|
||||||
name: globalize.translate('sharedcomponents#Refresh'),
|
name: globalize.translate('sharedcomponents#Refresh'),
|
||||||
id: 'refresh'
|
id: 'refresh'
|
||||||
|
|
|
@ -71,6 +71,9 @@ define(['apphost'], function (appHost) {
|
||||||
if (item.Type === 'Program') {
|
if (item.Type === 'Program') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (item.Type === 'TvChannel') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (item.Type === 'Timer') {
|
if (item.Type === 'Timer') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -169,6 +172,12 @@ define(['apphost'], function (appHost) {
|
||||||
|
|
||||||
canShare: function (user, item) {
|
canShare: function (user, item) {
|
||||||
|
|
||||||
|
if (item.Type === 'Program') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (item.Type === 'TvChannel') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (item.Type === 'Timer') {
|
if (item.Type === 'Timer') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.background-theme-b .backgroundContainer.withBackdrop {
|
.background-theme-b .backgroundContainer.withBackdrop {
|
||||||
background-color: rgba(6, 6,6, .9);
|
background-color: rgba(6, 6,6, .76);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-body-b {
|
.ui-body-b {
|
||||||
|
@ -31,6 +31,11 @@
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
|
-webkit-filter: blur(20px);
|
||||||
|
-moz-filter: blur(20px);
|
||||||
|
-o-filter: blur(20px);
|
||||||
|
-ms-filter: blur(20px);
|
||||||
|
filter: blur(20px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryPage .header {
|
.libraryPage .header {
|
||||||
|
@ -150,7 +155,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.detailPageContent {
|
.detailPageContent {
|
||||||
margin: 0 auto;
|
margin: 3em auto 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border-spacing: 0;
|
border-spacing: 0;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
|
@ -243,14 +248,10 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center 15%;
|
background-position: center 15%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
height: 640px;
|
height: 300px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.smallBackdrop {
|
|
||||||
height: 500px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.noSecondaryNavPage .itemBackdrop {
|
.noSecondaryNavPage .itemBackdrop {
|
||||||
margin-top: -50px;
|
margin-top: -50px;
|
||||||
}
|
}
|
||||||
|
@ -278,40 +279,69 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detailNameContainer {
|
|
||||||
margin-top: -120px;
|
|
||||||
height: 110px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.desktopMiscInfoContainer {
|
.desktopMiscInfoContainer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 10px;
|
bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lnkSibling {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: normal !important;
|
|
||||||
display: none;
|
|
||||||
background-color: rgba(0,0,0,0.6);
|
|
||||||
color: #ddd !important;
|
|
||||||
background-color: transparent;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lnkSibling:not(.hide) {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailUserDataIcons {
|
.detailUserDataIcons {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
margin-left: .5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width: 540px) {
|
.detailImageContainer {
|
||||||
|
margin-right: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
.detailUserDataIcons {
|
.itemDetailImage {
|
||||||
margin-left: .5em;
|
border: solid 1px transparent;
|
||||||
|
width: 280px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thumbDetailImageContainer .itemDetailImage {
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemDetailImage.loaded {
|
||||||
|
-moz-box-shadow: 0px 0 20px #000;
|
||||||
|
-webkit-box-shadow: 0px 0 20px #000;
|
||||||
|
box-shadow: 0px 0 20px #000;
|
||||||
|
border: solid 1px #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemDetailGalleryLink img:hover {
|
||||||
|
-moz-box-shadow: 0 0 20px 3px #52B54B;
|
||||||
|
-webkit-box-shadow: 0 0 20px 3px #52B54B;
|
||||||
|
box-shadow: 0 0 20px 3px #52B54B;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media all and (max-width: 800px) {
|
||||||
|
|
||||||
|
.detailImageContainer {
|
||||||
|
position: absolute;
|
||||||
|
top: 210px;
|
||||||
|
left: 3%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemDetailImage {
|
||||||
|
height: 120px;
|
||||||
|
width: auto!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnPlaySimple {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media all and (min-width: 800px) {
|
||||||
|
|
||||||
|
.itemBackdrop {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detailPagePrimaryContainer {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 3em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,64 +352,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.lnkPreviousItem {
|
|
||||||
left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lnkNextItem {
|
|
||||||
right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailImageContainer {
|
|
||||||
float: left;
|
|
||||||
margin-top: -140px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemDetailImage {
|
|
||||||
border: solid 1px transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemDetailImage.loaded {
|
|
||||||
-moz-box-shadow: 0px 0 20px #000;
|
|
||||||
-webkit-box-shadow: 0px 0 20px #000;
|
|
||||||
box-shadow: 0px 0 20px #000;
|
|
||||||
border: solid 1px #222;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailImageContainer img {
|
|
||||||
width: 280px;
|
|
||||||
/* This is just to make sure it always takes up some space */
|
|
||||||
min-height: 140px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.portraitDetailImageContainer img {
|
|
||||||
width: 220px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.squareDetailImageContainer {
|
|
||||||
margin-top: -150px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.thumbDetailImageContainer {
|
|
||||||
margin-top: -130px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemDetailGalleryLink img:hover {
|
|
||||||
-moz-box-shadow: 0 0 20px 3px #52B54B;
|
|
||||||
-webkit-box-shadow: 0 0 20px 3px #52B54B;
|
|
||||||
box-shadow: 0 0 20px 3px #52B54B;
|
|
||||||
}
|
|
||||||
|
|
||||||
.primaryDetailsContainer {
|
|
||||||
float: left;
|
|
||||||
padding: .75em 0 0 1.5em;
|
|
||||||
width: 66%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.portraitDetailImageContainer + .primaryDetailsContainer {
|
|
||||||
width: 74%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.parentName {
|
.parentName {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: .5em;
|
margin-bottom: .5em;
|
||||||
|
@ -388,9 +360,9 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
.emby-button.detailFloatingButton {
|
.emby-button.detailFloatingButton {
|
||||||
width: 56px !important;
|
width: 56px !important;
|
||||||
height: 56px !important;
|
height: 56px !important;
|
||||||
top: -28px;
|
bottom: -28px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 25%;
|
right: 5%;
|
||||||
background-color: #52B54B !important;
|
background-color: #52B54B !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,77 +370,25 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
background-color: #cc3333 !important;
|
background-color: #cc3333 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width: 1000px) {
|
.textLinkList a {
|
||||||
|
margin: 0 .5em;
|
||||||
.primaryDetailsContainer {
|
|
||||||
width: 64%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.portraitDetailImageContainer + .primaryDetailsContainer {
|
|
||||||
width: 72%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailImageContainer img {
|
|
||||||
width: 240px;
|
|
||||||
/* This is just to make sure it always takes up some space */
|
|
||||||
min-height: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.portraitDetailImageContainer img {
|
|
||||||
width: 180px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.textLinkList a:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (max-width: 800px) {
|
@media all and (max-width: 800px) {
|
||||||
|
|
||||||
.parentName {
|
.parentName {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.primaryDetailsContainer {
|
|
||||||
padding-top: 2.5em;
|
|
||||||
padding-left: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailNameContainer {
|
|
||||||
margin-top: auto;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemBackdropContent {
|
.itemBackdropContent {
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width: 600px) {
|
|
||||||
|
|
||||||
.detailFloatingButton {
|
|
||||||
right: 15px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (max-width: 600px) {
|
|
||||||
|
|
||||||
.primaryDetailsContainer {
|
|
||||||
width: 68%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.portraitDetailImageContainer + .primaryDetailsContainer {
|
|
||||||
width: 68%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (max-width: 400px) {
|
|
||||||
|
|
||||||
.primaryDetailsContainer {
|
|
||||||
width: 60%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.portraitDetailImageContainer + .primaryDetailsContainer {
|
|
||||||
width: 60%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (min-width: 500px) {
|
@media all and (min-width: 500px) {
|
||||||
|
|
||||||
.mobileDetails {
|
.mobileDetails {
|
||||||
|
@ -533,6 +453,19 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mainDetailButtons {
|
||||||
|
padding: 1em 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mainDetailButtons button, .recordingFields button {
|
||||||
|
background: rgba(170,170, 170, 1);
|
||||||
|
color: #222;
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
.detailImageProgressContainer {
|
.detailImageProgressContainer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 4px;
|
bottom: 4px;
|
||||||
|
@ -545,101 +478,58 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width: 600px) {
|
@media all and (max-height: 540px) {
|
||||||
.inlineDetailSection:not(.hide) {
|
|
||||||
display: inline-block;
|
|
||||||
margin-bottom: 2em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (max-height: 900px), (max-width: 800px) {
|
.itemBackdrop {
|
||||||
|
|
||||||
.itemBackdrop:not(.noBackdrop) {
|
|
||||||
height: 500px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.smallBackdrop:not(.noBackdrop) {
|
|
||||||
height: 300px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (max-height: 800px), (max-width: 700px) {
|
|
||||||
|
|
||||||
.itemBackdrop:not(.noBackdrop) {
|
|
||||||
height: 450px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.smallBackdrop:not(.noBackdrop) {
|
|
||||||
height: 300px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (max-height: 700px) {
|
|
||||||
|
|
||||||
.itemBackdrop:not(.noBackdrop) {
|
|
||||||
height: 350px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.smallBackdrop:not(.noBackdrop) {
|
|
||||||
height: 300px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (max-width: 540px) {
|
|
||||||
|
|
||||||
.itemBackdrop:not(.noBackdrop) {
|
|
||||||
height: 290px;
|
height: 290px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.smallBackdrop:not(.noBackdrop) {
|
.detailImageContainer {
|
||||||
height: 200px;
|
top: 200px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-height: 540px) {
|
@media all and (max-height: 500px) {
|
||||||
|
|
||||||
.itemBackdrop:not(.noBackdrop) {
|
.itemBackdrop {
|
||||||
height: 250px;
|
height: 240px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.smallBackdrop:not(.noBackdrop) {
|
.detailImageContainer {
|
||||||
height: 200px;
|
top: 150px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-height: 460px) {
|
@media all and (max-height: 460px) {
|
||||||
|
|
||||||
.itemBackdrop:not(.noBackdrop) {
|
.itemBackdrop {
|
||||||
height: 200px;
|
height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.smallBackdrop:not(.noBackdrop) {
|
.detailImageContainer {
|
||||||
height: 120px;
|
top: 110px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-height: 300px) {
|
@media all and (max-height: 300px) {
|
||||||
|
|
||||||
.itemBackdrop:not(.noBackdrop) {
|
.itemBackdrop {
|
||||||
height: 150px;
|
height: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.smallBackdrop:not(.noBackdrop) {
|
.detailImageContainer {
|
||||||
height: 120px;
|
top: 60px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-height: 250px) {
|
@media all and (max-height: 250px) {
|
||||||
|
|
||||||
.itemBackdrop:not(.noBackdrop) {
|
.itemBackdrop {
|
||||||
height: 120px;
|
height: 120px;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (max-width: 1000px) {
|
|
||||||
|
|
||||||
.detailImageContainer {
|
.detailImageContainer {
|
||||||
padding-left: 15px;
|
top: 30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -652,42 +542,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
.noBackdrop {
|
.noBackdrop {
|
||||||
height: 80px;
|
height: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detailImageContainer {
|
|
||||||
margin-top: -55px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.squareDetailImageContainer {
|
|
||||||
margin-top: -40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.thumbDetailImageContainer {
|
|
||||||
margin-top: -80px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.portraitDetailImageContainer + .primaryDetailsContainer {
|
|
||||||
width: 70%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailImageContainer img {
|
|
||||||
width: 140px;
|
|
||||||
/* This is just to make sure it always takes up some space */
|
|
||||||
min-height: 140px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.primaryDetailPageContent p {
|
|
||||||
margin: 1em 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.backdropDetailPageContent {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.thumbDetailImageContainer img {
|
|
||||||
width: 180px;
|
|
||||||
/* This is just to make sure it always takes up some space */
|
|
||||||
min-height: 60px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.itemMiscInfo {
|
.itemMiscInfo {
|
||||||
|
@ -698,27 +552,8 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width: 600px) {
|
|
||||||
|
|
||||||
.portraitDetailImageContainer + .primaryDetailsContainer {
|
|
||||||
width: 65%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (max-width: 500px) {
|
@media all and (max-width: 500px) {
|
||||||
|
|
||||||
.detailImageContainer img {
|
|
||||||
width: 80px;
|
|
||||||
/* This is just to make sure it always takes up some space */
|
|
||||||
min-height: 60px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.thumbDetailImageContainer img {
|
|
||||||
width: 180px;
|
|
||||||
/* This is just to make sure it always takes up some space */
|
|
||||||
min-height: 60px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobileDetails .itemMiscInfo {
|
.mobileDetails .itemMiscInfo {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -729,14 +564,24 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.detailPageContent {
|
||||||
|
max-width: 94%;
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (min-width: 750px) {
|
@media all and (min-width: 750px) {
|
||||||
.detailPageContent {
|
.detailPageContent {
|
||||||
max-width: 950px;
|
max-width: 94%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media all and (min-width: 1200px) {
|
||||||
|
.detailPageContent {
|
||||||
|
max-width: 90%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.detailPageParentLink {
|
.detailPageParentLink {
|
||||||
text-decoration: none;
|
font-weight: inherit !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mediaInfoContent {
|
.mediaInfoContent {
|
||||||
|
@ -924,13 +769,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (max-width: 1000px) {
|
|
||||||
|
|
||||||
.smallDetailImageContainer {
|
|
||||||
padding-left: 1em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#criticReviewsContent.hiddenScrollX {
|
#criticReviewsContent.hiddenScrollX {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
@ -944,26 +782,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
margin: 0 4px 0 0;
|
margin: 0 4px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@media all and (min-width: 1000px) {
|
|
||||||
|
|
||||||
.itemDetailPage .portraitCard-scalable {
|
|
||||||
width: 20% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemDetailPage .squareCard-scalable {
|
|
||||||
width: 25% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemDetailPage .backdropCard-scalable, .itemDetailPage .smallBackdropCard-scalable {
|
|
||||||
width: 33.3333333333333333% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemDetailPage .personCard.portraitCard {
|
|
||||||
width: 16.666666666666666666666666666667% !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btnSyncComplete {
|
.btnSyncComplete {
|
||||||
background: #673AB7 !important;
|
background: #673AB7 !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,10 +82,6 @@ body {
|
||||||
overflow-y: hidden !important;
|
overflow-y: hidden !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.textlink {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, h2, h3 {
|
h1, h2, h3 {
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,82 +3,77 @@
|
||||||
<div id="itemBackdrop" class="itemBackdrop noBackdrop">
|
<div id="itemBackdrop" class="itemBackdrop noBackdrop">
|
||||||
<div class="itemBackdropContent">
|
<div class="itemBackdropContent">
|
||||||
</div>
|
</div>
|
||||||
<a href="#" id="lnkPreviousItem" class="lnkPreviousItem lnkSibling hide clearLink"><button is="emby-button" type="button" class="raised subdued notext"><i class="md-icon"></i></button></a>
|
<button is="emby-button" type="button" class="btnPlay detailFloatingButton hide fab autoSize" title="${ButtonPlay}"><i class="md-icon">play_arrow</i></button>
|
||||||
<a href="#" id="lnkNextItem" class="lnkNextItem lnkSibling hide clearLink"><button is="emby-button" type="button" class="raised subdued notext"><i class="md-icon">arrow_forward</i></button></a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="detailPageContent" style="position:relative;">
|
<div class="detailPageContent">
|
||||||
|
|
||||||
<button is="emby-button" type="button" class="btnPlay detailFloatingButton hide fab autoSize" title="${ButtonPlay}"><i class="md-icon">play_arrow</i></button>
|
|
||||||
|
|
||||||
|
<div class="detailPagePrimaryContainer">
|
||||||
<div class="detailImageContainer">
|
<div class="detailImageContainer">
|
||||||
</div>
|
</div>
|
||||||
<div class="primaryDetailsContainer">
|
<div class="detailPagePrimaryContent">
|
||||||
<div class="detailNameContainer">
|
<div class="syncLocalContainer hide" style="margin-top: 1em; display: inline-flex; padding: 0 .5em;">
|
||||||
<div class="parentName"></div>
|
<label class="checkboxContainer" style="margin: 0;">
|
||||||
<h1 class="itemName"></h1>
|
|
||||||
<div class="desktopDetails itemMiscInfo" style="margin-top:.5em;">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="desktopDetails" style="padding-top:5px;">
|
|
||||||
|
|
||||||
<p class="artist"></p>
|
|
||||||
<p class="itemGenres"></p>
|
|
||||||
<div class="detailButtonsContainer">
|
|
||||||
<button is="emby-button" type="button" class="raised subdued btnPlayTrailer hide"><i class="md-icon">play_arrow</i><span>${ButtonTrailer}</span></button>
|
|
||||||
<a class="btnPlayExternalTrailer hide clearLink" href="#" target="_blank"><button is="emby-button" type="button" class="raised subdued"><i class="md-icon">play_arrow</i><span>${ButtonTrailer}</span></button></a>
|
|
||||||
<button is="emby-button" type="button" class="raised subdued btnSync hide"><i class="md-icon">sync</i><span>${ButtonSync}</span></button>
|
|
||||||
<button is="emby-button" type="button" class="raised subdued btnMoreCommands hide notext"><i class="md-icon">more_vert</i></button>
|
|
||||||
<div class="detailUserDataIcons userDataIcons"></div>
|
|
||||||
</div>
|
|
||||||
<div class="syncLocalContainer hide" style="margin-top:1em; display: inline-flex; padding: 0 .5em;">
|
|
||||||
<label class="checkboxContainer" style="margin:0;">
|
|
||||||
<input type="checkbox" is="emby-checkbox" class="chkOffline" />
|
<input type="checkbox" is="emby-checkbox" class="chkOffline" />
|
||||||
<span>${MakeAvailableOffline}</span>
|
<span>${MakeAvailableOffline}</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="detailSection" style="margin-bottom: 0;">
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h1 class="parentName" style="margin: .25em 0;"></h1>
|
||||||
|
<h1 class="itemName" style="margin: .5em 0;"></h1>
|
||||||
|
|
||||||
|
<div class="itemMiscInfo itemMiscInfo-primary" style="margin: 1em 0;">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="itemMiscInfo itemMiscInfo-secondary" style="margin: 1em 0;">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mobileDetails" style="text-align:center;clear:both;">
|
<div class="mainDetailButtons">
|
||||||
<div style="height:10px;"></div>
|
<button is="emby-button" type="button" class="raised subdued btnPlay btnPlaySimple hide">
|
||||||
<div class="itemMiscInfo">
|
<i class="md-icon">play_arrow</i>
|
||||||
</div>
|
<span>${ButtonPlay}</span>
|
||||||
<div class="detailButtonsContainer">
|
</button>
|
||||||
<br />
|
<button is="emby-button" type="button" class="raised subdued btnPlayTrailer hide">
|
||||||
<button is="emby-button" type="button" class="raised subdued btnPlayTrailer hide"><i class="md-icon">play_arrow</i><span>${ButtonTrailer}</span></button>
|
<i class="md-icon">videocam</i>
|
||||||
<a class="btnPlayExternalTrailer hide clearLink" href="#" target="_blank"><button is="emby-button" type="button" class="raised subdued"><i class="md-icon">play_arrow</i><span>${ButtonTrailer}</span></button></a>
|
<span>${ButtonTrailer}</span>
|
||||||
<button is="emby-button" type="button" class="raised subdued btnSync hide"><i class="md-icon">sync</i><span>${ButtonSync}</span></button>
|
</button>
|
||||||
<button is="emby-button" type="button" class="raised subdued btnMoreCommands hide notext"><i class="md-icon">more_vert</i></button>
|
<button is="emby-button" type="button" class="raised subdued btnMoreCommands hide notext">
|
||||||
|
|
||||||
|
<i class="md-icon">more_vert</i>
|
||||||
|
|
||||||
|
</button>
|
||||||
<div class="detailUserDataIcons userDataIcons"></div>
|
<div class="detailUserDataIcons userDataIcons"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="syncLocalContainer hide" style="margin-top:1em; display: inline-flex; padding: 0 .5em;">
|
|
||||||
<label class="checkboxContainer" style="margin:0;">
|
<div class="recordingFields hide" style="margin: .5em 0 1.5em;">
|
||||||
<input type="checkbox" is="emby-checkbox" class="chkOffline" />
|
|
||||||
<span>${MakeAvailableOffline}</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div data-role="content" style="padding-top:0;clear:both;">
|
|
||||||
<div class="detailPageContent">
|
|
||||||
<div class="recordingFields hide" style="margin: 1em 0;">
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="detailSection">
|
|
||||||
<div class="mobileDetails">
|
<div class="detailSectionContent">
|
||||||
|
|
||||||
|
<p class="itemGenres textLinkList"></p>
|
||||||
|
<h1 class="tagline" style="margin-bottom: .7em;"></h1>
|
||||||
<p class="artist"></p>
|
<p class="artist"></p>
|
||||||
<p class="itemGenres"></p>
|
<p class="overview"></p>
|
||||||
</div>
|
<p id="dateAdded"></p>
|
||||||
<div class="desktopDetails" style="height: 10px;"></div>
|
|
||||||
<h2 class="tagline"></h2>
|
|
||||||
<p id="itemBirthday"></p>
|
<p id="itemBirthday"></p>
|
||||||
<p id="itemBirthLocation"></p>
|
<p id="itemBirthLocation"></p>
|
||||||
<p id="itemDeathDate"></p>
|
<p id="itemDeathDate"></p>
|
||||||
<p id="seriesAirTime"></p>
|
<p id="seriesAirTime"></p>
|
||||||
<p class="itemOverview topOverview"></p>
|
<p class="itemExternalLinks textLinkList"></p>
|
||||||
|
<p class="itemStudios"></p>
|
||||||
|
<p class="itemTags"></p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
<div class="collectionItems"></div>
|
<div class="collectionItems"></div>
|
||||||
<div class="nextUpSection detailSection hide">
|
<div class="nextUpSection detailSection hide">
|
||||||
<h1>
|
<h1>
|
||||||
|
@ -168,7 +163,6 @@
|
||||||
${HeaderScenes}
|
${HeaderScenes}
|
||||||
</h1>
|
</h1>
|
||||||
<div is="emby-itemscontainer" id="scenesContent" class="itemsContainer"></div>
|
<div is="emby-itemscontainer" id="scenesContent" class="itemsContainer"></div>
|
||||||
<button is="emby-button" type="button" class="raised more moreScenes hide">${ButtonMore}</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="themeSongsCollapsible" class="detailSection hide">
|
<div id="themeSongsCollapsible" class="detailSection hide">
|
||||||
<h1>
|
<h1>
|
||||||
|
@ -176,20 +170,6 @@
|
||||||
</h1>
|
</h1>
|
||||||
<div id="themeSongsContent" is="emby-itemscontainer"></div>
|
<div id="themeSongsContent" is="emby-itemscontainer"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="detailSection detailsSection">
|
|
||||||
<h1>
|
|
||||||
${HeaderDetails}
|
|
||||||
</h1>
|
|
||||||
<div>
|
|
||||||
<div class="tabDetails">
|
|
||||||
<p class="itemOverview bottomOverview"></p>
|
|
||||||
<p id="players"></p>
|
|
||||||
<p class="itemExternalLinks"></p>
|
|
||||||
<p class="itemStudios"></p>
|
|
||||||
<p class="itemTags"></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="themeVideosCollapsible" class="detailSection hide">
|
<div id="themeVideosCollapsible" class="detailSection hide">
|
||||||
<h1>
|
<h1>
|
||||||
|
@ -210,4 +190,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div data-role="content" style="padding-top: 0; clear: both;">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -57,9 +57,8 @@
|
||||||
<br />
|
<br />
|
||||||
<div class="fldEnableBackdrops selectContainer">
|
<div class="fldEnableBackdrops selectContainer">
|
||||||
<select id="selectBackdrop" is="emby-select" label="${LabelEnableBackdrops}">
|
<select id="selectBackdrop" is="emby-select" label="${LabelEnableBackdrops}">
|
||||||
<option value="">${OptionAuto}</option>
|
|
||||||
<option value="1">${OptionYes}</option>
|
<option value="1">${OptionYes}</option>
|
||||||
<option value="0">${OptionNo}</option>
|
<option value="">${OptionNo}</option>
|
||||||
</select>
|
</select>
|
||||||
<div class="fieldDescription">${LabelEnableBackdropsHelp}</div>
|
<div class="fieldDescription">${LabelEnableBackdropsHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
define(['backdrop', 'appStorage'], function (backdrop, appStorage) {
|
define(['backdrop', 'appStorage'], function (backdrop, appStorage) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function isEnabledByDefault() {
|
|
||||||
|
|
||||||
if (AppInfo.hasLowImageBandwidth) {
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function enabled() {
|
function enabled() {
|
||||||
|
|
||||||
var apiClient = window.ApiClient;
|
var apiClient = window.ApiClient;
|
||||||
|
@ -24,7 +14,7 @@
|
||||||
var val = appStorage.getItem('enableBackdrops-' + userId);
|
var val = appStorage.getItem('enableBackdrops-' + userId);
|
||||||
|
|
||||||
// For bandwidth
|
// For bandwidth
|
||||||
return val == '1' || (val != '0' && isEnabledByDefault());
|
return val == '1';
|
||||||
}
|
}
|
||||||
|
|
||||||
var cache = {};
|
var cache = {};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['layoutManager', 'cardBuilder', 'datetime', 'mediaInfo', 'backdrop', 'listView', 'itemContextMenu', 'itemHelper', 'userdataButtons', 'dom', 'indicators', 'apphost', 'imageLoader', 'libraryMenu', 'scrollStyles', 'emby-itemscontainer', 'emby-checkbox'], function (layoutManager, cardBuilder, datetime, mediaInfo, backdrop, listView, itemContextMenu, itemHelper, userdataButtons, dom, indicators, appHost, imageLoader, libraryMenu) {
|
define(['layoutManager', 'cardBuilder', 'datetime', 'mediaInfo', 'backdrop', 'listView', 'itemContextMenu', 'itemHelper', 'userdataButtons', 'dom', 'indicators', 'apphost', 'imageLoader', 'libraryMenu', 'shell', 'globalize', 'scrollStyles', 'emby-itemscontainer', 'emby-checkbox'], function (layoutManager, cardBuilder, datetime, mediaInfo, backdrop, listView, itemContextMenu, itemHelper, userdataButtons, dom, indicators, appHost, imageLoader, libraryMenu, shell, globalize) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var currentItem;
|
var currentItem;
|
||||||
|
@ -72,15 +72,14 @@
|
||||||
queue: false,
|
queue: false,
|
||||||
playAllFromHere: false,
|
playAllFromHere: false,
|
||||||
queueAllFromHere: false,
|
queueAllFromHere: false,
|
||||||
positionTo: button
|
positionTo: button,
|
||||||
|
cancelTimer: false,
|
||||||
|
record: false
|
||||||
};
|
};
|
||||||
|
|
||||||
if (appHost.supports('sync')) {
|
if (appHost.supports('sync')) {
|
||||||
// Will be displayed via button
|
// Will be displayed via button
|
||||||
options.syncLocal = false;
|
options.syncLocal = false;
|
||||||
} else {
|
|
||||||
// Will be displayed via button
|
|
||||||
options.sync = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
|
@ -115,23 +114,14 @@
|
||||||
setInitialCollapsibleState(page, item, context, user);
|
setInitialCollapsibleState(page, item, context, user);
|
||||||
renderDetails(page, item, context);
|
renderDetails(page, item, context);
|
||||||
|
|
||||||
var hasBackdrop = false;
|
|
||||||
|
|
||||||
// For these types, make the backdrop a little smaller so that the items are more quickly accessible
|
|
||||||
if (item.Type == 'MusicArtist' || item.Type == "MusicAlbum" || item.Type == "Playlist" || item.Type == "BoxSet" || item.MediaType == "Audio" || !layoutManager.mobile) {
|
|
||||||
var itemBackdropElement = page.querySelector('#itemBackdrop');
|
var itemBackdropElement = page.querySelector('#itemBackdrop');
|
||||||
itemBackdropElement.classList.add('noBackdrop');
|
itemBackdropElement.classList.add('noBackdrop');
|
||||||
itemBackdropElement.style.backgroundImage = 'none';
|
itemBackdropElement.style.backgroundImage = 'none';
|
||||||
backdrop.setBackdrops([item]);
|
backdrop.setBackdrops([item]);
|
||||||
}
|
|
||||||
else {
|
|
||||||
hasBackdrop = LibraryBrowser.renderDetailPageBackdrop(page, item, imageLoader);
|
|
||||||
backdrop.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
var transparentHeader = hasBackdrop && page.classList.contains('noSecondaryNavPage');
|
LibraryBrowser.renderDetailPageBackdrop(page, item, imageLoader);
|
||||||
|
|
||||||
libraryMenu.setTransparentMenu(transparentHeader);
|
libraryMenu.setTransparentMenu(true);
|
||||||
|
|
||||||
var canPlay = false;
|
var canPlay = false;
|
||||||
|
|
||||||
|
@ -154,7 +144,7 @@
|
||||||
hideAll(page, 'btnPlay');
|
hideAll(page, 'btnPlay');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.LocalTrailerCount && item.PlayAccess == 'Full') {
|
if ((item.LocalTrailerCount || (item.RemoteTrailers && item.RemoteTrailers.length)) && item.PlayAccess == 'Full') {
|
||||||
hideAll(page, 'btnPlayTrailer', true);
|
hideAll(page, 'btnPlayTrailer', true);
|
||||||
} else {
|
} else {
|
||||||
hideAll(page, 'btnPlayTrailer');
|
hideAll(page, 'btnPlayTrailer');
|
||||||
|
@ -176,20 +166,6 @@
|
||||||
|
|
||||||
showRecordingFields(page, item, user);
|
showRecordingFields(page, item, user);
|
||||||
|
|
||||||
var btnPlayExternalTrailer = page.querySelectorAll('.btnPlayExternalTrailer');
|
|
||||||
for (var i = 0, length = btnPlayExternalTrailer.length; i < length; i++) {
|
|
||||||
if (!item.LocalTrailerCount && item.RemoteTrailers.length && item.PlayAccess == 'Full') {
|
|
||||||
|
|
||||||
btnPlayExternalTrailer[i].classList.remove('hide');
|
|
||||||
btnPlayExternalTrailer[i].href = item.RemoteTrailers[0].Url;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
btnPlayExternalTrailer[i].classList.add('hide');
|
|
||||||
btnPlayExternalTrailer[i].href = '#';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var groupedVersions = (item.MediaSources || []).filter(function (g) {
|
var groupedVersions = (item.MediaSources || []).filter(function (g) {
|
||||||
return g.Type == "Grouping";
|
return g.Type == "Grouping";
|
||||||
});
|
});
|
||||||
|
@ -215,7 +191,7 @@
|
||||||
var birthday = datetime.parseISO8601Date(item.PremiereDate, true).toDateString();
|
var birthday = datetime.parseISO8601Date(item.PremiereDate, true).toDateString();
|
||||||
|
|
||||||
itemBirthday.classList.remove('hide');
|
itemBirthday.classList.remove('hide');
|
||||||
itemBirthday.innerHTML = Globalize.translate('BirthDateValue').replace('{0}', birthday);
|
itemBirthday.innerHTML = globalize.translate('BirthDateValue').replace('{0}', birthday);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
itemBirthday.classList.add('hide');
|
itemBirthday.classList.add('hide');
|
||||||
|
@ -231,7 +207,7 @@
|
||||||
var deathday = datetime.parseISO8601Date(item.EndDate, true).toDateString();
|
var deathday = datetime.parseISO8601Date(item.EndDate, true).toDateString();
|
||||||
|
|
||||||
itemDeathDate.classList.remove('hide');
|
itemDeathDate.classList.remove('hide');
|
||||||
itemDeathDate.innerHTML = Globalize.translate('DeathDateValue').replace('{0}', deathday);
|
itemDeathDate.innerHTML = globalize.translate('DeathDateValue').replace('{0}', deathday);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
itemDeathDate.classList.add('hide');
|
itemDeathDate.classList.add('hide');
|
||||||
|
@ -245,7 +221,7 @@
|
||||||
var gmap = '<a class="textlink" target="_blank" href="https://maps.google.com/maps?q=' + item.ProductionLocations[0] + '">' + item.ProductionLocations[0] + '</a>';
|
var gmap = '<a class="textlink" target="_blank" href="https://maps.google.com/maps?q=' + item.ProductionLocations[0] + '">' + item.ProductionLocations[0] + '</a>';
|
||||||
|
|
||||||
itemBirthLocation.classList.remove('hide');
|
itemBirthLocation.classList.remove('hide');
|
||||||
itemBirthLocation.innerHTML = Globalize.translate('BirthPlaceValue').replace('{0}', gmap);
|
itemBirthLocation.innerHTML = globalize.translate('BirthPlaceValue').replace('{0}', gmap);
|
||||||
} else {
|
} else {
|
||||||
itemBirthLocation.classList.add('hide');
|
itemBirthLocation.classList.add('hide');
|
||||||
}
|
}
|
||||||
|
@ -322,7 +298,7 @@
|
||||||
var links = [];
|
var links = [];
|
||||||
|
|
||||||
if (item.HomePageUrl) {
|
if (item.HomePageUrl) {
|
||||||
links.push('<a class="textlink" href="' + item.HomePageUrl + '" target="_blank">' + Globalize.translate('ButtonWebsite') + '</a>');
|
links.push('<a class="textlink" href="' + item.HomePageUrl + '" target="_blank">' + globalize.translate('ButtonWebsite') + '</a>');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.ExternalUrls) {
|
if (item.ExternalUrls) {
|
||||||
|
@ -337,9 +313,7 @@
|
||||||
|
|
||||||
if (links.length) {
|
if (links.length) {
|
||||||
|
|
||||||
var html = links.join(' / ');
|
var html = links.join('•');
|
||||||
|
|
||||||
html = Globalize.translate('ValueLinks', html);
|
|
||||||
|
|
||||||
linksElem.innerHTML = html;
|
linksElem.innerHTML = html;
|
||||||
linksElem.classList.remove('hide');
|
linksElem.classList.remove('hide');
|
||||||
|
@ -349,9 +323,34 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function shadeBlendConvert(p, from, to) {
|
||||||
|
if (typeof (p) != "number" || p < -1 || p > 1 || typeof (from) != "string" || (from[0] != 'r' && from[0] != '#') || (typeof (to) != "string" && typeof (to) != "undefined")) return null; //ErrorCheck
|
||||||
|
|
||||||
|
var sbcRip = function (d) {
|
||||||
|
var l = d.length, RGB = new Object();
|
||||||
|
if (l > 9) {
|
||||||
|
d = d.split(",");
|
||||||
|
if (d.length < 3 || d.length > 4) return null; //ErrorCheck
|
||||||
|
RGB[0] = i(d[0].slice(4)), RGB[1] = i(d[1]), RGB[2] = i(d[2]), RGB[3] = d[3] ? parseFloat(d[3]) : -1;
|
||||||
|
} else {
|
||||||
|
if (l == 8 || l == 6 || l < 4) return null; //ErrorCheck
|
||||||
|
if (l < 6) d = "#" + d[1] + d[1] + d[2] + d[2] + d[3] + d[3] + (l > 4 ? d[4] + "" + d[4] : ""); //3 digit
|
||||||
|
d = i(d.slice(1), 16), RGB[0] = d >> 16 & 255, RGB[1] = d >> 8 & 255, RGB[2] = d & 255, RGB[3] = l == 9 || l == 5 ? r(((d >> 24 & 255) / 255) * 10000) / 10000 : -1;
|
||||||
|
}
|
||||||
|
return RGB;
|
||||||
|
};
|
||||||
|
|
||||||
|
var i = parseInt, r = Math.round, h = from.length > 9, h = typeof (to) == "string" ? to.length > 9 ? true : to == "c" ? !h : false : h, b = p < 0, p = b ? p * -1 : p, to = to && to != "c" ? to : b ? "#000000" : "#FFFFFF", f = sbcRip(from), t = sbcRip(to);
|
||||||
|
if (!f || !t) return null; //ErrorCheck
|
||||||
|
if (h) return "rgb(" + r((t[0] - f[0]) * p + f[0]) + "," + r((t[1] - f[1]) * p + f[1]) + "," + r((t[2] - f[2]) * p + f[2]) + (f[3] < 0 && t[3] < 0 ? ")" : "," + (f[3] > -1 && t[3] > -1 ? r(((t[3] - f[3]) * p + f[3]) * 10000) / 10000 : t[3] < 0 ? f[3] : t[3]) + ")");
|
||||||
|
else return "#" + (0x100000000 + (f[3] > -1 && t[3] > -1 ? r(((t[3] - f[3]) * p + f[3]) * 255) : t[3] > -1 ? r(t[3] * 255) : f[3] > -1 ? r(f[3] * 255) : 255) * 0x1000000 + r((t[0] - f[0]) * p + f[0]) * 0x10000 + r((t[1] - f[1]) * p + f[1]) * 0x100 + r((t[2] - f[2]) * p + f[2])).toString(16).slice(f[3] > -1 || t[3] > -1 ? 1 : 3);
|
||||||
|
}
|
||||||
|
|
||||||
function renderImage(page, item, user) {
|
function renderImage(page, item, user) {
|
||||||
|
|
||||||
LibraryBrowser.renderDetailImage(page.querySelector('.detailImageContainer'), item, user.Policy.IsAdministrator && item.MediaType != 'Photo', null, imageLoader, indicators);
|
var container = page.querySelector('.detailImageContainer');
|
||||||
|
|
||||||
|
LibraryBrowser.renderDetailImage(container, item, user.Policy.IsAdministrator && item.MediaType != 'Photo', null, imageLoader, indicators);
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshDetailImageUserData(elem, item) {
|
function refreshDetailImageUserData(elem, item) {
|
||||||
|
@ -369,9 +368,9 @@
|
||||||
function setPeopleHeader(page, item) {
|
function setPeopleHeader(page, item) {
|
||||||
|
|
||||||
if (item.MediaType == "Audio" || item.Type == "MusicAlbum" || item.MediaType == "Book" || item.MediaType == "Photo") {
|
if (item.MediaType == "Audio" || item.Type == "MusicAlbum" || item.MediaType == "Book" || item.MediaType == "Photo") {
|
||||||
page.querySelector('#peopleHeader').innerHTML = Globalize.translate('HeaderPeople');
|
page.querySelector('#peopleHeader').innerHTML = globalize.translate('HeaderPeople');
|
||||||
} else {
|
} else {
|
||||||
page.querySelector('#peopleHeader').innerHTML = Globalize.translate('HeaderCastAndCrew');
|
page.querySelector('#peopleHeader').innerHTML = globalize.translate('HeaderCastAndCrew');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -519,7 +518,7 @@
|
||||||
if (overview) {
|
if (overview) {
|
||||||
elem.innerHTML = overview;
|
elem.innerHTML = overview;
|
||||||
|
|
||||||
elem.classList.remove('empty');
|
elem.classList.remove('hide');
|
||||||
|
|
||||||
var anchors = elem.querySelectorAll('a');
|
var anchors = elem.querySelectorAll('a');
|
||||||
for (var j = 0, length2 = anchors.length; j < length2; j++) {
|
for (var j = 0, length2 = anchors.length; j < length2; j++) {
|
||||||
|
@ -529,7 +528,7 @@
|
||||||
} else {
|
} else {
|
||||||
elem.innerHTML = '';
|
elem.innerHTML = '';
|
||||||
|
|
||||||
elem.classList.add('empty');
|
elem.classList.add('hide');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -539,10 +538,6 @@
|
||||||
renderSimilarItems(page, item, context);
|
renderSimilarItems(page, item, context);
|
||||||
renderMoreFromItems(page, item);
|
renderMoreFromItems(page, item);
|
||||||
|
|
||||||
if (!isStatic) {
|
|
||||||
renderSiblingLinks(page, item, context);
|
|
||||||
}
|
|
||||||
|
|
||||||
var taglineElement = page.querySelector('.tagline');
|
var taglineElement = page.querySelector('.tagline');
|
||||||
|
|
||||||
if (item.Taglines && item.Taglines.length) {
|
if (item.Taglines && item.Taglines.length) {
|
||||||
|
@ -552,30 +547,35 @@
|
||||||
taglineElement.classList.add('hide');
|
taglineElement.classList.add('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
var topOverview = page.querySelector('.topOverview');
|
var overview = page.querySelector('.overview');
|
||||||
var bottomOverview = page.querySelector('.bottomOverview');
|
|
||||||
|
|
||||||
var seasonOnBottom = screen.availHeight < 800 || screen.availWidth < 600;
|
renderOverview([overview], item);
|
||||||
|
|
||||||
if (item.Type == 'MusicAlbum' || item.Type == 'MusicArtist' || (item.Type == 'Season' && seasonOnBottom)) {
|
|
||||||
renderOverview([bottomOverview], item);
|
|
||||||
topOverview.classList.add('hide');
|
|
||||||
bottomOverview.classList.remove('hide');
|
|
||||||
} else {
|
|
||||||
renderOverview([topOverview], item);
|
|
||||||
topOverview.classList.remove('hide');
|
|
||||||
bottomOverview.classList.add('hide');
|
|
||||||
}
|
|
||||||
|
|
||||||
renderAwardSummary(page.querySelector('#awardSummary'), item);
|
renderAwardSummary(page.querySelector('#awardSummary'), item);
|
||||||
|
|
||||||
var i, length;
|
var i, length;
|
||||||
var itemMiscInfo = page.querySelectorAll('.itemMiscInfo');
|
var itemMiscInfo = page.querySelectorAll('.itemMiscInfo-primary');
|
||||||
for (i = 0, length = itemMiscInfo.length; i < length; i++) {
|
for (i = 0, length = itemMiscInfo.length; i < length; i++) {
|
||||||
mediaInfo.fillPrimaryMediaInfo(itemMiscInfo[i], item, {
|
mediaInfo.fillPrimaryMediaInfo(itemMiscInfo[i], item, {
|
||||||
interactive: true,
|
interactive: true,
|
||||||
episodeTitle: false
|
episodeTitle: false
|
||||||
});
|
});
|
||||||
|
if (itemMiscInfo[i].innerHTML) {
|
||||||
|
itemMiscInfo[i].classList.remove('hide');
|
||||||
|
} else {
|
||||||
|
itemMiscInfo[i].classList.add('hide');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
itemMiscInfo = page.querySelectorAll('.itemMiscInfo-secondary');
|
||||||
|
for (i = 0, length = itemMiscInfo.length; i < length; i++) {
|
||||||
|
mediaInfo.fillSecondaryMediaInfo(itemMiscInfo[i], item, {
|
||||||
|
interactive: true
|
||||||
|
});
|
||||||
|
if (itemMiscInfo[i].innerHTML) {
|
||||||
|
itemMiscInfo[i].classList.remove('hide');
|
||||||
|
} else {
|
||||||
|
itemMiscInfo[i].classList.add('hide');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var itemGenres = page.querySelectorAll('.itemGenres');
|
var itemGenres = page.querySelectorAll('.itemGenres');
|
||||||
for (i = 0, length = itemGenres.length; i < length; i++) {
|
for (i = 0, length = itemGenres.length; i < length; i++) {
|
||||||
|
@ -600,13 +600,13 @@
|
||||||
|
|
||||||
renderSeriesAirTime(page, item, isStatic);
|
renderSeriesAirTime(page, item, isStatic);
|
||||||
|
|
||||||
var playersElement = page.querySelector('#players');
|
var dateAddedElement = page.querySelector('#dateAdded');
|
||||||
|
|
||||||
if (item.Players) {
|
if (!item.IsFolder) {
|
||||||
playersElement.classList.remove('hide');
|
dateAddedElement.classList.remove('hide');
|
||||||
playersElement.innerHTML = item.Players + ' Player';
|
dateAddedElement.innerHTML = globalize.translate('DateAddedValue', datetime.toLocaleDateString(datetime.parseISO8601Date(item.DateCreated)));
|
||||||
} else {
|
} else {
|
||||||
playersElement.classList.add('hide');
|
dateAddedElement.classList.add('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
var artist = page.querySelectorAll('.artist');
|
var artist = page.querySelectorAll('.artist');
|
||||||
|
@ -631,8 +631,6 @@
|
||||||
} else {
|
} else {
|
||||||
page.querySelector('.photoInfo').classList.add('hide');
|
page.querySelector('.photoInfo').classList.add('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
renderTabButtons(page, item);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderPhotoInfo(page, item) {
|
function renderPhotoInfo(page, item) {
|
||||||
|
@ -642,30 +640,30 @@
|
||||||
var attributes = [];
|
var attributes = [];
|
||||||
|
|
||||||
if (item.CameraMake) {
|
if (item.CameraMake) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoCameraMake'), item.CameraMake));
|
attributes.push(createAttribute(globalize.translate('MediaInfoCameraMake'), item.CameraMake));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.CameraModel) {
|
if (item.CameraModel) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoCameraModel'), item.CameraModel));
|
attributes.push(createAttribute(globalize.translate('MediaInfoCameraModel'), item.CameraModel));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Altitude) {
|
if (item.Altitude) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoAltitude'), item.Altitude.toFixed(1)));
|
attributes.push(createAttribute(globalize.translate('MediaInfoAltitude'), item.Altitude.toFixed(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Aperture) {
|
if (item.Aperture) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoAperture'), 'F' + item.Aperture.toFixed(1)));
|
attributes.push(createAttribute(globalize.translate('MediaInfoAperture'), 'F' + item.Aperture.toFixed(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.ExposureTime) {
|
if (item.ExposureTime) {
|
||||||
|
|
||||||
var val = 1 / item.ExposureTime;
|
var val = 1 / item.ExposureTime;
|
||||||
|
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoExposureTime'), '1/' + val + ' s'));
|
attributes.push(createAttribute(globalize.translate('MediaInfoExposureTime'), '1/' + val + ' s'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.FocalLength) {
|
if (item.FocalLength) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoFocalLength'), item.FocalLength.toFixed(1) + ' mm'));
|
attributes.push(createAttribute(globalize.translate('MediaInfoFocalLength'), item.FocalLength.toFixed(1) + ' mm'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.ImageOrientation) {
|
if (item.ImageOrientation) {
|
||||||
|
@ -673,23 +671,23 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.IsoSpeedRating) {
|
if (item.IsoSpeedRating) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoIsoSpeedRating'), item.IsoSpeedRating));
|
attributes.push(createAttribute(globalize.translate('MediaInfoIsoSpeedRating'), item.IsoSpeedRating));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Latitude) {
|
if (item.Latitude) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoLatitude'), item.Latitude.toFixed(1)));
|
attributes.push(createAttribute(globalize.translate('MediaInfoLatitude'), item.Latitude.toFixed(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Longitude) {
|
if (item.Longitude) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoLongitude'), item.Longitude.toFixed(1)));
|
attributes.push(createAttribute(globalize.translate('MediaInfoLongitude'), item.Longitude.toFixed(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.ShutterSpeed) {
|
if (item.ShutterSpeed) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoShutterSpeed'), item.ShutterSpeed));
|
attributes.push(createAttribute(globalize.translate('MediaInfoShutterSpeed'), item.ShutterSpeed));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Software) {
|
if (item.Software) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoSoftware'), item.Software));
|
attributes.push(createAttribute(globalize.translate('MediaInfoSoftware'), item.Software));
|
||||||
}
|
}
|
||||||
|
|
||||||
html += attributes.join('<br/>');
|
html += attributes.join('<br/>');
|
||||||
|
@ -697,20 +695,6 @@
|
||||||
page.querySelector('.photoInfoContent').innerHTML = html;
|
page.querySelector('.photoInfoContent').innerHTML = html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderTabButtons(page, item) {
|
|
||||||
|
|
||||||
var elem = page.querySelector('.tabDetails');
|
|
||||||
var text = elem.textContent || elem.innerText || '';
|
|
||||||
|
|
||||||
if (text.trim()) {
|
|
||||||
|
|
||||||
page.querySelector('.detailsSection').classList.remove('hide');
|
|
||||||
|
|
||||||
} else {
|
|
||||||
page.querySelector('.detailsSection').classList.add('hide');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getArtistLinksHtml(artists, context) {
|
function getArtistLinksHtml(artists, context) {
|
||||||
|
|
||||||
var html = [];
|
var html = [];
|
||||||
|
@ -726,82 +710,15 @@
|
||||||
html = html.join(' / ');
|
html = html.join(' / ');
|
||||||
|
|
||||||
if (artists.length == 1) {
|
if (artists.length == 1) {
|
||||||
return Globalize.translate('ValueArtist', html);
|
return globalize.translate('ValueArtist', html);
|
||||||
}
|
}
|
||||||
if (artists.length > 1) {
|
if (artists.length > 1) {
|
||||||
return Globalize.translate('ValueArtists', html);
|
return globalize.translate('ValueArtists', html);
|
||||||
}
|
}
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderSiblingLinks(page, item, context) {
|
|
||||||
|
|
||||||
var lnkPreviousItem = page.querySelector('.lnkPreviousItem');
|
|
||||||
var lnkNextItem = page.querySelector('.lnkNextItem');
|
|
||||||
|
|
||||||
if ((item.Type != "Episode" && item.Type != "Season" && item.Type != "Audio" && item.Type != "Photo")) {
|
|
||||||
lnkNextItem.classList.add('hide');
|
|
||||||
lnkPreviousItem.classList.add('hide');
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var promise;
|
|
||||||
|
|
||||||
if (item.Type == "Season") {
|
|
||||||
|
|
||||||
promise = ApiClient.getSeasons(item.SeriesId, {
|
|
||||||
|
|
||||||
userId: Dashboard.getCurrentUserId(),
|
|
||||||
AdjacentTo: item.Id
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else if (item.Type == "Episode" && item.SeasonId) {
|
|
||||||
|
|
||||||
// Use dedicated episodes endpoint
|
|
||||||
promise = ApiClient.getEpisodes(item.SeriesId, {
|
|
||||||
|
|
||||||
seasonId: item.SeasonId,
|
|
||||||
userId: Dashboard.getCurrentUserId(),
|
|
||||||
AdjacentTo: item.Id
|
|
||||||
});
|
|
||||||
|
|
||||||
} else {
|
|
||||||
promise = ApiClient.getItems(Dashboard.getCurrentUserId(), {
|
|
||||||
AdjacentTo: item.Id,
|
|
||||||
ParentId: item.ParentId,
|
|
||||||
SortBy: 'SortName'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
context = context || '';
|
|
||||||
|
|
||||||
promise.then(function (result) {
|
|
||||||
|
|
||||||
var foundExisting = false;
|
|
||||||
|
|
||||||
for (var i = 0, length = result.Items.length; i < length; i++) {
|
|
||||||
|
|
||||||
var curr = result.Items[i];
|
|
||||||
|
|
||||||
if (curr.Id == item.Id) {
|
|
||||||
foundExisting = true;
|
|
||||||
}
|
|
||||||
else if (!foundExisting) {
|
|
||||||
|
|
||||||
lnkPreviousItem.classList.remove('hide');
|
|
||||||
lnkPreviousItem.href = 'itemdetails.html?id=' + curr.Id + '&context=' + context;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
lnkNextItem.classList.remove('hide');
|
|
||||||
lnkNextItem.href = 'itemdetails.html?id=' + curr.Id + '&context=' + context;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function enableScrollX() {
|
function enableScrollX() {
|
||||||
return browserInfo.mobile && AppInfo.enableAppLayouts && screen.availWidth <= 1000;
|
return browserInfo.mobile && AppInfo.enableAppLayouts && screen.availWidth <= 1000;
|
||||||
}
|
}
|
||||||
|
@ -856,7 +773,7 @@
|
||||||
}
|
}
|
||||||
moreFromSection.classList.remove('hide');
|
moreFromSection.classList.remove('hide');
|
||||||
|
|
||||||
moreFromSection.querySelector('.moreFromHeader').innerHTML = Globalize.translate('MoreFromValue', item.AlbumArtists[0].Name);
|
moreFromSection.querySelector('.moreFromHeader').innerHTML = globalize.translate('MoreFromValue', item.AlbumArtists[0].Name);
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
|
@ -1016,7 +933,7 @@
|
||||||
if (item.Tags && item.Tags.length) {
|
if (item.Tags && item.Tags.length) {
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
html += '<p>' + Globalize.translate('HeaderTags') + '</p>';
|
html += '<p>' + globalize.translate('HeaderTags') + '</p>';
|
||||||
for (var i = 0, length = item.Tags.length; i < length; i++) {
|
for (var i = 0, length = item.Tags.length; i < length; i++) {
|
||||||
|
|
||||||
html += '<div class="itemTag">' + item.Tags[i] + '</div>';
|
html += '<div class="itemTag">' + item.Tags[i] + '</div>';
|
||||||
|
@ -1199,11 +1116,11 @@
|
||||||
if (item.Type == "BoxSet") {
|
if (item.Type == "BoxSet") {
|
||||||
|
|
||||||
var collectionItemTypes = [
|
var collectionItemTypes = [
|
||||||
{ name: Globalize.translate('HeaderMovies'), type: 'Movie' },
|
{ name: globalize.translate('HeaderMovies'), type: 'Movie' },
|
||||||
{ name: Globalize.translate('HeaderSeries'), type: 'Series' },
|
{ name: globalize.translate('HeaderSeries'), type: 'Series' },
|
||||||
{ name: Globalize.translate('HeaderAlbums'), type: 'MusicAlbum' },
|
{ name: globalize.translate('HeaderAlbums'), type: 'MusicAlbum' },
|
||||||
{ name: Globalize.translate('HeaderGames'), type: 'Game' },
|
{ name: globalize.translate('HeaderGames'), type: 'Game' },
|
||||||
{ name: Globalize.translate('HeaderBooks'), type: 'Book' }
|
{ name: globalize.translate('HeaderBooks'), type: 'Book' }
|
||||||
];
|
];
|
||||||
|
|
||||||
renderCollectionItems(page, item, collectionItemTypes, result.Items);
|
renderCollectionItems(page, item, collectionItemTypes, result.Items);
|
||||||
|
@ -1211,19 +1128,19 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
if (item.Type == "Season") {
|
if (item.Type == "Season") {
|
||||||
page.querySelector('#childrenTitle').innerHTML = Globalize.translate('HeaderEpisodes');
|
page.querySelector('#childrenTitle').innerHTML = globalize.translate('HeaderEpisodes');
|
||||||
}
|
}
|
||||||
else if (item.Type == "Series") {
|
else if (item.Type == "Series") {
|
||||||
page.querySelector('#childrenTitle').innerHTML = Globalize.translate('HeaderSeasons');
|
page.querySelector('#childrenTitle').innerHTML = globalize.translate('HeaderSeasons');
|
||||||
}
|
}
|
||||||
else if (item.Type == "MusicAlbum") {
|
else if (item.Type == "MusicAlbum") {
|
||||||
page.querySelector('#childrenTitle').innerHTML = Globalize.translate('HeaderTracks');
|
page.querySelector('#childrenTitle').innerHTML = globalize.translate('HeaderTracks');
|
||||||
}
|
}
|
||||||
else if (item.Type == "GameSystem") {
|
else if (item.Type == "GameSystem") {
|
||||||
page.querySelector('#childrenTitle').innerHTML = Globalize.translate('HeaderGames');
|
page.querySelector('#childrenTitle').innerHTML = globalize.translate('HeaderGames');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
page.querySelector('#childrenTitle').innerHTML = Globalize.translate('HeaderItems');
|
page.querySelector('#childrenTitle').innerHTML = globalize.translate('HeaderItems');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Type == "MusicAlbum") {
|
if (item.Type == "MusicAlbum") {
|
||||||
|
@ -1324,7 +1241,7 @@
|
||||||
|
|
||||||
var context = inferContext(item);
|
var context = inferContext(item);
|
||||||
|
|
||||||
if (item.Studios && item.Studios.length && item.Type != "Series") {
|
if (item.Studios && item.Studios.length && item.Type != "Series" && false) {
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
|
@ -1346,7 +1263,7 @@
|
||||||
|
|
||||||
var translationKey = item.Studios.length > 1 ? "ValueStudios" : "ValueStudio";
|
var translationKey = item.Studios.length > 1 ? "ValueStudios" : "ValueStudio";
|
||||||
|
|
||||||
html = Globalize.translate(translationKey, html);
|
html = globalize.translate(translationKey, html);
|
||||||
|
|
||||||
elem.innerHTML = html;
|
elem.innerHTML = html;
|
||||||
elem.classList.remove('hide');
|
elem.classList.remove('hide');
|
||||||
|
@ -1371,7 +1288,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
html += '<span> / </span>';
|
html += '•';
|
||||||
}
|
}
|
||||||
|
|
||||||
var param = item.Type == "Audio" || item.Type == "MusicArtist" || item.Type == "MusicAlbum" ? "musicgenre" : "genre";
|
var param = item.Type == "Audio" || item.Type == "MusicArtist" || item.Type == "MusicAlbum" ? "musicgenre" : "genre";
|
||||||
|
@ -1409,7 +1326,7 @@
|
||||||
function renderAwardSummary(elem, item) {
|
function renderAwardSummary(elem, item) {
|
||||||
if (item.AwardSummary) {
|
if (item.AwardSummary) {
|
||||||
elem.classList.remove('hide');
|
elem.classList.remove('hide');
|
||||||
elem.innerHTML = Globalize.translate('ValueAwards', item.AwardSummary);
|
elem.innerHTML = globalize.translate('ValueAwards', item.AwardSummary);
|
||||||
} else {
|
} else {
|
||||||
elem.classList.add('hide');
|
elem.classList.add('hide');
|
||||||
}
|
}
|
||||||
|
@ -1436,7 +1353,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var otherType = { name: Globalize.translate('HeaderOtherItems') };
|
var otherType = { name: globalize.translate('HeaderOtherItems') };
|
||||||
|
|
||||||
var otherTypeItems = items.filter(function (curr) {
|
var otherTypeItems = items.filter(function (curr) {
|
||||||
|
|
||||||
|
@ -1453,7 +1370,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!items.length) {
|
if (!items.length) {
|
||||||
renderCollectionItemType(page, parentItem, { name: Globalize.translate('HeaderItems') }, items);
|
renderCollectionItemType(page, parentItem, { name: globalize.translate('HeaderItems') }, items);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1498,8 +1415,8 @@
|
||||||
collectionItems.querySelector('.btnAddToCollection').addEventListener('click', function () {
|
collectionItems.querySelector('.btnAddToCollection').addEventListener('click', function () {
|
||||||
require(['alert'], function (alert) {
|
require(['alert'], function (alert) {
|
||||||
alert({
|
alert({
|
||||||
text: Globalize.translate('AddItemToCollectionHelp'),
|
text: globalize.translate('AddItemToCollectionHelp'),
|
||||||
html: Globalize.translate('AddItemToCollectionHelp') + '<br/><br/><a target="_blank" href="https://github.com/MediaBrowser/Wiki/wiki/Collections">' + Globalize.translate('ButtonLearnMore') + '</a>'
|
html: globalize.translate('AddItemToCollectionHelp') + '<br/><br/><a target="_blank" href="https://github.com/MediaBrowser/Wiki/wiki/Collections">' + globalize.translate('ButtonLearnMore') + '</a>'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1597,7 +1514,7 @@
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
if (review.Url) {
|
if (review.Url) {
|
||||||
html += '<div class="secondary listItemBodyText"><a class="textlink" href="' + review.Url + '" target="_blank">' + Globalize.translate('ButtonFullReview') + '</a></div>';
|
html += '<div class="secondary listItemBodyText"><a class="textlink" href="' + review.Url + '" target="_blank">' + globalize.translate('ButtonFullReview') + '</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
@ -1607,7 +1524,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (limit && result.TotalRecordCount > limit) {
|
if (limit && result.TotalRecordCount > limit) {
|
||||||
html += '<p style="margin: 0;"><button is="emby-button" type="button" class="raised more moreCriticReviews">' + Globalize.translate('ButtonMore') + '</button></p>';
|
html += '<p style="margin: 0;"><button is="emby-button" type="button" class="raised more moreCriticReviews">' + globalize.translate('ButtonMore') + '</button></p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
var criticReviewsContent = page.querySelector('#criticReviewsContent');
|
var criticReviewsContent = page.querySelector('#criticReviewsContent');
|
||||||
|
@ -1712,25 +1629,17 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderScenes(page, item, user, limit, isStatic) {
|
function renderScenes(page, item, user) {
|
||||||
|
|
||||||
var chapters = item.Chapters || [];
|
var chapters = item.Chapters || [];
|
||||||
var scenesContent = page.querySelector('#scenesContent');
|
var scenesContent = page.querySelector('#scenesContent');
|
||||||
|
|
||||||
if (enableScrollX()) {
|
if (enableScrollX()) {
|
||||||
scenesContent.classList.add('smoothScrollX');
|
scenesContent.classList.add('smoothScrollX');
|
||||||
limit = null;
|
|
||||||
} else {
|
} else {
|
||||||
scenesContent.classList.add('vertical-wrap');
|
scenesContent.classList.add('vertical-wrap');
|
||||||
}
|
}
|
||||||
|
|
||||||
var limitExceeded = limit && chapters.length > limit;
|
|
||||||
|
|
||||||
if (limitExceeded) {
|
|
||||||
chapters = chapters.slice(0);
|
|
||||||
chapters.length = Math.min(limit, chapters.length);
|
|
||||||
}
|
|
||||||
|
|
||||||
require(['chaptercardbuilder'], function (chaptercardbuilder) {
|
require(['chaptercardbuilder'], function (chaptercardbuilder) {
|
||||||
|
|
||||||
chaptercardbuilder.buildChapterCards(item, chapters, {
|
chaptercardbuilder.buildChapterCards(item, chapters, {
|
||||||
|
@ -1741,15 +1650,6 @@
|
||||||
squareShape: getSquareShape()
|
squareShape: getSquareShape()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
var moreScenesButton = page.querySelector('.moreScenes');
|
|
||||||
if (moreScenesButton) {
|
|
||||||
if (limitExceeded) {
|
|
||||||
moreScenesButton.classList.remove('hide');
|
|
||||||
} else {
|
|
||||||
moreScenesButton.classList.add('hide');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderMediaSources(page, user, item) {
|
function renderMediaSources(page, user, item) {
|
||||||
|
@ -1786,22 +1686,22 @@
|
||||||
|
|
||||||
html += '<div class="mediaInfoStream">';
|
html += '<div class="mediaInfoStream">';
|
||||||
|
|
||||||
var displayType = Globalize.translate('MediaInfoStreamType' + stream.Type);
|
var displayType = globalize.translate('MediaInfoStreamType' + stream.Type);
|
||||||
|
|
||||||
html += '<h3 class="mediaInfoStreamType">' + displayType + '</h3>';
|
html += '<h3 class="mediaInfoStreamType">' + displayType + '</h3>';
|
||||||
|
|
||||||
var attributes = [];
|
var attributes = [];
|
||||||
|
|
||||||
if (stream.Language && stream.Type != "Video") {
|
if (stream.Language && stream.Type != "Video") {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoLanguage'), stream.Language));
|
attributes.push(createAttribute(globalize.translate('MediaInfoLanguage'), stream.Language));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.Codec) {
|
if (stream.Codec) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoCodec'), stream.Codec.toUpperCase()));
|
attributes.push(createAttribute(globalize.translate('MediaInfoCodec'), stream.Codec.toUpperCase()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.CodecTag) {
|
if (stream.CodecTag) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoCodecTag'), stream.CodecTag));
|
attributes.push(createAttribute(globalize.translate('MediaInfoCodecTag'), stream.CodecTag));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.IsAVC != null) {
|
if (stream.IsAVC != null) {
|
||||||
|
@ -1809,58 +1709,58 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.Profile) {
|
if (stream.Profile) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoProfile'), stream.Profile));
|
attributes.push(createAttribute(globalize.translate('MediaInfoProfile'), stream.Profile));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.Level) {
|
if (stream.Level) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoLevel'), stream.Level));
|
attributes.push(createAttribute(globalize.translate('MediaInfoLevel'), stream.Level));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.Width || stream.Height) {
|
if (stream.Width || stream.Height) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoResolution'), stream.Width + 'x' + stream.Height));
|
attributes.push(createAttribute(globalize.translate('MediaInfoResolution'), stream.Width + 'x' + stream.Height));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.AspectRatio && stream.Codec != "mjpeg") {
|
if (stream.AspectRatio && stream.Codec != "mjpeg") {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoAspectRatio'), stream.AspectRatio));
|
attributes.push(createAttribute(globalize.translate('MediaInfoAspectRatio'), stream.AspectRatio));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.Type == "Video") {
|
if (stream.Type == "Video") {
|
||||||
if (stream.IsAnamorphic != null) {
|
if (stream.IsAnamorphic != null) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoAnamorphic'), (stream.IsAnamorphic ? 'Yes' : 'No')));
|
attributes.push(createAttribute(globalize.translate('MediaInfoAnamorphic'), (stream.IsAnamorphic ? 'Yes' : 'No')));
|
||||||
}
|
}
|
||||||
|
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoInterlaced'), (stream.IsInterlaced ? 'Yes' : 'No')));
|
attributes.push(createAttribute(globalize.translate('MediaInfoInterlaced'), (stream.IsInterlaced ? 'Yes' : 'No')));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.AverageFrameRate || stream.RealFrameRate) {
|
if (stream.AverageFrameRate || stream.RealFrameRate) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoFramerate'), (stream.AverageFrameRate || stream.RealFrameRate)));
|
attributes.push(createAttribute(globalize.translate('MediaInfoFramerate'), (stream.AverageFrameRate || stream.RealFrameRate)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.ChannelLayout) {
|
if (stream.ChannelLayout) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoLayout'), stream.ChannelLayout));
|
attributes.push(createAttribute(globalize.translate('MediaInfoLayout'), stream.ChannelLayout));
|
||||||
}
|
}
|
||||||
if (stream.Channels) {
|
if (stream.Channels) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoChannels'), stream.Channels + ' ch'));
|
attributes.push(createAttribute(globalize.translate('MediaInfoChannels'), stream.Channels + ' ch'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.BitRate && stream.Codec != "mjpeg") {
|
if (stream.BitRate && stream.Codec != "mjpeg") {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoBitrate'), (parseInt(stream.BitRate / 1000)) + ' kbps'));
|
attributes.push(createAttribute(globalize.translate('MediaInfoBitrate'), (parseInt(stream.BitRate / 1000)) + ' kbps'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.SampleRate) {
|
if (stream.SampleRate) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoSampleRate'), stream.SampleRate + ' Hz'));
|
attributes.push(createAttribute(globalize.translate('MediaInfoSampleRate'), stream.SampleRate + ' Hz'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.BitDepth) {
|
if (stream.BitDepth) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoBitDepth'), stream.BitDepth + ' bit'));
|
attributes.push(createAttribute(globalize.translate('MediaInfoBitDepth'), stream.BitDepth + ' bit'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.PixelFormat) {
|
if (stream.PixelFormat) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoPixelFormat'), stream.PixelFormat));
|
attributes.push(createAttribute(globalize.translate('MediaInfoPixelFormat'), stream.PixelFormat));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.RefFrames) {
|
if (stream.RefFrames) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoRefFrames'), stream.RefFrames));
|
attributes.push(createAttribute(globalize.translate('MediaInfoRefFrames'), stream.RefFrames));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.NalLengthSize) {
|
if (stream.NalLengthSize) {
|
||||||
|
@ -1868,15 +1768,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.Type != "Video") {
|
if (stream.Type != "Video") {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoDefault'), (stream.IsDefault ? 'Yes' : 'No')));
|
attributes.push(createAttribute(globalize.translate('MediaInfoDefault'), (stream.IsDefault ? 'Yes' : 'No')));
|
||||||
}
|
}
|
||||||
if (stream.Type == "Subtitle") {
|
if (stream.Type == "Subtitle") {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoForced'), (stream.IsForced ? 'Yes' : 'No')));
|
attributes.push(createAttribute(globalize.translate('MediaInfoForced'), (stream.IsForced ? 'Yes' : 'No')));
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoExternal'), (stream.IsExternal ? 'Yes' : 'No')));
|
attributes.push(createAttribute(globalize.translate('MediaInfoExternal'), (stream.IsExternal ? 'Yes' : 'No')));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.Type == "Video" && version.Timestamp) {
|
if (stream.Type == "Video" && version.Timestamp) {
|
||||||
attributes.push(createAttribute(Globalize.translate('MediaInfoTimestamp'), version.Timestamp));
|
attributes.push(createAttribute(globalize.translate('MediaInfoTimestamp'), version.Timestamp));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream.DisplayTitle) {
|
if (stream.DisplayTitle) {
|
||||||
|
@ -1889,7 +1789,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version.Container) {
|
if (version.Container) {
|
||||||
html += '<div><span class="mediaInfoLabel">' + Globalize.translate('MediaInfoContainer') + '</span><span class="mediaInfoAttribute">' + version.Container + '</span></div>';
|
html += '<div><span class="mediaInfoLabel">' + globalize.translate('MediaInfoContainer') + '</span><span class="mediaInfoAttribute">' + version.Container + '</span></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version.Formats && version.Formats.length) {
|
if (version.Formats && version.Formats.length) {
|
||||||
|
@ -1897,14 +1797,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version.Path && version.Protocol != 'Http' && user && user.Policy.IsAdministrator) {
|
if (version.Path && version.Protocol != 'Http' && user && user.Policy.IsAdministrator) {
|
||||||
html += '<div style="max-width:600px;overflow:hidden;"><span class="mediaInfoLabel">' + Globalize.translate('MediaInfoPath') + '</span><span class="mediaInfoAttribute">' + version.Path + '</span></div>';
|
html += '<div style="max-width:600px;overflow:hidden;"><span class="mediaInfoLabel">' + globalize.translate('MediaInfoPath') + '</span><span class="mediaInfoAttribute">' + version.Path + '</span></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version.Size) {
|
if (version.Size) {
|
||||||
|
|
||||||
var size = (version.Size / (1024 * 1024)).toFixed(0);
|
var size = (version.Size / (1024 * 1024)).toFixed(0);
|
||||||
|
|
||||||
html += '<div><span class="mediaInfoLabel">' + Globalize.translate('MediaInfoSize') + '</span><span class="mediaInfoAttribute">' + size + ' MB</span></div>';
|
html += '<div><span class="mediaInfoLabel">' + globalize.translate('MediaInfoSize') + '</span><span class="mediaInfoAttribute">' + size + ' MB</span></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
|
@ -1926,7 +1826,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
if (limit && items.length > limit) {
|
if (limit && items.length > limit) {
|
||||||
html += '<p style="margin: 0;padding-left:5px;"><button is="emby-button" type="button" class="raised more ' + moreButtonClass + '">' + Globalize.translate('ButtonMore') + '</button></p>';
|
html += '<p style="margin: 0;padding-left:5px;"><button is="emby-button" type="button" class="raised more ' + moreButtonClass + '">' + globalize.translate('ButtonMore') + '</button></p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
|
@ -2015,6 +1915,12 @@
|
||||||
|
|
||||||
function playTrailer(page) {
|
function playTrailer(page) {
|
||||||
|
|
||||||
|
if (!currentItem.LocalTrailerCount) {
|
||||||
|
|
||||||
|
shell.openUrl(currentItem.RemoteTrailers[0].Url);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ApiClient.getLocalTrailers(Dashboard.getCurrentUserId(), currentItem.Id).then(function (trailers) {
|
ApiClient.getLocalTrailers(Dashboard.getCurrentUserId(), currentItem.Id).then(function (trailers) {
|
||||||
|
|
||||||
MediaController.play({ items: trailers });
|
MediaController.play({ items: trailers });
|
||||||
|
@ -2053,14 +1959,14 @@
|
||||||
|
|
||||||
require(['confirm'], function (confirm) {
|
require(['confirm'], function (confirm) {
|
||||||
|
|
||||||
confirm(Globalize.translate('MessageConfirmRecordingCancellation'), Globalize.translate('HeaderConfirmRecordingCancellation')).then(function () {
|
confirm(globalize.translate('MessageConfirmRecordingCancellation'), globalize.translate('HeaderConfirmRecordingCancellation')).then(function () {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
ApiClient.cancelLiveTvTimer(id).then(function () {
|
ApiClient.cancelLiveTvTimer(id).then(function () {
|
||||||
|
|
||||||
require(['toast'], function (toast) {
|
require(['toast'], function (toast) {
|
||||||
toast(Globalize.translate('MessageRecordingCancelled'));
|
toast(globalize.translate('MessageRecordingCancelled'));
|
||||||
});
|
});
|
||||||
|
|
||||||
reload(page, params);
|
reload(page, params);
|
||||||
|
@ -2088,15 +1994,6 @@
|
||||||
playCurrentItem(this);
|
playCurrentItem(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSyncClick() {
|
|
||||||
require(['syncDialog'], function (syncDialog) {
|
|
||||||
syncDialog.showMenu({
|
|
||||||
items: [currentItem],
|
|
||||||
serverId: ApiClient.serverId()
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return function (view, params) {
|
return function (view, params) {
|
||||||
|
|
||||||
function resetSyncStatus() {
|
function resetSyncStatus() {
|
||||||
|
@ -2120,7 +2017,7 @@
|
||||||
|
|
||||||
require(['confirm'], function (confirm) {
|
require(['confirm'], function (confirm) {
|
||||||
|
|
||||||
confirm(Globalize.translate('ConfirmRemoveDownload')).then(function () {
|
confirm(globalize.translate('ConfirmRemoveDownload')).then(function () {
|
||||||
ApiClient.cancelSyncItems([currentItem.Id]);
|
ApiClient.cancelSyncItems([currentItem.Id]);
|
||||||
}, resetSyncStatus);
|
}, resetSyncStatus);
|
||||||
});
|
});
|
||||||
|
@ -2176,11 +2073,6 @@
|
||||||
splitVersions(view, params);
|
splitVersions(view, params);
|
||||||
});
|
});
|
||||||
|
|
||||||
elems = view.querySelectorAll('.btnSync');
|
|
||||||
for (i = 0, length = elems.length; i < length; i++) {
|
|
||||||
elems[i].addEventListener('click', onSyncClick);
|
|
||||||
}
|
|
||||||
|
|
||||||
elems = view.querySelectorAll('.chkOffline');
|
elems = view.querySelectorAll('.chkOffline');
|
||||||
for (i = 0, length = elems.length; i < length; i++) {
|
for (i = 0, length = elems.length; i < length; i++) {
|
||||||
elems[i].addEventListener('change', onSyncLocalClick);
|
elems[i].addEventListener('change', onSyncLocalClick);
|
||||||
|
|
|
@ -454,8 +454,6 @@
|
||||||
includeParentInfo: false
|
includeParentInfo: false
|
||||||
});
|
});
|
||||||
|
|
||||||
LibraryMenu.setTitle(name);
|
|
||||||
|
|
||||||
if (linkToElement) {
|
if (linkToElement) {
|
||||||
nameElem.innerHTML = '<a class="detailPageParentLink" href="' + LibraryBrowser.getHref(item, context) + '">' + name + '</a>';
|
nameElem.innerHTML = '<a class="detailPageParentLink" href="' + LibraryBrowser.getHref(item, context) + '">' + name + '</a>';
|
||||||
} else {
|
} else {
|
||||||
|
@ -803,30 +801,6 @@
|
||||||
});
|
});
|
||||||
shape = 'square';
|
shape = 'square';
|
||||||
}
|
}
|
||||||
else if (item.MediaType == "Audio" || item.Type == "MusicAlbum" || item.Type == "MusicGenre") {
|
|
||||||
url = "css/images/items/detail/audio.png";
|
|
||||||
shape = 'square';
|
|
||||||
}
|
|
||||||
else if (item.MediaType == "Game" || item.Type == "GameGenre") {
|
|
||||||
url = "css/images/items/detail/game.png";
|
|
||||||
shape = 'square';
|
|
||||||
}
|
|
||||||
else if (item.Type == "Person") {
|
|
||||||
url = "css/images/items/detail/person.png";
|
|
||||||
shape = 'square';
|
|
||||||
}
|
|
||||||
else if (item.Type == "Genre" || item.Type == "Studio") {
|
|
||||||
url = "css/images/items/detail/video.png";
|
|
||||||
shape = 'square';
|
|
||||||
}
|
|
||||||
else if (item.Type == "TvChannel") {
|
|
||||||
url = "css/images/items/detail/tv.png";
|
|
||||||
shape = 'square';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
url = "css/images/items/detail/video.png";
|
|
||||||
shape = 'square';
|
|
||||||
}
|
|
||||||
|
|
||||||
html += '<div style="position:relative;">';
|
html += '<div style="position:relative;">';
|
||||||
|
|
||||||
|
@ -876,6 +850,7 @@
|
||||||
elem.classList.remove('squareDetailImageContainer');
|
elem.classList.remove('squareDetailImageContainer');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (url) {
|
||||||
var img = elem.querySelector('img');
|
var img = elem.querySelector('img');
|
||||||
img.onload = function () {
|
img.onload = function () {
|
||||||
if (img.src.indexOf('empty.png') == -1) {
|
if (img.src.indexOf('empty.png') == -1) {
|
||||||
|
@ -883,6 +858,7 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
imageLoader.lazyImage(img, url);
|
imageLoader.lazyImage(img, url);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
renderDetailPageBackdrop: function (page, item, imageLoader) {
|
renderDetailPageBackdrop: function (page, item, imageLoader) {
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
|
|
||||||
require(['apphost'], function (apphost) {
|
require(['apphost'], function (apphost) {
|
||||||
if (apphost.supports('voiceinput')) {
|
if (apphost.supports('voiceinput')) {
|
||||||
header.querySelector('.headerVoiceButton').classList.remove('hide');
|
header.querySelector('.headerVoiceButton').classList.add('hide');
|
||||||
} else {
|
} else {
|
||||||
header.querySelector('.headerVoiceButton').classList.add('hide');
|
header.querySelector('.headerVoiceButton').classList.add('hide');
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,6 +170,7 @@
|
||||||
"OptionPlayCount": "Play Count",
|
"OptionPlayCount": "Play Count",
|
||||||
"OptionDatePlayed": "Date Played",
|
"OptionDatePlayed": "Date Played",
|
||||||
"OptionDateAdded": "Date Added",
|
"OptionDateAdded": "Date Added",
|
||||||
|
"DateAddedValue": "Date added: {0}",
|
||||||
"OptionAlbumArtist": "Album Artist",
|
"OptionAlbumArtist": "Album Artist",
|
||||||
"OptionArtist": "Artist",
|
"OptionArtist": "Artist",
|
||||||
"OptionAlbum": "Album",
|
"OptionAlbum": "Album",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue