From ba214a02af3a8dae30f90eec9c2a1be7fdadb660 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 25 Nov 2017 23:40:28 -0500 Subject: [PATCH] update list components --- .../alphapicker/alphapicker.js | 2 +- .../emby-webcomponents/alphapicker/style.css | 2 +- .../emby-webcomponents/cardbuilder/card.css | 2 +- .../cardbuilder/cardbuilder.js | 4 +-- .../dialoghelper/dialoghelper.js | 2 +- .../emby-button/emby-button.css | 2 +- .../emby-itemscontainer.js | 2 +- .../emby-scroller/emby-scroller.js | 2 +- .../emby-webcomponents/emby-tabs/emby-tabs.js | 2 +- .../emby-webcomponents/flexstyles.css | 2 +- .../guide/tvguide.template.html | 4 +-- .../emby-webcomponents/headroom/headroom.js | 2 +- .../emby-webcomponents/maintabsmanager.js | 2 +- .../multiselect/multiselect.js | 2 +- .../scroller/smoothscroller.js | 2 +- .../emby-webcomponents/scrollstyles.css | 2 +- .../search/searchresults.js | 2 +- .../emby-webcomponents/shortcuts.js | 2 +- .../emby-webcomponents/strings/ar.json | 4 ++- .../emby-webcomponents/strings/be-by.json | 4 ++- .../emby-webcomponents/strings/bg-bg.json | 4 ++- .../emby-webcomponents/strings/ca.json | 28 ++++++++------- .../emby-webcomponents/strings/cs.json | 4 ++- .../emby-webcomponents/strings/da.json | 4 ++- .../emby-webcomponents/strings/de.json | 4 ++- .../emby-webcomponents/strings/el.json | 4 ++- .../emby-webcomponents/strings/en-gb.json | 4 ++- .../emby-webcomponents/strings/en-us.json | 5 ++- .../emby-webcomponents/strings/es-ar.json | 4 ++- .../emby-webcomponents/strings/es-mx.json | 6 ++-- .../emby-webcomponents/strings/es.json | 4 ++- .../emby-webcomponents/strings/fi.json | 4 ++- .../emby-webcomponents/strings/fr-ca.json | 4 ++- .../emby-webcomponents/strings/fr.json | 6 ++-- .../emby-webcomponents/strings/gsw.json | 4 ++- .../emby-webcomponents/strings/he.json | 4 ++- .../emby-webcomponents/strings/hr.json | 4 ++- .../emby-webcomponents/strings/hu.json | 4 ++- .../emby-webcomponents/strings/id.json | 4 ++- .../emby-webcomponents/strings/it.json | 4 ++- .../emby-webcomponents/strings/kk.json | 6 ++-- .../emby-webcomponents/strings/ko.json | 4 ++- .../emby-webcomponents/strings/lt-lt.json | 4 ++- .../emby-webcomponents/strings/ms.json | 4 ++- .../emby-webcomponents/strings/nb.json | 4 ++- .../emby-webcomponents/strings/nl.json | 4 ++- .../emby-webcomponents/strings/pl.json | 6 ++-- .../emby-webcomponents/strings/pt-br.json | 4 ++- .../emby-webcomponents/strings/pt-pt.json | 4 ++- .../emby-webcomponents/strings/ro.json | 4 ++- .../emby-webcomponents/strings/ru.json | 6 ++-- .../emby-webcomponents/strings/sk.json | 8 +++-- .../emby-webcomponents/strings/sl-si.json | 4 ++- .../emby-webcomponents/strings/sv.json | 4 ++- .../emby-webcomponents/strings/tr.json | 4 ++- .../emby-webcomponents/strings/uk.json | 4 ++- .../emby-webcomponents/strings/vi.json | 4 ++- .../emby-webcomponents/strings/zh-cn.json | 4 ++- .../emby-webcomponents/strings/zh-hk.json | 4 ++- .../emby-webcomponents/strings/zh-tw.json | 4 ++- .../emby-webcomponents/tabbedview/itemstab.js | 1 + .../{ => tabbedview}/tabbedview.js | 2 +- .../themes/dark-green/theme.css | 2 +- .../themes/dark-red/theme.css | 2 +- .../emby-webcomponents/themes/dark/theme.css | 2 +- .../themes/halloween/theme.css | 2 +- .../themes/verydark/theme.css | 2 +- .../viewsettings/viewsettings.js | 1 + .../viewsettings/viewsettings.template.html | 36 +++++++++++++++++++ dashboard-ui/components/favoriteitems.js | 2 +- dashboard-ui/css/librarybrowser.css | 2 +- dashboard-ui/dashboard/librarysettings.js | 2 +- dashboard-ui/librarysettings.html | 2 +- dashboard-ui/scripts/episodes.js | 2 +- dashboard-ui/scripts/itemdetailpage.js | 2 +- dashboard-ui/scripts/librarybrowser.js | 2 +- dashboard-ui/scripts/livetvcomponents.js | 2 +- dashboard-ui/scripts/livetvschedule.js | 2 +- dashboard-ui/scripts/livetvsuggested.js | 2 +- dashboard-ui/scripts/moviegenres.js | 2 +- dashboard-ui/scripts/movies.js | 2 +- dashboard-ui/scripts/moviesrecommended.js | 2 +- dashboard-ui/scripts/musicrecommended.js | 2 +- dashboard-ui/scripts/playlistedit.js | 2 +- dashboard-ui/scripts/site.js | 4 +-- dashboard-ui/scripts/tvgenres.js | 2 +- dashboard-ui/scripts/tvrecommended.js | 2 +- dashboard-ui/scripts/tvupcoming.js | 2 +- 88 files changed, 230 insertions(+), 107 deletions(-) create mode 100644 dashboard-ui/bower_components/emby-webcomponents/tabbedview/itemstab.js rename dashboard-ui/bower_components/emby-webcomponents/{ => tabbedview}/tabbedview.js (92%) create mode 100644 dashboard-ui/bower_components/emby-webcomponents/viewsettings/viewsettings.js create mode 100644 dashboard-ui/bower_components/emby-webcomponents/viewsettings/viewsettings.template.html diff --git a/dashboard-ui/bower_components/emby-webcomponents/alphapicker/alphapicker.js b/dashboard-ui/bower_components/emby-webcomponents/alphapicker/alphapicker.js index 4860232a17..0812ba9aec 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/alphapicker/alphapicker.js +++ b/dashboard-ui/bower_components/emby-webcomponents/alphapicker/alphapicker.js @@ -1 +1 @@ -define(["focusManager","layoutManager","dom","css!./style.css","paper-icon-button-light","material-icons"],function(focusManager,layoutManager,dom){"use strict";function focus(){var scope=this,selected=scope.querySelector("."+selectedButtonClass);selected?focusManager.focus(selected):focusManager.autoFocus(scope,!0)}function getAlphaPickerButtonClassName(){var alphaPickerButtonClassName="alphaPickerButton";return layoutManager.tv&&(alphaPickerButtonClassName+=" alphaPickerButton-tv"),alphaPickerButtonClassName}function getLetterButton(l){return'"}function render(element,options){element.classList.add("alphaPicker"),element.classList.contains("alphaPicker-vertical")||element.classList.add("focuscontainer-x");var letters,html="",alphaPickerButtonClassName=getAlphaPickerButtonClassName(),rowClassName="alphaPickerRow";element.classList.contains("alphaPicker-vertical")&&(rowClassName+=" alphaPickerRow-vertical"),html+='
',"keyboard"===options.mode?html+='':(letters=["#"],html+=letters.map(getLetterButton).join("")),letters=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],html+=letters.map(getLetterButton).join(""),"keyboard"===options.mode?(html+='',html+="
",letters=["0","1","2","3","4","5","6","7","8","9"],html+='
',html+="
",html+=letters.map(getLetterButton).join(""),html+="
"):html+="",element.innerHTML=html,element.classList.add("focusable"),element.focus=focus}function AlphaPicker(options){function onItemFocusTimeout(){itemFocusTimeout=null,self.value(itemFocusValue)}function onAlphaFocusTimeout(){if(alphaFocusTimeout=null,document.activeElement===alphaFocusedElement){var value=alphaFocusedElement.getAttribute("data-value");self.value(value,!0)}}function onAlphaPickerInKeyboardModeClick(e){var alphaPickerButton=dom.parentWithClass(e.target,"alphaPickerButton");if(alphaPickerButton){var value=alphaPickerButton.getAttribute("data-value");element.dispatchEvent(new CustomEvent("alphavalueclicked",{cancelable:!1,detail:{value:value}}))}}function onAlphaPickerClick(e){var alphaPickerButton=dom.parentWithClass(e.target,"alphaPickerButton");if(alphaPickerButton){var value=alphaPickerButton.getAttribute("data-value");(this._currentValue||"").toUpperCase()===value.toUpperCase()?self.value(null,!0):self.value(value,!0)}}function onAlphaPickerFocusIn(e){alphaFocusTimeout&&(clearTimeout(alphaFocusTimeout),alphaFocusTimeout=null);var alphaPickerButton=dom.parentWithClass(e.target,"alphaPickerButton");alphaPickerButton&&(alphaFocusedElement=alphaPickerButton,alphaFocusTimeout=setTimeout(onAlphaFocusTimeout,100))}function onItemsFocusIn(e){var item=dom.parentWithClass(e.target,itemClass);if(item){var prefix=item.getAttribute("data-prefix");prefix&&prefix.length&&(itemFocusValue=prefix[0],itemFocusTimeout&&clearTimeout(itemFocusTimeout),itemFocusTimeout=setTimeout(onItemFocusTimeout,100))}}var self=this;this.options=options;var itemFocusValue,itemFocusTimeout,alphaFocusedElement,alphaFocusTimeout,element=options.element,itemsContainer=options.itemsContainer,itemClass=options.itemClass;self.enabled=function(enabled){enabled?(itemsContainer&&itemsContainer.addEventListener("focus",onItemsFocusIn,!0),"keyboard"===options.mode&&element.addEventListener("click",onAlphaPickerInKeyboardModeClick),"click"!==options.valueChangeEvent?element.addEventListener("focus",onAlphaPickerFocusIn,!0):element.addEventListener("click",onAlphaPickerClick.bind(this))):(itemsContainer&&itemsContainer.removeEventListener("focus",onItemsFocusIn,!0),element.removeEventListener("click",onAlphaPickerInKeyboardModeClick),element.removeEventListener("focus",onAlphaPickerFocusIn,!0),element.removeEventListener("click",onAlphaPickerClick.bind(this)))},render(element,options),this.enabled(!0),this.visible(!0)}var selectedButtonClass="alphaPickerButton-selected";return AlphaPicker.prototype.value=function(value,applyValue){var btn,selected,element=this.options.element;if(void 0!==value)if(null!=value){if(value=value.toUpperCase(),this._currentValue=value,"keyboard"!==this.options.mode){selected=element.querySelector("."+selectedButtonClass);try{btn=element.querySelector(".alphaPickerButton[data-value='"+value+"']")}catch(err){console.log("Error in querySelector: "+err)}btn&&btn!==selected&&btn.classList.add(selectedButtonClass),selected&&selected!==btn&&selected.classList.remove(selectedButtonClass)}}else this._currentValue=value,selected=element.querySelector("."+selectedButtonClass),selected&&selected.classList.remove(selectedButtonClass);return applyValue&&element.dispatchEvent(new CustomEvent("alphavaluechanged",{cancelable:!1,detail:{value:value}})),this._currentValue},AlphaPicker.prototype.on=function(name,fn){var element=this.options.element;element.addEventListener(name,fn)},AlphaPicker.prototype.off=function(name,fn){var element=this.options.element;element.removeEventListener(name,fn)},AlphaPicker.prototype.visible=function(visible){var element=this.options.element;element.style.visibility=visible?"visible":"hidden"},AlphaPicker.prototype.values=function(){for(var element=this.options.element,elems=element.querySelectorAll(".alphaPickerButton"),values=[],i=0,length=elems.length;i'+l+""}function render(element,options){element.classList.add("alphaPicker"),layoutManager.tv&&element.classList.add("alphaPicker-tv"),element.classList.contains("alphaPicker-vertical")||element.classList.add("focuscontainer-x");var letters,html="",alphaPickerButtonClassName=getAlphaPickerButtonClassName(),rowClassName="alphaPickerRow";element.classList.contains("alphaPicker-vertical")&&(rowClassName+=" alphaPickerRow-vertical"),html+='
',"keyboard"===options.mode?html+='':(letters=["#"],html+=letters.map(getLetterButton).join("")),letters=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],html+=letters.map(getLetterButton).join(""),"keyboard"===options.mode?(html+='',html+="
",letters=["0","1","2","3","4","5","6","7","8","9"],html+='
',html+="
",html+=letters.map(getLetterButton).join(""),html+="
"):html+="",element.innerHTML=html,element.classList.add("focusable"),element.focus=focus}function AlphaPicker(options){function onItemFocusTimeout(){itemFocusTimeout=null,self.value(itemFocusValue)}function onAlphaFocusTimeout(){if(alphaFocusTimeout=null,document.activeElement===alphaFocusedElement){var value=alphaFocusedElement.getAttribute("data-value");self.value(value,!0)}}function onAlphaPickerInKeyboardModeClick(e){var alphaPickerButton=dom.parentWithClass(e.target,"alphaPickerButton");if(alphaPickerButton){var value=alphaPickerButton.getAttribute("data-value");element.dispatchEvent(new CustomEvent("alphavalueclicked",{cancelable:!1,detail:{value:value}}))}}function onAlphaPickerClick(e){var alphaPickerButton=dom.parentWithClass(e.target,"alphaPickerButton");if(alphaPickerButton){var value=alphaPickerButton.getAttribute("data-value");(this._currentValue||"").toUpperCase()===value.toUpperCase()?self.value(null,!0):self.value(value,!0)}}function onAlphaPickerFocusIn(e){alphaFocusTimeout&&(clearTimeout(alphaFocusTimeout),alphaFocusTimeout=null);var alphaPickerButton=dom.parentWithClass(e.target,"alphaPickerButton");alphaPickerButton&&(alphaFocusedElement=alphaPickerButton,alphaFocusTimeout=setTimeout(onAlphaFocusTimeout,100))}function onItemsFocusIn(e){var item=dom.parentWithClass(e.target,itemClass);if(item){var prefix=item.getAttribute("data-prefix");prefix&&prefix.length&&(itemFocusValue=prefix[0],itemFocusTimeout&&clearTimeout(itemFocusTimeout),itemFocusTimeout=setTimeout(onItemFocusTimeout,100))}}var self=this;this.options=options;var itemFocusValue,itemFocusTimeout,alphaFocusedElement,alphaFocusTimeout,element=options.element,itemsContainer=options.itemsContainer,itemClass=options.itemClass;self.enabled=function(enabled){enabled?(itemsContainer&&itemsContainer.addEventListener("focus",onItemsFocusIn,!0),"keyboard"===options.mode&&element.addEventListener("click",onAlphaPickerInKeyboardModeClick),"click"!==options.valueChangeEvent?element.addEventListener("focus",onAlphaPickerFocusIn,!0):element.addEventListener("click",onAlphaPickerClick.bind(this))):(itemsContainer&&itemsContainer.removeEventListener("focus",onItemsFocusIn,!0),element.removeEventListener("click",onAlphaPickerInKeyboardModeClick),element.removeEventListener("focus",onAlphaPickerFocusIn,!0),element.removeEventListener("click",onAlphaPickerClick.bind(this)))},render(element,options),this.enabled(!0),this.visible(!0)}var selectedButtonClass="alphaPickerButton-selected";return AlphaPicker.prototype.value=function(value,applyValue){var btn,selected,element=this.options.element;if(void 0!==value)if(null!=value){if(value=value.toUpperCase(),this._currentValue=value,"keyboard"!==this.options.mode){selected=element.querySelector("."+selectedButtonClass);try{btn=element.querySelector(".alphaPickerButton[data-value='"+value+"']")}catch(err){console.log("Error in querySelector: "+err)}btn&&btn!==selected&&btn.classList.add(selectedButtonClass),selected&&selected!==btn&&selected.classList.remove(selectedButtonClass)}}else this._currentValue=value,selected=element.querySelector("."+selectedButtonClass),selected&&selected.classList.remove(selectedButtonClass);return applyValue&&element.dispatchEvent(new CustomEvent("alphavaluechanged",{cancelable:!1,detail:{value:value}})),this._currentValue},AlphaPicker.prototype.on=function(name,fn){var element=this.options.element;element.addEventListener(name,fn)},AlphaPicker.prototype.off=function(name,fn){var element=this.options.element;element.removeEventListener(name,fn)},AlphaPicker.prototype.visible=function(visible){var element=this.options.element;element.style.visibility=visible?"visible":"hidden"},AlphaPicker.prototype.values=function(){for(var element=this.options.element,elems=element.querySelectorAll(".alphaPickerButton"),values=[],i=0,length=elems.length;i.cardBox-focustransform{-webkit-transform:scale(1.16,1.16);transform:scale(1.16,1.16)}.cardBox-bottompadded{margin-bottom:1.9em!important}.layout-mobile .cardBox-bottompadded{margin-bottom:1.2em!important}.card:focus{position:relative!important;z-index:10!important}.btnCardOptions{position:absolute;bottom:.25em;right:0;margin:0!important;z-index:1}.mediaSourceIndicator{display:-webkit-box;display:flex;position:absolute;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;top:.3em;left:.3em;text-align:center;vertical-align:middle;width:1.6em;height:1.6em;-webkit-border-radius:50%;border-radius:50%;color:#fff;background:#38c}.cardText,.innerCardFooter{overflow:hidden;text-align:left}.cardImageContainer{-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;background-position:center center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;-webkit-background-clip:content-box!important;background-clip:content-box!important;color:inherit;height:100%;contain:strict}.cardContent,.cardImage{position:absolute;right:0;top:0;left:0;bottom:0}.chapterCardImageContainer{background-color:#000;-webkit-border-radius:0;border-radius:0}.textCardImageContainer{background-color:#444}.cardContent{overflow:hidden;display:block;margin:0!important;height:100%;-webkit-border-radius:.12em;border-radius:.12em;contain:strict}.cardContent-button{background-color:transparent;border:0!important;padding:0!important;color:inherit;width:100%;font-size:inherit}.visualCardBox .cardContent{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.cardContent-shadow{-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.cardImageContainer{display:-webkit-box;display:-webkit-flex;display:flex}.cardImage{-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;background-position:center bottom}.cardImage-img{max-height:100%;max-width:100%;min-height:70%;min-width:70%;margin:auto}.coveredImage-img{width:100%;height:100%}.coveredImage-noscale-img{max-height:none;max-width:none}.coveredImage{-webkit-background-size:100% 100%;background-size:100% 100%;background-position:center center}.coveredImage-noScale{-webkit-background-size:cover;background-size:cover}.cardFooter{padding:.3em .3em .5em;position:relative}.visualCardBox{-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);-webkit-border-radius:.145em;border-radius:.145em}.innerCardFooter{background:rgba(0,0,0,.7);position:absolute;bottom:0;left:0;z-index:1;max-width:100%;color:#fff}.innerCardFooterClear{background-color:transparent}.fullInnerCardFooter{right:0}.cardText{padding:.06em .5em;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis;font-size:93%}.cardDefaultText,.cardTextCentered{text-align:center}.cardText-first{padding-top:.3em}.layout-tv .cardText-first{padding-top:.16em}.innerCardFooter>.cardText{padding:.3em .5em}.cardFooter-withlogo{padding-left:4em;position:relative}.cardFooterLogo{position:absolute;top:0;bottom:0;left:0;width:4.5em;-webkit-background-size:70% auto;background-size:70% auto;background-repeat:no-repeat;background-position:center center}.card:focus .cardText{color:inherit}.cardText-rightmargin{margin-right:2em}.cardDefaultText{white-space:normal}.textActionButton{background:0 0;border:0!important;padding:0!important;color:inherit;font-size:inherit}.textActionButton:hover{text-decoration:underline}.cardImageIcon{width:auto;height:auto;font-size:5em;color:inherit}.cardIndicators{right:.225em;top:.225em;position:absolute;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;contain:layout style}.cardProgramAttributeIndicators{top:0;left:0;position:absolute;display:-webkit-box;display:-webkit-flex;display:flex;text-transform:uppercase;font-size:92%}.programAttributeIndicator{padding:.18em .5em;color:#fff;font-weight:500}.cardOverlayButton{color:rgba(255,255,255,.76)!important;-webkit-border-radius:100em;border-radius:100em;position:absolute;bottom:0;right:0;margin:0 .35em .65em 0;z-index:1;padding:.5em;background-color:rgba(0,0,0,.7)!important;font-size:82%}.cardOverlayButton-centered{bottom:initial;right:initial;position:static;position:absolute;display:-webkit-box;display:-webkit-flex;display:flex;font-size:112%;margin:-1.3em 0 0 -1.3em;width:2.6em;height:2.6em;top:50%;left:50%;background-color:rgba(0,0,0,.5)!important;border:2.4px solid rgba(255,255,255,.6);padding:.38em!important;color:rgba(255,255,255,.76);-webkit-transition:-webkit-transform .2s ease-out;-o-transition:transform .2s ease-out;transition:transform .2s ease-out}.cardOverlayButton-centered:hover{-webkit-transform:scale(1.2,1.2);transform:scale(1.2,1.2)}.cardOverlayButton-texticon{line-height:1;background-color:rgba(0,0,0,.4)!important}.cardOverlayButton-texticon-icon{font-style:normal}.defaultCardColor1{background-color:#009688}.defaultCardColor2{background-color:#D32F2F}.defaultCardColor3{background-color:#0288D1}.defaultCardColor4{background-color:#388E3C}.defaultCardColor5{background-color:#F57F17}.backdropCard,.bannerCard{width:100%}.smallBackdropCard,.squareCard{width:50%}.portraitCard{width:33.333333333333333333333333333333%}.mixedPortraitCard{width:12em}.mixedSquareCard{width:18em}.mixedBackdropCard{width:32em}@media all and (min-width:400px){.backdropCard{width:50%}}@media all and (min-width:500px){.portraitCard,.smallBackdropCard,.squareCard{width:33.333333333333333333333333333333%}}@media all and (min-width:700px){.portraitCard,.squareCard{width:25%}}@media all and (min-width:770px){.backdropCard{width:33.333333333333333333333333333333%}}@media all and (min-width:800px){.bannerCard{width:50%}.portraitCard,.squareCard{width:20%}.smallBackdropCard{width:25%}}@media all and (min-width:1000px){.smallBackdropCard{width:20%}}@media all and (min-width:1200px){.backdropCard{width:25%}.portraitCard,.squareCard{width:16.666666666666666666666666666667%}.bannerCard{width:33.333333333333333333333333333333%}.smallBackdropCard{width:16.666666666666666666666666666667%}}@media all and (min-width:1400px){.portraitCard,.smallBackdropCard,.squareCard{width:14.285714285714285714285714285714%}}@media all and (min-width:1600px){.smallBackdropCard{width:12.5%}.backdropCard{width:20%}.portraitCard,.squareCard{width:12.5%}}@media all and (min-width:1920px){.portraitCard,.squareCard{width:11.111111111111111111111111111111%}}@media all and (min-width:2100px){.backdropCard{width:20%}}@media all and (min-width:2200px){.bannerCard{width:25%}.portraitCard,.squareCard{width:10%}}@media all and (min-width:2500px){.backdropCard{width:16.666666666666666666666666666667%}}.itemsContainer-tv>.backdropCard{width:25%}.itemsContainer-tv>.portraitCard,.itemsContainer-tv>.squareCard{width:16.666666666666666666666666666667%}@media all and (orientation:portrait){.overflowPortraitCard{width:42vw}.overflowBackdropCard{width:72vw}.overflowSquareCard{width:42vw}}@media all and (orientation:landscape){.overflowBackdropCard{width:23.3vw}.overflowPortraitCard,.overflowSquareCard{width:15.5vw}}@media all and (orientation:landscape) and (min-width:1700px){.overflowBackdropCard{width:18.5vw}.overflowPortraitCard,.overflowSquareCard{width:11.6vw}}@media all and (orientation:portrait) and (min-width:400px){.overflowPortraitCard{width:31.5vw}}@media all and (orientation:portrait) and (min-width:540px){.overflowBackdropCard{width:64vw}.overflowSquareCard{width:31.5vw}}@media all and (orientation:portrait) and (min-width:640px){.overflowBackdropCard{width:56vw}}@media all and (orientation:portrait) and (min-width:760px){.overflowPortraitCard{width:23vw}.overflowBackdropCard{width:40vw}.overflowSquareCard{width:23vw}}@media all and (orientation:portrait) and (min-width:1200px){.overflowPortraitCard,.overflowSquareCard{width:18vw}}@media all and (orientation:portrait) and (min-width:1400px){.overflowPortraitCard,.overflowSquareCard{width:15vw}.overflowBackdropCard{width:30vw}}@media all and (orientation:portrait) and (min-width:1800px){.overflowBackdropCard{width:23.5vw}}.itemsContainer-tv>.overflowBackdropCard{width:23.3vw}.overflowBackdropCard-textCard{width:15.5vw!important}.overflowBackdropCard-textCardPadder{padding-bottom:87.75%}.itemsContainer-tv>.overflowPortraitCard,.itemsContainer-tv>.overflowSquareCard{width:15.5vw} \ No newline at end of file +.card,.card:focus{font-weight:inherit!important}.card,.cardBox,.cardContent,.textActionButton{-webkit-tap-highlight-color:transparent;outline:0!important}button::-moz-focus-inner{padding:0;border:0}button{-webkit-border-fit:border!important}.card{border:0;font-size:inherit!important;font-family:inherit!important;text-transform:none;background:0 0!important;margin:0;padding:0;display:block;color:inherit!important;cursor:pointer;contain:layout style;-webkit-flex-shrink:0;flex-shrink:0}.cardContent-button,.textActionButton{cursor:pointer;vertical-align:middle;font-family:inherit}.card-nofocustransform{contain:layout style paint}.itemsContainer{display:-webkit-box;display:-webkit-flex;display:flex}.vertical-list,.vertical-wrap{display:-webkit-box;display:-webkit-flex;-webkit-box-direction:normal}.vertical-list{display:flex;-webkit-box-orient:vertical;-webkit-flex-direction:column;flex-direction:column;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.vertical-wrap{display:flex;-webkit-box-orient:horizontal;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap}.cardImageContainer,.mediaSourceIndicator{display:-webkit-flex;-webkit-box-align:center}.vertical-wrap.centered{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.cardScalable{position:relative;contain:layout style}.cardPadder-backdrop,.cardPadder-mixedBackdrop,.cardPadder-overflowBackdrop,.cardPadder-smallBackdrop{padding-bottom:56.25%;contain:strict}.cardPadder-mixedSquare,.cardPadder-overflowSquare,.cardPadder-square{padding-bottom:100%;contain:strict}.cardPadder-mixedPortrait,.cardPadder-overflowPortrait,.cardPadder-portrait,.overflowPortraitCard-textCardPadder{padding-bottom:150%;contain:strict}.cardPadder-banner{padding-bottom:18.5%;contain:strict}.cardBox{padding:0!important;margin:.28em .4em;-webkit-transition:none;-o-transition:none;transition:none;border:0 solid transparent;contain:layout style}@media all and (max-width:50em){.cardBox{margin:.28em}}.card-focuscontent{border:.12em solid transparent;-webkit-border-radius:.12em;border-radius:.12em}.card-focuscontent-large{border-width:.24em}.cardBox-focustransform{will-change:transform;-webkit-transition:-webkit-transform .2s ease-out;-o-transition:transform .2s ease-out;transition:transform .2s ease-out}.card:focus>.cardBox-focustransform{-webkit-transform:scale(1.16,1.16);transform:scale(1.16,1.16)}.cardBox-bottompadded{margin-bottom:1.9em!important}.layout-mobile .cardBox-bottompadded{margin-bottom:1.2em!important}.card:focus{position:relative!important;z-index:10!important}.btnCardOptions{position:absolute;bottom:.25em;right:0;margin:0!important;z-index:1}.mediaSourceIndicator{display:-webkit-box;display:flex;position:absolute;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;top:.3em;left:.3em;text-align:center;vertical-align:middle;width:1.6em;height:1.6em;-webkit-border-radius:50%;border-radius:50%;color:#fff;background:#38c}.cardText,.innerCardFooter{overflow:hidden;text-align:left}.cardImageContainer{-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;background-position:center center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;position:relative;-webkit-background-clip:content-box!important;background-clip:content-box!important;color:inherit;height:100%;contain:strict}.cardContent,.cardImage{position:absolute;right:0;top:0;left:0;bottom:0}.chapterCardImageContainer{background-color:#000;-webkit-border-radius:0;border-radius:0}.textCardImageContainer{background-color:#444}.cardContent{overflow:hidden;display:block;margin:0!important;height:100%;-webkit-border-radius:.12em;border-radius:.12em;contain:strict}.cardContent-button{background-color:transparent;border:0!important;padding:0!important;color:inherit;width:100%;font-size:inherit}.visualCardBox .cardContent{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.cardContent-shadow{-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.cardImageContainer{display:-webkit-box;display:-webkit-flex;display:flex}.cardImage{-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;background-position:center bottom}.cardImage-img{max-height:100%;max-width:100%;min-height:70%;min-width:70%;margin:auto}.coveredImage-img{width:100%;height:100%}.coveredImage-noscale-img{max-height:none;max-width:none}.coveredImage{-webkit-background-size:100% 100%;background-size:100% 100%;background-position:center center}.coveredImage-noScale{-webkit-background-size:cover;background-size:cover}.cardFooter{padding:.3em .3em .5em;position:relative}.visualCardBox{-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);-webkit-border-radius:.145em;border-radius:.145em}.innerCardFooter{background:rgba(0,0,0,.7);position:absolute;bottom:0;left:0;z-index:1;max-width:100%;color:#fff}.innerCardFooterClear{background-color:transparent}.fullInnerCardFooter{right:0}.cardText{padding:.06em .5em;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow:ellipsis;font-size:93%}.cardDefaultText,.cardTextCentered{text-align:center}.cardText-first{padding-top:.3em}.layout-tv .cardText-first{padding-top:.16em}.innerCardFooter>.cardText{padding:.3em .5em}.cardFooter-withlogo{padding-left:4em;position:relative}.cardFooterLogo{position:absolute;top:0;bottom:0;left:0;width:4.5em;-webkit-background-size:70% auto;background-size:70% auto;background-repeat:no-repeat;background-position:center center}.card:focus .cardText{color:inherit}.cardText-rightmargin{margin-right:2em}.cardDefaultText{white-space:normal}.textActionButton{background:0 0;border:0!important;padding:0!important;color:inherit;font-size:inherit}.textActionButton:hover{text-decoration:underline}.cardImageIcon{width:auto;height:auto;font-size:5em;color:inherit}.cardIndicators{right:.225em;top:.225em;position:absolute;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;contain:layout style}.cardProgramAttributeIndicators{top:0;left:0;position:absolute;display:-webkit-box;display:-webkit-flex;display:flex;text-transform:uppercase;font-size:92%}.programAttributeIndicator{padding:.18em .5em;color:#fff;font-weight:500}.cardOverlayButton{color:rgba(255,255,255,.76)!important;-webkit-border-radius:100em;border-radius:100em;position:absolute;bottom:0;right:0;margin:0 .35em .65em 0;z-index:1;padding:.5em;background-color:rgba(0,0,0,.7)!important;font-size:82%}.cardOverlayButton-centered{bottom:initial;right:initial;position:static;position:absolute;display:-webkit-box;display:-webkit-flex;display:flex;font-size:112%;margin:-1.3em 0 0 -1.3em;width:2.6em;height:2.6em;top:50%;left:50%;background-color:rgba(0,0,0,.5)!important;border:2.4px solid rgba(255,255,255,.6);padding:.38em!important;color:rgba(255,255,255,.76);-webkit-transition:-webkit-transform .2s ease-out;-o-transition:transform .2s ease-out;transition:transform .2s ease-out}.cardOverlayButton-centered:hover{-webkit-transform:scale(1.2,1.2);transform:scale(1.2,1.2)}.cardOverlayButton-texticon{line-height:1;background-color:rgba(0,0,0,.4)!important}.cardOverlayButton-texticon-icon{font-style:normal}.defaultCardColor1{background-color:#009688}.defaultCardColor2{background-color:#D32F2F}.defaultCardColor3{background-color:#0288D1}.defaultCardColor4{background-color:#388E3C}.defaultCardColor5{background-color:#F57F17}.backdropCard,.bannerCard{width:100%}.smallBackdropCard,.squareCard{width:50%}.portraitCard{width:33.333333333333333333333333333333%}.mixedPortraitCard{width:12em}.mixedSquareCard{width:18em}.mixedBackdropCard{width:32em}@media all and (min-width:400px){.backdropCard{width:50%}}@media all and (min-width:500px){.portraitCard,.smallBackdropCard,.squareCard{width:33.333333333333333333333333333333%}}@media all and (min-width:700px){.portraitCard,.squareCard{width:25%}}@media all and (min-width:770px){.backdropCard{width:33.333333333333333333333333333333%}}@media all and (min-width:800px){.bannerCard{width:50%}.portraitCard,.squareCard{width:20%}.smallBackdropCard{width:25%}}@media all and (min-width:1000px){.smallBackdropCard{width:20%}}@media all and (min-width:1200px){.backdropCard{width:25%}.portraitCard,.squareCard{width:16.666666666666666666666666666667%}.bannerCard{width:33.333333333333333333333333333333%}.smallBackdropCard{width:16.666666666666666666666666666667%}}@media all and (min-width:1400px){.portraitCard,.smallBackdropCard,.squareCard{width:14.285714285714285714285714285714%}}@media all and (min-width:1600px){.smallBackdropCard{width:12.5%}.backdropCard{width:20%}.portraitCard,.squareCard{width:12.5%}}@media all and (min-width:1920px){.portraitCard,.squareCard{width:11.111111111111111111111111111111%}}@media all and (min-width:2100px){.backdropCard{width:20%}}@media all and (min-width:2200px){.bannerCard{width:25%}.portraitCard,.squareCard{width:10%}}@media all and (min-width:2500px){.backdropCard{width:16.666666666666666666666666666667%}}.itemsContainer-tv>.backdropCard{width:25%}.itemsContainer-tv>.portraitCard,.itemsContainer-tv>.squareCard{width:16.666666666666666666666666666667%}@media all and (orientation:portrait){.overflowPortraitCard{width:42vw}.overflowBackdropCard{width:72vw}.overflowSquareCard{width:42vw}}@media all and (orientation:landscape){.overflowBackdropCard{width:23.3vw}.overflowPortraitCard,.overflowSquareCard{width:15.5vw}}@media all and (orientation:landscape) and (min-width:1700px){.overflowBackdropCard{width:18.5vw}.overflowPortraitCard,.overflowSquareCard{width:11.6vw}}@media all and (orientation:portrait) and (min-width:400px){.overflowPortraitCard{width:31.5vw}}@media all and (orientation:portrait) and (min-width:540px){.overflowBackdropCard{width:64vw}.overflowSquareCard{width:31.5vw}}@media all and (orientation:portrait) and (min-width:640px){.overflowBackdropCard{width:56vw}}@media all and (orientation:portrait) and (min-width:760px){.overflowPortraitCard{width:23vw}.overflowBackdropCard{width:40vw}.overflowSquareCard{width:23vw}}@media all and (orientation:portrait) and (min-width:1200px){.overflowPortraitCard,.overflowSquareCard{width:18vw}}@media all and (orientation:portrait) and (min-width:1400px){.overflowPortraitCard,.overflowSquareCard{width:15vw}.overflowBackdropCard{width:30vw}}@media all and (orientation:portrait) and (min-width:1800px){.overflowBackdropCard{width:23.5vw}}.itemsContainer-tv>.overflowBackdropCard{width:23.3vw}.overflowBackdropCard-textCard{width:15.5vw!important}.overflowBackdropCard-textCardPadder{padding-bottom:87.75%}.itemsContainer-tv>.overflowPortraitCard,.itemsContainer-tv>.overflowSquareCard{width:15.5vw} \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js b/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js index 0050046521..1c5946f2ae 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js +++ b/dashboard-ui/bower_components/emby-webcomponents/cardbuilder/cardbuilder.js @@ -1,2 +1,2 @@ -define(["datetime","imageLoader","connectionManager","itemHelper","focusManager","indicators","globalize","layoutManager","apphost","dom","browser","itemShortcuts","css!./card","paper-icon-button-light","programStyles"],function(datetime,imageLoader,connectionManager,itemHelper,focusManager,indicators,globalize,layoutManager,appHost,dom,browser,itemShortcuts){"use strict";function getCardsHtml(items,options){1===arguments.length&&(options=arguments[0],items=options.items);var html=buildCardsHtmlInternal(items,options);return html}function getPostersPerRow(shape,screenWidth){switch(shape){case"portrait":return screenWidth>=2200?10:screenWidth>=2100?9:screenWidth>=1600?8:screenWidth>=1400?7:screenWidth>=1200?6:screenWidth>=800?5:screenWidth>=640?4:3;case"square":return screenWidth>=2100?9:screenWidth>=1800?8:screenWidth>=1400?7:screenWidth>=1200?6:screenWidth>=900?5:screenWidth>=700?4:screenWidth>=500?3:2;case"banner":return screenWidth>=2200?4:screenWidth>=1200?3:screenWidth>=800?2:1;case"backdrop":return screenWidth>=2500?6:screenWidth>=1600?5:screenWidth>=1200?4:screenWidth>=770?3:screenWidth>=420?2:1;case"smallBackdrop":return screenWidth>=1440?8:screenWidth>=1100?6:screenWidth>=800?5:screenWidth>=600?4:screenWidth>=540?3:screenWidth>=420?2:1;case"overflowPortrait":return screenWidth>=1e3?100/22:screenWidth>=540?100/30:100/42;case"overflowSquare":return screenWidth>=1e3?100/22:screenWidth>=540?100/30:100/42;case"overflowBackdrop":return screenWidth>=1e3?2.5:screenWidth>=640?100/56:screenWidth>=540?1.5625:100/72;default:return 4}}function isResizable(windowWidth){var screen=window.screen;if(screen){var screenWidth=screen.availWidth;if(screenWidth-windowWidth>20)return!0}return!1}function getImageWidth(shape){var screenWidth=dom.getWindowSize().innerWidth;if(isResizable(screenWidth)){var roundScreenTo=100;screenWidth=Math.floor(screenWidth/roundScreenTo)*roundScreenTo}window.screen&&(screenWidth=Math.min(screenWidth,screen.availWidth||screenWidth));var imagesPerRow=getPostersPerRow(shape,screenWidth),shapeWidth=screenWidth/imagesPerRow;return Math.round(shapeWidth)}function setCardData(items,options){options.shape=options.shape||"auto";var primaryImageAspectRatio=imageLoader.getPrimaryImageAspectRatio(items);if("auto"===options.shape||"autohome"===options.shape||"autooverflow"===options.shape||"autoVertical"===options.shape){var requestedShape=options.shape;options.shape=null,primaryImageAspectRatio&&(primaryImageAspectRatio>=3?(options.shape="banner",options.coverImage=!0):primaryImageAspectRatio>=1.33?options.shape="autooverflow"===requestedShape?"overflowBackdrop":"backdrop":primaryImageAspectRatio>.71?options.shape="autooverflow"===requestedShape?"overflowSquare":"square":options.shape="autooverflow"===requestedShape?"overflowPortrait":"portrait"),options.shape||(options.shape=options.defaultShape||("autooverflow"===requestedShape?"overflowSquare":"square"))}"auto"===options.preferThumb&&(options.preferThumb="backdrop"===options.shape||"overflowBackdrop"===options.shape),options.uiAspect=getDesiredAspect(options.shape),options.primaryImageAspectRatio=primaryImageAspectRatio,!options.width&&options.widths&&(options.width=options.widths[options.shape]),options.rows&&"number"!=typeof options.rows&&(options.rows=options.rows[options.shape]),layoutManager.tv&&("backdrop"===options.shape?options.width=options.width||500:"portrait"===options.shape?options.width=options.width||256:"square"===options.shape?options.width=options.width||256:"banner"===options.shape&&(options.width=options.width||800)),options.width=options.width||getImageWidth(options.shape)}function buildCardsHtmlInternal(items,options){var isVertical;"autoVertical"===options.shape&&(isVertical=!0),setCardData(items,options);var currentIndexValue,hasOpenRow,hasOpenSection,apiClient,lastServerId,i,length,html="",itemsInRow=0,sectionTitleTagName=options.sectionTitleTagName||"div";for(i=0,length=items.length;i=.5?.5:0)+"+":null);newIndexValue!==currentIndexValue&&(hasOpenRow&&(html+="",hasOpenRow=!1,itemsInRow=0),hasOpenSection&&(html+="",isVertical&&(html+=""),hasOpenSection=!1),html+=isVertical?'
':'
',html+="<"+sectionTitleTagName+' class="sectionTitle">'+newIndexValue+"",isVertical&&(html+='
'),currentIndexValue=newIndexValue,hasOpenSection=!0)}options.rows&&0===itemsInRow&&(hasOpenRow&&(html+="
",hasOpenRow=!1),html+='
',hasOpenRow=!0),html+=buildCard(i,item,apiClient,options),itemsInRow++,options.rows&&itemsInRow>=options.rows&&(html+="
",hasOpenRow=!1,itemsInRow=0)}hasOpenRow&&(html+="
"),hasOpenSection&&(html+="
",isVertical&&(html+=""));var cardFooterHtml='
';for(i=0,length=options.lines;i 
';if(cardFooterHtml+="",options.leadingButtons)for(i=0,length=options.leadingButtons.length;i
'+options.leadingButtons[i].name+"
"+cardFooterHtml+"
"+html;if(options.trailingButtons)for(i=0,length=options.trailingButtons.length;i
'+options.trailingButtons[i].name+"
"+cardFooterHtml+"
";return html}function getDesiredAspect(shape){if(shape){if(shape=shape.toLowerCase(),shape.indexOf("portrait")!==-1)return 2/3;if(shape.indexOf("backdrop")!==-1)return 16/9;if(shape.indexOf("square")!==-1)return 1;if(shape.indexOf("banner")!==-1)return 1e3/185}return null}function getCardImageUrl(item,apiClient,options,shape){var imageItem=item.ProgramInfo||item;item=imageItem;var width=options.width,height=null,primaryImageAspectRatio=item.PrimaryImageAspectRatio,forceName=!1,imgUrl=null,coverImage=!1,uiAspect=null;return options.preferThumb&&item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):options.preferBanner&&item.ImageTags&&item.ImageTags.Banner?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Banner",maxWidth:width,tag:item.ImageTags.Banner}):options.preferThumb&&item.SeriesThumbImageTag&&options.inheritThumb!==!1?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Thumb",maxWidth:width,tag:item.SeriesThumbImageTag}):options.preferThumb&&item.ParentThumbItemId&&options.inheritThumb!==!1&&"Photo"!==item.MediaType?imgUrl=apiClient.getScaledImageUrl(item.ParentThumbItemId,{type:"Thumb",maxWidth:width,tag:item.ParentThumbImageTag}):options.preferThumb&&item.BackdropImageTags&&item.BackdropImageTags.length?(imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Backdrop",maxWidth:width,tag:item.BackdropImageTags[0]}),forceName=!0):options.preferThumb&&item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length&&options.inheritThumb!==!1&&"Episode"===item.Type?imgUrl=apiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",maxWidth:width,tag:item.ParentBackdropImageTags[0]}):item.ImageTags&&item.ImageTags.Primary?(height=width&&primaryImageAspectRatio?Math.round(width/primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.ImageTags.Primary}),options.preferThumb&&options.showTitle!==!1&&(forceName=!0),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape),uiAspect&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2))):item.PrimaryImageTag?(height=width&&primaryImageAspectRatio?Math.round(width/primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.PrimaryImageItemId||item.Id||item.ItemId,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.PrimaryImageTag}),options.preferThumb&&options.showTitle!==!1&&(forceName=!0),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape),uiAspect&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2))):item.ParentPrimaryImageTag?imgUrl=apiClient.getScaledImageUrl(item.ParentPrimaryImageItemId,{type:"Primary",maxWidth:width,tag:item.ParentPrimaryImageTag}):item.SeriesPrimaryImageTag?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Primary",maxWidth:width,tag:item.SeriesPrimaryImageTag}):item.AlbumId&&item.AlbumPrimaryImageTag?(width=primaryImageAspectRatio?Math.round(height*primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.AlbumId,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.AlbumPrimaryImageTag}),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape),uiAspect&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2))):"Season"===item.Type&&item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):item.BackdropImageTags&&item.BackdropImageTags.length?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Backdrop",maxWidth:width,tag:item.BackdropImageTags[0]}):item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):item.SeriesThumbImageTag&&options.inheritThumb!==!1?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Thumb",maxWidth:width,tag:item.SeriesThumbImageTag}):item.ParentThumbItemId&&options.inheritThumb!==!1?imgUrl=apiClient.getScaledImageUrl(item.ParentThumbItemId,{type:"Thumb",maxWidth:width,tag:item.ParentThumbImageTag}):item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length&&options.inheritThumb!==!1&&(imgUrl=apiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",maxWidth:width,tag:item.ParentBackdropImageTags[0]})),{imgUrl:imgUrl,forceName:forceName,coverImage:coverImage}}function getRandomInt(min,max){return Math.floor(Math.random()*(max-min+1))+min}function getDefaultColorIndex(str){if(str){for(var charIndex=Math.floor(str.length/2),character=String(str.substr(charIndex,1).charCodeAt()),sum=0,i=0;i0&&isOuterFooter?currentCssClass+=" cardText-secondary":0===valid&&isOuterFooter&&(currentCssClass+=" cardText-first"),addRightMargin&&(currentCssClass+=" cardText-rightmargin"),text&&(html+="
",html+=text,html+="
",valid++,maxLines&&valid>=maxLines))break}if(forceLines)for(length=maxLines||Math.min(lines.length,maxLines||lines.length);valid ",valid++;return html}function isUsingLiveTvNaming(item){return"Program"===item.Type||"Timer"===item.Type||"Recording"===item.Type}function getAirTimeText(item,showAirDateTime,showAirEndTime){var airTimeText="";if(item.StartDate)try{var date=datetime.parseISO8601Date(item.StartDate);showAirDateTime&&(airTimeText+=datetime.toLocaleDateString(date,{weekday:"short",month:"short",day:"numeric"})+" "),airTimeText+=datetime.getDisplayTime(date),item.EndDate&&showAirEndTime&&(date=datetime.parseISO8601Date(item.EndDate),airTimeText+=" - "+datetime.getDisplayTime(date))}catch(e){console.log("Error parsing date: "+item.StartDate)}return airTimeText}function getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerClass,progressHtml,isOuterFooter){var hasLogo,html="";if(options.showChannelLogo&&item.ChannelPrimaryImageTag){var logoHeight=40;hasLogo=!0,html+=''}var showOtherText=isOuterFooter?!overlayText:overlayText;if(isOuterFooter&&options.cardLayout&&!layoutManager.tv&&"none"!==options.cardFooterAside){var moreIcon="dots-horiz"===appHost.moreIcon?"":"";html+='"}var titleAdded,cssClass=options.centerText?"cardText cardTextCentered":"cardText",lines=[],parentTitleUnderneath="MusicAlbum"===item.Type||"Audio"===item.Type||"MusicVideo"===item.Type;if(showOtherText&&(options.showParentTitle||options.showParentTitleOrTitle)&&!parentTitleUnderneath)if(isOuterFooter&&"Episode"===item.Type&&item.SeriesName&&item.SeriesId)lines.push(getTextActionButton({Id:item.SeriesId,ServerId:item.ServerId,Name:item.SeriesName,Type:"Series",IsFolder:!0}));else if(isUsingLiveTvNaming(item))lines.push(item.Name),item.EpisodeTitle||(titleAdded=!0);else{var parentTitle=item.SeriesName||item.Series||item.Album||item.AlbumArtist||item.GameSystem||"";(parentTitle||showTitle)&&lines.push(parentTitle)}var showMediaTitle=showTitle&&!titleAdded||options.showParentTitleOrTitle&&!lines.length;if(showMediaTitle||titleAdded||!showTitle&&!forceName||(showMediaTitle=!0),showMediaTitle){var name="auto"!==options.showTitle||item.IsFolder||"Photo"!==item.MediaType?itemHelper.getDisplayName(item,{includeParentInfo:options.includeParentInfoInTitle}):"";lines.push(name)}if(showOtherText){if(options.showParentTitle&&parentTitleUnderneath&&(isOuterFooter&&item.AlbumArtists&&item.AlbumArtists.length?(item.AlbumArtists[0].Type="MusicArtist",item.AlbumArtists[0].IsFolder=!0,lines.push(getTextActionButton(item.AlbumArtists[0],null,item.ServerId))):lines.push(isUsingLiveTvNaming(item)?item.Name:item.SeriesName||item.Series||item.Album||item.AlbumArtist||item.GameSystem||"")),options.showItemCounts){var itemCountHtml=getItemCountsHtml(options,item);lines.push(itemCountHtml)}if(options.textLines)for(var additionalLines=options.textLines(item),i=0,length=additionalLines.length;i'+html,html+=""),html}function getTextActionButton(item,text,serverId){if(text||(text=itemHelper.getDisplayName(item)),layoutManager.tv)return text;var html=""}function getItemCountsHtml(options,item){var childText,counts=[];if("Playlist"===item.Type){if(childText="",item.RunTimeTicks){var minutes=item.RunTimeTicks/6e8;minutes=minutes||1,childText+=globalize.translate("sharedcomponents#ValueMinutes",Math.round(minutes))}else childText+=globalize.translate("sharedcomponents#ValueMinutes",0);counts.push(childText)}else"Genre"===item.Type||"Studio"===item.Type?(item.MovieCount&&(childText=1===item.MovieCount?globalize.translate("sharedcomponents#ValueOneMovie"):globalize.translate("sharedcomponents#ValueMovieCount",item.MovieCount),counts.push(childText)),item.SeriesCount&&(childText=1===item.SeriesCount?globalize.translate("sharedcomponents#ValueOneSeries"):globalize.translate("sharedcomponents#ValueSeriesCount",item.SeriesCount),counts.push(childText)),item.EpisodeCount&&(childText=1===item.EpisodeCount?globalize.translate("sharedcomponents#ValueOneEpisode"):globalize.translate("sharedcomponents#ValueEpisodeCount",item.EpisodeCount),counts.push(childText)),item.GameCount&&(childText=1===item.GameCount?globalize.translate("sharedcomponents#ValueOneGame"):globalize.translate("sharedcomponents#ValueGameCount",item.GameCount),counts.push(childText))):"GameGenre"===item.Type?item.GameCount&&(childText=1===item.GameCount?globalize.translate("sharedcomponents#ValueOneGame"):globalize.translate("sharedcomponents#ValueGameCount",item.GameCount),counts.push(childText)):"MusicGenre"===item.Type||"MusicArtist"===options.context?(item.AlbumCount&&(childText=1===item.AlbumCount?globalize.translate("sharedcomponents#ValueOneAlbum"):globalize.translate("sharedcomponents#ValueAlbumCount",item.AlbumCount),counts.push(childText)),item.SongCount&&(childText=1===item.SongCount?globalize.translate("sharedcomponents#ValueOneSong"):globalize.translate("sharedcomponents#ValueSongCount",item.SongCount),counts.push(childText)),item.MusicVideoCount&&(childText=1===item.MusicVideoCount?globalize.translate("sharedcomponents#ValueOneMusicVideo"):globalize.translate("sharedcomponents#ValueMusicVideoCount",item.MusicVideoCount),counts.push(childText))):"Series"===item.Type&&(childText=1===item.RecursiveItemCount?globalize.translate("sharedcomponents#ValueOneEpisode"):globalize.translate("sharedcomponents#ValueEpisodeCount",item.RecursiveItemCount),counts.push(childText));return counts.join(", ")}function requireRefreshIndicator(){refreshIndicatorLoaded||(refreshIndicatorLoaded=!0,require(["emby-itemrefreshindicator"]))}function buildCard(index,item,apiClient,options){var action=options.action||"link";"play"===action&&item.IsFolder?action="link":"Photo"===item.MediaType&&(action="play");var shape=options.shape;if("mixed"===shape){shape=null;var primaryImageAspectRatio=item.PrimaryImageAspectRatio;primaryImageAspectRatio&&(shape=primaryImageAspectRatio>=1.33?"mixedBackdrop":primaryImageAspectRatio>.71?"mixedSquare":"mixedPortrait"),shape=shape||"mixedSquare"}var enableFocusTransfrom=!browser.slow&&!browser.xboxOne&&!browser.edgeUwp,className="card";shape&&(className+=" "+shape+"Card"),options.cardCssClass&&(className+=" "+options.cardCssClass),options.cardClass&&(className+=" "+options.cardClass),enableFocusTransfrom&&layoutManager.tv||(className+=" card-nofocustransform");var imgInfo=getCardImageUrl(item,apiClient,options,shape),imgUrl=imgInfo.imgUrl,forceName=imgInfo.forceName,showTitle="auto"===options.showTitle||(options.showTitle||"PhotoAlbum"===item.Type||"Folder"===item.Type),overlayText=options.overlayText;forceName&&!options.cardLayout&&null==overlayText&&(overlayText=!0);var cardImageContainerClass="cardImageContainer",coveredImage=options.coverImage||imgInfo.coverImage;coveredImage&&(cardImageContainerClass+=" coveredImage",("Photo"===item.MediaType||"PhotoAlbum"===item.Type||"Folder"===item.Type||item.ProgramInfo||"Program"===item.Type||"Recording"===item.Type)&&(cardImageContainerClass+=" coveredImage-noScale")),imgUrl||(cardImageContainerClass+=" "+getDefaultColorClass(item.Name));var cardBoxClass=options.cardLayout?"cardBox visualCardBox":"cardBox";layoutManager.tv&&(enableFocusTransfrom&&(cardBoxClass+=" cardBox-focustransform"),options.cardLayout&&(cardBoxClass+=" card-focuscontent",enableFocusTransfrom||(cardBoxClass+=" card-focuscontent-large")));var footerCssClass,progressHtml=indicators.getProgressBarHtml(item),innerCardFooter="",footerOverlayed=!1;overlayText?(footerCssClass=progressHtml?"innerCardFooter fullInnerCardFooter":"innerCardFooter",innerCardFooter+=getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerCssClass,progressHtml,!1),footerOverlayed=!0):progressHtml&&(innerCardFooter+='
',innerCardFooter+=progressHtml,innerCardFooter+="
",progressHtml="");var mediaSourceCount=item.MediaSourceCount||1;mediaSourceCount>1&&(innerCardFooter+='
'+mediaSourceCount+"
");var outerCardFooter="";overlayText||footerOverlayed||(footerCssClass=options.cardLayout?"cardFooter":"cardFooter cardFooter-transparent",options.showChannelLogo&&item.ChannelPrimaryImageTag&&(footerCssClass+=" cardFooter-withlogo"),outerCardFooter=getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerCssClass,progressHtml,!0)),outerCardFooter&&!options.cardLayout&&(cardBoxClass+=" cardBox-bottompadded");var overlayButtons="";if(!layoutManager.tv){var overlayPlayButton=options.overlayPlayButton;null!=overlayPlayButton||options.overlayMoreButton||options.overlayInfoButton||options.cardLayout||(overlayPlayButton="Video"===item.MediaType);var btnCssClass="cardOverlayButton itemAction";if(options.centerPlayButton&&(overlayButtons+=''),!overlayPlayButton||item.IsPlaceHolder||"Virtual"===item.LocationType&&item.MediaType&&"Program"!==item.Type||"Person"===item.Type||(overlayButtons+=''),options.overlayMoreButton){var moreIcon="dots-horiz"===appHost.moreIcon?"":"";overlayButtons+='"}options.overlayInfoButton&&(overlayButtons+='')}options.showChildCountIndicator&&item.ChildCount&&(className+=" groupedCard");var cardImageContainerOpen,cardImageContainerClose="",cardBoxClose="",cardScalableClose="",cardContentClass="cardContent";options.cardLayout||(cardContentClass+=" cardContent-shadow"),layoutManager.tv?(cardImageContainerOpen=imgUrl?'
':'
',cardImageContainerClose="
"):(cardImageContainerOpen=imgUrl?'");var cardScalableClass="cardScalable";layoutManager.tv&&!options.cardLayout&&(cardScalableClass+=" card-focuscontent",enableFocusTransfrom||(cardScalableClass+=" card-focuscontent-large")),cardImageContainerOpen='
'+cardImageContainerOpen,cardBoxClose="
",cardScalableClose="
";var indicatorsHtml="";if(indicatorsHtml+=indicators.getSyncIndicator(item),indicatorsHtml+=indicators.getTimerIndicator(item),indicatorsHtml+=indicators.getTypeIndicator(item),indicatorsHtml+=options.showGroupCount?indicators.getChildCountIndicatorHtml(item,{minCount:1}):indicators.getPlayedIndicatorHtml(item),"CollectionFolder"===item.Type||item.CollectionType){var refreshClass=item.RefreshProgress||item.RefreshStatus&&"Idle"!==virtualFolder.item?"":' class="hide"';indicatorsHtml+='
',requireRefreshIndicator()}if(indicatorsHtml&&(cardImageContainerOpen+='
'+indicatorsHtml+"
"),!imgUrl){var defaultName=isUsingLiveTvNaming(item)?item.Name:itemHelper.getDisplayName(item);cardImageContainerOpen+='
'+defaultName+"
"}var tagName=layoutManager.tv&&!overlayButtons?"button":"div",nameWithPrefix=item.SortName||item.Name||"",prefix=nameWithPrefix.substring(0,Math.min(3,nameWithPrefix.length));prefix&&(prefix=prefix.toUpperCase());var timerAttributes="";item.TimerId&&(timerAttributes+=' data-timerid="'+item.TimerId+'"'),item.SeriesTimerId&&(timerAttributes+=' data-seriestimerid="'+item.SeriesTimerId+'"');var actionAttribute;"button"===tagName?(className+=" itemAction",actionAttribute=' data-action="'+action+'"'):actionAttribute="","MusicAlbum"!==item.Type&&"MusicArtist"!==item.Type&&"Audio"!==item.Type&&(className+=" card-withuserdata");var positionTicksData=item.UserData&&item.UserData.PlaybackPositionTicks?' data-positionticks="'+item.UserData.PlaybackPositionTicks+'"':"",collectionIdData=options.collectionId?' data-collectionid="'+options.collectionId+'"':"",playlistIdData=options.playlistId?' data-playlistid="'+options.playlistId+'"':"",mediaTypeData=item.MediaType?' data-mediatype="'+item.MediaType+'"':"",collectionTypeData=item.CollectionType?' data-collectiontype="'+item.CollectionType+'"':"",channelIdData=item.ChannelId?' data-channelid="'+item.ChannelId+'"':"",contextData=options.context?' data-context="'+options.context+'"':"",parentIdData=options.parentId?' data-parentid="'+options.parentId+'"':"";return"<"+tagName+' data-index="'+index+'"'+timerAttributes+actionAttribute+' data-isfolder="'+(item.IsFolder||!1)+'" data-serverid="'+(item.ServerId||options.serverId)+'" data-id="'+(item.Id||item.ItemId)+'" data-type="'+item.Type+'"'+mediaTypeData+collectionTypeData+channelIdData+positionTicksData+collectionIdData+playlistIdData+contextData+parentIdData+' data-prefix="'+prefix+'" class="'+className+'">'+cardImageContainerOpen+innerCardFooter+cardImageContainerClose+overlayButtons+cardScalableClose+outerCardFooter+cardBoxClose+""}function buildCards(items,options){if(document.body.contains(options.itemsContainer)){if(options.parentContainer){if(!items.length)return void options.parentContainer.classList.add("hide");options.parentContainer.classList.remove("hide")}var html=buildCardsHtmlInternal(items,options);html?(options.itemsContainer.cardBuilderHtml!==html&&(options.itemsContainer.innerHTML=html,items.length<50?options.itemsContainer.cardBuilderHtml=html:options.itemsContainer.cardBuilderHtml=null),imageLoader.lazyChildren(options.itemsContainer)):(options.itemsContainer.innerHTML=html,options.itemsContainer.cardBuilderHtml=null),options.autoFocus&&focusManager.autoFocus(options.itemsContainer,!0)}}function ensureIndicators(card,indicatorsElem){if(indicatorsElem)return indicatorsElem;if(indicatorsElem=card.querySelector(".cardIndicators"),!indicatorsElem){var cardImageContainer=card.querySelector(".cardImageContainer");indicatorsElem=document.createElement("div"),indicatorsElem.classList.add("cardIndicators"),cardImageContainer.appendChild(indicatorsElem)}return indicatorsElem}function updateUserData(card,userData){var type=card.getAttribute("data-type"),enableCountIndicator="Series"===type||"BoxSet"===type||"Season"===type,indicatorsElem=null,playedIndicator=null,countIndicator=null,itemProgressBar=null;userData.Played?(playedIndicator=card.querySelector(".playedIndicator"),playedIndicator||(playedIndicator=document.createElement("div"),playedIndicator.classList.add("playedIndicator"),playedIndicator.classList.add("indicator"),indicatorsElem=ensureIndicators(card,indicatorsElem),indicatorsElem.appendChild(playedIndicator)),playedIndicator.innerHTML=''):(playedIndicator=card.querySelector(".playedIndicator"),playedIndicator&&playedIndicator.parentNode.removeChild(playedIndicator)),userData.UnplayedItemCount?(countIndicator=card.querySelector(".countIndicator"),countIndicator||(countIndicator=document.createElement("div"),countIndicator.classList.add("countIndicator"),indicatorsElem=ensureIndicators(card,indicatorsElem),indicatorsElem.appendChild(countIndicator)),countIndicator.innerHTML=userData.UnplayedItemCount):enableCountIndicator&&(countIndicator=card.querySelector(".countIndicator"),countIndicator&&countIndicator.parentNode.removeChild(countIndicator));var progressHtml=indicators.getProgressBarHtml({Type:type,UserData:userData,MediaType:"Video"});if(progressHtml){if(itemProgressBar=card.querySelector(".itemProgressBar"),!itemProgressBar){itemProgressBar=document.createElement("div"),itemProgressBar.classList.add("itemProgressBar");var innerCardFooter=card.querySelector(".innerCardFooter");if(!innerCardFooter){innerCardFooter=document.createElement("div"),innerCardFooter.classList.add("innerCardFooter");var cardImageContainer=card.querySelector(".cardImageContainer"); -cardImageContainer.appendChild(innerCardFooter)}innerCardFooter.appendChild(itemProgressBar)}itemProgressBar.innerHTML=progressHtml}else itemProgressBar=card.querySelector(".itemProgressBar"),itemProgressBar&&itemProgressBar.parentNode.removeChild(itemProgressBar)}function onUserDataChanged(userData,scope){for(var cards=(scope||document.body).querySelectorAll('.card-withuserdata[data-id="'+userData.ItemId+'"]'),i=0,length=cards.length;i')}cell.setAttribute("data-timerid",newTimerId)}}function onTimerCancelled(id,itemsContainer){for(var cells=itemsContainer.querySelectorAll('.card[data-timerid="'+id+'"]'),i=0,length=cells.length;i=2200?10:screenWidth>=2100?9:screenWidth>=1600?8:screenWidth>=1400?7:screenWidth>=1200?6:screenWidth>=800?5:screenWidth>=640?4:3;case"square":return screenWidth>=2100?9:screenWidth>=1800?8:screenWidth>=1400?7:screenWidth>=1200?6:screenWidth>=900?5:screenWidth>=700?4:screenWidth>=500?3:2;case"banner":return screenWidth>=2200?4:screenWidth>=1200?3:screenWidth>=800?2:1;case"backdrop":return screenWidth>=2500?6:screenWidth>=1600?5:screenWidth>=1200?4:screenWidth>=770?3:screenWidth>=420?2:1;case"smallBackdrop":return screenWidth>=1440?8:screenWidth>=1100?6:screenWidth>=800?5:screenWidth>=600?4:screenWidth>=540?3:screenWidth>=420?2:1;case"overflowPortrait":return screenWidth>=1e3?100/22:screenWidth>=540?100/30:100/42;case"overflowSquare":return screenWidth>=1e3?100/22:screenWidth>=540?100/30:100/42;case"overflowBackdrop":return screenWidth>=1e3?2.5:screenWidth>=640?100/56:screenWidth>=540?1.5625:100/72;default:return 4}}function isResizable(windowWidth){var screen=window.screen;if(screen){var screenWidth=screen.availWidth;if(screenWidth-windowWidth>20)return!0}return!1}function getImageWidth(shape){var screenWidth=dom.getWindowSize().innerWidth;if(isResizable(screenWidth)){var roundScreenTo=100;screenWidth=Math.floor(screenWidth/roundScreenTo)*roundScreenTo}window.screen&&(screenWidth=Math.min(screenWidth,screen.availWidth||screenWidth));var imagesPerRow=getPostersPerRow(shape,screenWidth),shapeWidth=screenWidth/imagesPerRow;return Math.round(shapeWidth)}function setCardData(items,options){options.shape=options.shape||"auto";var primaryImageAspectRatio=imageLoader.getPrimaryImageAspectRatio(items);if("auto"===options.shape||"autohome"===options.shape||"autooverflow"===options.shape||"autoVertical"===options.shape){var requestedShape=options.shape;options.shape=null,primaryImageAspectRatio&&(primaryImageAspectRatio>=3?(options.shape="banner",options.coverImage=!0):primaryImageAspectRatio>=1.33?options.shape="autooverflow"===requestedShape?"overflowBackdrop":"backdrop":primaryImageAspectRatio>.71?options.shape="autooverflow"===requestedShape?"overflowSquare":"square":options.shape="autooverflow"===requestedShape?"overflowPortrait":"portrait"),options.shape||(options.shape=options.defaultShape||("autooverflow"===requestedShape?"overflowSquare":"square"))}"auto"===options.preferThumb&&(options.preferThumb="backdrop"===options.shape||"overflowBackdrop"===options.shape),options.uiAspect=getDesiredAspect(options.shape),options.primaryImageAspectRatio=primaryImageAspectRatio,!options.width&&options.widths&&(options.width=options.widths[options.shape]),options.rows&&"number"!=typeof options.rows&&(options.rows=options.rows[options.shape]),layoutManager.tv&&("backdrop"===options.shape?options.width=options.width||500:"portrait"===options.shape?options.width=options.width||256:"square"===options.shape?options.width=options.width||256:"banner"===options.shape&&(options.width=options.width||800)),options.width=options.width||getImageWidth(options.shape)}function buildCardsHtmlInternal(items,options){var isVertical;"autoVertical"===options.shape&&(isVertical=!0),setCardData(items,options);var currentIndexValue,hasOpenRow,hasOpenSection,apiClient,lastServerId,i,length,html="",itemsInRow=0,sectionTitleTagName=options.sectionTitleTagName||"div";for(i=0,length=items.length;i=.5?.5:0)+"+":null);newIndexValue!==currentIndexValue&&(hasOpenRow&&(html+="
",hasOpenRow=!1,itemsInRow=0),hasOpenSection&&(html+="",isVertical&&(html+=""),hasOpenSection=!1),html+=isVertical?'
':'
',html+="<"+sectionTitleTagName+' class="sectionTitle">'+newIndexValue+"",isVertical&&(html+='
'),currentIndexValue=newIndexValue,hasOpenSection=!0)}options.rows&&0===itemsInRow&&(hasOpenRow&&(html+="
",hasOpenRow=!1),html+='
',hasOpenRow=!0),html+=buildCard(i,item,apiClient,options),itemsInRow++,options.rows&&itemsInRow>=options.rows&&(html+="
",hasOpenRow=!1,itemsInRow=0)}hasOpenRow&&(html+="
"),hasOpenSection&&(html+="
",isVertical&&(html+=""));var cardFooterHtml='
';for(i=0,length=options.lines;i 
';if(cardFooterHtml+="",options.leadingButtons)for(i=0,length=options.leadingButtons.length;i
'+options.leadingButtons[i].name+"
"+cardFooterHtml+"
"+html;if(options.trailingButtons)for(i=0,length=options.trailingButtons.length;i
'+options.trailingButtons[i].name+"
"+cardFooterHtml+"
";return html}function getDesiredAspect(shape){if(shape){if(shape=shape.toLowerCase(),shape.indexOf("portrait")!==-1)return 2/3;if(shape.indexOf("backdrop")!==-1)return 16/9;if(shape.indexOf("square")!==-1)return 1;if(shape.indexOf("banner")!==-1)return 1e3/185}return null}function getCardImageUrl(item,apiClient,options,shape){var imageItem=item.ProgramInfo||item;item=imageItem;var width=options.width,height=null,primaryImageAspectRatio=item.PrimaryImageAspectRatio,forceName=!1,imgUrl=null,coverImage=!1,uiAspect=null;return options.preferThumb&&item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):(options.preferBanner||"banner"===shape)&&item.ImageTags&&item.ImageTags.Banner?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Banner",maxWidth:width,tag:item.ImageTags.Banner}):options.preferDisc&&item.ImageTags&&item.ImageTags.Disc?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Disc",maxWidth:width,tag:item.ImageTags.Disc}):options.preferThumb&&item.SeriesThumbImageTag&&options.inheritThumb!==!1?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Thumb",maxWidth:width,tag:item.SeriesThumbImageTag}):options.preferThumb&&item.ParentThumbItemId&&options.inheritThumb!==!1&&"Photo"!==item.MediaType?imgUrl=apiClient.getScaledImageUrl(item.ParentThumbItemId,{type:"Thumb",maxWidth:width,tag:item.ParentThumbImageTag}):options.preferThumb&&item.BackdropImageTags&&item.BackdropImageTags.length?(imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Backdrop",maxWidth:width,tag:item.BackdropImageTags[0]}),forceName=!0):options.preferThumb&&item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length&&options.inheritThumb!==!1&&"Episode"===item.Type?imgUrl=apiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",maxWidth:width,tag:item.ParentBackdropImageTags[0]}):item.ImageTags&&item.ImageTags.Primary?(height=width&&primaryImageAspectRatio?Math.round(width/primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.ImageTags.Primary}),options.preferThumb&&options.showTitle!==!1&&(forceName=!0),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape),uiAspect&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2))):item.PrimaryImageTag?(height=width&&primaryImageAspectRatio?Math.round(width/primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.PrimaryImageItemId||item.Id||item.ItemId,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.PrimaryImageTag}),options.preferThumb&&options.showTitle!==!1&&(forceName=!0),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape),uiAspect&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2))):item.ParentPrimaryImageTag?imgUrl=apiClient.getScaledImageUrl(item.ParentPrimaryImageItemId,{type:"Primary",maxWidth:width,tag:item.ParentPrimaryImageTag}):item.SeriesPrimaryImageTag?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Primary",maxWidth:width,tag:item.SeriesPrimaryImageTag}):item.AlbumId&&item.AlbumPrimaryImageTag?(width=primaryImageAspectRatio?Math.round(height*primaryImageAspectRatio):null,imgUrl=apiClient.getScaledImageUrl(item.AlbumId,{type:"Primary",maxHeight:height,maxWidth:width,tag:item.AlbumPrimaryImageTag}),primaryImageAspectRatio&&(uiAspect=getDesiredAspect(shape),uiAspect&&(coverImage=Math.abs(primaryImageAspectRatio-uiAspect)/uiAspect<=.2))):"Season"===item.Type&&item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):item.BackdropImageTags&&item.BackdropImageTags.length?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Backdrop",maxWidth:width,tag:item.BackdropImageTags[0]}):item.ImageTags&&item.ImageTags.Thumb?imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",maxWidth:width,tag:item.ImageTags.Thumb}):item.SeriesThumbImageTag&&options.inheritThumb!==!1?imgUrl=apiClient.getScaledImageUrl(item.SeriesId,{type:"Thumb",maxWidth:width,tag:item.SeriesThumbImageTag}):item.ParentThumbItemId&&options.inheritThumb!==!1?imgUrl=apiClient.getScaledImageUrl(item.ParentThumbItemId,{type:"Thumb",maxWidth:width,tag:item.ParentThumbImageTag}):item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length&&options.inheritThumb!==!1&&(imgUrl=apiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",maxWidth:width,tag:item.ParentBackdropImageTags[0]})),{imgUrl:imgUrl,forceName:forceName,coverImage:coverImage}}function getRandomInt(min,max){return Math.floor(Math.random()*(max-min+1))+min}function getDefaultColorIndex(str){if(str){for(var charIndex=Math.floor(str.length/2),character=String(str.substr(charIndex,1).charCodeAt()),sum=0,i=0;i0&&isOuterFooter?currentCssClass+=" cardText-secondary":0===valid&&isOuterFooter&&(currentCssClass+=" cardText-first"),addRightMargin&&(currentCssClass+=" cardText-rightmargin"),text&&(html+="
",html+=text,html+="
",valid++,maxLines&&valid>=maxLines))break}if(forceLines)for(length=maxLines||Math.min(lines.length,maxLines||lines.length);valid ",valid++;return html}function isUsingLiveTvNaming(item){return"Program"===item.Type||"Timer"===item.Type||"Recording"===item.Type}function getAirTimeText(item,showAirDateTime,showAirEndTime){var airTimeText="";if(item.StartDate)try{var date=datetime.parseISO8601Date(item.StartDate);showAirDateTime&&(airTimeText+=datetime.toLocaleDateString(date,{weekday:"short",month:"short",day:"numeric"})+" "),airTimeText+=datetime.getDisplayTime(date),item.EndDate&&showAirEndTime&&(date=datetime.parseISO8601Date(item.EndDate),airTimeText+=" - "+datetime.getDisplayTime(date))}catch(e){console.log("Error parsing date: "+item.StartDate)}return airTimeText}function getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerClass,progressHtml,isOuterFooter){var hasLogo,html="";if(options.showChannelLogo&&item.ChannelPrimaryImageTag){var logoHeight=40;hasLogo=!0,html+=''}var showOtherText=isOuterFooter?!overlayText:overlayText;if(isOuterFooter&&options.cardLayout&&!layoutManager.tv&&"none"!==options.cardFooterAside){var moreIcon="dots-horiz"===appHost.moreIcon?"":"";html+='"}var titleAdded,cssClass=options.centerText?"cardText cardTextCentered":"cardText",lines=[],parentTitleUnderneath="MusicAlbum"===item.Type||"Audio"===item.Type||"MusicVideo"===item.Type;if(showOtherText&&(options.showParentTitle||options.showParentTitleOrTitle)&&!parentTitleUnderneath)if(isOuterFooter&&"Episode"===item.Type&&item.SeriesName&&item.SeriesId)lines.push(getTextActionButton({Id:item.SeriesId,ServerId:item.ServerId,Name:item.SeriesName,Type:"Series",IsFolder:!0}));else if(isUsingLiveTvNaming(item))lines.push(item.Name),item.EpisodeTitle||(titleAdded=!0);else{var parentTitle=item.SeriesName||item.Series||item.Album||item.AlbumArtist||item.GameSystem||"";(parentTitle||showTitle)&&lines.push(parentTitle)}var showMediaTitle=showTitle&&!titleAdded||options.showParentTitleOrTitle&&!lines.length;if(showMediaTitle||titleAdded||!showTitle&&!forceName||(showMediaTitle=!0),showMediaTitle){var name="auto"!==options.showTitle||item.IsFolder||"Photo"!==item.MediaType?itemHelper.getDisplayName(item,{includeParentInfo:options.includeParentInfoInTitle}):"";lines.push(name)}if(showOtherText){if(options.showParentTitle&&parentTitleUnderneath&&(isOuterFooter&&item.AlbumArtists&&item.AlbumArtists.length?(item.AlbumArtists[0].Type="MusicArtist",item.AlbumArtists[0].IsFolder=!0,lines.push(getTextActionButton(item.AlbumArtists[0],null,item.ServerId))):lines.push(isUsingLiveTvNaming(item)?item.Name:item.SeriesName||item.Series||item.Album||item.AlbumArtist||item.GameSystem||"")),options.showItemCounts){var itemCountHtml=getItemCountsHtml(options,item);lines.push(itemCountHtml)}if(options.textLines)for(var additionalLines=options.textLines(item),i=0,length=additionalLines.length;i'+html,html+=""),html}function getTextActionButton(item,text,serverId){if(text||(text=itemHelper.getDisplayName(item)),layoutManager.tv)return text;var html=""}function getItemCountsHtml(options,item){var childText,counts=[];if("Playlist"===item.Type){if(childText="",item.RunTimeTicks){var minutes=item.RunTimeTicks/6e8;minutes=minutes||1,childText+=globalize.translate("sharedcomponents#ValueMinutes",Math.round(minutes))}else childText+=globalize.translate("sharedcomponents#ValueMinutes",0);counts.push(childText)}else"Genre"===item.Type||"Studio"===item.Type?(item.MovieCount&&(childText=1===item.MovieCount?globalize.translate("sharedcomponents#ValueOneMovie"):globalize.translate("sharedcomponents#ValueMovieCount",item.MovieCount),counts.push(childText)),item.SeriesCount&&(childText=1===item.SeriesCount?globalize.translate("sharedcomponents#ValueOneSeries"):globalize.translate("sharedcomponents#ValueSeriesCount",item.SeriesCount),counts.push(childText)),item.EpisodeCount&&(childText=1===item.EpisodeCount?globalize.translate("sharedcomponents#ValueOneEpisode"):globalize.translate("sharedcomponents#ValueEpisodeCount",item.EpisodeCount),counts.push(childText)),item.GameCount&&(childText=1===item.GameCount?globalize.translate("sharedcomponents#ValueOneGame"):globalize.translate("sharedcomponents#ValueGameCount",item.GameCount),counts.push(childText))):"GameGenre"===item.Type?item.GameCount&&(childText=1===item.GameCount?globalize.translate("sharedcomponents#ValueOneGame"):globalize.translate("sharedcomponents#ValueGameCount",item.GameCount),counts.push(childText)):"MusicGenre"===item.Type||"MusicArtist"===options.context?(item.AlbumCount&&(childText=1===item.AlbumCount?globalize.translate("sharedcomponents#ValueOneAlbum"):globalize.translate("sharedcomponents#ValueAlbumCount",item.AlbumCount),counts.push(childText)),item.SongCount&&(childText=1===item.SongCount?globalize.translate("sharedcomponents#ValueOneSong"):globalize.translate("sharedcomponents#ValueSongCount",item.SongCount),counts.push(childText)),item.MusicVideoCount&&(childText=1===item.MusicVideoCount?globalize.translate("sharedcomponents#ValueOneMusicVideo"):globalize.translate("sharedcomponents#ValueMusicVideoCount",item.MusicVideoCount),counts.push(childText))):"Series"===item.Type&&(childText=1===item.RecursiveItemCount?globalize.translate("sharedcomponents#ValueOneEpisode"):globalize.translate("sharedcomponents#ValueEpisodeCount",item.RecursiveItemCount),counts.push(childText));return counts.join(", ")}function requireRefreshIndicator(){refreshIndicatorLoaded||(refreshIndicatorLoaded=!0,require(["emby-itemrefreshindicator"]))}function buildCard(index,item,apiClient,options){var action=options.action||"link";"play"===action&&item.IsFolder?action="link":"Photo"===item.MediaType&&(action="play");var shape=options.shape;if("mixed"===shape){shape=null;var primaryImageAspectRatio=item.PrimaryImageAspectRatio;primaryImageAspectRatio&&(shape=primaryImageAspectRatio>=1.33?"mixedBackdrop":primaryImageAspectRatio>.71?"mixedSquare":"mixedPortrait"),shape=shape||"mixedSquare"}var enableFocusTransfrom=!browser.slow&&!browser.xboxOne&&!browser.edgeUwp,className="card";shape&&(className+=" "+shape+"Card"),options.cardCssClass&&(className+=" "+options.cardCssClass),options.cardClass&&(className+=" "+options.cardClass),enableFocusTransfrom&&layoutManager.tv||(className+=" card-nofocustransform");var imgInfo=getCardImageUrl(item,apiClient,options,shape),imgUrl=imgInfo.imgUrl,forceName=imgInfo.forceName,showTitle="auto"===options.showTitle||(options.showTitle||"PhotoAlbum"===item.Type||"Folder"===item.Type),overlayText=options.overlayText;forceName&&!options.cardLayout&&null==overlayText&&(overlayText=!0);var cardImageContainerClass="cardImageContainer",coveredImage=options.coverImage||imgInfo.coverImage;coveredImage&&(cardImageContainerClass+=" coveredImage",("Photo"===item.MediaType||"PhotoAlbum"===item.Type||"Folder"===item.Type||item.ProgramInfo||"Program"===item.Type||"Recording"===item.Type)&&(cardImageContainerClass+=" coveredImage-noScale")),imgUrl||(cardImageContainerClass+=" "+getDefaultColorClass(item.Name));var cardBoxClass=options.cardLayout?"cardBox visualCardBox":"cardBox";layoutManager.tv&&(enableFocusTransfrom&&(cardBoxClass+=" cardBox-focustransform"),options.cardLayout&&(cardBoxClass+=" card-focuscontent",enableFocusTransfrom||(cardBoxClass+=" card-focuscontent-large")));var footerCssClass,progressHtml=indicators.getProgressBarHtml(item),innerCardFooter="",footerOverlayed=!1;overlayText?(footerCssClass=progressHtml?"innerCardFooter fullInnerCardFooter":"innerCardFooter",innerCardFooter+=getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerCssClass,progressHtml,!1),footerOverlayed=!0):progressHtml&&(innerCardFooter+='
',innerCardFooter+=progressHtml,innerCardFooter+="
",progressHtml="");var mediaSourceCount=item.MediaSourceCount||1;mediaSourceCount>1&&(innerCardFooter+='
'+mediaSourceCount+"
");var outerCardFooter="";overlayText||footerOverlayed||(footerCssClass=options.cardLayout?"cardFooter":"cardFooter cardFooter-transparent",options.showChannelLogo&&item.ChannelPrimaryImageTag&&(footerCssClass+=" cardFooter-withlogo"),outerCardFooter=getCardFooterText(item,apiClient,options,showTitle,forceName,overlayText,imgUrl,footerCssClass,progressHtml,!0)),outerCardFooter&&!options.cardLayout&&(cardBoxClass+=" cardBox-bottompadded");var overlayButtons="";if(!layoutManager.tv){var overlayPlayButton=options.overlayPlayButton;null!=overlayPlayButton||options.overlayMoreButton||options.overlayInfoButton||options.cardLayout||(overlayPlayButton="Video"===item.MediaType);var btnCssClass="cardOverlayButton itemAction";if(options.centerPlayButton&&(overlayButtons+=''),!overlayPlayButton||item.IsPlaceHolder||"Virtual"===item.LocationType&&item.MediaType&&"Program"!==item.Type||"Person"===item.Type||(overlayButtons+=''),options.overlayMoreButton){var moreIcon="dots-horiz"===appHost.moreIcon?"":"";overlayButtons+='"}options.overlayInfoButton&&(overlayButtons+='')}options.showChildCountIndicator&&item.ChildCount&&(className+=" groupedCard");var cardImageContainerOpen,cardImageContainerClose="",cardBoxClose="",cardScalableClose="",cardContentClass="cardContent";options.cardLayout||(cardContentClass+=" cardContent-shadow"),layoutManager.tv?(cardImageContainerOpen=imgUrl?'
':'
',cardImageContainerClose="
"):(cardImageContainerOpen=imgUrl?'");var cardScalableClass="cardScalable";layoutManager.tv&&!options.cardLayout&&(cardScalableClass+=" card-focuscontent",enableFocusTransfrom||(cardScalableClass+=" card-focuscontent-large")),cardImageContainerOpen='
'+cardImageContainerOpen,cardBoxClose="
",cardScalableClose="
";var indicatorsHtml="";if(indicatorsHtml+=indicators.getSyncIndicator(item),indicatorsHtml+=indicators.getTimerIndicator(item),indicatorsHtml+=indicators.getTypeIndicator(item),indicatorsHtml+=options.showGroupCount?indicators.getChildCountIndicatorHtml(item,{minCount:1}):indicators.getPlayedIndicatorHtml(item),"CollectionFolder"===item.Type||item.CollectionType){var refreshClass=item.RefreshProgress||item.RefreshStatus&&"Idle"!==virtualFolder.item?"":' class="hide"';indicatorsHtml+='
',requireRefreshIndicator()}if(indicatorsHtml&&(cardImageContainerOpen+='
'+indicatorsHtml+"
"),!imgUrl){var defaultName=isUsingLiveTvNaming(item)?item.Name:itemHelper.getDisplayName(item);cardImageContainerOpen+='
'+defaultName+"
"}var tagName=layoutManager.tv&&!overlayButtons?"button":"div",nameWithPrefix=item.SortName||item.Name||"",prefix=nameWithPrefix.substring(0,Math.min(3,nameWithPrefix.length));prefix&&(prefix=prefix.toUpperCase());var timerAttributes="";item.TimerId&&(timerAttributes+=' data-timerid="'+item.TimerId+'"'),item.SeriesTimerId&&(timerAttributes+=' data-seriestimerid="'+item.SeriesTimerId+'"');var actionAttribute;"button"===tagName?(className+=" itemAction",actionAttribute=' data-action="'+action+'"'):actionAttribute="","MusicAlbum"!==item.Type&&"MusicArtist"!==item.Type&&"Audio"!==item.Type&&(className+=" card-withuserdata");var positionTicksData=item.UserData&&item.UserData.PlaybackPositionTicks?' data-positionticks="'+item.UserData.PlaybackPositionTicks+'"':"",collectionIdData=options.collectionId?' data-collectionid="'+options.collectionId+'"':"",playlistIdData=options.playlistId?' data-playlistid="'+options.playlistId+'"':"",mediaTypeData=item.MediaType?' data-mediatype="'+item.MediaType+'"':"",collectionTypeData=item.CollectionType?' data-collectiontype="'+item.CollectionType+'"':"",channelIdData=item.ChannelId?' data-channelid="'+item.ChannelId+'"':"",contextData=options.context?' data-context="'+options.context+'"':"",parentIdData=options.parentId?' data-parentid="'+options.parentId+'"':"";return"<"+tagName+' data-index="'+index+'"'+timerAttributes+actionAttribute+' data-isfolder="'+(item.IsFolder||!1)+'" data-serverid="'+(item.ServerId||options.serverId)+'" data-id="'+(item.Id||item.ItemId)+'" data-type="'+item.Type+'"'+mediaTypeData+collectionTypeData+channelIdData+positionTicksData+collectionIdData+playlistIdData+contextData+parentIdData+' data-prefix="'+prefix+'" class="'+className+'">'+cardImageContainerOpen+innerCardFooter+cardImageContainerClose+overlayButtons+cardScalableClose+outerCardFooter+cardBoxClose+""}function buildCards(items,options){if(document.body.contains(options.itemsContainer)){if(options.parentContainer){if(!items.length)return void options.parentContainer.classList.add("hide");options.parentContainer.classList.remove("hide")}var html=buildCardsHtmlInternal(items,options);html?(options.itemsContainer.cardBuilderHtml!==html&&(options.itemsContainer.innerHTML=html,items.length<50?options.itemsContainer.cardBuilderHtml=html:options.itemsContainer.cardBuilderHtml=null),imageLoader.lazyChildren(options.itemsContainer)):(options.itemsContainer.innerHTML=html,options.itemsContainer.cardBuilderHtml=null),options.autoFocus&&focusManager.autoFocus(options.itemsContainer,!0)}}function ensureIndicators(card,indicatorsElem){if(indicatorsElem)return indicatorsElem;if(indicatorsElem=card.querySelector(".cardIndicators"),!indicatorsElem){var cardImageContainer=card.querySelector(".cardImageContainer");indicatorsElem=document.createElement("div"),indicatorsElem.classList.add("cardIndicators"),cardImageContainer.appendChild(indicatorsElem)}return indicatorsElem}function updateUserData(card,userData){var type=card.getAttribute("data-type"),enableCountIndicator="Series"===type||"BoxSet"===type||"Season"===type,indicatorsElem=null,playedIndicator=null,countIndicator=null,itemProgressBar=null;userData.Played?(playedIndicator=card.querySelector(".playedIndicator"),playedIndicator||(playedIndicator=document.createElement("div"),playedIndicator.classList.add("playedIndicator"),playedIndicator.classList.add("indicator"),indicatorsElem=ensureIndicators(card,indicatorsElem),indicatorsElem.appendChild(playedIndicator)),playedIndicator.innerHTML=''):(playedIndicator=card.querySelector(".playedIndicator"),playedIndicator&&playedIndicator.parentNode.removeChild(playedIndicator)),userData.UnplayedItemCount?(countIndicator=card.querySelector(".countIndicator"),countIndicator||(countIndicator=document.createElement("div"),countIndicator.classList.add("countIndicator"),indicatorsElem=ensureIndicators(card,indicatorsElem),indicatorsElem.appendChild(countIndicator)),countIndicator.innerHTML=userData.UnplayedItemCount):enableCountIndicator&&(countIndicator=card.querySelector(".countIndicator"),countIndicator&&countIndicator.parentNode.removeChild(countIndicator));var progressHtml=indicators.getProgressBarHtml({Type:type,UserData:userData,MediaType:"Video"});if(progressHtml){if(itemProgressBar=card.querySelector(".itemProgressBar"),!itemProgressBar){itemProgressBar=document.createElement("div"),itemProgressBar.classList.add("itemProgressBar");var innerCardFooter=card.querySelector(".innerCardFooter"); +if(!innerCardFooter){innerCardFooter=document.createElement("div"),innerCardFooter.classList.add("innerCardFooter");var cardImageContainer=card.querySelector(".cardImageContainer");cardImageContainer.appendChild(innerCardFooter)}innerCardFooter.appendChild(itemProgressBar)}itemProgressBar.innerHTML=progressHtml}else itemProgressBar=card.querySelector(".itemProgressBar"),itemProgressBar&&itemProgressBar.parentNode.removeChild(itemProgressBar)}function onUserDataChanged(userData,scope){for(var cards=(scope||document.body).querySelectorAll('.card-withuserdata[data-id="'+userData.ItemId+'"]'),i=0,length=cards.length;i')}cell.setAttribute("data-timerid",newTimerId)}}function onTimerCancelled(id,itemsContainer){for(var cells=itemsContainer.querySelectorAll('.card[data-timerid="'+id+'"]'),i=0,length=cells.length;ii{font-size:1.36em;width:1em;height:1em}.button-link>i{font-size:1em}.fab{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-border-radius:50%;border-radius:50%;padding:.6em;box-sizing:border-box;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;text-align:center;margin:0}.fab>i{height:1em;width:1em;vertical-align:middle;font-size:2.85em}.fab.mini{padding:8px}.fab.mini>i{height:1em;width:1em;font-size:1.72em}.emby-button.block{display:block;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;margin:.25em 0;width:100%}.fab,.raised{-webkit-box-shadow:0 .145em .145em 0 rgba(0,0,0,.14),0 .0725em .3625em 0 rgba(0,0,0,.12),0 .2175em .0725em -.145em rgba(0,0,0,.2);box-shadow:0 .145em .145em 0 rgba(0,0,0,.14),0 .0725em .3625em 0 rgba(0,0,0,.12),0 .2175em .0725em -.145em rgba(0,0,0,.2);-webkit-transition:-webkit-box-shadow .28s cubic-bezier(.4,0,.2,1);-o-transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:box-shadow .28s cubic-bezier(.4,0,.2,1)}.fab:focus,.raised:focus{-webkit-box-shadow:0 .58em .725em .0725em rgba(0,0,0,.14),0 .2175em 1.015em .145em rgba(0,0,0,.12),0 .3625em .3625em -.2175em rgba(0,0,0,.4);box-shadow:0 .58em .725em .0725em rgba(0,0,0,.14),0 .2175em 1.015em .145em rgba(0,0,0,.12),0 .3625em .3625em -.2175em rgba(0,0,0,.4)}.raised-mini{padding:.44em 1em;-webkit-border-radius:100em;border-radius:100em;font-size:92%}.button-flat-mini{padding:.5em .7em}.emby-button>i+span{margin-left:.5em;vertical-align:middle}.emby-button>span+i{margin-left:.5em}.paper-icon-button-light{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 .29em;background:0 0;font-size:inherit;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;z-index:0;min-width:initial;min-height:initial;width:auto;height:auto;padding:8px;border:0;vertical-align:middle;outline:0!important;overflow:hidden;-webkit-border-radius:50%;border-radius:50%;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.paper-icon-button-light::-moz-focus-inner{border:0}.paper-icon-button-light[disabled]{opacity:.3}.paper-icon-button-light>i{width:1em;height:1em;font-size:1.66956521739130434em;position:relative;z-index:1;vertical-align:middle}.paper-icon-button-light>img{width:1.72em;max-height:100%;position:relative;z-index:1;vertical-align:middle}.paper-icon-button-light:after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out;transition:opacity .3s ease-out;background:currentcolor;opacity:0}.paper-icon-button-light:focus:after{opacity:.2}.emby-button-ripple-effect,.paper-icon-button-light-ripple-effect{position:absolute;-webkit-border-radius:50%;border-radius:50%;width:50px;height:50px;top:50%;left:50%;background:currentcolor;-webkit-animation:ripple-animation .8s;animation:ripple-animation .8s;opacity:.25;-webkit-transform-origin:center center;transform-origin:center center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@-webkit-keyframes ripple-animation{from{-webkit-transform:none;transform:none;opacity:.5}to{-webkit-transform:scale(20);transform:scale(20);opacity:0}}@keyframes ripple-animation{from{-webkit-transform:none;transform:none;opacity:.5}to{-webkit-transform:scale(20);transform:scale(20);opacity:0}}.emby-button-foreground{position:relative;z-index:1}.icon-button-focusscale{-webkit-transition:-webkit-transform 180ms ease-out!important;-o-transition:transform 180ms ease-out!important;transition:transform 180ms ease-out!important;-webkit-transform-origin:center center;transform-origin:center center}.icon-button-focusscale:focus{-webkit-transform:scale(1.3);transform:scale(1.3);z-index:1} \ No newline at end of file +.emby-button,.fab{-webkit-box-sizing:border-box}.emby-button,.paper-icon-button-light{text-align:center;font-family:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;position:relative}.emby-button{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;box-sizing:border-box;margin:0 .29em;font-size:inherit;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;z-index:0;padding:1em;border:0;vertical-align:middle;-webkit-border-radius:.2em;border-radius:.2em;outline:0!important;overflow:hidden;font-weight:500;text-decoration:none}.emby-button.block,.fab{-webkit-box-align:center}.emby-button::-moz-focus-inner{border:0}.button-flat{background:0 0;-webkit-box-shadow:none;box-shadow:none}.button-flat:hover{opacity:.5}.button-link{background:0 0;-webkit-box-shadow:none;box-shadow:none;margin:0;padding:0;vertical-align:initial}.button-link-inline{display:inline}.button-link:hover{text-decoration:underline}.emby-button-focusscale{-webkit-transition:-webkit-transform 180ms ease-out!important;-o-transition:transform 180ms ease-out!important;transition:transform 180ms ease-out!important;-webkit-transform-origin:center center;transform-origin:center center}.emby-button-focusscale:focus{-webkit-transform:scale(1.16);transform:scale(1.16);z-index:1}.emby-button>i{font-size:1.36em;width:1em;height:1em}.button-link>i{font-size:1em}.fab{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-border-radius:50%;border-radius:50%;padding:.6em;box-sizing:border-box;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;text-align:center;margin:0}.fab>i{height:1em;width:1em;vertical-align:middle;font-size:2.85em}.fab.mini{padding:8px}.fab.mini>i{height:1em;width:1em;font-size:1.72em}.emby-button.block{display:block;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;margin:.25em 0;width:100%}.fab,.raised{-webkit-box-shadow:0 .145em .145em 0 rgba(0,0,0,.14),0 .0725em .3625em 0 rgba(0,0,0,.12),0 .2175em .0725em -.145em rgba(0,0,0,.2);box-shadow:0 .145em .145em 0 rgba(0,0,0,.14),0 .0725em .3625em 0 rgba(0,0,0,.12),0 .2175em .0725em -.145em rgba(0,0,0,.2);-webkit-transition:-webkit-box-shadow .28s cubic-bezier(.4,0,.2,1);-o-transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:box-shadow .28s cubic-bezier(.4,0,.2,1)}.fab:focus,.raised:focus{-webkit-box-shadow:0 .58em .725em .0725em rgba(0,0,0,.14),0 .2175em 1.015em .145em rgba(0,0,0,.12),0 .3625em .3625em -.2175em rgba(0,0,0,.4);box-shadow:0 .58em .725em .0725em rgba(0,0,0,.14),0 .2175em 1.015em .145em rgba(0,0,0,.12),0 .3625em .3625em -.2175em rgba(0,0,0,.4)}.raised-small{padding:.75em;font-size:92%}.raised-mini{padding:.44em 1em;-webkit-border-radius:100em;border-radius:100em;font-size:92%}.button-flat-mini{padding:.5em .7em}.emby-button>i+span{margin-left:.5em;vertical-align:middle}.emby-button>span+i{margin-left:.5em}.paper-icon-button-light{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 .29em;background:0 0;font-size:inherit;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;z-index:0;min-width:initial;min-height:initial;width:auto;height:auto;padding:8px;border:0;vertical-align:middle;outline:0!important;overflow:hidden;-webkit-border-radius:50%;border-radius:50%;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.paper-icon-button-light::-moz-focus-inner{border:0}.paper-icon-button-light[disabled]{opacity:.3}.paper-icon-button-light>i{width:1em;height:1em;font-size:1.66956521739130434em;position:relative;z-index:1;vertical-align:middle}.paper-icon-button-light>img{width:1.72em;max-height:100%;position:relative;z-index:1;vertical-align:middle}.paper-icon-button-light:after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out;transition:opacity .3s ease-out;background:currentcolor;opacity:0}.paper-icon-button-light:focus:after{opacity:.2}.emby-button-ripple-effect,.paper-icon-button-light-ripple-effect{position:absolute;-webkit-border-radius:50%;border-radius:50%;width:50px;height:50px;top:50%;left:50%;background:currentcolor;-webkit-animation:ripple-animation .8s;animation:ripple-animation .8s;opacity:.25;-webkit-transform-origin:center center;transform-origin:center center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@-webkit-keyframes ripple-animation{from{-webkit-transform:none;transform:none;opacity:.5}to{-webkit-transform:scale(20);transform:scale(20);opacity:0}}@keyframes ripple-animation{from{-webkit-transform:none;transform:none;opacity:.5}to{-webkit-transform:scale(20);transform:scale(20);opacity:0}}.emby-button-foreground{position:relative;z-index:1}.icon-button-focusscale{-webkit-transition:-webkit-transform 180ms ease-out!important;-o-transition:transform 180ms ease-out!important;transition:transform 180ms ease-out!important;-webkit-transform-origin:center center;transform-origin:center center}.icon-button-focusscale:focus{-webkit-transform:scale(1.3);transform:scale(1.3);z-index:1} \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js b/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js index e2d6e5134c..66b5f3b437 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js @@ -1 +1 @@ -define(["itemShortcuts","connectionManager","imageLoader","layoutManager","browser","dom","loading","focusManager","serverNotifications","events","registerElement"],function(itemShortcuts,connectionManager,imageLoader,layoutManager,browser,dom,loading,focusManager,serverNotifications,events){"use strict";function onClick(e){var itemsContainer=this,multiSelect=(e.target,itemsContainer.multiSelect);multiSelect&&multiSelect.onContainerClick.call(itemsContainer,e)===!1||itemShortcuts.onClick.call(itemsContainer,e)}function disableEvent(e){return e.preventDefault(),e.stopPropagation(),!1}function onContextMenu(e){var itemsContainer=this,target=e.target,card=dom.parentWithAttribute(target,"data-id");if(card&&card.getAttribute("data-serverid"))return itemShortcuts.showContextMenu(card,{positionTo:target,itemsContainer:itemsContainer}),e.preventDefault(),e.stopPropagation(),!1}function getShortcutOptions(){return{click:!1}}function onDrop(evt,itemsContainer){var el=evt.item,newIndex=evt.newIndex,itemId=el.getAttribute("data-playlistitemid"),playlistId=el.getAttribute("data-playlistid");if(!playlistId){var oldIndex=evt.oldIndex;return void el.dispatchEvent(new CustomEvent("itemdrop",{detail:{oldIndex:oldIndex,newIndex:newIndex,playlistItemId:itemId},bubbles:!0,cancelable:!1}))}var serverId=el.getAttribute("data-serverid"),apiClient=connectionManager.getApiClient(serverId);newIndex=Math.max(0,newIndex-1),loading.show(),apiClient.ajax({url:apiClient.getUrl("Playlists/"+playlistId+"/Items/"+itemId+"/Move/"+newIndex),type:"POST"}).then(function(){loading.hide()},function(){loading.hide(),itemsContainer.dispatchEvent(new CustomEvent("needsrefresh",{detail:{},cancelable:!1,bubbles:!0}))})}function onUserDataChanged(e,apiClient,userData){var itemsContainer=this;require(["cardBuilder"],function(cardBuilder){cardBuilder.onUserDataChanged(userData,itemsContainer)})}function onTimerCreated(e,apiClient,data){var itemsContainer=this,programId=data.ProgramId,newTimerId=data.Id;require(["cardBuilder"],function(cardBuilder){cardBuilder.onTimerCreated(programId,newTimerId,itemsContainer)})}function onSeriesTimerCreated(e,apiClient,data){}function onTimerCancelled(e,apiClient,data){var itemsContainer=this,id=data.Id;require(["cardBuilder"],function(cardBuilder){cardBuilder.onTimerCancelled(id,itemsContainer)})}function onSeriesTimerCancelled(e,apiClient,data){var itemsContainer=this,id=data.Id;require(["cardBuilder"],function(cardBuilder){cardBuilder.onSeriesTimerCancelled(id,itemsContainer)})}function addNotificationEvent(instance,name,handler){var localHandler=handler.bind(instance);events.on(serverNotifications,name,localHandler),instance[name]=localHandler}function removeNotificationEvent(instance,name){var handler=instance[name];handler&&(events.off(serverNotifications,name,handler),instance[name]=null)}function onDataFetched(result){var items=result.Items;window.scrollTo(0,0),this.innerHTML=this.getItemsHtml(items),imageLoader.lazyChildren(this),loading.hide(),this.afterRefresh&&this.afterRefresh(result)}var ItemsContainerProtoType=Object.create(HTMLDivElement.prototype);ItemsContainerProtoType.enableHoverMenu=function(enabled){var current=this.hoverMenu;if(!enabled)return void(current&&(current.destroy(),this.hoverMenu=null));if(!current){var self=this;require(["itemHoverMenu"],function(ItemHoverMenu){self.hoverMenu=new ItemHoverMenu(self)})}},ItemsContainerProtoType.enableMultiSelect=function(enabled){var current=this.multiSelect;if(!enabled)return void(current&&(current.destroy(),this.multiSelect=null));if(!current){var self=this;require(["multiSelect"],function(MultiSelect){self.multiSelect=new MultiSelect({container:self,bindOnClick:!1})})}},ItemsContainerProtoType.enableDragReordering=function(enabled){var current=this.sortable;if(!enabled)return void(current&&(current.destroy(),this.sortable=null));if(!current){var self=this;require(["sortable"],function(Sortable){self.sortable=new Sortable(self,{draggable:".listItem",handle:".listViewDragHandle",onEnd:function(evt){return onDrop(evt,self)}})})}},ItemsContainerProtoType.createdCallback=function(){this.classList.add("itemsContainer")},ItemsContainerProtoType.attachedCallback=function(){this.addEventListener("click",onClick),browser.touch?this.addEventListener("contextmenu",disableEvent):"false"!==this.getAttribute("data-contextmenu")&&this.addEventListener("contextmenu",onContextMenu),layoutManager.desktop&&"false"!==this.getAttribute("data-hovermenu")&&this.enableHoverMenu(!0),(layoutManager.desktop||layoutManager.mobile)&&"false"!==this.getAttribute("data-multiselect")&&this.enableMultiSelect(!0),layoutManager.tv&&this.classList.add("itemsContainer-tv"),itemShortcuts.on(this,getShortcutOptions()),addNotificationEvent(this,"UserDataChanged",onUserDataChanged),addNotificationEvent(this,"TimerCreated",onTimerCreated),addNotificationEvent(this,"SeriesTimerCreated",onSeriesTimerCreated),addNotificationEvent(this,"TimerCancelled",onTimerCancelled),addNotificationEvent(this,"SeriesTimerCancelled",onSeriesTimerCancelled),"true"===this.getAttribute("data-dragreorder")&&this.enableDragReordering(!0)},ItemsContainerProtoType.detachedCallback=function(){this.enableHoverMenu(!1),this.enableMultiSelect(!1),this.enableDragReordering(!1),this.removeEventListener("click",onClick),this.removeEventListener("contextmenu",onContextMenu),this.removeEventListener("contextmenu",disableEvent),itemShortcuts.off(this,getShortcutOptions()),removeNotificationEvent(this,"UserDataChanged"),removeNotificationEvent(this,"TimerCreated"),removeNotificationEvent(this,"SeriesTimerCreated"),removeNotificationEvent(this,"TimerCancelled"),removeNotificationEvent(this,"SeriesTimerCancelled")},ItemsContainerProtoType.pause=function(){this.paused=!0},ItemsContainerProtoType.resume=function(){this.paused=!1,this.needsRefresh&&this.refreshItems()},ItemsContainerProtoType.refreshItems=function(){if(this.fetchData){if(this.paused)return void(this.needsRefresh=!0);this.needsRefresh=!1,loading.show(),this.fetchData().then(onDataFetched.bind(this))}},document.registerElement("emby-itemscontainer",{prototype:ItemsContainerProtoType,extends:"div"})}); \ No newline at end of file +define(["itemShortcuts","connectionManager","imageLoader","layoutManager","browser","dom","loading","focusManager","serverNotifications","events","registerElement"],function(itemShortcuts,connectionManager,imageLoader,layoutManager,browser,dom,loading,focusManager,serverNotifications,events){"use strict";function onClick(e){var itemsContainer=this,multiSelect=(e.target,itemsContainer.multiSelect);multiSelect&&multiSelect.onContainerClick.call(itemsContainer,e)===!1||itemShortcuts.onClick.call(itemsContainer,e)}function disableEvent(e){return e.preventDefault(),e.stopPropagation(),!1}function onContextMenu(e){var itemsContainer=this,target=e.target,card=dom.parentWithAttribute(target,"data-id");if(card&&card.getAttribute("data-serverid"))return itemShortcuts.showContextMenu(card,{positionTo:target,itemsContainer:itemsContainer}),e.preventDefault(),e.stopPropagation(),!1}function getShortcutOptions(){return{click:!1}}function onDrop(evt,itemsContainer){var el=evt.item,newIndex=evt.newIndex,itemId=el.getAttribute("data-playlistitemid"),playlistId=el.getAttribute("data-playlistid");if(!playlistId){var oldIndex=evt.oldIndex;return void el.dispatchEvent(new CustomEvent("itemdrop",{detail:{oldIndex:oldIndex,newIndex:newIndex,playlistItemId:itemId},bubbles:!0,cancelable:!1}))}var serverId=el.getAttribute("data-serverid"),apiClient=connectionManager.getApiClient(serverId);newIndex=Math.max(0,newIndex-1),loading.show(),apiClient.ajax({url:apiClient.getUrl("Playlists/"+playlistId+"/Items/"+itemId+"/Move/"+newIndex),type:"POST"}).then(function(){loading.hide()},function(){loading.hide(),itemsContainer.notifyRefreshNeeded()})}function onUserDataChanged(e,apiClient,userData){var itemsContainer=this;require(["cardBuilder"],function(cardBuilder){cardBuilder.onUserDataChanged(userData,itemsContainer)})}function getEventsToMonitor(itemsContainer){var monitor=itemsContainer.getAttribute("data-monitor");return monitor?monitor.split(","):[]}function onTimerCreated(e,apiClient,data){var itemsContainer=this;if(getEventsToMonitor(itemsContainer).indexOf("timers")!==-1)return void itemsContainer.notifyRefreshNeeded();var programId=data.ProgramId,newTimerId=data.Id;require(["cardBuilder"],function(cardBuilder){cardBuilder.onTimerCreated(programId,newTimerId,itemsContainer)})}function onSeriesTimerCreated(e,apiClient,data){var itemsContainer=this;if(getEventsToMonitor(itemsContainer).indexOf("seriestimers")!==-1)return void itemsContainer.notifyRefreshNeeded()}function onTimerCancelled(e,apiClient,data){var itemsContainer=this;if(getEventsToMonitor(itemsContainer).indexOf("timers")!==-1)return void itemsContainer.notifyRefreshNeeded();var id=data.Id;require(["cardBuilder"],function(cardBuilder){cardBuilder.onTimerCancelled(id,itemsContainer)})}function onSeriesTimerCancelled(e,apiClient,data){var itemsContainer=this;if(getEventsToMonitor(itemsContainer).indexOf("seriestimers")!==-1)return void itemsContainer.notifyRefreshNeeded();var id=data.Id;require(["cardBuilder"],function(cardBuilder){cardBuilder.onSeriesTimerCancelled(id,itemsContainer)})}function onLibraryChanged(e,apiClient,data){var itemsContainer=this;if(getEventsToMonitor(itemsContainer).indexOf("seriestimers")===-1&&getEventsToMonitor(itemsContainer).indexOf("timers")===-1){var itemsAdded=data.ItemsAdded||[],itemsRemoved=data.ItemsRemoved||[];if(itemsAdded.length||itemsRemoved.length){var parentId=itemsContainer.getAttribute("data-parentid");if(parentId){var foldersAddedTo=data.FoldersAddedTo||[],foldersRemovedFrom=data.FoldersRemovedFrom||[],collectionFolders=data.CollectionFolders||[];if(foldersAddedTo.indexOf(parentId)===-1&&foldersRemovedFrom.indexOf(parentId)===-1&&collectionFolders.indexOf(parentId)===-1)return}itemsContainer.notifyRefreshNeeded()}}}function addNotificationEvent(instance,name,handler){var localHandler=handler.bind(instance);events.on(serverNotifications,name,localHandler),instance[name]=localHandler}function removeNotificationEvent(instance,name){var handler=instance[name];handler&&(events.off(serverNotifications,name,handler),instance[name]=null)}function onDataFetched(result){var items=result.Items||result,parentContainer=this.parentContainer;parentContainer&&(items.length?parentContainer.classList.remove("hide"):parentContainer.classList.add("hide"));var focusId,activeElement=document.activeElement;if(this.contains(activeElement)&&(focusId=activeElement.getAttribute("data-id")),this.innerHTML=this.getItemsHtml(items),imageLoader.lazyChildren(this),loading.hide(),focusId){var newElement=this.querySelector('[data-id="'+focusId+'"]');newElement?focusManager.focus(newElement):focusManager.autoFocus(this)}this.afterRefresh&&this.afterRefresh(result)}var ItemsContainerProtoType=Object.create(HTMLDivElement.prototype);ItemsContainerProtoType.enableHoverMenu=function(enabled){var current=this.hoverMenu;if(!enabled)return void(current&&(current.destroy(),this.hoverMenu=null));if(!current){var self=this;require(["itemHoverMenu"],function(ItemHoverMenu){self.hoverMenu=new ItemHoverMenu(self)})}},ItemsContainerProtoType.enableMultiSelect=function(enabled){var current=this.multiSelect;if(!enabled)return void(current&&(current.destroy(),this.multiSelect=null));if(!current){var self=this;require(["multiSelect"],function(MultiSelect){self.multiSelect=new MultiSelect({container:self,bindOnClick:!1})})}},ItemsContainerProtoType.enableDragReordering=function(enabled){var current=this.sortable;if(!enabled)return void(current&&(current.destroy(),this.sortable=null));if(!current){var self=this;require(["sortable"],function(Sortable){self.sortable=new Sortable(self,{draggable:".listItem",handle:".listViewDragHandle",onEnd:function(evt){return onDrop(evt,self)}})})}},ItemsContainerProtoType.createdCallback=function(){this.classList.add("itemsContainer")},ItemsContainerProtoType.attachedCallback=function(){this.addEventListener("click",onClick),browser.touch?this.addEventListener("contextmenu",disableEvent):"false"!==this.getAttribute("data-contextmenu")&&this.addEventListener("contextmenu",onContextMenu),layoutManager.desktop&&"false"!==this.getAttribute("data-hovermenu")&&this.enableHoverMenu(!0),(layoutManager.desktop||layoutManager.mobile)&&"false"!==this.getAttribute("data-multiselect")&&this.enableMultiSelect(!0),layoutManager.tv&&this.classList.add("itemsContainer-tv"),itemShortcuts.on(this,getShortcutOptions()),addNotificationEvent(this,"UserDataChanged",onUserDataChanged),addNotificationEvent(this,"TimerCreated",onTimerCreated),addNotificationEvent(this,"SeriesTimerCreated",onSeriesTimerCreated),addNotificationEvent(this,"TimerCancelled",onTimerCancelled),addNotificationEvent(this,"SeriesTimerCancelled",onSeriesTimerCancelled),addNotificationEvent(this,"LibraryChanged",onLibraryChanged),"true"===this.getAttribute("data-dragreorder")&&this.enableDragReordering(!0)},ItemsContainerProtoType.detachedCallback=function(){this.enableHoverMenu(!1),this.enableMultiSelect(!1),this.enableDragReordering(!1),this.removeEventListener("click",onClick),this.removeEventListener("contextmenu",onContextMenu),this.removeEventListener("contextmenu",disableEvent),itemShortcuts.off(this,getShortcutOptions()),removeNotificationEvent(this,"UserDataChanged"),removeNotificationEvent(this,"TimerCreated"),removeNotificationEvent(this,"SeriesTimerCreated"),removeNotificationEvent(this,"TimerCancelled"),removeNotificationEvent(this,"SeriesTimerCancelled"),removeNotificationEvent(this,"LibraryChanged")},ItemsContainerProtoType.pause=function(){this.paused=!0},ItemsContainerProtoType.resume=function(options){return this.paused=!1,this.needsRefresh||options&&options.refresh?this.refreshItems():Promise.resolve()},ItemsContainerProtoType.refreshItems=function(){return this.fetchData?this.paused?(this.needsRefresh=!0,Promise.reject()):(this.needsRefresh=!1,loading.show(),this.fetchData().then(onDataFetched.bind(this))):Promise.reject()},ItemsContainerProtoType.notifyRefreshNeeded=function(){var timeout=this.refreshTimeout;timeout&&clearTimeout(timeout),this.refreshTimeout=setTimeout(this.refreshItems.bind(this),5e3)},document.registerElement("emby-itemscontainer",{prototype:ItemsContainerProtoType,extends:"div"})}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-scroller/emby-scroller.js b/dashboard-ui/bower_components/emby-webcomponents/emby-scroller/emby-scroller.js index a7ce6afbc8..c58a70c152 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/emby-scroller/emby-scroller.js +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-scroller/emby-scroller.js @@ -1 +1 @@ -define(["scroller","dom","layoutManager","inputManager","focusManager","browser","registerElement"],function(scroller,dom,layoutManager,inputManager,focusManager,browser){"use strict";function initCenterFocus(elem,scrollerInstance){dom.addEventListener(elem,"focus",function(e){var focused=focusManager.focusableParent(e.target);focused&&scrollerInstance.toCenter(focused)},{capture:!0,passive:!0})}function onInputCommand(e){var cmd=e.detail.command;"home"===cmd?(focusManager.focusFirst(this,"."+this.getAttribute("data-navcommands")),e.preventDefault(),e.stopPropagation()):"end"===cmd?(focusManager.focusLast(this,"."+this.getAttribute("data-navcommands")),e.preventDefault(),e.stopPropagation()):"pageup"===cmd?(focusManager.moveFocus(e.target,this,"."+this.getAttribute("data-navcommands"),-12),e.preventDefault(),e.stopPropagation()):"pagedown"===cmd&&(focusManager.moveFocus(e.target,this,"."+this.getAttribute("data-navcommands"),12),e.preventDefault(),e.stopPropagation())}function initHeadroom(elem){require(["headroom"],function(Headroom){var headroom=new Headroom([],{scroller:elem});headroom.init(),headroom.add(document.querySelector(".skinHeader")),elem.headroom=headroom})}function loadScrollButtons(scroller){require(["emby-scrollbuttons"],function(){scroller.insertAdjacentHTML("beforeend",'
')})}var ScrollerProtoType=Object.create(HTMLDivElement.prototype);ScrollerProtoType.createdCallback=function(){this.classList.add("emby-scroller")},ScrollerProtoType.scrollToBeginning=function(){this.scroller&&this.scroller.slideTo(0,!0)},ScrollerProtoType.toStart=function(elem,immediate){this.scroller&&this.scroller.toStart(elem,immediate)},ScrollerProtoType.toCenter=function(elem,immediate){this.scroller&&this.scroller.toCenter(elem,immediate)},ScrollerProtoType.scrollToPosition=function(pos,immediate){this.scroller&&this.scroller.slideTo(pos,immediate)},ScrollerProtoType.getScrollPosition=function(){if(this.scroller)return this.scroller.getScrollPosition()},ScrollerProtoType.getScrollSize=function(){if(this.scroller)return this.scroller.getScrollSize()},ScrollerProtoType.getScrollEventName=function(){if(this.scroller)return this.scroller.getScrollEventName()},ScrollerProtoType.getScrollSlider=function(){if(this.scroller)return this.scroller.getScrollSlider()},ScrollerProtoType.addScrollEventListener=function(fn,options){this.scroller&&dom.addEventListener(this.scroller.getScrollFrame(),this.scroller.getScrollEventName(),fn,options)},ScrollerProtoType.removeScrollEventListener=function(fn,options){this.scroller&&dom.removeEventListener(this.scroller.getScrollFrame(),this.scroller.getScrollEventName(),fn,options)},ScrollerProtoType.attachedCallback=function(){this.getAttribute("data-navcommands")&&inputManager.on(this,onInputCommand);var horizontal="false"!==this.getAttribute("data-horizontal"),slider=this.querySelector(".scrollSlider");horizontal&&(slider.style["white-space"]="nowrap");var bindHeader="true"===this.getAttribute("data-bindheader"),scrollFrame=this,enableScrollButtons=layoutManager.desktop&&horizontal&&"false"!==this.getAttribute("data-scrollbuttons")&&scrollFrame!==this,options={horizontal:horizontal,mouseDragging:1,mouseWheel:"false"!==this.getAttribute("data-mousewheel"),touchDragging:1,slidee:slider,scrollBy:200,speed:horizontal?270:240,elasticBounds:1,dragHandle:1,scrollWidth:"auto"===this.getAttribute("data-scrollsize")?null:5e6,autoImmediate:!0,skipSlideToWhenVisible:"true"===this.getAttribute("data-skipfocuswhenvisible"),dispatchScrollEvent:enableScrollButtons||bindHeader||"true"===this.getAttribute("data-scrollevent"),hideScrollbar:enableScrollButtons||"true"===this.getAttribute("data-hidescrollbar"),allowNativeSmoothScroll:"true"===this.getAttribute("data-allownativesmoothscroll"),forceHideScrollbars:enableScrollButtons,requireAnimation:enableScrollButtons&&browser.edge};this.scroller=new scroller(scrollFrame,options),this.scroller.init(),layoutManager.tv&&this.getAttribute("data-centerfocus")&&initCenterFocus(this,this.scroller),bindHeader&&initHeadroom(this),enableScrollButtons&&loadScrollButtons(this)},ScrollerProtoType.detachedCallback=function(){this.getAttribute("data-navcommands")&&inputManager.off(this,onInputCommand);var headroom=this.headroom;headroom&&(headroom.destroy(),this.headroom=null);var scrollerInstance=this.scroller;scrollerInstance&&(scrollerInstance.destroy(),this.scroller=null)},document.registerElement("emby-scroller",{prototype:ScrollerProtoType,extends:"div"})}); \ No newline at end of file +define(["scroller","dom","layoutManager","inputManager","focusManager","browser","registerElement"],function(scroller,dom,layoutManager,inputManager,focusManager,browser){"use strict";function initCenterFocus(elem,scrollerInstance){dom.addEventListener(elem,"focus",function(e){var focused=focusManager.focusableParent(e.target);focused&&scrollerInstance.toCenter(focused)},{capture:!0,passive:!0})}function onInputCommand(e){var cmd=e.detail.command;"home"===cmd?(focusManager.focusFirst(this,"."+this.getAttribute("data-navcommands")),e.preventDefault(),e.stopPropagation()):"end"===cmd?(focusManager.focusLast(this,"."+this.getAttribute("data-navcommands")),e.preventDefault(),e.stopPropagation()):"pageup"===cmd?(focusManager.moveFocus(e.target,this,"."+this.getAttribute("data-navcommands"),-12),e.preventDefault(),e.stopPropagation()):"pagedown"===cmd&&(focusManager.moveFocus(e.target,this,"."+this.getAttribute("data-navcommands"),12),e.preventDefault(),e.stopPropagation())}function initHeadroom(elem){require(["headroom"],function(Headroom){var headroom=new Headroom([],{scroller:elem});headroom.init(),headroom.add(document.querySelector(".skinHeader")),elem.headroom=headroom})}function loadScrollButtons(scroller){require(["emby-scrollbuttons"],function(){scroller.insertAdjacentHTML("beforeend",'
')})}var ScrollerProtoType=Object.create(HTMLDivElement.prototype);ScrollerProtoType.createdCallback=function(){this.classList.add("emby-scroller")},ScrollerProtoType.scrollToBeginning=function(){this.scroller&&this.scroller.slideTo(0,!0)},ScrollerProtoType.toStart=function(elem,immediate){this.scroller&&this.scroller.toStart(elem,immediate)},ScrollerProtoType.toCenter=function(elem,immediate){this.scroller&&this.scroller.toCenter(elem,immediate)},ScrollerProtoType.scrollToPosition=function(pos,immediate){this.scroller&&this.scroller.slideTo(pos,immediate)},ScrollerProtoType.getScrollPosition=function(){if(this.scroller)return this.scroller.getScrollPosition()},ScrollerProtoType.getScrollSize=function(){if(this.scroller)return this.scroller.getScrollSize()},ScrollerProtoType.getScrollEventName=function(){if(this.scroller)return this.scroller.getScrollEventName()},ScrollerProtoType.getScrollSlider=function(){if(this.scroller)return this.scroller.getScrollSlider()},ScrollerProtoType.addScrollEventListener=function(fn,options){this.scroller&&dom.addEventListener(this.scroller.getScrollFrame(),this.scroller.getScrollEventName(),fn,options)},ScrollerProtoType.removeScrollEventListener=function(fn,options){this.scroller&&dom.removeEventListener(this.scroller.getScrollFrame(),this.scroller.getScrollEventName(),fn,options)},ScrollerProtoType.attachedCallback=function(){this.getAttribute("data-navcommands")&&inputManager.on(this,onInputCommand);var horizontal="false"!==this.getAttribute("data-horizontal"),slider=this.querySelector(".scrollSlider");horizontal&&(slider.style["white-space"]="nowrap");var bindHeader="true"===this.getAttribute("data-bindheader"),scrollFrame=this,enableScrollButtons=layoutManager.desktop&&horizontal&&"false"!==this.getAttribute("data-scrollbuttons"),options={horizontal:horizontal,mouseDragging:1,mouseWheel:"false"!==this.getAttribute("data-mousewheel"),touchDragging:1,slidee:slider,scrollBy:200,speed:horizontal?270:240,elasticBounds:1,dragHandle:1,scrollWidth:"auto"===this.getAttribute("data-scrollsize")?null:5e6,autoImmediate:!0,skipSlideToWhenVisible:"true"===this.getAttribute("data-skipfocuswhenvisible"),dispatchScrollEvent:enableScrollButtons||bindHeader||"true"===this.getAttribute("data-scrollevent"),hideScrollbar:enableScrollButtons||"true"===this.getAttribute("data-hidescrollbar"),allowNativeSmoothScroll:"true"===this.getAttribute("data-allownativesmoothscroll")&&!enableScrollButtons,allowNativeScroll:!enableScrollButtons,forceHideScrollbars:enableScrollButtons,requireAnimation:enableScrollButtons&&browser.edge};this.scroller=new scroller(scrollFrame,options),this.scroller.init(),layoutManager.tv&&this.getAttribute("data-centerfocus")&&initCenterFocus(this,this.scroller),bindHeader&&initHeadroom(this),enableScrollButtons&&loadScrollButtons(this)},ScrollerProtoType.detachedCallback=function(){this.getAttribute("data-navcommands")&&inputManager.off(this,onInputCommand);var headroom=this.headroom;headroom&&(headroom.destroy(),this.headroom=null);var scrollerInstance=this.scroller;scrollerInstance&&(scrollerInstance.destroy(),this.scroller=null)},document.registerElement("emby-scroller",{prototype:ScrollerProtoType,extends:"div"})}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-tabs/emby-tabs.js b/dashboard-ui/bower_components/emby-webcomponents/emby-tabs/emby-tabs.js index 3f04585203..f7f38a7d58 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/emby-tabs/emby-tabs.js +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-tabs/emby-tabs.js @@ -1 +1 @@ -define(["dom","scroller","browser","layoutManager","focusManager","registerElement","css!./emby-tabs","scrollStyles"],function(dom,scroller,browser,layoutManager,focusManager){"use strict";function setActiveTabButton(tabs,newButton,oldButton,animate){newButton.classList.add(activeButtonClass)}function getFocusCallback(tabs,e){return function(){onClick.call(tabs,e)}}function onFocus(e){layoutManager.tv&&(this.focusTimeout&&clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout(getFocusCallback(this,e),700))}function getTabPanel(tabs,index){return null}function removeActivePanelClass(tabs,index){var tabPanel=getTabPanel(tabs,index);tabPanel&&tabPanel.classList.remove("is-active")}function fadeInRight(elem){var pct=browser.mobile?"4%":"0.5%",keyframes=[{opacity:"0",transform:"translate3d("+pct+", 0, 0)",offset:0},{opacity:"1",transform:"none",offset:1}];elem.animate(keyframes,{duration:160,iterations:1,easing:"ease-out"})}function triggerBeforeTabChange(tabs,index,previousIndex){tabs.dispatchEvent(new CustomEvent("beforetabchange",{detail:{selectedTabIndex:index,previousIndex:previousIndex}})),null!=previousIndex&&previousIndex!==index&&removeActivePanelClass(tabs,previousIndex);var newPanel=getTabPanel(tabs,index);newPanel&&(newPanel.animate&&fadeInRight(newPanel),newPanel.classList.add("is-active"))}function onClick(e){this.focusTimeout&&clearTimeout(this.focusTimeout);var tabs=this,current=tabs.querySelector("."+activeButtonClass),tabButton=dom.parentWithClass(e.target,buttonClass);if(tabButton&&tabButton!==current){current&¤t.classList.remove(activeButtonClass);var previousIndex=current?parseInt(current.getAttribute("data-index")):null;setActiveTabButton(tabs,tabButton,current,!0);var index=parseInt(tabButton.getAttribute("data-index"));triggerBeforeTabChange(tabs,index,previousIndex),setTimeout(function(){tabs.selectedTabIndex=index,tabs.dispatchEvent(new CustomEvent("tabchange",{detail:{selectedTabIndex:index,previousIndex:previousIndex}}))},120),tabs.scroller&&tabs.scroller.toCenter(tabButton,!1)}}function initScroller(tabs){if(!tabs.scroller){var contentScrollSlider=tabs.querySelector(".emby-tabs-slider");contentScrollSlider?(tabs.scroller=new scroller(tabs,{horizontal:1,itemNav:0,mouseDragging:1,touchDragging:1,slidee:contentScrollSlider,smart:!0,releaseSwing:!0,scrollBy:200,speed:120,elasticBounds:1,dragHandle:1,dynamicHandle:1,clickBar:1,hiddenScroll:!0,requireAnimation:!browser.safari,allowNativeSmoothScroll:!0}),tabs.scroller.init()):tabs.classList.add("hiddenScrollX")}}function getSelectedTabButton(elem){return elem.querySelector("."+activeButtonClass)}function getSibling(elem,method){for(var sibling=elem[method];sibling;){if(sibling.classList.contains(buttonClass)&&!sibling.classList.contains("hide"))return sibling;sibling=sibling[method]}return null}var EmbyTabs=Object.create(HTMLDivElement.prototype),buttonClass="emby-tab-button",activeButtonClass=buttonClass+"-active";EmbyTabs.createdCallback=function(){this.classList.contains("emby-tabs")||(this.classList.add("emby-tabs"),this.classList.add("focusable"),dom.addEventListener(this,"click",onClick,{passive:!0}),dom.addEventListener(this,"focus",onFocus,{passive:!0,capture:!0}))},EmbyTabs.focus=function(){var selected=this.querySelector("."+activeButtonClass);selected?focusManager.focus(selected):focusManager.autoFocus(this)},EmbyTabs.refresh=function(){this.scroller&&this.scroller.reload()},EmbyTabs.attachedCallback=function(){initScroller(this);var current=this.querySelector("."+activeButtonClass),currentIndex=current?parseInt(current.getAttribute("data-index")):parseInt(this.getAttribute("data-index")||"0");if(currentIndex!==-1){this.selectedTabIndex=currentIndex;var tabButtons=this.querySelectorAll("."+buttonClass),newTabButton=tabButtons[currentIndex];newTabButton&&setActiveTabButton(this,newTabButton,current,!1)}this.readyFired||(this.readyFired=!0,this.dispatchEvent(new CustomEvent("ready",{})))},EmbyTabs.detachedCallback=function(){this.scroller&&(this.scroller.destroy(),this.scroller=null),dom.removeEventListener(this,"click",onClick,{passive:!0}),dom.removeEventListener(this,"focus",onFocus,{passive:!0,capture:!0})},EmbyTabs.selectedIndex=function(selected,triggerEvent){var tabs=this;if(null==selected)return tabs.selectedTabIndex||0;var current=tabs.selectedIndex();tabs.selectedTabIndex=selected;var tabButtons=tabs.querySelectorAll("."+buttonClass);if(current===selected||triggerEvent===!1){triggerBeforeTabChange(tabs,selected,current),tabs.dispatchEvent(new CustomEvent("tabchange",{detail:{selectedTabIndex:selected}}));var currentTabButton=tabButtons[current];setActiveTabButton(tabs,tabButtons[selected],currentTabButton,!1),current!==selected&¤tTabButton&¤tTabButton.classList.remove(activeButtonClass)}else onClick.call(tabs,{target:tabButtons[selected]})},EmbyTabs.selectNext=function(){var current=getSelectedTabButton(this),sibling=getSibling(current,"nextSibling");sibling&&onClick.call(this,{target:sibling})},EmbyTabs.selectPrevious=function(){var current=getSelectedTabButton(this),sibling=getSibling(current,"previousSibling");sibling&&onClick.call(this,{target:sibling})},EmbyTabs.triggerBeforeTabChange=function(selected){var tabs=this;triggerBeforeTabChange(tabs,tabs.selectedIndex())},EmbyTabs.triggerTabChange=function(selected){var tabs=this;tabs.dispatchEvent(new CustomEvent("tabchange",{detail:{selectedTabIndex:tabs.selectedIndex()}}))},EmbyTabs.setTabEnabled=function(index,enabled){var btn=this.querySelector('.emby-tab-button[data-index="'+index+'"]');enabled?btn.classList.remove("hide"):btn.classList.remove("add")},document.registerElement("emby-tabs",{prototype:EmbyTabs,extends:"div"})}); \ No newline at end of file +define(["dom","scroller","browser","layoutManager","focusManager","registerElement","css!./emby-tabs","scrollStyles"],function(dom,scroller,browser,layoutManager,focusManager){"use strict";function setActiveTabButton(tabs,newButton,oldButton,animate){newButton.classList.add(activeButtonClass)}function getFocusCallback(tabs,e){return function(){onClick.call(tabs,e)}}function onFocus(e){layoutManager.tv&&(this.focusTimeout&&clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout(getFocusCallback(this,e),700))}function getTabPanel(tabs,index){return null}function removeActivePanelClass(tabs,index){var tabPanel=getTabPanel(tabs,index);tabPanel&&tabPanel.classList.remove("is-active")}function fadeInRight(elem){var pct=browser.mobile?"4%":"0.5%",keyframes=[{opacity:"0",transform:"translate3d("+pct+", 0, 0)",offset:0},{opacity:"1",transform:"none",offset:1}];elem.animate(keyframes,{duration:160,iterations:1,easing:"ease-out"})}function triggerBeforeTabChange(tabs,index,previousIndex){tabs.dispatchEvent(new CustomEvent("beforetabchange",{detail:{selectedTabIndex:index,previousIndex:previousIndex}})),null!=previousIndex&&previousIndex!==index&&removeActivePanelClass(tabs,previousIndex);var newPanel=getTabPanel(tabs,index);newPanel&&(newPanel.animate&&fadeInRight(newPanel),newPanel.classList.add("is-active"))}function onClick(e){this.focusTimeout&&clearTimeout(this.focusTimeout);var tabs=this,current=tabs.querySelector("."+activeButtonClass),tabButton=dom.parentWithClass(e.target,buttonClass);if(tabButton&&tabButton!==current){current&¤t.classList.remove(activeButtonClass);var previousIndex=current?parseInt(current.getAttribute("data-index")):null;setActiveTabButton(tabs,tabButton,current,!0);var index=parseInt(tabButton.getAttribute("data-index"));triggerBeforeTabChange(tabs,index,previousIndex),setTimeout(function(){tabs.selectedTabIndex=index,tabs.dispatchEvent(new CustomEvent("tabchange",{detail:{selectedTabIndex:index,previousIndex:previousIndex}}))},120),tabs.scroller&&tabs.scroller.toCenter(tabButton,!1)}}function initScroller(tabs){if(!tabs.scroller){var contentScrollSlider=tabs.querySelector(".emby-tabs-slider");contentScrollSlider?(tabs.scroller=new scroller(tabs,{horizontal:1,itemNav:0,mouseDragging:1,touchDragging:1,slidee:contentScrollSlider,smart:!0,releaseSwing:!0,scrollBy:200,speed:120,elasticBounds:1,dragHandle:1,dynamicHandle:1,clickBar:1,hiddenScroll:!0,requireAnimation:!browser.safari,allowNativeSmoothScroll:!0}),tabs.scroller.init()):(tabs.classList.add("scrollX"),tabs.classList.add("hiddenScrollX"),tabs.classList.add("smoothScrollX"))}}function getSelectedTabButton(elem){return elem.querySelector("."+activeButtonClass)}function getSibling(elem,method){for(var sibling=elem[method];sibling;){if(sibling.classList.contains(buttonClass)&&!sibling.classList.contains("hide"))return sibling;sibling=sibling[method]}return null}var EmbyTabs=Object.create(HTMLDivElement.prototype),buttonClass="emby-tab-button",activeButtonClass=buttonClass+"-active";EmbyTabs.createdCallback=function(){this.classList.contains("emby-tabs")||(this.classList.add("emby-tabs"),this.classList.add("focusable"),dom.addEventListener(this,"click",onClick,{passive:!0}),dom.addEventListener(this,"focus",onFocus,{passive:!0,capture:!0}))},EmbyTabs.focus=function(){var selected=this.querySelector("."+activeButtonClass);selected?focusManager.focus(selected):focusManager.autoFocus(this)},EmbyTabs.refresh=function(){this.scroller&&this.scroller.reload()},EmbyTabs.attachedCallback=function(){initScroller(this);var current=this.querySelector("."+activeButtonClass),currentIndex=current?parseInt(current.getAttribute("data-index")):parseInt(this.getAttribute("data-index")||"0");if(currentIndex!==-1){this.selectedTabIndex=currentIndex;var tabButtons=this.querySelectorAll("."+buttonClass),newTabButton=tabButtons[currentIndex];newTabButton&&setActiveTabButton(this,newTabButton,current,!1)}this.readyFired||(this.readyFired=!0,this.dispatchEvent(new CustomEvent("ready",{})))},EmbyTabs.detachedCallback=function(){this.scroller&&(this.scroller.destroy(),this.scroller=null),dom.removeEventListener(this,"click",onClick,{passive:!0}),dom.removeEventListener(this,"focus",onFocus,{passive:!0,capture:!0})},EmbyTabs.selectedIndex=function(selected,triggerEvent){var tabs=this;if(null==selected)return tabs.selectedTabIndex||0;var current=tabs.selectedIndex();tabs.selectedTabIndex=selected;var tabButtons=tabs.querySelectorAll("."+buttonClass);if(current===selected||triggerEvent===!1){triggerBeforeTabChange(tabs,selected,current),tabs.dispatchEvent(new CustomEvent("tabchange",{detail:{selectedTabIndex:selected}}));var currentTabButton=tabButtons[current];setActiveTabButton(tabs,tabButtons[selected],currentTabButton,!1),current!==selected&¤tTabButton&¤tTabButton.classList.remove(activeButtonClass)}else onClick.call(tabs,{target:tabButtons[selected]})},EmbyTabs.selectNext=function(){var current=getSelectedTabButton(this),sibling=getSibling(current,"nextSibling");sibling&&onClick.call(this,{target:sibling})},EmbyTabs.selectPrevious=function(){var current=getSelectedTabButton(this),sibling=getSibling(current,"previousSibling");sibling&&onClick.call(this,{target:sibling})},EmbyTabs.triggerBeforeTabChange=function(selected){var tabs=this;triggerBeforeTabChange(tabs,tabs.selectedIndex())},EmbyTabs.triggerTabChange=function(selected){var tabs=this;tabs.dispatchEvent(new CustomEvent("tabchange",{detail:{selectedTabIndex:tabs.selectedIndex()}}))},EmbyTabs.setTabEnabled=function(index,enabled){var btn=this.querySelector('.emby-tab-button[data-index="'+index+'"]');enabled?btn.classList.remove("hide"):btn.classList.remove("add")},document.registerElement("emby-tabs",{prototype:EmbyTabs,extends:"div"})}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/flexstyles.css b/dashboard-ui/bower_components/emby-webcomponents/flexstyles.css index 3e417348d8..82216e2c15 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/flexstyles.css +++ b/dashboard-ui/bower_components/emby-webcomponents/flexstyles.css @@ -1 +1 @@ -.flex{display:-webkit-box;display:-webkit-flex;display:flex}.inline-flex{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex}.flex-direction-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.flex-direction-row{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}.flex-grow{-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.flex-shrink-zero{-webkit-flex-shrink:0;flex-shrink:0}.align-items-center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.align-items-flex-start{-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start}.justify-content-center{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.flex-wrap-wrap{-webkit-flex-wrap:wrap;flex-wrap:wrap} \ No newline at end of file +.flex{display:-webkit-box;display:-webkit-flex;display:flex}.inline-flex{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex}.flex-direction-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.flex-direction-row{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}.flex-grow{-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.flex-shrink-zero{-webkit-flex-shrink:0;flex-shrink:0}.align-items-center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.align-items-flex-start{-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start}.justify-content-center{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.flex-wrap-wrap{-webkit-flex-wrap:wrap;flex-wrap:wrap} \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/tvguide.template.html b/dashboard-ui/bower_components/emby-webcomponents/guide/tvguide.template.html index 73c0d8ab05..d6416facf7 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/guide/tvguide.template.html +++ b/dashboard-ui/bower_components/emby-webcomponents/guide/tvguide.template.html @@ -13,7 +13,7 @@
-
+
@@ -24,7 +24,7 @@
-
+
diff --git a/dashboard-ui/bower_components/emby-webcomponents/headroom/headroom.js b/dashboard-ui/bower_components/emby-webcomponents/headroom/headroom.js index f5b8ea70db..06d1c14536 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/headroom/headroom.js +++ b/dashboard-ui/bower_components/emby-webcomponents/headroom/headroom.js @@ -1 +1 @@ -define(["dom","layoutManager","browser","css!./headroom"],function(dom,layoutManager,browser){"use strict";function Debouncer(callback){this.callback=callback,this.ticking=!1}function Headroom(elems,options){options=Object.assign(Headroom.options,options||{}),this.lastKnownScrollY=0,this.elems=elems,this.scroller=options.scroller,this.debouncer=onScroll.bind(this),this.offset=options.offset,this.initialised=!1,this.initialClass=options.initialClass,this.unPinnedClass=options.unPinnedClass,this.pinnedClass=options.pinnedClass,this.state="clear"}function onScroll(){requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this)))}var requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return Debouncer.prototype={constructor:Debouncer,update:function(){this.callback&&this.callback(),this.ticking=!1},handleEvent:function(){this.ticking||(requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this))),this.ticking=!0)}},Headroom.prototype={constructor:Headroom,init:function(){if(browser.supportsCssAnimation()){for(var i=0,length=this.elems.length;ithis.lastKnownScrollY,pastOffset=currentScrollY>=this.offset;return scrollingDown&&pastOffset},shouldPin:function(currentScrollY){var scrollingUp=currentScrollY=14;currentScrollY&&isTv?this.unpin():toleranceExceeded&&this.clear()}else isTv&&this.clear();this.lastKnownScrollY=currentScrollY}},Headroom.options={offset:0,scroller:window,initialClass:"headroom",unPinnedClass:"headroom--unpinned",pinnedClass:"headroom--pinned"},Headroom}); \ No newline at end of file +define(["dom","layoutManager","browser","css!./headroom"],function(dom,layoutManager,browser){"use strict";function Debouncer(callback){this.callback=callback,this.ticking=!1}function onHeadroomClearedExternally(){this.state=null}function Headroom(elems,options){options=Object.assign(Headroom.options,options||{}),this.lastKnownScrollY=0,this.elems=elems,this.scroller=options.scroller,this.debouncer=onScroll.bind(this),this.offset=options.offset,this.initialised=!1,this.initialClass=options.initialClass,this.unPinnedClass=options.unPinnedClass,this.pinnedClass=options.pinnedClass,this.state="clear"}function onScroll(){requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this)))}var requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return Debouncer.prototype={constructor:Debouncer,update:function(){this.callback&&this.callback(),this.ticking=!1},handleEvent:function(){this.ticking||(requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this))),this.ticking=!0)}},Headroom.prototype={constructor:Headroom,init:function(){if(browser.supportsCssAnimation()){for(var i=0,length=this.elems.length;ithis.lastKnownScrollY,pastOffset=currentScrollY>=this.offset;return scrollingDown&&pastOffset},shouldPin:function(currentScrollY){var scrollingUp=currentScrollY=14;currentScrollY&&isTv?this.unpin():toleranceExceeded&&this.clear()}else isTv&&this.clear();this.lastKnownScrollY=currentScrollY}},Headroom.options={offset:0,scroller:window,initialClass:"headroom",unPinnedClass:"headroom--unpinned",pinnedClass:"headroom--pinned"},Headroom}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/maintabsmanager.js b/dashboard-ui/bower_components/emby-webcomponents/maintabsmanager.js index 9855121116..5ad19669fb 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/maintabsmanager.js +++ b/dashboard-ui/bower_components/emby-webcomponents/maintabsmanager.js @@ -1 +1 @@ -define(["dom","browser","events","emby-tabs","emby-button","emby-linkbutton"],function(dom,browser,events){"use strict";function enableTabsInFooter(){return!1}function ensureElements(enableInFooter){enableInFooter&&(footerTabsContainer||(footerTabsContainer=document.createElement("div"),footerTabsContainer.classList.add("footerTabs"),footerTabsContainer.classList.add("sectionTabs"),footerTabsContainer.classList.add("hide"))),headerTabsContainer||(headerTabsContainer=queryScope.querySelector(".headerTabs"))}function onViewTabsReady(){this.selectedIndex(this.readySelectedIndex),this.readySelectedIndex=null}function allowSwipe(target){function allowSwipeOn(elem){return!dom.parentWithTag(elem,"input")&&(!elem.classList||!elem.classList.contains("hiddenScrollX")&&!elem.classList.contains("smoothScrollX")&&!elem.classList.contains("animatedScrollX"))}for(var parent=target;null!=parent;){if(!allowSwipeOn(parent))return!1;parent=parent.parentNode}return!0}function configureSwipeTabs(view,tabsElem,getTabContainersFn){if(browser.touch){var onSwipeLeft=(getTabContainersFn().length,function(e,target){allowSwipe(target)&&view.contains(target)&&tabsElem.selectNext()}),onSwipeRight=function(e,target){allowSwipe(target)&&view.contains(target)&&tabsElem.selectPrevious()};require(["touchHelper"],function(TouchHelper){var touchHelper=new TouchHelper(view.parentNode.parentNode);events.on(touchHelper,"swipeleft",onSwipeLeft),events.on(touchHelper,"swiperight",onSwipeRight),view.addEventListener("viewdestroy",function(){touchHelper.destroy()})})}}function setTabs(view,selectedIndex,getTabsFn,getTabContainersFn,onBeforeTabChange,onTabChange,setSelectedIndex){var enableInFooter=enableTabsInFooter();if(!view)return tabOwnerView&&(headerTabsContainer||(headerTabsContainer=queryScope.querySelector(".headerTabs")),ensureElements(enableInFooter),document.body.classList.remove("withSectionTabs"),headerTabsContainer.innerHTML="",headerTabsContainer.classList.add("hide"),footerTabsContainer&&(footerTabsContainer.innerHTML="",footerTabsContainer.classList.add("hide")),tabOwnerView=null),{tabsContainer:headerTabsContainer,replaced:!1};ensureElements(enableInFooter);var tabsContainerElem=enableInFooter?footerTabsContainer:headerTabsContainer;if(tabOwnerView||tabsContainerElem.classList.remove("hide"),tabOwnerView!==view){var index=0,indexAttribute=null==selectedIndex?"":' data-index="'+selectedIndex+'"',tabsHtml='
'+getTabsFn().map(function(t){var tabClass="emby-tab-button";t.enabled===!1&&(tabClass+=" hide");var tabHtml;return t.cssClass&&(tabClass+=" "+t.cssClass),tabHtml=t.href?'
'+t.name+"
":'",index++,tabHtml}).join("")+"
";return tabsContainerElem.innerHTML=tabsHtml,document.body.classList.add("withSectionTabs"),tabOwnerView=view,tabsElem=tabsContainerElem.querySelector('[is="emby-tabs"]'),configureSwipeTabs(view,tabsElem,getTabContainersFn),tabsElem.addEventListener("beforetabchange",function(e){var tabContainers=getTabContainersFn();if(null!=e.detail.previousIndex){var previousPanel=tabContainers[e.detail.previousIndex];previousPanel&&previousPanel.classList.remove("is-active")}var newPanel=tabContainers[e.detail.selectedTabIndex];newPanel&&newPanel.classList.add("is-active")}),onBeforeTabChange&&tabsElem.addEventListener("beforetabchange",onBeforeTabChange),onTabChange&&tabsElem.addEventListener("tabchange",onTabChange),setSelectedIndex!==!1&&(tabsElem.selectedIndex?tabsElem.selectedIndex(selectedIndex):(tabsElem.readySelectedIndex=selectedIndex,tabsElem.addEventListener("ready",onViewTabsReady))),{tabsContainer:tabsContainerElem,tabs:tabsContainerElem.querySelector('[is="emby-tabs"]'),replaced:!0}}return tabsElem||(tabsElem=tabsContainerElem.querySelector('[is="emby-tabs"]')),tabsElem.selectedIndex(selectedIndex),tabOwnerView=view,{tabsContainer:tabsContainerElem,tabs:tabsElem,replaced:!1}}function selectedTabIndex(index){var tabsContainerElem=headerTabsContainer;tabsElem||(tabsElem=tabsContainerElem.querySelector('[is="emby-tabs"]')),null!=index?tabsElem.selectedIndex(index):tabsElem.triggerTabChange()}function getTabsElement(){return document.querySelector(".tabs-viewmenubar")}var tabOwnerView,footerTabsContainer,headerTabsContainer,tabsElem,queryScope=document.querySelector(".skinHeader");return{setTabs:setTabs,getTabsElement:getTabsElement,selectedTabIndex:selectedTabIndex}}); \ No newline at end of file +define(["dom","browser","events","emby-tabs","emby-button","emby-linkbutton"],function(dom,browser,events){"use strict";function enableTabsInFooter(){return!1}function ensureElements(enableInFooter){enableInFooter&&(footerTabsContainer||(footerTabsContainer=document.createElement("div"),footerTabsContainer.classList.add("footerTabs"),footerTabsContainer.classList.add("sectionTabs"),footerTabsContainer.classList.add("hide"))),headerTabsContainer||(headerTabsContainer=queryScope.querySelector(".headerTabs"))}function onViewTabsReady(){this.selectedIndex(this.readySelectedIndex),this.readySelectedIndex=null}function allowSwipe(target){function allowSwipeOn(elem){if(dom.parentWithTag(elem,"input"))return!1;var classList=elem.classList;return!classList||!classList.contains("scrollX")&&!classList.contains("animatedScrollX")}for(var parent=target;null!=parent;){if(!allowSwipeOn(parent))return!1;parent=parent.parentNode}return!0}function configureSwipeTabs(view,tabsElem,getTabContainersFn){if(browser.touch){var onSwipeLeft=(getTabContainersFn().length,function(e,target){allowSwipe(target)&&view.contains(target)&&tabsElem.selectNext()}),onSwipeRight=function(e,target){allowSwipe(target)&&view.contains(target)&&tabsElem.selectPrevious()};require(["touchHelper"],function(TouchHelper){var touchHelper=new TouchHelper(view.parentNode.parentNode);events.on(touchHelper,"swipeleft",onSwipeLeft),events.on(touchHelper,"swiperight",onSwipeRight),view.addEventListener("viewdestroy",function(){touchHelper.destroy()})})}}function setTabs(view,selectedIndex,getTabsFn,getTabContainersFn,onBeforeTabChange,onTabChange,setSelectedIndex){var enableInFooter=enableTabsInFooter();if(!view)return tabOwnerView&&(headerTabsContainer||(headerTabsContainer=queryScope.querySelector(".headerTabs")),ensureElements(enableInFooter),document.body.classList.remove("withSectionTabs"),headerTabsContainer.innerHTML="",headerTabsContainer.classList.add("hide"),footerTabsContainer&&(footerTabsContainer.innerHTML="",footerTabsContainer.classList.add("hide")),tabOwnerView=null),{tabsContainer:headerTabsContainer,replaced:!1};ensureElements(enableInFooter);var tabsContainerElem=enableInFooter?footerTabsContainer:headerTabsContainer;if(tabOwnerView||tabsContainerElem.classList.remove("hide"),tabOwnerView!==view){var index=0,indexAttribute=null==selectedIndex?"":' data-index="'+selectedIndex+'"',tabsHtml='
'+getTabsFn().map(function(t){var tabClass="emby-tab-button";t.enabled===!1&&(tabClass+=" hide");var tabHtml;return t.cssClass&&(tabClass+=" "+t.cssClass),tabHtml=t.href?'
'+t.name+"
":'",index++,tabHtml}).join("")+"
";return tabsContainerElem.innerHTML=tabsHtml,document.body.classList.add("withSectionTabs"),tabOwnerView=view,tabsElem=tabsContainerElem.querySelector('[is="emby-tabs"]'),configureSwipeTabs(view,tabsElem,getTabContainersFn),tabsElem.addEventListener("beforetabchange",function(e){var tabContainers=getTabContainersFn();if(null!=e.detail.previousIndex){var previousPanel=tabContainers[e.detail.previousIndex];previousPanel&&previousPanel.classList.remove("is-active")}var newPanel=tabContainers[e.detail.selectedTabIndex];newPanel&&newPanel.classList.add("is-active")}),onBeforeTabChange&&tabsElem.addEventListener("beforetabchange",onBeforeTabChange),onTabChange&&tabsElem.addEventListener("tabchange",onTabChange),setSelectedIndex!==!1&&(tabsElem.selectedIndex?tabsElem.selectedIndex(selectedIndex):(tabsElem.readySelectedIndex=selectedIndex,tabsElem.addEventListener("ready",onViewTabsReady))),{tabsContainer:tabsContainerElem,tabs:tabsContainerElem.querySelector('[is="emby-tabs"]'),replaced:!0}}return tabsElem||(tabsElem=tabsContainerElem.querySelector('[is="emby-tabs"]')),tabsElem.selectedIndex(selectedIndex),tabOwnerView=view,{tabsContainer:tabsContainerElem,tabs:tabsElem,replaced:!1}}function selectedTabIndex(index){var tabsContainerElem=headerTabsContainer;tabsElem||(tabsElem=tabsContainerElem.querySelector('[is="emby-tabs"]')),null!=index?tabsElem.selectedIndex(index):tabsElem.triggerTabChange()}function getTabsElement(){return document.querySelector(".tabs-viewmenubar")}var tabOwnerView,footerTabsContainer,headerTabsContainer,tabsElem,queryScope=document.querySelector(".skinHeader");return{setTabs:setTabs,getTabsElement:getTabsElement,selectedTabIndex:selectedTabIndex}}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js b/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js index 0e8f914ded..dadcd2a1c8 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js +++ b/dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js @@ -1 +1 @@ -define(["browser","appStorage","apphost","loading","connectionManager","globalize","appRouter","dom","css!./multiselect"],function(browser,appStorage,appHost,loading,connectionManager,globalize,appRouter,dom){"use strict";function hideSelections(){var selectionCommandsPanel=currentSelectionCommandsPanel;if(selectionCommandsPanel){selectionCommandsPanel.parentNode.removeChild(selectionCommandsPanel),currentSelectionCommandsPanel=null,selectedItems=[],selectedElements=[];for(var elems=document.querySelectorAll(".itemSelectionPanel"),i=0,length=elems.length;i";var chkItemSelect=itemSelectionPanel.querySelector(".chkItemSelect");chkItemSelect.addEventListener("change",onSelectionChange)}}function showSelectionCommands(){var selectionCommandsPanel=currentSelectionCommandsPanel;if(!selectionCommandsPanel){selectionCommandsPanel=document.createElement("div"),selectionCommandsPanel.classList.add("selectionCommandsPanel"),document.body.appendChild(selectionCommandsPanel),currentSelectionCommandsPanel=selectionCommandsPanel;var html="";html+='',html+='

';var moreIcon="dots-horiz"===appHost.moreIcon?"":"";html+='",selectionCommandsPanel.innerHTML=html,selectionCommandsPanel.querySelector(".btnCloseSelectionPanel").addEventListener("click",hideSelections);var btnSelectionPanelOptions=selectionCommandsPanel.querySelector(".btnSelectionPanelOptions");btnSelectionPanelOptions.addEventListener("click",showMenuForSelectedItems)}}function alertText(options){return new Promise(function(resolve,reject){require(["alert"],function(alert){alert(options).then(resolve,resolve)})})}function deleteItems(apiClient,itemIds){return new Promise(function(resolve,reject){var msg=globalize.translate("sharedcomponents#ConfirmDeleteItem"),title=globalize.translate("sharedcomponents#HeaderDeleteItem");itemIds.length>1&&(msg=globalize.translate("sharedcomponents#ConfirmDeleteItems"),title=globalize.translate("sharedcomponents#HeaderDeleteItems")),require(["confirm"],function(confirm){confirm(msg,title).then(function(){var promises=itemIds.map(function(itemId){apiClient.deleteItem(itemId)});Promise.all(promises).then(resolve,function(){alertText(globalize.translate("sharedcomponents#ErrorDeletingItem")).then(reject,reject)})},reject)})})}function showMenuForSelectedItems(e){var apiClient=connectionManager.currentApiClient();apiClient.getCurrentUser().then(function(user){var menuItems=[];menuItems.push({name:globalize.translate("sharedcomponents#AddToCollection"),id:"addtocollection",ironIcon:"add"}),menuItems.push({name:globalize.translate("sharedcomponents#AddToPlaylist"),id:"playlist",ironIcon:"playlist-add"}),user.Policy.EnableContentDeletion&&menuItems.push({name:globalize.translate("sharedcomponents#Delete"),id:"delete",ironIcon:"delete"}),user.Policy.EnableContentDownloading&&appHost.supports("filedownload"),user.Policy.EnableContentDownloading&&appHost.supports("sync")&&menuItems.push({name:globalize.translate("sharedcomponents#Download"),id:"synclocal"}),menuItems.push({name:globalize.translate("sharedcomponents#GroupVersions"),id:"groupvideos",ironIcon:"call-merge"}),menuItems.push({name:globalize.translate("sharedcomponents#MarkPlayed"),id:"markplayed"}),menuItems.push({name:globalize.translate("sharedcomponents#MarkUnplayed"),id:"markunplayed"}),menuItems.push({name:globalize.translate("sharedcomponents#RefreshMetadata"),id:"refresh"}),user.Policy.EnableContentDownloading&&menuItems.push({name:globalize.translate("sharedcomponents#Sync"),id:"sync"}),require(["actionsheet"],function(actionsheet){actionsheet.show({items:menuItems,positionTo:e.target,callback:function(id){var items=selectedItems.slice(0),serverId=apiClient.serverInfo().Id;switch(id){case"addtocollection":require(["collectionEditor"],function(collectionEditor){(new collectionEditor).show({items:items,serverId:serverId})}),hideSelections(),dispatchNeedsRefresh();break;case"playlist":require(["playlistEditor"],function(playlistEditor){(new playlistEditor).show({items:items,serverId:serverId})}),hideSelections(),dispatchNeedsRefresh();break;case"delete":deleteItems(apiClient,items).then(function(){appRouter.goHome()}),hideSelections(),dispatchNeedsRefresh();break;case"groupvideos":combineVersions(apiClient,items);break;case"markplayed":items.forEach(function(itemId){apiClient.markPlayed(apiClient.getCurrentUserId(),itemId)}),hideSelections(),dispatchNeedsRefresh();break;case"markunplayed":items.forEach(function(itemId){apiClient.markUnplayed(apiClient.getCurrentUserId(),itemId)}),hideSelections(),dispatchNeedsRefresh();break;case"refresh":require(["refreshDialog"],function(refreshDialog){new refreshDialog({itemIds:items,serverId:serverId}).show()}),hideSelections(),dispatchNeedsRefresh();break;case"sync":require(["syncDialog"],function(syncDialog){syncDialog.showMenu({items:items.map(function(i){return{Id:i}}),serverId:serverId})}),hideSelections(),dispatchNeedsRefresh();break;case"synclocal":require(["syncDialog"],function(syncDialog){syncDialog.showMenu({items:items.map(function(i){return{Id:i}}),isLocalSync:!0,serverId:serverId})}),hideSelections(),dispatchNeedsRefresh()}}})})})}function dispatchNeedsRefresh(){var elems=[];[].forEach.call(selectedElements,function(i){var container=dom.parentWithAttribute(i,"is","emby-itemscontainer");container&&elems.indexOf(container)===-1&&elems.push(container)});for(var i=0,length=elems.length;i=5||deltaY>=5)&&onMouseOut(e)}}function onTouchEnd(e){onMouseOut(e)}function onMouseDown(e){touchStartTimeout&&(clearTimeout(touchStartTimeout),touchStartTimeout=null),touchTarget=e.target,touchStartTimeout=setTimeout(onTouchStartTimerFired,550)}function onMouseOut(e){touchStartTimeout&&(clearTimeout(touchStartTimeout),touchStartTimeout=null),touchTarget=null}function onTouchStartTimerFired(){if(touchTarget){var card=dom.parentWithClass(touchTarget,"card");touchTarget=null,card&&showSelections(card)}}function initTapHold(element){browser.touch&&!browser.safari?element.addEventListener("contextmenu",onTapHold):(dom.addEventListener(element,"touchstart",onTouchStart,{passive:!0}),dom.addEventListener(element,"touchmove",onTouchMove,{passive:!0}),dom.addEventListener(element,"touchend",onTouchEnd,{passive:!0}),dom.addEventListener(element,"touchcancel",onTouchEnd,{passive:!0}),dom.addEventListener(element,"mousedown",onMouseDown,{passive:!0}),dom.addEventListener(element,"mouseleave",onMouseOut,{passive:!0}),dom.addEventListener(element,"mouseup",onMouseOut,{passive:!0}))}var touchTarget,touchStartTimeout,touchStartX,touchStartY,self=this,container=options.container;initTapHold(container),options.bindOnClick!==!1&&container.addEventListener("click",onContainerClick),self.onContainerClick=onContainerClick,self.destroy=function(){container.removeEventListener("click",onContainerClick),container.removeEventListener("contextmenu",onTapHold);var element=container;dom.removeEventListener(element,"touchstart",onTouchStart,{passive:!0}),dom.removeEventListener(element,"touchmove",onTouchMove,{passive:!0}),dom.removeEventListener(element,"touchend",onTouchEnd,{passive:!0}),dom.removeEventListener(element,"mousedown",onMouseDown,{passive:!0}),dom.removeEventListener(element,"mouseleave",onMouseOut,{passive:!0}),dom.removeEventListener(element,"mouseup",onMouseOut,{passive:!0})}}}); \ No newline at end of file +define(["browser","appStorage","apphost","loading","connectionManager","globalize","appRouter","dom","css!./multiselect"],function(browser,appStorage,appHost,loading,connectionManager,globalize,appRouter,dom){"use strict";function hideSelections(){var selectionCommandsPanel=currentSelectionCommandsPanel;if(selectionCommandsPanel){selectionCommandsPanel.parentNode.removeChild(selectionCommandsPanel),currentSelectionCommandsPanel=null,selectedItems=[],selectedElements=[];for(var elems=document.querySelectorAll(".itemSelectionPanel"),i=0,length=elems.length;i";var chkItemSelect=itemSelectionPanel.querySelector(".chkItemSelect");chkItemSelect.addEventListener("change",onSelectionChange)}}function showSelectionCommands(){var selectionCommandsPanel=currentSelectionCommandsPanel;if(!selectionCommandsPanel){selectionCommandsPanel=document.createElement("div"),selectionCommandsPanel.classList.add("selectionCommandsPanel"),document.body.appendChild(selectionCommandsPanel),currentSelectionCommandsPanel=selectionCommandsPanel;var html="";html+='',html+='

';var moreIcon="dots-horiz"===appHost.moreIcon?"":"";html+='",selectionCommandsPanel.innerHTML=html,selectionCommandsPanel.querySelector(".btnCloseSelectionPanel").addEventListener("click",hideSelections);var btnSelectionPanelOptions=selectionCommandsPanel.querySelector(".btnSelectionPanelOptions");btnSelectionPanelOptions.addEventListener("click",showMenuForSelectedItems)}}function alertText(options){return new Promise(function(resolve,reject){require(["alert"],function(alert){alert(options).then(resolve,resolve)})})}function deleteItems(apiClient,itemIds){return new Promise(function(resolve,reject){var msg=globalize.translate("sharedcomponents#ConfirmDeleteItem"),title=globalize.translate("sharedcomponents#HeaderDeleteItem");itemIds.length>1&&(msg=globalize.translate("sharedcomponents#ConfirmDeleteItems"),title=globalize.translate("sharedcomponents#HeaderDeleteItems")),require(["confirm"],function(confirm){confirm(msg,title).then(function(){var promises=itemIds.map(function(itemId){apiClient.deleteItem(itemId)});Promise.all(promises).then(resolve,function(){alertText(globalize.translate("sharedcomponents#ErrorDeletingItem")).then(reject,reject)})},reject)})})}function showMenuForSelectedItems(e){var apiClient=connectionManager.currentApiClient();apiClient.getCurrentUser().then(function(user){var menuItems=[];menuItems.push({name:globalize.translate("sharedcomponents#AddToCollection"),id:"addtocollection",ironIcon:"add"}),menuItems.push({name:globalize.translate("sharedcomponents#AddToPlaylist"),id:"playlist",ironIcon:"playlist-add"}),user.Policy.EnableContentDeletion&&menuItems.push({name:globalize.translate("sharedcomponents#Delete"),id:"delete",ironIcon:"delete"}),user.Policy.EnableContentDownloading&&appHost.supports("filedownload"),user.Policy.EnableContentDownloading&&appHost.supports("sync")&&menuItems.push({name:globalize.translate("sharedcomponents#Download"),id:"synclocal"}),menuItems.push({name:globalize.translate("sharedcomponents#GroupVersions"),id:"groupvideos",ironIcon:"call-merge"}),menuItems.push({name:globalize.translate("sharedcomponents#MarkPlayed"),id:"markplayed"}),menuItems.push({name:globalize.translate("sharedcomponents#MarkUnplayed"),id:"markunplayed"}),menuItems.push({name:globalize.translate("sharedcomponents#RefreshMetadata"),id:"refresh"}),user.Policy.EnableContentDownloading&&menuItems.push({name:globalize.translate("sharedcomponents#Sync"),id:"sync"}),require(["actionsheet"],function(actionsheet){actionsheet.show({items:menuItems,positionTo:e.target,callback:function(id){var items=selectedItems.slice(0),serverId=apiClient.serverInfo().Id;switch(id){case"addtocollection":require(["collectionEditor"],function(collectionEditor){(new collectionEditor).show({items:items,serverId:serverId})}),hideSelections(),dispatchNeedsRefresh();break;case"playlist":require(["playlistEditor"],function(playlistEditor){(new playlistEditor).show({items:items,serverId:serverId})}),hideSelections(),dispatchNeedsRefresh();break;case"delete":deleteItems(apiClient,items).then(function(){appRouter.goHome()}),hideSelections(),dispatchNeedsRefresh();break;case"groupvideos":combineVersions(apiClient,items);break;case"markplayed":items.forEach(function(itemId){apiClient.markPlayed(apiClient.getCurrentUserId(),itemId)}),hideSelections(),dispatchNeedsRefresh();break;case"markunplayed":items.forEach(function(itemId){apiClient.markUnplayed(apiClient.getCurrentUserId(),itemId)}),hideSelections(),dispatchNeedsRefresh();break;case"refresh":require(["refreshDialog"],function(refreshDialog){new refreshDialog({itemIds:items,serverId:serverId}).show()}),hideSelections(),dispatchNeedsRefresh();break;case"sync":require(["syncDialog"],function(syncDialog){syncDialog.showMenu({items:items.map(function(i){return{Id:i}}),serverId:serverId})}),hideSelections(),dispatchNeedsRefresh();break;case"synclocal":require(["syncDialog"],function(syncDialog){syncDialog.showMenu({items:items.map(function(i){return{Id:i}}),isLocalSync:!0,serverId:serverId})}),hideSelections(),dispatchNeedsRefresh()}}})})})}function dispatchNeedsRefresh(){var elems=[];[].forEach.call(selectedElements,function(i){var container=dom.parentWithAttribute(i,"is","emby-itemscontainer");container&&elems.indexOf(container)===-1&&elems.push(container)});for(var i=0,length=elems.length;i=5||deltaY>=5)&&onMouseOut(e)}}function onTouchEnd(e){onMouseOut(e)}function onMouseDown(e){touchStartTimeout&&(clearTimeout(touchStartTimeout),touchStartTimeout=null),touchTarget=e.target,touchStartTimeout=setTimeout(onTouchStartTimerFired,550)}function onMouseOut(e){touchStartTimeout&&(clearTimeout(touchStartTimeout),touchStartTimeout=null),touchTarget=null}function onTouchStartTimerFired(){if(touchTarget){var card=dom.parentWithClass(touchTarget,"card");touchTarget=null,card&&showSelections(card)}}function initTapHold(element){browser.touch&&!browser.safari?element.addEventListener("contextmenu",onTapHold):(dom.addEventListener(element,"touchstart",onTouchStart,{passive:!0}),dom.addEventListener(element,"touchmove",onTouchMove,{passive:!0}),dom.addEventListener(element,"touchend",onTouchEnd,{passive:!0}),dom.addEventListener(element,"touchcancel",onTouchEnd,{passive:!0}),dom.addEventListener(element,"mousedown",onMouseDown,{passive:!0}),dom.addEventListener(element,"mouseleave",onMouseOut,{passive:!0}),dom.addEventListener(element,"mouseup",onMouseOut,{passive:!0}))}var touchTarget,touchStartTimeout,touchStartX,touchStartY,self=this,container=options.container;initTapHold(container),options.bindOnClick!==!1&&container.addEventListener("click",onContainerClick),self.onContainerClick=onContainerClick,self.destroy=function(){container.removeEventListener("click",onContainerClick),container.removeEventListener("contextmenu",onTapHold);var element=container;dom.removeEventListener(element,"touchstart",onTouchStart,{passive:!0}),dom.removeEventListener(element,"touchmove",onTouchMove,{passive:!0}),dom.removeEventListener(element,"touchend",onTouchEnd,{passive:!0}),dom.removeEventListener(element,"mousedown",onMouseDown,{passive:!0}),dom.removeEventListener(element,"mouseleave",onMouseOut,{passive:!0}),dom.removeEventListener(element,"mouseup",onMouseOut,{passive:!0})}}}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/scroller/smoothscroller.js b/dashboard-ui/bower_components/emby-webcomponents/scroller/smoothscroller.js index 67881bdaf5..d88a354edf 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/scroller/smoothscroller.js +++ b/dashboard-ui/bower_components/emby-webcomponents/scroller/smoothscroller.js @@ -1 +1 @@ -define(["browser","layoutManager","dom","focusManager","ResizeObserver","scrollStyles"],function(browser,layoutManager,dom,focusManager,ResizeObserver){"use strict";function type(value){return null==value?String(value):"object"==typeof value||"function"==typeof value?Object.prototype.toString.call(value).match(/\s([a-z]+)/i)[1].toLowerCase()||"object":typeof value}function disableOneEvent(event){event.preventDefault(),event.stopPropagation(),this.removeEventListener(event.type,disableOneEvent)}function within(number,min,max){return numbermax?max:number}var dragMouseEvents=["mousemove","mouseup"],dragTouchEvents=["touchmove","touchend"],wheelEvent=document.implementation.hasFeature("Event.wheel","3.0")?"wheel":"mousewheel",interactiveElements=["INPUT","SELECT","TEXTAREA"],abs=Math.abs,sqrt=Math.sqrt,pow=Math.pow,round=Math.round,max=Math.max,scrollerFactory=(Math.min,function(frame,options){function sibling(n,elem){for(var matched=[];n;n=n.nextSibling)1===n.nodeType&&n!==elem&&matched.push(n);return matched}function ensureSizeInfo(){requiresReflow&&(requiresReflow=!1,frameSize=o.horizontal?frame.offsetWidth:frame.offsetHeight,slideeSize=o.scrollWidth||Math.max(slideeElement[o.horizontal?"offsetWidth":"offsetHeight"],slideeElement[o.horizontal?"scrollWidth":"scrollHeight"]),self._pos.end=max(slideeSize-frameSize,0))}function load(isInit){if(requiresReflow=!0,!isInit){ensureSizeInfo();var pos=self._pos;self.slideTo(within(pos.dest,pos.start,pos.end))}}function initFrameResizeObserver(){var observerOptions={};self.frameResizeObserver=new ResizeObserver(onResize,observerOptions),self.frameResizeObserver.observe(frame)}function nativeScrollTo(container,pos,immediate){container.scroll?o.horizontal?container.scroll({left:pos,behavior:immediate?"instant":"smooth"}):container.scroll({top:pos,behavior:immediate?"instant":"smooth"}):!immediate&&container.scrollTo?o.horizontal?container.scrollTo(Math.round(pos),0):container.scrollTo(0,Math.round(pos)):o.horizontal?container.scrollLeft=Math.round(pos):container.scrollTop=Math.round(pos)}function setStyleProperty(elem,name,value,speed,resetTransition){var style=elem.style;(resetTransition||browser.edge)&&(style.transition="none",void elem.offsetWidth),style.transition="transform "+speed+"ms ease-out",style[name]=value}function dispatchScrollEventIfNeeded(){o.dispatchScrollEvent&&frame.dispatchEvent(new CustomEvent(self.getScrollEventName(),{bubbles:!0,cancelable:!1}))}function renderAnimateWithTransform(fromPosition,toPosition,immediate){var speed=o.speed;immediate&&(speed=o.immediateSpeed||50),o.horizontal?setStyleProperty(slideeElement,"transform","translateX("+-round(toPosition)+"px)",speed):setStyleProperty(slideeElement,"transform","translateY("+-round(toPosition)+"px)",speed),self._pos.cur=toPosition,dispatchScrollEventIfNeeded()}function getBoundingClientRect(elem){return elem.getBoundingClientRect?elem.getBoundingClientRect():{top:0,left:0}}function dragInitSlidee(event){var isTouch="touchstart"===event.type;if(!(dragging.init||!isTouch&&isInteractive(event.target))&&(isTouch?o.touchDragging:o.mouseDragging&&event.which<2)){isTouch||event.preventDefault(),dragging.released=0,dragging.init=0,dragging.source=event.target,dragging.touch=isTouch;var pointer=isTouch?event.touches[0]:event;dragging.initX=pointer.pageX,dragging.initY=pointer.pageY,dragging.initPos=self._pos.cur,dragging.start=+new Date,dragging.time=0,dragging.path=0,dragging.delta=0,dragging.locked=0,dragging.pathToLock=isTouch?30:10,transform&&(isTouch?dragTouchEvents.forEach(function(eventName){dom.addEventListener(document,eventName,dragHandler,{passive:!0})}):dragMouseEvents.forEach(function(eventName){dom.addEventListener(document,eventName,dragHandler,{passive:!0})}))}}function dragHandler(event){dragging.released="mouseup"===event.type||"touchend"===event.type;var pointer=dragging.touch?event[dragging.released?"changedTouches":"touches"][0]:event;if(dragging.pathX=pointer.pageX-dragging.initX,dragging.pathY=pointer.pageY-dragging.initY,dragging.path=sqrt(pow(dragging.pathX,2)+pow(dragging.pathY,2)),dragging.delta=o.horizontal?dragging.pathX:dragging.pathY,dragging.released||!(dragging.path<1)){if(!dragging.init){if(dragging.pathabs(dragging.pathY):abs(dragging.pathX)dragging.pathToLock&&(dragging.locked=1,dragging.source.addEventListener("click",disableOneEvent)),dragging.released&&dragEnd(),self.slideTo(round(dragging.initPos-dragging.delta))}}function dragEnd(){dragging.released=!0,dragTouchEvents.forEach(function(eventName){dom.removeEventListener(document,eventName,dragHandler,{passive:!0})}),dragMouseEvents.forEach(function(eventName){dom.removeEventListener(document,eventName,dragHandler,{passive:!0})}),setTimeout(function(){dragging.source.removeEventListener("click",disableOneEvent)}),dragging.init=0}function isInteractive(element){for(;element;){if(interactiveElements.indexOf(element.tagName)!==-1)return!0;element=element.parentNode}return!1}function normalizeWheelDelta(event){return scrolling.curDelta=(o.horizontal?event.deltaY||event.deltaX:event.deltaY)||-event.wheelDelta,transform&&(scrolling.curDelta/=1===event.deltaMode?3:100),scrolling.curDelta}function scrollHandler(event){ensureSizeInfo();var pos=self._pos;if(o.scrollBy&&pos.start!==pos.end){var delta=normalizeWheelDelta(event);transform?(delta>0&&pos.destpos.start,self.slideBy(o.scrollBy*delta)):(isSmoothScrollSupported&&(delta*=12),o.horizontal?nativeScrollElement.scrollLeft+=delta:nativeScrollElement.scrollTop+=delta)}}function onResize(entries){var entry=entries[0];if(entry){var newRect=entry.contentRect;if(0===newRect.width||0===newRect.height)return;newRect.width===contentRect.width&&newRect.height===contentRect.height||(contentRect=newRect,load(!1))}}function resetScroll(){o.horizontal?this.scrollLeft=0:this.scrollTop=0}function onFrameClick(e){if(1===e.which){var focusableParent=focusManager.focusableParent(e.target);focusableParent&&focusableParent!==document.activeElement&&focusableParent.focus()}}var o=Object.assign({},{slidee:null,horizontal:!1,mouseWheel:!0,scrollBy:0,dragSource:null,mouseDragging:1,touchDragging:1,dragThreshold:3,intervactive:null,speed:0},options),isSmoothScrollSupported="scrollBehavior"in document.documentElement.style;isSmoothScrollSupported&&(browser.firefox&&!layoutManager.tv||options.allowNativeSmoothScroll)?options.enableNativeScroll=!0:options.requireAnimation&&(browser.animate||browser.supportsCssAnimation())?options.enableNativeScroll=!1:layoutManager.tv&&browser.animate||(options.enableNativeScroll=!0),browser.web0s&&(options.enableNativeScroll=!0);var self=this;self.options=o;var slideeElement=o.slidee?o.slidee:sibling(frame.firstChild)[0];self._pos={start:0,center:0,end:0,cur:0,dest:0};var transform=!options.enableNativeScroll,scrollSource=frame,dragSourceElement=o.dragSource?o.dragSource:frame,dragging={released:1},scrolling={last:0,delta:0,resetTime:200};self.initialized=0,self.slidee=slideeElement,self.options=o,self.dragging=dragging;var nativeScrollElement=frame,requiresReflow=!0,frameSize=0,slideeSize=0;self.reload=function(){load()},self.getScrollEventName=function(){return transform?"scrollanimate":"scroll"},self.getScrollSlider=function(){return slideeElement},self.getScrollFrame=function(){return frame};var lastAnimate;self.slideTo=function(newPos,immediate,fullItemPos){ensureSizeInfo();var pos=self._pos;if(newPos=within(newPos,pos.start,pos.end),!transform)return void nativeScrollTo(nativeScrollElement,newPos,immediate);var from=pos.cur;immediate=immediate||dragging.init||!o.speed;var now=(new Date).getTime();o.autoImmediate&&!immediate&&now-(lastAnimate||0)<=50&&(immediate=!0),!immediate&&o.skipSlideToWhenVisible&&fullItemPos&&fullItemPos.isVisible||newPos!==pos.dest&&(pos.dest=newPos,renderAnimateWithTransform(from,newPos,immediate),lastAnimate=now)},self.getPos=function(item){var scrollElement=transform?slideeElement:nativeScrollElement,slideeOffset=getBoundingClientRect(scrollElement),itemOffset=getBoundingClientRect(item),offset=(o.horizontal?slideeOffset.left:slideeOffset.top,o.horizontal?slideeOffset.right:slideeOffset.bottom,o.horizontal?itemOffset.left-slideeOffset.left:itemOffset.top-slideeOffset.top),size=o.horizontal?itemOffset.width:itemOffset.height;size||0===size||(size=item[o.horizontal?"offsetWidth":"offsetHeight"]);var centerOffset=o.centerOffset||0;transform||(centerOffset=0,offset+=o.horizontal?nativeScrollElement.scrollLeft:nativeScrollElement.scrollTop),ensureSizeInfo();var currentStart=self._pos.cur,currentEnd=currentStart+frameSize,isVisible=offset>=currentStart&&offset+size<=currentEnd;return{start:offset,center:offset+centerOffset-frameSize/2+size/2,end:offset-frameSize+size,size:size,isVisible:isVisible}},self.getCenterPosition=function(item){ensureSizeInfo();var pos=self.getPos(item);return within(pos.center,pos.start,pos.end)},self.destroy=function(){return self.frameResizeObserver&&(self.frameResizeObserver.disconnect(),self.frameResizeObserver=null),dom.removeEventListener(frame,"scroll",resetScroll,{passive:!0}),dom.removeEventListener(scrollSource,wheelEvent,scrollHandler,{passive:!0}),dom.removeEventListener(dragSourceElement,"touchstart",dragInitSlidee,{passive:!0}),dom.removeEventListener(frame,"click",onFrameClick,{passive:!0,capture:!0}),dom.removeEventListener(dragSourceElement,"mousedown",dragInitSlidee,{}),self.initialized=0,self};var contentRect={};self.getScrollPosition=function(){return transform?self._pos.cur:o.horizontal?nativeScrollElement.scrollLeft:nativeScrollElement.scrollTop},self.getScrollSize=function(){return transform?slideeSize:o.horizontal?nativeScrollElement.scrollWidth:nativeScrollElement.scrollHeight},self.init=function(){if(!self.initialized)return transform?(frame.style.overflow="hidden",slideeElement.style["will-change"]="transform",slideeElement.style.transition="transform "+o.speed+"ms ease-out",o.horizontal?slideeElement.classList.add("animatedScrollX"):slideeElement.classList.add("animatedScrollY")):o.horizontal?(layoutManager.desktop&&!o.hideScrollbar?nativeScrollElement.classList.add("smoothScrollX"):nativeScrollElement.classList.add("hiddenScrollX"),o.forceHideScrollbars&&nativeScrollElement.classList.add("hiddenScrollX-forced")):(layoutManager.desktop&&!o.hideScrollbar?nativeScrollElement.classList.add("smoothScrollY"):nativeScrollElement.classList.add("hiddenScrollY"),o.forceHideScrollbars&&nativeScrollElement.classList.add("hiddenScrollY-forced")),(transform||layoutManager.tv)&&dom.addEventListener(dragSourceElement,"mousedown",dragInitSlidee,{}),initFrameResizeObserver(),transform?(dom.addEventListener(dragSourceElement,"touchstart",dragInitSlidee,{passive:!0}),o.horizontal||dom.addEventListener(frame,"scroll",resetScroll,{passive:!0}),o.mouseWheel&&dom.addEventListener(scrollSource,wheelEvent,scrollHandler,{passive:!0})):o.horizontal&&o.mouseWheel&&dom.addEventListener(scrollSource,wheelEvent,scrollHandler,{passive:!0}),dom.addEventListener(frame,"click",onFrameClick,{passive:!0,capture:!0}),self.initialized=1,load(!0),self}});return scrollerFactory.prototype.slideBy=function(delta,immediate){delta&&this.slideTo(this._pos.dest+delta,immediate)},scrollerFactory.prototype.to=function(location,item,immediate){if("boolean"===type(item)&&(immediate=item,item=void 0),void 0===item)this.slideTo(this._pos[location],immediate);else{var itemPos=this.getPos(item);itemPos&&this.slideTo(itemPos[location],immediate,itemPos)}},scrollerFactory.prototype.toStart=function(item,immediate){this.to("start",item,immediate)},scrollerFactory.prototype.toEnd=function(item,immediate){this.to("end",item,immediate)},scrollerFactory.prototype.toCenter=function(item,immediate){this.to("center",item,immediate)},scrollerFactory.create=function(frame,options){var instance=new scrollerFactory(frame,options);return Promise.resolve(instance)},scrollerFactory}); \ No newline at end of file +define(["browser","layoutManager","dom","focusManager","ResizeObserver","scrollStyles"],function(browser,layoutManager,dom,focusManager,ResizeObserver){"use strict";function type(value){return null==value?String(value):"object"==typeof value||"function"==typeof value?Object.prototype.toString.call(value).match(/\s([a-z]+)/i)[1].toLowerCase()||"object":typeof value}function disableOneEvent(event){event.preventDefault(),event.stopPropagation(),this.removeEventListener(event.type,disableOneEvent)}function within(number,min,max){return numbermax?max:number}var dragMouseEvents=["mousemove","mouseup"],dragTouchEvents=["touchmove","touchend"],wheelEvent=document.implementation.hasFeature("Event.wheel","3.0")?"wheel":"mousewheel",interactiveElements=["INPUT","SELECT","TEXTAREA"],abs=Math.abs,sqrt=Math.sqrt,pow=Math.pow,round=Math.round,max=Math.max,scrollerFactory=(Math.min,function(frame,options){function sibling(n,elem){for(var matched=[];n;n=n.nextSibling)1===n.nodeType&&n!==elem&&matched.push(n);return matched}function ensureSizeInfo(){requiresReflow&&(requiresReflow=!1,frameSize=o.horizontal?frame.offsetWidth:frame.offsetHeight,slideeSize=o.scrollWidth||Math.max(slideeElement[o.horizontal?"offsetWidth":"offsetHeight"],slideeElement[o.horizontal?"scrollWidth":"scrollHeight"]),self._pos.end=max(slideeSize-frameSize,0))}function load(isInit){if(requiresReflow=!0,!isInit){ensureSizeInfo();var pos=self._pos;self.slideTo(within(pos.dest,pos.start,pos.end))}}function initFrameResizeObserver(){var observerOptions={};self.frameResizeObserver=new ResizeObserver(onResize,observerOptions),self.frameResizeObserver.observe(frame)}function nativeScrollTo(container,pos,immediate){container.scroll?o.horizontal?container.scroll({left:pos,behavior:immediate?"instant":"smooth"}):container.scroll({top:pos,behavior:immediate?"instant":"smooth"}):!immediate&&container.scrollTo?o.horizontal?container.scrollTo(Math.round(pos),0):container.scrollTo(0,Math.round(pos)):o.horizontal?container.scrollLeft=Math.round(pos):container.scrollTop=Math.round(pos)}function setStyleProperty(elem,name,value,speed,resetTransition){var style=elem.style;(resetTransition||browser.edge)&&(style.transition="none",void elem.offsetWidth),style.transition="transform "+speed+"ms ease-out",style[name]=value}function dispatchScrollEventIfNeeded(){o.dispatchScrollEvent&&frame.dispatchEvent(new CustomEvent(self.getScrollEventName(),{bubbles:!0,cancelable:!1}))}function renderAnimateWithTransform(fromPosition,toPosition,immediate){var speed=o.speed;immediate&&(speed=o.immediateSpeed||50),o.horizontal?setStyleProperty(slideeElement,"transform","translateX("+-round(toPosition)+"px)",speed):setStyleProperty(slideeElement,"transform","translateY("+-round(toPosition)+"px)",speed),self._pos.cur=toPosition,dispatchScrollEventIfNeeded()}function getBoundingClientRect(elem){return elem.getBoundingClientRect?elem.getBoundingClientRect():{top:0,left:0}}function dragInitSlidee(event){var isTouch="touchstart"===event.type;if(!(dragging.init||!isTouch&&isInteractive(event.target))&&(isTouch?o.touchDragging:o.mouseDragging&&event.which<2)){isTouch||event.preventDefault(),dragging.released=0,dragging.init=0,dragging.source=event.target,dragging.touch=isTouch;var pointer=isTouch?event.touches[0]:event;dragging.initX=pointer.pageX,dragging.initY=pointer.pageY,dragging.initPos=self._pos.cur,dragging.start=+new Date,dragging.time=0,dragging.path=0,dragging.delta=0,dragging.locked=0,dragging.pathToLock=isTouch?30:10,transform&&(isTouch?dragTouchEvents.forEach(function(eventName){dom.addEventListener(document,eventName,dragHandler,{passive:!0})}):dragMouseEvents.forEach(function(eventName){dom.addEventListener(document,eventName,dragHandler,{passive:!0})}))}}function dragHandler(event){dragging.released="mouseup"===event.type||"touchend"===event.type;var pointer=dragging.touch?event[dragging.released?"changedTouches":"touches"][0]:event;if(dragging.pathX=pointer.pageX-dragging.initX,dragging.pathY=pointer.pageY-dragging.initY,dragging.path=sqrt(pow(dragging.pathX,2)+pow(dragging.pathY,2)),dragging.delta=o.horizontal?dragging.pathX:dragging.pathY,dragging.released||!(dragging.path<1)){if(!dragging.init){if(dragging.pathabs(dragging.pathY):abs(dragging.pathX)dragging.pathToLock&&(dragging.locked=1,dragging.source.addEventListener("click",disableOneEvent)),dragging.released&&dragEnd(),self.slideTo(round(dragging.initPos-dragging.delta))}}function dragEnd(){dragging.released=!0,dragTouchEvents.forEach(function(eventName){dom.removeEventListener(document,eventName,dragHandler,{passive:!0})}),dragMouseEvents.forEach(function(eventName){dom.removeEventListener(document,eventName,dragHandler,{passive:!0})}),setTimeout(function(){dragging.source.removeEventListener("click",disableOneEvent)}),dragging.init=0}function isInteractive(element){for(;element;){if(interactiveElements.indexOf(element.tagName)!==-1)return!0;element=element.parentNode}return!1}function normalizeWheelDelta(event){return scrolling.curDelta=(o.horizontal?event.deltaY||event.deltaX:event.deltaY)||-event.wheelDelta,transform&&(scrolling.curDelta/=1===event.deltaMode?3:100),scrolling.curDelta}function scrollHandler(event){ensureSizeInfo();var pos=self._pos;if(o.scrollBy&&pos.start!==pos.end){var delta=normalizeWheelDelta(event);transform?(delta>0&&pos.destpos.start,self.slideBy(o.scrollBy*delta)):(isSmoothScrollSupported&&(delta*=12),o.horizontal?nativeScrollElement.scrollLeft+=delta:nativeScrollElement.scrollTop+=delta)}}function onResize(entries){var entry=entries[0];if(entry){var newRect=entry.contentRect;if(0===newRect.width||0===newRect.height)return;newRect.width===contentRect.width&&newRect.height===contentRect.height||(contentRect=newRect,load(!1))}}function resetScroll(){o.horizontal?this.scrollLeft=0:this.scrollTop=0}function onFrameClick(e){if(1===e.which){var focusableParent=focusManager.focusableParent(e.target);focusableParent&&focusableParent!==document.activeElement&&focusableParent.focus()}}var o=Object.assign({},{slidee:null,horizontal:!1,mouseWheel:!0,scrollBy:0,dragSource:null,mouseDragging:1,touchDragging:1,dragThreshold:3,intervactive:null,speed:0},options),isSmoothScrollSupported="scrollBehavior"in document.documentElement.style;options.allowNativeScroll===!1?options.enableNativeScroll=!1:isSmoothScrollSupported&&(browser.firefox&&!layoutManager.tv||options.allowNativeSmoothScroll)?options.enableNativeScroll=!0:options.requireAnimation&&(browser.animate||browser.supportsCssAnimation())?options.enableNativeScroll=!1:layoutManager.tv&&browser.animate||(options.enableNativeScroll=!0),browser.web0s&&(options.enableNativeScroll=!0);var self=this;self.options=o;var slideeElement=o.slidee?o.slidee:sibling(frame.firstChild)[0];self._pos={start:0,center:0,end:0,cur:0,dest:0};var transform=!options.enableNativeScroll,scrollSource=frame,dragSourceElement=o.dragSource?o.dragSource:frame,dragging={released:1},scrolling={last:0,delta:0,resetTime:200};self.initialized=0,self.slidee=slideeElement,self.options=o,self.dragging=dragging;var nativeScrollElement=frame,requiresReflow=!0,frameSize=0,slideeSize=0;self.reload=function(){load()},self.getScrollEventName=function(){return transform?"scrollanimate":"scroll"},self.getScrollSlider=function(){return slideeElement},self.getScrollFrame=function(){return frame};var lastAnimate;self.slideTo=function(newPos,immediate,fullItemPos){ensureSizeInfo();var pos=self._pos;if(newPos=within(newPos,pos.start,pos.end),!transform)return void nativeScrollTo(nativeScrollElement,newPos,immediate);var from=pos.cur;immediate=immediate||dragging.init||!o.speed;var now=(new Date).getTime();o.autoImmediate&&!immediate&&now-(lastAnimate||0)<=50&&(immediate=!0),!immediate&&o.skipSlideToWhenVisible&&fullItemPos&&fullItemPos.isVisible||newPos!==pos.dest&&(pos.dest=newPos,renderAnimateWithTransform(from,newPos,immediate),lastAnimate=now)},self.getPos=function(item){var scrollElement=transform?slideeElement:nativeScrollElement,slideeOffset=getBoundingClientRect(scrollElement),itemOffset=getBoundingClientRect(item),offset=(o.horizontal?slideeOffset.left:slideeOffset.top,o.horizontal?slideeOffset.right:slideeOffset.bottom,o.horizontal?itemOffset.left-slideeOffset.left:itemOffset.top-slideeOffset.top),size=o.horizontal?itemOffset.width:itemOffset.height;size||0===size||(size=item[o.horizontal?"offsetWidth":"offsetHeight"]);var centerOffset=o.centerOffset||0;transform||(centerOffset=0,offset+=o.horizontal?nativeScrollElement.scrollLeft:nativeScrollElement.scrollTop),ensureSizeInfo();var currentStart=self._pos.cur,currentEnd=currentStart+frameSize,isVisible=offset>=currentStart&&offset+size<=currentEnd;return{start:offset,center:offset+centerOffset-frameSize/2+size/2,end:offset-frameSize+size,size:size,isVisible:isVisible}},self.getCenterPosition=function(item){ensureSizeInfo();var pos=self.getPos(item);return within(pos.center,pos.start,pos.end)},self.destroy=function(){return self.frameResizeObserver&&(self.frameResizeObserver.disconnect(),self.frameResizeObserver=null),dom.removeEventListener(frame,"scroll",resetScroll,{passive:!0}),dom.removeEventListener(scrollSource,wheelEvent,scrollHandler,{passive:!0}),dom.removeEventListener(dragSourceElement,"touchstart",dragInitSlidee,{passive:!0}),dom.removeEventListener(frame,"click",onFrameClick,{passive:!0,capture:!0}),dom.removeEventListener(dragSourceElement,"mousedown",dragInitSlidee,{}),self.initialized=0,self};var contentRect={};self.getScrollPosition=function(){return transform?self._pos.cur:o.horizontal?nativeScrollElement.scrollLeft:nativeScrollElement.scrollTop},self.getScrollSize=function(){return transform?slideeSize:o.horizontal?nativeScrollElement.scrollWidth:nativeScrollElement.scrollHeight},self.init=function(){if(!self.initialized)return transform?(frame.style.overflow="hidden",slideeElement.style["will-change"]="transform",slideeElement.style.transition="transform "+o.speed+"ms ease-out",o.horizontal?slideeElement.classList.add("animatedScrollX"):slideeElement.classList.add("animatedScrollY")):o.horizontal?(layoutManager.desktop&&!o.hideScrollbar?nativeScrollElement.classList.add("scrollX"):(nativeScrollElement.classList.add("scrollX"),nativeScrollElement.classList.add("hiddenScrollX"),layoutManager.tv&&o.allowNativeSmoothScroll!==!1&&nativeScrollElement.classList.add("smoothScrollX")),o.forceHideScrollbars&&nativeScrollElement.classList.add("hiddenScrollX-forced")):(layoutManager.desktop&&!o.hideScrollbar?nativeScrollElement.classList.add("smoothScrollY"):nativeScrollElement.classList.add("hiddenScrollY"),o.forceHideScrollbars&&nativeScrollElement.classList.add("hiddenScrollY-forced")),(transform||layoutManager.tv)&&dom.addEventListener(dragSourceElement,"mousedown",dragInitSlidee,{}),initFrameResizeObserver(),transform?(dom.addEventListener(dragSourceElement,"touchstart",dragInitSlidee,{passive:!0}),o.horizontal||dom.addEventListener(frame,"scroll",resetScroll,{passive:!0}),o.mouseWheel&&dom.addEventListener(scrollSource,wheelEvent,scrollHandler,{passive:!0})):o.horizontal&&o.mouseWheel&&dom.addEventListener(scrollSource,wheelEvent,scrollHandler,{passive:!0}),dom.addEventListener(frame,"click",onFrameClick,{passive:!0,capture:!0}),self.initialized=1,load(!0),self}});return scrollerFactory.prototype.slideBy=function(delta,immediate){delta&&this.slideTo(this._pos.dest+delta,immediate)},scrollerFactory.prototype.to=function(location,item,immediate){if("boolean"===type(item)&&(immediate=item,item=void 0),void 0===item)this.slideTo(this._pos[location],immediate);else{var itemPos=this.getPos(item);itemPos&&this.slideTo(itemPos[location],immediate,itemPos)}},scrollerFactory.prototype.toStart=function(item,immediate){this.to("start",item,immediate)},scrollerFactory.prototype.toEnd=function(item,immediate){this.to("end",item,immediate)},scrollerFactory.prototype.toCenter=function(item,immediate){this.to("center",item,immediate)},scrollerFactory.create=function(frame,options){var instance=new scrollerFactory(frame,options);return Promise.resolve(instance)},scrollerFactory}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/scrollstyles.css b/dashboard-ui/bower_components/emby-webcomponents/scrollstyles.css index 55048aad96..78eda7dad3 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/scrollstyles.css +++ b/dashboard-ui/bower_components/emby-webcomponents/scrollstyles.css @@ -1 +1 @@ -.hiddenScrollX,.smoothScrollX{overflow-x:auto;-webkit-overflow-scrolling:touch;overflow-y:hidden;scroll-behavior:smooth;white-space:nowrap}.hiddenScrollX,.layout-tv .smoothScrollX{-ms-overflow-style:none}.hiddenScrollX-forced{overflow:-moz-scrollbars-none}.hiddenScrollX::-webkit-scrollbar,.layout-tv .smoothScrollX::-webkit-scrollbar{height:0!important;display:none}.hiddenScrollY,.smoothScrollY{overflow-y:auto;-webkit-overflow-scrolling:touch;overflow-x:hidden;scroll-behavior:smooth}.hiddenScrollY,.layout-tv .smoothScrollY{-ms-overflow-style:none}.hiddenScrollY-forced{overflow:-moz-scrollbars-none}.hiddenScrollY::-webkit-scrollbar,.layout-tv .smoothScrollY::-webkit-scrollbar{width:0!important;display:none}.darkScroller::-webkit-scrollbar{width:1em;height:1em}.darkScroller::-webkit-scrollbar-button:end:increment,.darkScroller::-webkit-scrollbar-button:start:decrement{display:none}.darkScroller::-webkit-scrollbar-track-piece{background-color:#3b3b3b}.darkScroller::-webkit-scrollbar-thumb:horizontal,.darkScroller::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888} \ No newline at end of file +.scrollX{overflow-x:auto;-webkit-overflow-scrolling:touch;overflow-y:hidden;white-space:nowrap}.smoothScrollX{scroll-behavior:smooth}.hiddenScrollX,.layout-tv .scrollX{-ms-overflow-style:none}.hiddenScrollX-forced{overflow:-moz-scrollbars-none}.hiddenScrollX::-webkit-scrollbar,.layout-tv .scrollX::-webkit-scrollbar{height:0!important;display:none}.hiddenScrollY,.smoothScrollY{overflow-y:auto;-webkit-overflow-scrolling:touch;overflow-x:hidden;scroll-behavior:smooth}.hiddenScrollY,.layout-tv .smoothScrollY{-ms-overflow-style:none}.hiddenScrollY-forced{overflow:-moz-scrollbars-none}.hiddenScrollY::-webkit-scrollbar,.layout-tv .smoothScrollY::-webkit-scrollbar{width:0!important;display:none}.darkScroller::-webkit-scrollbar{width:1em;height:1em}.darkScroller::-webkit-scrollbar-button:end:increment,.darkScroller::-webkit-scrollbar-button:start:decrement{display:none}.darkScroller::-webkit-scrollbar-track-piece{background-color:#3b3b3b}.darkScroller::-webkit-scrollbar-thumb:horizontal,.darkScroller::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888} \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/search/searchresults.js b/dashboard-ui/bower_components/emby-webcomponents/search/searchresults.js index 67f6794c73..8d955d490f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/search/searchresults.js +++ b/dashboard-ui/bower_components/emby-webcomponents/search/searchresults.js @@ -1 +1 @@ -define(["layoutManager","globalize","require","events","connectionManager","cardBuilder","appRouter","emby-scroller","emby-itemscontainer","emby-linkbutton"],function(layoutManager,globalize,require,events,connectionManager,cardBuilder,appRouter){"use strict";function loadSuggestions(instance,context,apiClient){var options={SortBy:"IsFavoriteOrLiked,Random",IncludeItemTypes:"Movie,Series,MusicArtist",Limit:20,Recursive:!0,ImageTypeLimit:0,EnableImages:!1,ParentId:instance.options.parentId};apiClient.getItems(apiClient.getCurrentUserId(),options).then(function(result){var html=result.Items.map(function(i){var href=appRouter.getRouteUrl(i),itemHtml='"}).join(""),searchSuggestions=context.querySelector(".searchSuggestions");searchSuggestions.querySelector(".searchSuggestionsList").innerHTML=html,searchSuggestions.classList.remove("hide")})}function getSearchHints(instance,apiClient,query){if(!query.searchTerm)return Promise.resolve({SearchHints:[]});var allowSearch=!0,queryIncludeItemTypes=query.IncludeItemTypes;return"tvshows"===instance.options.collectionType?query.IncludeArtists?allowSearch=!1:"Movie"!==queryIncludeItemTypes&&"LiveTvProgram"!==queryIncludeItemTypes&&"MusicAlbum"!==queryIncludeItemTypes&&"Audio"!==queryIncludeItemTypes&&"Book"!==queryIncludeItemTypes&&"AudioBook"!==queryIncludeItemTypes&&"Video"!==query.MediaTypes||(allowSearch=!1):"movies"===instance.options.collectionType?query.IncludeArtists?allowSearch=!1:"Series"!==queryIncludeItemTypes&&"Episode"!==queryIncludeItemTypes&&"LiveTvProgram"!==queryIncludeItemTypes&&"MusicAlbum"!==queryIncludeItemTypes&&"Audio"!==queryIncludeItemTypes&&"Book"!==queryIncludeItemTypes&&"AudioBook"!==queryIncludeItemTypes&&"Video"!==query.MediaTypes||(allowSearch=!1):"music"===instance.options.collectionType?query.People?allowSearch=!1:"Series"!==queryIncludeItemTypes&&"Episode"!==queryIncludeItemTypes&&"LiveTvProgram"!==queryIncludeItemTypes&&"Movie"!==queryIncludeItemTypes||(allowSearch=!1):"livetv"===instance.options.collectionType&&(query.IncludeArtists||query.IncludePeople?allowSearch=!1:"Series"!==queryIncludeItemTypes&&"Episode"!==queryIncludeItemTypes&&"MusicAlbum"!==queryIncludeItemTypes&&"Audio"!==queryIncludeItemTypes&&"Book"!==queryIncludeItemTypes&&"AudioBook"!==queryIncludeItemTypes&&"Movie"!==queryIncludeItemTypes&&"Video"!==query.MediaTypes||(allowSearch=!1)),"NullType"===queryIncludeItemTypes&&(allowSearch=!1),allowSearch?apiClient.getSearchHints(query):Promise.resolve({SearchHints:[]})}function search(instance,apiClient,context,value){value||layoutManager.tv?context.querySelector(".searchSuggestions").classList.add("hide"):loadSuggestions(instance,context,apiClient),"livetv"===instance.options.collectionType?searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"LiveTvProgram",IsMovie:!0,IsKids:!1,IsNews:!1},context,".movieResults",{preferThumb:!0,inheritThumb:!1,shape:enableScrollX()?"overflowPortrait":"portrait",showParentTitleOrTitle:!0,showTitle:!1,centerText:!0,coverImage:!0,overlayText:!1,overlayMoreButton:!0,showAirTime:!0,showAirDateTime:!0,showChannelName:!0}):searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"Movie"},context,".movieResults",{showTitle:!0,overlayText:!1,centerText:!0,showYear:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"Series"},context,".seriesResults",{showTitle:!0,overlayText:!1,centerText:!0,showYear:!0}),"livetv"===instance.options.collectionType?searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"LiveTvProgram",IsSeries:!0,IsSports:!1,IsKids:!1,IsNews:!1},context,".episodeResults",{preferThumb:!0,inheritThumb:!1,shape:enableScrollX()?"overflowBackdrop":"backdrop",showParentTitleOrTitle:!0,showTitle:!1,centerText:!0,coverImage:!0,overlayText:!1,overlayMoreButton:!0,showAirTime:!0,showAirDateTime:!0,showChannelName:!0}):searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"Episode"},context,".episodeResults",{coverImage:!0,showTitle:!0,showParentTitle:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"livetv"===instance.options.collectionType?"LiveTvProgram":"NullType",IsSports:!0},context,".sportsResults",{preferThumb:!0,inheritThumb:!1,shape:enableScrollX()?"overflowBackdrop":"backdrop",showParentTitleOrTitle:!0,showTitle:!1,centerText:!0,coverImage:!0,overlayText:!1,overlayMoreButton:!0,showAirTime:!0,showAirDateTime:!0,showChannelName:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"livetv"===instance.options.collectionType?"LiveTvProgram":"NullType",IsKids:!0},context,".kidsResults",{preferThumb:!0,inheritThumb:!1,shape:enableScrollX()?"overflowBackdrop":"backdrop",showParentTitleOrTitle:!0,showTitle:!1,centerText:!0,coverImage:!0,overlayText:!1,overlayMoreButton:!0,showAirTime:!0,showAirDateTime:!0,showChannelName:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"livetv"===instance.options.collectionType?"LiveTvProgram":"NullType",IsNews:!0},context,".newsResults",{preferThumb:!0,inheritThumb:!1,shape:enableScrollX()?"overflowBackdrop":"backdrop",showParentTitleOrTitle:!0,showTitle:!1,centerText:!0,coverImage:!0,overlayText:!1,overlayMoreButton:!0,showAirTime:!0,showAirDateTime:!0,showChannelName:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"LiveTvProgram",IsMovie:"livetv"!==instance.options.collectionType&&null,IsSeries:"livetv"!==instance.options.collectionType&&null,IsSports:"livetv"!==instance.options.collectionType&&null,IsKids:"livetv"!==instance.options.collectionType&&null,IsNews:"livetv"!==instance.options.collectionType&&null},context,".programResults",{preferThumb:!0,inheritThumb:!1,shape:enableScrollX()?"overflowBackdrop":"backdrop",showParentTitleOrTitle:!0,showTitle:!1,centerText:!0,coverImage:!0,overlayText:!1,overlayMoreButton:!0,showAirTime:!0,showAirDateTime:!0,showChannelName:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,MediaTypes:"Video",ExcludeItemTypes:"Movie,Episode"},context,".videoResults",{showParentTitle:!0,showTitle:!0,overlayText:!1,centerText:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!0,IncludeMedia:!1,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1},context,".peopleResults",{coverImage:!0,showTitle:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!1,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!0},context,".artistResults",{coverImage:!0,showTitle:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"MusicAlbum"},context,".albumResults",{showParentTitle:!0,showTitle:!0,overlayText:!1,centerText:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"Audio"},context,".songResults",{showParentTitle:!0,showTitle:!0,overlayText:!1,centerText:!0,action:"play"}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"Book"},context,".bookResults",{showTitle:!0,overlayText:!1,centerText:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"AudioBook"},context,".audioBookResults",{showTitle:!0,overlayText:!1,centerText:!0})}function searchType(instance,apiClient,query,context,section,cardOptions){query.UserId=apiClient.getCurrentUserId(),query.Limit=enableScrollX()?24:16,query.ParentId=instance.options.parentId,getSearchHints(instance,apiClient,query).then(function(result){populateResults(result,context,section,cardOptions)})}function populateResults(result,context,section,cardOptions){section=context.querySelector(section);var items=result.SearchHints,itemsContainer=section.querySelector(".itemsContainer");cardBuilder.buildCards(items,Object.assign({itemsContainer:itemsContainer,parentContainer:section,shape:enableScrollX()?"autooverflow":"auto",scalable:!0,overlayText:!1,centerText:!0,allowBottomPadding:!enableScrollX()},cardOptions||{})),section.querySelector(".emby-scroller").scrollToBeginning(!0)}function enableScrollX(){return!0}function replaceAll(originalString,strReplace,strWith){var reg=new RegExp(strReplace,"ig");return originalString.replace(reg,strWith)}function embed(elem,instance,options){require(["text!./searchresults.template.html"],function(template){enableScrollX()||(template=replaceAll(template,'data-horizontal="true"','data-horizontal="false"'),template=replaceAll(template,"itemsContainer scrollSlider","itemsContainer scrollSlider vertical-wrap"));var html=globalize.translateDocument(template,"sharedcomponents");elem.innerHTML=html,elem.classList.add("searchResults"),instance.search("")})}function SearchResults(options){this.options=options,embed(options.element,this,options)}return SearchResults.prototype.search=function(value){var apiClient=connectionManager.getApiClient(this.options.serverId);search(this,apiClient,this.options.element,value)},SearchResults.prototype.destroy=function(){var options=this.options;options&&options.element.classList.remove("searchFields"),this.options=null},SearchResults}); \ No newline at end of file +define(["layoutManager","globalize","require","events","connectionManager","cardBuilder","appRouter","emby-scroller","emby-itemscontainer","emby-linkbutton"],function(layoutManager,globalize,require,events,connectionManager,cardBuilder,appRouter){"use strict";function loadSuggestions(instance,context,apiClient){var options={SortBy:"IsFavoriteOrLiked,Random",IncludeItemTypes:"Movie,Series,MusicArtist",Limit:20,Recursive:!0,ImageTypeLimit:0,EnableImages:!1,ParentId:instance.options.parentId};apiClient.getItems(apiClient.getCurrentUserId(),options).then(function(result){"suggestions"!==instance.mode&&(result.Items=[]);var html=result.Items.map(function(i){var href=appRouter.getRouteUrl(i),itemHtml='"}).join(""),searchSuggestions=context.querySelector(".searchSuggestions");searchSuggestions.querySelector(".searchSuggestionsList").innerHTML=html,result.Items.length&&searchSuggestions.classList.remove("hide")})}function getSearchHints(instance,apiClient,query){if(!query.searchTerm)return Promise.resolve({SearchHints:[]});var allowSearch=!0,queryIncludeItemTypes=query.IncludeItemTypes;return"tvshows"===instance.options.collectionType?query.IncludeArtists?allowSearch=!1:"Movie"!==queryIncludeItemTypes&&"LiveTvProgram"!==queryIncludeItemTypes&&"MusicAlbum"!==queryIncludeItemTypes&&"Audio"!==queryIncludeItemTypes&&"Book"!==queryIncludeItemTypes&&"AudioBook"!==queryIncludeItemTypes&&"Video"!==query.MediaTypes||(allowSearch=!1):"movies"===instance.options.collectionType?query.IncludeArtists?allowSearch=!1:"Series"!==queryIncludeItemTypes&&"Episode"!==queryIncludeItemTypes&&"LiveTvProgram"!==queryIncludeItemTypes&&"MusicAlbum"!==queryIncludeItemTypes&&"Audio"!==queryIncludeItemTypes&&"Book"!==queryIncludeItemTypes&&"AudioBook"!==queryIncludeItemTypes&&"Video"!==query.MediaTypes||(allowSearch=!1):"music"===instance.options.collectionType?query.People?allowSearch=!1:"Series"!==queryIncludeItemTypes&&"Episode"!==queryIncludeItemTypes&&"LiveTvProgram"!==queryIncludeItemTypes&&"Movie"!==queryIncludeItemTypes||(allowSearch=!1):"livetv"===instance.options.collectionType&&(query.IncludeArtists||query.IncludePeople?allowSearch=!1:"Series"!==queryIncludeItemTypes&&"Episode"!==queryIncludeItemTypes&&"MusicAlbum"!==queryIncludeItemTypes&&"Audio"!==queryIncludeItemTypes&&"Book"!==queryIncludeItemTypes&&"AudioBook"!==queryIncludeItemTypes&&"Movie"!==queryIncludeItemTypes&&"Video"!==query.MediaTypes||(allowSearch=!1)),"NullType"===queryIncludeItemTypes&&(allowSearch=!1),allowSearch?apiClient.getSearchHints(query):Promise.resolve({SearchHints:[]})}function search(instance,apiClient,context,value){value||layoutManager.tv?(instance.mode="search",context.querySelector(".searchSuggestions").classList.add("hide")):(instance.mode="suggestions",loadSuggestions(instance,context,apiClient)),"livetv"===instance.options.collectionType?searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"LiveTvProgram",IsMovie:!0,IsKids:!1,IsNews:!1},context,".movieResults",{preferThumb:!0,inheritThumb:!1,shape:enableScrollX()?"overflowPortrait":"portrait",showParentTitleOrTitle:!0,showTitle:!1,centerText:!0,coverImage:!0,overlayText:!1,overlayMoreButton:!0,showAirTime:!0,showAirDateTime:!0,showChannelName:!0}):searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"Movie"},context,".movieResults",{showTitle:!0,overlayText:!1,centerText:!0,showYear:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"Series"},context,".seriesResults",{showTitle:!0,overlayText:!1,centerText:!0,showYear:!0}),"livetv"===instance.options.collectionType?searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"LiveTvProgram",IsSeries:!0,IsSports:!1,IsKids:!1,IsNews:!1},context,".episodeResults",{preferThumb:!0,inheritThumb:!1,shape:enableScrollX()?"overflowBackdrop":"backdrop",showParentTitleOrTitle:!0,showTitle:!1,centerText:!0,coverImage:!0,overlayText:!1,overlayMoreButton:!0,showAirTime:!0,showAirDateTime:!0,showChannelName:!0}):searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"Episode"},context,".episodeResults",{coverImage:!0,showTitle:!0,showParentTitle:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"livetv"===instance.options.collectionType?"LiveTvProgram":"NullType",IsSports:!0},context,".sportsResults",{preferThumb:!0,inheritThumb:!1,shape:enableScrollX()?"overflowBackdrop":"backdrop",showParentTitleOrTitle:!0,showTitle:!1,centerText:!0,coverImage:!0,overlayText:!1,overlayMoreButton:!0,showAirTime:!0,showAirDateTime:!0,showChannelName:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"livetv"===instance.options.collectionType?"LiveTvProgram":"NullType",IsKids:!0},context,".kidsResults",{preferThumb:!0,inheritThumb:!1,shape:enableScrollX()?"overflowBackdrop":"backdrop",showParentTitleOrTitle:!0,showTitle:!1,centerText:!0,coverImage:!0,overlayText:!1,overlayMoreButton:!0,showAirTime:!0,showAirDateTime:!0,showChannelName:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"livetv"===instance.options.collectionType?"LiveTvProgram":"NullType",IsNews:!0},context,".newsResults",{preferThumb:!0,inheritThumb:!1,shape:enableScrollX()?"overflowBackdrop":"backdrop",showParentTitleOrTitle:!0,showTitle:!1,centerText:!0,coverImage:!0,overlayText:!1,overlayMoreButton:!0,showAirTime:!0,showAirDateTime:!0,showChannelName:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"LiveTvProgram",IsMovie:"livetv"!==instance.options.collectionType&&null,IsSeries:"livetv"!==instance.options.collectionType&&null,IsSports:"livetv"!==instance.options.collectionType&&null,IsKids:"livetv"!==instance.options.collectionType&&null,IsNews:"livetv"!==instance.options.collectionType&&null},context,".programResults",{preferThumb:!0,inheritThumb:!1,shape:enableScrollX()?"overflowBackdrop":"backdrop",showParentTitleOrTitle:!0,showTitle:!1,centerText:!0,coverImage:!0,overlayText:!1,overlayMoreButton:!0,showAirTime:!0,showAirDateTime:!0,showChannelName:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,MediaTypes:"Video",ExcludeItemTypes:"Movie,Episode"},context,".videoResults",{showParentTitle:!0,showTitle:!0,overlayText:!1,centerText:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!0,IncludeMedia:!1,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1},context,".peopleResults",{coverImage:!0,showTitle:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!1,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!0},context,".artistResults",{coverImage:!0,showTitle:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"MusicAlbum"},context,".albumResults",{showParentTitle:!0,showTitle:!0,overlayText:!1,centerText:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"Audio"},context,".songResults",{showParentTitle:!0,showTitle:!0,overlayText:!1,centerText:!0,action:"play"}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"Book"},context,".bookResults",{showTitle:!0,overlayText:!1,centerText:!0}),searchType(instance,apiClient,{searchTerm:value,IncludePeople:!1,IncludeMedia:!0,IncludeGenres:!1,IncludeStudios:!1,IncludeArtists:!1,IncludeItemTypes:"AudioBook"},context,".audioBookResults",{showTitle:!0,overlayText:!1,centerText:!0})}function searchType(instance,apiClient,query,context,section,cardOptions){query.UserId=apiClient.getCurrentUserId(),query.Limit=enableScrollX()?24:16,query.ParentId=instance.options.parentId,getSearchHints(instance,apiClient,query).then(function(result){populateResults(result,context,section,cardOptions)})}function populateResults(result,context,section,cardOptions){section=context.querySelector(section);var items=result.SearchHints,itemsContainer=section.querySelector(".itemsContainer");cardBuilder.buildCards(items,Object.assign({itemsContainer:itemsContainer,parentContainer:section,shape:enableScrollX()?"autooverflow":"auto",scalable:!0,overlayText:!1,centerText:!0,allowBottomPadding:!enableScrollX()},cardOptions||{})),section.querySelector(".emby-scroller").scrollToBeginning(!0)}function enableScrollX(){return!0}function replaceAll(originalString,strReplace,strWith){var reg=new RegExp(strReplace,"ig");return originalString.replace(reg,strWith)}function embed(elem,instance,options){require(["text!./searchresults.template.html"],function(template){enableScrollX()||(template=replaceAll(template,'data-horizontal="true"','data-horizontal="false"'),template=replaceAll(template,"itemsContainer scrollSlider","itemsContainer scrollSlider vertical-wrap"));var html=globalize.translateDocument(template,"sharedcomponents");elem.innerHTML=html,elem.classList.add("searchResults"),instance.search("")})}function SearchResults(options){this.options=options,embed(options.element,this,options)}return SearchResults.prototype.search=function(value){var apiClient=connectionManager.getApiClient(this.options.serverId);search(this,apiClient,this.options.element,value)},SearchResults.prototype.destroy=function(){var options=this.options;options&&options.element.classList.remove("searchFields"),this.options=null},SearchResults}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/shortcuts.js b/dashboard-ui/bower_components/emby-webcomponents/shortcuts.js index ffdde9de8b..5c76e46a2c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/shortcuts.js +++ b/dashboard-ui/bower_components/emby-webcomponents/shortcuts.js @@ -1 +1 @@ -define(["playbackManager","inputManager","connectionManager","appRouter","globalize","loading","dom","recordingHelper"],function(playbackManager,inputManager,connectionManager,appRouter,globalize,loading,dom,recordingHelper){"use strict";function playAllFromHere(card,serverId,queue){for(var startIndex,parent=card.parentNode,className=card.classList.length?"."+card.classList[0]:"",cards=parent.querySelectorAll(className+"[data-id]"),ids=[],foundCard=!1,i=0,length=cards.length;i Emby Premiere.", @@ -617,5 +618,6 @@ "LabelAudio": "Zvuk:", "LabelVideo": "Video:", "LabelSubtitles": "Titulky:", - "Off": "Vypnuto" + "Off": "Vypnuto", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/da.json b/dashboard-ui/bower_components/emby-webcomponents/strings/da.json index b6724f4c70..b145d26947 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/da.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/da.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "L\u00e5s op for dette feature med en lille enkeltst\u00e5ende betaling, eller med et aktivt Emby Premiere abonnement.", "MessageUnlockAppWithSupporter": "L\u00e5s op for dette feature med et aktivt Emby Premiere abonnement.", "MessageToValidateSupporter": "Hvis du har et aktivt Emby Premiere abonnement, skal du v\u00e6re sikker p\u00e5 at Emby Premiere er konfigureret i dit Emby Server-kontrolpanel, som kan tilg\u00e5es ved at klikke p\u00e5 Emby Premiere i hovedmenuen.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/de.json b/dashboard-ui/bower_components/emby-webcomponents/strings/de.json index b45f44066b..e4bc0ef7e1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/de.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/de.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Schalte diese Funktion mit einer kleinen einmaligen Geb\u00fchr oder einem aktiven Emby Premium Abo frei.", "MessageUnlockAppWithSupporter": "Schalte diese Funktion mit einem aktiven Emby Premium Abo frei.", "MessageToValidateSupporter": "Wenn du eine aktive Emby Premiere Mitgliedschaft hast, stelle bitte sicher, dass du diese \u00fcber das Emby Server Dashboard eingerichtet hast (Hauptmenu -> Emby Premiere).", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/el.json b/dashboard-ui/bower_components/emby-webcomponents/strings/el.json index e4c18088f6..a68fc10ff7 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/el.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/el.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "\u039e\u03b5\u03ba\u03bb\u03b5\u03b9\u03b4\u03ce\u03c3\u03c4\u03b5 \u03b1\u03c5\u03c4\u03cc \u03c4\u03bf \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc \u03ba\u03b1\u03c4\u03b1\u03b2\u03ac\u03bb\u03bf\u03bd\u03c4\u03b1\u03c2 \u03ad\u03bd\u03b1 \u03c0\u03bf\u03bb\u03cd \u03bc\u03b9\u03ba\u03c1\u03cc \u03ba\u03cc\u03c3\u03c4\u03bf\u03c2 \u03ae \u03bc\u03b5 \u03bc\u03af\u03b1 \u03b5\u03bd\u03b5\u03c1\u03b3\u03ae \u03c3\u03c5\u03bd\u03b4\u03c1\u03bf\u03bc\u03ae \u03c3\u03c4\u03bf Emby Premiere.", "MessageUnlockAppWithSupporter": "\u039e\u03b5\u03ba\u03bb\u03b5\u03b9\u03b4\u03ce\u03c3\u03c4\u03b5 \u03b1\u03c5\u03c4\u03cc \u03c4\u03bf \u03c7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc \u03bc\u03b5 \u03bc\u03af\u03b1 \u03b5\u03bd\u03b5\u03c1\u03b3\u03ae \u03c3\u03c5\u03bd\u03b4\u03c1\u03bf\u03bc\u03ae \u03c3\u03c4\u03bf Emby Premiere.", "MessageToValidateSupporter": "\u0391\u03bd \u03ad\u03c7\u03b5\u03c4\u03b5 \u03b5\u03bd\u03b5\u03c1\u03b3\u03ae \u03c3\u03c5\u03bd\u03b4\u03c1\u03bf\u03bc\u03ae Emby Premiere, \u03b2\u03b5\u03b2\u03b1\u03b9\u03c9\u03b8\u03b5\u03af\u03c4\u03b5 \u03cc\u03c4\u03b9 \u03ad\u03c7\u03b5\u03c4\u03b5 \u03c1\u03c5\u03b8\u03bc\u03af\u03c3\u03b5\u03b9 \u03c4\u03bf Emby Premiere \u03c3\u03c4\u03bf\u03bd \u03c0\u03af\u03bd\u03b1\u03ba\u03b1 \u03b5\u03bb\u03ad\u03b3\u03c7\u03bf\u03c5 \u03c4\u03bf\u03c5 Emby Server, \u03c3\u03c4\u03bf\u03bd \u03bf\u03c0\u03bf\u03af\u03bf \u03bc\u03c0\u03bf\u03c1\u03b5\u03af\u03c4\u03b5 \u03bd\u03b1 \u03ad\u03c7\u03b5\u03c4\u03b5 \u03c0\u03c1\u03cc\u03c3\u03b2\u03b1\u03c3\u03b7 \u03ba\u03ac\u03bd\u03bf\u03bd\u03c4\u03b1\u03c2 \u03ba\u03bb\u03b9\u03ba \u03c3\u03c4\u03bf Emby Premiere \u03c3\u03c4\u03bf \u03ba\u03cd\u03c1\u03b9\u03bf \u03bc\u03b5\u03bd\u03bf\u03cd.", @@ -617,5 +618,6 @@ "LabelAudio": "\u0389\u03c7\u03bf\u03c2:", "LabelVideo": "\u0392\u03af\u03bd\u03c4\u03b5\u03bf:", "LabelSubtitles": "\u03a5\u03c0\u03cc\u03c4\u03b9\u03c4\u03bb\u03bf\u03b9:", - "Off": "\u039a\u03bb\u03b5\u03b9\u03c3\u03c4\u03cc" + "Off": "\u039a\u03bb\u03b5\u03b9\u03c3\u03c4\u03cc", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/en-gb.json b/dashboard-ui/bower_components/emby-webcomponents/strings/en-gb.json index c15b1b5978..f7b8b219f0 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/en-gb.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/en-gb.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/en-us.json b/dashboard-ui/bower_components/emby-webcomponents/strings/en-us.json index 656b81b37e..08fdbc43aa 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/en-us.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/en-us.json @@ -617,5 +617,8 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/es-ar.json b/dashboard-ui/bower_components/emby-webcomponents/strings/es-ar.json index 67681668b7..c9ea0b63da 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es-ar.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es-ar.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/es-mx.json b/dashboard-ui/bower_components/emby-webcomponents/strings/es-mx.json index c53ffbbd93..680ecc6719 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es-mx.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es-mx.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Desbloquee esta caracter\u00edstica con una peque\u00f1a compra \u00fanica, o con una suscripci\u00f3n activa de Emby Premier.", "MessageUnlockAppWithSupporter": "Desbloquee esta caracter\u00edstica con una suscripci\u00f3n activa de Emby Premier.", "MessageToValidateSupporter": "Si tiene una subscripci\u00f3n de Emby Premiere activa, aseg\u00farese de que ha configurado Emby Premiere en el Panel de Control del Servidor Emby, al cual puede acceder dando click en Emby Premiere dentro del men\u00fa principal.", @@ -334,7 +335,7 @@ "LabelChannels": "Canales:", "ChannelNameOnly": "Canal {0} solamente", "Anytime": "En cualquier momento", - "AnyLanguage": "Any language", + "AnyLanguage": "Cualquier lenguaje", "AroundTime": "Alrededor de {0}", "All": "Todo", "AllChannels": "Todos los canales", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subt\u00edtulos:", - "Off": "Apagar" + "Off": "Apagar", + "ShowTitles": "Mostrar t\u00edtulos" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/es.json b/dashboard-ui/bower_components/emby-webcomponents/strings/es.json index 45fdb8517f..5ee8df122c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Desbloquea esta caracter\u00edstica con una peque\u00f1a compra una vez o con una suscripci\u00f3n a Emby Premiere.", "MessageUnlockAppWithSupporter": "Desbloquea esta caracter\u00edstica con una suscripci\u00f3n a Emby Premiere.", "MessageToValidateSupporter": "Si tienes una suscripci\u00f3n a Emby Premiere aseg\u00farate de que la has configurado en el Panel de Control de tu servidor Emby en Ayuda -> Emby Premiere.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json b/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json index ca8a57a891..edce814694 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/fr-ca.json b/dashboard-ui/bower_components/emby-webcomponents/strings/fr-ca.json index 4299c84269..aa1d12be60 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/fr-ca.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/fr-ca.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "D\u00e9verrouillez cette fonctionnalit\u00e9 avec un petit achat unique ou avec un abonnement Emby Premiere actif.", "MessageUnlockAppWithSupporter": "D\u00e9verrouillez cette fonctionnalit\u00e9 avec un abonnement Emby Premi\u00e8re actif.", "MessageToValidateSupporter": "Si vous avez un abonnement Emby Premi\u00e8re actif, assurez-vous d'avoir install\u00e9 Emby Premi\u00e8re sur le tableau de bord de votre serveur Emby, auquel vous pouvez acc\u00e9der en cliquant sur Emby Premi\u00e8re dans le menu principal.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json b/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json index e6809b07cc..424d100afe 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Montrer le titre", "MessageUnlockAppWithPurchaseOrSupporter": "D\u00e9verrouillez cette fonctionnalit\u00e9 avec un petit achat unique, ou avec un abonnement Emby Premiere.", "MessageUnlockAppWithSupporter": "D\u00e9verrouillez cette fonctionnalit\u00e9 avec un abonnement Emby Premiere.", "MessageToValidateSupporter": "Si vous avez un abonnement Emby Premiere, veuillez vous assurer que vous avez configur\u00e9 Emby Premiere dans le tableau de bord de votre serveur Emby auquel vous pouvez acc\u00e9der en cliquant sur Emby Premiere dans le menu principal", @@ -334,7 +335,7 @@ "LabelChannels": "Cha\u00eenes\u00a0:", "ChannelNameOnly": "Seulement la cha\u00eene {0}", "Anytime": "N'importe quand", - "AnyLanguage": "Any language", + "AnyLanguage": "N'importe quel langage", "AroundTime": "Aux environs de {0}", "All": "Tout", "AllChannels": "Toutes les cha\u00eenes", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Vid\u00e9o:", "LabelSubtitles": "Sous-titres:", - "Off": "D\u00e9sactiv\u00e9s" + "Off": "D\u00e9sactiv\u00e9s", + "ShowTitles": "Afficher les titres" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json b/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json index b50f92f04c..a46ebe3168 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/he.json b/dashboard-ui/bower_components/emby-webcomponents/strings/he.json index d70cdf0e35..e435786e1a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/he.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/he.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "\u05e0\u05e2\u05d9\u05dc\u05ea \u05ea\u05db\u05d5\u05e0\u05d4 \u05d6\u05d5 \u05e2\u05dd \u05e8\u05db\u05d9\u05e9\u05d4 \u05d7\u05d3 \u05e4\u05e2\u05de\u05d9\u05ea \u05e7\u05d8\u05e0\u05d4, \u05d0\u05d5 \u05e2\u05dd \u05de\u05e0\u05d5\u05d9 \u05e4\u05e2\u05d9\u05dc Premiere \u05d0\u05de\u05d1\u05d9.", "MessageUnlockAppWithSupporter": "\u05d1\u05d9\u05d8\u05d5\u05dc \u05e0\u05e2\u05d9\u05dc\u05d4 \u05e9\u05dc \u05ea\u05db\u05d5\u05e0\u05d4 \u05d6\u05d5 \u05e2\u05dd \u05de\u05e0\u05d5\u05d9 \u05e4\u05e2\u05d9\u05dc \u05e9\u05dc Emby Premiere.", "MessageToValidateSupporter": "\u05d0\u05dd \u05d9\u05e9 \u05dc\u05da \u05de\u05e0\u05d5\u05d9 \u05e4\u05e2\u05d9\u05dc \u05e9\u05dc Emby Premiere, \u05d5\u05d3\u05d0 \u05e9\u05d4\u05d2\u05d3\u05e8\u05ea \u05d0\u05ea Emby Premiere \u05d1\u05de\u05e8\u05db\u05d6 \u05d4\u05e9\u05dc\u05d9\u05d8\u05d4 \u05e9\u05dc \u200b\u200b\u05d0\u05de\u05d1\u05d9 \u05e9\u05e8\u05ea, \u05e9\u05d1\u05d5 \u05d1\u05d0\u05e4\u05e9\u05e8\u05d5\u05ea\u05da \u05dc\u05d2\u05e9\u05ea \u05e2\u05dc-\u05d9\u05d3\u05d9 \u05dc\u05d7\u05d9\u05e6\u05d4 \u05e2\u05dc Emby Premiere \u05d1\u05ea\u05e4\u05e8\u05d9\u05d8 \u05d4\u05e8\u05d0\u05e9\u05d9.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json b/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json index 9ebe16f1ce..785a5196b8 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Otklju\u010daj ovu mogu\u0107nost s malom jednokratnom kupnjom ili s aktivnom pretplatom Emby Premijere.", "MessageUnlockAppWithSupporter": "Otklju\u010daj ovu mogu\u0107nost sa pretplatom Emby Premijere.", "MessageToValidateSupporter": "Ako imate aktivnu pretplatu Emby Premijere provjerite dali ste postavili Emby Premijeru u svojoj nadzornoj plo\u010di Emby Server-a kojoj mo\u017eete pristupiti klikom Emby Premijera u glavnom izborniku.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json b/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json index ff5e51f03f..441a42ccf9 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/id.json b/dashboard-ui/bower_components/emby-webcomponents/strings/id.json index 537f2a0c53..f2c6ff5fa3 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/id.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/id.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/it.json b/dashboard-ui/bower_components/emby-webcomponents/strings/it.json index f44c28e3d8..84a9157834 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/it.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/it.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Sblocca questa funzionalit\u00e0 con un piccolo acquisto singolo, o con un abbonamento Emby Premiere.", "MessageUnlockAppWithSupporter": "Sblocca questa funzionalit\u00e0 con un abbonamento Emby Premiere", "MessageToValidateSupporter": "Se hai un abbonamento Emby Premiere, assicurati di averlo configurato nel Pannello di Controllo del Server, a cui puoi accedere cliccando su Emby Premiere dal menu principale.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Sottotitoli:", - "Off": "Spento" + "Off": "Spento", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json index e6b74a69ef..eed56fc420 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "\u041e\u0441\u044b \u049b\u04b1\u0440\u0430\u043c\u0434\u0430\u0441\u0442\u044b \u0431\u0456\u0440 \u0436\u043e\u043b\u0493\u044b \u0441\u0430\u0442\u044b\u043f \u0430\u043b\u0443, \u043d\u0435\u043c\u0435\u0441\u0435 \u0431\u0435\u043b\u0441\u0435\u043d\u0434\u0456 Emby Premiere \u0436\u0430\u0437\u044b\u043b\u044b\u043c\u044b \u0430\u0440\u049b\u044b\u043b\u044b \u049b\u04b1\u0440\u0441\u0430\u0443\u0434\u0430\u043d \u0431\u043e\u0441\u0430\u0442\u0443.", "MessageUnlockAppWithSupporter": "\u041e\u0441\u044b \u049b\u04b1\u0440\u0430\u043c\u0434\u0430\u0441\u0442\u044b \u0431\u0435\u043b\u0441\u0435\u043d\u0434\u0456 Emby Premiere \u0436\u0430\u0437\u044b\u043b\u044b\u043c\u044b \u0430\u0440\u049b\u044b\u043b\u044b \u049b\u04b1\u0440\u0441\u0430\u0443\u0434\u0430\u043d \u0431\u043e\u0441\u0430\u0442\u0443.", "MessageToValidateSupporter": "\u0415\u0433\u0435\u0440 \u0441\u0456\u0437\u0434\u0435 \u0431\u0435\u043b\u0441\u0435\u043d\u0434\u0456 Emby Premiere \u0436\u0430\u0437\u044b\u043b\u044b\u043c\u044b \u0431\u043e\u043b\u0441\u0430, Emby Server \u0442\u0430\u049b\u0442\u0430\u0441\u044b\u043d\u0434\u0430\u0493\u044b Emby Premiere \u043e\u0440\u043d\u0430\u0442\u044b\u043b\u044b\u043f \u0442\u0435\u04a3\u0448\u0435\u043b\u0433\u0435\u043d\u0456\u043d\u0435 \u043a\u04e9\u0437 \u0436\u0435\u0442\u043a\u0456\u0437\u0456\u04a3\u0456\u0437. \u0411\u04b1\u043b \u0431\u0430\u0441\u0442\u044b \u043c\u04d9\u0437\u0456\u0440\u0434\u0435 Emby Premiere \u0434\u0435\u0433\u0435\u043d\u0434\u0456 \u043d\u04b1\u049b\u044b\u043f \u049b\u0430\u0442\u044b\u043d\u0430\u0443\u043b\u044b.", @@ -334,7 +335,7 @@ "LabelChannels": "\u0410\u0440\u043d\u0430\u043b\u0430\u0440:", "ChannelNameOnly": "\u0422\u0435\u043a \u049b\u0430\u043d\u0430 {0} \u0430\u0440\u043d\u0430\u0441\u044b", "Anytime": "\u04d8\u0440\u043a\u0435\u0437\u0434\u0435", - "AnyLanguage": "Any language", + "AnyLanguage": "\u049a\u0430\u0439-\u049b\u0430\u0439\u0441\u044b \u0442\u0456\u043b", "AroundTime": "{0} \u0430\u0439\u043d\u0430\u043b\u0430\u0441\u044b\u043d\u0434\u0430", "All": "\u0411\u04d9\u0440\u0456", "AllChannels": "\u0411\u0430\u0440\u043b\u044b\u049b \u0430\u0440\u043d\u0430\u043b\u0430\u0440", @@ -617,5 +618,6 @@ "LabelAudio": "\u0414\u044b\u0431\u044b\u0441:", "LabelVideo": "\u0411\u0435\u0439\u043d\u0435:", "LabelSubtitles": "\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u043b\u0435\u0440:", - "Off": "\u04e8\u0448\u0456\u0440" + "Off": "\u04e8\u0448\u0456\u0440", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json index 5c3a9b91eb..334d9a7095 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/lt-lt.json b/dashboard-ui/bower_components/emby-webcomponents/strings/lt-lt.json index 0b02e5af7c..6bbd97a725 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/lt-lt.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/lt-lt.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Atrakinkite \u0161i\u0105 funkcij\u0105 nedideliu vienkartiniu mokes\u010diu arba \u012fsigij\u0119 Emby Premiere prenumerat\u0105.", "MessageUnlockAppWithSupporter": "Atrakinkite \u0161i\u0105 funkcij\u0105 \u012fsigij\u0119 Emby Premiere prenumerat\u0105.", "MessageToValidateSupporter": "Jei turite aktyvi\u0105 Emby Premiere prenumerat\u0105, sutvarkykite Emby Premiere savo Emby Serverio skydelyje. Tai galite atlikti paspaud\u0117 Emby Premiere u\u017era\u0161\u0105 pagrindiniame meniu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json index 8cdd0e82ce..977d41a1bb 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json b/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json index 6f5133e204..77807348a8 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "L\u00e5s opp denne funksjonen med et engangskj\u00f8p, eller med et aktivt Emby Premiere abonnement.", "MessageUnlockAppWithSupporter": "L\u00e5s opp denne funksjonen med et aktivt Emby Premiere abonnement.", "MessageToValidateSupporter": "Hvis du har et aktivt Emby Premiere-abonnement, m\u00e5 du s\u00f8rge for at du har konfigurert Emby Premiere i Emby Server Dashboard, som du f\u00e5r tilgang til ved \u00e5 klikke Emby Premiere i hovedmenyen.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json b/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json index 2069e5d54c..4b10fa30e7 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Ontgrendel deze functie met een kleine eenmalige aankoop, of met een actief Emby Premiere abonnement.", "MessageUnlockAppWithSupporter": "Ontgrendel deze functie met een actief Emby Premiere abonnement.", "MessageToValidateSupporter": "Als u een actieve Emby Premiere abonnement heeft, zorg er dan voor dat u deze activeert in uw Emby Server Dashboard door te klikken op Emby Premiere in het hoofdmenu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json b/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json index c74e58a5b1..4f6c7fd5a3 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Odblokuj t\u0119 funkcj\u0119, za niewielk\u0105 jednorazow\u0105 op\u0142at\u0105 lub przy u\u017cyciu aktywnej subskrypcji Emby Premium.", "MessageUnlockAppWithSupporter": "Odblokuj t\u0119 funkcj\u0119 przy u\u017cyciu subskrypcji Emby Premium.", "MessageToValidateSupporter": "Je\u015bli posiadasz aktywn\u0105 subskrypcj\u0119 Emby Premium, upewnij si\u0119, \u017ce j\u0105 poprawnie skonfigurowa\u0142e\u015b przy pomocy Kokpitu serwera Emby, do kt\u00f3rego mo\u017cesz uzyska\u0107 dost\u0119p, klikaj\u0105c na pozycj\u0119 Premium menu startowego.", @@ -334,7 +335,7 @@ "LabelChannels": "Kana\u0142y:", "ChannelNameOnly": "Tylko kana\u0142 {0}", "Anytime": "O dowolnej porze", - "AnyLanguage": "Any language", + "AnyLanguage": "W dowolnym j\u0119zyku", "AroundTime": "Oko\u0142o {0}", "All": "Wszystkie", "AllChannels": "Wszystkie kana\u0142y", @@ -617,5 +618,6 @@ "LabelAudio": "D\u017awi\u0119k:", "LabelVideo": "Wideo:", "LabelSubtitles": "Napisy:", - "Off": "Wy\u0142\u0105czone" + "Off": "Wy\u0142\u0105czone", + "ShowTitles": "Pokazuj tytu\u0142y" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-br.json b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-br.json index bc21df5b9e..215ffaf3d1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-br.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-br.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Desbloqueie esta funcionalidade com uma pequena compra \u00fanica, ou com uma assinatura ativa do Emby Premiere.", "MessageUnlockAppWithSupporter": "Desbloqueie esta funcionalidade com uma assinatura ativa do Emby Premiere.", "MessageToValidateSupporter": "Se tiver uma assinatura ativa do Emby Premiere, assegure-se que configurou o Emby Premiere no Painel do Servidor Emby, que pode ser acessado clicando Emby Premiere no menu principal.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-pt.json b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-pt.json index 8d12e8d1dd..9da89ea3b1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-pt.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-pt.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json index ed38250d3f..f644248250 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json index d5456158f2..d3d7343257 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u044b, \u0438\u043b\u0438 \u0441 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u043e\u0439 Emby Premiere .", "MessageUnlockAppWithSupporter": "\u0420\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0439\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u043e\u0439 Emby Premiere.", "MessageToValidateSupporter": "\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 Emby Premiere, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e Emby Premiere \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0432 \u0432\u0430\u0448\u0435\u0439 \u041f\u0430\u043d\u0435\u043b\u0438 Emby Server, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e \u0449\u0435\u043b\u0447\u043a\u0443 \u043f\u043e Emby Premiere \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u043c\u0435\u043d\u044e.", @@ -334,7 +335,7 @@ "LabelChannels": "\u041a\u0430\u043d\u0430\u043b\u044b:", "ChannelNameOnly": "\u0422\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043d\u0430\u043b {0}", "Anytime": "\u0412 \u043b\u044e\u0431\u043e\u0435 \u0432\u0440\u0435\u043c\u044f", - "AnyLanguage": "Any language", + "AnyLanguage": "\u041b\u044e\u0431\u043e\u0439 \u044f\u0437\u044b\u043a", "AroundTime": "\u041e\u043a\u043e\u043b\u043e {0}", "All": "\u0412\u0441\u0435", "AllChannels": "\u0412\u0441\u0435 \u043a\u0430\u043d\u0430\u043b\u044b", @@ -617,5 +618,6 @@ "LabelAudio": "\u0410\u0443\u0434\u0438\u043e:", "LabelVideo": "\u0412\u0438\u0434\u0435\u043e:", "LabelSubtitles": "\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b:", - "Off": "\u0412\u044b\u043a\u043b" + "Off": "\u0412\u044b\u043a\u043b", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json index cb4542b0d3..7e59bc386a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -587,7 +588,7 @@ "ValueSeconds": "{0} sek\u00fand", "HeaderAudioSettings": "Nastavenia zvuku", "LabelAudioLanguagePreference": "Uprednost\u0148ovan\u00fd jazyk zvuku:", - "LabelPlayDefaultAudioTrack": "Play default audio track regardless of language", + "LabelPlayDefaultAudioTrack": "Prehra\u0165 predvolen\u00fa zvukov\u00fa stopu bez oh\u013eadu na jazyk", "HeaderVideoQuality": "Kvalita videa", "CinemaModeConfigurationHelp": "Cinema mode brings the theater experience straight to your living room with the ability to play trailers and custom intros before the main feature.", "EnableNextVideoInfoOverlay": "Enable next video info during playback", @@ -603,7 +604,7 @@ "HeaderLatestMedia": "Najnov\u0161ie m\u00e9di\u00e1", "HeaderRestartingEmbyServer": "Emby Server sa re\u0161tartuje", "RestartPleaseWaitMessage": "Po\u010dkajte pros\u00edm k\u00fdm sa Emby Server vypne a znova na\u0161tartuje. M\u00f4\u017ee to trva\u0165 min\u00fatu alebo dve.", - "PlayNext": "Play next", + "PlayNext": "Prehra\u0165 \u010fal\u0161ie", "AllowSeasonalThemes": "Allow automatic seasonal themes", "AllowSeasonalThemesHelp": "If enabled, seasonal themes will occasionally override your theme setting.", "AutoBasedOnLanguageSetting": "Auto (based on language setting)", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Titulky:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/sl-si.json b/dashboard-ui/bower_components/emby-webcomponents/strings/sl-si.json index ac35e31ef0..e86da3123b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/sl-si.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/sl-si.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json b/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json index 69480a7641..c4d9c9c809 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "L\u00e5s upp denna feature med ett eng\u00e5ngsk\u00f6p, eller med ett aktivt Emby Premium-medlemskap.", "MessageUnlockAppWithSupporter": "L\u00e5s upp den h\u00e4r funktionen med en aktiv Emby Premium prenumeration.", "MessageToValidateSupporter": "Om du har ett aktivt Emby Premium-medlemskap, se till att du har st\u00e4llt in Emby Premium i Emby Server Dashboard, som du kommer \u00e5t genom att klicka p\u00e5 Emby Premium i huvudmenyn.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json b/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json index dca8b50316..442318cd08 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json index d5492cf518..448510aed9 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json b/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json index 03b4026636..88279d0dba 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-cn.json b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-cn.json index 2c310cd5a0..8eb6141457 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-cn.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-cn.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-hk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-hk.json index a4709b5e4c..d726435767 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-hk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-hk.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-tw.json b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-tw.json index 73bbdeee19..b4901ff54c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-tw.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-tw.json @@ -1,4 +1,5 @@ { + "ShowTitle": "Show title", "MessageUnlockAppWithPurchaseOrSupporter": "Unlock this feature with a small one-time purchase, or with an active Emby Premiere subscription.", "MessageUnlockAppWithSupporter": "Unlock this feature with an active Emby Premiere subscription.", "MessageToValidateSupporter": "If you have an active Emby Premiere subscription, ensure you've setup Emby Premiere in your Emby Server Dashboard, which you can access by clicking Emby Premiere within the main menu.", @@ -617,5 +618,6 @@ "LabelAudio": "Audio:", "LabelVideo": "Video:", "LabelSubtitles": "Subtitles:", - "Off": "Off" + "Off": "Off", + "ShowTitles": "Show titles" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/tabbedview/itemstab.js b/dashboard-ui/bower_components/emby-webcomponents/tabbedview/itemstab.js new file mode 100644 index 0000000000..9ed21044b3 --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/tabbedview/itemstab.js @@ -0,0 +1 @@ +define(["userSettings","alphaPicker","alphaNumericShortcuts","connectionManager","focusManager"],function(userSettings,AlphaPicker,AlphaNumericShortcuts,connectionManager,focusManager){"use strict";function trySelectValue(instance,scroller,view,value){var card;if("#"===value&&(card=view.querySelector(".card")))return void scroller.toStart(card,!1);if(card=view.querySelector(".card[data-prefix^='"+value+"']"))return void scroller.toStart(card,!1);var values=instance.alphaPicker.values(),index=values.indexOf(value);if(indexoption{color:inherit}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#52B54B}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline>.checkboxOutlineTick,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuDivider{background:#202020;background:rgba(255,255,255,.12)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv,.emby-tab-button.emby-button-tv:focus{color:#fff}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#383838}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#555!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-currentTimeIndicatorArrow,.guide-currentTimeIndicatorBar{background-color:#52B54B}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#191919));background:-webkit-linear-gradient(rgba(0,0,0,0),#191919);background:-o-linear-gradient(rgba(0,0,0,0),#191919);background:linear-gradient(rgba(0,0,0,0),#191919)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888} \ No newline at end of file +html{color:#eee;color:rgba(255,255,255,.87)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.skinHeader-withBackground{background-color:#52B54B;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));-webkit-box-shadow:none;box-shadow:none}.pageTitleWithDefaultLogo{background-image:url(logo.png)}.backgroundContainer,.dialog{background-color:#282828}.backgroundContainer.withBackdrop{background-color:rgba(12,12,12,.9)}.paper-icon-button-light:focus{color:#52B54B}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff}.fab,.raised{background:#404040;color:#fff}.button-accent,.button-submit{background:#52B54B;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.selectLabelUnfocused,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#52B54B}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even),.listItem-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem:focus{background:#333}.progressring-spiner{border-color:#52B54B}.button-flat-accent,.button-link{color:#52B54B}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c}.emby-select-withcolor>option{color:inherit}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#52B54B}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline>.checkboxOutlineTick,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuDivider{background:#202020;background:rgba(255,255,255,.12)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv,.emby-tab-button.emby-button-tv:focus{color:#fff}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#383838}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#555!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-currentTimeIndicatorArrow,.guide-currentTimeIndicatorBar{background-color:#52B54B}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#191919));background:-webkit-linear-gradient(rgba(0,0,0,0),#191919);background:-o-linear-gradient(rgba(0,0,0,0),#191919);background:linear-gradient(rgba(0,0,0,0),#191919)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888} \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/themes/dark-red/theme.css b/dashboard-ui/bower_components/emby-webcomponents/themes/dark-red/theme.css index a47f40465f..4699c00805 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/themes/dark-red/theme.css +++ b/dashboard-ui/bower_components/emby-webcomponents/themes/dark-red/theme.css @@ -1 +1 @@ -html{color:#eee;color:rgba(255,255,255,.87)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.skinHeader-withBackground{background-color:#c33;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));-webkit-box-shadow:none;box-shadow:none}.pageTitleWithDefaultLogo{background-image:url(logo.png)}.backgroundContainer,.dialog{background-color:#282828}.backgroundContainer.withBackdrop{background-color:rgba(12,12,12,.9)}.paper-icon-button-light:focus{color:#c33}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff}.fab,.raised{background:#404040;color:#fff}.button-accent,.button-submit{background:#c33;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.selectLabelUnfocused,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#c33}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #c33}.selectionCommandsPanel{background:#c33;color:#fff}.upNextDialog-countdownText{color:#c33}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#c33;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even),.listItem-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem:focus{background:#333}.progressring-spiner{border-color:#c33}.button-flat-accent,.button-link{color:#c33}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#c33}.emby-select-withcolor{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c}.emby-select-withcolor>option{color:inherit}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#c33}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(204,51,51,.26)}.emby-checkbox:checked+span+span+.checkboxOutline>.checkboxOutlineTick,.itemProgressBarForeground{background-color:#c33}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.playedIndicator{background:#c33}.fullSyncIndicator{background:#c33;color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuDivider{background:#202020;background:rgba(255,255,255,.12)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#c33!important;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv,.emby-tab-button.emby-button-tv:focus{color:#fff}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#383838}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#555!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-currentTimeIndicatorArrow,.guide-currentTimeIndicatorBar{background-color:#c33}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#c33}.guide-date-tab-button.emby-button-tv:focus{background-color:#c33;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#191919));background:-webkit-linear-gradient(rgba(0,0,0,0),#191919);background:-o-linear-gradient(rgba(0,0,0,0),#191919);background:linear-gradient(rgba(0,0,0,0),#191919)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#c33}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888} \ No newline at end of file +html{color:#eee;color:rgba(255,255,255,.87)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.skinHeader-withBackground{background-color:#c33;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));-webkit-box-shadow:none;box-shadow:none}.pageTitleWithDefaultLogo{background-image:url(logo.png)}.backgroundContainer,.dialog{background-color:#282828}.backgroundContainer.withBackdrop{background-color:rgba(12,12,12,.9)}.paper-icon-button-light:focus{color:#c33}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff}.fab,.raised{background:#404040;color:#fff}.button-accent,.button-submit{background:#c33;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.selectLabelUnfocused,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#c33}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #c33}.selectionCommandsPanel{background:#c33;color:#fff}.upNextDialog-countdownText{color:#c33}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#c33;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even),.listItem-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem:focus{background:#333}.progressring-spiner{border-color:#c33}.button-flat-accent,.button-link{color:#c33}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#c33}.emby-select-withcolor{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c}.emby-select-withcolor>option{color:inherit}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#c33}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(204,51,51,.26)}.emby-checkbox:checked+span+span+.checkboxOutline>.checkboxOutlineTick,.itemProgressBarForeground{background-color:#c33}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.playedIndicator{background:#c33}.fullSyncIndicator{background:#c33;color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuDivider{background:#202020;background:rgba(255,255,255,.12)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#c33!important;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active,.emby-tab-button-active.emby-button-tv,.emby-tab-button.emby-button-tv:focus{color:#fff}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#383838}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#555!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-currentTimeIndicatorArrow,.guide-currentTimeIndicatorBar{background-color:#c33}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#c33}.guide-date-tab-button.emby-button-tv:focus{background-color:#c33;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#191919));background:-webkit-linear-gradient(rgba(0,0,0,0),#191919);background:-o-linear-gradient(rgba(0,0,0,0),#191919);background:linear-gradient(rgba(0,0,0,0),#191919)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#c33}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888} \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/themes/dark/theme.css b/dashboard-ui/bower_components/emby-webcomponents/themes/dark/theme.css index 640621014a..68f16448ab 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/themes/dark/theme.css +++ b/dashboard-ui/bower_components/emby-webcomponents/themes/dark/theme.css @@ -1 +1 @@ -html{color:#eee;color:rgba(255,255,255,.87)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.skinHeader-withBackground{background-color:#181818;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));-webkit-box-shadow:none;box-shadow:none}.pageTitleWithDefaultLogo{background-image:url(logo.png)}.backgroundContainer,.dialog{background-color:#282828}.backgroundContainer.withBackdrop{background-color:rgba(12,12,12,.9)}.paper-icon-button-light:focus{color:#52B54B}.fab,.raised{background:#404040;color:#fff}.button-accent,.button-submit{background:#52B54B;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.selectLabelUnfocused,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#52B54B}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even),.listItem-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem:focus{background:#333}.progressring-spiner{border-color:#52B54B}.button-flat-accent,.button-link{color:#52B54B}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c}.emby-select-withcolor>option{color:inherit}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#52B54B}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline>.checkboxOutlineTick,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuDivider{background:#202020;background:rgba(255,255,255,.12)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.4)}.emby-tab-button-active{color:#52B54B}.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#52B54B}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#383838}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#555!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-currentTimeIndicatorArrow,.guide-currentTimeIndicatorBar{background-color:#52B54B}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#191919));background:-webkit-linear-gradient(rgba(0,0,0,0),#191919);background:-o-linear-gradient(rgba(0,0,0,0),#191919);background:linear-gradient(rgba(0,0,0,0),#191919)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888} \ No newline at end of file +html{color:#eee;color:rgba(255,255,255,.87)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.skinHeader-withBackground{background-color:#181818;-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));-webkit-box-shadow:none;box-shadow:none}.pageTitleWithDefaultLogo{background-image:url(logo.png)}.backgroundContainer,.dialog{background-color:#282828}.backgroundContainer.withBackdrop{background-color:rgba(12,12,12,.9)}.paper-icon-button-light:focus{color:#52B54B}.fab,.raised{background:#404040;color:#fff}.button-accent,.button-submit{background:#52B54B;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.selectLabelUnfocused,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#52B54B}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even),.listItem-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem:focus{background:#333}.progressring-spiner{border-color:#52B54B}.button-flat-accent,.button-link{color:#52B54B}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:#1c1c1c;border:.07em solid #1c1c1c}.emby-select-withcolor>option{color:inherit}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#52B54B}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline>.checkboxOutlineTick,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuDivider{background:#202020;background:rgba(255,255,255,.12)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.4)}.emby-tab-button-active{color:#52B54B}.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#52B54B}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#383838}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#555!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-currentTimeIndicatorArrow,.guide-currentTimeIndicatorBar{background-color:#52B54B}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#191919));background:-webkit-linear-gradient(rgba(0,0,0,0),#191919);background:-o-linear-gradient(rgba(0,0,0,0),#191919);background:linear-gradient(rgba(0,0,0,0),#191919)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888} \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/themes/halloween/theme.css b/dashboard-ui/bower_components/emby-webcomponents/themes/halloween/theme.css index a6d5c9d918..774b27f88e 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/themes/halloween/theme.css +++ b/dashboard-ui/bower_components/emby-webcomponents/themes/halloween/theme.css @@ -1 +1 @@ -@import url(https://fonts.googleapis.com/css?family=Eater);h1,h2{font-family:Eater;font-weight:400!important}h1{font-size:1.566em!important}h2{font-size:1.305em!important}.sectionTabs button,.userViewNames .btnUserViewHeader{font-family:Eater!important;font-size:87%!important}html{color:#eee;color:rgba(255,255,255,.87)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.skinHeader-withBackground{background-color:#202020}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(logo.png)}.backgroundContainer,.dialog{background-color:#1a1a1a}.backgroundContainer.withBackdrop{background-color:rgba(12,12,12,.9)}.paper-icon-button-light:focus{color:#FF9100}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff}.fab,.raised{background:#404040;color:#fff}.button-accent,.button-submit{background:#FF9100;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.selectLabelUnfocused,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#FF9100}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #FF9100}.selectionCommandsPanel{background:#FF9100;color:#fff}.upNextDialog-countdownText{color:#FF9100}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#FF9100;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even),.listItem-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem:focus{background:#333}.progressring-spiner{border-color:#FF9100}.button-flat-accent,.button-link{color:#FF9100}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#262626;border:.07em solid #262626;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#FF9100}.emby-select-withcolor{color:inherit;background:#262626;border:.07em solid #262626}.emby-select-withcolor>option{color:inherit}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#FF9100}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(204,51,51,.26)}.emby-checkbox:checked+span+span+.checkboxOutline>.checkboxOutlineTick,.itemProgressBarForeground{background-color:#FF9100}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#FF9100}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuDivider{background:#262626;background:rgba(255,255,255,.12)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#FF9100!important;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active{color:#FF9100}.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#FF9100}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#282828}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#555!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-currentTimeIndicatorArrow,.guide-currentTimeIndicatorBar{background-color:#52B54B}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#191919));background:-webkit-linear-gradient(rgba(0,0,0,0),#191919);background:-o-linear-gradient(rgba(0,0,0,0),#191919);background:linear-gradient(rgba(0,0,0,0),#191919)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#FF9100}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#FF9100}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#FF9100}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888}.btnUserViewHeader:focus{color:#FF9100!important}.btnUserViewHeader:focus .userViewButtonText{border-bottom-color:#FF9100!important}.emby-button:focus:not(.btnUserViewHeader):not(.emby-tab-button){background:#FF9100} \ No newline at end of file +@import url(https://fonts.googleapis.com/css?family=Eater);h1,h2{font-family:Eater;font-weight:400!important}h1{font-size:1.566em!important}h2{font-size:1.305em!important}.sectionTabs button,.userViewNames .btnUserViewHeader{font-family:Eater!important;font-size:87%!important}html{color:#eee;color:rgba(255,255,255,.87)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader{color:#ccc;color:rgba(255,255,255,.78)}.skinHeader-withBackground{background-color:#202020}.osdHeader{-webkit-box-shadow:none!important;box-shadow:none!important}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(logo.png)}.backgroundContainer,.dialog{background-color:#1a1a1a}.backgroundContainer.withBackdrop{background-color:rgba(12,12,12,.9)}.paper-icon-button-light:focus{color:#FF9100}.skinHeader-withBackground .paper-icon-button-light:focus{color:#fff}.fab,.raised{background:#404040;color:#fff}.button-accent,.button-submit{background:#FF9100;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.selectLabelUnfocused,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#FF9100}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #FF9100}.selectionCommandsPanel{background:#FF9100;color:#fff}.upNextDialog-countdownText{color:#FF9100}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#FF9100;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even),.listItem-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem:focus{background:#333}.progressring-spiner{border-color:#FF9100}.button-flat-accent,.button-link{color:#FF9100}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#262626;border:.07em solid #262626;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#FF9100}.emby-select-withcolor{color:inherit;background:#262626;border:.07em solid #262626}.emby-select-withcolor>option{color:inherit}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#FF9100}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(204,51,51,.26)}.emby-checkbox:checked+span+span+.checkboxOutline>.checkboxOutlineTick,.itemProgressBarForeground{background-color:#FF9100}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#FF9100}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuDivider{background:#262626;background:rgba(255,255,255,.12)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#FF9100!important;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.5)}.emby-tab-button-active{color:#FF9100}.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#FF9100}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#282828}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#555!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-currentTimeIndicatorArrow,.guide-currentTimeIndicatorBar{background-color:#52B54B}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#191919));background:-webkit-linear-gradient(rgba(0,0,0,0),#191919);background:-o-linear-gradient(rgba(0,0,0,0),#191919);background:linear-gradient(rgba(0,0,0,0),#191919)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#FF9100}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#FF9100}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#FF9100}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888}.btnUserViewHeader:focus{color:#FF9100!important}.btnUserViewHeader:focus .userViewButtonText{border-bottom-color:#FF9100!important}.emby-button:focus:not(.btnUserViewHeader):not(.emby-tab-button){background:#FF9100} \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/themes/verydark/theme.css b/dashboard-ui/bower_components/emby-webcomponents/themes/verydark/theme.css index 8c557e80c5..0eee8c9bac 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/themes/verydark/theme.css +++ b/dashboard-ui/bower_components/emby-webcomponents/themes/verydark/theme.css @@ -1 +1 @@ -html{color:#ddd;color:rgba(255,255,255,.73)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader-withBackground{background-color:#1a1a1a;color:rgba(255,255,255,.7)}@supports (backdrop-filter:blur(1.5em)) or (-webkit-backdrop-filter:blur(1.5em)){.skinHeader-blurred{background-color:#1f1f1f;color:rgba(255,255,255,.7)}}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(logo.png)}.backgroundContainer,.dialog{background-color:#141414}.backgroundContainer.withBackdrop{background-color:rgba(12,12,12,.9)}.paper-icon-button-light:focus{color:#52B54B}.fab,.raised{background:#282828;color:#fff}.button-accent,.button-submit{background:#52B54B;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.selectLabelUnfocused,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#52B54B}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222326}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected,.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even),.listItem-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem:focus{background:#333}.progressring-spiner{border-color:#52B54B}.button-flat-accent,.button-link{color:#52B54B}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#242424;border:.07em solid #242424;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:#242424;border:.07em solid #242424}.emby-select-withcolor>option{color:inherit}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#52B54B}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline>.checkboxOutlineTick,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuDivider{background:#222326;background:rgba(255,255,255,.12)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.4)}.emby-tab-button-active{color:#52B54B}.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#52B54B}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#282828}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#555!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-currentTimeIndicatorArrow,.guide-currentTimeIndicatorBar{background-color:#52B54B}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#141414));background:-webkit-linear-gradient(rgba(0,0,0,0),#141414);background:-o-linear-gradient(rgba(0,0,0,0),#141414);background:linear-gradient(rgba(0,0,0,0),#141414)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888}.timeslotHeaders-desktop::-webkit-scrollbar{height:.7em} \ No newline at end of file +html{color:#ddd;color:rgba(255,255,255,.73)}.emby-collapsible-button{border-color:#383838;border-color:rgba(255,255,255,.135)}.skinHeader-withBackground{background-color:#1a1a1a;color:rgba(255,255,255,.7)}@supports (backdrop-filter:blur(1.5em)) or (-webkit-backdrop-filter:blur(1.5em)){.skinHeader-blurred{background-color:#1f1f1f;color:rgba(255,255,255,.7)}}.skinHeader.semiTransparent{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background-color:rgba(0,0,0,.3);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.6)),to(rgba(0,0,0,0)));background:-webkit-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:-o-linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0));background:linear-gradient(rgba(0,0,0,.6),rgba(0,0,0,0))}.pageTitleWithDefaultLogo{background-image:url(logo.png)}.backgroundContainer,.dialog{background-color:#141414}.backgroundContainer.withBackdrop{background-color:rgba(12,12,12,.9)}.paper-icon-button-light:focus{color:#52B54B}.fab,.raised{background:#282828;color:#fff}.button-accent,.button-submit{background:#52B54B;color:#fff}.checkboxLabel{color:inherit}.checkboxListLabel,.inputLabel,.inputLabelUnfocused,.paperListLabel,.selectLabelUnfocused,.textareaLabelUnfocused{color:#bbb;color:rgba(255,255,255,.7)}.inputLabelFocused,.selectLabelFocused,.textareaLabelFocused{color:#52B54B}.checkboxOutline{border-color:currentColor}.collapseContent,.formDialogFooter:not(.formDialogFooter-clear),.formDialogHeader:not(.formDialogHeader-clear),.paperList,.visualCardBox{background-color:#222326}.cardText-secondary,.fieldDescription,.guide-programNameCaret,.listItem .secondary,.nowPlayingBarSecondaryText,.programSecondaryTitle,.secondaryText{color:#999;color:rgba(255,255,255,.5)}.actionsheetDivider{background:#444;background:rgba(255,255,255,.14)}.cardFooter-vibrant .cardText-secondary{color:inherit;opacity:.5}.actionSheetMenuItem:hover{background-color:#222}.toast{background:#303030;color:#fff;color:rgba(255,255,255,.87)}.appfooter{background:#101010;color:#ccc;color:rgba(255,255,255,.78)}@supports (backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px)){.appfooter-blurred{background:rgba(24,24,24,.7);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.itemSelectionPanel{border:1px solid #52B54B}.selectionCommandsPanel{background:#52B54B;color:#fff}.upNextDialog-countdownText{color:#52B54B}.alphaPickerButton{color:#999;color:rgba(255,255,255,.5);background-color:transparent}.alphaPickerButton-selected{color:#fff}.alphaPickerButton-tv:focus{background-color:#52B54B;color:#fff!important}.detailTableBodyRow-shaded:nth-child(even),.listItem-shaded:nth-child(even){background:#1c1c1c;background:rgba(30,30,30,.9)}.listItem:focus{background:#333}.progressring-spiner{border-color:#52B54B}.button-flat-accent,.button-link{color:#52B54B}.mediaInfoText{color:#ddd;background:rgba(170,170,190,.2)}.mediaInfoTimerIcon,.starIcon{color:#CB272A}.emby-input,.emby-textarea{color:inherit;background:#242424;border:.07em solid #242424;-webkit-border-radius:.15em;border-radius:.15em}.emby-input:focus,.emby-textarea:focus{border-color:#52B54B}.emby-select-withcolor{color:inherit;background:#242424;border:.07em solid #242424}.emby-select-withcolor>option{color:inherit}.emby-checkbox:checked+span+span+.checkboxOutline,.emby-select-withcolor:focus{border-color:#52B54B}.emby-checkbox:focus+span+.emby-checkbox-focushelper{background-color:rgba(82,181,75,.26)}.emby-checkbox:checked+span+span+.checkboxOutline>.checkboxOutlineTick,.itemProgressBarForeground{background-color:#52B54B}.itemProgressBarForeground-recording{background-color:#CB272A}.countIndicator,.fullSyncIndicator,.playedIndicator{background:#52B54B}.fullSyncIndicator{color:#fff}.mainDrawer{background-color:#1c1c1f;color:#ccc;color:rgba(255,255,255,.7)}.navMenuDivider{background:#222326;background:rgba(255,255,255,.12)}.navMenuOption:hover{background:#252528}.navMenuOption-selected{background:#52B54B!important;color:#fff}.emby-tab-button{color:#999;color:rgba(255,255,255,.4)}.emby-tab-button-active{color:#52B54B}.emby-tab-button-active.emby-button-tv{color:#fff}.emby-tab-button.emby-button-tv:focus{color:#52B54B}.channelPrograms,.guide-channelHeaderCell,.programCell{border-color:#282828}.programCell-sports{background:#3949AB!important}.programCell-movie{background:#5E35B1!important}.programCell-kids{background:#039BE5!important}.programCell-news{background:#43A047!important}.guide-channelHeaderCell:focus,.programCell:focus{background-color:#555!important}.guide-programTextIcon{color:#1e1e1e;background:#555}.guide-currentTimeIndicatorArrow,.guide-currentTimeIndicatorBar{background-color:#52B54B}.guide-headerTimeslots{color:inherit}.guide-date-tab-button{color:#555;color:rgba(255,255,255,.3)}.guide-date-tab-button.emby-tab-button-active,.guide-date-tab-button:focus{color:#52B54B}.guide-date-tab-button.emby-button-tv:focus{background-color:#52B54B;color:#fff}.itemBackdropFader{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(#141414));background:-webkit-linear-gradient(rgba(0,0,0,0),#141414);background:-o-linear-gradient(rgba(0,0,0,0),#141414);background:linear-gradient(rgba(0,0,0,0),#141414)}@media all and (min-width:62.5em){.detailButton-mobile{background:#444!important}.detailTrackSelect.emby-select-withcolor{background:#444;border-color:#444}}.infoBanner{color:#ddd;background:#111;padding:1em;-webkit-border-radius:.25em;border-radius:.25em}.ratingbutton-icon-withrating{color:#c33}.downloadbutton-icon-complete,.downloadbutton-icon-on{color:#4285F4}.playstatebutton-icon-played{color:#c33}.repeatButton-active{color:#4285F4}.card:focus .card-focuscontent{border-color:#52B54B}.layout-desktop ::-webkit-scrollbar{width:1em;height:1em}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3)}::-webkit-scrollbar-track-piece{background-color:#3b3b3b}::-webkit-scrollbar-thumb:horizontal,::-webkit-scrollbar-thumb:vertical{-webkit-border-radius:2px;background:center no-repeat #888}.timeslotHeaders-desktop::-webkit-scrollbar{height:.7em} \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/viewsettings/viewsettings.js b/dashboard-ui/bower_components/emby-webcomponents/viewsettings/viewsettings.js new file mode 100644 index 0000000000..0becccaae9 --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/viewsettings/viewsettings.js @@ -0,0 +1 @@ +define(["require","dialogHelper","loading","apphost","layoutManager","connectionManager","appRouter","globalize","userSettings","emby-checkbox","emby-input","paper-icon-button-light","emby-select","material-icons","css!./../formdialog","emby-button","emby-linkbutton","flexStyles"],function(require,dialogHelper,loading,appHost,layoutManager,connectionManager,appRouter,globalize,userSettings){"use strict";function onSubmit(e){return e.preventDefault(),!1}function initEditor(context,settings){context.querySelector("form").addEventListener("submit",onSubmit),context.querySelector("#chkShowTitle").checked=settings.showTitle||!1,context.querySelector("#chkShowYear").checked=settings.showYear||!1,context.querySelector(".selectImageType").value=settings.imageType||""}function saveValues(context,settings,settingsKey){userSettings.set(settingsKey+"-showtitle",context.querySelector("#chkShowTitle").checked),userSettings.set(settingsKey+"-showyear",context.querySelector("#chkShowYear").checked),userSettings.set(settingsKey+"-imagetype",context.querySelector(".selectImageType").value)}function centerFocus(elem,horiz,on){require(["scrollHelper"],function(scrollHelper){var fn=on?"on":"off";scrollHelper.centerFocus[fn](elem,horiz)})}function ViewSettings(){}return ViewSettings.prototype.show=function(options){return new Promise(function(resolve,reject){require(["text!./viewsettings.template.html"],function(template){var dialogOptions={removeOnClose:!0,scrollY:!1};layoutManager.tv?dialogOptions.size="fullscreen":dialogOptions.size="small";var dlg=dialogHelper.createDialog(dialogOptions);dlg.classList.add("formDialog");var html="";html+='
',html+='',html+='

${Settings}

',html+="
",html+=template,dlg.innerHTML=globalize.translateDocument(html,"sharedcomponents");for(var settingElements=dlg.querySelectorAll(".viewSetting"),i=0,length=settingElements.length;i +
+
+ +
+ +

+ ${HeaderPosterOptions} +

+ +
+ +
+ +
+ +
+ +
+ +
+
+
+
+ \ No newline at end of file diff --git a/dashboard-ui/components/favoriteitems.js b/dashboard-ui/components/favoriteitems.js index 39706cfb11..9cc5441691 100644 --- a/dashboard-ui/components/favoriteitems.js +++ b/dashboard-ui/components/favoriteitems.js @@ -1 +1 @@ -define(["loading","libraryBrowser","cardBuilder","dom","apphost","imageLoader","globalize","layoutManager","scrollStyles","emby-itemscontainer"],function(loading,libraryBrowser,cardBuilder,dom,appHost,imageLoader,globalize,layoutManager){"use strict";function enableScrollX(){return!layoutManager.desktop}function getThumbShape(){return enableScrollX()?"overflowBackdrop":"backdrop"}function getPosterShape(){return enableScrollX()?"overflowPortrait":"portrait"}function getSquareShape(){return enableScrollX()?"overflowSquare":"square"}function getSections(){return[{name:"HeaderFavoriteMovies",types:"Movie",id:"favoriteMovies",shape:getPosterShape(),showTitle:!1,overlayPlayButton:!0},{name:"HeaderFavoriteShows",types:"Series",id:"favoriteShows",shape:getPosterShape(),showTitle:!1,overlayPlayButton:!0},{name:"HeaderFavoriteEpisodes",types:"Episode",id:"favoriteEpisode",shape:getThumbShape(),preferThumb:!1,showTitle:!0,showParentTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"HeaderFavoriteVideos",types:"Video,MusicVideo",id:"favoriteVideos",shape:getThumbShape(),preferThumb:!0,showTitle:!0,overlayPlayButton:!0,overlayText:!1,centerText:!0},{name:"HeaderFavoriteGames",types:"Game",id:"favoriteGames",shape:getSquareShape(),preferThumb:!1,showTitle:!0},{name:"HeaderFavoriteArtists",types:"MusicArtist",id:"favoriteArtists",shape:getSquareShape(),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!1,centerText:!0,overlayPlayButton:!0,coverImage:!0},{name:"HeaderFavoriteAlbums",types:"MusicAlbum",id:"favoriteAlbums",shape:getSquareShape(),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!0,centerText:!0,overlayPlayButton:!0,coverImage:!0},{name:"HeaderFavoriteSongs",types:"Audio",id:"favoriteSongs",shape:getSquareShape(),preferThumb:!1,showTitle:!0,overlayText:!1,showParentTitle:!0,centerText:!0,overlayMoreButton:!0,action:"instantmix",coverImage:!0}]}function loadSection(elem,userId,topParentId,section,isSingleSection){var screenWidth=dom.getWindowSize().innerWidth,options={SortBy:"SortName",SortOrder:"Ascending",Filters:"IsFavorite",Recursive:!0,Fields:"PrimaryImageAspectRatio,BasicSyncInfo",CollapseBoxSetItems:!1,ExcludeLocationTypes:"Virtual",EnableTotalRecordCount:!1};topParentId&&(options.ParentId=topParentId),isSingleSection||(options.Limit=screenWidth>=1920?10:screenWidth>=1440?8:6,enableScrollX()&&(options.Limit=20));var promise;return"MusicArtist"===section.types?promise=ApiClient.getArtists(userId,options):(options.IncludeItemTypes=section.types,promise=ApiClient.getItems(userId,options)),promise.then(function(result){var html="";if(result.Items.length){if(html+='
',!layoutManager.tv&&options.Limit&&result.Items.length>=options.Limit){var href="secondaryitems.html?serverId="+ApiClient.serverId()+"&type="+section.types+"&filters=IsFavorite";html+='',html+='

',html+=globalize.translate(section.name),html+="

",html+='',html+="
"}else html+='

'+globalize.translate(section.name)+"

";html+="
",html+=enableScrollX()?'
':'
';var supportsImageAnalysis=appHost.supports("imageanalysis"),cardLayout=(appHost.preferVisualCards||supportsImageAnalysis)&§ion.autoCardLayout&§ion.showTitle;cardLayout=!1,html+=cardBuilder.getCardsHtml(result.Items,{preferThumb:section.preferThumb,shape:section.shape,centerText:section.centerText&&!cardLayout,overlayText:section.overlayText!==!1,showTitle:section.showTitle,showParentTitle:section.showParentTitle,scalable:!0,coverImage:section.coverImage,overlayPlayButton:section.overlayPlayButton,overlayMoreButton:section.overlayMoreButton&&!cardLayout,action:section.action,allowBottomPadding:!enableScrollX(),cardLayout:cardLayout,vibrant:supportsImageAnalysis&&cardLayout}),html+="
"}elem.innerHTML=html,imageLoader.lazyChildren(elem)})}function loadSections(page,userId,topParentId,types){loading.show();var sections=getSections(),sectionid=getParameterByName("sectionid");sectionid&&(sections=sections.filter(function(s){return s.id===sectionid})),types&&(sections=sections.filter(function(s){return types.indexOf(s.id)!==-1}));var i,length,elem=page.querySelector(".favoriteSections");if(!elem.innerHTML){var html="";for(i=0,length=sections.length;i
';elem.innerHTML=html}var promises=[];for(i=0,length=sections.length;i=1920?10:screenWidth>=1440?8:6,enableScrollX()&&(options.Limit=20));var promise;return"MusicArtist"===section.types?promise=ApiClient.getArtists(userId,options):(options.IncludeItemTypes=section.types,promise=ApiClient.getItems(userId,options)),promise.then(function(result){var html="";if(result.Items.length){if(html+='
',!layoutManager.tv&&options.Limit&&result.Items.length>=options.Limit){var href="secondaryitems.html?serverId="+ApiClient.serverId()+"&type="+section.types+"&filters=IsFavorite";html+='',html+='

',html+=globalize.translate(section.name),html+="

",html+='',html+="
"}else html+='

'+globalize.translate(section.name)+"

";if(html+="
",enableScrollX()){var scrollXClass="scrollX hiddenScrollX";layoutManager.tv&&(scrollXClass+=" smoothScrollX"),html+='
'}else html+='
';var supportsImageAnalysis=appHost.supports("imageanalysis"),cardLayout=(appHost.preferVisualCards||supportsImageAnalysis)&§ion.autoCardLayout&§ion.showTitle;cardLayout=!1,html+=cardBuilder.getCardsHtml(result.Items,{preferThumb:section.preferThumb,shape:section.shape,centerText:section.centerText&&!cardLayout,overlayText:section.overlayText!==!1,showTitle:section.showTitle,showParentTitle:section.showParentTitle,scalable:!0,coverImage:section.coverImage,overlayPlayButton:section.overlayPlayButton,overlayMoreButton:section.overlayMoreButton&&!cardLayout,action:section.action,allowBottomPadding:!enableScrollX(),cardLayout:cardLayout,vibrant:supportsImageAnalysis&&cardLayout}),html+="
"}elem.innerHTML=html,imageLoader.lazyChildren(elem)})}function loadSections(page,userId,topParentId,types){loading.show();var sections=getSections(),sectionid=getParameterByName("sectionid");sectionid&&(sections=sections.filter(function(s){return s.id===sectionid})),types&&(sections=sections.filter(function(s){return types.indexOf(s.id)!==-1}));var i,length,elem=page.querySelector(".favoriteSections");if(!elem.innerHTML){var html="";for(i=0,length=sections.length;i
';elem.innerHTML=html}var promises=[];for(i=0,length=sections.length;i.raised{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.detailButton-mobile{display:flex;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:0!important;padding-top:.5em!important;padding-bottom:.5em!important}@media all and (min-width:26em){.detailButton-mobile{margin-right:.1em!important}}@media all and (min-width:29em){.detailButton-mobile{margin-right:.2em!important}}@media all and (min-width:32em){.detailButton-mobile{margin-right:.3em!important}}.detailButton-mobile-content{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.detailButton-mobile-icon{font-size:1.6em!important;width:1em;height:1em}.detailImageProgressContainer{position:absolute;bottom:4px;right:1px;left:1px;text-align:center}@media all and (max-width:62.5em){.detailButton-mobile-text{margin-top:.7em;font-size:80%;font-weight:400}.mainDetailButtons{margin-left:-.5em}}@media all and (min-width:62.5em){.detailButton-mobile-icon:not(.always),.detailButton-mobile-text.texthide{display:none!important}.detailButton-mobile{padding-top:0!important;padding-bottom:0!important;height:3em}.mainDetailButtons{font-size:108%;margin:1.25em 0}.detailButton-mobile-icon:not(.notext){margin-right:.25em}.detailButton-mobile-icon.playstatebutton-icon-unplayed{opacity:.2}.detailButton-mobile-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}}.listTopPaging,.viewControls{display:inline-block}@media all and (max-width:50em){.editorMenuLink{display:none}}.itemMiscInfo{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center}@media all and (max-width:31.25em){.mobileDetails .itemMiscInfo{text-align:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.itemMiscInfo .endsAt{display:none}}.layout-tv .detailVerticalSection{margin-bottom:3.4em!important}.detailPageContent{border-spacing:0;border-collapse:collapse;padding-top:3em}@media all and (max-width:62.5em){.detailPageContent-nodetailimg{padding-top:0;margin-top:-3em}}@media all and (min-width:75em){.itemDetailPage .padded-left{padding-left:4%!important}.itemDetailPage .padded-right{padding-right:4%!important}}.mediaInfoContent{line-height:1.5em}.mediaInfoStream{margin:0 3em 0 0;display:inline-block;vertical-align:top}.mediaInfoStreamType{display:block;margin:1em 0}.mediaInfoAttribute,.mediaInfoLabel{display:inline-block}.mediaInfoLabel{margin-right:1em;font-weight:600}.recordingProgressBar::-moz-progress-bar{background-color:#c33}.recordingProgressBar::-webkit-progress-value{background-color:#c33}.recordingProgressBar[aria-valuenow]:before{background-color:#c33}.timelineHeader{margin-bottom:.25em;line-height:1.25em;line-height:initial}.itemsContainer{margin:0 auto}.alphabetPicker{position:fixed;left:.4em;bottom:48px;display:none;line-height:1}.alphabetPicker-right{right:.4em;left:auto}.layout-desktop .absolutePageTabContent .alphabetPicker{right:1.5em}@media all and (max-height:31.25em){.alphabetPicker{display:none!important}.itemBackdrop{height:52vh}}.alphaPicker-vertical .alphaPickerButton{padding-top:2px!important;padding-bottom:2px!important}@media all and (max-height:43.75em){.alphaPicker-vertical .alphaPickerButton{padding-top:1px!important;padding-bottom:1px!important}}@media all and (max-height:37.5em){.alphaPicker-vertical .alphaPickerButton{padding-top:0!important;padding-bottom:0!important}}@media all and (max-height:33.125em){.alphabetPicker{font-size:80%!important}}@media all and (max-height:30em){.alphabetPicker{font-size:76%!important}}@media all and (min-height:37.5em){.alphabetPicker{bottom:70px}}@media all and (min-height:56.25em){.alphabetPicker{bottom:120px}}@media all and (min-height:62.5em){.alphabetPicker{bottom:200px}}@media all and (max-width:75em){.listViewUserDataButtons{display:none!important}}@media all and (max-width:62.5em){.detailsHiddenOnMobile{display:none}}#criticReviewsContent.hiddenScrollX{white-space:nowrap}#criticReviewsContent.hiddenScrollX .paperList{min-width:240px;width:90%;max-width:500px;display:inline-block;vertical-align:top;margin:0 .35em 0 0}.btnSyncComplete{background:#673AB7!important}.btnSyncComplete i{-webkit-border-radius:1000px;border-radius:1000px}.bulletSeparator{margin:0 .35em}.mediaInfoIcons{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:1em 0;-webkit-flex-wrap:wrap;flex-wrap:wrap}.sectionTitleButton,.sectionTitleIconButton{margin-right:0!important;display:inline-block;vertical-align:middle}.verticalSection{margin-bottom:1em}@media all and (max-width:500px),(max-height:720px){.verticalSection{margin-bottom:1em}}.verticalSection-extrabottompadding{margin-bottom:3em}.sectionTitleContainer{margin-bottom:.5em}.sectionTitle{margin-bottom:1em}.sectionTitle-cards{margin-bottom:.3em}.sectionTitleContainer>.sectionTitle{margin-top:0;margin-bottom:0;display:inline-block;vertical-align:middle}.sectionTitleButton{margin-left:1.5em!important;-webkit-flex-shrink:0;flex-shrink:0}.sectionTitleButton+.sectionTitleButton{margin-left:.5em!important}.sectionTitleIconButton{margin-left:1.5em!important;-webkit-flex-shrink:0;flex-shrink:0;color:#aaa!important;font-size:84%!important;padding:.5em!important}.sectionTitle-cards{margin-left:.12em;margin-top:0}.layout-tv .sectionTitle-cards{margin-left:.3em}.horizontalItemsContainer{display:-webkit-box;display:-webkit-flex;display:flex}.sectionTitleTextButton{margin:0!important;display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:inline-flex!important;color:inherit!important}.sectionTitleTextButton:not(.padded-left){padding:0!important}.sectionTitleTextButton.padded-left{padding-bottom:0!important;padding-right:0!important;padding-top:0!important}.sectionTitleTextButton>.sectionTitle{margin-bottom:0}.padded-left{padding-left:2%}.padded-right{padding-right:2%}.padded-top{padding-top:1em}.padded-bottom{padding-bottom:1em}.layout-tv .padded-top-focusscale{padding-top:1.6em;margin-top:-1.6em}.layout-tv .padded-bottom-focusscale{padding-bottom:1.6em;margin-bottom:-1.6em}@media all and (min-height:500px){.padded-left-withalphapicker{padding-left:6%}.padded-right-withalphapicker{padding-right:6%}}@media all and (min-width:600px){.padded-left{padding-left:3%}.padded-right{padding-right:3%}}@media all and (min-width:800px){.padded-left{padding-left:3.2%}.padded-right{padding-right:3.2%}}@media all and (min-width:1280px){.padded-left{padding-left:3.6%}.padded-right{padding-right:3.6%}}@media all and (min-width:800px){.layout-tv .padded-left-withalphapicker{padding-left:4.4%}.layout-tv .padded-right-withalphapicker{padding-right:4.4%}}@media all and (min-width:1280px){.layout-tv .padded-left-withalphapicker{padding-left:5%}.layout-tv .padded-right-withalphapicker{padding-right:5%}}.homeLibraryButton{min-width:18%;margin:.5em!important}@media all and (max-width:50em){.homeLibraryButton{width:46%!important}}.searchfields-icon{color:#aaa}.button-accent-flat{color:#52B54B!important}.clearLink{text-decoration:none;font-weight:inherit!important;vertical-align:middle;color:inherit!important} \ No newline at end of file +.headerUserImage,.navMenuOption,.pageTitle{vertical-align:middle}.headerSelectedPlayer,.itemMiscInfo{-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden}.alphabetPicker,.detailButton-mobile,.itemLinks,.listPaging,.sectionTabs,.viewSettings{text-align:center}.libraryPage{padding-top:6em!important}.itemDetailPage{padding-top:4em!important}.standalonePage{padding-top:5.5em!important}.wizardPage{padding-top:7em!important}.libraryPage:not(.noSecondaryNavPage){padding-top:9.2em!important}.absolutePageTabContent{position:absolute;left:0;right:0;bottom:0;z-index:1;margin:0!important;top:6.9em!important;-webkit-transition:-webkit-transform .2s ease-out;-o-transition:transform .2s ease-out;transition:transform .2s ease-out}.pageTabContent:not(.is-active){display:none!important}.navMenuDivider{height:1px;margin:.5em 0;display:none}.headerUserImage{-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;background-position:center center;-webkit-border-radius:100em;border-radius:100em;display:inline-block}.headerUserButtonRound img{-webkit-border-radius:100em;border-radius:100em}.headerButton{-webkit-flex-shrink:0;flex-shrink:0;font-size:108%}.hideMainDrawer .mainDrawerButton{display:none}.noHeaderRight .headerRight,.noHomeButtonHeader .headerHomeButton{display:none!important}.pageTitle{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;margin:0 0 0 .5em;height:1.7em;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-shrink:1;flex-shrink:1}.detailButton-mobile,.skinHeader{-webkit-flex-direction:column;-webkit-box-orient:vertical;-webkit-box-direction:normal}.pageTitleWithLogo{background-position:left center;-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;width:13.2em}.pageTitleWithDefaultLogo{height:1.22em}.skinHeader{position:fixed;right:0;left:0;z-index:999;top:0;border:0;display:-webkit-box;display:-webkit-flex;display:flex;flex-direction:column;background-color:#121212;color:#ccc;contain:layout style paint}.mainAnimatedPages,.pageTabContent{contain:layout style}.hiddenViewMenuBar .skinHeader{display:none}.headerLeft,.headerRight{display:-webkit-box;display:-webkit-flex;-webkit-box-align:center}.headerTop{padding:.865em 0}.headerLeft{display:flex;-webkit-align-items:center;align-items:center;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;overflow:hidden}.sectionTabs{width:100%}.headerRight{display:flex;-webkit-align-items:center;align-items:center;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.selectedMediaFolder{background-color:#f2f2f2!important}.navMenuOption{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;text-decoration:none;color:inherit;padding:.9em 0 .9em 2.4em;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.layout-desktop .searchTabButton,.layout-mobile .searchTabButton,.layout-tv .headerSearchButton,body:not(.dashboardDocument) .btnNotifications{display:none!important}.navMenuOptionIcon{margin-right:1em;-webkit-flex-shrink:0;flex-shrink:0}.sidebarHeader{padding-left:1.2em;margin:1em 0 .5em}.dashboardDocument .skinBody{-webkit-transition:left ease-in-out .3s,padding ease-in-out .3s;-o-transition:left ease-in-out .3s,padding ease-in-out .3s;transition:left ease-in-out .3s,padding ease-in-out .3s;position:absolute;top:0;right:0;bottom:0;left:0}@media all and (max-width:40em){.navMenuOption{font-size:110%}}.mainDrawer-scrollContainer{padding-bottom:10vh}@media all and (min-width:40em){.dashboardDocument .adminDrawerLogo,.dashboardDocument .mainDrawerButton,.dashboardDocument .tmla-mask{display:none!important}.dashboardDocument .mainDrawer{z-index:inherit!important;left:0!important;top:0!important;-webkit-transform:none!important;transform:none!important;-webkit-box-shadow:none!important;box-shadow:none!important;width:20.07em!important;font-size:92%}.dashboardDocument .mainDrawer-scrollContainer{margin-top:5em!important}.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:8.7em!important}.dashboardDocument .skinBody{left:20em}}@media all and (min-width:40em) and (max-width:84em){.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:8.4em!important}}@media all and (max-width:84em){.withSectionTabs .headerTop{padding-bottom:.2em}.sectionTabs{font-size:83.5%}}@media all and (min-width:84em){.headerTop{padding:1.489em 0}.headerTabs{-webkit-align-self:center;align-self:center;width:auto;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;margin-top:-3.34em;position:relative;top:-1.1em}.libraryPage:not(.noSecondaryNavPage){padding-top:6.3em!important}.pageWithAbsoluteTabs:not(.noSecondaryNavPage){padding-top:8.4em!important}.absolutePageTabContent{top:5.7em!important}.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer{margin-top:6.1em!important}.dashboardDocument .mainDrawer-scrollContainer{margin-top:6.3em!important}}.headerSelectedPlayer{max-width:10em;white-space:nowrap}@media all and (max-width:37.5em){.headerSelectedPlayer{display:none}}.hidingAnimatedTab{visibility:hidden}.headerArrowImage{height:20px;margin-left:.5em}.backdropContainer{position:fixed;top:0;left:0;right:0;bottom:0;z-index:-1}.libraryPage .header{padding-bottom:0}.flexPageTabContent.is-active{display:-webkit-box!important;display:-webkit-flex!important;display:flex!important}.viewSettings{margin:0 0 .25em}.viewControls+.listTopPaging{margin-left:.5em!important}.criticReview{margin:1.5em 0;background:#222;padding:.8em .8em .8em 3em;-webkit-border-radius:.3em;border-radius:.3em;position:relative}.detailLogo,.itemBackdrop{background-repeat:no-repeat;background-position:center center}.criticReview:first-child{margin-top:.5em}.criticReview img{width:2.4em}.criticRatingScore{margin-bottom:.5em}.itemTag{display:inline-block;margin-right:1em}.itemOverview{white-space:pre-wrap}.itemLinks{padding:0}.itemLinks p{margin:.5em 0}.reviewLink,.reviewerName{margin-top:.5em}.reviewerName{color:#ccc}.reviewDate{margin-left:1em}.reviewScore{position:absolute;left:.8em}.itemBackdrop{-webkit-background-size:cover;background-size:cover;height:50vh;position:relative}.itemBackdropProgressBar{position:absolute!important;bottom:0;left:0;right:0}.itemBackdropFader{position:absolute;bottom:-1px;left:0;right:0;height:15vh}.desktopMiscInfoContainer{position:absolute;bottom:.75em}.detailImageContainer{margin-right:2em;width:280px;-webkit-flex-shrink:0;flex-shrink:0}.detailPagePrimaryContent{position:relative;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.detailLogo{width:21.3em;height:5em;position:absolute;top:13.5%;right:19.5%;-webkit-background-size:contain;background-size:contain}@media all and (max-width:87.5em){.detailLogo{right:5%}}@media all and (max-width:75em){.detailLogo{right:2%}}@media all and (max-width:68.75em){.detailLogo{width:14.91em;height:3.5em;right:5%;bottom:5%;top:auto;background-position:center right;display:none}}.itemDetailImage{width:100%}.thumbDetailImageContainer{width:400px}.itemDetailImage.loaded{-webkit-box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37);box-shadow:0 .0725em .29em 0 rgba(0,0,0,.37)}@media all and (max-width:62.5em){.detailPageContent{position:relative}.detailImageContainer{position:absolute;top:-90px;left:5%;width:auto}.itemDetailImage{height:120px;width:auto!important}.btnPlaySimple{display:none!important}}@media all and (min-width:62.5em){.itemBackdrop{display:none}.detailPagePrimaryContainer{display:-webkit-box;display:-webkit-flex;display:flex;margin-bottom:3.6em}}@media all and (max-width:75em){.lnkSibling{display:none!important}}.parentName{display:block;margin-bottom:.5em}.emby-button.detailFloatingButton{position:absolute;background-color:rgba(0,0,0,.5)!important;z-index:1;top:50%;left:50%;margin:-2.2em 0 0 -2.2em;border:2.7px solid rgba(255,255,255,.6);padding:.38em!important;color:rgba(255,255,255,.76)}.emby-button.detailFloatingButton i{font-size:3.5em}@media all and (max-width:62.5em){.parentName{margin-bottom:1em}.itemDetailPage{padding-top:0!important}.detailimg-hidemobile{display:none}}@media all and (min-width:31.25em){.mobileDetails{display:none}}@media all and (max-width:31.25em){.desktopDetails{display:none!important}}.detailButton-mobile,.mainDetailButtons{display:-webkit-box;display:-webkit-flex}.itemName{margin:.5em 0}.empty{margin:0}.detailCollapsibleSection:not(.hide)+.detailCollapsibleSection{margin-top:-2em}.detailPageCollabsible{margin-top:0}.mainDetailButtons{display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin:1em 0}.recordingFields button{margin-left:0;margin-right:.5em;-webkit-flex-shrink:0;flex-shrink:0}.mainDetailButtons.hide+.recordingFields{margin-top:1.5em!important}.mainDetailButtons>.raised{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.detailButton-mobile{display:flex;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:0!important;padding-top:.5em!important;padding-bottom:.5em!important}@media all and (min-width:26em){.detailButton-mobile{margin-right:.1em!important}}@media all and (min-width:29em){.detailButton-mobile{margin-right:.2em!important}}@media all and (min-width:32em){.detailButton-mobile{margin-right:.3em!important}}.detailButton-mobile-content{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.detailButton-mobile-icon{font-size:1.6em!important;width:1em;height:1em}.detailImageProgressContainer{position:absolute;bottom:4px;right:1px;left:1px;text-align:center}@media all and (max-width:62.5em){.detailButton-mobile-text{margin-top:.7em;font-size:80%;font-weight:400}.mainDetailButtons{margin-left:-.5em}}@media all and (min-width:62.5em){.detailButton-mobile-icon:not(.always),.detailButton-mobile-text.texthide{display:none!important}.detailButton-mobile{padding-top:0!important;padding-bottom:0!important;height:3em}.mainDetailButtons{font-size:108%;margin:1.25em 0}.detailButton-mobile-icon:not(.notext){margin-right:.25em}.detailButton-mobile-icon.playstatebutton-icon-unplayed{opacity:.2}.detailButton-mobile-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}}.listTopPaging,.viewControls{display:inline-block}@media all and (max-width:50em){.editorMenuLink{display:none}.homeLibraryButton{width:46%!important}}.itemMiscInfo{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center}@media all and (max-width:31.25em){.mobileDetails .itemMiscInfo{text-align:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.itemMiscInfo .endsAt{display:none}}.layout-tv .detailVerticalSection{margin-bottom:3.4em!important}.detailPageContent{border-spacing:0;border-collapse:collapse;padding-top:3em}@media all and (max-width:62.5em){.detailPageContent-nodetailimg{padding-top:0;margin-top:-3em}}@media all and (min-width:75em){.itemDetailPage .padded-left{padding-left:4%!important}.itemDetailPage .padded-right{padding-right:4%!important}}.mediaInfoContent{line-height:1.5em}.mediaInfoStream{margin:0 3em 0 0;display:inline-block;vertical-align:top}.mediaInfoStreamType{display:block;margin:1em 0}.mediaInfoAttribute,.mediaInfoLabel{display:inline-block}.mediaInfoLabel{margin-right:1em;font-weight:600}.recordingProgressBar::-moz-progress-bar{background-color:#c33}.recordingProgressBar::-webkit-progress-value{background-color:#c33}.recordingProgressBar[aria-valuenow]:before{background-color:#c33}.timelineHeader{margin-bottom:.25em;line-height:1.25em;line-height:initial}.itemsContainer{margin:0 auto}.alphabetPicker{position:fixed;left:.4em;bottom:48px;display:none;line-height:1}.alphabetPicker-right{right:.4em;left:auto}.layout-desktop .absolutePageTabContent .alphabetPicker{right:1.5em}@media all and (max-height:31.25em){.alphabetPicker{display:none!important}.itemBackdrop{height:52vh}}.alphaPicker-vertical .alphaPickerButton{padding-top:2px!important;padding-bottom:2px!important}@media all and (max-height:43.75em){.alphaPicker-vertical .alphaPickerButton{padding-top:1px!important;padding-bottom:1px!important}}@media all and (max-height:37.5em){.alphaPicker-vertical .alphaPickerButton{padding-top:0!important;padding-bottom:0!important}}@media all and (max-height:33.125em){.alphabetPicker{font-size:80%!important}}@media all and (max-height:30em){.alphabetPicker{font-size:76%!important}}@media all and (min-height:37.5em){.alphabetPicker{bottom:70px}}@media all and (min-height:56.25em){.alphabetPicker{bottom:120px}}@media all and (min-height:62.5em){.alphabetPicker{bottom:200px}}@media all and (max-width:75em){.listViewUserDataButtons{display:none!important}}@media all and (max-width:62.5em){.detailsHiddenOnMobile{display:none}}.btnSyncComplete{background:#673AB7!important}.btnSyncComplete i{-webkit-border-radius:1000px;border-radius:1000px}.bulletSeparator{margin:0 .35em}.mediaInfoIcons{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:1em 0;-webkit-flex-wrap:wrap;flex-wrap:wrap}.sectionTitleButton,.sectionTitleIconButton{margin-right:0!important;display:inline-block;vertical-align:middle}.verticalSection{margin-bottom:1em}@media all and (max-width:500px),(max-height:720px){.verticalSection{margin-bottom:1em}}.verticalSection-extrabottompadding{margin-bottom:3em}.sectionTitleContainer{margin-bottom:.5em}.sectionTitle{margin-bottom:1em}.sectionTitle-cards{margin-bottom:.3em}.sectionTitleContainer>.sectionTitle{margin-top:0;margin-bottom:0;display:inline-block;vertical-align:middle}.sectionTitleButton{margin-left:1.5em!important;-webkit-flex-shrink:0;flex-shrink:0}.sectionTitleButton+.sectionTitleButton{margin-left:.5em!important}.sectionTitleIconButton{margin-left:1.5em!important;-webkit-flex-shrink:0;flex-shrink:0;color:#aaa!important;font-size:84%!important;padding:.5em!important}.sectionTitle-cards{margin-left:.12em;margin-top:0}.layout-tv .sectionTitle-cards{margin-left:.3em}.horizontalItemsContainer{display:-webkit-box;display:-webkit-flex;display:flex}.sectionTitleTextButton{margin:0!important;display:-webkit-inline-box!important;display:-webkit-inline-flex!important;display:inline-flex!important;color:inherit!important}.sectionTitleTextButton:not(.padded-left){padding:0!important}.sectionTitleTextButton.padded-left{padding-bottom:0!important;padding-right:0!important;padding-top:0!important}.sectionTitleTextButton>.sectionTitle{margin-bottom:0}.padded-left{padding-left:2%}.padded-right{padding-right:2%}.padded-top{padding-top:1em}.padded-bottom{padding-bottom:1em}.layout-tv .padded-top-focusscale{padding-top:1.6em;margin-top:-1.6em}.layout-tv .padded-bottom-focusscale{padding-bottom:1.6em;margin-bottom:-1.6em}@media all and (min-height:500px){.padded-left-withalphapicker{padding-left:6%}.padded-right-withalphapicker{padding-right:6%}}@media all and (min-width:600px){.padded-left{padding-left:3%}.padded-right{padding-right:3%}}@media all and (min-width:800px){.padded-left{padding-left:3.2%}.padded-right{padding-right:3.2%}}@media all and (min-width:1280px){.padded-left{padding-left:3.6%}.padded-right{padding-right:3.6%}}@media all and (min-width:800px){.layout-tv .padded-left-withalphapicker{padding-left:4.4%}.layout-tv .padded-right-withalphapicker{padding-right:4.4%}}@media all and (min-width:1280px){.layout-tv .padded-left-withalphapicker{padding-left:5%}.layout-tv .padded-right-withalphapicker{padding-right:5%}}.homeLibraryButton{min-width:18%;margin:.5em!important}.searchfields-icon{color:#aaa}.button-accent-flat{color:#52B54B!important}.clearLink{text-decoration:none;font-weight:inherit!important;vertical-align:middle;color:inherit!important} \ No newline at end of file diff --git a/dashboard-ui/dashboard/librarysettings.js b/dashboard-ui/dashboard/librarysettings.js index f926776fea..3ae1f81e3d 100644 --- a/dashboard-ui/dashboard/librarysettings.js +++ b/dashboard-ui/dashboard/librarysettings.js @@ -1 +1 @@ -define(["jQuery","loading","libraryMenu","fnchecked","emby-checkbox","emby-linkbutton"],function($,loading,libraryMenu){"use strict";function loadPage(page,config){config.MergeMetadataAndImagesByName?$(".fldImagesByName",page).hide():$(".fldImagesByName",page).show(),$("#chkSaveMetadataHidden",page).checked(config.SaveMetadataHidden),$("#txtMetadataPath",page).val(config.MetadataPath||""),$("#txtMetadataNetworkPath",page).val(config.MetadataNetworkPath||""),loading.hide()}function loadMetadataConfig(page,config){$("#selectDateAdded",page).val(config.UseFileCreationTimeForDateAdded?"1":"0")}function loadFanartConfig(page,config){$("#txtFanartApiKey",page).val(config.UserApiKey||"")}function saveFanart(form){ApiClient.getNamedConfiguration("fanart").then(function(config){config.UserApiKey=$("#txtFanartApiKey",form).val(),ApiClient.updateNamedConfiguration("fanart",config)})}function saveMetadata(form){ApiClient.getNamedConfiguration("metadata").then(function(config){config.UseFileCreationTimeForDateAdded="1"===$("#selectDateAdded",form).val(),ApiClient.updateNamedConfiguration("metadata",config)})}function alertText(options){require(["alert"],function(alert){alert(options)})}function onSubmitFail(response){loading.hide(),response&&404===response.status?alertText("The metadata path entered could not be found. Please ensure the path is valid and try again."):response&&500===response.status&&alertText("The metadata path entered is not valid. Please ensure the path exists and that Emby server has write access to the folder.")}function onSubmit(){loading.show();var form=this;return ApiClient.getServerConfiguration().then(function(config){config.SaveMetadataHidden=$("#chkSaveMetadataHidden",form).checked(),config.EnableTvDbUpdates=$("#chkEnableTvdbUpdates",form).checked(),config.EnableTmdbUpdates=$("#chkEnableTmdbUpdates",form).checked(),config.EnableFanArtUpdates=$("#chkEnableFanartUpdates",form).checked(),config.MetadataPath=$("#txtMetadataPath",form).val(),config.MetadataNetworkPath=$("#txtMetadataNetworkPath",form).val(),config.FanartApiKey=$("#txtFanartApiKey",form).val(),ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult,onSubmitFail)}),saveMetadata(form),saveFanart(form),!1}function getTabs(){return[{href:"library.html",name:Globalize.translate("HeaderLibraries")},{href:"librarydisplay.html",name:Globalize.translate("TabDisplay")},{href:"metadataimages.html",name:Globalize.translate("TabMetadata")},{href:"metadatanfo.html",name:Globalize.translate("TabNfoSettings")},{href:"librarysettings.html",name:Globalize.translate("TabAdvanced")}]}return function(view,params){$("#btnSelectMetadataPath",view).on("click.selectDirectory",function(){require(["directorybrowser"],function(directoryBrowser){var picker=new directoryBrowser;picker.show({path:$("#txtMetadataPath",view).val(),networkSharePath:$("#txtMetadataNetworkPath",view).val(),callback:function(path,networkPath){path&&($("#txtMetadataPath",view).val(path),$("#txtMetadataNetworkPath",view).val(networkPath)),picker.close()},validateWriteable:!0,header:Globalize.translate("HeaderSelectMetadataPath"),instruction:Globalize.translate("HeaderSelectMetadataPathHelp"),enableNetworkSharePath:!0})})}),$(".librarySettingsForm").off("submit",onSubmit).on("submit",onSubmit),view.addEventListener("viewshow",function(){libraryMenu.setTabs("librarysetup",4,getTabs),loading.show();var page=this;ApiClient.getServerConfiguration().then(function(config){loadPage(page,config)}),ApiClient.getNamedConfiguration("metadata").then(function(metadata){loadMetadataConfig(page,metadata)}),ApiClient.getNamedConfiguration("fanart").then(function(metadata){loadFanartConfig(page,metadata)})})}}); \ No newline at end of file +define(["jQuery","loading","libraryMenu","fnchecked","emby-checkbox","emby-linkbutton"],function($,loading,libraryMenu){"use strict";function loadPage(page,config){config.MergeMetadataAndImagesByName?$(".fldImagesByName",page).hide():$(".fldImagesByName",page).show(),$("#chkSaveMetadataHidden",page).checked(config.SaveMetadataHidden),$("#txtMetadataPath",page).val(config.MetadataPath||""),$("#txtMetadataNetworkPath",page).val(config.MetadataNetworkPath||""),loading.hide()}function loadMetadataConfig(page,config){$("#selectDateAdded",page).val(config.UseFileCreationTimeForDateAdded?"1":"0")}function loadFanartConfig(page,config){$("#txtFanartApiKey",page).val(config.UserApiKey||"")}function saveFanart(form){ApiClient.getNamedConfiguration("fanart").then(function(config){config.UserApiKey=$("#txtFanartApiKey",form).val(),ApiClient.updateNamedConfiguration("fanart",config)})}function saveMetadata(form){ApiClient.getNamedConfiguration("metadata").then(function(config){config.UseFileCreationTimeForDateAdded="1"===$("#selectDateAdded",form).val(),ApiClient.updateNamedConfiguration("metadata",config)})}function alertText(options){require(["alert"],function(alert){alert(options)})}function onSubmitFail(response){loading.hide(),response&&404===response.status?alertText("The metadata path entered could not be found. Please ensure the path is valid and try again."):response&&500===response.status&&alertText("The metadata path entered is not valid. Please ensure the path exists and that Emby server has write access to the folder.")}function onSubmit(){loading.show();var form=this;return ApiClient.getServerConfiguration().then(function(config){config.SaveMetadataHidden=$("#chkSaveMetadataHidden",form).checked(),config.EnableTvDbUpdates=$("#chkEnableTvdbUpdates",form).checked(),config.EnableTmdbUpdates=$("#chkEnableTmdbUpdates",form).checked(),config.EnableFanArtUpdates=$("#chkEnableFanartUpdates",form).checked(),config.MetadataPath=$("#txtMetadataPath",form).val(),config.MetadataNetworkPath=$("#txtMetadataNetworkPath",form).val(),config.FanartApiKey=$("#txtFanartApiKey",form).val(),ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult,onSubmitFail)}),saveMetadata(form),saveFanart(form),!1}function getTabs(){return[{href:"library.html",name:Globalize.translate("HeaderLibraries")},{href:"librarydisplay.html",name:Globalize.translate("TabDisplay")},{href:"metadataimages.html",name:Globalize.translate("TabMetadata")},{href:"metadatanfo.html",name:Globalize.translate("TabNfoSettings")},{href:"librarysettings.html",name:Globalize.translate("TabAdvanced")}]}return function(view,params){$("#btnSelectMetadataPath",view).on("click.selectDirectory",function(){require(["directorybrowser"],function(directoryBrowser){var picker=new directoryBrowser;picker.show({path:$("#txtMetadataPath",view).val(),networkSharePath:$("#txtMetadataNetworkPath",view).val(),callback:function(path,networkPath){path&&($("#txtMetadataPath",view).val(path),$("#txtMetadataNetworkPath",view).val(networkPath)),picker.close()},validateWriteable:!0,header:Globalize.translate("HeaderSelectMetadataPath"),instruction:Globalize.translate("HeaderSelectMetadataPathHelp"),enableNetworkSharePath:!0})})}),$(".librarySettingsForm").off("submit",onSubmit).on("submit",onSubmit),view.addEventListener("viewshow",function(){libraryMenu.setTabs("librarysetup",4,getTabs),loading.show();var page=this;ApiClient.getServerConfiguration().then(function(config){loadPage(page,config)}),ApiClient.getNamedConfiguration("metadata").then(function(metadata){loadMetadataConfig(page,metadata)}),ApiClient.getNamedConfiguration("fanart").then(function(metadata){loadFanartConfig(page,metadata)}),ApiClient.getSystemInfo().then(function(info){"Windows"===info.OperatingSystem?page.querySelector(".fldSaveMetadataHidden").classList.remove("hide"):page.querySelector(".fldSaveMetadataHidden").classList.add("hide")})})}}); \ No newline at end of file diff --git a/dashboard-ui/librarysettings.html b/dashboard-ui/librarysettings.html index 117d1b1c03..2b19f54a36 100644 --- a/dashboard-ui/librarysettings.html +++ b/dashboard-ui/librarysettings.html @@ -21,7 +21,7 @@
${LabelMetadataPathHelp}
-
+
"),currentStartDate=itemStartDate,currentItems=[]),currentItems.push(item)}page.querySelector(".programGuide").innerHTML=html}function renderChannelGuide(page,apiClient,item){"TvChannel"===item.Type&&(page.querySelector(".programGuideSection").classList.remove("hide"),apiClient.getLiveTvPrograms({ChannelIds:item.Id,UserId:apiClient.getCurrentUserId(),HasAired:!1,SortBy:"StartDate",EnableTotalRecordCount:!1,EnableImages:!1,ImageTypeLimit:0,EnableUserData:!1}).then(function(result){renderProgramsForChannel(page,result)}))}function renderSeriesSchedule(page,item,user){return}function inferContext(item){return"Movie"===item.Type||"BoxSet"===item.Type?"movies":"Series"===item.Type||"Season"===item.Type||"Episode"===item.Type?"tvshows":"Game"===item.Type||"GameSystem"===item.Type?"games":"Game"===item.Type||"GameSystem"===item.Type?"games":"MusicArtist"===item.Type||"MusicAlbum"===item.Type?"music":null}function filterItemsByCollectionItemType(items,typeInfo){return items.filter(function(item){return typeInfo.mediaType?item.MediaType==typeInfo.mediaType:item.Type==typeInfo.type})}function renderCollectionItems(page,parentItem,types,items){page.querySelector(".collectionItems").innerHTML="";var i,length;for(i=0,length=types.length;i0}).length});otherTypeItems.length&&renderCollectionItemType(page,parentItem,otherType,otherTypeItems),items.length||renderCollectionItemType(page,parentItem,{name:globalize.translate("HeaderItems")},items)}function renderCollectionItemType(page,parentItem,type,items){var html="";html+='
',html+='
',html+='

',html+=""+type.name+"",html+="

",html+='',html+="
",html+='
';var shape="MusicAlbum"==type.type?getSquareShape(!1):getPortraitShape(!1);html+=cardBuilder.getCardsHtml({items:items,shape:shape,showTitle:!0,centerText:!0,lazy:!0,showDetailsMenu:!0,overlayMoreButton:!0,showAddToCollection:!1,showRemoveFromCollection:!0,collectionId:parentItem.Id}),html+="
",html+="
";var collectionItems=page.querySelector(".collectionItems");collectionItems.insertAdjacentHTML("beforeend",html),imageLoader.lazyChildren(collectionItems),collectionItems.querySelector(".btnAddToCollection").addEventListener("click",function(){require(["alert"],function(alert){alert({text:globalize.translate("AddItemToCollectionHelp"),html:globalize.translate("AddItemToCollectionHelp")+'

'+globalize.translate("ButtonLearnMore")+""})})})}function renderThemeMedia(page,item){if("SeriesTimer"!==item.Type&&"Timer"!==item.Type&&"Genre"!==item.Type&&"MusicGenre"!==item.Type&&"GameGenre"!==item.Type&&"Studio"!==item.Type&&"Person"!==item.Type){var apiClient=connectionManager.getApiClient(item.ServerId);apiClient.getThemeMedia(apiClient.getCurrentUserId(),item.Id,!0).then(function(result){var themeSongs=result.ThemeSongsResult.OwnerId==item.Id?result.ThemeSongsResult.Items:[],themeVideos=result.ThemeVideosResult.OwnerId==item.Id?result.ThemeVideosResult.Items:[];renderThemeSongs(page,themeSongs),renderThemeVideos(page,themeVideos)})}}function renderThemeSongs(page,items){if(items.length){page.querySelector("#themeSongsCollapsible").classList.remove("hide");var html=listView.getListViewHtml({items:items});page.querySelector("#themeSongsContent").innerHTML=html}else page.querySelector("#themeSongsCollapsible").classList.add("hide")}function renderThemeVideos(page,items,user){if(items.length){page.querySelector("#themeVideosCollapsible").classList.remove("hide");var themeVideosContent=page.querySelector("#themeVideosContent");themeVideosContent.innerHTML=getVideosHtml(items,user),imageLoader.lazyChildren(themeVideosContent)}else page.querySelector("#themeVideosCollapsible").classList.add("hide")}function renderMusicVideos(page,item,user){connectionManager.getApiClient(item.ServerId).getItems(user.Id,{SortBy:"SortName",SortOrder:"Ascending",IncludeItemTypes:"MusicVideo",Recursive:!0,Fields:"DateCreated,CanDelete",AlbumIds:item.Id}).then(function(result){if(result.Items.length){page.querySelector("#musicVideosCollapsible").classList.remove("hide");var musicVideosContent=page.querySelector(".musicVideosContent");musicVideosContent.innerHTML=getVideosHtml(result.Items,user),imageLoader.lazyChildren(musicVideosContent)}else page.querySelector("#musicVideosCollapsible").classList.add("hide")})}function renderAdditionalParts(page,item,user){connectionManager.getApiClient(item.ServerId).getAdditionalVideoParts(user.Id,item.Id).then(function(result){if(result.Items.length){page.querySelector("#additionalPartsCollapsible").classList.remove("hide");var additionalPartsContent=page.querySelector("#additionalPartsContent");additionalPartsContent.innerHTML=getVideosHtml(result.Items,user),imageLoader.lazyChildren(additionalPartsContent)}else page.querySelector("#additionalPartsCollapsible").classList.add("hide")})}function renderScenes(page,item){var chapters=item.Chapters||[];if(chapters.length&&!chapters[0].ImageTag&&(chapters=[]),chapters.length){page.querySelector("#scenesCollapsible").classList.remove("hide");var scenesContent=page.querySelector("#scenesContent");enableScrollX()?scenesContent.classList.add("smoothScrollX"):scenesContent.classList.add("vertical-wrap"),require(["chaptercardbuilder"],function(chaptercardbuilder){chaptercardbuilder.buildChapterCards(item,chapters,{itemsContainer:scenesContent,width:400,backdropShape:getThumbShape(),squareShape:getSquareShape()})})}else page.querySelector("#scenesCollapsible").classList.add("hide")}function renderMediaSources(page,user,item){var html=item.MediaSources.map(function(v){return getMediaSourceHtml(user,item,v)}).join('
');item.MediaSources.length>1&&(html="
"+html);var mediaInfoContent=page.querySelector("#mediaInfoContent");mediaInfoContent.innerHTML=html,html?page.querySelector(".audioVideoMediaInfo").classList.remove("hide"):page.querySelector(".audioVideoMediaInfo").classList.add("hide")}function getMediaSourceHtml(user,item,version){var html="";version.Name&&item.MediaSources.length>1&&(html+='
'+version.Name+"

");for(var i=0,length=version.MediaStreams.length;i';var displayType=globalize.translate("MediaInfoStreamType"+stream.Type);html+='

'+displayType+"

";var attributes=[];stream.Language&&"Video"!=stream.Type&&attributes.push(createAttribute(globalize.translate("MediaInfoLanguage"),stream.Language)),stream.Codec&&attributes.push(createAttribute(globalize.translate("MediaInfoCodec"),stream.Codec.toUpperCase())),stream.CodecTag&&attributes.push(createAttribute(globalize.translate("MediaInfoCodecTag"),stream.CodecTag)),null!=stream.IsAVC&&attributes.push(createAttribute("AVC",stream.IsAVC?"Yes":"No")),stream.Profile&&attributes.push(createAttribute(globalize.translate("MediaInfoProfile"),stream.Profile)),stream.Level&&attributes.push(createAttribute(globalize.translate("MediaInfoLevel"),stream.Level)),(stream.Width||stream.Height)&&attributes.push(createAttribute(globalize.translate("MediaInfoResolution"),stream.Width+"x"+stream.Height)),stream.AspectRatio&&"mjpeg"!=stream.Codec&&attributes.push(createAttribute(globalize.translate("MediaInfoAspectRatio"),stream.AspectRatio)),"Video"==stream.Type&&(null!=stream.IsAnamorphic&&attributes.push(createAttribute(globalize.translate("MediaInfoAnamorphic"),stream.IsAnamorphic?"Yes":"No")),attributes.push(createAttribute(globalize.translate("MediaInfoInterlaced"),stream.IsInterlaced?"Yes":"No"))),(stream.AverageFrameRate||stream.RealFrameRate)&&attributes.push(createAttribute(globalize.translate("MediaInfoFramerate"),stream.AverageFrameRate||stream.RealFrameRate)),stream.ChannelLayout&&attributes.push(createAttribute(globalize.translate("MediaInfoLayout"),stream.ChannelLayout)),stream.Channels&&attributes.push(createAttribute(globalize.translate("MediaInfoChannels"),stream.Channels+" ch")),stream.BitRate&&"mjpeg"!=stream.Codec&&attributes.push(createAttribute(globalize.translate("MediaInfoBitrate"),parseInt(stream.BitRate/1e3)+" kbps")),stream.SampleRate&&attributes.push(createAttribute(globalize.translate("MediaInfoSampleRate"),stream.SampleRate+" Hz")),stream.BitDepth&&attributes.push(createAttribute(globalize.translate("MediaInfoBitDepth"),stream.BitDepth+" bit")),stream.PixelFormat&&attributes.push(createAttribute(globalize.translate("MediaInfoPixelFormat"),stream.PixelFormat)),stream.RefFrames&&attributes.push(createAttribute(globalize.translate("MediaInfoRefFrames"),stream.RefFrames)),stream.NalLengthSize&&attributes.push(createAttribute("NAL",stream.NalLengthSize)),"Video"!=stream.Type&&attributes.push(createAttribute(globalize.translate("MediaInfoDefault"),stream.IsDefault?"Yes":"No")),"Subtitle"==stream.Type&&(attributes.push(createAttribute(globalize.translate("MediaInfoForced"),stream.IsForced?"Yes":"No")),attributes.push(createAttribute(globalize.translate("MediaInfoExternal"),stream.IsExternal?"Yes":"No"))),"Video"==stream.Type&&version.Timestamp&&attributes.push(createAttribute(globalize.translate("MediaInfoTimestamp"),version.Timestamp)),stream.DisplayTitle&&attributes.push(createAttribute("Title",stream.DisplayTitle)),html+=attributes.join("
"),html+="
"}}if(version.Container&&(html+='
'+globalize.translate("MediaInfoContainer")+''+version.Container+"
"),version.Formats&&version.Formats.length,version.Path&&"Http"!=version.Protocol&&user&&user.Policy.IsAdministrator&&(html+='
'+globalize.translate("MediaInfoPath")+''+version.Path+"
"),version.Size){var size=(version.Size/1048576).toFixed(0);html+='
'+globalize.translate("MediaInfoSize")+''+size+" MB
"}return html}function createAttribute(label,value){return''+label+''+value+""}function getVideosHtml(items,user,limit,moreButtonClass){var html=cardBuilder.getCardsHtml({items:items,shape:"auto",showTitle:!0,action:"play",overlayText:!1,centerText:!0,showRuntime:!0});return limit&&items.length>limit&&(html+='

"),html}function renderSpecials(page,item,user,limit){connectionManager.getApiClient(item.ServerId).getSpecialFeatures(user.Id,item.Id).then(function(specials){var specialsContent=page.querySelector("#specialsContent");specialsContent.innerHTML=getVideosHtml(specials,user,limit,"moreSpecials"),imageLoader.lazyChildren(specialsContent)})}function renderCast(page,item,context,limit,isStatic){var people=(item.People||[]).filter(function(p){return"Director"!==p.Type});if(!people.length)return void page.querySelector("#castCollapsible").classList.add("hide");page.querySelector("#castCollapsible").classList.remove("hide");var castContent=page.querySelector("#castContent");enableScrollX()?(castContent.classList.add("smoothScrollX"),limit=32):castContent.classList.add("vertical-wrap");var limitExceeded=limit&&people.length>limit;limitExceeded&&(people=people.slice(0),people.length=Math.min(limit,people.length)),require(["peoplecardbuilder"],function(peoplecardbuilder){peoplecardbuilder.buildPeopleCards(people,{itemsContainer:castContent,coverImage:!0,serverId:item.ServerId,width:160,shape:getPortraitShape()})});var morePeopleButton=page.querySelector(".morePeople");morePeopleButton&&(limitExceeded&&!enableScrollX()?morePeopleButton.classList.remove("hide"):morePeopleButton.classList.add("hide"))}function itemDetailPage(){var self=this;self.setInitialCollapsibleState=setInitialCollapsibleState,self.renderDetails=renderDetails,self.renderCast=renderCast,self.renderMediaSources=renderMediaSources}function bindAll(view,selector,eventName,fn){var i,length,elems=view.querySelectorAll(selector);for(i=0,length=elems.length;i',html+='

'+datetime.toLocaleDateString(currentStartDate,{weekday:"long",month:"long",day:"numeric"})+"

",html+='
'+listView.getListViewHtml({items:currentItems,enableUserDataButtons:!1,showParentTitle:!0,image:!1,showProgramTime:!0,mediaInfo:!1,parentTitleWithTitle:!0})+"
"),currentStartDate=itemStartDate,currentItems=[]),currentItems.push(item)}page.querySelector(".programGuide").innerHTML=html}function renderChannelGuide(page,apiClient,item){"TvChannel"===item.Type&&(page.querySelector(".programGuideSection").classList.remove("hide"),apiClient.getLiveTvPrograms({ChannelIds:item.Id,UserId:apiClient.getCurrentUserId(),HasAired:!1,SortBy:"StartDate",EnableTotalRecordCount:!1,EnableImages:!1,ImageTypeLimit:0,EnableUserData:!1}).then(function(result){renderProgramsForChannel(page,result)}))}function renderSeriesSchedule(page,item,user){return}function inferContext(item){return"Movie"===item.Type||"BoxSet"===item.Type?"movies":"Series"===item.Type||"Season"===item.Type||"Episode"===item.Type?"tvshows":"Game"===item.Type||"GameSystem"===item.Type?"games":"Game"===item.Type||"GameSystem"===item.Type?"games":"MusicArtist"===item.Type||"MusicAlbum"===item.Type?"music":null}function filterItemsByCollectionItemType(items,typeInfo){return items.filter(function(item){return typeInfo.mediaType?item.MediaType==typeInfo.mediaType:item.Type==typeInfo.type})}function renderCollectionItems(page,parentItem,types,items){page.querySelector(".collectionItems").innerHTML="";var i,length;for(i=0,length=types.length;i0}).length});otherTypeItems.length&&renderCollectionItemType(page,parentItem,otherType,otherTypeItems),items.length||renderCollectionItemType(page,parentItem,{name:globalize.translate("HeaderItems")},items)}function renderCollectionItemType(page,parentItem,type,items){var html="";html+='
',html+='
',html+='

',html+=""+type.name+"",html+="

",html+='',html+="
",html+='
';var shape="MusicAlbum"==type.type?getSquareShape(!1):getPortraitShape(!1);html+=cardBuilder.getCardsHtml({items:items,shape:shape,showTitle:!0,centerText:!0,lazy:!0,showDetailsMenu:!0,overlayMoreButton:!0,showAddToCollection:!1,showRemoveFromCollection:!0,collectionId:parentItem.Id}),html+="
",html+="
";var collectionItems=page.querySelector(".collectionItems");collectionItems.insertAdjacentHTML("beforeend",html),imageLoader.lazyChildren(collectionItems),collectionItems.querySelector(".btnAddToCollection").addEventListener("click",function(){require(["alert"],function(alert){alert({text:globalize.translate("AddItemToCollectionHelp"),html:globalize.translate("AddItemToCollectionHelp")+'

'+globalize.translate("ButtonLearnMore")+""})})})}function renderThemeMedia(page,item){if("SeriesTimer"!==item.Type&&"Timer"!==item.Type&&"Genre"!==item.Type&&"MusicGenre"!==item.Type&&"GameGenre"!==item.Type&&"Studio"!==item.Type&&"Person"!==item.Type){var apiClient=connectionManager.getApiClient(item.ServerId);apiClient.getThemeMedia(apiClient.getCurrentUserId(),item.Id,!0).then(function(result){var themeSongs=result.ThemeSongsResult.OwnerId==item.Id?result.ThemeSongsResult.Items:[],themeVideos=result.ThemeVideosResult.OwnerId==item.Id?result.ThemeVideosResult.Items:[];renderThemeSongs(page,themeSongs),renderThemeVideos(page,themeVideos)})}}function renderThemeSongs(page,items){if(items.length){page.querySelector("#themeSongsCollapsible").classList.remove("hide");var html=listView.getListViewHtml({items:items});page.querySelector("#themeSongsContent").innerHTML=html}else page.querySelector("#themeSongsCollapsible").classList.add("hide")}function renderThemeVideos(page,items,user){if(items.length){page.querySelector("#themeVideosCollapsible").classList.remove("hide");var themeVideosContent=page.querySelector("#themeVideosContent");themeVideosContent.innerHTML=getVideosHtml(items,user),imageLoader.lazyChildren(themeVideosContent)}else page.querySelector("#themeVideosCollapsible").classList.add("hide")}function renderMusicVideos(page,item,user){connectionManager.getApiClient(item.ServerId).getItems(user.Id,{SortBy:"SortName",SortOrder:"Ascending",IncludeItemTypes:"MusicVideo",Recursive:!0,Fields:"DateCreated,CanDelete",AlbumIds:item.Id}).then(function(result){if(result.Items.length){page.querySelector("#musicVideosCollapsible").classList.remove("hide");var musicVideosContent=page.querySelector(".musicVideosContent");musicVideosContent.innerHTML=getVideosHtml(result.Items,user),imageLoader.lazyChildren(musicVideosContent)}else page.querySelector("#musicVideosCollapsible").classList.add("hide")})}function renderAdditionalParts(page,item,user){connectionManager.getApiClient(item.ServerId).getAdditionalVideoParts(user.Id,item.Id).then(function(result){if(result.Items.length){page.querySelector("#additionalPartsCollapsible").classList.remove("hide");var additionalPartsContent=page.querySelector("#additionalPartsContent");additionalPartsContent.innerHTML=getVideosHtml(result.Items,user),imageLoader.lazyChildren(additionalPartsContent)}else page.querySelector("#additionalPartsCollapsible").classList.add("hide")})}function renderScenes(page,item){var chapters=item.Chapters||[];if(chapters.length&&!chapters[0].ImageTag&&(chapters=[]),chapters.length){page.querySelector("#scenesCollapsible").classList.remove("hide");var scenesContent=page.querySelector("#scenesContent");enableScrollX()?scenesContent.classList.add("scrollX"):scenesContent.classList.add("vertical-wrap"),require(["chaptercardbuilder"],function(chaptercardbuilder){chaptercardbuilder.buildChapterCards(item,chapters,{itemsContainer:scenesContent,width:400,backdropShape:getThumbShape(),squareShape:getSquareShape()})})}else page.querySelector("#scenesCollapsible").classList.add("hide")}function renderMediaSources(page,user,item){var html=item.MediaSources.map(function(v){return getMediaSourceHtml(user,item,v)}).join('
');item.MediaSources.length>1&&(html="
"+html);var mediaInfoContent=page.querySelector("#mediaInfoContent");mediaInfoContent.innerHTML=html,html?page.querySelector(".audioVideoMediaInfo").classList.remove("hide"):page.querySelector(".audioVideoMediaInfo").classList.add("hide")}function getMediaSourceHtml(user,item,version){var html="";version.Name&&item.MediaSources.length>1&&(html+='
'+version.Name+"

");for(var i=0,length=version.MediaStreams.length;i';var displayType=globalize.translate("MediaInfoStreamType"+stream.Type);html+='

'+displayType+"

";var attributes=[];stream.Language&&"Video"!=stream.Type&&attributes.push(createAttribute(globalize.translate("MediaInfoLanguage"),stream.Language)),stream.Codec&&attributes.push(createAttribute(globalize.translate("MediaInfoCodec"),stream.Codec.toUpperCase())),stream.CodecTag&&attributes.push(createAttribute(globalize.translate("MediaInfoCodecTag"),stream.CodecTag)),null!=stream.IsAVC&&attributes.push(createAttribute("AVC",stream.IsAVC?"Yes":"No")),stream.Profile&&attributes.push(createAttribute(globalize.translate("MediaInfoProfile"),stream.Profile)),stream.Level&&attributes.push(createAttribute(globalize.translate("MediaInfoLevel"),stream.Level)),(stream.Width||stream.Height)&&attributes.push(createAttribute(globalize.translate("MediaInfoResolution"),stream.Width+"x"+stream.Height)),stream.AspectRatio&&"mjpeg"!=stream.Codec&&attributes.push(createAttribute(globalize.translate("MediaInfoAspectRatio"),stream.AspectRatio)),"Video"==stream.Type&&(null!=stream.IsAnamorphic&&attributes.push(createAttribute(globalize.translate("MediaInfoAnamorphic"),stream.IsAnamorphic?"Yes":"No")),attributes.push(createAttribute(globalize.translate("MediaInfoInterlaced"),stream.IsInterlaced?"Yes":"No"))),(stream.AverageFrameRate||stream.RealFrameRate)&&attributes.push(createAttribute(globalize.translate("MediaInfoFramerate"),stream.AverageFrameRate||stream.RealFrameRate)),stream.ChannelLayout&&attributes.push(createAttribute(globalize.translate("MediaInfoLayout"),stream.ChannelLayout)),stream.Channels&&attributes.push(createAttribute(globalize.translate("MediaInfoChannels"),stream.Channels+" ch")),stream.BitRate&&"mjpeg"!=stream.Codec&&attributes.push(createAttribute(globalize.translate("MediaInfoBitrate"),parseInt(stream.BitRate/1e3)+" kbps")),stream.SampleRate&&attributes.push(createAttribute(globalize.translate("MediaInfoSampleRate"),stream.SampleRate+" Hz")),stream.BitDepth&&attributes.push(createAttribute(globalize.translate("MediaInfoBitDepth"),stream.BitDepth+" bit")),stream.PixelFormat&&attributes.push(createAttribute(globalize.translate("MediaInfoPixelFormat"),stream.PixelFormat)),stream.RefFrames&&attributes.push(createAttribute(globalize.translate("MediaInfoRefFrames"),stream.RefFrames)),stream.NalLengthSize&&attributes.push(createAttribute("NAL",stream.NalLengthSize)),"Video"!=stream.Type&&attributes.push(createAttribute(globalize.translate("MediaInfoDefault"),stream.IsDefault?"Yes":"No")),"Subtitle"==stream.Type&&(attributes.push(createAttribute(globalize.translate("MediaInfoForced"),stream.IsForced?"Yes":"No")),attributes.push(createAttribute(globalize.translate("MediaInfoExternal"),stream.IsExternal?"Yes":"No"))),"Video"==stream.Type&&version.Timestamp&&attributes.push(createAttribute(globalize.translate("MediaInfoTimestamp"),version.Timestamp)),stream.DisplayTitle&&attributes.push(createAttribute("Title",stream.DisplayTitle)),html+=attributes.join("
"),html+=""}}if(version.Container&&(html+='
'+globalize.translate("MediaInfoContainer")+''+version.Container+"
"),version.Formats&&version.Formats.length,version.Path&&"Http"!=version.Protocol&&user&&user.Policy.IsAdministrator&&(html+='
'+globalize.translate("MediaInfoPath")+''+version.Path+"
"),version.Size){var size=(version.Size/1048576).toFixed(0);html+='
'+globalize.translate("MediaInfoSize")+''+size+" MB
"}return html}function createAttribute(label,value){return''+label+''+value+""}function getVideosHtml(items,user,limit,moreButtonClass){var html=cardBuilder.getCardsHtml({items:items,shape:"auto",showTitle:!0,action:"play",overlayText:!1,centerText:!0,showRuntime:!0});return limit&&items.length>limit&&(html+='

"),html}function renderSpecials(page,item,user,limit){connectionManager.getApiClient(item.ServerId).getSpecialFeatures(user.Id,item.Id).then(function(specials){var specialsContent=page.querySelector("#specialsContent");specialsContent.innerHTML=getVideosHtml(specials,user,limit,"moreSpecials"),imageLoader.lazyChildren(specialsContent)})}function renderCast(page,item,context,limit,isStatic){var people=(item.People||[]).filter(function(p){return"Director"!==p.Type});if(!people.length)return void page.querySelector("#castCollapsible").classList.add("hide");page.querySelector("#castCollapsible").classList.remove("hide");var castContent=page.querySelector("#castContent");enableScrollX()?(castContent.classList.add("scrollX"),limit=32):castContent.classList.add("vertical-wrap");var limitExceeded=limit&&people.length>limit;limitExceeded&&(people=people.slice(0),people.length=Math.min(limit,people.length)),require(["peoplecardbuilder"],function(peoplecardbuilder){peoplecardbuilder.buildPeopleCards(people,{itemsContainer:castContent,coverImage:!0,serverId:item.ServerId,width:160,shape:getPortraitShape()})});var morePeopleButton=page.querySelector(".morePeople");morePeopleButton&&(limitExceeded&&!enableScrollX()?morePeopleButton.classList.remove("hide"):morePeopleButton.classList.add("hide"))}function itemDetailPage(){var self=this;self.setInitialCollapsibleState=setInitialCollapsibleState,self.renderDetails=renderDetails,self.renderCast=renderCast,self.renderMediaSources=renderMediaSources}function bindAll(view,selector,eventName,fn){var i,length,elems=view.querySelectorAll(selector);for(i=0,length=elems.length;i',showControls){html+='';var startAtDisplay=totalRecordCount?startIndex+1:0;html+=startAtDisplay+"-"+recordsEnd+" of "+totalRecordCount,html+=""}return(showControls||options.viewButton||options.filterButton||options.sortButton||options.addLayoutButton)&&(html+='
',showControls&&(html+='',html+=''),options.addLayoutButton&&(html+=''),options.sortButton&&(html+=''),options.filterButton&&(html+=''),html+="
"),html+=""},showSortMenu:function(options){require(["dialogHelper","emby-radio"],function(dialogHelper){function onSortByChange(){var newValue=this.value;if(this.checked){var changed=options.query.SortBy!=newValue;options.query.SortBy=newValue.replace("_",","),options.query.StartIndex=0,options.callback&&changed&&options.callback()}}function onSortOrderChange(){var newValue=this.value;if(this.checked){var changed=options.query.SortOrder!=newValue;options.query.SortOrder=newValue,options.query.StartIndex=0,options.callback&&changed&&options.callback()}}var dlg=dialogHelper.createDialog({removeOnClose:!0,modal:!1,entryAnimationDuration:160,exitAnimationDuration:200});dlg.classList.add("ui-body-a"),dlg.classList.add("background-theme-a"),dlg.classList.add("formDialog");var html="";html+='
',html+='

',html+=Globalize.translate("HeaderSortBy"),html+="

";var i,length,isChecked;for(html+="
",i=0,length=options.items.length;i"+option.name+""}html+="
",html+='

',html+=Globalize.translate("HeaderSortOrder"),html+="

",html+="
",isChecked="Ascending"==options.query.SortOrder?" checked":"",html+='",isChecked="Descending"==options.query.SortOrder?" checked":"",html+='",html+="
",html+="
",dlg.innerHTML=html,dialogHelper.open(dlg);var sortBys=dlg.querySelectorAll(".menuSortBy");for(i=0,length=sortBys.length;i',editable&&(html+=""),detectRatio&&item.PrimaryImageAspectRatio&&(item.PrimaryImageAspectRatio>=1.48?shape="thumb":item.PrimaryImageAspectRatio>=.85&&item.PrimaryImageAspectRatio<=1.34&&(shape="square")),html+="",editable&&(html+="");var progressHtml=item.IsFolder||!item.UserData?"":indicators.getProgressBarHtml(item);if(html+='
',progressHtml&&(html+=progressHtml),html+="
",html+="",elem.innerHTML=html,"thumb"==shape?(elem.classList.add("thumbDetailImageContainer"),elem.classList.remove("portraitDetailImageContainer"),elem.classList.remove("squareDetailImageContainer")):"square"==shape?(elem.classList.remove("thumbDetailImageContainer"),elem.classList.remove("portraitDetailImageContainer"),elem.classList.add("squareDetailImageContainer")):(elem.classList.remove("thumbDetailImageContainer"),elem.classList.add("portraitDetailImageContainer"),elem.classList.remove("squareDetailImageContainer")),url){var img=elem.querySelector("img");img.onload=function(){img.src.indexOf("empty.png")==-1&&img.classList.add("loaded")},imageLoader.lazyImage(img,url)}},renderDetailPageBackdrop:function(page,item,apiClient,imageLoader,indicators){var imgUrl,screenWidth=screen.availWidth,hasbackdrop=!1,itemBackdropElement=page.querySelector("#itemBackdrop"),usePrimaryImage="Video"===item.MediaType&&"Movie"!==item.Type&&"Trailer"!==item.Type||item.MediaType&&"Video"!==item.MediaType,useThumbImage="Program"===item.Type;return useThumbImage&&item.ImageTags&&item.ImageTags.Thumb?(imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",index:0,maxWidth:screenWidth,tag:item.ImageTags.Thumb}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):usePrimaryImage&&item.ImageTags&&item.ImageTags.Primary?(imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Primary",index:0,maxWidth:screenWidth,tag:item.ImageTags.Primary}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):item.BackdropImageTags&&item.BackdropImageTags.length?(imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Backdrop",index:0,maxWidth:screenWidth,tag:item.BackdropImageTags[0]}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):item.ParentBackdropItemId&&item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length?(imgUrl=apiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",index:0,tag:item.ParentBackdropImageTags[0],maxWidth:screenWidth}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):item.ImageTags&&item.ImageTags.Thumb?(imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",index:0,maxWidth:screenWidth,tag:item.ImageTags.Thumb}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):(itemBackdropElement.classList.add("noBackdrop"),itemBackdropElement.style.backgroundImage=""),hasbackdrop}};return window.LibraryBrowser=libraryBrowser,libraryBrowser}); \ No newline at end of file +define(["appSettings","userSettings","dom","browser","datetime","appRouter","events","scrollStyles"],function(appSettings,userSettings,dom,browser,datetime,appRouter,events){"use strict";var libraryBrowser={getDefaultPageSize:function(key,defaultValue){return 100},getSavedQueryKey:function(modifier){return window.location.href.split("#")[0]+(modifier||"")},loadSavedQueryValues:function(key,query){var values=userSettings.get(key);return values?(values=JSON.parse(values),Object.assign(query,values)):query},saveQueryValues:function(key,query){var values={};query.SortBy&&(values.SortBy=query.SortBy),query.SortOrder&&(values.SortOrder=query.SortOrder),userSettings.set(key,JSON.stringify(values))},saveViewSetting:function(key,value){userSettings.set(key+"-_view",value)},getSavedView:function(key){return userSettings.get(key+"-_view")},getSavedViewSetting:function(key){return new Promise(function(resolve,reject){var val=libraryBrowser.getSavedView(key);resolve(val)})},getListItemInfo:function(elem){for(var elemWithAttributes=elem;!elemWithAttributes.getAttribute("data-id");)elemWithAttributes=elemWithAttributes.parentNode;var itemId=elemWithAttributes.getAttribute("data-id"),index=elemWithAttributes.getAttribute("data-index"),mediaType=elemWithAttributes.getAttribute("data-mediatype");return{id:itemId,index:index,mediaType:mediaType,context:elemWithAttributes.getAttribute("data-context")}},showLayoutMenu:function(button,currentLayout,views){var dispatchEvent=!0;views||(dispatchEvent=!1,views=button.getAttribute("data-layouts"),views=views?views.split(","):["List","Poster","PosterCard","Thumb","ThumbCard"]);var menuItems=views.map(function(v){return{name:Globalize.translate("Option"+v),id:v,selected:currentLayout==v}});require(["actionsheet"],function(actionsheet){actionsheet.show({items:menuItems,positionTo:button,callback:function(id){button.dispatchEvent(new CustomEvent("layoutchange",{detail:{viewStyle:id},bubbles:!0,cancelable:!1})),dispatchEvent||window.$&&$(button).trigger("layoutchange",[id])}})})},getQueryPagingHtml:function(options){var startIndex=options.startIndex,limit=options.limit,totalRecordCount=options.totalRecordCount,html="",recordsEnd=Math.min(startIndex+limit,totalRecordCount),showControls=limit',showControls){html+='';var startAtDisplay=totalRecordCount?startIndex+1:0;html+=startAtDisplay+"-"+recordsEnd+" of "+totalRecordCount,html+=""}return(showControls||options.viewButton||options.filterButton||options.sortButton||options.addLayoutButton)&&(html+='
',showControls&&(html+='',html+=''),options.addLayoutButton&&(html+=''),options.sortButton&&(html+=''),options.filterButton&&(html+=''),html+="
"),html+=""},showSortMenu:function(options){require(["dialogHelper","emby-radio"],function(dialogHelper){function onSortByChange(){var newValue=this.value;if(this.checked){var changed=options.query.SortBy!=newValue;options.query.SortBy=newValue.replace("_",","),options.query.StartIndex=0,options.callback&&changed&&options.callback()}}function onSortOrderChange(){var newValue=this.value;if(this.checked){var changed=options.query.SortOrder!=newValue;options.query.SortOrder=newValue,options.query.StartIndex=0,options.callback&&changed&&options.callback()}}var dlg=dialogHelper.createDialog({removeOnClose:!0,modal:!1,entryAnimationDuration:160,exitAnimationDuration:200});dlg.classList.add("ui-body-a"),dlg.classList.add("background-theme-a"),dlg.classList.add("formDialog");var html="";html+='
',html+='

',html+=Globalize.translate("HeaderSortBy"),html+="

";var i,length,isChecked;for(html+="
",i=0,length=options.items.length;i"+option.name+""}html+="
",html+='

',html+=Globalize.translate("HeaderSortOrder"),html+="

",html+="
",isChecked="Ascending"==options.query.SortOrder?" checked":"",html+='",isChecked="Descending"==options.query.SortOrder?" checked":"",html+='",html+="
",html+="
",dlg.innerHTML=html,dialogHelper.open(dlg);var sortBys=dlg.querySelectorAll(".menuSortBy");for(i=0,length=sortBys.length;i',editable&&(html+=""),detectRatio&&item.PrimaryImageAspectRatio&&(item.PrimaryImageAspectRatio>=1.48?shape="thumb":item.PrimaryImageAspectRatio>=.85&&item.PrimaryImageAspectRatio<=1.34&&(shape="square")),html+="",editable&&(html+="");var progressHtml=item.IsFolder||!item.UserData?"":indicators.getProgressBarHtml(item);if(html+='
',progressHtml&&(html+=progressHtml),html+="
",html+="",elem.innerHTML=html,"thumb"==shape?(elem.classList.add("thumbDetailImageContainer"),elem.classList.remove("portraitDetailImageContainer"),elem.classList.remove("squareDetailImageContainer")):"square"==shape?(elem.classList.remove("thumbDetailImageContainer"),elem.classList.remove("portraitDetailImageContainer"),elem.classList.add("squareDetailImageContainer")):(elem.classList.remove("thumbDetailImageContainer"),elem.classList.add("portraitDetailImageContainer"),elem.classList.remove("squareDetailImageContainer")),url){var img=elem.querySelector("img");img.onload=function(){img.src.indexOf("empty.png")==-1&&img.classList.add("loaded")},imageLoader.lazyImage(img,url)}},renderDetailPageBackdrop:function(page,item,apiClient,imageLoader,indicators){var imgUrl,screenWidth=screen.availWidth,hasbackdrop=!1,itemBackdropElement=page.querySelector("#itemBackdrop"),usePrimaryImage="Video"===item.MediaType&&"Movie"!==item.Type&&"Trailer"!==item.Type||item.MediaType&&"Video"!==item.MediaType,useThumbImage="Program"===item.Type;return useThumbImage&&item.ImageTags&&item.ImageTags.Thumb?(imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",index:0,maxWidth:screenWidth,tag:item.ImageTags.Thumb}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):usePrimaryImage&&item.ImageTags&&item.ImageTags.Primary?(imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Primary",index:0,maxWidth:screenWidth,tag:item.ImageTags.Primary}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):item.BackdropImageTags&&item.BackdropImageTags.length?(imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Backdrop",index:0,maxWidth:screenWidth,tag:item.BackdropImageTags[0]}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):item.ParentBackdropItemId&&item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length?(imgUrl=apiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",index:0,tag:item.ParentBackdropImageTags[0],maxWidth:screenWidth}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):item.ImageTags&&item.ImageTags.Thumb?(imgUrl=apiClient.getScaledImageUrl(item.Id,{type:"Thumb",index:0,maxWidth:screenWidth,tag:item.ImageTags.Thumb}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):(itemBackdropElement.classList.add("noBackdrop"),itemBackdropElement.style.backgroundImage=""),hasbackdrop}};return window.LibraryBrowser=libraryBrowser,libraryBrowser}); \ No newline at end of file diff --git a/dashboard-ui/scripts/livetvcomponents.js b/dashboard-ui/scripts/livetvcomponents.js index ba257a4f07..04682237cb 100644 --- a/dashboard-ui/scripts/livetvcomponents.js +++ b/dashboard-ui/scripts/livetvcomponents.js @@ -1 +1 @@ -define(["layoutManager","datetime","cardBuilder","apphost"],function(layoutManager,datetime,cardBuilder,appHost){"use strict";function enableScrollX(){return!layoutManager.desktop}function getBackdropShape(){return enableScrollX()?"overflowBackdrop":"backdrop"}function getTimersHtml(timers,options){options=options||{};var i,length,items=timers.map(function(t){return t.Type="Timer",t}),groups=[],currentGroupName="",currentGroup=[];for(i=0,length=items.length;i',html+='

'+group.name+"

"),html+=enableScrollX()?'
':'
';var supportsImageAnalysis=appHost.supports("imageanalysis"),cardLayout=appHost.preferVisualCards||supportsImageAnalysis;cardLayout=!0,html+=cardBuilder.getCardsHtml({items:group.items,shape:getBackdropShape(),showParentTitleOrTitle:!0,showAirTime:!0,showAirEndTime:!0,showChannelName:!1,cardLayout:cardLayout,centerText:!cardLayout,vibrant:!1,action:"edit",cardFooterAside:"none",preferThumb:!0,coverImage:!0,allowBottomPadding:!1,overlayText:!1,showChannelLogo:cardLayout}),html+="
",group.name&&(html+="
")}return Promise.resolve(html)}window.LiveTvHelpers={getTimersHtml:getTimersHtml}}); \ No newline at end of file +define(["layoutManager","datetime","cardBuilder","apphost"],function(layoutManager,datetime,cardBuilder,appHost){"use strict";function enableScrollX(){return!layoutManager.desktop}function getBackdropShape(){return enableScrollX()?"overflowBackdrop":"backdrop"}function getTimersHtml(timers,options){options=options||{};var i,length,items=timers.map(function(t){return t.Type="Timer",t}),groups=[],currentGroupName="",currentGroup=[];for(i=0,length=items.length;i',html+='

'+group.name+"

"),enableScrollX()){var scrollXClass="scrollX hiddenScrollX";layoutManager.tv&&(scrollXClass+=" smoothScrollX"),html+='
'}else html+='
';var supportsImageAnalysis=appHost.supports("imageanalysis"),cardLayout=appHost.preferVisualCards||supportsImageAnalysis;cardLayout=!0,html+=cardBuilder.getCardsHtml({items:group.items,shape:getBackdropShape(),showParentTitleOrTitle:!0,showAirTime:!0,showAirEndTime:!0,showChannelName:!1,cardLayout:cardLayout,centerText:!cardLayout,vibrant:!1,action:"edit",cardFooterAside:"none",preferThumb:!0,coverImage:!0,allowBottomPadding:!1,overlayText:!1,showChannelLogo:cardLayout}),html+="
",group.name&&(html+="
")}return Promise.resolve(html)}window.LiveTvHelpers={getTimersHtml:getTimersHtml}}); \ No newline at end of file diff --git a/dashboard-ui/scripts/livetvschedule.js b/dashboard-ui/scripts/livetvschedule.js index 93e0764ac6..c8a1ad2c9b 100644 --- a/dashboard-ui/scripts/livetvschedule.js +++ b/dashboard-ui/scripts/livetvschedule.js @@ -1 +1 @@ -define(["layoutManager","cardBuilder","apphost","imageLoader","loading","scripts/livetvcomponents","emby-button","emby-itemscontainer"],function(layoutManager,cardBuilder,appHost,imageLoader,loading){"use strict";function enableScrollX(){return!layoutManager.desktop}function renderRecordings(elem,recordings,cardOptions){recordings.length?elem.classList.remove("hide"):elem.classList.add("hide");var recordingItems=elem.querySelector(".recordingItems");enableScrollX()?(recordingItems.classList.add("hiddenScrollX"),recordingItems.classList.remove("vertical-wrap")):(recordingItems.classList.remove("hiddenScrollX"),recordingItems.classList.add("vertical-wrap"));var supportsImageAnalysis=appHost.supports("imageanalysis"),cardLayout=appHost.preferVisualCards||supportsImageAnalysis;cardLayout=!1,recordingItems.innerHTML=cardBuilder.getCardsHtml(Object.assign({items:recordings,shape:enableScrollX()?"autooverflow":"auto",showTitle:!0,showParentTitle:!0,coverImage:!0,cardLayout:cardLayout,centerText:!cardLayout,vibrant:cardLayout&&supportsImageAnalysis,allowBottomPadding:!enableScrollX(),preferThumb:"auto"},cardOptions||{})),imageLoader.lazyChildren(recordingItems)}function getBackdropShape(){return enableScrollX()?"overflowBackdrop":"backdrop"}function renderActiveRecordings(context,promise){promise.then(function(result){result.Items.length&&"InProgress"!=result.Items[0].Status&&(result.Items=[]),renderRecordings(context.querySelector("#activeRecordings"),result.Items,{shape:enableScrollX()?"autooverflow":"auto",defaultShape:getBackdropShape(),showParentTitle:!1,showParentTitleOrTitle:!0,showTitle:!1,showAirTime:!0,showAirEndTime:!0,showChannelName:!0,coverImage:!0,overlayText:!1,overlayMoreButton:!0})})}function renderTimers(context,timers,options){LiveTvHelpers.getTimersHtml(timers,options).then(function(html){var elem=context;html?elem.classList.remove("hide"):elem.classList.add("hide"),elem.querySelector(".recordingItems").innerHTML=html,imageLoader.lazyChildren(elem)})}function renderUpcomingRecordings(context,promise){promise.then(function(result){renderTimers(context.querySelector("#upcomingRecordings"),result.Items),loading.hide()})}return function(view,params,tabContent){var activeRecordingsPromise,upcomingRecordingsPromise,self=this;tabContent.querySelector("#upcomingRecordings .recordingItems").addEventListener("timercancelled",function(){self.preRender(),self.renderTab()}),self.preRender=function(){activeRecordingsPromise=ApiClient.getLiveTvRecordings({UserId:Dashboard.getCurrentUserId(),IsInProgress:!0,Fields:"CanDelete,PrimaryImageAspectRatio,BasicSyncInfo",EnableTotalRecordCount:!1,EnableImageTypes:"Primary,Thumb,Backdrop"}),upcomingRecordingsPromise=ApiClient.getLiveTvTimers({IsActive:!1,IsScheduled:!0})},self.renderTab=function(){loading.show(),renderActiveRecordings(tabContent,activeRecordingsPromise),renderUpcomingRecordings(tabContent,upcomingRecordingsPromise)}}}); \ No newline at end of file +define(["layoutManager","cardBuilder","apphost","imageLoader","loading","scripts/livetvcomponents","emby-button","emby-itemscontainer"],function(layoutManager,cardBuilder,appHost,imageLoader,loading){"use strict";function enableScrollX(){return!layoutManager.desktop}function renderRecordings(elem,recordings,cardOptions){recordings.length?elem.classList.remove("hide"):elem.classList.add("hide");var recordingItems=elem.querySelector(".recordingItems");enableScrollX()?(recordingItems.classList.add("scrollX"),layoutManager.tv&&recordingItems.classList.add("smoothScrollX"),recordingItems.classList.add("hiddenScrollX"),recordingItems.classList.remove("vertical-wrap")):(recordingItems.classList.remove("scrollX"),recordingItems.classList.remove("smoothScrollX"),recordingItems.classList.remove("hiddenScrollX"),recordingItems.classList.add("vertical-wrap"));var supportsImageAnalysis=appHost.supports("imageanalysis"),cardLayout=appHost.preferVisualCards||supportsImageAnalysis;cardLayout=!1,recordingItems.innerHTML=cardBuilder.getCardsHtml(Object.assign({items:recordings,shape:enableScrollX()?"autooverflow":"auto",showTitle:!0,showParentTitle:!0,coverImage:!0,cardLayout:cardLayout,centerText:!cardLayout,vibrant:cardLayout&&supportsImageAnalysis,allowBottomPadding:!enableScrollX(),preferThumb:"auto"},cardOptions||{})),imageLoader.lazyChildren(recordingItems)}function getBackdropShape(){return enableScrollX()?"overflowBackdrop":"backdrop"}function renderActiveRecordings(context,promise){promise.then(function(result){result.Items.length&&"InProgress"!=result.Items[0].Status&&(result.Items=[]),renderRecordings(context.querySelector("#activeRecordings"),result.Items,{shape:enableScrollX()?"autooverflow":"auto",defaultShape:getBackdropShape(),showParentTitle:!1,showParentTitleOrTitle:!0,showTitle:!1,showAirTime:!0,showAirEndTime:!0,showChannelName:!0,coverImage:!0,overlayText:!1,overlayMoreButton:!0})})}function renderTimers(context,timers,options){LiveTvHelpers.getTimersHtml(timers,options).then(function(html){var elem=context;html?elem.classList.remove("hide"):elem.classList.add("hide"),elem.querySelector(".recordingItems").innerHTML=html,imageLoader.lazyChildren(elem)})}function renderUpcomingRecordings(context,promise){promise.then(function(result){renderTimers(context.querySelector("#upcomingRecordings"),result.Items),loading.hide()})}return function(view,params,tabContent){var activeRecordingsPromise,upcomingRecordingsPromise,self=this;tabContent.querySelector("#upcomingRecordings .recordingItems").addEventListener("timercancelled",function(){self.preRender(),self.renderTab()}),self.preRender=function(){activeRecordingsPromise=ApiClient.getLiveTvRecordings({UserId:Dashboard.getCurrentUserId(),IsInProgress:!0,Fields:"CanDelete,PrimaryImageAspectRatio,BasicSyncInfo",EnableTotalRecordCount:!1,EnableImageTypes:"Primary,Thumb,Backdrop"}),upcomingRecordingsPromise=ApiClient.getLiveTvTimers({IsActive:!1,IsScheduled:!0})},self.renderTab=function(){loading.show(),renderActiveRecordings(tabContent,activeRecordingsPromise),renderUpcomingRecordings(tabContent,upcomingRecordingsPromise)}}}); \ No newline at end of file diff --git a/dashboard-ui/scripts/livetvsuggested.js b/dashboard-ui/scripts/livetvsuggested.js index e1be22f241..7a608cd905 100644 --- a/dashboard-ui/scripts/livetvsuggested.js +++ b/dashboard-ui/scripts/livetvsuggested.js @@ -1 +1 @@ -define(["layoutManager","inputManager","loading","registrationServices","globalize","libraryBrowser","mainTabsManager","cardBuilder","apphost","imageLoader","scrollStyles","emby-itemscontainer","emby-tabs","emby-button"],function(layoutManager,inputManager,loading,registrationServices,globalize,libraryBrowser,mainTabsManager,cardBuilder,appHost,imageLoader){"use strict";function enableScrollX(){return!layoutManager.desktop}function getBackdropShape(){return enableScrollX()?"overflowBackdrop":"backdrop"}function getPortraitShape(){return enableScrollX()?"overflowPortrait":"portrait"}function getLimit(){return enableScrollX()?12:9}function loadRecommendedPrograms(page){loading.show();var limit=getLimit();enableScrollX()&&(limit*=2),ApiClient.getLiveTvRecommendedPrograms({userId:Dashboard.getCurrentUserId(),IsAiring:!0,limit:limit,ImageTypeLimit:1,EnableImageTypes:"Primary,Thumb,Backdrop",EnableTotalRecordCount:!1,Fields:"ChannelInfo,PrimaryImageAspectRatio"}).then(function(result){renderItems(page,result.Items,"activeProgramItems","play",{showAirDateTime:!1,showAirEndTime:!0}),loading.hide()})}function reload(page,enableFullRender){enableFullRender&&(loadRecommendedPrograms(page),ApiClient.getLiveTvRecommendedPrograms({userId:Dashboard.getCurrentUserId(),HasAired:!1,limit:getLimit(),IsMovie:!1,IsSports:!1,IsKids:!1,IsNews:!1,IsSeries:!0,EnableTotalRecordCount:!1,Fields:"ChannelInfo,PrimaryImageAspectRatio",EnableImageTypes:"Primary,Thumb"}).then(function(result){renderItems(page,result.Items,"upcomingEpisodeItems")}),ApiClient.getLiveTvRecommendedPrograms({userId:Dashboard.getCurrentUserId(),HasAired:!1,limit:getLimit(),IsMovie:!0,EnableTotalRecordCount:!1,Fields:"ChannelInfo",EnableImageTypes:"Primary,Thumb"}).then(function(result){renderItems(page,result.Items,"upcomingTvMovieItems",null,{shape:getPortraitShape(),preferThumb:null,showParentTitle:!1})}),ApiClient.getLiveTvRecommendedPrograms({userId:Dashboard.getCurrentUserId(),HasAired:!1,limit:getLimit(),IsSports:!0,EnableTotalRecordCount:!1,Fields:"ChannelInfo,PrimaryImageAspectRatio",EnableImageTypes:"Primary,Thumb"}).then(function(result){renderItems(page,result.Items,"upcomingSportsItems")}),ApiClient.getLiveTvRecommendedPrograms({userId:Dashboard.getCurrentUserId(),HasAired:!1,limit:getLimit(),IsKids:!0,EnableTotalRecordCount:!1,Fields:"ChannelInfo,PrimaryImageAspectRatio",EnableImageTypes:"Primary,Thumb"}).then(function(result){renderItems(page,result.Items,"upcomingKidsItems")}),ApiClient.getLiveTvRecommendedPrograms({userId:Dashboard.getCurrentUserId(),HasAired:!1,limit:getLimit(),IsNews:!0,EnableTotalRecordCount:!1,Fields:"ChannelInfo,PrimaryImageAspectRatio",EnableImageTypes:"Primary,Thumb"}).then(function(result){renderItems(page,result.Items,"upcomingNewsItems",null,{showParentTitleOrTitle:!0,showTitle:!1,showParentTitle:!1})}))}function renderItems(page,items,sectionClass,overlayButton,cardOptions){var html=cardBuilder.getCardsHtml(Object.assign({items:items,preferThumb:"auto",inheritThumb:!1,shape:enableScrollX()?"autooverflow":"auto",defaultShape:getBackdropShape(),showParentTitle:!0,showTitle:!0,centerText:!0,coverImage:!0,overlayText:!1,lazy:!0,overlayPlayButton:"play"===overlayButton,overlayMoreButton:"more"===overlayButton,overlayInfoButton:"info"===overlayButton,allowBottomPadding:!enableScrollX(),showAirTime:!0,showAirDateTime:!0},cardOptions||{})),elem=page.querySelector("."+sectionClass);elem.innerHTML=html,imageLoader.lazyChildren(elem)}function getTabs(){return[{name:globalize.translate("Programs")},{name:globalize.translate("TabGuide")},{name:globalize.translate("TabChannels")},{name:globalize.translate("TabRecordings")},{name:globalize.translate("HeaderSchedule")},{name:globalize.translate("TabSeries")},{name:globalize.translate("ButtonSearch"),cssClass:"searchTabButton"}]}function validateUnlock(view,showDialog){registrationServices.validateFeature("livetv",{showDialog:showDialog,viewOnly:!0}).then(function(){view.querySelector(".liveTvContainer").classList.remove("hide"),view.querySelector(".unlockContainer").classList.add("hide")},function(){view.querySelector(".liveTvContainer").classList.add("hide"),view.querySelector(".unlockContainer").classList.remove("hide")})}return function(view,params){function enableFullRender(){return(new Date).getTime()-lastFullRender>3e5}function onBeforeTabChange(e){preLoadTab(view,parseInt(e.detail.selectedTabIndex))}function onTabChange(e){var previousTabController=tabControllers[parseInt(e.detail.previousIndex)];previousTabController&&previousTabController.onHide&&previousTabController.onHide(),loadTab(view,parseInt(e.detail.selectedTabIndex))}function getTabContainers(){return view.querySelectorAll(".pageTabContent")}function initTabs(){mainTabsManager.setTabs(view,currentTabIndex,getTabs,getTabContainers,onBeforeTabChange,onTabChange)}function getTabController(page,index,callback){var depends=[];switch(index){case 0:break;case 1:depends.push("scripts/livetvguide");break;case 2:depends.push("scripts/livetvchannels");break;case 3:depends.push("scripts/livetvrecordings");break;case 4:depends.push("scripts/livetvschedule");break;case 5:depends.push("scripts/livetvseriestimers");break;case 6:depends.push("scripts/searchtab")}require(depends,function(controllerFactory){var tabContent;0==index&&(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),self.tabContent=tabContent);var controller=tabControllers[index];controller||(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),controller=0===index?self:6===index?new controllerFactory(view,tabContent,{collectionType:"livetv"}):new controllerFactory(view,params,tabContent),tabControllers[index]=controller,controller.initTab&&controller.initTab()),callback(controller)})}function preLoadTab(page,index){getTabController(page,index,function(controller){renderedTabs.indexOf(index)==-1&&controller.preRender&&controller.preRender()})}function loadTab(page,index){currentTabIndex=index,getTabController(page,index,function(controller){initialTabIndex=null,1===index?document.body.classList.add("autoScrollY"):document.body.classList.remove("autoScrollY"),renderedTabs.indexOf(index)==-1?(1===index&&renderedTabs.push(index),controller.renderTab()):controller.onShow&&controller.onShow(),currentTabController=controller})}function onInputCommand(e){switch(e.detail.command){case"search":e.preventDefault(),Dashboard.navigate("search.html?collectionType=livetv")}}var isViewRestored,self=this,currentTabIndex=parseInt(params.tab||"0"),initialTabIndex=currentTabIndex,lastFullRender=0;view.querySelector(".unlockText").innerHTML=globalize.translate("sharedcomponents#LiveTvRequiresUnlock"),validateUnlock(view,!1),self.initTab=function(){for(var tabContent=view.querySelector(".pageTabContent[data-index='0']"),containers=tabContent.querySelectorAll(".itemsContainer"),i=0,length=containers.length;i3e5}function onBeforeTabChange(e){preLoadTab(view,parseInt(e.detail.selectedTabIndex))}function onTabChange(e){var previousTabController=tabControllers[parseInt(e.detail.previousIndex)];previousTabController&&previousTabController.onHide&&previousTabController.onHide(),loadTab(view,parseInt(e.detail.selectedTabIndex))}function getTabContainers(){return view.querySelectorAll(".pageTabContent")}function initTabs(){mainTabsManager.setTabs(view,currentTabIndex,getTabs,getTabContainers,onBeforeTabChange,onTabChange)}function getTabController(page,index,callback){var depends=[];switch(index){case 0:break;case 1:depends.push("scripts/livetvguide");break;case 2:depends.push("scripts/livetvchannels");break;case 3:depends.push("scripts/livetvrecordings");break;case 4:depends.push("scripts/livetvschedule");break;case 5:depends.push("scripts/livetvseriestimers");break;case 6:depends.push("scripts/searchtab")}require(depends,function(controllerFactory){var tabContent;0==index&&(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),self.tabContent=tabContent);var controller=tabControllers[index];controller||(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),controller=0===index?self:6===index?new controllerFactory(view,tabContent,{collectionType:"livetv"}):new controllerFactory(view,params,tabContent),tabControllers[index]=controller,controller.initTab&&controller.initTab()),callback(controller)})}function preLoadTab(page,index){getTabController(page,index,function(controller){renderedTabs.indexOf(index)==-1&&controller.preRender&&controller.preRender()})}function loadTab(page,index){currentTabIndex=index,getTabController(page,index,function(controller){initialTabIndex=null,1===index?document.body.classList.add("autoScrollY"):document.body.classList.remove("autoScrollY"),renderedTabs.indexOf(index)==-1?(1===index&&renderedTabs.push(index),controller.renderTab()):controller.onShow&&controller.onShow(),currentTabController=controller})}function onInputCommand(e){switch(e.detail.command){case"search":e.preventDefault(),Dashboard.navigate("search.html?collectionType=livetv")}}var isViewRestored,self=this,currentTabIndex=parseInt(params.tab||"0"),initialTabIndex=currentTabIndex,lastFullRender=0;view.querySelector(".unlockText").innerHTML=globalize.translate("sharedcomponents#LiveTvRequiresUnlock"),validateUnlock(view,!1),self.initTab=function(){for(var tabContent=view.querySelector(".pageTabContent[data-index='0']"),containers=tabContent.querySelectorAll(".itemsContainer"),i=0,length=containers.length;i=query.Limit&&tabContent.querySelector(".btnMoreFromGenre"+id+" i").classList.remove("hide")})}function reloadItems(context,promise){var query=getQuery();promise.then(function(result){for(var elem=context.querySelector("#items"),html="",items=result.Items,i=0,length=items.length;i',html+='",html+=enableScrollX()?'
':'
',html+="
",html+="
"}elem.innerHTML=html,lazyLoader.lazyChildren(elem,fillItemsContainer),libraryBrowser.saveQueryValues(getSavedQueryKey(),query),loading.hide()})}function fullyReload(){self.preRender(),self.renderTab()}var self=this,data={};self.getViewStyles=function(){return"Poster,PosterCard,Thumb,ThumbCard".split(",")},self.getCurrentViewStyle=function(){return getPageData(tabContent).view},self.setCurrentViewStyle=function(viewStyle){getPageData(tabContent).view=viewStyle,libraryBrowser.saveViewSetting(getSavedQueryKey(tabContent),viewStyle),fullyReload()},self.enableViewSelection=!0;var promise;self.preRender=function(){promise=getPromise()},self.renderTab=function(){reloadItems(tabContent,promise)}}}); \ No newline at end of file +define(["layoutManager","loading","libraryBrowser","cardBuilder","lazyLoader","apphost","globalize","appRouter","dom","emby-linkbutton"],function(layoutManager,loading,libraryBrowser,cardBuilder,lazyLoader,appHost,globalize,appRouter,dom){"use strict";return function(view,params,tabContent){function getPageData(){var key=getSavedQueryKey(),pageData=data[key];return pageData||(pageData=data[key]={query:{SortBy:"SortName",SortOrder:"Ascending",IncludeItemTypes:"Movie",Recursive:!0,EnableTotalRecordCount:!1},view:"Poster"},pageData.query.ParentId=params.topParentId,libraryBrowser.loadSavedQueryValues(key,pageData.query)),pageData}function getQuery(){return getPageData().query}function getSavedQueryKey(){return libraryBrowser.getSavedQueryKey("moviegenres")}function getPromise(){loading.show();var query=getQuery();return ApiClient.getGenres(ApiClient.getCurrentUserId(),query)}function enableScrollX(){return!layoutManager.desktop}function getThumbShape(){return enableScrollX()?"overflowBackdrop":"backdrop"}function getPortraitShape(){return enableScrollX()?"overflowPortrait":"portrait"}function fillItemsContainer(elem){var id=elem.getAttribute("data-id"),viewStyle=self.getCurrentViewStyle(),limit="Thumb"==viewStyle||"ThumbCard"==viewStyle?5:9;enableScrollX()&&(limit=10);var enableImageTypes="Thumb"==viewStyle||"ThumbCard"==viewStyle?"Primary,Backdrop,Thumb":"Primary",query={SortBy:"SortName",SortOrder:"Ascending",IncludeItemTypes:"Movie",Recursive:!0,Fields:"PrimaryImageAspectRatio,MediaSourceCount,BasicSyncInfo",ImageTypeLimit:1,EnableImageTypes:enableImageTypes,Limit:limit,GenreIds:id,EnableTotalRecordCount:!1,ParentId:params.topParentId};ApiClient.getItems(ApiClient.getCurrentUserId(),query).then(function(result){var supportsImageAnalysis=appHost.supports("imageanalysis");"Thumb"==viewStyle?cardBuilder.buildCards(result.Items,{itemsContainer:elem,shape:getThumbShape(),preferThumb:!0,showTitle:!0,scalable:!0,centerText:!0,overlayMoreButton:!0,allowBottomPadding:!1}):"ThumbCard"==viewStyle?cardBuilder.buildCards(result.Items,{itemsContainer:elem,shape:getThumbShape(),preferThumb:!0,showTitle:!0,scalable:!0,centerText:!1,cardLayout:!0,vibrant:supportsImageAnalysis,showYear:!0}):"PosterCard"==viewStyle?cardBuilder.buildCards(result.Items,{itemsContainer:elem,shape:getPortraitShape(),showTitle:!0,scalable:!0,centerText:!1,cardLayout:!0,vibrant:supportsImageAnalysis,showYear:!0}):"Poster"==viewStyle&&cardBuilder.buildCards(result.Items,{itemsContainer:elem,shape:getPortraitShape(),scalable:!0,overlayMoreButton:!0,allowBottomPadding:!1}),result.Items.length>=query.Limit&&tabContent.querySelector(".btnMoreFromGenre"+id+" i").classList.remove("hide")})}function reloadItems(context,promise){var query=getQuery();promise.then(function(result){for(var elem=context.querySelector("#items"),html="",items=result.Items,i=0,length=items.length;i',html+='",enableScrollX()){var scrollXClass="scrollX hiddenScrollX";layoutManager.tv&&(scrollXClass+=" smoothScrollX"),html+='
'}else html+='
';html+="
",html+="
"}elem.innerHTML=html,lazyLoader.lazyChildren(elem,fillItemsContainer),libraryBrowser.saveQueryValues(getSavedQueryKey(),query),loading.hide()})}function fullyReload(){self.preRender(),self.renderTab()}var self=this,data={};self.getViewStyles=function(){return"Poster,PosterCard,Thumb,ThumbCard".split(",")},self.getCurrentViewStyle=function(){return getPageData(tabContent).view},self.setCurrentViewStyle=function(viewStyle){getPageData(tabContent).view=viewStyle,libraryBrowser.saveViewSetting(getSavedQueryKey(tabContent),viewStyle),fullyReload()},self.enableViewSelection=!0;var promise;self.preRender=function(){promise=getPromise()},self.renderTab=function(){reloadItems(tabContent,promise)}}}); \ No newline at end of file diff --git a/dashboard-ui/scripts/movies.js b/dashboard-ui/scripts/movies.js index f7307911f2..e4213bf4a5 100644 --- a/dashboard-ui/scripts/movies.js +++ b/dashboard-ui/scripts/movies.js @@ -1 +1 @@ -define(["layoutManager","loading","events","libraryBrowser","imageLoader","alphaPicker","listView","cardBuilder","apphost","emby-itemscontainer"],function(layoutManager,loading,events,libraryBrowser,imageLoader,alphaPicker,listView,cardBuilder,appHost){"use strict";return function(view,params,tabContent){function getPageData(context){var key=getSavedQueryKey(context),pageData=data[key];return pageData||(pageData=data[key]={query:{SortBy:"SortName",SortOrder:"Ascending",IncludeItemTypes:"Movie",Recursive:!0,Fields:"PrimaryImageAspectRatio,MediaSourceCount,BasicSyncInfo",ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",StartIndex:0,Limit:pageSize},view:libraryBrowser.getSavedView(key)||"Poster"},"favorites"===self.mode&&(pageData.query.IsFavorite=!0),pageData.query.ParentId=params.topParentId,libraryBrowser.loadSavedQueryValues(key,pageData.query)),pageData}function getQuery(context){return getPageData(context).query}function getSavedQueryKey(context){if(!context.savedQueryKey){var key="favorites"===self.mode?"moviefavorites":"movies";context.savedQueryKey=libraryBrowser.getSavedQueryKey(key)}return context.savedQueryKey}function onViewStyleChange(){var viewStyle=self.getCurrentViewStyle(),itemsContainer=tabContent.querySelector(".itemsContainer");"List"==viewStyle?(itemsContainer.classList.add("vertical-list"),itemsContainer.classList.remove("vertical-wrap")):(itemsContainer.classList.remove("vertical-list"),itemsContainer.classList.add("vertical-wrap")),itemsContainer.innerHTML=""}function reloadItems(page){loading.show();var query=getQuery(page);ApiClient.getItems(ApiClient.getCurrentUserId(),query).then(function(result){function onNextPageClick(){query.StartIndex+=query.Limit,reloadItems(tabContent)}function onPreviousPageClick(){query.StartIndex-=query.Limit,reloadItems(tabContent)}window.scrollTo(0,0),updateFilterControls(page);var html,pagingHtml=libraryBrowser.getQueryPagingHtml({startIndex:query.StartIndex,limit:query.Limit,totalRecordCount:result.TotalRecordCount,showLimit:!1,updatePageSizeSetting:!1,addLayoutButton:!1,sortButton:!1,filterButton:!1}),viewStyle=self.getCurrentViewStyle(),supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,html="Thumb"==viewStyle?cardBuilder.getCardsHtml({items:result.Items,shape:"backdrop",preferThumb:!0,context:"movies",lazy:!0,overlayPlayButton:!0,showTitle:!0,showYear:!0,centerText:!0}):"ThumbCard"==viewStyle?cardBuilder.getCardsHtml({items:result.Items,shape:"backdrop",preferThumb:!0,context:"movies",lazy:!0,cardLayout:!0,showTitle:!0,showYear:!0,vibrant:supportsImageAnalysis}):"Banner"==viewStyle?cardBuilder.getCardsHtml({items:result.Items,shape:"banner",preferBanner:!0,context:"movies",lazy:!0}):"List"==viewStyle?listView.getListViewHtml({items:result.Items,context:"movies",sortBy:query.SortBy}):"PosterCard"==viewStyle?cardBuilder.getCardsHtml({items:result.Items,shape:"portrait",context:"movies",showTitle:!0,showYear:!0,lazy:!0,cardLayout:!0,vibrant:supportsImageAnalysis}):cardBuilder.getCardsHtml({items:result.Items,shape:"portrait",context:"movies",overlayPlayButton:!0,showTitle:!0,showYear:!0,centerText:!0});var i,length,elems=tabContent.querySelectorAll(".paging");for(i=0,length=elems.length;i=1920?5:screenWidth>=1600?5:3,Recursive:!0,Fields:"PrimaryImageAspectRatio,MediaSourceCount,BasicSyncInfo",CollapseBoxSetItems:!1,ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};ApiClient.getItems(userId,options).then(function(result){result.Items.length?page.querySelector("#resumableSection").classList.remove("hide"):page.querySelector("#resumableSection").classList.add("hide");var allowBottomPadding=!enableScrollX(),container=page.querySelector("#resumableItems"),cardLayout=!1;cardBuilder.buildCards(result.Items,{itemsContainer:container,preferThumb:!0,shape:getThumbShape(),scalable:!0,overlayPlayButton:!0,allowBottomPadding:allowBottomPadding,cardLayout:cardLayout,showTitle:!0,showYear:!0,centerText:!cardLayout})})}function getRecommendationHtml(recommendation){var html="",title="";switch(recommendation.RecommendationType){case"SimilarToRecentlyPlayed":title=Globalize.translate("RecommendationBecauseYouWatched").replace("{0}",recommendation.BaselineItemName);break;case"SimilarToLikedItem":title=Globalize.translate("RecommendationBecauseYouLike").replace("{0}",recommendation.BaselineItemName);break;case"HasDirectorFromRecentlyPlayed":case"HasLikedDirector":title=Globalize.translate("RecommendationDirectedBy").replace("{0}",recommendation.BaselineItemName);break;case"HasActorFromRecentlyPlayed":case"HasLikedActor":title=Globalize.translate("RecommendationStarring").replace("{0}",recommendation.BaselineItemName)}html+='
',html+='

'+title+"

";var allowBottomPadding=!0;return enableScrollX()?(allowBottomPadding=!1,html+='
'):html+='
',html+=cardBuilder.getCardsHtml(recommendation.Items,{shape:getPortraitShape(),scalable:!0,overlayPlayButton:!0,allowBottomPadding:allowBottomPadding}),html+="
",html+="
"}function loadSuggestions(page,userId,parentId){var screenWidth=dom.getWindowSize().innerWidth,url=ApiClient.getUrl("Movies/Recommendations",{userId:userId,categoryLimit:6,ItemLimit:screenWidth>=1920?8:screenWidth>=1600?8:screenWidth>=1200?6:5,Fields:"PrimaryImageAspectRatio,MediaSourceCount,BasicSyncInfo",ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb"});ApiClient.getJSON(url).then(function(recommendations){if(!recommendations.length)return page.querySelector(".noItemsMessage").classList.remove("hide"),void(page.querySelector(".recommendations").innerHTML="");var html=recommendations.map(getRecommendationHtml).join("");page.querySelector(".noItemsMessage").classList.add("hide");var recs=page.querySelector(".recommendations");recs.innerHTML=html,imageLoader.lazyChildren(recs)})}function initSuggestedTab(page,tabContent){for(var containers=tabContent.querySelectorAll(".itemsContainer"),i=0,length=containers.length;i=1920?5:screenWidth>=1600?5:3,Recursive:!0,Fields:"PrimaryImageAspectRatio,MediaSourceCount,BasicSyncInfo",CollapseBoxSetItems:!1,ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};ApiClient.getItems(userId,options).then(function(result){result.Items.length?page.querySelector("#resumableSection").classList.remove("hide"):page.querySelector("#resumableSection").classList.add("hide");var allowBottomPadding=!enableScrollX(),container=page.querySelector("#resumableItems"),cardLayout=!1;cardBuilder.buildCards(result.Items,{itemsContainer:container,preferThumb:!0,shape:getThumbShape(),scalable:!0,overlayPlayButton:!0,allowBottomPadding:allowBottomPadding,cardLayout:cardLayout,showTitle:!0,showYear:!0,centerText:!cardLayout})})}function getRecommendationHtml(recommendation){var html="",title="";switch(recommendation.RecommendationType){case"SimilarToRecentlyPlayed":title=Globalize.translate("RecommendationBecauseYouWatched").replace("{0}",recommendation.BaselineItemName);break;case"SimilarToLikedItem":title=Globalize.translate("RecommendationBecauseYouLike").replace("{0}",recommendation.BaselineItemName);break;case"HasDirectorFromRecentlyPlayed":case"HasLikedDirector":title=Globalize.translate("RecommendationDirectedBy").replace("{0}",recommendation.BaselineItemName);break;case"HasActorFromRecentlyPlayed":case"HasLikedActor":title=Globalize.translate("RecommendationStarring").replace("{0}",recommendation.BaselineItemName)}html+='
',html+='

'+title+"

";var allowBottomPadding=!0;return enableScrollX()?(allowBottomPadding=!1,html+='
'):html+='
',html+=cardBuilder.getCardsHtml(recommendation.Items,{shape:getPortraitShape(),scalable:!0,overlayPlayButton:!0,allowBottomPadding:allowBottomPadding}),html+="
",html+="
"}function loadSuggestions(page,userId,parentId){var screenWidth=dom.getWindowSize().innerWidth,url=ApiClient.getUrl("Movies/Recommendations",{userId:userId,categoryLimit:6,ItemLimit:screenWidth>=1920?8:screenWidth>=1600?8:screenWidth>=1200?6:5,Fields:"PrimaryImageAspectRatio,MediaSourceCount,BasicSyncInfo",ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb"});ApiClient.getJSON(url).then(function(recommendations){if(!recommendations.length)return page.querySelector(".noItemsMessage").classList.remove("hide"),void(page.querySelector(".recommendations").innerHTML="");var html=recommendations.map(getRecommendationHtml).join("");page.querySelector(".noItemsMessage").classList.add("hide");var recs=page.querySelector(".recommendations");recs.innerHTML=html,imageLoader.lazyChildren(recs)})}function setScrollClasses(elem,scrollX){scrollX?(elem.classList.add("hiddenScrollX"),layoutManager.tv&&elem.classList.add("smoothScrollX"),elem.classList.add("scrollX"),elem.classList.remove("vertical-wrap")):(elem.classList.remove("hiddenScrollX"),elem.classList.remove("smoothScrollX"),elem.classList.remove("scrollX"),elem.classList.add("vertical-wrap"))}function initSuggestedTab(page,tabContent){for(var containers=tabContent.querySelectorAll(".itemsContainer"),i=0,length=containers.length;i=1920?9:screenWidth>=1200?12:screenWidth>=1e3?10:8}function enableScrollX(){return!layoutManager.desktop}function getSquareShape(){return enableScrollX()?"overflowSquare":"square"}function loadLatest(page,parentId){loading.show();var userId=ApiClient.getCurrentUserId(),options={IncludeItemTypes:"Audio",Limit:enableScrollX()?3*itemsPerRow():2*itemsPerRow(),Fields:"PrimaryImageAspectRatio,BasicSyncInfo",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};ApiClient.getJSON(ApiClient.getUrl("Users/"+userId+"/Items/Latest",options)).then(function(items){var elem=page.querySelector("#recentlyAddedSongs"),supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,elem.innerHTML=cardBuilder.getCardsHtml({items:items,showUnplayedIndicator:!1,showLatestItemsPopup:!1,shape:getSquareShape(),showTitle:!0,showParentTitle:!0,lazy:!0,centerText:!supportsImageAnalysis,overlayPlayButton:!supportsImageAnalysis,allowBottomPadding:!enableScrollX(),cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis,coverImage:!0}),imageLoader.lazyChildren(elem),loading.hide()})}function loadRecentlyPlayed(page,parentId){var options={SortBy:"DatePlayed",SortOrder:"Descending",IncludeItemTypes:"Audio",Limit:itemsPerRow(),Recursive:!0,Fields:"PrimaryImageAspectRatio,AudioInfo",Filters:"IsPlayed",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};ApiClient.getItems(ApiClient.getCurrentUserId(),options).then(function(result){var elem=page.querySelector("#recentlyPlayed");result.Items.length?elem.classList.remove("hide"):elem.classList.add("hide");var itemsContainer=elem.querySelector(".itemsContainer"),supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,itemsContainer.innerHTML=cardBuilder.getCardsHtml({items:result.Items,showUnplayedIndicator:!1,shape:getSquareShape(),showTitle:!0,showParentTitle:!0,action:"instantmix",lazy:!0,centerText:!supportsImageAnalysis,overlayMoreButton:!supportsImageAnalysis,allowBottomPadding:!enableScrollX(),cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis,coverImage:!0}),imageLoader.lazyChildren(itemsContainer)})}function loadFrequentlyPlayed(page,parentId){var options={SortBy:"PlayCount",SortOrder:"Descending",IncludeItemTypes:"Audio",Limit:itemsPerRow(),Recursive:!0,Fields:"PrimaryImageAspectRatio,AudioInfo",Filters:"IsPlayed",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};ApiClient.getItems(ApiClient.getCurrentUserId(),options).then(function(result){var elem=page.querySelector("#topPlayed");result.Items.length?elem.classList.remove("hide"):elem.classList.add("hide");var itemsContainer=elem.querySelector(".itemsContainer"),supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,itemsContainer.innerHTML=cardBuilder.getCardsHtml({items:result.Items,showUnplayedIndicator:!1,shape:getSquareShape(),showTitle:!0,showParentTitle:!0,action:"instantmix",lazy:!0,centerText:!supportsImageAnalysis,overlayMoreButton:!supportsImageAnalysis,allowBottomPadding:!enableScrollX(),cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis,coverImage:!0}),imageLoader.lazyChildren(itemsContainer)})}function loadSuggestionsTab(page,tabContent,parentId){console.log("loadSuggestionsTab"),loadLatest(tabContent,parentId),loadRecentlyPlayed(tabContent,parentId),loadFrequentlyPlayed(tabContent,parentId),require(["components/favoriteitems"],function(favoriteItems){favoriteItems.render(tabContent,ApiClient.getCurrentUserId(),parentId,["favoriteArtists","favoriteAlbums","favoriteSongs"])})}function getTabs(){return[{name:Globalize.translate("TabSuggestions")},{name:Globalize.translate("TabAlbums")},{name:Globalize.translate("TabAlbumArtists")},{name:Globalize.translate("TabArtists")},{name:Globalize.translate("TabPlaylists")},{name:Globalize.translate("TabSongs")},{name:Globalize.translate("TabGenres")},{name:Globalize.translate("ButtonSearch"),cssClass:"searchTabButton"}]}function getDefaultTabIndex(folderId){switch(userSettings.get("landing-"+folderId)){case"albums":return 1;case"albumartists":return 2;case"artists":return 3;case"playlists":return 4;case"songs":return 5;case"genres":return 6;default:return 0}}return function(view,params){function reload(){loading.show();var tabContent=view.querySelector(".pageTabContent[data-index='0']");loadSuggestionsTab(view,tabContent,params.topParentId)}function enableScrollX(){return browserInfo.mobile}function onBeforeTabChange(e){preLoadTab(view,parseInt(e.detail.selectedTabIndex))}function onTabChange(e){loadTab(view,parseInt(e.detail.selectedTabIndex))}function getTabContainers(){return view.querySelectorAll(".pageTabContent")}function initTabs(){mainTabsManager.setTabs(view,currentTabIndex,getTabs,getTabContainers,onBeforeTabChange,onTabChange)}function getTabController(page,index,callback){var depends=[];switch(index){case 0:break;case 1:depends.push("scripts/musicalbums");break;case 2:depends.push("scripts/musicartists");break;case 3:depends.push("scripts/musicartists");break;case 4:depends.push("scripts/musicplaylists");break;case 5:depends.push("scripts/songs");break;case 6:depends.push("scripts/musicgenres");break;case 7:depends.push("scripts/searchtab")}require(depends,function(controllerFactory){var tabContent;0==index&&(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),self.tabContent=tabContent);var controller=tabControllers[index];controller||(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),controller=0===index?self:7===index?new controllerFactory(view,tabContent,{collectionType:"music",parentId:params.topParentId}):new controllerFactory(view,params,tabContent),2==index?controller.mode="albumartists":3==index&&(controller.mode="artists"),tabControllers[index]=controller,controller.initTab&&controller.initTab()),callback(controller)})}function preLoadTab(page,index){getTabController(page,index,function(controller){renderedTabs.indexOf(index)==-1&&controller.preRender&&controller.preRender()})}function loadTab(page,index){currentTabIndex=index,getTabController(page,index,function(controller){initialTabIndex=null,renderedTabs.indexOf(index)==-1&&(renderedTabs.push(index),controller.renderTab())})}function onInputCommand(e){switch(e.detail.command){case"search":e.preventDefault(),Dashboard.navigate("search.html?collectionType=music&parentId="+params.topParentId)}}var isViewRestored,self=this,currentTabIndex=parseInt(params.tab||getDefaultTabIndex(params.topParentId)),initialTabIndex=currentTabIndex;self.initTab=function(){for(var tabContent=view.querySelector(".pageTabContent[data-index='0']"),containers=tabContent.querySelectorAll(".itemsContainer"),i=0,length=containers.length;i=1920?9:screenWidth>=1200?12:screenWidth>=1e3?10:8}function enableScrollX(){return!layoutManager.desktop}function getSquareShape(){return enableScrollX()?"overflowSquare":"square"}function loadLatest(page,parentId){loading.show();var userId=ApiClient.getCurrentUserId(),options={IncludeItemTypes:"Audio",Limit:enableScrollX()?3*itemsPerRow():2*itemsPerRow(),Fields:"PrimaryImageAspectRatio,BasicSyncInfo",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};ApiClient.getJSON(ApiClient.getUrl("Users/"+userId+"/Items/Latest",options)).then(function(items){var elem=page.querySelector("#recentlyAddedSongs"),supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,elem.innerHTML=cardBuilder.getCardsHtml({items:items,showUnplayedIndicator:!1,showLatestItemsPopup:!1,shape:getSquareShape(),showTitle:!0,showParentTitle:!0,lazy:!0,centerText:!supportsImageAnalysis,overlayPlayButton:!supportsImageAnalysis,allowBottomPadding:!enableScrollX(),cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis,coverImage:!0}),imageLoader.lazyChildren(elem),loading.hide()})}function loadRecentlyPlayed(page,parentId){var options={SortBy:"DatePlayed",SortOrder:"Descending",IncludeItemTypes:"Audio",Limit:itemsPerRow(),Recursive:!0,Fields:"PrimaryImageAspectRatio,AudioInfo",Filters:"IsPlayed",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};ApiClient.getItems(ApiClient.getCurrentUserId(),options).then(function(result){var elem=page.querySelector("#recentlyPlayed");result.Items.length?elem.classList.remove("hide"):elem.classList.add("hide");var itemsContainer=elem.querySelector(".itemsContainer"),supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,itemsContainer.innerHTML=cardBuilder.getCardsHtml({items:result.Items,showUnplayedIndicator:!1,shape:getSquareShape(),showTitle:!0,showParentTitle:!0,action:"instantmix",lazy:!0,centerText:!supportsImageAnalysis,overlayMoreButton:!supportsImageAnalysis,allowBottomPadding:!enableScrollX(),cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis,coverImage:!0}),imageLoader.lazyChildren(itemsContainer)})}function loadFrequentlyPlayed(page,parentId){var options={SortBy:"PlayCount",SortOrder:"Descending",IncludeItemTypes:"Audio",Limit:itemsPerRow(),Recursive:!0,Fields:"PrimaryImageAspectRatio,AudioInfo",Filters:"IsPlayed",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};ApiClient.getItems(ApiClient.getCurrentUserId(),options).then(function(result){var elem=page.querySelector("#topPlayed");result.Items.length?elem.classList.remove("hide"):elem.classList.add("hide");var itemsContainer=elem.querySelector(".itemsContainer"),supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,itemsContainer.innerHTML=cardBuilder.getCardsHtml({items:result.Items,showUnplayedIndicator:!1,shape:getSquareShape(),showTitle:!0,showParentTitle:!0,action:"instantmix",lazy:!0,centerText:!supportsImageAnalysis,overlayMoreButton:!supportsImageAnalysis,allowBottomPadding:!enableScrollX(),cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis,coverImage:!0}),imageLoader.lazyChildren(itemsContainer)})}function loadSuggestionsTab(page,tabContent,parentId){console.log("loadSuggestionsTab"),loadLatest(tabContent,parentId),loadRecentlyPlayed(tabContent,parentId),loadFrequentlyPlayed(tabContent,parentId),require(["components/favoriteitems"],function(favoriteItems){favoriteItems.render(tabContent,ApiClient.getCurrentUserId(),parentId,["favoriteArtists","favoriteAlbums","favoriteSongs"])})}function getTabs(){return[{name:Globalize.translate("TabSuggestions")},{name:Globalize.translate("TabAlbums")},{name:Globalize.translate("TabAlbumArtists")},{name:Globalize.translate("TabArtists")},{name:Globalize.translate("TabPlaylists")},{name:Globalize.translate("TabSongs")},{name:Globalize.translate("TabGenres")},{name:Globalize.translate("ButtonSearch"),cssClass:"searchTabButton"}]}function getDefaultTabIndex(folderId){switch(userSettings.get("landing-"+folderId)){case"albums":return 1;case"albumartists":return 2;case"artists":return 3;case"playlists":return 4;case"songs":return 5;case"genres":return 6;default:return 0}}return function(view,params){function reload(){loading.show();var tabContent=view.querySelector(".pageTabContent[data-index='0']");loadSuggestionsTab(view,tabContent,params.topParentId)}function enableScrollX(){return browserInfo.mobile}function setScrollClasses(elem,scrollX){scrollX?(elem.classList.add("hiddenScrollX"),layoutManager.tv&&elem.classList.add("smoothScrollX"),elem.classList.add("scrollX"),elem.classList.remove("vertical-wrap")):(elem.classList.remove("hiddenScrollX"),elem.classList.remove("smoothScrollX"),elem.classList.remove("scrollX"),elem.classList.add("vertical-wrap"))}function onBeforeTabChange(e){preLoadTab(view,parseInt(e.detail.selectedTabIndex))}function onTabChange(e){loadTab(view,parseInt(e.detail.selectedTabIndex))}function getTabContainers(){return view.querySelectorAll(".pageTabContent")}function initTabs(){mainTabsManager.setTabs(view,currentTabIndex,getTabs,getTabContainers,onBeforeTabChange,onTabChange)}function getTabController(page,index,callback){var depends=[];switch(index){case 0:break;case 1:depends.push("scripts/musicalbums");break;case 2:depends.push("scripts/musicartists");break;case 3:depends.push("scripts/musicartists");break;case 4:depends.push("scripts/musicplaylists");break;case 5:depends.push("scripts/songs");break;case 6:depends.push("scripts/musicgenres");break;case 7:depends.push("scripts/searchtab")}require(depends,function(controllerFactory){var tabContent;0==index&&(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),self.tabContent=tabContent);var controller=tabControllers[index];controller||(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),controller=0===index?self:7===index?new controllerFactory(view,tabContent,{collectionType:"music",parentId:params.topParentId}):new controllerFactory(view,params,tabContent),2==index?controller.mode="albumartists":3==index&&(controller.mode="artists"),tabControllers[index]=controller,controller.initTab&&controller.initTab()),callback(controller)})}function preLoadTab(page,index){getTabController(page,index,function(controller){renderedTabs.indexOf(index)==-1&&controller.preRender&&controller.preRender()})}function loadTab(page,index){currentTabIndex=index,getTabController(page,index,function(controller){initialTabIndex=null,renderedTabs.indexOf(index)==-1&&(renderedTabs.push(index),controller.renderTab())})}function onInputCommand(e){switch(e.detail.command){case"search":e.preventDefault(),Dashboard.navigate("search.html?collectionType=music&parentId="+params.topParentId)}}var isViewRestored,self=this,currentTabIndex=parseInt(params.tab||getDefaultTabIndex(params.topParentId)),initialTabIndex=currentTabIndex;self.initTab=function(){for(var tabContent=view.querySelector(".pageTabContent[data-index='0']"),containers=tabContent.querySelectorAll(".itemsContainer"),i=0,length=containers.length;i=query.Limit&&tabContent.querySelector(".btnMoreFromGenre"+id+" i").classList.remove("hide")})}function reloadItems(context,promise){var query=getQuery();promise.then(function(result){for(var elem=context.querySelector("#items"),html="",items=result.Items,i=0,length=items.length;i',html+='",html+=enableScrollX()?'
':'
',html+="
",html+="
"}elem.innerHTML=html,lazyLoader.lazyChildren(elem,fillItemsContainer),libraryBrowser.saveQueryValues(getSavedQueryKey(),query),loading.hide()})}function fullyReload(){self.preRender(),self.renderTab()}var self=this,data={};self.getViewStyles=function(){return"Poster,PosterCard,Thumb,ThumbCard".split(",")},self.getCurrentViewStyle=function(){return getPageData(tabContent).view},self.setCurrentViewStyle=function(viewStyle){getPageData(tabContent).view=viewStyle,libraryBrowser.saveViewSetting(getSavedQueryKey(tabContent),viewStyle),fullyReload()},self.enableViewSelection=!0;var promise;self.preRender=function(){promise=getPromise()},self.renderTab=function(){reloadItems(tabContent,promise)}}}); \ No newline at end of file +define(["layoutManager","loading","libraryBrowser","cardBuilder","lazyLoader","apphost","globalize","appRouter","dom","emby-linkbutton"],function(layoutManager,loading,libraryBrowser,cardBuilder,lazyLoader,appHost,globalize,appRouter,dom){"use strict";return function(view,params,tabContent){function getPageData(){var key=getSavedQueryKey(),pageData=data[key];return pageData||(pageData=data[key]={query:{SortBy:"SortName",SortOrder:"Ascending",IncludeItemTypes:"Series",Recursive:!0,EnableTotalRecordCount:!1},view:"Poster"},pageData.query.ParentId=params.topParentId,libraryBrowser.loadSavedQueryValues(key,pageData.query)),pageData}function getQuery(){return getPageData().query}function getSavedQueryKey(){return libraryBrowser.getSavedQueryKey("seriesgenres")}function getPromise(){loading.show();var query=getQuery();return ApiClient.getGenres(ApiClient.getCurrentUserId(),query)}function enableScrollX(){return!layoutManager.desktop}function getThumbShape(){return enableScrollX()?"overflowBackdrop":"backdrop"}function getPortraitShape(){return enableScrollX()?"overflowPortrait":"portrait"}function fillItemsContainer(elem){var id=elem.getAttribute("data-id"),viewStyle=self.getCurrentViewStyle(),limit="Thumb"==viewStyle||"ThumbCard"==viewStyle?5:9;enableScrollX()&&(limit=10);var enableImageTypes="Thumb"==viewStyle||"ThumbCard"==viewStyle?"Primary,Backdrop,Thumb":"Primary",query={SortBy:"SortName",SortOrder:"Ascending",IncludeItemTypes:"Series",Recursive:!0,Fields:"PrimaryImageAspectRatio,MediaSourceCount,BasicSyncInfo",ImageTypeLimit:1,EnableImageTypes:enableImageTypes,Limit:limit,GenreIds:id,EnableTotalRecordCount:!1,ParentId:params.topParentId};ApiClient.getItems(ApiClient.getCurrentUserId(),query).then(function(result){var supportsImageAnalysis=appHost.supports("imageanalysis");"Thumb"==viewStyle?cardBuilder.buildCards(result.Items,{itemsContainer:elem,shape:getThumbShape(),preferThumb:!0,showTitle:!0,scalable:!0,centerText:!0,overlayMoreButton:!0,allowBottomPadding:!1}):"ThumbCard"==viewStyle?cardBuilder.buildCards(result.Items,{itemsContainer:elem,shape:getThumbShape(),preferThumb:!0,showTitle:!0,scalable:!0,centerText:!1,cardLayout:!0,vibrant:supportsImageAnalysis,showYear:!0}):"PosterCard"==viewStyle?cardBuilder.buildCards(result.Items,{itemsContainer:elem,shape:getPortraitShape(),showTitle:!0,scalable:!0,centerText:!1,cardLayout:!0,vibrant:supportsImageAnalysis,showYear:!0}):"Poster"==viewStyle&&cardBuilder.buildCards(result.Items,{itemsContainer:elem,shape:getPortraitShape(),scalable:!0,overlayMoreButton:!0,allowBottomPadding:!1}),result.Items.length>=query.Limit&&tabContent.querySelector(".btnMoreFromGenre"+id+" i").classList.remove("hide")})}function reloadItems(context,promise){var query=getQuery();promise.then(function(result){for(var elem=context.querySelector("#items"),html="",items=result.Items,i=0,length=items.length;i',html+='",enableScrollX()){var scrollXClass="scrollX hiddenScrollX";layoutManager.tv&&(scrollXClass+=" smoothScrollX"),html+='
'}else html+='
';html+="
",html+="
"}elem.innerHTML=html,lazyLoader.lazyChildren(elem,fillItemsContainer),libraryBrowser.saveQueryValues(getSavedQueryKey(),query),loading.hide()})}function fullyReload(){self.preRender(),self.renderTab()}var self=this,data={};self.getViewStyles=function(){return"Poster,PosterCard,Thumb,ThumbCard".split(",")},self.getCurrentViewStyle=function(){return getPageData(tabContent).view},self.setCurrentViewStyle=function(viewStyle){getPageData(tabContent).view=viewStyle,libraryBrowser.saveViewSetting(getSavedQueryKey(tabContent),viewStyle),fullyReload()},self.enableViewSelection=!0;var promise;self.preRender=function(){promise=getPromise()},self.renderTab=function(){reloadItems(tabContent,promise)}}}); \ No newline at end of file diff --git a/dashboard-ui/scripts/tvrecommended.js b/dashboard-ui/scripts/tvrecommended.js index 79ce442f3f..7d485a8639 100644 --- a/dashboard-ui/scripts/tvrecommended.js +++ b/dashboard-ui/scripts/tvrecommended.js @@ -1 +1 @@ -define(["events","inputManager","libraryMenu","layoutManager","loading","dom","components/categorysyncbuttons","userSettings","cardBuilder","apphost","playbackManager","mainTabsManager","scrollStyles","emby-itemscontainer","emby-button"],function(events,inputManager,libraryMenu,layoutManager,loading,dom,categorysyncbuttons,userSettings,cardBuilder,appHost,playbackManager,mainTabsManager){"use strict";function getTabs(){return[{name:Globalize.translate("TabShows")},{name:Globalize.translate("TabSuggestions")},{name:Globalize.translate("TabLatest")},{name:Globalize.translate("TabUpcoming")},{name:Globalize.translate("TabGenres")},{name:Globalize.translate("TabNetworks")},{name:Globalize.translate("TabEpisodes")},{name:Globalize.translate("ButtonSearch"),cssClass:"searchTabButton"}]}function getDefaultTabIndex(folderId){switch(userSettings.get("landing-"+folderId)){case"suggestions":return 1;case"latest":return 2;case"favorites":return 1;case"genres":return 4;default:return 0}}return function(view,params){function reload(){loading.show(),loadResume(),loadNextUp()}function loadNextUp(){var query={Limit:24,Fields:"PrimaryImageAspectRatio,SeriesInfo,DateCreated,BasicSyncInfo",UserId:ApiClient.getCurrentUserId(),ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Thumb",EnableTotalRecordCount:!1};query.ParentId=libraryMenu.getTopParentId(),ApiClient.getNextUpEpisodes(query).then(function(result){result.Items.length?view.querySelector(".noNextUpItems").classList.add("hide"):view.querySelector(".noNextUpItems").classList.remove("hide");var container=view.querySelector("#nextUpItems"),supportsImageAnalysis=appHost.supports("imageanalysis"),cardLayout=!1;cardBuilder.buildCards(result.Items,{itemsContainer:container,preferThumb:!0,shape:"backdrop",scalable:!0,showTitle:!0,showParentTitle:!0,overlayText:!1,centerText:!cardLayout,overlayPlayButton:!0,cardLayout:cardLayout,vibrant:cardLayout&&supportsImageAnalysis}),loading.hide()})}function enableScrollX(){return!layoutManager.desktop}function getThumbShape(){return enableScrollX()?"overflowBackdrop":"backdrop"}function loadResume(){var parentId=libraryMenu.getTopParentId(),screenWidth=dom.getWindowSize().innerWidth,limit=screenWidth>=1600?5:6,options={SortBy:"DatePlayed",SortOrder:"Descending",IncludeItemTypes:"Episode",Filters:"IsResumable",Limit:limit,Recursive:!0,Fields:"PrimaryImageAspectRatio,SeriesInfo,UserData,BasicSyncInfo",ExcludeLocationTypes:"Virtual",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Thumb",EnableTotalRecordCount:!1};ApiClient.getItems(ApiClient.getCurrentUserId(),options).then(function(result){result.Items.length?view.querySelector("#resumableSection").classList.remove("hide"):view.querySelector("#resumableSection").classList.add("hide");var allowBottomPadding=!enableScrollX(),container=view.querySelector("#resumableItems"),supportsImageAnalysis=appHost.supports("imageanalysis"),cardLayout=!1;cardBuilder.buildCards(result.Items,{itemsContainer:container,preferThumb:!0,shape:getThumbShape(),scalable:!0,showTitle:!0,showParentTitle:!0,overlayText:!1,centerText:!cardLayout,overlayPlayButton:!0,allowBottomPadding:allowBottomPadding,cardLayout:cardLayout,vibrant:cardLayout&&supportsImageAnalysis})})}function onBeforeTabChange(e){preLoadTab(view,parseInt(e.detail.selectedTabIndex))}function onTabChange(e){var newIndex=parseInt(e.detail.selectedTabIndex);loadTab(view,newIndex)}function getTabContainers(){return view.querySelectorAll(".pageTabContent")}function initTabs(){mainTabsManager.setTabs(view,currentTabIndex,getTabs,getTabContainers,onBeforeTabChange,onTabChange)}function getTabController(page,index,callback){var depends=[];switch(index){case 0:depends.push("scripts/tvshows");break;case 1:break;case 2:depends.push("scripts/tvlatest");break;case 3:depends.push("scripts/tvupcoming");break;case 4:depends.push("scripts/tvgenres");break;case 5:depends.push("scripts/tvstudios");break;case 6:depends.push("scripts/episodes");break;case 7:depends.push("scripts/searchtab")}require(depends,function(controllerFactory){var tabContent;1===index&&(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),self.tabContent=tabContent);var controller=tabControllers[index];controller||(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),controller=1===index?self:7===index?new controllerFactory(view,tabContent,{collectionType:"tvshows",parentId:params.topParentId}):new controllerFactory(view,params,tabContent),tabControllers[index]=controller,controller.initTab&&controller.initTab()),callback(controller)})}function preLoadTab(page,index){getTabController(page,index,function(controller){renderedTabs.indexOf(index)==-1&&controller.preRender&&controller.preRender()})}function loadTab(page,index){currentTabIndex=index,getTabController(page,index,function(controller){initialTabIndex=null,renderedTabs.indexOf(index)==-1&&(renderedTabs.push(index),controller.renderTab())})}function onPlaybackStop(e,state){state.NowPlayingItem&&"Video"==state.NowPlayingItem.MediaType&&(renderedTabs=[],mainTabsManager.getTabsElement().triggerTabChange())}function onWebSocketMessage(e,data){var msg=data;"UserDataChanged"===msg.MessageType&&msg.Data.UserId==ApiClient.getCurrentUserId()&&(renderedTabs=[])}function onInputCommand(e){switch(e.detail.command){case"search":e.preventDefault(),Dashboard.navigate("search.html?collectionType=tv&parentId="+params.topParentId)}}var isViewRestored,self=this,currentTabIndex=parseInt(params.tab||getDefaultTabIndex(params.topParentId)),initialTabIndex=currentTabIndex;self.initTab=function(){var tabContent=self.tabContent,resumableItemsContainer=tabContent.querySelector("#resumableItems");enableScrollX()?(resumableItemsContainer.classList.add("hiddenScrollX"),resumableItemsContainer.classList.remove("vertical-wrap")):(resumableItemsContainer.classList.remove("hiddenScrollX"),resumableItemsContainer.classList.add("vertical-wrap")),categorysyncbuttons.init(tabContent)},self.renderTab=function(){reload()};var tabControllers=[],renderedTabs=[];enableScrollX()?view.querySelector("#resumableItems").classList.add("hiddenScrollX"):view.querySelector("#resumableItems").classList.remove("hiddenScrollX"),view.addEventListener("viewshow",function(e){if(isViewRestored=e.detail.isRestored,initTabs(),!view.getAttribute("data-title")){var parentId=params.topParentId;parentId?ApiClient.getItem(ApiClient.getCurrentUserId(),parentId).then(function(item){view.setAttribute("data-title",item.Name),libraryMenu.setTitle(item.Name)}):(view.setAttribute("data-title",Globalize.translate("TabShows")),libraryMenu.setTitle(Globalize.translate("TabShows")))}events.on(playbackManager,"playbackstop",onPlaybackStop),events.on(ApiClient,"websocketmessage",onWebSocketMessage),inputManager.on(window,onInputCommand)}),view.addEventListener("viewbeforehide",function(e){inputManager.off(window,onInputCommand),events.off(playbackManager,"playbackstop",onPlaybackStop),events.off(ApiClient,"websocketmessage",onWebSocketMessage)}),view.addEventListener("viewdestroy",function(e){tabControllers.forEach(function(t){t.destroy&&t.destroy()})})}}); \ No newline at end of file +define(["events","inputManager","libraryMenu","layoutManager","loading","dom","components/categorysyncbuttons","userSettings","cardBuilder","apphost","playbackManager","mainTabsManager","scrollStyles","emby-itemscontainer","emby-button"],function(events,inputManager,libraryMenu,layoutManager,loading,dom,categorysyncbuttons,userSettings,cardBuilder,appHost,playbackManager,mainTabsManager){"use strict";function getTabs(){return[{name:Globalize.translate("TabShows")},{name:Globalize.translate("TabSuggestions")},{name:Globalize.translate("TabLatest")},{name:Globalize.translate("TabUpcoming")},{name:Globalize.translate("TabGenres")},{name:Globalize.translate("TabNetworks")},{name:Globalize.translate("TabEpisodes")},{name:Globalize.translate("ButtonSearch"),cssClass:"searchTabButton"}]}function getDefaultTabIndex(folderId){switch(userSettings.get("landing-"+folderId)){case"suggestions":return 1;case"latest":return 2;case"favorites":return 1;case"genres":return 4;default:return 0}}function setScrollClasses(elem,scrollX){scrollX?(elem.classList.add("hiddenScrollX"),layoutManager.tv&&elem.classList.add("smoothScrollX"),elem.classList.add("scrollX"),elem.classList.remove("vertical-wrap")):(elem.classList.remove("hiddenScrollX"),elem.classList.remove("smoothScrollX"),elem.classList.remove("scrollX"),elem.classList.add("vertical-wrap"))}return function(view,params){function reload(){loading.show(),loadResume(),loadNextUp()}function loadNextUp(){var query={Limit:24,Fields:"PrimaryImageAspectRatio,SeriesInfo,DateCreated,BasicSyncInfo",UserId:ApiClient.getCurrentUserId(),ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Thumb",EnableTotalRecordCount:!1};query.ParentId=libraryMenu.getTopParentId(),ApiClient.getNextUpEpisodes(query).then(function(result){result.Items.length?view.querySelector(".noNextUpItems").classList.add("hide"):view.querySelector(".noNextUpItems").classList.remove("hide");var container=view.querySelector("#nextUpItems"),supportsImageAnalysis=appHost.supports("imageanalysis"),cardLayout=!1;cardBuilder.buildCards(result.Items,{itemsContainer:container,preferThumb:!0,shape:"backdrop",scalable:!0,showTitle:!0,showParentTitle:!0,overlayText:!1,centerText:!cardLayout,overlayPlayButton:!0,cardLayout:cardLayout,vibrant:cardLayout&&supportsImageAnalysis}),loading.hide()})}function enableScrollX(){return!layoutManager.desktop}function getThumbShape(){return enableScrollX()?"overflowBackdrop":"backdrop"}function loadResume(){var parentId=libraryMenu.getTopParentId(),screenWidth=dom.getWindowSize().innerWidth,limit=screenWidth>=1600?5:6,options={SortBy:"DatePlayed",SortOrder:"Descending",IncludeItemTypes:"Episode",Filters:"IsResumable",Limit:limit,Recursive:!0,Fields:"PrimaryImageAspectRatio,SeriesInfo,UserData,BasicSyncInfo",ExcludeLocationTypes:"Virtual",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Thumb",EnableTotalRecordCount:!1};ApiClient.getItems(ApiClient.getCurrentUserId(),options).then(function(result){result.Items.length?view.querySelector("#resumableSection").classList.remove("hide"):view.querySelector("#resumableSection").classList.add("hide");var allowBottomPadding=!enableScrollX(),container=view.querySelector("#resumableItems"),supportsImageAnalysis=appHost.supports("imageanalysis"),cardLayout=!1;cardBuilder.buildCards(result.Items,{itemsContainer:container,preferThumb:!0,shape:getThumbShape(),scalable:!0,showTitle:!0,showParentTitle:!0,overlayText:!1,centerText:!cardLayout,overlayPlayButton:!0,allowBottomPadding:allowBottomPadding,cardLayout:cardLayout,vibrant:cardLayout&&supportsImageAnalysis})})}function onBeforeTabChange(e){preLoadTab(view,parseInt(e.detail.selectedTabIndex))}function onTabChange(e){var newIndex=parseInt(e.detail.selectedTabIndex);loadTab(view,newIndex)}function getTabContainers(){return view.querySelectorAll(".pageTabContent")}function initTabs(){mainTabsManager.setTabs(view,currentTabIndex,getTabs,getTabContainers,onBeforeTabChange,onTabChange)}function getTabController(page,index,callback){var depends=[];switch(index){case 0:depends.push("scripts/tvshows");break;case 1:break;case 2:depends.push("scripts/tvlatest");break;case 3:depends.push("scripts/tvupcoming");break;case 4:depends.push("scripts/tvgenres");break;case 5:depends.push("scripts/tvstudios");break;case 6:depends.push("scripts/episodes");break;case 7:depends.push("scripts/searchtab")}require(depends,function(controllerFactory){var tabContent;1===index&&(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),self.tabContent=tabContent);var controller=tabControllers[index];controller||(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),controller=1===index?self:7===index?new controllerFactory(view,tabContent,{collectionType:"tvshows",parentId:params.topParentId}):new controllerFactory(view,params,tabContent),tabControllers[index]=controller,controller.initTab&&controller.initTab()),callback(controller)})}function preLoadTab(page,index){getTabController(page,index,function(controller){renderedTabs.indexOf(index)==-1&&controller.preRender&&controller.preRender()})}function loadTab(page,index){currentTabIndex=index,getTabController(page,index,function(controller){initialTabIndex=null,renderedTabs.indexOf(index)==-1&&(renderedTabs.push(index),controller.renderTab())})}function onPlaybackStop(e,state){state.NowPlayingItem&&"Video"==state.NowPlayingItem.MediaType&&(renderedTabs=[],mainTabsManager.getTabsElement().triggerTabChange())}function onWebSocketMessage(e,data){var msg=data;"UserDataChanged"===msg.MessageType&&msg.Data.UserId==ApiClient.getCurrentUserId()&&(renderedTabs=[])}function onInputCommand(e){switch(e.detail.command){case"search":e.preventDefault(),Dashboard.navigate("search.html?collectionType=tv&parentId="+params.topParentId)}}var isViewRestored,self=this,currentTabIndex=parseInt(params.tab||getDefaultTabIndex(params.topParentId)),initialTabIndex=currentTabIndex;self.initTab=function(){var tabContent=self.tabContent,resumableItemsContainer=tabContent.querySelector("#resumableItems");setScrollClasses(resumableItemsContainer,enableScrollX()),categorysyncbuttons.init(tabContent)},self.renderTab=function(){reload()};var tabControllers=[],renderedTabs=[];setScrollClasses(view.querySelector("#resumableItems"),enableScrollX()),view.addEventListener("viewshow",function(e){if(isViewRestored=e.detail.isRestored,initTabs(),!view.getAttribute("data-title")){var parentId=params.topParentId;parentId?ApiClient.getItem(ApiClient.getCurrentUserId(),parentId).then(function(item){view.setAttribute("data-title",item.Name),libraryMenu.setTitle(item.Name)}):(view.setAttribute("data-title",Globalize.translate("TabShows")),libraryMenu.setTitle(Globalize.translate("TabShows")))}events.on(playbackManager,"playbackstop",onPlaybackStop),events.on(ApiClient,"websocketmessage",onWebSocketMessage),inputManager.on(window,onInputCommand)}),view.addEventListener("viewbeforehide",function(e){inputManager.off(window,onInputCommand),events.off(playbackManager,"playbackstop",onPlaybackStop),events.off(ApiClient,"websocketmessage",onWebSocketMessage)}),view.addEventListener("viewdestroy",function(e){tabControllers.forEach(function(t){t.destroy&&t.destroy()})})}}); \ No newline at end of file diff --git a/dashboard-ui/scripts/tvupcoming.js b/dashboard-ui/scripts/tvupcoming.js index 86a3bb7b8b..649f93235c 100644 --- a/dashboard-ui/scripts/tvupcoming.js +++ b/dashboard-ui/scripts/tvupcoming.js @@ -1 +1 @@ -define(["layoutManager","loading","datetime","libraryBrowser","cardBuilder","apphost","imageLoader","scrollStyles","emby-itemscontainer"],function(layoutManager,loading,datetime,libraryBrowser,cardBuilder,appHost,imageLoader){"use strict";function getUpcomingPromise(context,params){loading.show();var query={Limit:48,Fields:"AirTime,UserData",UserId:ApiClient.getCurrentUserId(),ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};return query.ParentId=params.topParentId,ApiClient.getJSON(ApiClient.getUrl("Shows/Upcoming",query))}function loadUpcoming(context,params,promise){promise.then(function(result){var items=result.Items;items.length?context.querySelector(".noItemsMessage").style.display="none":context.querySelector(".noItemsMessage").style.display="block";var elem=context.querySelector("#upcomingItems");renderUpcoming(elem,items),loading.hide()})}function enableScrollX(){return!layoutManager.desktop}function getThumbShape(){return enableScrollX()?"overflowBackdrop":"backdrop"}function renderUpcoming(elem,items){var i,length,groups=[],currentGroupName="",currentGroup=[];for(i=0,length=items.length;i',html+='

'+group.name+"

";var allowBottomPadding=!0;enableScrollX()?(allowBottomPadding=!1,html+='
'):html+='
';var supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,html+=cardBuilder.getCardsHtml({items:group.items,showLocationTypeIndicator:!1,shape:getThumbShape(),showTitle:!0,preferThumb:!0,lazy:!0,showDetailsMenu:!0,centerText:!supportsImageAnalysis,showParentTitle:!0,overlayText:!1,allowBottomPadding:allowBottomPadding,cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis,overlayMoreButton:!0}),html+="
",html+="
"}elem.innerHTML=html,imageLoader.lazyChildren(elem)}return function(view,params,tabContent){var upcomingPromise,self=this;self.preRender=function(){upcomingPromise=getUpcomingPromise(view,params)},self.renderTab=function(){loadUpcoming(tabContent,params,upcomingPromise)}}}); \ No newline at end of file +define(["layoutManager","loading","datetime","libraryBrowser","cardBuilder","apphost","imageLoader","scrollStyles","emby-itemscontainer"],function(layoutManager,loading,datetime,libraryBrowser,cardBuilder,appHost,imageLoader){"use strict";function getUpcomingPromise(context,params){loading.show();var query={Limit:48,Fields:"AirTime,UserData",UserId:ApiClient.getCurrentUserId(),ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};return query.ParentId=params.topParentId,ApiClient.getJSON(ApiClient.getUrl("Shows/Upcoming",query))}function loadUpcoming(context,params,promise){promise.then(function(result){var items=result.Items;items.length?context.querySelector(".noItemsMessage").style.display="none":context.querySelector(".noItemsMessage").style.display="block";var elem=context.querySelector("#upcomingItems");renderUpcoming(elem,items),loading.hide()})}function enableScrollX(){return!layoutManager.desktop}function getThumbShape(){return enableScrollX()?"overflowBackdrop":"backdrop"}function renderUpcoming(elem,items){var i,length,groups=[],currentGroupName="",currentGroup=[];for(i=0,length=items.length;i',html+='

'+group.name+"

";var allowBottomPadding=!0;if(enableScrollX()){allowBottomPadding=!1;var scrollXClass="scrollX hiddenScrollX";layoutManager.tv&&(scrollXClass+=" smoothScrollX"),html+='
'}else html+='
';var supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,html+=cardBuilder.getCardsHtml({items:group.items,showLocationTypeIndicator:!1,shape:getThumbShape(),showTitle:!0,preferThumb:!0,lazy:!0,showDetailsMenu:!0,centerText:!supportsImageAnalysis,showParentTitle:!0,overlayText:!1,allowBottomPadding:allowBottomPadding,cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis,overlayMoreButton:!0}),html+="
",html+="
"}elem.innerHTML=html,imageLoader.lazyChildren(elem)}return function(view,params,tabContent){var upcomingPromise,self=this;self.preRender=function(){upcomingPromise=getUpcomingPromise(view,params)},self.renderTab=function(){loadUpcoming(tabContent,params,upcomingPromise)}}}); \ No newline at end of file