From 0f4b4b590802f50ec6859b71b5425637cfe4c6a3 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 27 Nov 2017 15:14:43 -0500 Subject: [PATCH] update components --- .../actionsheet/actionsheet.js | 2 +- .../browserdeviceprofile.js | 2 +- .../emby-button/emby-button.css | 2 +- .../emby-itemscontainer.js | 2 +- .../filtermenu/filtermenu.js | 1 + .../filtermenu/filtermenu.template.html | 24 +++ .../emby-webcomponents/guide/guide.css | 2 +- .../emby-webcomponents/headroom/headroom.js | 2 +- .../metadataeditor/metadataeditor.js | 2 +- .../playback/playbackmanager.js | 4 +- .../scroller/smoothscroller.js | 2 +- .../emby-webcomponents/scrollstyles.css | 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 | 4 + .../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 | 4 +- .../emby-webcomponents/strings/es-ar.json | 4 + .../emby-webcomponents/strings/es-mx.json | 14 +- .../emby-webcomponents/strings/es.json | 4 + .../emby-webcomponents/strings/fi.json | 4 + .../emby-webcomponents/strings/fr-ca.json | 4 + .../emby-webcomponents/strings/fr.json | 4 + .../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 | 4 + .../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 | 4 + .../emby-webcomponents/strings/sk.json | 4 + .../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 | 2 +- .../usersettings/usersettingsbuilder.js | 2 +- .../bower_components/vibrant/dist/vibrant.js | 1 - .../vibrant/dist/vibrant.min.js | 1 - .../bower_components/vibrant/gulpfile.coffee | 42 ----- .../bower_components/vibrant/index.html | 162 ------------------ .../bower_components/vibrant/style.css | 1 - .../bower_components/vibrant/website.coffee | 34 ---- .../accessschedule.template.html | 2 +- dashboard-ui/components/apphost.js | 2 +- .../directorybrowser/directorybrowser.js | 2 +- .../guestinviter/connectlink.template.html | 2 +- .../guestinviter/guestinviter.template.html | 2 +- .../medialibrarycreator.template.html | 2 +- .../medialibraryeditor.template.html | 2 +- .../components/navdrawer/navdrawer.js | 2 +- dashboard-ui/components/tunerpicker.js | 2 +- dashboard-ui/css/librarybrowser.css | 2 +- dashboard-ui/scripts/itemlistpage.js | 2 +- dashboard-ui/scripts/movies.js | 2 +- dashboard-ui/scripts/moviesrecommended.js | 2 +- dashboard-ui/scripts/site.js | 4 +- dashboard-ui/scripts/tvrecommended.js | 2 +- dashboard-ui/scripts/tvshows.js | 2 +- 78 files changed, 228 insertions(+), 278 deletions(-) create mode 100644 dashboard-ui/bower_components/emby-webcomponents/filtermenu/filtermenu.js create mode 100644 dashboard-ui/bower_components/emby-webcomponents/filtermenu/filtermenu.template.html delete mode 100644 dashboard-ui/bower_components/vibrant/dist/vibrant.js delete mode 100644 dashboard-ui/bower_components/vibrant/dist/vibrant.min.js delete mode 100644 dashboard-ui/bower_components/vibrant/gulpfile.coffee delete mode 100644 dashboard-ui/bower_components/vibrant/index.html delete mode 100644 dashboard-ui/bower_components/vibrant/style.css delete mode 100644 dashboard-ui/bower_components/vibrant/website.coffee diff --git a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js index 91e98b7ede..c721f31fc7 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js +++ b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js @@ -1 +1 @@ -define(["dialogHelper","layoutManager","globalize","browser","dom","emby-button","css!./actionsheet","material-icons","scrollStyles"],function(dialogHelper,layoutManager,globalize,browser,dom){"use strict";function getOffsets(elems){var doc=document,results=[];if(!doc)return results;for(var box,elem,i=0,length=elems.length;i0&&(pos.left-=overflowX+20),overflowY>0&&(pos.top-=overflowY+20),pos.top+=options.offsetTop||0,pos.left+=options.offsetLeft||0,pos.top=Math.max(pos.top,10),pos.left=Math.max(pos.left,10),pos}function centerFocus(elem,horiz,on){require(["scrollHelper"],function(scrollHelper){var fn=on?"on":"off";scrollHelper.centerFocus[fn](elem,horiz)})}function show(options){var isFullscreen,dialogOptions={removeOnClose:!0,enableHistory:options.enableHistory,scrollY:!1},backButton=!1;layoutManager.tv?(dialogOptions.size="fullscreen",isFullscreen=!0,backButton=!0,dialogOptions.autoFocus=!0):(dialogOptions.modal=!1,dialogOptions.entryAnimation=options.entryAnimation,dialogOptions.exitAnimation=options.exitAnimation,dialogOptions.entryAnimationDuration=options.entryAnimationDuration||140,dialogOptions.exitAnimationDuration=options.exitAnimationDuration||100,dialogOptions.autoFocus=!1);var dlg=dialogHelper.createDialog(dialogOptions);isFullscreen?dlg.classList.add("actionsheet-fullscreen"):dlg.classList.add("actionsheet-not-fullscreen");var extraSpacing=!layoutManager.tv;extraSpacing&&dlg.classList.add("actionsheet-extraSpacing"),layoutManager.mobile?dlg.classList.add("actionsheet-xlargeFont"):layoutManager.desktop&&dlg.classList.add("actionsheet-largeFont"),dlg.classList.add("actionSheet"),options.dialogClass&&dlg.classList.add(options.dialogClass);var html="",scrollType=layoutManager.desktop?"smoothScrollY":"hiddenScrollY",style="";if(options.items.length>20){var minWidth=dom.getWindowSize().innerWidth>=300?240:200;style+="min-width:"+minWidth+"px;"}var i,length,option,renderIcon=!1;for(i=0,length=options.items.length;i');var center=options.title&&!renderIcon;html+=center?'
':'
',options.title&&(layoutManager.tv?(html+='

',html+=options.title,html+="

"):(html+='

',html+=options.title,html+="

")),options.text&&(html+='

',html+=options.text,html+="

");var scrollerClassName="actionSheetScroller";layoutManager.tv&&(scrollerClassName+=" actionSheetScroller-tv focuscontainer-x focuscontainer-y"),html+='
';var menuItemClass="actionSheetMenuItem";options.menuItemClass&&(menuItemClass+=" "+options.menuItemClass),extraSpacing&&(menuItemClass+=" actionSheetMenuItem-extraspacing");var actionSheetItemTextClass="actionSheetItemText";for(i=0,length=options.items.length;i
';else{var autoFocus=option.selected?" autoFocus":"",optionId=null==option.id||""===option.id?option.value:option.id;html+="',option.icon?html+=''+option.icon+"":renderIcon&&!center&&(html+=''),html+='
'+(option.name||option.textContent||option.innerText)+"
",option.secondaryText&&(html+='
'+option.secondaryText+"
"),html+=""}options.showCancel&&(html+='
',html+='",html+="
"),html+="
",dlg.innerHTML=html,layoutManager.tv&¢erFocus(dlg.querySelector(".actionSheetScroller"),!1,!0);var btnCloseActionSheet=dlg.querySelector(".btnCloseActionSheet");btnCloseActionSheet&&dlg.querySelector(".btnCloseActionSheet").addEventListener("click",function(){dialogHelper.close(dlg)});var selectedId,timeout;return options.timeout&&(timeout=setTimeout(function(){dialogHelper.close(dlg)},options.timeout)),new Promise(function(resolve,reject){var isResolved;dlg.addEventListener("click",function(e){var actionSheetMenuItem=dom.parentWithClass(e.target,"actionSheetMenuItem");actionSheetMenuItem&&(selectedId=actionSheetMenuItem.getAttribute("data-id"),options.resolveOnClick&&(resolve(selectedId),isResolved=!0),dialogHelper.close(dlg))}),dlg.addEventListener("close",function(){layoutManager.tv&¢erFocus(dlg.querySelector(".actionSheetScroller"),!1,!1),timeout&&(clearTimeout(timeout),timeout=null),isResolved||(null!=selectedId?(options.callback&&options.callback(selectedId),resolve(selectedId)):reject())}),dialogHelper.open(dlg);var setPositions=function(){var pos=options.positionTo&&"fullscreen"!==dialogOptions.size?getPosition(options,dlg):null;pos&&(dlg.style.position="fixed",dlg.style.margin=0,dlg.style.left=pos.left+"px",dlg.style.top=pos.top+"px")};browser.safari?setTimeout(setPositions,0):setPositions()})}return{show:show}}); \ No newline at end of file +define(["dialogHelper","layoutManager","globalize","browser","dom","emby-button","css!./actionsheet","material-icons","scrollStyles"],function(dialogHelper,layoutManager,globalize,browser,dom){"use strict";function getOffsets(elems){var doc=document,results=[];if(!doc)return results;for(var box,elem,i=0,length=elems.length;i0&&(pos.left-=overflowX+20),overflowY>0&&(pos.top-=overflowY+20),pos.top+=options.offsetTop||0,pos.left+=options.offsetLeft||0,pos.top=Math.max(pos.top,10),pos.left=Math.max(pos.left,10),pos}function centerFocus(elem,horiz,on){require(["scrollHelper"],function(scrollHelper){var fn=on?"on":"off";scrollHelper.centerFocus[fn](elem,horiz)})}function show(options){var isFullscreen,dialogOptions={removeOnClose:!0,enableHistory:options.enableHistory,scrollY:!1},backButton=!1;layoutManager.tv?(dialogOptions.size="fullscreen",isFullscreen=!0,backButton=!0,dialogOptions.autoFocus=!0):(dialogOptions.modal=!1,dialogOptions.entryAnimation=options.entryAnimation,dialogOptions.exitAnimation=options.exitAnimation,dialogOptions.entryAnimationDuration=options.entryAnimationDuration||140,dialogOptions.exitAnimationDuration=options.exitAnimationDuration||100,dialogOptions.autoFocus=!1);var dlg=dialogHelper.createDialog(dialogOptions);isFullscreen?dlg.classList.add("actionsheet-fullscreen"):dlg.classList.add("actionsheet-not-fullscreen");var extraSpacing=!layoutManager.tv;extraSpacing&&dlg.classList.add("actionsheet-extraSpacing"),layoutManager.mobile?dlg.classList.add("actionsheet-xlargeFont"):layoutManager.desktop&&dlg.classList.add("actionsheet-largeFont"),dlg.classList.add("actionSheet"),options.dialogClass&&dlg.classList.add(options.dialogClass);var html="",scrollClassName=layoutManager.tv?"scrollY smoothScrollY hiddenScrollY":"scrollY",style="";if(options.items.length>20){var minWidth=dom.getWindowSize().innerWidth>=300?240:200;style+="min-width:"+minWidth+"px;"}var i,length,option,renderIcon=!1;for(i=0,length=options.items.length;i');var center=options.title&&!renderIcon;html+=center?'
':'
',options.title&&(layoutManager.tv?(html+='

',html+=options.title,html+="

"):(html+='

',html+=options.title,html+="

")),options.text&&(html+='

',html+=options.text,html+="

");var scrollerClassName="actionSheetScroller";layoutManager.tv&&(scrollerClassName+=" actionSheetScroller-tv focuscontainer-x focuscontainer-y"),html+='
';var menuItemClass="actionSheetMenuItem";options.menuItemClass&&(menuItemClass+=" "+options.menuItemClass),extraSpacing&&(menuItemClass+=" actionSheetMenuItem-extraspacing");var actionSheetItemTextClass="actionSheetItemText";for(i=0,length=options.items.length;i
';else{var autoFocus=option.selected?" autoFocus":"",optionId=null==option.id||""===option.id?option.value:option.id;html+="',option.icon?html+=''+option.icon+"":renderIcon&&!center&&(html+=''),html+='
'+(option.name||option.textContent||option.innerText)+"
",option.secondaryText&&(html+='
'+option.secondaryText+"
"),html+=""}options.showCancel&&(html+='
',html+='",html+="
"),html+="
",dlg.innerHTML=html,layoutManager.tv&¢erFocus(dlg.querySelector(".actionSheetScroller"),!1,!0);var btnCloseActionSheet=dlg.querySelector(".btnCloseActionSheet");btnCloseActionSheet&&dlg.querySelector(".btnCloseActionSheet").addEventListener("click",function(){dialogHelper.close(dlg)});var selectedId,timeout;return options.timeout&&(timeout=setTimeout(function(){dialogHelper.close(dlg)},options.timeout)),new Promise(function(resolve,reject){var isResolved;dlg.addEventListener("click",function(e){var actionSheetMenuItem=dom.parentWithClass(e.target,"actionSheetMenuItem");actionSheetMenuItem&&(selectedId=actionSheetMenuItem.getAttribute("data-id"),options.resolveOnClick&&(resolve(selectedId),isResolved=!0),dialogHelper.close(dlg))}),dlg.addEventListener("close",function(){layoutManager.tv&¢erFocus(dlg.querySelector(".actionSheetScroller"),!1,!1),timeout&&(clearTimeout(timeout),timeout=null),isResolved||(null!=selectedId?(options.callback&&options.callback(selectedId),resolve(selectedId)):reject())}),dialogHelper.open(dlg);var setPositions=function(){var pos=options.positionTo&&"fullscreen"!==dialogOptions.size?getPosition(options,dlg):null;pos&&(dlg.style.position="fixed",dlg.style.margin=0,dlg.style.left=pos.left+"px",dlg.style.top=pos.top+"px")};browser.safari?setTimeout(setPositions,0):setPositions()})}return{show:show}}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js index 4a361ab83a..0c01e1f551 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js +++ b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js @@ -1 +1 @@ -define(["browser"],function(browser){"use strict";function canPlayH264(videoTestElement){return!(!videoTestElement.canPlayType||!videoTestElement.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/,""))}function canPlayH265(videoTestElement,options){if(browser.tizen||browser.orsay||browser.xboxOne||browser.web0s||options.supportsHevc)return!0;var userAgent=navigator.userAgent.toLowerCase();if(browser.chromecast){var isChromecastUltra=userAgent.indexOf("aarch64")!==-1;if(isChromecastUltra)return!0}return!!(browser.iOS&&(browser.iOSVersion||0)>=11)||!(!videoTestElement.canPlayType||!videoTestElement.canPlayType('video/hevc; codecs="hevc, aac"').replace(/no/,""))}function supportsTextTracks(){return!(!browser.tizen&&!browser.orsay)||(null==_supportsTextTracks&&(_supportsTextTracks=null!=document.createElement("video").textTracks),_supportsTextTracks)}function canPlayHls(src){return null==_canPlayHls&&(_canPlayHls=canPlayNativeHls()||canPlayHlsWithMSE()),_canPlayHls}function canPlayNativeHls(){if(browser.tizen||browser.orsay)return!0;var media=document.createElement("video");return!(!media.canPlayType("application/x-mpegURL").replace(/no/,"")&&!media.canPlayType("application/vnd.apple.mpegURL").replace(/no/,""))}function canPlayHlsWithMSE(){return null!=window.MediaSource}function canPlayAudioFormat(format){var typeString;if("flac"===format){if(browser.tizen||browser.orsay)return!0;if(browser.edgeUwp)return!0}else if("wma"===format){if(browser.tizen||browser.orsay)return!0;if(browser.edgeUwp)return!0}else{if("opus"===format)return typeString='audio/ogg; codecs="opus"',!!document.createElement("audio").canPlayType(typeString).replace(/no/,"");if("mp2"===format)return!1}if("webma"===format)typeString="audio/webm";else if("mp2"===format)typeString="audio/mpeg";else if("ogg"===format||"oga"===format){if(browser.chrome)return!1;typeString="audio/"+format}else typeString="audio/"+format;return!!document.createElement("audio").canPlayType(typeString).replace(/no/,"")}function testCanPlayMkv(videoTestElement){if(browser.tizen||browser.orsay)return!0;if(videoTestElement.canPlayType("video/x-matroska").replace(/no/,"")||videoTestElement.canPlayType("video/mkv").replace(/no/,""))return!0;var userAgent=navigator.userAgent.toLowerCase();return browser.chrome?!browser.operaTv&&(userAgent.indexOf("vivaldi")===-1&&userAgent.indexOf("opera")===-1):!!browser.edgeUwp}function testCanPlayTs(){return browser.tizen||browser.orsay||browser.web0s||browser.edgeUwp}function supportsMpeg2Video(){return browser.orsay||browser.tizen||browser.edgeUwp||browser.web0s}function supportsVc1(){return browser.orsay||browser.tizen||browser.edgeUwp}function getDirectPlayProfileForVideoContainer(container,videoAudioCodecs,videoTestElement,options){var supported=!1,profileContainer=container,videoCodecs=[];switch(container){case"asf":supported=browser.tizen||browser.orsay||browser.edgeUwp,videoAudioCodecs=[];break;case"avi":supported=browser.tizen||browser.orsay||browser.edgeUwp;break;case"mpg":case"mpeg":supported=browser.edgeUwp||browser.tizen||browser.orsay;break;case"flv":supported=browser.tizen||browser.orsay;break;case"3gp":case"mts":case"trp":case"vob":case"vro":supported=browser.tizen||browser.orsay;break;case"mov":supported=browser.tizen||browser.orsay||browser.chrome||browser.edgeUwp,videoCodecs.push("h264");break;case"m2ts":supported=browser.tizen||browser.orsay||browser.web0s||browser.edgeUwp,videoCodecs.push("h264"),supportsVc1()&&videoCodecs.push("vc1"),supportsMpeg2Video()&&videoCodecs.push("mpeg2video");break;case"wmv":supported=browser.tizen||browser.orsay||browser.web0s||browser.edgeUwp,videoAudioCodecs=[];break;case"ts":supported=testCanPlayTs(),videoCodecs.push("h264"),canPlayH265(videoTestElement,options)&&(videoCodecs.push("h265"),videoCodecs.push("hevc")),supportsVc1()&&videoCodecs.push("vc1"),supportsMpeg2Video()&&videoCodecs.push("mpeg2video"),profileContainer="ts,mpegts"}return supported?{Container:profileContainer,Type:"Video",VideoCodec:videoCodecs.join(","),AudioCodec:videoAudioCodecs.join(",")}:null}function getMaxBitrate(){return 12e7}function getGlobalMaxVideoBitrate(){var userAgent=navigator.userAgent.toLowerCase();if(browser.chromecast){var isChromecastUltra=userAgent.indexOf("aarch64")!==-1;return isChromecastUltra?null:3e7}var isTizenFhd=!1;if(browser.tizen)try{var isTizenUhd=webapis.productinfo.isUdPanelSupported();isTizenFhd=!isTizenUhd,console.log("isTizenFhd = "+isTizenFhd)}catch(error){console.log("isUdPanelSupported() error code = "+error.code)}return browser.ps4?8e6:browser.xboxOne?12e6:browser.edgeUwp?null:browser.tizen&&isTizenFhd?2e7:null}function supportsAc3(videoTestElement){return!!(browser.edgeUwp||browser.tizen||browser.orsay||browser.web0s)||videoTestElement.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/,"")&&!browser.osx&&!browser.iOS}function supportsEac3(videoTestElement){return!!(browser.tizen||browser.orsay||browser.web0s)||videoTestElement.canPlayType('audio/mp4; codecs="ec-3"').replace(/no/,"")}var _supportsTextTracks,_canPlayHls;return function(options){options=options||{};var physicalAudioChannels=options.audioChannels||(browser.tv||browser.chromecast||browser.ps4||browser.xboxOne?6:2),bitrateSetting=getMaxBitrate(),videoTestElement=document.createElement("video"),canPlayWebm=videoTestElement.canPlayType("video/webm").replace(/no/,""),canPlayMkv=testCanPlayMkv(videoTestElement),profile={};profile.MaxStreamingBitrate=bitrateSetting,profile.MaxStaticBitrate=1e8,profile.MusicStreamingTranscodingBitrate=Math.min(bitrateSetting,192e3),profile.DirectPlayProfiles=[];var videoAudioCodecs=[],hlsVideoAudioCodecs=[],supportsMp3VideoAudio=videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.69"').replace(/no/,"")||videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.6B"').replace(/no/,""),supportsMp2VideoAudio=browser.edgeUwp||browser.tizen||browser.orsay||browser.web0s,maxVideoWidth=browser.xboxOne&&self.screen?self.screen.width:null;if(options.maxVideoWidth&&(maxVideoWidth=options.maxVideoWidth),supportsAc3(videoTestElement)){videoAudioCodecs.push("ac3");var eAc3=supportsEac3(videoTestElement);eAc3&&videoAudioCodecs.push("eac3");var supportsAc3InHls=!browser.edge||!browser.touch||browser.edgeUwp;supportsAc3InHls&&(hlsVideoAudioCodecs.push("ac3"),eAc3&&hlsVideoAudioCodecs.push("eac3"))}supportsMp3VideoAudio&&(videoAudioCodecs.push("mp3"),browser.ps4||(physicalAudioChannels<=2||browser.chromecast)&&hlsVideoAudioCodecs.push("mp3")),videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.2"').replace(/no/,"")&&(videoAudioCodecs.push("aac"),(physicalAudioChannels<=2||!browser.chromecast)&&hlsVideoAudioCodecs.push("aac")),supportsMp3VideoAudio&&(browser.ps4||hlsVideoAudioCodecs.indexOf("mp3")===-1&&hlsVideoAudioCodecs.push("mp3")),supportsMp2VideoAudio&&videoAudioCodecs.push("mp2"),(browser.tizen||browser.orsay||browser.web0s||options.supportsDts)&&(videoAudioCodecs.push("dca"),videoAudioCodecs.push("dts")),(browser.tizen||browser.orsay)&&(videoAudioCodecs.push("pcm_s16le"),videoAudioCodecs.push("pcm_s24le")),options.supportsTrueHd&&videoAudioCodecs.push("truehd"),(browser.tizen||browser.orsay)&&videoAudioCodecs.push("aac_latm"),videoAudioCodecs=videoAudioCodecs.filter(function(c){return(options.disableVideoAudioCodecs||[]).indexOf(c)===-1}),hlsVideoAudioCodecs=hlsVideoAudioCodecs.filter(function(c){return(options.disableHlsVideoAudioCodecs||[]).indexOf(c)===-1});var mp4VideoCodecs=[];canPlayH264(videoTestElement)&&mp4VideoCodecs.push("h264"),canPlayH265(videoTestElement,options)&&(mp4VideoCodecs.push("h265"),mp4VideoCodecs.push("hevc")),supportsMpeg2Video()&&mp4VideoCodecs.push("mpeg2video"),supportsVc1()&&mp4VideoCodecs.push("vc1"),(browser.tizen||browser.orsay)&&mp4VideoCodecs.push("msmpeg4v2"),mp4VideoCodecs.length&&profile.DirectPlayProfiles.push({Container:"mp4,m4v",Type:"Video",VideoCodec:mp4VideoCodecs.join(","),AudioCodec:videoAudioCodecs.join(",")}),canPlayMkv&&mp4VideoCodecs.length&&profile.DirectPlayProfiles.push({Container:"mkv",Type:"Video",VideoCodec:mp4VideoCodecs.join(","),AudioCodec:videoAudioCodecs.join(",")}),["m2ts","wmv","ts","asf","avi","mpg","mpeg","flv","3gp","mts","trp","vob","vro","mov"].map(function(container){return getDirectPlayProfileForVideoContainer(container,videoAudioCodecs,videoTestElement,options)}).filter(function(i){return null!=i}).forEach(function(i){profile.DirectPlayProfiles.push(i)}),["opus","mp3","mp2","aac","flac","alac","webma","wma","wav","ogg","oga"].filter(canPlayAudioFormat).forEach(function(audioFormat){"mp2"===audioFormat?profile.DirectPlayProfiles.push({Container:"mp2,mp3",Type:"Audio",AudioCodec:audioFormat}):"mp3"===audioFormat?profile.DirectPlayProfiles.push({Container:audioFormat,Type:"Audio",AudioCodec:audioFormat}):profile.DirectPlayProfiles.push({Container:"webma"===audioFormat?"webma,webm":audioFormat,Type:"Audio"}),"aac"!==audioFormat&&"alac"!==audioFormat||profile.DirectPlayProfiles.push({Container:"m4a",AudioCodec:audioFormat,Type:"Audio"})}),canPlayWebm&&profile.DirectPlayProfiles.push({Container:"webm",Type:"Video",AudioCodec:"vorbis",VideoCodec:"VP8,VP9"}),profile.TranscodingProfiles=[];var hlsBreakOnNonKeyFrames=!(!browser.iOS&&!browser.osx&&canPlayNativeHls());canPlayHls()&&browser.enableHlsAudio!==!1&&profile.TranscodingProfiles.push({Container:!canPlayNativeHls()||browser.edge||browser.android?"ts":"aac",Type:"Audio",AudioCodec:"aac",Context:"Streaming",Protocol:"hls",MaxAudioChannels:physicalAudioChannels.toString(),MinSegments:browser.iOS||browser.osx?"2":"1",BreakOnNonKeyFrames:hlsBreakOnNonKeyFrames}),["aac","mp3","opus","wav"].filter(canPlayAudioFormat).forEach(function(audioFormat){profile.TranscodingProfiles.push({Container:audioFormat,Type:"Audio",AudioCodec:audioFormat,Context:"Streaming",Protocol:"http",MaxAudioChannels:physicalAudioChannels.toString()})}),["opus","mp3","aac","wav"].filter(canPlayAudioFormat).forEach(function(audioFormat){profile.TranscodingProfiles.push({Container:audioFormat,Type:"Audio",AudioCodec:audioFormat,Context:"Static",Protocol:"http",MaxAudioChannels:physicalAudioChannels.toString()})}),!canPlayMkv||browser.tizen||browser.orsay||options.enableMkvProgressive===!1||profile.TranscodingProfiles.push({Container:"mkv",Type:"Video",AudioCodec:videoAudioCodecs.join(","),VideoCodec:mp4VideoCodecs.join(","),Context:"Streaming",MaxAudioChannels:physicalAudioChannels.toString(),CopyTimestamps:!0}),canPlayMkv&&profile.TranscodingProfiles.push({Container:"mkv",Type:"Video",AudioCodec:videoAudioCodecs.join(","),VideoCodec:"h264",Context:"Static",MaxAudioChannels:physicalAudioChannels.toString(),CopyTimestamps:!0}),canPlayHls()&&options.enableHls!==!1&&profile.TranscodingProfiles.push({Container:"ts",Type:"Video",AudioCodec:hlsVideoAudioCodecs.join(","),VideoCodec:"h264",Context:"Streaming",Protocol:"hls",MaxAudioChannels:physicalAudioChannels.toString(),MinSegments:browser.iOS||browser.osx?"2":"1",BreakOnNonKeyFrames:hlsBreakOnNonKeyFrames}),canPlayWebm&&profile.TranscodingProfiles.push({Container:"webm",Type:"Video",AudioCodec:"vorbis",VideoCodec:"vpx",Context:"Streaming",Protocol:"http",MaxAudioChannels:physicalAudioChannels.toString()}),profile.TranscodingProfiles.push({Container:"mp4",Type:"Video",AudioCodec:videoAudioCodecs.join(","),VideoCodec:"h264",Context:"Streaming",Protocol:"http",MaxAudioChannels:physicalAudioChannels.toString()}),profile.TranscodingProfiles.push({Container:"mp4",Type:"Video",AudioCodec:videoAudioCodecs.join(","),VideoCodec:"h264",Context:"Static",Protocol:"http"}),profile.ContainerProfiles=[],profile.CodecProfiles=[];var supportsSecondaryAudio=browser.tizen||browser.orsay||browser.edge||browser.msie,aacCodecProfileConditions=[];videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.5"').replace(/no/,"")||aacCodecProfileConditions.push({Condition:"NotEquals",Property:"AudioProfile",Value:"HE-AAC"}),supportsSecondaryAudio||aacCodecProfileConditions.push({Condition:"Equals",Property:"IsSecondaryAudio",Value:"false",IsRequired:"false"}),browser.chromecast&&aacCodecProfileConditions.push({Condition:"LessThanEqual",Property:"AudioChannels",Value:"2",IsRequired:!0}),aacCodecProfileConditions.length&&profile.CodecProfiles.push({Type:"VideoAudio",Codec:"aac",Conditions:aacCodecProfileConditions}),supportsSecondaryAudio||profile.CodecProfiles.push({Type:"VideoAudio",Conditions:[{Condition:"Equals",Property:"IsSecondaryAudio",Value:"false",IsRequired:"false"}]});var maxH264Level=browser.chromecast?"42":"51";profile.CodecProfiles.push({Type:"Video",Codec:"h264",Conditions:[{Condition:"NotEquals",Property:"IsAnamorphic",Value:"true",IsRequired:!1},{Condition:"EqualsAny",Property:"VideoProfile",Value:"high|main|baseline|constrained baseline"},{Condition:"LessThanEqual",Property:"VideoLevel",Value:maxH264Level}]}),browser.edgeUwp||browser.tizen||browser.orsay||browser.web0s||(profile.CodecProfiles[profile.CodecProfiles.length-1].Conditions.push({Condition:"NotEquals",Property:"IsAVC",Value:"false",IsRequired:!1}),browser.chromecast||profile.CodecProfiles[profile.CodecProfiles.length-1].Conditions.push({Condition:"NotEquals",Property:"IsInterlaced",Value:"true",IsRequired:!1})),maxVideoWidth&&profile.CodecProfiles[profile.CodecProfiles.length-1].Conditions.push({Condition:"LessThanEqual",Property:"Width",Value:maxVideoWidth.toString(),IsRequired:!1});var globalMaxVideoBitrate=(getGlobalMaxVideoBitrate()||"").toString(),h264MaxVideoBitrate=globalMaxVideoBitrate;h264MaxVideoBitrate&&profile.CodecProfiles[profile.CodecProfiles.length-1].Conditions.push({Condition:"LessThanEqual",Property:"VideoBitrate",Value:h264MaxVideoBitrate,IsRequired:!0});var globalVideoConditions=[];return globalMaxVideoBitrate&&globalVideoConditions.push({Condition:"LessThanEqual",Property:"VideoBitrate",Value:globalMaxVideoBitrate}),maxVideoWidth&&globalVideoConditions.push({Condition:"LessThanEqual",Property:"Width",Value:maxVideoWidth.toString(),IsRequired:!1}),globalVideoConditions.length&&profile.CodecProfiles.push({Type:"Video",Conditions:globalVideoConditions}),browser.chromecast&&profile.CodecProfiles.push({Type:"Audio",Codec:"flac",Conditions:[{Condition:"LessThanEqual",Property:"AudioSampleRate",Value:"96000"}]}),profile.SubtitleProfiles=[],supportsTextTracks()&&profile.SubtitleProfiles.push({Format:"vtt",Method:"External"}),profile.ResponseProfiles=[],profile.ResponseProfiles.push({Type:"Video",Container:"m4v",MimeType:"video/mp4"}),profile}}); \ No newline at end of file +define(["browser"],function(browser){"use strict";function canPlayH264(videoTestElement){return!(!videoTestElement.canPlayType||!videoTestElement.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/,""))}function canPlayH265(videoTestElement,options){if(browser.tizen||browser.orsay||browser.xboxOne||browser.web0s||options.supportsHevc)return!0;var userAgent=navigator.userAgent.toLowerCase();if(browser.chromecast){var isChromecastUltra=userAgent.indexOf("aarch64")!==-1;if(isChromecastUltra)return!0}return!!(browser.iOS&&(browser.iOSVersion||0)>=11)||!(!videoTestElement.canPlayType||!videoTestElement.canPlayType('video/hevc; codecs="hevc, aac"').replace(/no/,""))}function supportsTextTracks(){return!(!browser.tizen&&!browser.orsay)||(null==_supportsTextTracks&&(_supportsTextTracks=null!=document.createElement("video").textTracks),_supportsTextTracks)}function canPlayHls(src){return null==_canPlayHls&&(_canPlayHls=canPlayNativeHls()||canPlayHlsWithMSE()),_canPlayHls}function canPlayNativeHls(){if(browser.tizen||browser.orsay)return!0;var media=document.createElement("video");return!(!media.canPlayType("application/x-mpegURL").replace(/no/,"")&&!media.canPlayType("application/vnd.apple.mpegURL").replace(/no/,""))}function canPlayHlsWithMSE(){return null!=window.MediaSource}function canPlayAudioFormat(format){var typeString;if("flac"===format){if(browser.tizen||browser.orsay)return!0;if(browser.edgeUwp)return!0}else if("wma"===format){if(browser.tizen||browser.orsay)return!0;if(browser.edgeUwp)return!0}else{if("opus"===format)return typeString='audio/ogg; codecs="opus"',!!document.createElement("audio").canPlayType(typeString).replace(/no/,"");if("mp2"===format)return!1}if("webma"===format)typeString="audio/webm";else if("mp2"===format)typeString="audio/mpeg";else if("ogg"===format||"oga"===format){if(browser.chrome)return!1;typeString="audio/"+format}else typeString="audio/"+format;return!!document.createElement("audio").canPlayType(typeString).replace(/no/,"")}function testCanPlayMkv(videoTestElement){if(browser.tizen||browser.orsay)return!0;if(videoTestElement.canPlayType("video/x-matroska").replace(/no/,"")||videoTestElement.canPlayType("video/mkv").replace(/no/,""))return!0;var userAgent=navigator.userAgent.toLowerCase();return browser.chrome?!browser.operaTv&&(userAgent.indexOf("vivaldi")===-1&&userAgent.indexOf("opera")===-1):!!browser.edgeUwp}function testCanPlayTs(){return browser.tizen||browser.orsay||browser.web0s||browser.edgeUwp}function supportsMpeg2Video(){return browser.orsay||browser.tizen||browser.edgeUwp||browser.web0s}function supportsVc1(){return browser.orsay||browser.tizen||browser.edgeUwp}function getDirectPlayProfileForVideoContainer(container,videoAudioCodecs,videoTestElement,options){var supported=!1,profileContainer=container,videoCodecs=[];switch(container){case"asf":supported=browser.tizen||browser.orsay||browser.edgeUwp,videoAudioCodecs=[];break;case"avi":supported=browser.tizen||browser.orsay||browser.edgeUwp;break;case"mpg":case"mpeg":supported=browser.edgeUwp||browser.tizen||browser.orsay;break;case"flv":supported=browser.tizen||browser.orsay;break;case"3gp":case"mts":case"trp":case"vob":case"vro":supported=browser.tizen||browser.orsay;break;case"mov":supported=browser.tizen||browser.orsay||browser.chrome||browser.edgeUwp,videoCodecs.push("h264");break;case"m2ts":supported=browser.tizen||browser.orsay||browser.web0s||browser.edgeUwp,videoCodecs.push("h264"),supportsVc1()&&videoCodecs.push("vc1"),supportsMpeg2Video()&&videoCodecs.push("mpeg2video");break;case"wmv":supported=browser.tizen||browser.orsay||browser.web0s||browser.edgeUwp,videoAudioCodecs=[];break;case"ts":supported=testCanPlayTs(),videoCodecs.push("h264"),canPlayH265(videoTestElement,options)&&(videoCodecs.push("h265"),videoCodecs.push("hevc")),supportsVc1()&&videoCodecs.push("vc1"),supportsMpeg2Video()&&videoCodecs.push("mpeg2video"),profileContainer="ts,mpegts"}return supported?{Container:profileContainer,Type:"Video",VideoCodec:videoCodecs.join(","),AudioCodec:videoAudioCodecs.join(",")}:null}function getMaxBitrate(){return 12e7}function getGlobalMaxVideoBitrate(){var userAgent=navigator.userAgent.toLowerCase();if(browser.chromecast){var isChromecastUltra=userAgent.indexOf("aarch64")!==-1;return isChromecastUltra?null:3e7}var isTizenFhd=!1;if(browser.tizen)try{var isTizenUhd=webapis.productinfo.isUdPanelSupported();isTizenFhd=!isTizenUhd,console.log("isTizenFhd = "+isTizenFhd)}catch(error){console.log("isUdPanelSupported() error code = "+error.code)}return browser.ps4?8e6:browser.xboxOne?12e6:browser.edgeUwp?null:browser.tizen&&isTizenFhd?2e7:null}function supportsAc3(videoTestElement){return!!(browser.edgeUwp||browser.tizen||browser.orsay||browser.web0s)||videoTestElement.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/,"")&&!browser.osx&&!browser.iOS}function supportsEac3(videoTestElement){return!!(browser.tizen||browser.orsay||browser.web0s)||videoTestElement.canPlayType('audio/mp4; codecs="ec-3"').replace(/no/,"")}var _supportsTextTracks,_canPlayHls;return function(options){options=options||{};var physicalAudioChannels=options.audioChannels||(browser.tv||browser.ps4||browser.xboxOne?6:2),bitrateSetting=getMaxBitrate(),videoTestElement=document.createElement("video"),canPlayVp8=videoTestElement.canPlayType('video/webm; codecs="vp8"').replace(/no/,""),canPlayVp9=videoTestElement.canPlayType('video/webm; codecs="vp9"').replace(/no/,""),canPlayMkv=testCanPlayMkv(videoTestElement),profile={};profile.MaxStreamingBitrate=bitrateSetting,profile.MaxStaticBitrate=1e8,profile.MusicStreamingTranscodingBitrate=Math.min(bitrateSetting,192e3),profile.DirectPlayProfiles=[];var videoAudioCodecs=[],hlsVideoAudioCodecs=[],supportsMp3VideoAudio=videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.69"').replace(/no/,"")||videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.6B"').replace(/no/,""),supportsMp2VideoAudio=browser.edgeUwp||browser.tizen||browser.orsay||browser.web0s,maxVideoWidth=browser.xboxOne&&self.screen?self.screen.width:null;if(options.maxVideoWidth&&(maxVideoWidth=options.maxVideoWidth),supportsAc3(videoTestElement)){videoAudioCodecs.push("ac3");var eAc3=supportsEac3(videoTestElement);eAc3&&videoAudioCodecs.push("eac3");var supportsAc3InHls=!browser.edge||!browser.touch||browser.edgeUwp;supportsAc3InHls&&(hlsVideoAudioCodecs.push("ac3"),eAc3&&hlsVideoAudioCodecs.push("eac3"))}supportsMp3VideoAudio&&(videoAudioCodecs.push("mp3"),browser.ps4||(physicalAudioChannels<=2||browser.chromecast)&&hlsVideoAudioCodecs.push("mp3")),videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.2"').replace(/no/,"")&&(videoAudioCodecs.push("aac"),(physicalAudioChannels<=2||!browser.chromecast)&&hlsVideoAudioCodecs.push("aac")),supportsMp3VideoAudio&&(browser.ps4||hlsVideoAudioCodecs.indexOf("mp3")===-1&&hlsVideoAudioCodecs.push("mp3")),supportsMp2VideoAudio&&videoAudioCodecs.push("mp2"),(browser.tizen||browser.orsay||browser.web0s||options.supportsDts)&&(videoAudioCodecs.push("dca"),videoAudioCodecs.push("dts")),(browser.tizen||browser.orsay)&&(videoAudioCodecs.push("pcm_s16le"),videoAudioCodecs.push("pcm_s24le")),options.supportsTrueHd&&videoAudioCodecs.push("truehd"),(browser.tizen||browser.orsay)&&videoAudioCodecs.push("aac_latm"),canPlayAudioFormat("opus")&&(videoAudioCodecs.push("opus"),hlsVideoAudioCodecs.push("opus")),canPlayAudioFormat("flac")&&videoAudioCodecs.push("flac"),videoAudioCodecs=videoAudioCodecs.filter(function(c){return(options.disableVideoAudioCodecs||[]).indexOf(c)===-1}),hlsVideoAudioCodecs=hlsVideoAudioCodecs.filter(function(c){return(options.disableHlsVideoAudioCodecs||[]).indexOf(c)===-1});var mp4VideoCodecs=[],hlsVideoCodecs=[];canPlayH264(videoTestElement)&&(mp4VideoCodecs.push("h264"),hlsVideoCodecs.push("h264")),canPlayH265(videoTestElement,options)&&(mp4VideoCodecs.push("h265"),mp4VideoCodecs.push("hevc")),supportsMpeg2Video()&&mp4VideoCodecs.push("mpeg2video"),supportsVc1()&&mp4VideoCodecs.push("vc1"),(browser.tizen||browser.orsay)&&mp4VideoCodecs.push("msmpeg4v2"),canPlayVp8&&mp4VideoCodecs.push("vp8"),canPlayVp9&&mp4VideoCodecs.push("vp9"),mp4VideoCodecs.length&&profile.DirectPlayProfiles.push({Container:"mp4,m4v",Type:"Video",VideoCodec:mp4VideoCodecs.join(","),AudioCodec:videoAudioCodecs.join(",")}),canPlayMkv&&mp4VideoCodecs.length&&profile.DirectPlayProfiles.push({Container:"mkv",Type:"Video",VideoCodec:mp4VideoCodecs.join(","),AudioCodec:videoAudioCodecs.join(",")}),["m2ts","wmv","ts","asf","avi","mpg","mpeg","flv","3gp","mts","trp","vob","vro","mov"].map(function(container){return getDirectPlayProfileForVideoContainer(container,videoAudioCodecs,videoTestElement,options)}).filter(function(i){return null!=i}).forEach(function(i){profile.DirectPlayProfiles.push(i)}),["opus","mp3","mp2","aac","flac","alac","webma","wma","wav","ogg","oga"].filter(canPlayAudioFormat).forEach(function(audioFormat){"mp2"===audioFormat?profile.DirectPlayProfiles.push({Container:"mp2,mp3",Type:"Audio",AudioCodec:audioFormat}):"mp3"===audioFormat?profile.DirectPlayProfiles.push({Container:audioFormat,Type:"Audio",AudioCodec:audioFormat}):profile.DirectPlayProfiles.push({Container:"webma"===audioFormat?"webma,webm":audioFormat,Type:"Audio"}),"aac"!==audioFormat&&"alac"!==audioFormat||profile.DirectPlayProfiles.push({Container:"m4a",AudioCodec:audioFormat,Type:"Audio"})}),canPlayVp8&&profile.DirectPlayProfiles.push({Container:"webm",Type:"Video",AudioCodec:"vorbis",VideoCodec:"VP8"}),canPlayVp9&&profile.DirectPlayProfiles.push({Container:"webm",Type:"Video",AudioCodec:"vorbis",VideoCodec:"VP9"}),profile.TranscodingProfiles=[];var hlsBreakOnNonKeyFrames=!(!browser.iOS&&!browser.osx&&canPlayNativeHls());canPlayHls()&&browser.enableHlsAudio!==!1&&profile.TranscodingProfiles.push({Container:!canPlayNativeHls()||browser.edge||browser.android?"ts":"aac",Type:"Audio",AudioCodec:"aac",Context:"Streaming",Protocol:"hls",MaxAudioChannels:physicalAudioChannels.toString(),MinSegments:browser.iOS||browser.osx?"2":"1",BreakOnNonKeyFrames:hlsBreakOnNonKeyFrames}),["aac","mp3","opus","wav"].filter(canPlayAudioFormat).forEach(function(audioFormat){profile.TranscodingProfiles.push({Container:audioFormat,Type:"Audio",AudioCodec:audioFormat,Context:"Streaming",Protocol:"http",MaxAudioChannels:physicalAudioChannels.toString()})}),["opus","mp3","aac","wav"].filter(canPlayAudioFormat).forEach(function(audioFormat){profile.TranscodingProfiles.push({Container:audioFormat,Type:"Audio",AudioCodec:audioFormat,Context:"Static",Protocol:"http",MaxAudioChannels:physicalAudioChannels.toString()})}),!canPlayMkv||browser.tizen||browser.orsay||options.enableMkvProgressive===!1||profile.TranscodingProfiles.push({Container:"mkv",Type:"Video",AudioCodec:videoAudioCodecs.join(","),VideoCodec:mp4VideoCodecs.join(","),Context:"Streaming",MaxAudioChannels:physicalAudioChannels.toString(),CopyTimestamps:!0}),canPlayMkv&&profile.TranscodingProfiles.push({Container:"mkv",Type:"Video",AudioCodec:videoAudioCodecs.join(","),VideoCodec:mp4VideoCodecs.join(","),Context:"Static",MaxAudioChannels:physicalAudioChannels.toString(),CopyTimestamps:!0}),canPlayHls()&&options.enableHls!==!1&&profile.TranscodingProfiles.push({Container:"ts",Type:"Video",AudioCodec:hlsVideoAudioCodecs.join(","),VideoCodec:hlsVideoCodecs.join(","),Context:"Streaming",Protocol:"hls",MaxAudioChannels:physicalAudioChannels.toString(),MinSegments:browser.iOS||browser.osx?"2":"1",BreakOnNonKeyFrames:hlsBreakOnNonKeyFrames}),canPlayVp8&&profile.TranscodingProfiles.push({Container:"webm",Type:"Video",AudioCodec:"vorbis",VideoCodec:"vpx",Context:"Streaming",Protocol:"http",MaxAudioChannels:physicalAudioChannels.toString()}),profile.TranscodingProfiles.push({Container:"mp4",Type:"Video",AudioCodec:videoAudioCodecs.join(","),VideoCodec:"h264",Context:"Streaming",Protocol:"http",MaxAudioChannels:physicalAudioChannels.toString()}),profile.TranscodingProfiles.push({Container:"mp4",Type:"Video",AudioCodec:videoAudioCodecs.join(","),VideoCodec:"h264",Context:"Static",Protocol:"http"}),profile.ContainerProfiles=[],profile.CodecProfiles=[];var supportsSecondaryAudio=browser.tizen||browser.orsay||browser.edge||browser.msie,aacCodecProfileConditions=[];videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.5"').replace(/no/,"")||aacCodecProfileConditions.push({Condition:"NotEquals",Property:"AudioProfile",Value:"HE-AAC"}),supportsSecondaryAudio||aacCodecProfileConditions.push({Condition:"Equals",Property:"IsSecondaryAudio",Value:"false",IsRequired:"false"}),browser.chromecast&&aacCodecProfileConditions.push({Condition:"LessThanEqual",Property:"AudioChannels",Value:"2",IsRequired:!0}),aacCodecProfileConditions.length&&profile.CodecProfiles.push({Type:"VideoAudio",Codec:"aac",Conditions:aacCodecProfileConditions}),supportsSecondaryAudio||profile.CodecProfiles.push({Type:"VideoAudio",Conditions:[{Condition:"Equals",Property:"IsSecondaryAudio",Value:"false",IsRequired:"false"}]});var maxH264Level=browser.chromecast?"42":"51";profile.CodecProfiles.push({Type:"Video",Codec:"h264",Conditions:[{Condition:"NotEquals",Property:"IsAnamorphic",Value:"true",IsRequired:!1},{Condition:"EqualsAny",Property:"VideoProfile",Value:"high|main|baseline|constrained baseline"},{Condition:"LessThanEqual",Property:"VideoLevel",Value:maxH264Level}]}),browser.edgeUwp||browser.tizen||browser.orsay||browser.web0s||(profile.CodecProfiles[profile.CodecProfiles.length-1].Conditions.push({Condition:"NotEquals",Property:"IsAVC",Value:"false",IsRequired:!1}),browser.chromecast||profile.CodecProfiles[profile.CodecProfiles.length-1].Conditions.push({Condition:"NotEquals",Property:"IsInterlaced",Value:"true",IsRequired:!1})),maxVideoWidth&&profile.CodecProfiles[profile.CodecProfiles.length-1].Conditions.push({Condition:"LessThanEqual",Property:"Width",Value:maxVideoWidth.toString(),IsRequired:!1});var globalMaxVideoBitrate=(getGlobalMaxVideoBitrate()||"").toString(),h264MaxVideoBitrate=globalMaxVideoBitrate;h264MaxVideoBitrate&&profile.CodecProfiles[profile.CodecProfiles.length-1].Conditions.push({Condition:"LessThanEqual",Property:"VideoBitrate",Value:h264MaxVideoBitrate,IsRequired:!0});var globalVideoConditions=[];return globalMaxVideoBitrate&&globalVideoConditions.push({Condition:"LessThanEqual",Property:"VideoBitrate",Value:globalMaxVideoBitrate}),maxVideoWidth&&globalVideoConditions.push({Condition:"LessThanEqual",Property:"Width",Value:maxVideoWidth.toString(),IsRequired:!1}),globalVideoConditions.length&&profile.CodecProfiles.push({Type:"Video",Conditions:globalVideoConditions}),browser.chromecast&&profile.CodecProfiles.push({Type:"Audio",Codec:"flac",Conditions:[{Condition:"LessThanEqual",Property:"AudioSampleRate",Value:"96000"}]}),profile.SubtitleProfiles=[],supportsTextTracks()&&profile.SubtitleProfiles.push({Format:"vtt",Method:"External"}),profile.ResponseProfiles=[],profile.ResponseProfiles.push({Type:"Video",Container:"m4v",MimeType:"video/mp4"}),profile}}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.css b/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.css index 9c4e599a82..c4e341e77d 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.css +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.css @@ -1 +1 @@ -.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 +.emby-button,.fab{-webkit-box-sizing:border-box;-webkit-box-align:center}.emby-button,.paper-icon-button-light{text-align:center;font-family:inherit;color:inherit;cursor:pointer;outline:0!important;overflow:hidden;position:relative}.emby-button{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-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;font-weight:500;-webkit-tap-highlight-color:transparent;text-decoration:none}.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-box-align:center;-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;-webkit-border-radius:50%;border-radius:50%;-webkit-tap-highlight-color:transparent;-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}.btnFilterWithBubble{position:relative}.filterButtonBubble{color:#fff;position:absolute;top:0;right:0;width:1.6em;height:1.6em;z-index:100000000;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;font-size:82%;-webkit-border-radius:100em;border-radius:100em;-webkit-box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.2);box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.2);background:#03A9F4;font-weight:700} \ 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 66b5f3b437..66252b5762 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.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 +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.refreshItems()})}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),1e4)},document.registerElement("emby-itemscontainer",{prototype:ItemsContainerProtoType,extends:"div"})}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/filtermenu/filtermenu.js b/dashboard-ui/bower_components/emby-webcomponents/filtermenu/filtermenu.js new file mode 100644 index 0000000000..e6bab78eee --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/filtermenu/filtermenu.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);for(var elems=context.querySelectorAll(".simpleFilter"),i=0,length=elems.length;i +
+
+ +
+ +
+ + + +
+
+
+
+
\ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/guide.css b/dashboard-ui/bower_components/emby-webcomponents/guide/guide.css index 72fbc2a26d..ab59b9960f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/guide/guide.css +++ b/dashboard-ui/bower_components/emby-webcomponents/guide/guide.css @@ -1 +1 @@ -.tvGuideHeader,.tvguide{display:-webkit-box;display:-webkit-flex}.channelPrograms,.programContainer,.timeslotHeadersInner,.tvProgram{position:relative}.channelPrograms,.channelsContainer,.tvGuideHeader,.tvguide{-webkit-box-orient:vertical;-webkit-box-direction:normal}.guideChannelName,.guideChannelNumber,.guideProgramName,.guideProgramNameText{-o-text-overflow:ellipsis}.tvguide{display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:initial;-webkit-align-items:initial;align-items:initial}.tvGuideHeader{white-space:nowrap;width:100%;-webkit-flex-direction:column;flex-direction:column;-webkit-flex-shrink:0;flex-shrink:0;display:flex;contain:layout style paint}.layout-desktop .tvGuideHeader{margin-bottom:.5em}.guideHeaderDateSelection{font-size:86%;padding:.4em 0}.guide-headerTimeslots{display:-webkit-box;display:-webkit-flex;display:flex}.tvProgramSectionHeader{margin:0}.tvProgram{display:block;text-decoration:none;white-space:nowrap}.guideProgramIndicator{text-transform:uppercase;-webkit-border-radius:.25em;border-radius:.25em;margin-right:.5em;font-size:78%;padding:.08em .25em;display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;text-align:center;margin-left:1em}.guide-channelTimeslotHeader{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.timeslotHeaders{white-space:nowrap;padding-bottom:.5em;font-weight:500;font-size:120%}.programContainer{white-space:nowrap;-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start;contain:strict}.channelPrograms{white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box}.guide-currentTimeIndicatorBar{position:absolute;bottom:.05em;left:0;width:100%;display:-webkit-box;display:-webkit-flex;display:flex;margin-left:.25em;height:.1em;-webkit-transform-origin:left;transform-origin:left;-webkit-transition:-webkit-transform .5s ease-out;-o-transition:transform .5s ease-out;transition:transform .5s ease-out}.guide-currentTimeIndicatorArrowContainer{position:absolute;bottom:-.33em;margin-left:.25em;-webkit-transform-origin:left;transform-origin:left;-webkit-transition:-webkit-transform .5s ease-out;-o-transition:transform .5s ease-out;transition:transform .5s ease-out;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;font-size:72%}.guide-currentTimeIndicatorArrow{width:1em;height:1em;font-size:inherit;margin-left:-.52em;-webkit-border-radius:100em;border-radius:100em}.guideSpacer{width:.3em;-webkit-flex-shrink:0;flex-shrink:0}.channelPrograms,.timeslotHeadersInner{width:1800vw}@media all and (min-width:37.5em){.channelPrograms,.timeslotHeadersInner{width:1400vw}}@media all and (min-width:50em){.channelPrograms,.timeslotHeadersInner{width:1200vw}}@media all and (min-width:80em){.channelPrograms,.timeslotHeadersInner{width:810vw}}.timeslotHeader{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;text-indent:.25em;width:2.0833333333333333333333333333333%}.guide-channelHeaderCell,.guide-channelTimeslotHeader,.programCell{color:inherit;cursor:pointer;vertical-align:middle;font-family:inherit;text-decoration:none;-webkit-box-align:center;text-align:left;overflow:hidden}.guide-channelHeaderCell,.guide-channelTimeslotHeader{padding:0!important;outline:0!important;width:100%;font-size:inherit;-o-text-overflow:ellipsis;text-overflow:ellipsis;margin:0 1px 0 0;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;contain:strict;-webkit-flex-shrink:0;flex-shrink:0;-webkit-border-radius:.12em;border-radius:.12em}.guide-channelHeaderCell{border-width:1px 1px 1px 0;border-style:solid;width:100%;height:4.42em;contain:strict;position:relative;background:0 0}.guide-channelTimeslotHeader{border:0!important;border-right-color:transparent}.channelsContainer,.guide-channelTimeslotHeader{width:24vw}@media all and (min-width:31.25em){.channelsContainer,.guide-channelTimeslotHeader{width:16vw}}@media all and (min-width:37.5em){.channelsContainer,.guide-channelTimeslotHeader{width:16vw}}@media all and (min-width:50em){.channelsContainer,.guide-channelTimeslotHeader{width:14vw}}@media all and (min-width:80em){.channelsContainer,.guide-channelTimeslotHeader{width:12vw}}.btnGuideViewSettings{margin:0;-webkit-flex-shrink:0;flex-shrink:0}.btnGuideViewSettingsIcon{font-size:1.5em!important}.selectDateIcon{-webkit-flex-shrink:0;flex-shrink:0}@media all and (max-width:50em){.guideHdIcon,.liveTvProgram,.newTvProgram,.premiereTvProgram{display:none}}.channelPrograms,.programCell{border-style:solid;display:-webkit-box;display:-webkit-flex;contain:strict}.channelPrograms{height:4.42em;display:flex;-webkit-flex-direction:column;flex-direction:column;border-width:1px 0}.channelPrograms+.channelPrograms,.guide-channelHeaderCell+.guide-channelHeaderCell{margin-top:-1px}.channelPrograms-tv,.guide-channelHeaderCell-tv{height:3.1em}.guide-channelTimeslotHeader,.timeslotHeader{background:0 0!important;height:2.8em}.programGrid{padding-bottom:4px;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.programCell{background:0 0;border-width:0 0 0 1px;padding:0!important;width:100%;font-size:inherit;position:absolute;top:0;bottom:0;display:flex;-webkit-align-items:center;align-items:center;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;margin:0!important}.channelsContainer,.guideProgramName,.programGrid{contain:layout style paint}.guide-programNameCaret,.guideProgramName{display:-webkit-box;display:-webkit-flex;-webkit-box-align:center}.guideProgramName{padding:0 .5em;overflow:hidden;text-overflow:ellipsis;-webkit-align-items:center;align-items:center;display:flex;position:relative;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.guide-programNameCaret{display:flex;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;font-size:200%}.guideProgramNameText{margin:0;font-weight:400;overflow:hidden;text-overflow:ellipsis}.guideProgramSecondaryInfo{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin-top:.1em}.programIcon{margin-left:.5em;height:1em;width:1em;font-size:1.6em;color:#ddd;-webkit-flex-shrink:0;flex-shrink:0;-webkit-box-flex:0;-webkit-flex-grow:0;flex-grow:0}.guide-programTextIcon{font-weight:700;font-size:.9em;padding:.16em .3em;-webkit-border-radius:.25em;border-radius:.25em;margin-right:.35em;width:auto;height:auto}.guide-programTextIcon-tv{font-size:.74em}.guideChannelNumber{padding-left:1em;max-width:30%;text-overflow:ellipsis;overflow:hidden;font-weight:400;margin:0}.guideChannelName{margin-left:auto;margin-right:1em;text-overflow:ellipsis;overflow:hidden;max-width:70%}.guideChannelImage{position:absolute;right:8%;top:15%;bottom:15%;width:40%;-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;background-position:right center}@media all and (min-width:62.5em){.guideChannelName{max-width:40%}}@media all and (max-width:62.5em){.guideChannelNumber{display:none}.guideChannelImage{width:70%}}.channelsContainer{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-direction:column;flex-direction:column}.guide-channelHeaderCell,.programCell{outline:0!important}.seriesTimerIcon,.timerIcon{color:#c33!important}.seriesTimerIcon-inactive{color:inherit!important;opacity:.7}.guideOptions{-webkit-flex-shrink:0;flex-shrink:0;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}@media all and (max-width:50em),all and (max-height:37.5em){.tvGuideHeader{padding-left:0}}.guideRequiresUnlock{margin:1em auto;text-align:center;padding:1em;-webkit-flex-shrink:0;flex-shrink:0}.noRubberBanding{padding-bottom:100px}.guideDateTabsSlider{text-align:center}.guide-date-tab-button{padding:.3em .7em!important;margin:0 .3em!important;font-weight:400}.guide-date-tab-button.emby-tab-button-active{border-color:transparent!important}.guide-date-tab-button.emby-button-tv:focus{-webkit-border-radius:.15em!important;border-radius:.15em!important;-webkit-transform:none!important;transform:none!important} \ No newline at end of file +.tvGuideHeader,.tvguide{display:-webkit-box;display:-webkit-flex}.channelPrograms,.programContainer,.timeslotHeadersInner,.tvProgram{position:relative}.channelPrograms,.channelsContainer,.tvGuideHeader,.tvguide{-webkit-box-orient:vertical;-webkit-box-direction:normal}.guideChannelName,.guideChannelNumber,.guideProgramName,.guideProgramNameText{-o-text-overflow:ellipsis}.tvguide{display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:initial;-webkit-align-items:initial;align-items:initial}.tvGuideHeader{white-space:nowrap;width:100%;-webkit-flex-direction:column;flex-direction:column;-webkit-flex-shrink:0;flex-shrink:0;display:flex;contain:layout style paint}.layout-desktop .tvGuideHeader{margin-bottom:.5em}.guideHeaderDateSelection{font-size:86%;padding:.4em 0}.guide-headerTimeslots{display:-webkit-box;display:-webkit-flex;display:flex}.tvProgramSectionHeader{margin:0}.tvProgram{display:block;text-decoration:none;white-space:nowrap}.guideProgramIndicator{text-transform:uppercase;-webkit-border-radius:.25em;border-radius:.25em;margin-right:.5em;font-size:78%;padding:.08em .25em;display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;text-align:center;margin-left:1em}.guide-channelTimeslotHeader{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.timeslotHeaders{white-space:nowrap;padding-bottom:.5em;font-weight:500;font-size:120%}.programContainer{white-space:nowrap;-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start;contain:strict}.channelPrograms{white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box}.guide-currentTimeIndicatorBar{position:absolute;bottom:.05em;left:0;width:100%;display:-webkit-box;display:-webkit-flex;display:flex;margin-left:.25em;height:.09em;-webkit-transform-origin:left;transform-origin:left;-webkit-transition:-webkit-transform .5s ease-out;-o-transition:transform .5s ease-out;transition:transform .5s ease-out}.guide-currentTimeIndicatorArrowContainer{position:absolute;bottom:-.3em;margin-left:.25em;-webkit-transform-origin:left;transform-origin:left;-webkit-transition:-webkit-transform .5s ease-out;-o-transition:transform .5s ease-out;transition:transform .5s ease-out;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;font-size:68%}.guide-currentTimeIndicatorArrow{width:1em;height:1em;font-size:inherit;margin-left:-.52em;-webkit-border-radius:100em;border-radius:100em}.guideSpacer{width:.3em;-webkit-flex-shrink:0;flex-shrink:0}.channelPrograms,.timeslotHeadersInner{width:1800vw}@media all and (min-width:37.5em){.channelPrograms,.timeslotHeadersInner{width:1400vw}}@media all and (min-width:50em){.channelPrograms,.timeslotHeadersInner{width:1200vw}}@media all and (min-width:80em){.channelPrograms,.timeslotHeadersInner{width:810vw}}.timeslotHeader{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;text-indent:.25em;width:2.0833333333333333333333333333333%}.guide-channelHeaderCell,.guide-channelTimeslotHeader,.programCell{color:inherit;cursor:pointer;vertical-align:middle;font-family:inherit;text-decoration:none;-webkit-box-align:center;text-align:left;overflow:hidden}.guide-channelHeaderCell,.guide-channelTimeslotHeader{padding:0!important;outline:0!important;width:100%;font-size:inherit;-o-text-overflow:ellipsis;text-overflow:ellipsis;margin:0 1px 0 0;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;contain:strict;-webkit-flex-shrink:0;flex-shrink:0;-webkit-border-radius:.12em;border-radius:.12em}.guide-channelHeaderCell{border-width:1px 1px 1px 0;border-style:solid;width:100%;height:4.42em;contain:strict;position:relative;background:0 0}.guide-channelTimeslotHeader{border:0!important;border-right-color:transparent}.channelsContainer,.guide-channelTimeslotHeader{width:24vw}@media all and (min-width:31.25em){.channelsContainer,.guide-channelTimeslotHeader{width:16vw}}@media all and (min-width:37.5em){.channelsContainer,.guide-channelTimeslotHeader{width:16vw}}@media all and (min-width:50em){.channelsContainer,.guide-channelTimeslotHeader{width:14vw}}@media all and (min-width:80em){.channelsContainer,.guide-channelTimeslotHeader{width:12vw}}.btnGuideViewSettings{margin:0;-webkit-flex-shrink:0;flex-shrink:0}.btnGuideViewSettingsIcon{font-size:1.5em!important}.selectDateIcon{-webkit-flex-shrink:0;flex-shrink:0}@media all and (max-width:50em){.guideHdIcon,.liveTvProgram,.newTvProgram,.premiereTvProgram{display:none}}.channelPrograms,.programCell{border-style:solid;display:-webkit-box;display:-webkit-flex;contain:strict}.channelPrograms{height:4.42em;display:flex;-webkit-flex-direction:column;flex-direction:column;border-width:1px 0}.channelPrograms+.channelPrograms,.guide-channelHeaderCell+.guide-channelHeaderCell{margin-top:-1px}.channelPrograms-tv,.guide-channelHeaderCell-tv{height:3.1em}.guide-channelTimeslotHeader,.timeslotHeader{background:0 0!important;height:2.8em}.programGrid{padding-bottom:4px;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.programCell{background:0 0;border-width:0 0 0 1px;padding:0!important;width:100%;font-size:inherit;position:absolute;top:0;bottom:0;display:flex;-webkit-align-items:center;align-items:center;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;margin:0!important}.channelsContainer,.guideProgramName,.programGrid{contain:layout style paint}.guide-programNameCaret,.guideProgramName{display:-webkit-box;display:-webkit-flex;-webkit-box-align:center}.guideProgramName{padding:0 .5em;overflow:hidden;text-overflow:ellipsis;-webkit-align-items:center;align-items:center;display:flex;position:relative;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1}.guide-programNameCaret{display:flex;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;font-size:200%}.guideProgramNameText{margin:0;font-weight:400;overflow:hidden;text-overflow:ellipsis}.guideProgramSecondaryInfo{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin-top:.1em}.programIcon{margin-left:.5em;height:1em;width:1em;font-size:1.6em;color:#ddd;-webkit-flex-shrink:0;flex-shrink:0;-webkit-box-flex:0;-webkit-flex-grow:0;flex-grow:0}.guide-programTextIcon{font-weight:700;font-size:.9em;padding:.16em .3em;-webkit-border-radius:.25em;border-radius:.25em;margin-right:.35em;width:auto;height:auto}.guide-programTextIcon-tv{font-size:.74em}.guideChannelNumber{padding-left:1em;max-width:30%;text-overflow:ellipsis;overflow:hidden;font-weight:400;margin:0}.guideChannelName{margin-left:auto;margin-right:1em;text-overflow:ellipsis;overflow:hidden;max-width:70%}.guideChannelImage{position:absolute;right:8%;top:15%;bottom:15%;width:40%;-webkit-background-size:contain;background-size:contain;background-repeat:no-repeat;background-position:right center}@media all and (min-width:62.5em){.guideChannelName{max-width:40%}}@media all and (max-width:62.5em){.guideChannelNumber{display:none}.guideChannelImage{width:70%}}.channelsContainer{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-direction:column;flex-direction:column}.guide-channelHeaderCell,.programCell{outline:0!important}.seriesTimerIcon,.timerIcon{color:#c33!important}.seriesTimerIcon-inactive{color:inherit!important;opacity:.7}.guideOptions{-webkit-flex-shrink:0;flex-shrink:0;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}@media all and (max-width:50em),all and (max-height:37.5em){.tvGuideHeader{padding-left:0}}.guideRequiresUnlock{margin:1em auto;text-align:center;padding:1em;-webkit-flex-shrink:0;flex-shrink:0}.noRubberBanding{padding-bottom:100px}.guideDateTabsSlider{text-align:center}.guide-date-tab-button{padding:.3em .7em!important;margin:0 .3em!important;font-weight:400}.guide-date-tab-button.emby-tab-button-active{border-color:transparent!important}.guide-date-tab-button.emby-button-tv:focus{-webkit-border-radius:.15em!important;border-radius:.15em!important;-webkit-transform:none!important;transform:none!important} \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/headroom/headroom.js b/dashboard-ui/bower_components/emby-webcomponents/headroom/headroom.js index 06d1c14536..9836c0e7b9 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 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 +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()}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/metadataeditor/metadataeditor.js b/dashboard-ui/bower_components/emby-webcomponents/metadataeditor/metadataeditor.js index dd31f116a7..9dca69f67c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/metadataeditor/metadataeditor.js +++ b/dashboard-ui/bower_components/emby-webcomponents/metadataeditor/metadataeditor.js @@ -1 +1 @@ -define(["itemHelper","dom","layoutManager","dialogHelper","datetime","loading","focusManager","connectionManager","globalize","require","shell","emby-checkbox","emby-input","emby-select","listViewStyle","emby-textarea","emby-button","paper-icon-button-light","css!./../formdialog","clearButtonStyle"],function(itemHelper,dom,layoutManager,dialogHelper,datetime,loading,focusManager,connectionManager,globalize,require,shell){"use strict";function isDialog(){return currentContext.classList.contains("dialog")}function closeDialog(isSubmitted){isDialog()&&dialogHelper.close(currentContext)}function submitUpdatedItem(form,item){function afterContentTypeUpdated(){require(["toast"],function(toast){toast(globalize.translate("sharedcomponents#MessageItemSaved"))}),loading.hide(),closeDialog(!0)}var apiClient=getApiClient();apiClient.updateItem(item).then(function(){var newContentType=form.querySelector("#selectContentType").value||"";(metadataEditorInfo.ContentType||"")!==newContentType?apiClient.ajax({url:apiClient.getUrl("Items/"+item.Id+"/ContentType",{ContentType:newContentType}),type:"POST"}).then(function(){afterContentTypeUpdated()}):afterContentTypeUpdated()})}function getSelectedAirDays(form){var checkedItems=form.querySelectorAll(".chkAirDay:checked")||[];return Array.prototype.map.call(checkedItems,function(c){return c.getAttribute("data-day")})}function getAlbumArtists(form){return form.querySelector("#txtAlbumArtist").value.trim().split(";").filter(function(s){return s.length>0}).map(function(a){return{Name:a}})}function getArtists(form){return form.querySelector("#txtArtist").value.trim().split(";").filter(function(s){return s.length>0}).map(function(a){return{Name:a}})}function getDateFromForm(form,element,property){var val=form.querySelector(element).value;if(!val)return null;if(currentItem[property]){var date=datetime.parseISO8601Date(currentItem[property],!0),parts=date.toISOString().split("T");if(0===parts[0].indexOf(val)){var iso=parts[1];val+="T"+iso}}return val}function onSubmit(e){loading.show();var form=this;try{var item={Id:currentItem.Id,Name:form.querySelector("#txtName").value,OriginalTitle:form.querySelector("#txtOriginalName").value,ForcedSortName:form.querySelector("#txtSortName").value,CommunityRating:form.querySelector("#txtCommunityRating").value,HomePageUrl:form.querySelector("#txtHomePageUrl").value,CriticRating:form.querySelector("#txtCriticRating").value,IndexNumber:form.querySelector("#txtIndexNumber").value||null,AbsoluteEpisodeNumber:form.querySelector("#txtAbsoluteEpisodeNumber").value,DvdEpisodeNumber:form.querySelector("#txtDvdEpisodeNumber").value,DvdSeasonNumber:form.querySelector("#txtDvdSeasonNumber").value,AirsBeforeSeasonNumber:form.querySelector("#txtAirsBeforeSeason").value,AirsAfterSeasonNumber:form.querySelector("#txtAirsAfterSeason").value,AirsBeforeEpisodeNumber:form.querySelector("#txtAirsBeforeEpisode").value,ParentIndexNumber:form.querySelector("#txtParentIndexNumber").value||null,DisplayOrder:form.querySelector("#selectDisplayOrder").value,Album:form.querySelector("#txtAlbum").value,AlbumArtists:getAlbumArtists(form),ArtistItems:getArtists(form),Overview:form.querySelector("#txtOverview").value,Status:form.querySelector("#selectStatus").value,AirDays:getSelectedAirDays(form),AirTime:form.querySelector("#txtAirTime").value,Genres:editableListViewValues(form.querySelector("#listGenres")),Tags:editableListViewValues(form.querySelector("#listTags")),Studios:editableListViewValues(form.querySelector("#listStudios")).map(function(element){return{Name:element}}),PremiereDate:getDateFromForm(form,"#txtPremiereDate","PremiereDate"),DateCreated:getDateFromForm(form,"#txtDateAdded","DateCreated"),EndDate:getDateFromForm(form,"#txtEndDate","EndDate"),ProductionYear:form.querySelector("#txtProductionYear").value,AspectRatio:form.querySelector("#txtOriginalAspectRatio").value,Video3DFormat:form.querySelector("#select3dFormat").value,OfficialRating:form.querySelector("#selectOfficialRating").value,CustomRating:form.querySelector("#selectCustomRating").value,People:currentItem.People,LockData:form.querySelector("#chkLockData").checked,LockedFields:Array.prototype.filter.call(form.querySelectorAll(".selectLockedField"),function(c){return!c.checked}).map(function(c){return c.getAttribute("data-value")})};item.ProviderIds=Object.assign({},currentItem.ProviderIds);var idElements=form.querySelectorAll(".txtExternalId");if(Array.prototype.map.call(idElements,function(idElem){var providerKey=idElem.getAttribute("data-providerkey");item.ProviderIds[providerKey]=idElem.value}),item.PreferredMetadataLanguage=form.querySelector("#selectLanguage").value,item.PreferredMetadataCountryCode=form.querySelector("#selectCountry").value,"Person"===currentItem.Type){var placeOfBirth=form.querySelector("#txtPlaceOfBirth").value;item.ProductionLocations=placeOfBirth?[placeOfBirth]:[]}if("Series"===currentItem.Type){var seriesRuntime=form.querySelector("#txtSeriesRuntime").value;item.RunTimeTicks=seriesRuntime?6e8*seriesRuntime:null}var tagline=form.querySelector("#txtTagline").value;item.Taglines=tagline?[tagline]:[],submitUpdatedItem(form,item)}catch(err){alert(err)}return e.preventDefault(),e.stopPropagation(),!1}function editableListViewValues(list){return Array.prototype.map.call(list.querySelectorAll(".textValue"),function(el){return el.textContent})}function addElementToEditableListview(source,sortCallback){require(["prompt"],function(prompt){prompt({label:"Value:"}).then(function(text){var list=dom.parentWithClass(source,"editableListviewContainer").querySelector(".paperList"),items=editableListViewValues(list);items.push(text),populateListView(list,items,sortCallback)})})}function removeElementFromListview(source){var el=dom.parentWithClass(source,"listItem");el.parentNode.removeChild(el)}function editPerson(context,person,index){require(["personEditor"],function(personEditor){personEditor.show(person).then(function(updatedPerson){var isNew=index===-1;isNew&¤tItem.People.push(updatedPerson),populatePeople(context,currentItem.People)})})}function showMoreMenu(context,button,user){require(["itemContextMenu"],function(itemContextMenu){var item=currentItem;itemContextMenu.show({item:item,positionTo:button,edit:!1,editImages:!0,editSubtitles:!0,sync:!1,share:!1,play:!1,queue:!1,user:user}).then(function(result){result.deleted?afterDeleted(context,item):result.updated&&reload(context,item.Id,item.ServerId)})})}function afterDeleted(context,item){var parentId=item.ParentId||item.SeasonId||item.SeriesId;parentId?reload(context,parentId,item.ServerId):require(["appRouter"],function(appRouter){appRouter.goHome()})}function onWebSocketMessageReceived(e,data){var msg=data;"LibraryChanged"===msg.MessageType&&msg.Data.ItemsUpdated.indexOf(currentItem.Id)!==-1&&(console.log("Item updated - reloading metadata"),reload(currentContext,currentItem.Id,currentItem.ServerId))}function bindItemChanged(context,apiClient){Events.on(apiClient,"websocketmessage",onWebSocketMessageReceived)}function unbindItemChanged(context,apiClient){Events.off(apiClient,"websocketmessage",onWebSocketMessageReceived)}function onEditorClick(e){var btnRemoveFromEditorList=dom.parentWithClass(e.target,"btnRemoveFromEditorList");if(btnRemoveFromEditorList)return void removeElementFromListview(btnRemoveFromEditorList);var btnAddTextItem=dom.parentWithClass(e.target,"btnAddTextItem");btnAddTextItem&&addElementToEditableListview(btnAddTextItem)}function getApiClient(){return connectionManager.getApiClient(currentItem.ServerId)}function init(context,apiClient){context.querySelector(".externalIds").addEventListener("click",function(e){var btnOpenExternalId=dom.parentWithClass(e.target,"btnOpenExternalId");if(btnOpenExternalId){var field=context.querySelector("#"+btnOpenExternalId.getAttribute("data-fieldid")),formatString=field.getAttribute("data-formatstring");field.value&&shell.openUrl(formatString.replace("{0}",field.value))}}),context.querySelector(".btnCancel").addEventListener("click",function(){closeDialog(!1)}),context.querySelector(".btnMore").addEventListener("click",function(e){getApiClient().getCurrentUser().then(function(user){showMoreMenu(context,e.target,user)})}),context.querySelector(".btnHeaderSave").addEventListener("click",function(e){context.querySelector(".btnSave").click()}),context.querySelector("#chkLockData").addEventListener("click",function(e){e.target.checked?hideElement(".providerSettingsContainer"):showElement(".providerSettingsContainer")}),context.removeEventListener("click",onEditorClick),context.addEventListener("click",onEditorClick);var form=context.querySelector("form");form.removeEventListener("submit",onSubmit),form.addEventListener("submit",onSubmit),context.querySelector("#btnAddPerson").addEventListener("click",function(event,data){editPerson(context,{},-1)}),context.querySelector("#peopleList").addEventListener("click",function(e){var index,btnDeletePerson=dom.parentWithClass(e.target,"btnDeletePerson");btnDeletePerson&&(index=parseInt(btnDeletePerson.getAttribute("data-index")),currentItem.People.splice(index,1),populatePeople(context,currentItem.People));var btnEditPerson=dom.parentWithClass(e.target,"btnEditPerson");btnEditPerson&&(index=parseInt(btnEditPerson.getAttribute("data-index")),editPerson(context,currentItem.People[index],index))}),isDialog()&&bindItemChanged(context,apiClient)}function getItem(itemId,serverId){var apiClient=connectionManager.getApiClient(serverId);return itemId?apiClient.getItem(apiClient.getCurrentUserId(),itemId):apiClient.getRootFolder(apiClient.getCurrentUserId())}function getEditorConfig(itemId,serverId){var apiClient=connectionManager.getApiClient(serverId);return itemId?apiClient.getJSON(apiClient.getUrl("Items/"+itemId+"/MetadataEditor")):Promise.resolve({})}function populateCountries(select,allCountries){var html="";html+="";for(var i=0,length=allCountries.length;i"+culture.DisplayName+""}select.innerHTML=html}function populateLanguages(select,languages){var html="";html+="";for(var i=0,length=languages.length;i"+culture.DisplayName+""}select.innerHTML=html}function renderContentTypeOptions(context,metadataInfo){metadataInfo.ContentTypeOptions.length?showElement("#fldContentType",context):hideElement("#fldContentType",context);var html=metadataInfo.ContentTypeOptions.map(function(i){return'"}).join(""),selectEl=context.querySelector("#selectContentType");selectEl.innerHTML=html,selectEl.value=metadataInfo.ContentType||""}function loadExternalIds(context,item,externalIds){for(var html="",providerIds=item.ProviderIds||{},i=0,length=externalIds.length;i',html+='
';var value=providerIds[idInfo.Key]||"";html+='
',html+='',html+="
",formatString&&(html+=''),html+="
",html+="
"}var elem=context.querySelector(".externalIds",context);elem.innerHTML=html,externalIds.length?context.querySelector(".externalIdsSection").classList.remove("hide"):context.querySelector(".externalIdsSection").classList.add("hide")}function hideElement(selector,context,multiple){if(context=context||document,"string"==typeof selector){var elements=multiple?context.querySelectorAll(selector):[context.querySelector(selector)];Array.prototype.forEach.call(elements,function(el){el&&el.classList.add("hide")})}else selector.classList.add("hide")}function showElement(selector,context,multiple){if(context=context||document,"string"==typeof selector){var elements=multiple?context.querySelectorAll(selector):[context.querySelector(selector)];Array.prototype.forEach.call(elements,function(el){el&&el.classList.remove("hide")})}else selector.classList.remove("hide")}function setFieldVisibilities(context,item){item.Path&&"Remote"!==item.LocationType?showElement("#fldPath",context):hideElement("#fldPath",context),"Series"===item.Type||"Movie"===item.Type||"Trailer"===item.Type?showElement("#fldOriginalName",context):hideElement("#fldOriginalName",context),"Series"===item.Type?showElement("#fldSeriesRuntime",context):hideElement("#fldSeriesRuntime",context),"Series"===item.Type||"Person"===item.Type?showElement("#fldEndDate",context):hideElement("#fldEndDate",context),"MusicAlbum"===item.Type?showElement("#albumAssociationMessage",context):hideElement("#albumAssociationMessage",context),"Movie"===item.Type||"Trailer"===item.Type?showElement("#fldCriticRating",context):hideElement("#fldCriticRating",context),"Series"===item.Type?(showElement("#fldStatus",context),showElement("#fldAirDays",context),showElement("#fldAirTime",context)):(hideElement("#fldStatus",context),hideElement("#fldAirDays",context),hideElement("#fldAirTime",context)),"Video"===item.MediaType&&"TvChannel"!==item.Type?showElement("#fld3dFormat",context):hideElement("#fld3dFormat",context),"Audio"===item.Type?showElement("#fldAlbumArtist",context):hideElement("#fldAlbumArtist",context),"Audio"===item.Type||"MusicVideo"===item.Type?(showElement("#fldArtist",context),showElement("#fldAlbum",context)):(hideElement("#fldArtist",context),hideElement("#fldAlbum",context)),"Episode"===item.Type?showElement("#collapsibleDvdEpisodeInfo",context):hideElement("#collapsibleDvdEpisodeInfo",context),"Episode"===item.Type&&0===item.ParentIndexNumber?showElement("#collapsibleSpecialEpisodeInfo",context):hideElement("#collapsibleSpecialEpisodeInfo",context),"Person"===item.Type||"Genre"===item.Type||"Studio"===item.Type||"GameGenre"===item.Type||"MusicGenre"===item.Type||"TvChannel"===item.Type?(hideElement("#fldCommunityRating",context),hideElement("#genresCollapsible",context),hideElement("#peopleCollapsible",context),hideElement("#studiosCollapsible",context),"TvChannel"===item.Type?showElement("#fldOfficialRating",context):hideElement("#fldOfficialRating",context),hideElement("#fldCustomRating",context)):(showElement("#fldCommunityRating",context),showElement("#genresCollapsible",context),showElement("#peopleCollapsible",context),showElement("#studiosCollapsible",context),showElement("#fldOfficialRating",context),showElement("#fldCustomRating",context)),showElement("#tagsCollapsible",context),"TvChannel"===item.Type?(hideElement("#metadataSettingsCollapsible",context),hideElement("#fldPremiereDate",context),hideElement("#fldDateAdded",context),hideElement("#fldYear",context)):(showElement("#metadataSettingsCollapsible",context),showElement("#fldPremiereDate",context),showElement("#fldDateAdded",context),showElement("#fldYear",context)),"TvChannel"===item.Type?hideElement(".overviewContainer",context):showElement(".overviewContainer",context),"TvChannel"===item.Type?hideElement(".websiteFieldContainer",context):showElement(".websiteFieldContainer",context),"Person"===item.Type?(context.querySelector("#txtProductionYear").label(globalize.translate("sharedcomponents#LabelBirthYear")),context.querySelector("#txtPremiereDate").label(globalize.translate("sharedcomponents#LabelBirthDate")),context.querySelector("#txtEndDate").label(globalize.translate("sharedcomponents#LabelDeathDate")),showElement("#fldPlaceOfBirth")):(context.querySelector("#txtProductionYear").label(globalize.translate("sharedcomponents#LabelYear")),context.querySelector("#txtPremiereDate").label(globalize.translate("sharedcomponents#LabelReleaseDate")),context.querySelector("#txtEndDate").label(globalize.translate("sharedcomponents#LabelEndDate")),hideElement("#fldPlaceOfBirth")),"Video"===item.MediaType&&"TvChannel"!==item.Type?showElement("#fldOriginalAspectRatio"):hideElement("#fldOriginalAspectRatio"),"Audio"===item.Type||"Episode"===item.Type||"Season"===item.Type?(showElement("#fldIndexNumber"),"Episode"===item.Type?context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelEpisodeNumber")):"Season"===item.Type?context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelSeasonNumber")):"Audio"===item.Type?context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelTrackNumber")):context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelNumber"))):hideElement("#fldIndexNumber"),"Audio"===item.Type||"Episode"===item.Type?(showElement("#fldParentIndexNumber"),"Episode"===item.Type?context.querySelector("#txtParentIndexNumber").label(globalize.translate("sharedcomponents#LabelSeasonNumber")):"Audio"===item.Type?context.querySelector("#txtParentIndexNumber").label(globalize.translate("sharedcomponents#LabelDiscNumber")):context.querySelector("#txtParentIndexNumber").label(globalize.translate("sharedcomponents#LabelParentNumber"))):hideElement("#fldParentIndexNumber",context),"BoxSet"===item.Type?(showElement("#fldDisplayOrder",context),context.querySelector("#selectDisplayOrder").innerHTML='",showElement("#collapsibleDisplaySettings",context)):(context.querySelector("#selectDisplayOrder").innerHTML="",hideElement("#fldDisplayOrder",context),hideElement("#collapsibleDisplaySettings",context))}function fillItemInfo(context,item,parentalRatingOptions){var select=context.querySelector("#selectOfficialRating");populateRatings(parentalRatingOptions,select,item.OfficialRating),select.value=item.OfficialRating||"",select=context.querySelector("#selectCustomRating"),populateRatings(parentalRatingOptions,select,item.CustomRating),select.value=item.CustomRating||"";var selectStatus=context.querySelector("#selectStatus");populateStatus(selectStatus),selectStatus.value=item.Status||"",context.querySelector("#select3dFormat",context).value=item.Video3DFormat||"",Array.prototype.forEach.call(context.querySelectorAll(".chkAirDay",context),function(el){el.checked=(item.AirDays||[]).indexOf(el.getAttribute("data-day"))!==-1}),populateListView(context.querySelector("#listGenres"),item.Genres),populatePeople(context,item.People||[]),populateListView(context.querySelector("#listStudios"),(item.Studios||[]).map(function(element){return element.Name||""})),populateListView(context.querySelector("#listTags"),item.Tags);var lockData=item.LockData||!1,chkLockData=context.querySelector("#chkLockData");chkLockData.checked=lockData,chkLockData.checked?hideElement(".providerSettingsContainer",context):showElement(".providerSettingsContainer",context),populateInternetProviderSettings(context,item,item.LockedFields),context.querySelector("#txtPath").value=item.Path||"",context.querySelector("#txtName").value=item.Name||"",context.querySelector("#txtOriginalName").value=item.OriginalTitle||"",context.querySelector("#txtOverview").value=item.Overview||"",context.querySelector("#txtTagline").value=item.Taglines&&item.Taglines.length?item.Taglines[0]:"",context.querySelector("#txtSortName").value=item.ForcedSortName||"",context.querySelector("#txtCommunityRating").value=item.CommunityRating||"",context.querySelector("#txtHomePageUrl").value=item.HomePageUrl||"",context.querySelector("#txtCriticRating").value=item.CriticRating||"",context.querySelector("#txtIndexNumber").value="IndexNumber"in item?item.IndexNumber:"",context.querySelector("#txtParentIndexNumber").value="ParentIndexNumber"in item?item.ParentIndexNumber:"",context.querySelector("#txtAbsoluteEpisodeNumber").value="AbsoluteEpisodeNumber"in item?item.AbsoluteEpisodeNumber:"",context.querySelector("#txtDvdEpisodeNumber").value="DvdEpisodeNumber"in item?item.DvdEpisodeNumber:"",context.querySelector("#txtDvdSeasonNumber").value="DvdSeasonNumber"in item?item.DvdSeasonNumber:"",context.querySelector("#txtAirsBeforeSeason").value="AirsBeforeSeasonNumber"in item?item.AirsBeforeSeasonNumber:"",context.querySelector("#txtAirsAfterSeason").value="AirsAfterSeasonNumber"in item?item.AirsAfterSeasonNumber:"",context.querySelector("#txtAirsBeforeEpisode").value="AirsBeforeEpisodeNumber"in item?item.AirsBeforeEpisodeNumber:"",context.querySelector("#txtAlbum").value=item.Album||"",context.querySelector("#txtAlbumArtist").value=(item.AlbumArtists||[]).map(function(a){return a.Name}).join(";"),context.querySelector("#selectDisplayOrder").value=item.DisplayOrder,context.querySelector("#txtArtist").value=(item.ArtistItems||[]).map(function(a){return a.Name}).join(";");var date;if(item.DateCreated)try{date=datetime.parseISO8601Date(item.DateCreated,!0),context.querySelector("#txtDateAdded").value=date.toISOString().slice(0,10)}catch(e){context.querySelector("#txtDateAdded").value=""}else context.querySelector("#txtDateAdded").value="";if(item.PremiereDate)try{date=datetime.parseISO8601Date(item.PremiereDate,!0),context.querySelector("#txtPremiereDate").value=date.toISOString().slice(0,10)}catch(e){context.querySelector("#txtPremiereDate").value=""}else context.querySelector("#txtPremiereDate").value="";if(item.EndDate)try{date=datetime.parseISO8601Date(item.EndDate,!0),context.querySelector("#txtEndDate").value=date.toISOString().slice(0,10)}catch(e){context.querySelector("#txtEndDate").value=""}else context.querySelector("#txtEndDate").value="";context.querySelector("#txtProductionYear").value=item.ProductionYear||"",context.querySelector("#txtAirTime").value=item.AirTime||"";var placeofBirth=item.ProductionLocations&&item.ProductionLocations.length?item.ProductionLocations[0]:"";if(context.querySelector("#txtPlaceOfBirth").value=placeofBirth,context.querySelector("#txtOriginalAspectRatio").value=item.AspectRatio||"",context.querySelector("#selectLanguage").value=item.PreferredMetadataLanguage||"",context.querySelector("#selectCountry").value=item.PreferredMetadataCountryCode||"",item.RunTimeTicks){var minutes=item.RunTimeTicks/6e8;context.querySelector("#txtSeriesRuntime").value=Math.round(minutes)}else context.querySelector("#txtSeriesRuntime",context).value=""}function populateRatings(allParentalRatings,select,currentValue){var html="";html+="";var i,length,rating,ratings=[],currentValueFound=!1;for(i=0,length=allParentalRatings.length;i"+rating.Name+"";select.innerHTML=html}function populateStatus(select){var html="";html+="",html+="",html+="",select.innerHTML=html}function populateListView(list,items,sortCallback){items=items||[],"undefined"==typeof sortCallback?items.sort(function(a,b){return a.toLowerCase().localeCompare(b.toLowerCase())}):items=sortCallback(items);for(var html="",i=0;i',html+='live_tv',html+='
',html+='
',html+=items[i],html+="
",html+="
",html+='',html+="";list.innerHTML=html}function populatePeople(context,people){for(var lastType="",html="",elem=context.querySelector("#peopleList"),i=0,length=people.length;i',html+='person',html+='
',html+='",html+="
",html+='',html+=""}elem.innerHTML=html}function generateSliders(fields,currentFields){for(var html="",i=0;i",html+=""+name+"",html+=""}return html}function populateInternetProviderSettings(context,item,lockedFields){var container=context.querySelector(".providerSettingsContainer");lockedFields=lockedFields||[];var metadatafields=[{name:globalize.translate("sharedcomponents#Name"),value:"Name"},{name:globalize.translate("sharedcomponents#Overview"),value:"Overview"},{name:globalize.translate("sharedcomponents#Genres"),value:"Genres"},{name:globalize.translate("sharedcomponents#ParentalRating"),value:"OfficialRating"},{name:globalize.translate("sharedcomponents#People"),value:"Cast"}];"Person"===item.Type?metadatafields.push({name:globalize.translate("sharedcomponents#BirthLocation"),value:"ProductionLocations"}):metadatafields.push({name:globalize.translate("sharedcomponents#ProductionLocations"),value:"ProductionLocations"}),"Series"===item.Type&&metadatafields.push({name:globalize.translate("Runtime"),value:"Runtime"}),metadatafields.push({name:globalize.translate("sharedcomponents#Studios"),value:"Studios"}),metadatafields.push({name:globalize.translate("sharedcomponents#Tags"),value:"Tags"}),metadatafields.push({name:globalize.translate("sharedcomponents#Images"),value:"Images"}),metadatafields.push({name:globalize.translate("sharedcomponents#Backdrops"),value:"Backdrops"}),"Game"===item.Type&&metadatafields.push({name:globalize.translate("sharedcomponents#Screenshots"),value:"Screenshots"});var html="";html+="

"+globalize.translate("sharedcomponents#HeaderEnabledFields")+"

",html+="

"+globalize.translate("sharedcomponents#HeaderEnabledFieldsHelp")+"

",html+=generateSliders(metadatafields,lockedFields),container.innerHTML=html}function reload(context,itemId,serverId){loading.show(),Promise.all([getItem(itemId,serverId),getEditorConfig(itemId,serverId)]).then(function(responses){var item=responses[0];metadataEditorInfo=responses[1],currentItem=item;var languages=metadataEditorInfo.Cultures,countries=metadataEditorInfo.Countries;renderContentTypeOptions(context,metadataEditorInfo),loadExternalIds(context,item,metadataEditorInfo.ExternalIdInfos),populateLanguages(context.querySelector("#selectLanguage"),languages),populateCountries(context.querySelector("#selectCountry"),countries),setFieldVisibilities(context,item),fillItemInfo(context,item,metadataEditorInfo.ParentalRatingOptions),"Video"===item.MediaType&&"Episode"!==item.Type&&"TvChannel"!==item.Type?showElement("#fldTagline",context):hideElement("#fldTagline",context),loading.hide()})}function centerFocus(elem,horiz,on){require(["scrollHelper"],function(scrollHelper){var fn=on?"on":"off";scrollHelper.centerFocus[fn](elem,horiz)})}function show(itemId,serverId,resolve,reject){loading.show(),require(["text!./metadataeditor.template.html"],function(template){var dialogOptions={removeOnClose:!0,scrollY:!1};layoutManager.tv?dialogOptions.size="fullscreen":dialogOptions.size="medium-tall";var dlg=dialogHelper.createDialog(dialogOptions);dlg.classList.add("formDialog");var html="";html+=globalize.translateDocument(template,"sharedcomponents"),dlg.innerHTML=html,layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!0),dialogHelper.open(dlg),dlg.addEventListener("close",function(){layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!1),unbindItemChanged(dlg,connectionManager.getApiClient(serverId)),resolve()}),currentContext=dlg,init(dlg,connectionManager.getApiClient(serverId)),reload(dlg,itemId,serverId)})}var currentContext,metadataEditorInfo,currentItem;return{show:function(itemId,serverId){return new Promise(function(resolve,reject){return show(itemId,serverId,resolve,reject)})},embed:function(elem,itemId,serverId){return new Promise(function(resolve,reject){loading.show(),require(["text!./metadataeditor.template.html"],function(template){elem.innerHTML=globalize.translateDocument(template,"sharedcomponents"),elem.querySelector(".formDialogFooter").classList.remove("formDialogFooter"),elem.querySelector(".btnHeaderSave").classList.remove("hide"),elem.querySelector(".btnCancel").classList.add("hide"),currentContext=elem,init(elem,connectionManager.getApiClient(serverId)),reload(elem,itemId,serverId),focusManager.autoFocus(elem)})})}}}); \ No newline at end of file +define(["itemHelper","dom","layoutManager","dialogHelper","datetime","loading","focusManager","connectionManager","globalize","require","shell","emby-checkbox","emby-input","emby-select","listViewStyle","emby-textarea","emby-button","paper-icon-button-light","css!./../formdialog","clearButtonStyle"],function(itemHelper,dom,layoutManager,dialogHelper,datetime,loading,focusManager,connectionManager,globalize,require,shell){"use strict";function isDialog(){return currentContext.classList.contains("dialog")}function closeDialog(isSubmitted){isDialog()&&dialogHelper.close(currentContext)}function submitUpdatedItem(form,item){function afterContentTypeUpdated(){require(["toast"],function(toast){toast(globalize.translate("sharedcomponents#MessageItemSaved"))}),loading.hide(),closeDialog(!0)}var apiClient=getApiClient();apiClient.updateItem(item).then(function(){var newContentType=form.querySelector("#selectContentType").value||"";(metadataEditorInfo.ContentType||"")!==newContentType?apiClient.ajax({url:apiClient.getUrl("Items/"+item.Id+"/ContentType",{ContentType:newContentType}),type:"POST"}).then(function(){afterContentTypeUpdated()}):afterContentTypeUpdated()})}function getSelectedAirDays(form){var checkedItems=form.querySelectorAll(".chkAirDay:checked")||[];return Array.prototype.map.call(checkedItems,function(c){return c.getAttribute("data-day")})}function getAlbumArtists(form){return form.querySelector("#txtAlbumArtist").value.trim().split(";").filter(function(s){return s.length>0}).map(function(a){return{Name:a}})}function getArtists(form){return form.querySelector("#txtArtist").value.trim().split(";").filter(function(s){return s.length>0}).map(function(a){return{Name:a}})}function getDateFromForm(form,element,property){var val=form.querySelector(element).value;if(!val)return null;if(currentItem[property]){var date=datetime.parseISO8601Date(currentItem[property],!0),parts=date.toISOString().split("T");if(0===parts[0].indexOf(val)){var iso=parts[1];val+="T"+iso}}return val}function onSubmit(e){loading.show();var form=this;try{var item={Id:currentItem.Id,Name:form.querySelector("#txtName").value,OriginalTitle:form.querySelector("#txtOriginalName").value,ForcedSortName:form.querySelector("#txtSortName").value,CommunityRating:form.querySelector("#txtCommunityRating").value,HomePageUrl:form.querySelector("#txtHomePageUrl").value,CriticRating:form.querySelector("#txtCriticRating").value,IndexNumber:form.querySelector("#txtIndexNumber").value||null,AbsoluteEpisodeNumber:form.querySelector("#txtAbsoluteEpisodeNumber").value,DvdEpisodeNumber:form.querySelector("#txtDvdEpisodeNumber").value,DvdSeasonNumber:form.querySelector("#txtDvdSeasonNumber").value,AirsBeforeSeasonNumber:form.querySelector("#txtAirsBeforeSeason").value,AirsAfterSeasonNumber:form.querySelector("#txtAirsAfterSeason").value,AirsBeforeEpisodeNumber:form.querySelector("#txtAirsBeforeEpisode").value,ParentIndexNumber:form.querySelector("#txtParentIndexNumber").value||null,DisplayOrder:form.querySelector("#selectDisplayOrder").value,Album:form.querySelector("#txtAlbum").value,AlbumArtists:getAlbumArtists(form),ArtistItems:getArtists(form),Overview:form.querySelector("#txtOverview").value,Status:form.querySelector("#selectStatus").value,AirDays:getSelectedAirDays(form),AirTime:form.querySelector("#txtAirTime").value,Genres:editableListViewValues(form.querySelector("#listGenres")),Tags:editableListViewValues(form.querySelector("#listTags")),Studios:editableListViewValues(form.querySelector("#listStudios")).map(function(element){return{Name:element}}),PremiereDate:getDateFromForm(form,"#txtPremiereDate","PremiereDate"),DateCreated:getDateFromForm(form,"#txtDateAdded","DateCreated"),EndDate:getDateFromForm(form,"#txtEndDate","EndDate"),ProductionYear:form.querySelector("#txtProductionYear").value,AspectRatio:form.querySelector("#txtOriginalAspectRatio").value,Video3DFormat:form.querySelector("#select3dFormat").value,OfficialRating:form.querySelector("#selectOfficialRating").value,CustomRating:form.querySelector("#selectCustomRating").value,People:currentItem.People,LockData:form.querySelector("#chkLockData").checked,LockedFields:Array.prototype.filter.call(form.querySelectorAll(".selectLockedField"),function(c){return!c.checked}).map(function(c){return c.getAttribute("data-value")})};item.ProviderIds=Object.assign({},currentItem.ProviderIds);var idElements=form.querySelectorAll(".txtExternalId");if(Array.prototype.map.call(idElements,function(idElem){var providerKey=idElem.getAttribute("data-providerkey");item.ProviderIds[providerKey]=idElem.value}),item.PreferredMetadataLanguage=form.querySelector("#selectLanguage").value,item.PreferredMetadataCountryCode=form.querySelector("#selectCountry").value,"Person"===currentItem.Type){var placeOfBirth=form.querySelector("#txtPlaceOfBirth").value;item.ProductionLocations=placeOfBirth?[placeOfBirth]:[]}if("Series"===currentItem.Type){var seriesRuntime=form.querySelector("#txtSeriesRuntime").value;item.RunTimeTicks=seriesRuntime?6e8*seriesRuntime:null}var tagline=form.querySelector("#txtTagline").value;item.Taglines=tagline?[tagline]:[],submitUpdatedItem(form,item)}catch(err){alert(err)}return e.preventDefault(),e.stopPropagation(),!1}function editableListViewValues(list){return Array.prototype.map.call(list.querySelectorAll(".textValue"),function(el){return el.textContent})}function addElementToEditableListview(source,sortCallback){require(["prompt"],function(prompt){prompt({label:"Value:"}).then(function(text){var list=dom.parentWithClass(source,"editableListviewContainer").querySelector(".paperList"),items=editableListViewValues(list);items.push(text),populateListView(list,items,sortCallback)})})}function removeElementFromListview(source){var el=dom.parentWithClass(source,"listItem");el.parentNode.removeChild(el)}function editPerson(context,person,index){require(["personEditor"],function(personEditor){personEditor.show(person).then(function(updatedPerson){var isNew=index===-1;isNew&¤tItem.People.push(updatedPerson),populatePeople(context,currentItem.People)})})}function showMoreMenu(context,button,user){require(["itemContextMenu"],function(itemContextMenu){var item=currentItem;itemContextMenu.show({item:item,positionTo:button,edit:!1,editImages:!0,editSubtitles:!0,sync:!1,share:!1,play:!1,queue:!1,user:user}).then(function(result){result.deleted?afterDeleted(context,item):result.updated&&reload(context,item.Id,item.ServerId)})})}function afterDeleted(context,item){var parentId=item.ParentId||item.SeasonId||item.SeriesId;parentId?reload(context,parentId,item.ServerId):require(["appRouter"],function(appRouter){appRouter.goHome()})}function onEditorClick(e){var btnRemoveFromEditorList=dom.parentWithClass(e.target,"btnRemoveFromEditorList");if(btnRemoveFromEditorList)return void removeElementFromListview(btnRemoveFromEditorList);var btnAddTextItem=dom.parentWithClass(e.target,"btnAddTextItem");btnAddTextItem&&addElementToEditableListview(btnAddTextItem)}function getApiClient(){return connectionManager.getApiClient(currentItem.ServerId)}function init(context,apiClient){context.querySelector(".externalIds").addEventListener("click",function(e){var btnOpenExternalId=dom.parentWithClass(e.target,"btnOpenExternalId");if(btnOpenExternalId){var field=context.querySelector("#"+btnOpenExternalId.getAttribute("data-fieldid")),formatString=field.getAttribute("data-formatstring");field.value&&shell.openUrl(formatString.replace("{0}",field.value))}}),context.querySelector(".btnCancel").addEventListener("click",function(){closeDialog(!1)}),context.querySelector(".btnMore").addEventListener("click",function(e){getApiClient().getCurrentUser().then(function(user){showMoreMenu(context,e.target,user)})}),context.querySelector(".btnHeaderSave").addEventListener("click",function(e){context.querySelector(".btnSave").click()}),context.querySelector("#chkLockData").addEventListener("click",function(e){e.target.checked?hideElement(".providerSettingsContainer"):showElement(".providerSettingsContainer")}),context.removeEventListener("click",onEditorClick),context.addEventListener("click",onEditorClick);var form=context.querySelector("form");form.removeEventListener("submit",onSubmit),form.addEventListener("submit",onSubmit),context.querySelector("#btnAddPerson").addEventListener("click",function(event,data){editPerson(context,{},-1)}),context.querySelector("#peopleList").addEventListener("click",function(e){var index,btnDeletePerson=dom.parentWithClass(e.target,"btnDeletePerson");btnDeletePerson&&(index=parseInt(btnDeletePerson.getAttribute("data-index")),currentItem.People.splice(index,1),populatePeople(context,currentItem.People));var btnEditPerson=dom.parentWithClass(e.target,"btnEditPerson");btnEditPerson&&(index=parseInt(btnEditPerson.getAttribute("data-index")),editPerson(context,currentItem.People[index],index))})}function getItem(itemId,serverId){var apiClient=connectionManager.getApiClient(serverId);return itemId?apiClient.getItem(apiClient.getCurrentUserId(),itemId):apiClient.getRootFolder(apiClient.getCurrentUserId())}function getEditorConfig(itemId,serverId){var apiClient=connectionManager.getApiClient(serverId);return itemId?apiClient.getJSON(apiClient.getUrl("Items/"+itemId+"/MetadataEditor")):Promise.resolve({})}function populateCountries(select,allCountries){var html="";html+="";for(var i=0,length=allCountries.length;i"+culture.DisplayName+""}select.innerHTML=html}function populateLanguages(select,languages){var html="";html+="";for(var i=0,length=languages.length;i"+culture.DisplayName+""}select.innerHTML=html}function renderContentTypeOptions(context,metadataInfo){metadataInfo.ContentTypeOptions.length?showElement("#fldContentType",context):hideElement("#fldContentType",context);var html=metadataInfo.ContentTypeOptions.map(function(i){return'"}).join(""),selectEl=context.querySelector("#selectContentType");selectEl.innerHTML=html,selectEl.value=metadataInfo.ContentType||""}function loadExternalIds(context,item,externalIds){for(var html="",providerIds=item.ProviderIds||{},i=0,length=externalIds.length;i',html+='
';var value=providerIds[idInfo.Key]||"";html+='
',html+='',html+="
",formatString&&(html+=''),html+="
",html+=""}var elem=context.querySelector(".externalIds",context);elem.innerHTML=html,externalIds.length?context.querySelector(".externalIdsSection").classList.remove("hide"):context.querySelector(".externalIdsSection").classList.add("hide")}function hideElement(selector,context,multiple){if(context=context||document,"string"==typeof selector){var elements=multiple?context.querySelectorAll(selector):[context.querySelector(selector)];Array.prototype.forEach.call(elements,function(el){el&&el.classList.add("hide")})}else selector.classList.add("hide")}function showElement(selector,context,multiple){if(context=context||document,"string"==typeof selector){var elements=multiple?context.querySelectorAll(selector):[context.querySelector(selector)];Array.prototype.forEach.call(elements,function(el){el&&el.classList.remove("hide")})}else selector.classList.remove("hide")}function setFieldVisibilities(context,item){item.Path&&"Remote"!==item.LocationType?showElement("#fldPath",context):hideElement("#fldPath",context),"Series"===item.Type||"Movie"===item.Type||"Trailer"===item.Type?showElement("#fldOriginalName",context):hideElement("#fldOriginalName",context),"Series"===item.Type?showElement("#fldSeriesRuntime",context):hideElement("#fldSeriesRuntime",context),"Series"===item.Type||"Person"===item.Type?showElement("#fldEndDate",context):hideElement("#fldEndDate",context),"MusicAlbum"===item.Type?showElement("#albumAssociationMessage",context):hideElement("#albumAssociationMessage",context),"Movie"===item.Type||"Trailer"===item.Type?showElement("#fldCriticRating",context):hideElement("#fldCriticRating",context),"Series"===item.Type?(showElement("#fldStatus",context),showElement("#fldAirDays",context),showElement("#fldAirTime",context)):(hideElement("#fldStatus",context),hideElement("#fldAirDays",context),hideElement("#fldAirTime",context)),"Video"===item.MediaType&&"TvChannel"!==item.Type?showElement("#fld3dFormat",context):hideElement("#fld3dFormat",context),"Audio"===item.Type?showElement("#fldAlbumArtist",context):hideElement("#fldAlbumArtist",context),"Audio"===item.Type||"MusicVideo"===item.Type?(showElement("#fldArtist",context),showElement("#fldAlbum",context)):(hideElement("#fldArtist",context),hideElement("#fldAlbum",context)),"Episode"===item.Type?showElement("#collapsibleDvdEpisodeInfo",context):hideElement("#collapsibleDvdEpisodeInfo",context),"Episode"===item.Type&&0===item.ParentIndexNumber?showElement("#collapsibleSpecialEpisodeInfo",context):hideElement("#collapsibleSpecialEpisodeInfo",context),"Person"===item.Type||"Genre"===item.Type||"Studio"===item.Type||"GameGenre"===item.Type||"MusicGenre"===item.Type||"TvChannel"===item.Type?(hideElement("#fldCommunityRating",context),hideElement("#genresCollapsible",context),hideElement("#peopleCollapsible",context),hideElement("#studiosCollapsible",context),"TvChannel"===item.Type?showElement("#fldOfficialRating",context):hideElement("#fldOfficialRating",context),hideElement("#fldCustomRating",context)):(showElement("#fldCommunityRating",context),showElement("#genresCollapsible",context),showElement("#peopleCollapsible",context),showElement("#studiosCollapsible",context),showElement("#fldOfficialRating",context),showElement("#fldCustomRating",context)),showElement("#tagsCollapsible",context),"TvChannel"===item.Type?(hideElement("#metadataSettingsCollapsible",context),hideElement("#fldPremiereDate",context),hideElement("#fldDateAdded",context),hideElement("#fldYear",context)):(showElement("#metadataSettingsCollapsible",context),showElement("#fldPremiereDate",context),showElement("#fldDateAdded",context),showElement("#fldYear",context)),"TvChannel"===item.Type?hideElement(".overviewContainer",context):showElement(".overviewContainer",context),"TvChannel"===item.Type?hideElement(".websiteFieldContainer",context):showElement(".websiteFieldContainer",context),"Person"===item.Type?(context.querySelector("#txtProductionYear").label(globalize.translate("sharedcomponents#LabelBirthYear")),context.querySelector("#txtPremiereDate").label(globalize.translate("sharedcomponents#LabelBirthDate")),context.querySelector("#txtEndDate").label(globalize.translate("sharedcomponents#LabelDeathDate")),showElement("#fldPlaceOfBirth")):(context.querySelector("#txtProductionYear").label(globalize.translate("sharedcomponents#LabelYear")),context.querySelector("#txtPremiereDate").label(globalize.translate("sharedcomponents#LabelReleaseDate")),context.querySelector("#txtEndDate").label(globalize.translate("sharedcomponents#LabelEndDate")),hideElement("#fldPlaceOfBirth")),"Video"===item.MediaType&&"TvChannel"!==item.Type?showElement("#fldOriginalAspectRatio"):hideElement("#fldOriginalAspectRatio"),"Audio"===item.Type||"Episode"===item.Type||"Season"===item.Type?(showElement("#fldIndexNumber"),"Episode"===item.Type?context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelEpisodeNumber")):"Season"===item.Type?context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelSeasonNumber")):"Audio"===item.Type?context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelTrackNumber")):context.querySelector("#txtIndexNumber").label(globalize.translate("sharedcomponents#LabelNumber"))):hideElement("#fldIndexNumber"),"Audio"===item.Type||"Episode"===item.Type?(showElement("#fldParentIndexNumber"),"Episode"===item.Type?context.querySelector("#txtParentIndexNumber").label(globalize.translate("sharedcomponents#LabelSeasonNumber")):"Audio"===item.Type?context.querySelector("#txtParentIndexNumber").label(globalize.translate("sharedcomponents#LabelDiscNumber")):context.querySelector("#txtParentIndexNumber").label(globalize.translate("sharedcomponents#LabelParentNumber"))):hideElement("#fldParentIndexNumber",context),"BoxSet"===item.Type?(showElement("#fldDisplayOrder",context),context.querySelector("#selectDisplayOrder").innerHTML='",showElement("#collapsibleDisplaySettings",context)):(context.querySelector("#selectDisplayOrder").innerHTML="",hideElement("#fldDisplayOrder",context),hideElement("#collapsibleDisplaySettings",context))}function fillItemInfo(context,item,parentalRatingOptions){var select=context.querySelector("#selectOfficialRating");populateRatings(parentalRatingOptions,select,item.OfficialRating),select.value=item.OfficialRating||"",select=context.querySelector("#selectCustomRating"),populateRatings(parentalRatingOptions,select,item.CustomRating),select.value=item.CustomRating||"";var selectStatus=context.querySelector("#selectStatus");populateStatus(selectStatus),selectStatus.value=item.Status||"",context.querySelector("#select3dFormat",context).value=item.Video3DFormat||"",Array.prototype.forEach.call(context.querySelectorAll(".chkAirDay",context),function(el){el.checked=(item.AirDays||[]).indexOf(el.getAttribute("data-day"))!==-1}),populateListView(context.querySelector("#listGenres"),item.Genres),populatePeople(context,item.People||[]),populateListView(context.querySelector("#listStudios"),(item.Studios||[]).map(function(element){return element.Name||""})),populateListView(context.querySelector("#listTags"),item.Tags);var lockData=item.LockData||!1,chkLockData=context.querySelector("#chkLockData");chkLockData.checked=lockData,chkLockData.checked?hideElement(".providerSettingsContainer",context):showElement(".providerSettingsContainer",context),populateInternetProviderSettings(context,item,item.LockedFields),context.querySelector("#txtPath").value=item.Path||"",context.querySelector("#txtName").value=item.Name||"",context.querySelector("#txtOriginalName").value=item.OriginalTitle||"",context.querySelector("#txtOverview").value=item.Overview||"",context.querySelector("#txtTagline").value=item.Taglines&&item.Taglines.length?item.Taglines[0]:"",context.querySelector("#txtSortName").value=item.ForcedSortName||"",context.querySelector("#txtCommunityRating").value=item.CommunityRating||"",context.querySelector("#txtHomePageUrl").value=item.HomePageUrl||"",context.querySelector("#txtCriticRating").value=item.CriticRating||"",context.querySelector("#txtIndexNumber").value="IndexNumber"in item?item.IndexNumber:"",context.querySelector("#txtParentIndexNumber").value="ParentIndexNumber"in item?item.ParentIndexNumber:"",context.querySelector("#txtAbsoluteEpisodeNumber").value="AbsoluteEpisodeNumber"in item?item.AbsoluteEpisodeNumber:"",context.querySelector("#txtDvdEpisodeNumber").value="DvdEpisodeNumber"in item?item.DvdEpisodeNumber:"",context.querySelector("#txtDvdSeasonNumber").value="DvdSeasonNumber"in item?item.DvdSeasonNumber:"",context.querySelector("#txtAirsBeforeSeason").value="AirsBeforeSeasonNumber"in item?item.AirsBeforeSeasonNumber:"",context.querySelector("#txtAirsAfterSeason").value="AirsAfterSeasonNumber"in item?item.AirsAfterSeasonNumber:"",context.querySelector("#txtAirsBeforeEpisode").value="AirsBeforeEpisodeNumber"in item?item.AirsBeforeEpisodeNumber:"",context.querySelector("#txtAlbum").value=item.Album||"",context.querySelector("#txtAlbumArtist").value=(item.AlbumArtists||[]).map(function(a){return a.Name}).join(";"),context.querySelector("#selectDisplayOrder").value=item.DisplayOrder,context.querySelector("#txtArtist").value=(item.ArtistItems||[]).map(function(a){return a.Name}).join(";");var date;if(item.DateCreated)try{date=datetime.parseISO8601Date(item.DateCreated,!0),context.querySelector("#txtDateAdded").value=date.toISOString().slice(0,10)}catch(e){context.querySelector("#txtDateAdded").value=""}else context.querySelector("#txtDateAdded").value="";if(item.PremiereDate)try{date=datetime.parseISO8601Date(item.PremiereDate,!0),context.querySelector("#txtPremiereDate").value=date.toISOString().slice(0,10)}catch(e){context.querySelector("#txtPremiereDate").value=""}else context.querySelector("#txtPremiereDate").value="";if(item.EndDate)try{date=datetime.parseISO8601Date(item.EndDate,!0),context.querySelector("#txtEndDate").value=date.toISOString().slice(0,10)}catch(e){context.querySelector("#txtEndDate").value=""}else context.querySelector("#txtEndDate").value="";context.querySelector("#txtProductionYear").value=item.ProductionYear||"",context.querySelector("#txtAirTime").value=item.AirTime||"";var placeofBirth=item.ProductionLocations&&item.ProductionLocations.length?item.ProductionLocations[0]:"";if(context.querySelector("#txtPlaceOfBirth").value=placeofBirth,context.querySelector("#txtOriginalAspectRatio").value=item.AspectRatio||"",context.querySelector("#selectLanguage").value=item.PreferredMetadataLanguage||"",context.querySelector("#selectCountry").value=item.PreferredMetadataCountryCode||"",item.RunTimeTicks){var minutes=item.RunTimeTicks/6e8;context.querySelector("#txtSeriesRuntime").value=Math.round(minutes)}else context.querySelector("#txtSeriesRuntime",context).value=""}function populateRatings(allParentalRatings,select,currentValue){var html="";html+="";var i,length,rating,ratings=[],currentValueFound=!1;for(i=0,length=allParentalRatings.length;i"+rating.Name+"";select.innerHTML=html}function populateStatus(select){var html="";html+="",html+="",html+="",select.innerHTML=html}function populateListView(list,items,sortCallback){items=items||[],"undefined"==typeof sortCallback?items.sort(function(a,b){return a.toLowerCase().localeCompare(b.toLowerCase())}):items=sortCallback(items);for(var html="",i=0;i',html+='live_tv',html+='
',html+='
',html+=items[i],html+="
",html+="
",html+='',html+="";list.innerHTML=html}function populatePeople(context,people){for(var lastType="",html="",elem=context.querySelector("#peopleList"),i=0,length=people.length;i',html+='person',html+='
',html+='",html+="
",html+='',html+=""}elem.innerHTML=html}function generateSliders(fields,currentFields){for(var html="",i=0;i",html+=""+name+"",html+=""}return html}function populateInternetProviderSettings(context,item,lockedFields){var container=context.querySelector(".providerSettingsContainer");lockedFields=lockedFields||[];var metadatafields=[{name:globalize.translate("sharedcomponents#Name"),value:"Name"},{name:globalize.translate("sharedcomponents#Overview"),value:"Overview"},{name:globalize.translate("sharedcomponents#Genres"),value:"Genres"},{name:globalize.translate("sharedcomponents#ParentalRating"),value:"OfficialRating"},{name:globalize.translate("sharedcomponents#People"),value:"Cast"}];"Person"===item.Type?metadatafields.push({name:globalize.translate("sharedcomponents#BirthLocation"),value:"ProductionLocations"}):metadatafields.push({name:globalize.translate("sharedcomponents#ProductionLocations"),value:"ProductionLocations"}),"Series"===item.Type&&metadatafields.push({name:globalize.translate("Runtime"),value:"Runtime"}),metadatafields.push({name:globalize.translate("sharedcomponents#Studios"),value:"Studios"}),metadatafields.push({name:globalize.translate("sharedcomponents#Tags"),value:"Tags"}),metadatafields.push({name:globalize.translate("sharedcomponents#Images"),value:"Images"}),metadatafields.push({name:globalize.translate("sharedcomponents#Backdrops"),value:"Backdrops"}),"Game"===item.Type&&metadatafields.push({name:globalize.translate("sharedcomponents#Screenshots"),value:"Screenshots"});var html="";html+="

"+globalize.translate("sharedcomponents#HeaderEnabledFields")+"

",html+="

"+globalize.translate("sharedcomponents#HeaderEnabledFieldsHelp")+"

",html+=generateSliders(metadatafields,lockedFields),container.innerHTML=html}function reload(context,itemId,serverId){loading.show(),Promise.all([getItem(itemId,serverId),getEditorConfig(itemId,serverId)]).then(function(responses){var item=responses[0];metadataEditorInfo=responses[1],currentItem=item;var languages=metadataEditorInfo.Cultures,countries=metadataEditorInfo.Countries;renderContentTypeOptions(context,metadataEditorInfo),loadExternalIds(context,item,metadataEditorInfo.ExternalIdInfos),populateLanguages(context.querySelector("#selectLanguage"),languages),populateCountries(context.querySelector("#selectCountry"),countries),setFieldVisibilities(context,item),fillItemInfo(context,item,metadataEditorInfo.ParentalRatingOptions),"Video"===item.MediaType&&"Episode"!==item.Type&&"TvChannel"!==item.Type?showElement("#fldTagline",context):hideElement("#fldTagline",context),loading.hide()})}function centerFocus(elem,horiz,on){require(["scrollHelper"],function(scrollHelper){var fn=on?"on":"off";scrollHelper.centerFocus[fn](elem,horiz)})}function show(itemId,serverId,resolve,reject){loading.show(),require(["text!./metadataeditor.template.html"],function(template){var dialogOptions={removeOnClose:!0,scrollY:!1};layoutManager.tv?dialogOptions.size="fullscreen":dialogOptions.size="medium-tall";var dlg=dialogHelper.createDialog(dialogOptions);dlg.classList.add("formDialog");var html="";html+=globalize.translateDocument(template,"sharedcomponents"),dlg.innerHTML=html,layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!0),dialogHelper.open(dlg),dlg.addEventListener("close",function(){layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!1),resolve()}),currentContext=dlg,init(dlg,connectionManager.getApiClient(serverId)),reload(dlg,itemId,serverId)})}var currentContext,metadataEditorInfo,currentItem;return{show:function(itemId,serverId){return new Promise(function(resolve,reject){return show(itemId,serverId,resolve,reject)})},embed:function(elem,itemId,serverId){return new Promise(function(resolve,reject){loading.show(),require(["text!./metadataeditor.template.html"],function(template){elem.innerHTML=globalize.translateDocument(template,"sharedcomponents"),elem.querySelector(".formDialogFooter").classList.remove("formDialogFooter"),elem.querySelector(".btnHeaderSave").classList.remove("hide"),elem.querySelector(".btnCancel").classList.add("hide"),currentContext=elem,init(elem,connectionManager.getApiClient(serverId)),reload(elem,itemId,serverId),focusManager.autoFocus(elem)})})}}}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/playback/playbackmanager.js b/dashboard-ui/bower_components/emby-webcomponents/playback/playbackmanager.js index 11f23530c2..554e39f81a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/playback/playbackmanager.js +++ b/dashboard-ui/bower_components/emby-webcomponents/playback/playbackmanager.js @@ -1,3 +1,3 @@ define(["events","datetime","appSettings","itemHelper","pluginManager","playQueueManager","userSettings","globalize","connectionManager","loading","apphost","fullscreenManager"],function(events,datetime,appSettings,itemHelper,pluginManager,PlayQueueManager,userSettings,globalize,connectionManager,loading,apphost,fullscreenManager){"use strict";function enableLocalPlaylistManagement(player){return!player.getPlaylist&&!!player.isLocalPlayer}function bindToFullscreenChange(player){events.on(fullscreenManager,"fullscreenchange",function(){events.trigger(player,"fullscreenchange")})}function triggerPlayerChange(playbackManagerInstance,newPlayer,newTarget,previousPlayer,previousTargetInfo){(newPlayer||previousPlayer)&&(newTarget&&previousTargetInfo&&newTarget.id===previousTargetInfo.id||events.trigger(playbackManagerInstance,"playerchange",[newPlayer,newTarget,previousPlayer]))}function reportPlayback(state,serverId,method,progressEventName){if(serverId){var info=Object.assign({},state.PlayState);info.ItemId=state.NowPlayingItem.Id,progressEventName&&(info.EventName=progressEventName);var apiClient=connectionManager.getApiClient(serverId);apiClient[method](info)}}function normalizeName(t){return t.toLowerCase().replace(" ","")}function getItemsForPlayback(serverId,query){var apiClient=connectionManager.getApiClient(serverId);if(query.Ids&&1===query.Ids.split(",").length){var itemId=query.Ids.split(",");return apiClient.getItem(apiClient.getCurrentUserId(),itemId).then(function(item){return{Items:[item],TotalRecordCount:1}})}return query.Limit=query.Limit||200,query.Fields="MediaSources,Chapters",query.ExcludeLocationTypes="Virtual",query.EnableTotalRecordCount=!1,apiClient.getItems(apiClient.getCurrentUserId(),query)}function createStreamInfoFromUrlItem(item){return{url:item.Url||item.Path,playMethod:"DirectPlay",item:item,textTracks:[],mediaType:item.MediaType}}function mergePlaybackQueries(obj1,obj2){var query=Object.assign(obj1,obj2),filters=query.Filters?query.Filters.split(","):[];return filters.indexOf("IsNotFolder")===-1&&filters.push("IsNotFolder"),query.Filters=filters.join(","),query}function backdropImageUrl(apiClient,item,options){return options=options||{},options.type=options.type||"Backdrop",options.maxWidth||options.width||options.maxHeight||options.height||(options.quality=100),item.BackdropImageTags&&item.BackdropImageTags.length?(options.tag=item.BackdropImageTags[0],apiClient.getScaledImageUrl(item.Id,options)):item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length?(options.tag=item.ParentBackdropImageTags[0],apiClient.getScaledImageUrl(item.ParentBackdropItemId,options)):null}function getMimeType(type,container){if(container=(container||"").toLowerCase(),"audio"===type){if("opus"===container)return"audio/ogg";if("webma"===container)return"audio/webm";if("m4a"===container)return"audio/mp4"}else if("video"===type){if("mkv"===container)return"video/x-matroska";if("m4v"===container)return"video/mp4";if("mov"===container)return"video/quicktime";if("mpg"===container)return"video/mpeg";if("flv"===container)return"video/x-flv"}return type+"/"+container}function getParam(name,url){name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var regexS="[\\?&]"+name+"=([^&#]*)",regex=new RegExp(regexS,"i"),results=regex.exec(url);return null==results?"":decodeURIComponent(results[1].replace(/\+/g," "))}function isAutomaticPlayer(player){return!!player.isLocalPlayer}function getAutomaticPlayers(instance){var player=instance._currentPlayer;return player&&!isAutomaticPlayer(player)?[player]:instance.getPlayers().filter(isAutomaticPlayer)}function isServerItem(item){return!!item.Id}function enableIntros(item){return"Video"===item.MediaType&&("TvChannel"!==item.Type&&("InProgress"!==item.Status&&isServerItem(item)))}function getIntros(firstItem,apiClient,options){return options.startPositionTicks||options.startIndex||options.fullscreen===!1||!enableIntros(firstItem)||!userSettings.enableCinemaMode()?Promise.resolve({Items:[]}):apiClient.getIntros(firstItem.Id)}function getAudioMaxValues(deviceProfile){var maxAudioSampleRate=null,maxAudioBitDepth=null;return deviceProfile.CodecProfiles.map(function(codecProfile){"Audio"===codecProfile.Type&&(codecProfile.Conditions||[]).map(function(condition){"LessThanEqual"===condition.Condition&&"AudioBitDepth"===condition.Property&&(maxAudioBitDepth=condition.Value),"LessThanEqual"===condition.Condition&&"AudioSampleRate"===condition.Property&&(maxAudioSampleRate=condition.Value)})}),{maxAudioSampleRate:maxAudioSampleRate,maxAudioBitDepth:maxAudioBitDepth}}function getAudioStreamUrl(item,transcodingProfile,directPlayContainers,maxBitrate,apiClient,maxAudioSampleRate,maxAudioBitDepth,startPosition){var url="Audio/"+item.Id+"/universal";return startingPlaySession++,apiClient.getUrl(url,{UserId:apiClient.getCurrentUserId(),DeviceId:apiClient.deviceId(),MaxStreamingBitrate:maxBitrate,Container:directPlayContainers,TranscodingContainer:transcodingProfile.Container||null,TranscodingProtocol:transcodingProfile.Protocol||null,AudioCodec:transcodingProfile.AudioCodec,MaxAudioSampleRate:maxAudioSampleRate,MaxAudioBitDepth:maxAudioBitDepth,api_key:apiClient.accessToken(),PlaySessionId:startingPlaySession,StartTimeTicks:startPosition||0,EnableRedirection:!0,EnableRemoteMedia:apphost.supports("remoteaudio")})}function getAudioStreamUrlFromDeviceProfile(item,deviceProfile,maxBitrate,apiClient,startPosition){var transcodingProfile=deviceProfile.TranscodingProfiles.filter(function(p){return"Audio"===p.Type&&"Streaming"===p.Context})[0],directPlayContainers="";deviceProfile.DirectPlayProfiles.map(function(p){"Audio"===p.Type&&(directPlayContainers?directPlayContainers+=","+p.Container:directPlayContainers=p.Container,p.AudioCodec&&(directPlayContainers+="|"+p.AudioCodec))});var maxValues=getAudioMaxValues(deviceProfile);return getAudioStreamUrl(item,transcodingProfile,directPlayContainers,maxBitrate,apiClient,maxValues.maxAudioSampleRate,maxValues.maxAudioBitDepth,startPosition)}function getStreamUrls(items,deviceProfile,maxBitrate,apiClient,startPosition){var audioTranscodingProfile=deviceProfile.TranscodingProfiles.filter(function(p){return"Audio"===p.Type&&"Streaming"===p.Context})[0],audioDirectPlayContainers="";deviceProfile.DirectPlayProfiles.map(function(p){"Audio"===p.Type&&(audioDirectPlayContainers?audioDirectPlayContainers+=","+p.Container:audioDirectPlayContainers=p.Container,p.AudioCodec&&(audioDirectPlayContainers+="|"+p.AudioCodec))});for(var maxValues=getAudioMaxValues(deviceProfile),streamUrls=[],i=0,length=items.length;i=interceptors.length)return void resolve();var interceptor=interceptors[index];interceptor.intercept(options).then(function(){runNextPrePlay(interceptors,index+1,options,resolve,reject)},reject)}function sendPlaybackListToPlayer(player,items,deviceProfile,maxBitrate,apiClient,startPositionTicks,mediaSourceId,audioStreamIndex,subtitleStreamIndex,startIndex){return setStreamUrls(items,deviceProfile,maxBitrate,apiClient,startPositionTicks).then(function(){return loading.hide(),player.play({items:items,startPositionTicks:startPositionTicks||0,mediaSourceId:mediaSourceId,audioStreamIndex:audioStreamIndex,subtitleStreamIndex:subtitleStreamIndex,startIndex:startIndex})})}function playAfterBitrateDetect(maxBitrate,item,playOptions,onPlaybackStartedFn){var promise,startPosition=playOptions.startPositionTicks,player=getPlayer(item,playOptions),activePlayer=self._currentPlayer;return activePlayer?(self._playNextAfterEnded=!1,promise=onPlaybackChanging(activePlayer,player,item)):promise=Promise.resolve(),isServerItem(item)&&"Game"!==item.MediaType?Promise.all([promise,player.getDeviceProfile(item)]).then(function(responses){var deviceProfile=responses[1],apiClient=connectionManager.getApiClient(item.ServerId),mediaSourceId=playOptions.mediaSourceId,audioStreamIndex=playOptions.audioStreamIndex,subtitleStreamIndex=playOptions.subtitleStreamIndex;return player&&!enableLocalPlaylistManagement(player)?sendPlaybackListToPlayer(player,playOptions.items,deviceProfile,maxBitrate,apiClient,startPosition,mediaSourceId,audioStreamIndex,subtitleStreamIndex,playOptions.startIndex):(playOptions.items=null,getPlaybackMediaSource(player,apiClient,deviceProfile,maxBitrate,item,startPosition,mediaSourceId,audioStreamIndex,subtitleStreamIndex).then(function(mediaSource){var streamInfo=createStreamInfo(apiClient,item.MediaType,item,mediaSource,startPosition);return streamInfo.fullscreen=playOptions.fullscreen,getPlayerData(player).isChangingStream=!1,getPlayerData(player).maxStreamingBitrate=maxBitrate,player.play(streamInfo).then(function(){loading.hide(),onPlaybackStartedFn(),onPlaybackStarted(player,playOptions,streamInfo,mediaSource)},function(err){onPlaybackStartedFn(),onPlaybackStarted(player,playOptions,streamInfo,mediaSource),setTimeout(function(){onPlaybackError.call(player,err,{type:"mediadecodeerror",streamInfo:streamInfo})},100)})}))}):promise.then(function(){var streamInfo=createStreamInfoFromUrlItem(item);return streamInfo.fullscreen=playOptions.fullscreen,getPlayerData(player).isChangingStream=!1,player.play(streamInfo).then(function(){loading.hide(),onPlaybackStartedFn(),onPlaybackStarted(player,playOptions,streamInfo)},function(){self.stop(player)})})}function createStreamInfo(apiClient,type,item,mediaSource,startPosition,forceTranscoding){var mediaUrl,contentType,directOptions,transcodingOffsetTicks=0,playerStartPositionTicks=startPosition,liveStreamId=mediaSource.LiveStreamId,playMethod="Transcode",mediaSourceContainer=(mediaSource.Container||"").toLowerCase();"Video"===type?(contentType=getMimeType("video",mediaSourceContainer),mediaSource.enableDirectPlay&&!forceTranscoding?(mediaUrl=mediaSource.Path,playMethod="DirectPlay"):mediaSource.SupportsDirectStream&&!forceTranscoding?(directOptions={Static:!0,mediaSourceId:mediaSource.Id,deviceId:apiClient.deviceId(),api_key:apiClient.accessToken()},mediaSource.ETag&&(directOptions.Tag=mediaSource.ETag),mediaSource.LiveStreamId&&(directOptions.LiveStreamId=mediaSource.LiveStreamId),mediaUrl=apiClient.getUrl("Videos/"+item.Id+"/stream."+mediaSourceContainer,directOptions),playMethod="DirectStream"):mediaSource.SupportsTranscoding&&(mediaUrl=apiClient.getUrl(mediaSource.TranscodingUrl),"hls"===mediaSource.TranscodingSubProtocol?contentType="application/x-mpegURL":(playerStartPositionTicks=null,contentType=getMimeType("video",mediaSource.TranscodingContainer),mediaUrl.toLowerCase().indexOf("copytimestamps=true")===-1&&(transcodingOffsetTicks=startPosition||0)))):"Audio"===type?(contentType=getMimeType("audio",mediaSourceContainer),mediaSource.enableDirectPlay&&!forceTranscoding?(mediaUrl=mediaSource.Path,playMethod="DirectPlay"):mediaSource.StreamUrl?(playMethod="Transcode",mediaUrl=mediaSource.StreamUrl):mediaSource.SupportsDirectStream&&!forceTranscoding?(directOptions={Static:!0,mediaSourceId:mediaSource.Id,deviceId:apiClient.deviceId(),api_key:apiClient.accessToken()},mediaSource.ETag&&(directOptions.Tag=mediaSource.ETag),mediaSource.LiveStreamId&&(directOptions.LiveStreamId=mediaSource.LiveStreamId),mediaUrl=apiClient.getUrl("Audio/"+item.Id+"/stream."+mediaSourceContainer,directOptions),playMethod="DirectStream"):mediaSource.SupportsTranscoding&&(mediaUrl=apiClient.getUrl(mediaSource.TranscodingUrl),"hls"===mediaSource.TranscodingSubProtocol?contentType="application/x-mpegURL":(transcodingOffsetTicks=startPosition||0,playerStartPositionTicks=null,contentType=getMimeType("audio",mediaSource.TranscodingContainer)))):"Game"===type&&(mediaUrl=mediaSource.Path,playMethod="DirectPlay"),!mediaUrl&&mediaSource.SupportsDirectPlay&&(mediaUrl=mediaSource.Path,playMethod="DirectPlay");var resultInfo={url:mediaUrl,mimeType:contentType,transcodingOffsetTicks:transcodingOffsetTicks,playMethod:playMethod,playerStartPositionTicks:playerStartPositionTicks,item:item,mediaSource:mediaSource,textTracks:getTextTracks(apiClient,item,mediaSource),tracks:getTextTracks(apiClient,item,mediaSource),mediaType:type,liveStreamId:liveStreamId,playSessionId:getParam("playSessionId",mediaUrl),title:item.Name},backdropUrl=backdropImageUrl(apiClient,item,{});return backdropUrl&&(resultInfo.backdropUrl=backdropUrl),resultInfo}function getTextTracks(apiClient,item,mediaSource){for(var subtitleStreams=mediaSource.MediaStreams.filter(function(s){return"Subtitle"===s.Type}),textStreams=subtitleStreams.filter(function(s){return"External"===s.DeliveryMethod}),tracks=[],i=0,length=textStreams.length;i0},self.isPlayingVideo=function(player){return self.isPlayingMediaType("Video",player)},self.isPlayingAudio=function(player){return self.isPlayingMediaType("Audio",player)},self.getPlayers=function(){return players},self.canPlay=function(item){var itemType=item.Type,locationType=item.LocationType;if("MusicGenre"===itemType||"Season"===itemType||"Series"===itemType||"BoxSet"===itemType||"MusicAlbum"===itemType||"MusicArtist"===itemType||"Playlist"===itemType)return!0;if("Virtual"===locationType&&"Program"!==itemType)return!1;if("Program"===itemType){if(!item.EndDate||!item.StartDate)return!1;if((new Date).getTime()>datetime.parseISO8601Date(item.EndDate).getTime()||(new Date).getTime()=supported.length&&(index=0),self.setAspectRatio(supported[index].id,player)}},self.setAspectRatio=function(val,player){player=player||self._currentPlayer,player&&player.setAspectRatio&&player.setAspectRatio(val)},self.getSupportedAspectRatios=function(player){return player=player||self._currentPlayer,player&&player.getSupportedAspectRatios?player.getSupportedAspectRatios():[]},self.getAspectRatio=function(player){if(player=player||self._currentPlayer,player&&player.getAspectRatio)return player.getAspectRatio()};var brightnessOsdLoaded;self.setBrightness=function(val,player){player=player||self._currentPlayer,player&&(brightnessOsdLoaded||(brightnessOsdLoaded=!0,require(["brightnessOsd"])),player.setBrightness(val))},self.getBrightness=function(player){if(player=player||self._currentPlayer)return player.getBrightness()},self.setVolume=function(val,player){player=player||self._currentPlayer,player&&player.setVolume(val)},self.getVolume=function(player){if(player=player||self._currentPlayer)return player.getVolume()},self.volumeUp=function(player){player=player||self._currentPlayer,player&&player.volumeUp()},self.volumeDown=function(player){player=player||self._currentPlayer,player&&player.volumeDown()},self.changeAudioStream=function(player){if(player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player))return player.changeAudioStream();if(player){var i,length,currentMediaSource=self.currentMediaSource(player),mediaStreams=[];for(i=0,length=currentMediaSource.MediaStreams.length;i=mediaStreams.length&&(nextIndex=0),nextIndex=nextIndex===-1?-1:mediaStreams[nextIndex].Index,self.setAudioStreamIndex(nextIndex,player)}}},self.changeSubtitleStream=function(player){if(player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player))return player.changeSubtitleStream();if(player){var i,length,currentMediaSource=self.currentMediaSource(player),mediaStreams=[];for(i=0,length=currentMediaSource.MediaStreams.length;i=mediaStreams.length&&(nextIndex=-1),nextIndex=nextIndex===-1?-1:mediaStreams[nextIndex].Index,self.setSubtitleStreamIndex(nextIndex,player)}}},self.getAudioStreamIndex=function(player){return player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player)?player.getAudioStreamIndex():getPlayerData(player).audioStreamIndex},self.setAudioStreamIndex=function(index,player){return player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player)?player.setAudioStreamIndex(index):void("Transcode"!==self.playMethod(player)&&player.canSetAudioStreamIndex()?(player.setAudioStreamIndex(index),getPlayerData(player).audioStreamIndex=index):(changeStream(player,getCurrentTicks(player),{AudioStreamIndex:index}),getPlayerData(player).audioStreamIndex=index))},self.getMaxStreamingBitrate=function(player){if(player=player||self._currentPlayer,player&&player.getMaxStreamingBitrate)return player.getMaxStreamingBitrate();var playerData=getPlayerData(player);if(playerData.maxStreamingBitrate)return playerData.maxStreamingBitrate;var mediaType=playerData.streamInfo?playerData.streamInfo.mediaType:null,currentItem=self.currentItem(player),apiClient=currentItem?connectionManager.getApiClient(currentItem.ServerId):connectionManager.currentApiClient();return getSavedMaxStreamingBitrate(apiClient,mediaType)},self.enableAutomaticBitrateDetection=function(player){if(player=player||self._currentPlayer,player&&player.enableAutomaticBitrateDetection)return player.enableAutomaticBitrateDetection();var playerData=getPlayerData(player),mediaType=playerData.streamInfo?playerData.streamInfo.mediaType:null,currentItem=self.currentItem(player),apiClient=currentItem?connectionManager.getApiClient(currentItem.ServerId):connectionManager.currentApiClient(),endpointInfo=apiClient.getSavedEndpointInfo()||{};return appSettings.enableAutomaticBitrateDetection(endpointInfo.IsInNetwork,mediaType)},self.setMaxStreamingBitrate=function(options,player){if(player=player||self._currentPlayer,player&&player.setMaxStreamingBitrate)return player.setMaxStreamingBitrate(options);var apiClient=connectionManager.getApiClient(self.currentItem(player).ServerId);apiClient.getEndpointInfo().then(function(endpointInfo){var promise,playerData=getPlayerData(player),mediaType=playerData.streamInfo?playerData.streamInfo.mediaType:null;options.enableAutomaticBitrateDetection?(appSettings.enableAutomaticBitrateDetection(endpointInfo.IsInNetwork,mediaType,!0),promise=apiClient.detectBitrate(!0)):(appSettings.enableAutomaticBitrateDetection(endpointInfo.IsInNetwork,mediaType,!1),promise=Promise.resolve(options.maxBitrate)),promise.then(function(bitrate){appSettings.maxStreamingBitrate(endpointInfo.IsInNetwork,mediaType,bitrate),changeStream(player,getCurrentTicks(player),{MaxStreamingBitrate:bitrate})})})},self.isFullscreen=function(player){return player=player||self._currentPlayer,!player.isLocalPlayer||player.isFullscreen?player.isFullscreen():fullscreenManager.isFullScreen()},self.toggleFullscreen=function(player){return player=player||self._currentPlayer,!player.isLocalPlayer||player.toggleFulscreen?player.toggleFulscreen():void(fullscreenManager.isFullScreen()?fullscreenManager.exitFullscreen():fullscreenManager.requestFullscreen())},self.togglePictureInPicture=function(player){return player=player||self._currentPlayer,player.togglePictureInPicture()},self.getSubtitleStreamIndex=function(player){if(player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player))return player.getSubtitleStreamIndex();if(!player)throw new Error("player cannot be null");return getPlayerData(player).subtitleStreamIndex},self.setSubtitleStreamIndex=function(index,player){if(player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player))return player.setSubtitleStreamIndex(index);var currentStream=getCurrentSubtitleStream(player),newStream=getSubtitleStream(player,index);if(currentStream||newStream){var selectedTrackElementIndex=-1,currentPlayMethod=self.playMethod(player);currentStream&&!newStream?("Encode"===getDeliveryMethod(currentStream)||"Embed"===getDeliveryMethod(currentStream)&&"Transcode"===currentPlayMethod)&&changeStream(player,getCurrentTicks(player),{SubtitleStreamIndex:-1}):!currentStream&&newStream?"External"===getDeliveryMethod(newStream)?selectedTrackElementIndex=index:"Embed"===getDeliveryMethod(newStream)&&"Transcode"!==currentPlayMethod?selectedTrackElementIndex=index:changeStream(player,getCurrentTicks(player),{SubtitleStreamIndex:index}):currentStream&&newStream&&("External"===getDeliveryMethod(newStream)||"Embed"===getDeliveryMethod(newStream)&&"Transcode"!==currentPlayMethod?(selectedTrackElementIndex=index,"External"!==getDeliveryMethod(currentStream)&&"Embed"!==getDeliveryMethod(currentStream)&&changeStream(player,getCurrentTicks(player),{SubtitleStreamIndex:-1})):changeStream(player,getCurrentTicks(player),{SubtitleStreamIndex:index})),player.setSubtitleStreamIndex(selectedTrackElementIndex),getPlayerData(player).subtitleStreamIndex=index}},self.seek=function(ticks,player){return ticks=Math.max(0,ticks),player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player)?player.isLocalPlayer?player.seek((ticks||0)/1e4):player.seek(ticks):void changeStream(player,ticks)},self.seekRelative=function(offsetTicks,player){if(player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player)&&player.seekRelative)return player.isLocalPlayer?player.seekRelative((ticks||0)/1e4):player.seekRelative(ticks);var ticks=getCurrentTicks(player)+offsetTicks;return this.seek(ticks,player)},self.play=function(options){if(normalizePlayOptions(options),self._currentPlayer){if(options.enableRemotePlayers===!1&&!self._currentPlayer.isLocalPlayer)return Promise.reject();if(!self._currentPlayer.isLocalPlayer)return self._currentPlayer.play(options)}if(options.fullscreen&&loading.show(),options.items)return translateItemsForPlayback(options.items,options).then(function(items){return playWithIntros(items,options)});if(!options.serverId)throw new Error("serverId required!");return getItemsForPlayback(options.serverId,{Ids:options.ids.join(",")}).then(function(result){return translateItemsForPlayback(result.Items,options).then(function(items){return playWithIntros(items,options)})})},self.getPlayerState=function(player,item,mediaSource){if(player=player||self._currentPlayer,!player)throw new Error("player cannot be null");if(!enableLocalPlaylistManagement(player)&&player.getPlayerState)return player.getPlayerState();item=item||self.currentItem(player),mediaSource=mediaSource||self.currentMediaSource(player);var state={PlayState:{}};return player&&(state.PlayState.VolumeLevel=player.getVolume(),state.PlayState.IsMuted=player.isMuted(),state.PlayState.IsPaused=player.paused(),state.PlayState.RepeatMode=self.getRepeatMode(player),state.PlayState.MaxStreamingBitrate=self.getMaxStreamingBitrate(player),state.PlayState.PositionTicks=getCurrentTicks(player),state.PlayState.PlaybackStartTimeTicks=self.playbackStartTime(player),state.PlayState.SubtitleStreamIndex=self.getSubtitleStreamIndex(player),state.PlayState.AudioStreamIndex=self.getAudioStreamIndex(player),state.PlayState.BufferedRanges=self.getBufferedRanges(player),state.PlayState.PlayMethod=self.playMethod(player),mediaSource&&(state.PlayState.LiveStreamId=mediaSource.LiveStreamId),state.PlayState.PlaySessionId=self.playSessionId(player)),mediaSource&&(state.PlayState.MediaSourceId=mediaSource.Id,state.NowPlayingItem={RunTimeTicks:mediaSource.RunTimeTicks},state.PlayState.CanSeek=(mediaSource.RunTimeTicks||0)>0||canPlayerSeek(player)),item&&(state.NowPlayingItem=getNowPlayingItemForReporting(player,item,mediaSource)),state.MediaSource=mediaSource,state},self.duration=function(player){if(player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player)&&!player.isLocalPlayer)return player.duration();if(!player)throw new Error("player cannot be null");var mediaSource=self.currentMediaSource(player);if(mediaSource&&mediaSource.RunTimeTicks)return mediaSource.RunTimeTicks;var playerDuration=player.duration();return playerDuration&&(playerDuration*=1e4),playerDuration},self.getCurrentTicks=getCurrentTicks,self.getPlaybackInfo=function(item,options){options=options||{};var startPosition=options.startPositionTicks||0,mediaType=options.mediaType||item.MediaType,player=getPlayer(item,options),apiClient=connectionManager.getApiClient(item.ServerId),maxBitrate=getSavedMaxStreamingBitrate(connectionManager.getApiClient(item.ServerId),mediaType);return player.getDeviceProfile(item).then(function(deviceProfile){var mediaSourceId=null,audioStreamIndex=null,subtitleStreamIndex=null;return getPlaybackMediaSource(player,apiClient,deviceProfile,maxBitrate,item,startPosition,mediaSourceId,audioStreamIndex,subtitleStreamIndex).then(function(mediaSource){return createStreamInfo(apiClient,item.MediaType,item,mediaSource,startPosition)})})},self.setCurrentPlaylistItem=function(playlistItemId,player){if(player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player))return player.setCurrentPlaylistItem(playlistItemId);for(var newItem,newItemIndex,playlist=self._playQueueManager.getPlaylist(),i=0,length=playlist.length;i=0){var playlist=self._playQueueManager.getPlaylist(),newItem=playlist[newIndex];if(newItem){var newItemPlayOptions=newItem.playOptions||{};newItemPlayOptions.startPositionTicks=0,playInternal(newItem,newItemPlayOptions,function(){setPlaylistState(newItem.PlaylistItemId,newIndex)})}}},self.queue=function(options,player){queue(options,"",player)},self.queueNext=function(options,player){queue(options,"next",player)},events.on(pluginManager,"registered",function(e,plugin){"mediaplayer"===plugin.type&&initMediaPlayer(plugin)}),pluginManager.ofType("mediaplayer").map(initMediaPlayer),self.onAppClose=function(){var player=this._currentPlayer;player&&this.isPlaying(player)&&(this._playNextAfterEnded=!1,onPlaybackStopped.call(player))},self.playbackStartTime=function(player){if(player=player||this._currentPlayer,player&&!enableLocalPlaylistManagement(player)&&!player.isLocalPlayer)return player.playbackStartTime();var streamInfo=getPlayerData(player).streamInfo;return streamInfo?streamInfo.playbackStartTimeTicks:null},apphost.supports("remotecontrol")&&require(["serverNotifications"],function(serverNotifications){events.on(serverNotifications,"ServerShuttingDown",self.setDefaultPlayerActive.bind(self)),events.on(serverNotifications,"ServerRestarting",self.setDefaultPlayerActive.bind(self))})}var startingPlaySession=(new Date).getTime();return PlaybackManager.prototype.getCurrentPlayer=function(){return this._currentPlayer},PlaybackManager.prototype.currentTime=function(player){return player=player||this._currentPlayer,!player||enableLocalPlaylistManagement(player)||player.isLocalPlayer?this.getCurrentTicks(player):player.currentTime()},PlaybackManager.prototype.nextItem=function(player){if(player=player||this._currentPlayer,player&&!enableLocalPlaylistManagement(player))return player.nextItem();var nextItem=this._playQueueManager.getNextItemInfo();if(!nextItem||!nextItem.item)return Promise.reject();var apiClient=connectionManager.getApiClient(nextItem.item.ServerId);return apiClient.getItem(apiClient.getCurrentUserId(),nextItem.item.Id)},PlaybackManager.prototype.canQueue=function(item){return"MusicAlbum"===item.Type||"MusicArtist"===item.Type||"MusicGenre"===item.Type?this.canQueueMediaType("Audio"):this.canQueueMediaType(item.MediaType)},PlaybackManager.prototype.canQueueMediaType=function(mediaType){return!!this._currentPlayer&&this._currentPlayer.canPlayMediaType(mediaType)},PlaybackManager.prototype.isMuted=function(player){return player=player||this._currentPlayer,!!player&&player.isMuted()},PlaybackManager.prototype.setMute=function(mute,player){player=player||this._currentPlayer,player&&player.setMute(mute)},PlaybackManager.prototype.toggleMute=function(mute,player){player=player||this._currentPlayer,player&&(player.toggleMute?player.toggleMute():player.setMute(!player.isMuted()))},PlaybackManager.prototype.toggleDisplayMirroring=function(){this.enableDisplayMirroring(!this.enableDisplayMirroring())},PlaybackManager.prototype.enableDisplayMirroring=function(enabled){if(null!=enabled){var val=enabled?"1":"0";return void appSettings.set("displaymirror",val)}return"0"!==(appSettings.get("displaymirror")||"")},PlaybackManager.prototype.nextChapter=function(player){player=player||this._currentPlayer;var item=this.currentItem(player),ticks=this.getCurrentTicks(player),nextChapter=(item.Chapters||[]).filter(function(i){return i.StartPositionTicks>ticks})[0];nextChapter?this.seek(nextChapter.StartPositionTicks,player):this.nextTrack(player)},PlaybackManager.prototype.previousChapter=function(player){player=player||this._currentPlayer;var item=this.currentItem(player),ticks=this.getCurrentTicks(player);ticks-=1e8,0===this.getCurrentPlaylistIndex(player)&&(ticks=Math.max(ticks,0));var previousChapters=(item.Chapters||[]).filter(function(i){ -return i.StartPositionTicks<=ticks});previousChapters.length?this.seek(previousChapters[previousChapters.length-1].StartPositionTicks,player):this.previousTrack(player)},PlaybackManager.prototype.fastForward=function(player){if(player=player||this._currentPlayer,null!=player.fastForward)return void player.fastForward(userSettings.skipForwardLength());var offsetTicks=1e4*userSettings.skipForwardLength();this.seekRelative(offsetTicks,player)},PlaybackManager.prototype.rewind=function(player){if(player=player||this._currentPlayer,null!=player.rewind)return void player.rewind(userSettings.skipBackLength());var offsetTicks=0-1e4*userSettings.skipBackLength();this.seekRelative(offsetTicks,player)},PlaybackManager.prototype.seekPercent=function(percent,player){player=player||this._currentPlayer;var ticks=this.duration(player)||0;percent/=100,ticks*=percent,this.seek(parseInt(ticks),player)},PlaybackManager.prototype.playTrailers=function(item){var apiClient=connectionManager.getApiClient(item.ServerId),instance=this;if(item.LocalTrailerCount)return apiClient.getLocalTrailers(apiClient.getCurrentUserId(),item.Id).then(function(result){return instance.play({items:result})});var remoteTrailers=item.RemoteTrailers||[];return remoteTrailers.length?this.play({items:remoteTrailers.map(function(t){return{Name:t.Name||item.Name+" Trailer",Url:t.Url,MediaType:"Video",Type:"Trailer",ServerId:apiClient.serverId()}})}):Promise.reject()},PlaybackManager.prototype.getSubtitleUrl=function(textStream,serverId){var apiClient=connectionManager.getApiClient(serverId),textStreamUrl=textStream.IsExternalUrl?textStream.DeliveryUrl:apiClient.getUrl(textStream.DeliveryUrl);return textStreamUrl},PlaybackManager.prototype.stop=function(player){return player=player||this._currentPlayer,player?(enableLocalPlaylistManagement(player)&&(this._playNextAfterEnded=!1),player.stop(!0,!0)):Promise.resolve()},PlaybackManager.prototype.getBufferedRanges=function(player){return player=player||this._currentPlayer,player&&player.getBufferedRanges?player.getBufferedRanges():[]},PlaybackManager.prototype.playPause=function(player){if(player=player||this._currentPlayer)return player.playPause?player.playPause():player.paused()?this.unpause(player):this.pause(player)},PlaybackManager.prototype.paused=function(player){if(player=player||this._currentPlayer)return player.paused()},PlaybackManager.prototype.pause=function(player){player=player||this._currentPlayer,player&&player.pause()},PlaybackManager.prototype.unpause=function(player){player=player||this._currentPlayer,player&&player.unpause()},PlaybackManager.prototype.instantMix=function(item,player){if(player=player||this._currentPlayer,player&&player.instantMix)return player.instantMix(item);var apiClient=connectionManager.getApiClient(item.ServerId),options={};options.UserId=apiClient.getCurrentUserId(),options.Fields="MediaSources",options.Limit=200;var instance=this;apiClient.getInstantMixFromItem(item.Id,options).then(function(result){instance.play({items:result.Items})})},PlaybackManager.prototype.shuffle=function(shuffleItem,player,queryOptions){if(player=player||this._currentPlayer,player&&player.shuffle)return player.shuffle(shuffleItem);var apiClient=connectionManager.getApiClient(shuffleItem.ServerId),instance=this;apiClient.getItem(apiClient.getCurrentUserId(),shuffleItem.Id).then(function(item){var query={Fields:"MediaSources,Chapters",Limit:200,Recursive:!0,SortBy:"Random"};if("MusicArtist"===item.Type)query.MediaTypes="Audio",query.ArtistIds=item.Id;else if("MusicGenre"===item.Type)query.MediaTypes="Audio",query.Genres=item.Name;else{if(!item.IsFolder)return;query.ParentId=item.Id}queryOptions&&(query=mergePlaybackQueries(query,queryOptions)),getItemsForPlayback(item.ServerId,query).then(function(result){instance.play({items:result.Items})})})},PlaybackManager.prototype.audioTracks=function(player){if(player=player||this._currentPlayer,player.audioTracks){var result=player.audioTracks();if(result)return result}var mediaSource=this.currentMediaSource(player),mediaStreams=(mediaSource||{}).MediaStreams||[];return mediaStreams.filter(function(s){return"Audio"===s.Type})},PlaybackManager.prototype.subtitleTracks=function(player){if(player=player||this._currentPlayer,player.subtitleTracks){var result=player.subtitleTracks();if(result)return result}var mediaSource=this.currentMediaSource(player),mediaStreams=(mediaSource||{}).MediaStreams||[];return mediaStreams.filter(function(s){return"Subtitle"===s.Type})},PlaybackManager.prototype.getSupportedCommands=function(player){if(player=player||this._currentPlayer||{isLocalPlayer:!0},player.isLocalPlayer){var list=["GoHome","GoToSettings","VolumeUp","VolumeDown","Mute","Unmute","ToggleMute","SetVolume","SetAudioStreamIndex","SetSubtitleStreamIndex","SetMaxStreamingBitrate","DisplayContent","GoToSearch","DisplayMessage","SetRepeatMode","PlayMediaSource"];return apphost.supports("fullscreenchange")&&list.push("ToggleFullscreen"),player.supports&&(player.supports("PictureInPicture")&&list.push("PictureInPicture"),player.supports("SetBrightness")&&list.push("SetBrightness"),player.supports("SetAspectRatio")&&list.push("SetAspectRatio")),list}var info=this.getPlayerInfo();return info?info.supportedCommands:[]},PlaybackManager.prototype.setRepeatMode=function(value,player){return player=player||this._currentPlayer,player&&!enableLocalPlaylistManagement(player)?player.setRepeatMode(value):(this._playQueueManager.setRepeatMode(value),void events.trigger(player,"repeatmodechange"))},PlaybackManager.prototype.getRepeatMode=function(player){return player=player||this._currentPlayer,player&&!enableLocalPlaylistManagement(player)?player.getRepeatMode():this._playQueueManager.getRepeatMode()},PlaybackManager.prototype.trySetActiveDeviceName=function(name){name=normalizeName(name);var instance=this;instance.getTargets().then(function(result){var target=result.filter(function(p){return normalizeName(p.name)===name})[0];target&&instance.trySetActivePlayer(target.playerName,target)})},PlaybackManager.prototype.displayContent=function(options,player){player=player||this._currentPlayer,player&&player.displayContent&&player.displayContent(options)},PlaybackManager.prototype.beginPlayerUpdates=function(player){player.beginPlayerUpdates&&player.beginPlayerUpdates()},PlaybackManager.prototype.endPlayerUpdates=function(player){player.endPlayerUpdates&&player.endPlayerUpdates()},PlaybackManager.prototype.setDefaultPlayerActive=function(){this.setActivePlayer("localplayer")},PlaybackManager.prototype.removeActivePlayer=function(name){var playerInfo=this.getPlayerInfo();playerInfo&&playerInfo.name===name&&this.setDefaultPlayerActive()},PlaybackManager.prototype.removeActiveTarget=function(id){var playerInfo=this.getPlayerInfo();playerInfo&&playerInfo.id===id&&this.setDefaultPlayerActive()},PlaybackManager.prototype.sendCommand=function(cmd,player){switch(console.log("MediaController received command: "+cmd.Name),cmd.Name){case"SetRepeatMode":this.setRepeatMode(cmd.Arguments.RepeatMode,player);break;case"VolumeUp":this.volumeUp(player);break;case"VolumeDown":this.volumeDown(player);break;case"Mute":this.setMute(!0,player);break;case"Unmute":this.setMute(!1,player);break;case"ToggleMute":this.toggleMute(player);break;case"SetVolume":this.setVolume(cmd.Arguments.Volume,player);break;case"SetAspectRatio":this.setAspectRatio(cmd.Arguments.AspectRatio,player);break;case"SetBrightness":this.setBrightness(cmd.Arguments.Brightness,player);break;case"SetAudioStreamIndex":this.setAudioStreamIndex(parseInt(cmd.Arguments.Index),player);break;case"SetSubtitleStreamIndex":this.setSubtitleStreamIndex(parseInt(cmd.Arguments.Index),player);break;case"SetMaxStreamingBitrate":break;case"ToggleFullscreen":this.toggleFullscreen(player);break;default:player.sendCommand&&player.sendCommand(cmd)}},new PlaybackManager}); \ No newline at end of file +setStreamUrls(items,profile,self.getMaxStreamingBitrate(player),apiClient,0).then(function(){"next"===mode?player.queueNext(items):player.queue(items)})})}"next"===mode?self._playQueueManager.queueNext(items):self._playQueueManager.queue(items)}}function onPlayerProgressInterval(){var player=this;sendProgressUpdate(player,"timeupdate")}function startPlaybackProgressTimer(player){stopPlaybackProgressTimer(player),player._progressInterval=setInterval(onPlayerProgressInterval.bind(player),1e4)}function stopPlaybackProgressTimer(player){player._progressInterval&&(clearInterval(player._progressInterval),player._progressInterval=null)}function onPlaybackStarted(player,playOptions,streamInfo,mediaSource){if(!player)throw new Error("player cannot be null");setCurrentPlayerInternal(player);var playerData=getPlayerData(player);playerData.streamInfo=streamInfo,streamInfo.playbackStartTimeTicks=1e4*(new Date).getTime(),mediaSource?(playerData.audioStreamIndex=mediaSource.DefaultAudioStreamIndex,playerData.subtitleStreamIndex=mediaSource.DefaultSubtitleStreamIndex):(playerData.audioStreamIndex=null,playerData.subtitleStreamIndex=null),self._playNextAfterEnded=!0;var isFirstItem=playOptions.isFirstItem,fullscreen=playOptions.fullscreen,state=self.getPlayerState(player,streamInfo.item,streamInfo.mediaSource);reportPlayback(state,state.NowPlayingItem.ServerId,"reportPlaybackStart"),state.IsFirstItem=isFirstItem,state.IsFullscreen=fullscreen,events.trigger(player,"playbackstart",[state]),events.trigger(self,"playbackstart",[player,state]),streamInfo.started=!0,startPlaybackProgressTimer(player)}function onPlaybackStartedFromSelfManagingPlayer(e,item,mediaSource){var player=this;setCurrentPlayerInternal(player);var playOptions=item.playOptions||{},isFirstItem=playOptions.isFirstItem,fullscreen=playOptions.fullscreen;playOptions.isFirstItem=!1;var playerData=getPlayerData(player);playerData.streamInfo={};var streamInfo=playerData.streamInfo;streamInfo.playbackStartTimeTicks=1e4*(new Date).getTime();var state=self.getPlayerState(player,item,mediaSource);reportPlayback(state,state.NowPlayingItem.ServerId,"reportPlaybackStart"),state.IsFirstItem=isFirstItem,state.IsFullscreen=fullscreen,events.trigger(player,"playbackstart",[state]),events.trigger(self,"playbackstart",[player,state]),streamInfo.started=!0,startPlaybackProgressTimer(player)}function onPlaybackStoppedFromSelfManagingPlayer(e,playerStopInfo){var player=this;stopPlaybackProgressTimer(player);var state=self.getPlayerState(player,playerStopInfo.item,playerStopInfo.mediaSource),nextItem=playerStopInfo.nextItem,nextMediaType=playerStopInfo.nextMediaType,playbackStopInfo={player:player,state:state,nextItem:nextItem?nextItem.item:null,nextMediaType:nextMediaType};state.NextMediaType=nextMediaType;var streamInfo=getPlayerData(player).streamInfo;streamInfo.ended=!0,isServerItem(playerStopInfo.item)&&(state.PlayState.PositionTicks=1e4*(playerStopInfo.positionMs||0),reportPlayback(state,playerStopInfo.item.ServerId,"reportPlaybackStopped")),state.NextItem=playbackStopInfo.nextItem,events.trigger(player,"playbackstop",[state]),events.trigger(self,"playbackstop",[playbackStopInfo]);var nextItemPlayOptions=nextItem?nextItem.item.playOptions||{}:{},newPlayer=nextItem?getPlayer(nextItem.item,nextItemPlayOptions):null;newPlayer!==player&&(destroyPlayer(player),removeCurrentPlayer(player))}function enablePlaybackRetryWithTranscoding(streamInfo,errorType,currentlyPreventsVideoStreamCopy,currentlyPreventsAudioStreamCopy){return!(!streamInfo.mediaSource.SupportsTranscoding||currentlyPreventsVideoStreamCopy&¤tlyPreventsAudioStreamCopy)}function onPlaybackError(e,error){var player=this;error=error||{};var errorType=error.type;console.log("playbackmanager playback error type: "+(errorType||""));var streamInfo=error.streamInfo||getPlayerData(player).streamInfo;if(streamInfo){var currentlyPreventsVideoStreamCopy=streamInfo.url.toLowerCase().indexOf("allowvideostreamcopy=false")!==-1,currentlyPreventsAudioStreamCopy=streamInfo.url.toLowerCase().indexOf("allowaudiostreamcopy=false")!==-1;if(enablePlaybackRetryWithTranscoding(streamInfo,errorType,currentlyPreventsVideoStreamCopy,currentlyPreventsAudioStreamCopy)){var startTime=getCurrentTicks(player)||streamInfo.playerStartPositionTicks;return void changeStream(player,startTime,{EnableDirectPlay:!1,EnableDirectStream:!1,AllowVideoStreamCopy:!1,AllowAudioStreamCopy:!currentlyPreventsAudioStreamCopy&&!currentlyPreventsVideoStreamCopy&&null},!0)}}var displayErrorCode="NoCompatibleStream";onPlaybackStopped.call(player,e,displayErrorCode)}function onPlaybackStopped(e,displayErrorCode){var player=this;if(!getPlayerData(player).isChangingStream){stopPlaybackProgressTimer(player);var state=self.getPlayerState(player),streamInfo=getPlayerData(player).streamInfo,nextItem=self._playNextAfterEnded?self._playQueueManager.getNextItemInfo():null,nextMediaType=nextItem?nextItem.item.MediaType:null,playbackStopInfo={player:player,state:state,nextItem:nextItem?nextItem.item:null,nextMediaType:nextMediaType};state.NextMediaType=nextMediaType,isServerItem(streamInfo.item)&&(player.supportsProgress===!1&&state.PlayState&&!state.PlayState.PositionTicks&&(state.PlayState.PositionTicks=streamInfo.item.RunTimeTicks),streamInfo.ended=!0,reportPlayback(state,streamInfo.item.ServerId,"reportPlaybackStopped")),state.NextItem=playbackStopInfo.nextItem,nextItem||self._playQueueManager.reset(),events.trigger(player,"playbackstop",[state]),events.trigger(self,"playbackstop",[playbackStopInfo]);var nextItemPlayOptions=nextItem?nextItem.item.playOptions||{}:{},newPlayer=nextItem?getPlayer(nextItem.item,nextItemPlayOptions):null;newPlayer!==player&&(destroyPlayer(player),removeCurrentPlayer(player)),displayErrorCode&&"string"==typeof displayErrorCode?showPlaybackInfoErrorMessage(self,displayErrorCode,nextItem):nextItem&&self.nextTrack()}}function onPlaybackChanging(activePlayer,newPlayer,newItem){var promise,state=self.getPlayerState(activePlayer),serverId=self.currentItem(activePlayer).ServerId;return unbindStopped(activePlayer),promise=activePlayer===newPlayer?activePlayer.stop(!1):activePlayer.stop(!0),promise.then(function(){bindStopped(activePlayer),enableLocalPlaylistManagement(activePlayer)&&reportPlayback(state,serverId,"reportPlaybackStopped"),events.trigger(self,"playbackstop",[{player:activePlayer,state:state,nextItem:newItem,nextMediaType:newItem.MediaType}])})}function bindStopped(player){enableLocalPlaylistManagement(player)&&(events.off(player,"stopped",onPlaybackStopped),events.on(player,"stopped",onPlaybackStopped))}function onPlaybackTimeUpdate(e){var player=this;sendProgressUpdate(player,"timeupdate")}function onPlaybackPause(e){var player=this;sendProgressUpdate(player,"pause")}function onPlaybackUnpause(e){var player=this;sendProgressUpdate(player,"unpause")}function onPlaybackVolumeChange(e){var player=this;sendProgressUpdate(player,"volumechange")}function onRepeatModeChange(e){var player=this;sendProgressUpdate(player,"repeatmodechange")}function unbindStopped(player){events.off(player,"stopped",onPlaybackStopped)}function initLegacyVolumeMethods(player){player.getVolume=function(){return player.volume()},player.setVolume=function(val){return player.volume(val)}}function initMediaPlayer(player){players.push(player),players.sort(function(a,b){return(a.priority||0)-(b.priority||0)}),player.isLocalPlayer!==!1&&(player.isLocalPlayer=!0),player.currentState={},player.getVolume&&player.setVolume||initLegacyVolumeMethods(player),enableLocalPlaylistManagement(player)?(events.on(player,"error",onPlaybackError),events.on(player,"timeupdate",onPlaybackTimeUpdate),events.on(player,"pause",onPlaybackPause),events.on(player,"unpause",onPlaybackUnpause),events.on(player,"volumechange",onPlaybackVolumeChange),events.on(player,"repeatmodechange",onRepeatModeChange)):player.isLocalPlayer&&(events.on(player,"itemstarted",onPlaybackStartedFromSelfManagingPlayer),events.on(player,"itemstopped",onPlaybackStoppedFromSelfManagingPlayer),events.on(player,"timeupdate",onPlaybackTimeUpdate),events.on(player,"pause",onPlaybackPause),events.on(player,"unpause",onPlaybackUnpause),events.on(player,"volumechange",onPlaybackVolumeChange),events.on(player,"repeatmodechange",onRepeatModeChange)),player.isLocalPlayer&&bindToFullscreenChange(player),bindStopped(player)}function sendProgressUpdate(player,progressEventName){if(!player)throw new Error("player cannot be null");var state=self.getPlayerState(player);if(state.NowPlayingItem){var serverId=state.NowPlayingItem.ServerId,streamInfo=getPlayerData(player).streamInfo;streamInfo&&streamInfo.started&&!streamInfo.ended&&reportPlayback(state,serverId,"reportPlaybackProgress",progressEventName)}}var currentTargetInfo,lastLocalPlayer,self=this,players=[],currentPairingId=null;this._playNextAfterEnded=!0;var playerStates={};this._playQueueManager=new PlayQueueManager,self.currentItem=function(player){if(!player)throw new Error("player cannot be null");if(player.currentItem)return player.currentItem();var data=getPlayerData(player);return data.streamInfo?data.streamInfo.item:null},self.currentMediaSource=function(player){if(!player)throw new Error("player cannot be null");if(player.currentMediaSource)return player.currentMediaSource();var data=getPlayerData(player);return data.streamInfo?data.streamInfo.mediaSource:null},self.playMethod=function(player){if(!player)throw new Error("player cannot be null");if(player.playMethod)return player.playMethod();var data=getPlayerData(player);return data.streamInfo?data.streamInfo.playMethod:null},self.playSessionId=function(player){if(!player)throw new Error("player cannot be null");if(player.playSessionId)return player.playSessionId();var data=getPlayerData(player);return data.streamInfo?data.streamInfo.playSessionId:null},self.getPlayerInfo=function(){var player=self._currentPlayer;if(!player)return null;var target=currentTargetInfo||{};return{name:player.name,isLocalPlayer:player.isLocalPlayer,id:target.id,deviceName:target.deviceName,playableMediaTypes:target.playableMediaTypes,supportedCommands:target.supportedCommands}},self.setActivePlayer=function(player,targetInfo){if("localplayer"===player||"localplayer"===player.name){if(self._currentPlayer&&self._currentPlayer.isLocalPlayer)return;return void setCurrentPlayerInternal(null,null)}if("string"==typeof player&&(player=players.filter(function(p){return p.name===player})[0]),!player)throw new Error("null player");setCurrentPlayerInternal(player,targetInfo)},self.trySetActivePlayer=function(player,targetInfo){if("localplayer"===player||"localplayer"===player.name)return void(self._currentPlayer&&self._currentPlayer.isLocalPlayer);if("string"==typeof player&&(player=players.filter(function(p){return p.name===player})[0]),!player)throw new Error("null player");if(currentPairingId!==targetInfo.id){currentPairingId=targetInfo.id;var promise=player.tryPair?player.tryPair(targetInfo):Promise.resolve();promise.then(function(){setCurrentPlayerInternal(player,targetInfo)},function(){currentPairingId===targetInfo.id&&(currentPairingId=null)})}},self.getTargets=function(){var promises=players.filter(function(p){return!displayPlayerInLocalGroup(p)}).map(getPlayerTargets);return Promise.all(promises).then(function(responses){var targets=[];targets.push({name:globalize.translate("sharedcomponents#HeaderMyDevice"),id:"localplayer",playerName:"localplayer",playableMediaTypes:["Audio","Video","Game","Photo","Book"],isLocalPlayer:!0,supportedCommands:self.getSupportedCommands({isLocalPlayer:!0})});for(var i=0;i0},self.isPlayingVideo=function(player){return self.isPlayingMediaType("Video",player)},self.isPlayingAudio=function(player){return self.isPlayingMediaType("Audio",player)},self.getPlayers=function(){return players},self.canPlay=function(item){var itemType=item.Type,locationType=item.LocationType;if("MusicGenre"===itemType||"Season"===itemType||"Series"===itemType||"BoxSet"===itemType||"MusicAlbum"===itemType||"MusicArtist"===itemType||"Playlist"===itemType)return!0;if("Virtual"===locationType&&"Program"!==itemType)return!1;if("Program"===itemType){if(!item.EndDate||!item.StartDate)return!1;if((new Date).getTime()>datetime.parseISO8601Date(item.EndDate).getTime()||(new Date).getTime()=supported.length&&(index=0),self.setAspectRatio(supported[index].id,player)}},self.setAspectRatio=function(val,player){player=player||self._currentPlayer,player&&player.setAspectRatio&&player.setAspectRatio(val)},self.getSupportedAspectRatios=function(player){return player=player||self._currentPlayer,player&&player.getSupportedAspectRatios?player.getSupportedAspectRatios():[]},self.getAspectRatio=function(player){if(player=player||self._currentPlayer,player&&player.getAspectRatio)return player.getAspectRatio()};var brightnessOsdLoaded;self.setBrightness=function(val,player){player=player||self._currentPlayer,player&&(brightnessOsdLoaded||(brightnessOsdLoaded=!0,require(["brightnessOsd"])),player.setBrightness(val))},self.getBrightness=function(player){if(player=player||self._currentPlayer)return player.getBrightness()},self.setVolume=function(val,player){player=player||self._currentPlayer,player&&player.setVolume(val)},self.getVolume=function(player){if(player=player||self._currentPlayer)return player.getVolume()},self.volumeUp=function(player){player=player||self._currentPlayer,player&&player.volumeUp()},self.volumeDown=function(player){player=player||self._currentPlayer,player&&player.volumeDown()},self.changeAudioStream=function(player){if(player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player))return player.changeAudioStream();if(player){var i,length,currentMediaSource=self.currentMediaSource(player),mediaStreams=[];for(i=0,length=currentMediaSource.MediaStreams.length;i=mediaStreams.length&&(nextIndex=0),nextIndex=nextIndex===-1?-1:mediaStreams[nextIndex].Index,self.setAudioStreamIndex(nextIndex,player)}}},self.changeSubtitleStream=function(player){if(player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player))return player.changeSubtitleStream();if(player){var i,length,currentMediaSource=self.currentMediaSource(player),mediaStreams=[];for(i=0,length=currentMediaSource.MediaStreams.length;i=mediaStreams.length&&(nextIndex=-1),nextIndex=nextIndex===-1?-1:mediaStreams[nextIndex].Index,self.setSubtitleStreamIndex(nextIndex,player)}}},self.getAudioStreamIndex=function(player){return player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player)?player.getAudioStreamIndex():getPlayerData(player).audioStreamIndex},self.setAudioStreamIndex=function(index,player){return player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player)?player.setAudioStreamIndex(index):void("Transcode"!==self.playMethod(player)&&player.canSetAudioStreamIndex()?(player.setAudioStreamIndex(index),getPlayerData(player).audioStreamIndex=index):(changeStream(player,getCurrentTicks(player),{AudioStreamIndex:index}),getPlayerData(player).audioStreamIndex=index))},self.getMaxStreamingBitrate=function(player){if(player=player||self._currentPlayer,player&&player.getMaxStreamingBitrate)return player.getMaxStreamingBitrate();var playerData=getPlayerData(player);if(playerData.maxStreamingBitrate)return playerData.maxStreamingBitrate;var mediaType=playerData.streamInfo?playerData.streamInfo.mediaType:null,currentItem=self.currentItem(player),apiClient=currentItem?connectionManager.getApiClient(currentItem.ServerId):connectionManager.currentApiClient();return getSavedMaxStreamingBitrate(apiClient,mediaType)},self.enableAutomaticBitrateDetection=function(player){if(player=player||self._currentPlayer,player&&player.enableAutomaticBitrateDetection)return player.enableAutomaticBitrateDetection();var playerData=getPlayerData(player),mediaType=playerData.streamInfo?playerData.streamInfo.mediaType:null,currentItem=self.currentItem(player),apiClient=currentItem?connectionManager.getApiClient(currentItem.ServerId):connectionManager.currentApiClient(),endpointInfo=apiClient.getSavedEndpointInfo()||{};return appSettings.enableAutomaticBitrateDetection(endpointInfo.IsInNetwork,mediaType)},self.setMaxStreamingBitrate=function(options,player){if(player=player||self._currentPlayer,player&&player.setMaxStreamingBitrate)return player.setMaxStreamingBitrate(options);var apiClient=connectionManager.getApiClient(self.currentItem(player).ServerId);apiClient.getEndpointInfo().then(function(endpointInfo){var promise,playerData=getPlayerData(player),mediaType=playerData.streamInfo?playerData.streamInfo.mediaType:null;options.enableAutomaticBitrateDetection?(appSettings.enableAutomaticBitrateDetection(endpointInfo.IsInNetwork,mediaType,!0),promise=apiClient.detectBitrate(!0)):(appSettings.enableAutomaticBitrateDetection(endpointInfo.IsInNetwork,mediaType,!1),promise=Promise.resolve(options.maxBitrate)),promise.then(function(bitrate){appSettings.maxStreamingBitrate(endpointInfo.IsInNetwork,mediaType,bitrate),changeStream(player,getCurrentTicks(player),{MaxStreamingBitrate:bitrate})})})},self.isFullscreen=function(player){return player=player||self._currentPlayer,!player.isLocalPlayer||player.isFullscreen?player.isFullscreen():fullscreenManager.isFullScreen()},self.toggleFullscreen=function(player){return player=player||self._currentPlayer,!player.isLocalPlayer||player.toggleFulscreen?player.toggleFulscreen():void(fullscreenManager.isFullScreen()?fullscreenManager.exitFullscreen():fullscreenManager.requestFullscreen())},self.togglePictureInPicture=function(player){return player=player||self._currentPlayer,player.togglePictureInPicture()},self.getSubtitleStreamIndex=function(player){if(player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player))return player.getSubtitleStreamIndex();if(!player)throw new Error("player cannot be null");return getPlayerData(player).subtitleStreamIndex},self.setSubtitleStreamIndex=function(index,player){if(player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player))return player.setSubtitleStreamIndex(index);var currentStream=getCurrentSubtitleStream(player),newStream=getSubtitleStream(player,index);if(currentStream||newStream){var selectedTrackElementIndex=-1,currentPlayMethod=self.playMethod(player);currentStream&&!newStream?("Encode"===getDeliveryMethod(currentStream)||"Embed"===getDeliveryMethod(currentStream)&&"Transcode"===currentPlayMethod)&&changeStream(player,getCurrentTicks(player),{SubtitleStreamIndex:-1}):!currentStream&&newStream?"External"===getDeliveryMethod(newStream)?selectedTrackElementIndex=index:"Embed"===getDeliveryMethod(newStream)&&"Transcode"!==currentPlayMethod?selectedTrackElementIndex=index:changeStream(player,getCurrentTicks(player),{SubtitleStreamIndex:index}):currentStream&&newStream&&("External"===getDeliveryMethod(newStream)||"Embed"===getDeliveryMethod(newStream)&&"Transcode"!==currentPlayMethod?(selectedTrackElementIndex=index,"External"!==getDeliveryMethod(currentStream)&&"Embed"!==getDeliveryMethod(currentStream)&&changeStream(player,getCurrentTicks(player),{SubtitleStreamIndex:-1})):changeStream(player,getCurrentTicks(player),{SubtitleStreamIndex:index})),player.setSubtitleStreamIndex(selectedTrackElementIndex),getPlayerData(player).subtitleStreamIndex=index}},self.seek=function(ticks,player){return ticks=Math.max(0,ticks),player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player)?player.isLocalPlayer?player.seek((ticks||0)/1e4):player.seek(ticks):void changeStream(player,ticks)},self.seekRelative=function(offsetTicks,player){if(player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player)&&player.seekRelative)return player.isLocalPlayer?player.seekRelative((ticks||0)/1e4):player.seekRelative(ticks);var ticks=getCurrentTicks(player)+offsetTicks;return this.seek(ticks,player)},self.play=function(options){if(normalizePlayOptions(options),self._currentPlayer){if(options.enableRemotePlayers===!1&&!self._currentPlayer.isLocalPlayer)return Promise.reject();if(!self._currentPlayer.isLocalPlayer)return self._currentPlayer.play(options)}if(options.fullscreen&&loading.show(),options.items)return translateItemsForPlayback(options.items,options).then(function(items){return playWithIntros(items,options)});if(!options.serverId)throw new Error("serverId required!");return getItemsForPlayback(options.serverId,{Ids:options.ids.join(",")}).then(function(result){return translateItemsForPlayback(result.Items,options).then(function(items){return playWithIntros(items,options)})})},self.getPlayerState=function(player,item,mediaSource){if(player=player||self._currentPlayer,!player)throw new Error("player cannot be null");if(!enableLocalPlaylistManagement(player)&&player.getPlayerState)return player.getPlayerState();item=item||self.currentItem(player),mediaSource=mediaSource||self.currentMediaSource(player);var state={PlayState:{}};return player&&(state.PlayState.VolumeLevel=player.getVolume(),state.PlayState.IsMuted=player.isMuted(),state.PlayState.IsPaused=player.paused(),state.PlayState.RepeatMode=self.getRepeatMode(player),state.PlayState.MaxStreamingBitrate=self.getMaxStreamingBitrate(player),state.PlayState.PositionTicks=getCurrentTicks(player),state.PlayState.PlaybackStartTimeTicks=self.playbackStartTime(player),state.PlayState.SubtitleStreamIndex=self.getSubtitleStreamIndex(player),state.PlayState.AudioStreamIndex=self.getAudioStreamIndex(player),state.PlayState.BufferedRanges=self.getBufferedRanges(player),state.PlayState.PlayMethod=self.playMethod(player),mediaSource&&(state.PlayState.LiveStreamId=mediaSource.LiveStreamId),state.PlayState.PlaySessionId=self.playSessionId(player)),mediaSource&&(state.PlayState.MediaSourceId=mediaSource.Id,state.NowPlayingItem={RunTimeTicks:mediaSource.RunTimeTicks},state.PlayState.CanSeek=(mediaSource.RunTimeTicks||0)>0||canPlayerSeek(player)),item&&(state.NowPlayingItem=getNowPlayingItemForReporting(player,item,mediaSource)),state.MediaSource=mediaSource,state},self.duration=function(player){if(player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player)&&!player.isLocalPlayer)return player.duration();if(!player)throw new Error("player cannot be null");var mediaSource=self.currentMediaSource(player);if(mediaSource&&mediaSource.RunTimeTicks)return mediaSource.RunTimeTicks;var playerDuration=player.duration();return playerDuration&&(playerDuration*=1e4),playerDuration},self.getCurrentTicks=getCurrentTicks,self.getPlaybackInfo=function(item,options){options=options||{};var startPosition=options.startPositionTicks||0,mediaType=options.mediaType||item.MediaType,player=getPlayer(item,options),apiClient=connectionManager.getApiClient(item.ServerId),maxBitrate=getSavedMaxStreamingBitrate(connectionManager.getApiClient(item.ServerId),mediaType);return player.getDeviceProfile(item).then(function(deviceProfile){return getPlaybackMediaSource(player,apiClient,deviceProfile,maxBitrate,item,startPosition,options.mediaSourceId,options.audioStreamIndex,options.subtitleStreamIndex).then(function(mediaSource){return createStreamInfo(apiClient,item.MediaType,item,mediaSource,startPosition)})})},self.setCurrentPlaylistItem=function(playlistItemId,player){if(player=player||self._currentPlayer,player&&!enableLocalPlaylistManagement(player))return player.setCurrentPlaylistItem(playlistItemId);for(var newItem,newItemIndex,playlist=self._playQueueManager.getPlaylist(),i=0,length=playlist.length;i=0){var playlist=self._playQueueManager.getPlaylist(),newItem=playlist[newIndex];if(newItem){var newItemPlayOptions=newItem.playOptions||{};newItemPlayOptions.startPositionTicks=0,playInternal(newItem,newItemPlayOptions,function(){setPlaylistState(newItem.PlaylistItemId,newIndex)})}}},self.queue=function(options,player){queue(options,"",player)},self.queueNext=function(options,player){queue(options,"next",player)},events.on(pluginManager,"registered",function(e,plugin){"mediaplayer"===plugin.type&&initMediaPlayer(plugin)}),pluginManager.ofType("mediaplayer").map(initMediaPlayer),self.onAppClose=function(){var player=this._currentPlayer;player&&this.isPlaying(player)&&(this._playNextAfterEnded=!1,onPlaybackStopped.call(player))},self.playbackStartTime=function(player){if(player=player||this._currentPlayer,player&&!enableLocalPlaylistManagement(player)&&!player.isLocalPlayer)return player.playbackStartTime();var streamInfo=getPlayerData(player).streamInfo;return streamInfo?streamInfo.playbackStartTimeTicks:null},apphost.supports("remotecontrol")&&require(["serverNotifications"],function(serverNotifications){events.on(serverNotifications,"ServerShuttingDown",self.setDefaultPlayerActive.bind(self)),events.on(serverNotifications,"ServerRestarting",self.setDefaultPlayerActive.bind(self))})}var startingPlaySession=(new Date).getTime();return PlaybackManager.prototype.getCurrentPlayer=function(){return this._currentPlayer},PlaybackManager.prototype.currentTime=function(player){return player=player||this._currentPlayer,!player||enableLocalPlaylistManagement(player)||player.isLocalPlayer?this.getCurrentTicks(player):player.currentTime()},PlaybackManager.prototype.nextItem=function(player){if(player=player||this._currentPlayer,player&&!enableLocalPlaylistManagement(player))return player.nextItem();var nextItem=this._playQueueManager.getNextItemInfo();if(!nextItem||!nextItem.item)return Promise.reject();var apiClient=connectionManager.getApiClient(nextItem.item.ServerId);return apiClient.getItem(apiClient.getCurrentUserId(),nextItem.item.Id)},PlaybackManager.prototype.canQueue=function(item){return"MusicAlbum"===item.Type||"MusicArtist"===item.Type||"MusicGenre"===item.Type?this.canQueueMediaType("Audio"):this.canQueueMediaType(item.MediaType)},PlaybackManager.prototype.canQueueMediaType=function(mediaType){return!!this._currentPlayer&&this._currentPlayer.canPlayMediaType(mediaType)},PlaybackManager.prototype.isMuted=function(player){return player=player||this._currentPlayer,!!player&&player.isMuted()},PlaybackManager.prototype.setMute=function(mute,player){player=player||this._currentPlayer,player&&player.setMute(mute)},PlaybackManager.prototype.toggleMute=function(mute,player){player=player||this._currentPlayer,player&&(player.toggleMute?player.toggleMute():player.setMute(!player.isMuted()))},PlaybackManager.prototype.toggleDisplayMirroring=function(){this.enableDisplayMirroring(!this.enableDisplayMirroring())},PlaybackManager.prototype.enableDisplayMirroring=function(enabled){if(null!=enabled){var val=enabled?"1":"0";return void appSettings.set("displaymirror",val)}return"0"!==(appSettings.get("displaymirror")||"")},PlaybackManager.prototype.nextChapter=function(player){player=player||this._currentPlayer;var item=this.currentItem(player),ticks=this.getCurrentTicks(player),nextChapter=(item.Chapters||[]).filter(function(i){return i.StartPositionTicks>ticks})[0];nextChapter?this.seek(nextChapter.StartPositionTicks,player):this.nextTrack(player)},PlaybackManager.prototype.previousChapter=function(player){player=player||this._currentPlayer;var item=this.currentItem(player),ticks=this.getCurrentTicks(player);ticks-=1e8,0===this.getCurrentPlaylistIndex(player)&&(ticks=Math.max(ticks,0));var previousChapters=(item.Chapters||[]).filter(function(i){return i.StartPositionTicks<=ticks; +});previousChapters.length?this.seek(previousChapters[previousChapters.length-1].StartPositionTicks,player):this.previousTrack(player)},PlaybackManager.prototype.fastForward=function(player){if(player=player||this._currentPlayer,null!=player.fastForward)return void player.fastForward(userSettings.skipForwardLength());var offsetTicks=1e4*userSettings.skipForwardLength();this.seekRelative(offsetTicks,player)},PlaybackManager.prototype.rewind=function(player){if(player=player||this._currentPlayer,null!=player.rewind)return void player.rewind(userSettings.skipBackLength());var offsetTicks=0-1e4*userSettings.skipBackLength();this.seekRelative(offsetTicks,player)},PlaybackManager.prototype.seekPercent=function(percent,player){player=player||this._currentPlayer;var ticks=this.duration(player)||0;percent/=100,ticks*=percent,this.seek(parseInt(ticks),player)},PlaybackManager.prototype.playTrailers=function(item){var apiClient=connectionManager.getApiClient(item.ServerId),instance=this;if(item.LocalTrailerCount)return apiClient.getLocalTrailers(apiClient.getCurrentUserId(),item.Id).then(function(result){return instance.play({items:result})});var remoteTrailers=item.RemoteTrailers||[];return remoteTrailers.length?this.play({items:remoteTrailers.map(function(t){return{Name:t.Name||item.Name+" Trailer",Url:t.Url,MediaType:"Video",Type:"Trailer",ServerId:apiClient.serverId()}})}):Promise.reject()},PlaybackManager.prototype.getSubtitleUrl=function(textStream,serverId){var apiClient=connectionManager.getApiClient(serverId),textStreamUrl=textStream.IsExternalUrl?textStream.DeliveryUrl:apiClient.getUrl(textStream.DeliveryUrl);return textStreamUrl},PlaybackManager.prototype.stop=function(player){return player=player||this._currentPlayer,player?(enableLocalPlaylistManagement(player)&&(this._playNextAfterEnded=!1),player.stop(!0,!0)):Promise.resolve()},PlaybackManager.prototype.getBufferedRanges=function(player){return player=player||this._currentPlayer,player&&player.getBufferedRanges?player.getBufferedRanges():[]},PlaybackManager.prototype.playPause=function(player){if(player=player||this._currentPlayer)return player.playPause?player.playPause():player.paused()?this.unpause(player):this.pause(player)},PlaybackManager.prototype.paused=function(player){if(player=player||this._currentPlayer)return player.paused()},PlaybackManager.prototype.pause=function(player){player=player||this._currentPlayer,player&&player.pause()},PlaybackManager.prototype.unpause=function(player){player=player||this._currentPlayer,player&&player.unpause()},PlaybackManager.prototype.instantMix=function(item,player){if(player=player||this._currentPlayer,player&&player.instantMix)return player.instantMix(item);var apiClient=connectionManager.getApiClient(item.ServerId),options={};options.UserId=apiClient.getCurrentUserId(),options.Fields="MediaSources",options.Limit=200;var instance=this;apiClient.getInstantMixFromItem(item.Id,options).then(function(result){instance.play({items:result.Items})})},PlaybackManager.prototype.shuffle=function(shuffleItem,player,queryOptions){if(player=player||this._currentPlayer,player&&player.shuffle)return player.shuffle(shuffleItem);var apiClient=connectionManager.getApiClient(shuffleItem.ServerId),instance=this;apiClient.getItem(apiClient.getCurrentUserId(),shuffleItem.Id).then(function(item){var query={Fields:"MediaSources,Chapters",Limit:200,Recursive:!0,SortBy:"Random"};if("MusicArtist"===item.Type)query.MediaTypes="Audio",query.ArtistIds=item.Id;else if("MusicGenre"===item.Type)query.MediaTypes="Audio",query.Genres=item.Name;else{if(!item.IsFolder)return;query.ParentId=item.Id}queryOptions&&(query=mergePlaybackQueries(query,queryOptions)),getItemsForPlayback(item.ServerId,query).then(function(result){instance.play({items:result.Items})})})},PlaybackManager.prototype.audioTracks=function(player){if(player=player||this._currentPlayer,player.audioTracks){var result=player.audioTracks();if(result)return result}var mediaSource=this.currentMediaSource(player),mediaStreams=(mediaSource||{}).MediaStreams||[];return mediaStreams.filter(function(s){return"Audio"===s.Type})},PlaybackManager.prototype.subtitleTracks=function(player){if(player=player||this._currentPlayer,player.subtitleTracks){var result=player.subtitleTracks();if(result)return result}var mediaSource=this.currentMediaSource(player),mediaStreams=(mediaSource||{}).MediaStreams||[];return mediaStreams.filter(function(s){return"Subtitle"===s.Type})},PlaybackManager.prototype.getSupportedCommands=function(player){if(player=player||this._currentPlayer||{isLocalPlayer:!0},player.isLocalPlayer){var list=["GoHome","GoToSettings","VolumeUp","VolumeDown","Mute","Unmute","ToggleMute","SetVolume","SetAudioStreamIndex","SetSubtitleStreamIndex","SetMaxStreamingBitrate","DisplayContent","GoToSearch","DisplayMessage","SetRepeatMode","PlayMediaSource"];return apphost.supports("fullscreenchange")&&list.push("ToggleFullscreen"),player.supports&&(player.supports("PictureInPicture")&&list.push("PictureInPicture"),player.supports("SetBrightness")&&list.push("SetBrightness"),player.supports("SetAspectRatio")&&list.push("SetAspectRatio")),list}var info=this.getPlayerInfo();return info?info.supportedCommands:[]},PlaybackManager.prototype.setRepeatMode=function(value,player){return player=player||this._currentPlayer,player&&!enableLocalPlaylistManagement(player)?player.setRepeatMode(value):(this._playQueueManager.setRepeatMode(value),void events.trigger(player,"repeatmodechange"))},PlaybackManager.prototype.getRepeatMode=function(player){return player=player||this._currentPlayer,player&&!enableLocalPlaylistManagement(player)?player.getRepeatMode():this._playQueueManager.getRepeatMode()},PlaybackManager.prototype.trySetActiveDeviceName=function(name){name=normalizeName(name);var instance=this;instance.getTargets().then(function(result){var target=result.filter(function(p){return normalizeName(p.name)===name})[0];target&&instance.trySetActivePlayer(target.playerName,target)})},PlaybackManager.prototype.displayContent=function(options,player){player=player||this._currentPlayer,player&&player.displayContent&&player.displayContent(options)},PlaybackManager.prototype.beginPlayerUpdates=function(player){player.beginPlayerUpdates&&player.beginPlayerUpdates()},PlaybackManager.prototype.endPlayerUpdates=function(player){player.endPlayerUpdates&&player.endPlayerUpdates()},PlaybackManager.prototype.setDefaultPlayerActive=function(){this.setActivePlayer("localplayer")},PlaybackManager.prototype.removeActivePlayer=function(name){var playerInfo=this.getPlayerInfo();playerInfo&&playerInfo.name===name&&this.setDefaultPlayerActive()},PlaybackManager.prototype.removeActiveTarget=function(id){var playerInfo=this.getPlayerInfo();playerInfo&&playerInfo.id===id&&this.setDefaultPlayerActive()},PlaybackManager.prototype.sendCommand=function(cmd,player){switch(console.log("MediaController received command: "+cmd.Name),cmd.Name){case"SetRepeatMode":this.setRepeatMode(cmd.Arguments.RepeatMode,player);break;case"VolumeUp":this.volumeUp(player);break;case"VolumeDown":this.volumeDown(player);break;case"Mute":this.setMute(!0,player);break;case"Unmute":this.setMute(!1,player);break;case"ToggleMute":this.toggleMute(player);break;case"SetVolume":this.setVolume(cmd.Arguments.Volume,player);break;case"SetAspectRatio":this.setAspectRatio(cmd.Arguments.AspectRatio,player);break;case"SetBrightness":this.setBrightness(cmd.Arguments.Brightness,player);break;case"SetAudioStreamIndex":this.setAudioStreamIndex(parseInt(cmd.Arguments.Index),player);break;case"SetSubtitleStreamIndex":this.setSubtitleStreamIndex(parseInt(cmd.Arguments.Index),player);break;case"SetMaxStreamingBitrate":break;case"ToggleFullscreen":this.toggleFullscreen(player);break;default:player.sendCommand&&player.sendCommand(cmd)}},new PlaybackManager}); \ 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 d88a354edf..5d7abffbcd 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;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 +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("scrollY"):(nativeScrollElement.classList.add("scrollY"),nativeScrollElement.classList.add("hiddenScrollY"),layoutManager.tv&&o.allowNativeSmoothScroll!==!1&&nativeScrollElement.classList.add("smoothScrollY")),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 78eda7dad3..d1ef929036 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/scrollstyles.css +++ b/dashboard-ui/bower_components/emby-webcomponents/scrollstyles.css @@ -1 +1 @@ -.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 +.smoothScrollX,.smoothScrollY{scroll-behavior:smooth}.scrollX{overflow-x:auto;-webkit-overflow-scrolling:touch;overflow-y:hidden;white-space:nowrap}.hiddenScrollX,.layout-tv .scrollX{-ms-overflow-style:none}.hiddenScrollX-forced{overflow:-moz-scrollbars-none}.scrollY,.smoothScrollY{overflow-y:auto;-webkit-overflow-scrolling:touch;overflow-x:hidden}.hiddenScrollX::-webkit-scrollbar,.layout-tv .scrollX::-webkit-scrollbar{height:0!important;display:none}.hiddenScrollY,.layout-tv .smoothScrollY{-ms-overflow-style:none}.hiddenScrollY-forced{overflow:-moz-scrollbars-none}.hiddenScrollY::-webkit-scrollbar,.layout-tv .scrollY::-webkit-scrollbar,.layout-tv .smoothScrollY::-webkit-scrollbar{width:0!important;display:none} \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ar.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ar.json index f3731b6b96..96dde560af 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ar.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ar.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/be-by.json b/dashboard-ui/bower_components/emby-webcomponents/strings/be-by.json index 2dbf6c6caa..cce26ccdcc 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/be-by.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/be-by.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/bg-bg.json b/dashboard-ui/bower_components/emby-webcomponents/strings/bg-bg.json index fac0701904..4be63166ba 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/bg-bg.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/bg-bg.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json index 4115f2e560..62b2492937 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "MessageUnlockAppWithPurchaseOrSupporter": "Activa aquesta funcionalitat amb un \u00fanic pagament, o amb una subscripci\u00f3 activa d'Emby Premiere.", "MessageUnlockAppWithSupporter": "Activa aquesta funcionalitat amb una subscripci\u00f3 activa d'Emby Premiere.", "MessageToValidateSupporter": "Si tens una subscripci\u00f3 activa d'Emby Premiere assegura't que l'has configurat al teu tauler de control de l'Emby Server, on pots accedir clicant a l'opci\u00f3 d'Emby Premiere al men\u00fa principal.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json b/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json index f5e2b8357f..68769642ac 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "MessageUnlockAppWithPurchaseOrSupporter": "Odemknout tuto funkci pomoc\u00ed jednor\u00e1zov\u00e9 platby, nebo pomoc\u00ed aktivace p\u0159edplatn\u00e9ho Emby Premiere.", "MessageUnlockAppWithSupporter": "Odemknout tuto funkci pomoc\u00ed aktivn\u00edho p\u0159edplatn\u00e9ho Emby Premiere.", "MessageToValidateSupporter": "Pokud m\u00e1te aktivn\u00ed p\u0159edplatn\u00e9 Emby Premiere, ujist\u011bte se, \u017ee m\u00e1te nastaven Emby Premiere v panelu Nastaven\u00ed pod N\u00e1pov\u011bda -> Emby Premiere.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/da.json b/dashboard-ui/bower_components/emby-webcomponents/strings/da.json index b145d26947..cc352bb8c8 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/da.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/da.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/de.json b/dashboard-ui/bower_components/emby-webcomponents/strings/de.json index e4bc0ef7e1..378b1562b0 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/de.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/de.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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).", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/el.json b/dashboard-ui/bower_components/emby-webcomponents/strings/el.json index a68fc10ff7..bf5892a442 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/el.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/el.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", 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 f7b8b219f0..709d4eed85 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/en-gb.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/en-gb.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", 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 08fdbc43aa..b974866f5b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/en-us.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/en-us.json @@ -620,5 +620,7 @@ "Off": "Off", "ShowTitle": "Show title", "ShowYear": "Show year", - "HeaderPosterOptions": "Poster Options" + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed" } \ 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 c9ea0b63da..4e65b84eca 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es-ar.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es-ar.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", 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 680ecc6719..7ebed62d6d 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es-mx.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es-mx.json @@ -1,5 +1,9 @@ { - "ShowTitle": "Show title", + "ShowTitle": "Mostrar titulo", + "ShowYear": "Mostrar a\u00f1o", + "HeaderPosterOptions": "Opciones de Poster", + "Filters": "Filtros", + "Unplayed": "No reproducido", "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.", @@ -39,7 +43,7 @@ "Days": "D\u00edas", "RecordSeries": "Grabar Series", "HeaderCinemaMode": "Modo Cine", - "HeaderCloudSync": "Sinc. en la Nube", + "HeaderCloudSync": "Sincronizaci\u00f3n en la Nube", "Downloads": "Descargas", "HeaderMyDownloads": "Mis Descargas", "HeaderOfflineDownloads": "Medios sin conexion", @@ -140,7 +144,7 @@ "Identify": "Identificar", "EditImages": "Editar im\u00e1genes", "EditInfo": "Editar informaci\u00f3n", - "Sync": "Sinc.", + "Sync": "Sincronizar", "InstantMix": "Mix instant\u00e1neo", "ViewAlbum": "Ver album", "ViewArtist": "Ver artista", @@ -253,7 +257,7 @@ "GuestStar": "Estrella invitada", "Producer": "Productor", "Writer": "Escritor", - "MessageNoSyncJobsFound": "No se han encontrado descargas. Cree descaegas empleando los botones de Sinc. en la app.", + "MessageNoSyncJobsFound": "No se han encontrado descargas. Cree descargas empleando los botones de Sincronizar en la app.", "MessageNoDownloadsFound": "No hay elementos sin conexi\u00f3n. Descargue sus medios para usarlos sin conexion haciendo clic en Descargar trav\u00e9s de la app.", "InstallingPackage": "Instalando {0}", "PackageInstallCompleted": "{0} instalaci\u00f3n completada.", @@ -289,7 +293,7 @@ "HeaderDeleteItems": "Borrar items", "ConfirmDeleteItems": "Al borrar estos items ser\u00e1n eliminados tanto del sistema de archivos como de la biblioteca de medios. \u00bfEsta seguro que desea continuar?", "PleaseRestartServerName": "Por favor reinicie el Servidor Emby - {0}.", - "LabelSyncJobName": "Nombre del trabajo de sinc:", + "LabelSyncJobName": "Nombre del trabajo de sincronizaci\u00f3n:", "SyncJobCreated": "Trabajo de sincronizaci\u00f3n creado", "LabelQuality": "Calidad:", "LabelSyncNoTargetsHelp": "Parece que actualmente no cuentas con ninguna app que soporte descargas sin conexi\u00f3n.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/es.json b/dashboard-ui/bower_components/emby-webcomponents/strings/es.json index 5ee8df122c..54d964732d 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json b/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json index edce814694..7b1bb705b4 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", 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 aa1d12be60..d31586307b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/fr-ca.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/fr-ca.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json b/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json index 424d100afe..c4208aa739 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json @@ -1,5 +1,9 @@ { "ShowTitle": "Montrer le titre", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json b/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json index a46ebe3168..cb86bd7bd5 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/he.json b/dashboard-ui/bower_components/emby-webcomponents/strings/he.json index e435786e1a..e9106fcc15 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/he.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/he.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json b/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json index 785a5196b8..34f6b4fd52 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json b/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json index 441a42ccf9..22b9154a28 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/id.json b/dashboard-ui/bower_components/emby-webcomponents/strings/id.json index f2c6ff5fa3..e3166568d7 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/id.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/id.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/it.json b/dashboard-ui/bower_components/emby-webcomponents/strings/it.json index 84a9157834..41dcc1ba47 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/it.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/it.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json index eed56fc420..ebf6703d0c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json index 334d9a7095..a1c9bc7faf 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", 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 6bbd97a725..894a504ed8 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/lt-lt.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/lt-lt.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json index 977d41a1bb..9937139e74 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json b/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json index 77807348a8..d413015b45 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json b/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json index 4b10fa30e7..68c127cb23 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json b/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json index 4f6c7fd5a3..ad675c9407 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json @@ -1,5 +1,9 @@ { - "ShowTitle": "Show title", + "ShowTitle": "Pokazuj tytu\u0142", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", 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 215ffaf3d1..6ddfd994fd 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-br.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-br.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", 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 9da89ea3b1..300ef91c28 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-pt.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-pt.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json index f644248250..500370affe 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json index d3d7343257..5e6eec0a13 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json index 7e59bc386a..1ad74b3243 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", 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 e86da3123b..614cc29030 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/sl-si.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/sl-si.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json b/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json index c4d9c9c809..7a1a0e1a35 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json b/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json index 442318cd08..a661920e4b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json index 448510aed9..1e12f83766 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json b/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json index 88279d0dba..291ed29be1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", 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 8eb6141457..fd611ea453 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-cn.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-cn.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", 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 d726435767..ddb01d9a37 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-hk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-hk.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", 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 b4901ff54c..bf8b36ac2e 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-tw.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-tw.json @@ -1,5 +1,9 @@ { "ShowTitle": "Show title", + "ShowYear": "Show year", + "HeaderPosterOptions": "Poster Options", + "Filters": "Filters", + "Unplayed": "Unplayed", "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.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/tabbedview/itemstab.js b/dashboard-ui/bower_components/emby-webcomponents/tabbedview/itemstab.js index 9ed21044b3..2356b64fb9 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/tabbedview/itemstab.js +++ b/dashboard-ui/bower_components/emby-webcomponents/tabbedview/itemstab.js @@ -1 +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(index!'),btnFilter.classList.add("btnFilterWithBubble"),bubble=btnFilter.querySelector(".filterButtonBubble")}hasFilters?bubble.classList.remove("hide"):bubble.classList.add("hide")}},ItemsTab.prototype.onPause=function(){var alphaNumericShortcuts=this.alphaNumericShortcuts;alphaNumericShortcuts&&(alphaNumericShortcuts.destroy(),this.alphaNumericShortcuts=null)},ItemsTab.prototype.destroy=function(){this.view=null,this.itemsContainer=null,this.params=null,this.apiClient=null,this.scroller=null,this.btnFilter=null,this.alphaPicker&&(this.alphaPicker.destroy(),this.alphaPicker=null)},ItemsTab}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/usersettings/usersettingsbuilder.js b/dashboard-ui/bower_components/emby-webcomponents/usersettings/usersettingsbuilder.js index 3d5e41b203..450df5325f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/usersettings/usersettingsbuilder.js +++ b/dashboard-ui/bower_components/emby-webcomponents/usersettings/usersettingsbuilder.js @@ -1 +1 @@ -define(["appSettings","events"],function(appsettings,events){"use strict";function onSaveTimeout(){var self=this;self.saveTimeout=null,self.currentApiClient.updateDisplayPreferences("usersettings",self.displayPrefs,self.currentUserId,"emby")}function saveServerPreferences(instance){instance.saveTimeout&&clearTimeout(instance.saveTimeout),instance.saveTimeout=setTimeout(onSaveTimeout.bind(instance),50)}function UserSettings(){}return UserSettings.prototype.setUserInfo=function(userId,apiClient){if(this.saveTimeout&&clearTimeout(this.saveTimeout),this.currentUserId=userId,this.currentApiClient=apiClient,!userId)return this.displayPrefs=null,Promise.resolve();var self=this;return apiClient.getDisplayPreferences("usersettings",userId,"emby").then(function(result){result.CustomPrefs=result.CustomPrefs||{},self.displayPrefs=result})},UserSettings.prototype.getData=function(){return this.displayPrefs},UserSettings.prototype.importFrom=function(instance){this.displayPrefs=instance.getData()},UserSettings.prototype.set=function(name,value,enableOnServer){var userId=this.currentUserId;if(!userId)throw new Error("userId cannot be null");var currentValue=this.get(name,enableOnServer),result=appsettings.set(name,value,userId);return enableOnServer!==!1&&this.displayPrefs&&(this.displayPrefs.CustomPrefs[name]=null==value?value:value.toString(),saveServerPreferences(this)),currentValue!==value&&events.trigger(this,"change",[name]),result},UserSettings.prototype.get=function(name,enableOnServer){var userId=this.currentUserId;return userId?enableOnServer!==!1&&this.displayPrefs?this.displayPrefs.CustomPrefs[name]:appsettings.get(name,userId):null},UserSettings.prototype.serverConfig=function(config){var apiClient=this.currentApiClient;return config?apiClient.updateUserConfiguration(this.currentUserId,config):apiClient.getUser(this.currentUserId).then(function(user){return user.Configuration})},UserSettings.prototype.enableCinemaMode=function(val){return null!=val?this.set("enableCinemaMode",val.toString(),!1):(val=this.get("enableCinemaMode",!1),!val||"false"!==val)},UserSettings.prototype.enableNextVideoInfoOverlay=function(val){return null!=val?this.set("enableNextVideoInfoOverlay",val.toString()):(val=this.get("enableNextVideoInfoOverlay"),"false"!==val)},UserSettings.prototype.enableThemeSongs=function(val){return null!=val?this.set("enableThemeSongs",val.toString(),!1):(val=this.get("enableThemeSongs",!1),"false"!==val)},UserSettings.prototype.enableThemeVideos=function(val){return null!=val?this.set("enableThemeVideos",val.toString(),!1):(val=this.get("enableThemeVideos",!1),val?"false"!==val:UserSettings.defaults.enableThemeVideos)},UserSettings.prototype.enableBackdrops=function(val){return null!=val?this.set("enableBackdrops",val.toString(),!1):(val=this.get("enableBackdrops",!1),val?"false"!==val:UserSettings.defaults.enableBackdrops)},UserSettings.prototype.language=function(val){return null!=val?this.set("language",val.toString(),!1):this.get("language",!1)},UserSettings.prototype.dateTimeLocale=function(val){return null!=val?this.set("datetimelocale",val.toString(),!1):this.get("datetimelocale",!1)},UserSettings.prototype.skipBackLength=function(val){return null!=val?this.set("skipBackLength",val.toString()):parseInt(this.get("skipBackLength")||"10000")},UserSettings.prototype.skipForwardLength=function(val){return null!=val?this.set("skipForwardLength",val.toString()):parseInt(this.get("skipForwardLength")||"30000")},UserSettings.prototype.dashboardTheme=function(val){return null!=val?this.set("dashboardTheme",val):this.get("dashboardTheme")},UserSettings.prototype.skin=function(val){return null!=val?this.set("skin",val,!1):this.get("skin",!1)||UserSettings.defaults.skin},UserSettings.prototype.theme=function(val){return null!=val?this.set("appTheme",val,!1):this.get("appTheme",!1)||UserSettings.defaults.theme},UserSettings.prototype.enableSeasonalThemes=function(val){return null!=val?this.set("enableSeasonalThemes",val,!1):"false"!==this.get("enableSeasonalThemes",!1)},UserSettings.prototype.screensaver=function(val){return null!=val?this.set("screensaver",val,!1):this.get("screensaver",!1)||UserSettings.defaults.screensaver},UserSettings.prototype.soundEffects=function(val){return null!=val?this.set("soundeffects",val,!1):this.get("soundeffects",!1)||UserSettings.defaults.soundEffects},UserSettings.defaults={theme:null,enableThemeVideos:!0},UserSettings.prototype.loadQuerySettings=function(key,query){var values=this.get(key);return values?(values=JSON.parse(values),Object.assign(query,values)):query},UserSettings.prototype.saveQuerySettings=function(key,query){var values={};return query.SortBy&&(values.SortBy=query.SortBy),query.SortOrder&&(values.SortOrder=query.SortOrder),this.set(key,JSON.stringify(values))},UserSettings.prototype.getSubtitleAppearanceSettings=function(key){return key=key||"localplayersubtitleappearance3",JSON.parse(this.get(key,!1)||"{}")},UserSettings.prototype.setSubtitleAppearanceSettings=function(value,key){return key=key||"localplayersubtitleappearance3",this.set(key,JSON.stringify(value),!1)},UserSettings}); \ No newline at end of file +define(["appSettings","events"],function(appsettings,events){"use strict";function onSaveTimeout(){var self=this;self.saveTimeout=null,self.currentApiClient.updateDisplayPreferences("usersettings",self.displayPrefs,self.currentUserId,"emby")}function saveServerPreferences(instance){instance.saveTimeout&&clearTimeout(instance.saveTimeout),instance.saveTimeout=setTimeout(onSaveTimeout.bind(instance),50)}function UserSettings(){}return UserSettings.prototype.setUserInfo=function(userId,apiClient){if(this.saveTimeout&&clearTimeout(this.saveTimeout),this.currentUserId=userId,this.currentApiClient=apiClient,!userId)return this.displayPrefs=null,Promise.resolve();var self=this;return apiClient.getDisplayPreferences("usersettings",userId,"emby").then(function(result){result.CustomPrefs=result.CustomPrefs||{},self.displayPrefs=result})},UserSettings.prototype.getData=function(){return this.displayPrefs},UserSettings.prototype.importFrom=function(instance){this.displayPrefs=instance.getData()},UserSettings.prototype.set=function(name,value,enableOnServer){var userId=this.currentUserId;if(!userId)throw new Error("userId cannot be null");var currentValue=this.get(name,enableOnServer),result=appsettings.set(name,value,userId);return enableOnServer!==!1&&this.displayPrefs&&(this.displayPrefs.CustomPrefs[name]=null==value?value:value.toString(),saveServerPreferences(this)),currentValue!==value&&events.trigger(this,"change",[name]),result},UserSettings.prototype.get=function(name,enableOnServer){var userId=this.currentUserId;return userId?enableOnServer!==!1&&this.displayPrefs?this.displayPrefs.CustomPrefs[name]:appsettings.get(name,userId):null},UserSettings.prototype.serverConfig=function(config){var apiClient=this.currentApiClient;return config?apiClient.updateUserConfiguration(this.currentUserId,config):apiClient.getUser(this.currentUserId).then(function(user){return user.Configuration})},UserSettings.prototype.enableCinemaMode=function(val){return null!=val?this.set("enableCinemaMode",val.toString(),!1):(val=this.get("enableCinemaMode",!1),!val||"false"!==val)},UserSettings.prototype.enableNextVideoInfoOverlay=function(val){return null!=val?this.set("enableNextVideoInfoOverlay",val.toString()):(val=this.get("enableNextVideoInfoOverlay"),"false"!==val)},UserSettings.prototype.enableThemeSongs=function(val){return null!=val?this.set("enableThemeSongs",val.toString(),!1):(val=this.get("enableThemeSongs",!1),"false"!==val)},UserSettings.prototype.enableThemeVideos=function(val){return null!=val?this.set("enableThemeVideos",val.toString(),!1):(val=this.get("enableThemeVideos",!1),val?"false"!==val:UserSettings.defaults.enableThemeVideos)},UserSettings.prototype.enableBackdrops=function(val){return null!=val?this.set("enableBackdrops",val.toString(),!1):(val=this.get("enableBackdrops",!1),val?"false"!==val:UserSettings.defaults.enableBackdrops)},UserSettings.prototype.language=function(val){return null!=val?this.set("language",val.toString(),!1):this.get("language",!1)},UserSettings.prototype.dateTimeLocale=function(val){return null!=val?this.set("datetimelocale",val.toString(),!1):this.get("datetimelocale",!1)},UserSettings.prototype.skipBackLength=function(val){return null!=val?this.set("skipBackLength",val.toString()):parseInt(this.get("skipBackLength")||"10000")},UserSettings.prototype.skipForwardLength=function(val){return null!=val?this.set("skipForwardLength",val.toString()):parseInt(this.get("skipForwardLength")||"30000")},UserSettings.prototype.dashboardTheme=function(val){return null!=val?this.set("dashboardTheme",val):this.get("dashboardTheme")},UserSettings.prototype.skin=function(val){return null!=val?this.set("skin",val,!1):this.get("skin",!1)||UserSettings.defaults.skin},UserSettings.prototype.theme=function(val){return null!=val?this.set("appTheme",val,!1):this.get("appTheme",!1)||UserSettings.defaults.theme},UserSettings.prototype.enableSeasonalThemes=function(val){return null!=val?this.set("enableSeasonalThemes",val,!1):"false"!==this.get("enableSeasonalThemes",!1)},UserSettings.prototype.screensaver=function(val){return null!=val?this.set("screensaver",val,!1):this.get("screensaver",!1)||UserSettings.defaults.screensaver},UserSettings.prototype.soundEffects=function(val){return null!=val?this.set("soundeffects",val,!1):this.get("soundeffects",!1)||UserSettings.defaults.soundEffects},UserSettings.defaults={theme:null,enableThemeVideos:!0},UserSettings.prototype.loadQuerySettings=function(key,query){var values=this.get(key);return values?(values=JSON.parse(values),Object.assign(query,values)):query},UserSettings.prototype.saveQuerySettings=function(key,query){var values={};return query.SortBy&&(values.SortBy=query.SortBy),query.SortOrder&&(values.SortOrder=query.SortOrder),this.set(key,JSON.stringify(values))},UserSettings.prototype.getSubtitleAppearanceSettings=function(key){return key=key||"localplayersubtitleappearance3",JSON.parse(this.get(key,!1)||"{}")},UserSettings.prototype.setSubtitleAppearanceSettings=function(value,key){return key=key||"localplayersubtitleappearance3",this.set(key,JSON.stringify(value),!1)},UserSettings.prototype.setFilter=function(key,value){return this.set(key,value,!0)},UserSettings.prototype.getFilter=function(key){return this.get(key,!0)},UserSettings}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/vibrant/dist/vibrant.js b/dashboard-ui/bower_components/vibrant/dist/vibrant.js deleted file mode 100644 index ee421a4f01..0000000000 --- a/dashboard-ui/bower_components/vibrant/dist/vibrant.js +++ /dev/null @@ -1 +0,0 @@ -define([],function(){"use strict";var CanvasImage,Swatch,Vibrant,pv={map:function(array,f){var o={};return f?array.map(function(d,i){return o.index=i,f.call(o,d)}):array.slice()},naturalOrder:function(a,b){return ab?1:0},sum:function(array,f){var o={};return array.reduce(f?function(p,d,i){return o.index=i,p+f.call(o,d)}:function(p,d){return p+d},0)},max:function(array,f){return Math.max.apply(null,f?pv.map(array,f):array)}},MMCQ=function(){function getColorIndex(r,g,b){return(r<<2*sigbits)+(g<>rshift,gval=pixel[1]>>rshift,bval=pixel[2]>>rshift,index=getColorIndex(rval,gval,bval),histo[index]=(histo[index]||0)+1}),histo}function vboxFromPixels(pixels,histo){var rval,gval,bval,rmin=1e6,rmax=0,gmin=1e6,gmax=0,bmin=1e6,bmax=0;return pixels.forEach(function(pixel){rval=pixel[0]>>rshift,gval=pixel[1]>>rshift,bval=pixel[2]>>rshift,rvalrmax&&(rmax=rval),gvalgmax&&(gmax=gval),bvalbmax&&(bmax=bval)}),new VBox(rmin,rmax,gmin,gmax,bmin,bmax,histo)}function medianCutApply(histo,vbox){function doCut(color){var left,right,vbox1,vbox2,d2,dim1=color+"1",dim2=color+"2",count2=0;for(i=vbox[dim1];i<=vbox[dim2];i++)if(partialsum[i]>total/2){for(vbox1=vbox.copy(),vbox2=vbox.copy(),left=i-vbox[dim1],right=vbox[dim2]-i,d2=left<=right?Math.min(vbox[dim2]-1,~~(i+right/2)):Math.max(vbox[dim1],~~(i-1-left/2));!partialsum[d2];)d2++;for(count2=lookaheadsum[d2];!count2&&partialsum[d2-1];)count2=lookaheadsum[--d2];return vbox1[dim2]=d2,vbox2[dim1]=vbox1[dim2]+1,[vbox1,vbox2]}}var vBoxCount=vbox.count();if(vBoxCount){var rw=vbox.r2-vbox.r1+1,gw=vbox.g2-vbox.g1+1,bw=vbox.b2-vbox.b1+1,maxw=pv.max([rw,gw,bw]);if(1===vBoxCount)return[vbox.copy()];var i,j,k,sum,index,total=0,partialsum=[],lookaheadsum=[];if(maxw===rw)for(i=vbox.r1;i<=vbox.r2;i++){for(sum=0,j=vbox.g1;j<=vbox.g2;j++)for(k=vbox.b1;k<=vbox.b2;k++)index=getColorIndex(i,j,k),sum+=histo[index]||0;total+=sum,partialsum[i]=total}else if(maxw===gw)for(i=vbox.g1;i<=vbox.g2;i++){for(sum=0,j=vbox.r1;j<=vbox.r2;j++)for(k=vbox.b1;k<=vbox.b2;k++)index=getColorIndex(j,i,k),sum+=histo[index]||0;total+=sum,partialsum[i]=total}else for(i=vbox.b1;i<=vbox.b2;i++){for(sum=0,j=vbox.r1;j<=vbox.r2;j++)for(k=vbox.g1;k<=vbox.g2;k++)index=getColorIndex(j,k,i),sum+=histo[index]||0;total+=sum,partialsum[i]=total}return partialsum.forEach(function(d,i){lookaheadsum[i]=total-d}),doCut(maxw===rw?"r":maxw===gw?"g":"b")}}function quantize(pixels,maxcolors){function iter(lh,target){for(var vbox,ncolors=1,niters=0;niters=target)return;if(niters++>maxIterations)return}else lh.push(vbox),niters++}if(!pixels.length||maxcolors<2||maxcolors>256)return!1;var histo=getHisto(pixels),nColors=0;histo.forEach(function(){nColors++});var vbox=vboxFromPixels(pixels,histo),pq=new PQueue(function(a,b){return pv.naturalOrder(a.count(),b.count())});pq.push(vbox),iter(pq,fractByPopulations*maxcolors);for(var pq2=new PQueue(function(a,b){return pv.naturalOrder(a.count()*a.volume(),b.count()*b.volume())});pq.size();)pq2.push(pq.pop());iter(pq2,maxcolors-pq2.size());for(var cmap=new CMap;pq2.size();)cmap.push(pq2.pop());return cmap}var sigbits=5,rshift=8-sigbits,maxIterations=1e3,fractByPopulations=.75;return VBox.prototype={volume:function(force){var vbox=this;return vbox._volume&&!force||(vbox._volume=(vbox.r2-vbox.r1+1)*(vbox.g2-vbox.g1+1)*(vbox.b2-vbox.b1+1)),vbox._volume},count:function(force){var vbox=this,histo=vbox.histo;if(!vbox._count_set||force){var i,j,k,index,npix=0;for(i=vbox.r1;i<=vbox.r2;i++)for(j=vbox.g1;j<=vbox.g2;j++)for(k=vbox.b1;k<=vbox.b2;k++)index=getColorIndex(i,j,k),npix+=histo[index]||0;vbox._count=npix,vbox._count_set=!0}return vbox._count},copy:function(){var vbox=this;return new VBox(vbox.r1,vbox.r2,vbox.g1,vbox.g2,vbox.b1,vbox.b2,vbox.histo)},avg:function(force){var vbox=this,histo=vbox.histo;if(!vbox._avg||force){var hval,i,j,k,histoindex,ntot=0,mult=1<<8-sigbits,rsum=0,gsum=0,bsum=0;for(i=vbox.r1;i<=vbox.r2;i++)for(j=vbox.g1;j<=vbox.g2;j++)for(k=vbox.b1;k<=vbox.b2;k++)histoindex=getColorIndex(i,j,k),hval=histo[histoindex]||0,ntot+=hval,rsum+=hval*(i+.5)*mult,gsum+=hval*(j+.5)*mult,bsum+=hval*(k+.5)*mult;ntot?vbox._avg=[~~(rsum/ntot),~~(gsum/ntot),~~(bsum/ntot)]:vbox._avg=[~~(mult*(vbox.r1+vbox.r2+1)/2),~~(mult*(vbox.g1+vbox.g2+1)/2),~~(mult*(vbox.b1+vbox.b2+1)/2)]}return vbox._avg},contains:function(pixel){var vbox=this,rval=pixel[0]>>rshift;return gval=pixel[1]>>rshift,bval=pixel[2]>>rshift,rval>=vbox.r1&&rval<=vbox.r2&&gval>=vbox.g1&&gval<=vbox.g2&&bval>=vbox.b1&&bval<=vbox.b2}},CMap.prototype={push:function(vbox){this.vboxes.push({vbox:vbox,color:vbox.avg()})},palette:function(){return this.vboxes.map(function(vb){return vb.color})},size:function(){return this.vboxes.size()},map:function(color){for(var vboxes=this.vboxes,i=0;i251&&highest[1]>251&&highest[2]>251&&(vboxes[idx].color=[255,255,255])}},{quantize:quantize}}(),bind=function(fn,me){return function(){return fn.apply(me,arguments)}},slice=[].slice;window.Swatch=Swatch=function(){function Swatch(rgb,population){this.rgb=rgb,this.population=population}return Swatch.prototype.hsl=void 0,Swatch.prototype.rgb=void 0,Swatch.prototype.population=1,Swatch.yiq=0,Swatch.prototype.getHsl=function(){return this.hsl||(this.hsl=Vibrant.rgbToHsl(this.rgb[0],this.rgb[1],this.rgb[2])),this.hsl},Swatch.prototype.getPopulation=function(){return this.population},Swatch.prototype.getRgb=function(){return this.rgb},Swatch.prototype.getHex=function(){return"#"+((1<<24)+(this.rgb[0]<<16)+(this.rgb[1]<<8)+this.rgb[2]).toString(16).slice(1,7)},Swatch.prototype.getTitleTextColor=function(){return this._ensureTextColors(),this.yiq<200?"#fff":"#000"},Swatch.prototype.getBodyTextColor=function(){return this._ensureTextColors(),this.yiq<150?"#fff":"#000"},Swatch.prototype._ensureTextColors=function(){if(!this.yiq)return this.yiq=(299*this.rgb[0]+587*this.rgb[1]+114*this.rgb[2])/1e3,this.yiq},Swatch}(),window.Vibrant=Vibrant=function(){function Vibrant(sourceImage,colorCount,quality){this.swatches=bind(this.swatches,this);var a,allPixels,b,cmap,g,i,image,imageData,offset,pixelCount,pixels,r;"undefined"==typeof colorCount&&(colorCount=16),"undefined"==typeof quality&&(quality=5),image=new CanvasImage(sourceImage);try{for(imageData=image.getImageData(),pixels=imageData.data,pixelCount=image.getPixelCount(),allPixels=[],i=0;i=125&&(r>250&&g>250&&b>250||allPixels.push([r,g,b])),i+=quality;cmap=this.quantize(allPixels,colorCount),this._swatches=(cmap.vboxes||[]).map(function(_this){return function(vbox){return new Swatch(vbox.color,vbox.vbox.count())}}(this)),this.maxPopulation=this.findMaxPopulation,this.generateVarationColors(),this.generateEmptySwatches()}finally{image.removeCanvas()}}return Vibrant.prototype.quantize=MMCQ.quantize,Vibrant.prototype._swatches=[],Vibrant.prototype.TARGET_DARK_LUMA=.26,Vibrant.prototype.MAX_DARK_LUMA=.45,Vibrant.prototype.MIN_LIGHT_LUMA=.55,Vibrant.prototype.TARGET_LIGHT_LUMA=.74,Vibrant.prototype.MIN_NORMAL_LUMA=.3,Vibrant.prototype.TARGET_NORMAL_LUMA=.5,Vibrant.prototype.MAX_NORMAL_LUMA=.7,Vibrant.prototype.TARGET_MUTED_SATURATION=.3,Vibrant.prototype.MAX_MUTED_SATURATION=.4,Vibrant.prototype.TARGET_VIBRANT_SATURATION=1,Vibrant.prototype.MIN_VIBRANT_SATURATION=.35,Vibrant.prototype.WEIGHT_SATURATION=3,Vibrant.prototype.WEIGHT_LUMA=6,Vibrant.prototype.WEIGHT_POPULATION=1,Vibrant.prototype.VibrantSwatch=void 0,Vibrant.prototype.MutedSwatch=void 0,Vibrant.prototype.DarkVibrantSwatch=void 0,Vibrant.prototype.DarkMutedSwatch=void 0,Vibrant.prototype.LightVibrantSwatch=void 0,Vibrant.prototype.LightMutedSwatch=void 0,Vibrant.prototype.HighestPopulation=0,Vibrant.prototype.generateVarationColors=function(){return this.VibrantSwatch=this.findColorVariation(this.TARGET_NORMAL_LUMA,this.MIN_NORMAL_LUMA,this.MAX_NORMAL_LUMA,this.TARGET_VIBRANT_SATURATION,this.MIN_VIBRANT_SATURATION,1),this.LightVibrantSwatch=this.findColorVariation(this.TARGET_LIGHT_LUMA,this.MIN_LIGHT_LUMA,1,this.TARGET_VIBRANT_SATURATION,this.MIN_VIBRANT_SATURATION,1),this.DarkVibrantSwatch=this.findColorVariation(this.TARGET_DARK_LUMA,0,this.MAX_DARK_LUMA,this.TARGET_VIBRANT_SATURATION,this.MIN_VIBRANT_SATURATION,1),this.MutedSwatch=this.findColorVariation(this.TARGET_NORMAL_LUMA,this.MIN_NORMAL_LUMA,this.MAX_NORMAL_LUMA,this.TARGET_MUTED_SATURATION,0,this.MAX_MUTED_SATURATION),this.LightMutedSwatch=this.findColorVariation(this.TARGET_LIGHT_LUMA,this.MIN_LIGHT_LUMA,1,this.TARGET_MUTED_SATURATION,0,this.MAX_MUTED_SATURATION),this.DarkMutedSwatch=this.findColorVariation(this.TARGET_DARK_LUMA,0,this.MAX_DARK_LUMA,this.TARGET_MUTED_SATURATION,0,this.MAX_MUTED_SATURATION),this.DarkMutedSwatch},Vibrant.prototype.generateEmptySwatches=function(){var hsl;if(void 0===this.VibrantSwatch&&void 0!==this.DarkVibrantSwatch&&(hsl=this.DarkVibrantSwatch.getHsl(),hsl[2]=this.TARGET_NORMAL_LUMA,this.VibrantSwatch=new Swatch(Vibrant.hslToRgb(hsl[0],hsl[1],hsl[2]),0)),void 0===this.DarkVibrantSwatch&&void 0!==this.VibrantSwatch)return hsl=this.VibrantSwatch.getHsl(),hsl[2]=this.TARGET_DARK_LUMA,this.DarkVibrantSwatch=new Swatch(Vibrant.hslToRgb(hsl[0],hsl[1],hsl[2]),0),this.DarkVibrantSwatch},Vibrant.prototype.findMaxPopulation=function(){var j,len,population,ref,swatch;for(population=0,ref=this._swatches,j=0,len=ref.length;j=minSaturation&&sat<=maxSaturation&&luma>=minLuma&&luma<=maxLuma&&!this.isAlreadySelected(swatch)&&(value=this.createComparisonValue(sat,targetSaturation,luma,targetLuma,swatch.getPopulation(),this.HighestPopulation),(void 0===max||value>maxValue)&&(max=swatch,maxValue=value));return max},Vibrant.prototype.createComparisonValue=function(saturation,targetSaturation,luma,targetLuma,population,maxPopulation){return this.weightedMean(this.invertDiff(saturation,targetSaturation),this.WEIGHT_SATURATION,this.invertDiff(luma,targetLuma),this.WEIGHT_LUMA,population/maxPopulation,this.WEIGHT_POPULATION)},Vibrant.prototype.invertDiff=function(value,targetValue){return 1-Math.abs(value-targetValue)},Vibrant.prototype.weightedMean=function(){var i,sum,sumWeight,value,values,weight;for(values=1<=arguments.length?slice.call(arguments,0):[],sum=0,sumWeight=0,i=0;i.5?d/(2-max-min):d/(max+min),max){case r:h=(g-b)/d+(g1&&(t-=1),t<1/6?p+6*(q-p)*t:t<.5?q:t<2/3?p+(q-p)*(2/3-t)*6:p},0===s?r=g=b=l:(q=l<.5?l*(1+s):l+s-l*s,p=2*l-q,r=hue2rgb(p,q,h+1/3),g=hue2rgb(p,q,h),b=hue2rgb(p,q,h-1/3)),[255*r,255*g,255*b]},Vibrant}(),window.CanvasImage=CanvasImage=function(){function CanvasImage(image){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d");var originalWidth=image.width,originalHeight=image.height,maxArea=9e4,bitmapArea=originalWidth*originalHeight,scaleRatio=1;bitmapArea>maxArea&&(scaleRatio=maxArea/bitmapArea),this.width=this.canvas.width=originalWidth*scaleRatio,this.height=this.canvas.height=originalHeight*scaleRatio;try{this.context.drawImage(image,0,0,originalWidth,originalHeight,0,0,this.width,this.height)}catch(err){console.log("Error in drawImage: "+err)}}return CanvasImage.prototype.getPixelCount=function(){return this.width*this.height},CanvasImage.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},CanvasImage.prototype.removeCanvas=function(){this.context=null,this.canvas=null},CanvasImage}()}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/vibrant/dist/vibrant.min.js b/dashboard-ui/bower_components/vibrant/dist/vibrant.min.js deleted file mode 100644 index 548269e792..0000000000 --- a/dashboard-ui/bower_components/vibrant/dist/vibrant.min.js +++ /dev/null @@ -1 +0,0 @@ -!function t(r,o,i){function n(a,h){if(!o[a]){if(!r[a]){var u="function"==typeof require&&require;if(!h&&u)return u(a,!0);if(e)return e(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var c=o[a]={exports:{}};r[a][0].call(c.exports,function(t){var o=r[a][1][t];return n(o?o:t)},c,c.exports,t,r,o,i)}return o[a].exports}for(var e="function"==typeof require&&require,a=0;at?-1:t>r?1:0},sum:function(t,r){var o={};return t.reduce(r?function(t,i,n){return o.index=n,t+r.call(o,i)}:function(t,r){return t+r},0)},max:function(t,r){return Math.max.apply(null,r?i.map(t,r):t)}};var n=function(){function t(t,r,o){return(t<<2*s)+(r<>c,n=r[1]>>c,e=r[2]>>c,o=t(i,n,e),h[o]=(h[o]||0)+1}),h}function a(t,r){var i,n,e,a=1e6,h=0,u=1e6,s=0,p=1e6,f=0;return t.forEach(function(t){i=t[0]>>c,n=t[1]>>c,e=t[2]>>c,a>i?a=i:i>h&&(h=i),u>n?u=n:n>s&&(s=n),p>e?p=e:e>f&&(f=e)}),new o(a,h,u,s,p,f,r)}function h(r,o){function n(t){var r,i,n,e,a,h=t+"1",u=t+"2",c=0;for(s=o[h];s<=o[u];s++)if(v[s]>A/2){for(n=o.copy(),e=o.copy(),r=s-o[h],i=o[u]-s,a=i>=r?Math.min(o[u]-1,~~(s+i/2)):Math.max(o[h],~~(s-1-r/2));!v[a];)a++;for(c=T[a];!c&&v[a-1];)c=T[--a];return n[u]=a,e[h]=n[u]+1,[n,e]}}if(o.count()){var e=o.r2-o.r1+1,a=o.g2-o.g1+1,h=o.b2-o.b1+1,u=i.max([e,a,h]);if(1==o.count())return[o.copy()];var s,c,p,f,l,A=0,v=[],T=[];if(u==e)for(s=o.r1;s<=o.r2;s++){for(f=0,c=o.g1;c<=o.g2;c++)for(p=o.b1;p<=o.b2;p++)l=t(s,c,p),f+=r[l]||0;A+=f,v[s]=A}else if(u==a)for(s=o.g1;s<=o.g2;s++){for(f=0,c=o.r1;c<=o.r2;c++)for(p=o.b1;p<=o.b2;p++)l=t(c,s,p),f+=r[l]||0;A+=f,v[s]=A}else for(s=o.b1;s<=o.b2;s++){for(f=0,c=o.r1;c<=o.r2;c++)for(p=o.g1;p<=o.g2;p++)l=t(c,p,s),f+=r[l]||0;A+=f,v[s]=A}return v.forEach(function(t,r){T[r]=A-t}),n(u==e?"r":u==a?"g":"b")}}function u(t,o){function u(t,r){for(var o,i=1,n=0;p>n;)if(o=t.pop(),o.count()){var e=h(s,o),a=e[0],u=e[1];if(!a)return;if(t.push(a),u&&(t.push(u),i++),i>=r)return;if(n++>p)return}else t.push(o),n++}if(!t.length||2>o||o>256)return!1;var s=e(t),c=0;s.forEach(function(){c++});var l=a(t,s),A=new r(function(t,r){return i.naturalOrder(t.count(),r.count())});A.push(l),u(A,f*o);for(var v=new r(function(t,r){return i.naturalOrder(t.count()*t.volume(),r.count()*r.volume())});A.size();)v.push(A.pop());u(v,o-v.size());for(var T=new n;v.size();)T.push(v.pop());return T}var s=5,c=8-s,p=1e3,f=.75;return o.prototype={volume:function(t){var r=this;return(!r._volume||t)&&(r._volume=(r.r2-r.r1+1)*(r.g2-r.g1+1)*(r.b2-r.b1+1)),r._volume},count:function(r){var o=this,i=o.histo;if(!o._count_set||r){var n,e,a,h,u=0;for(n=o.r1;n<=o.r2;n++)for(e=o.g1;e<=o.g2;e++)for(a=o.b1;a<=o.b2;a++)h=t(n,e,a),u+=i[h]||0;o._count=u,o._count_set=!0}return o._count},copy:function(){var t=this;return new o(t.r1,t.r2,t.g1,t.g2,t.b1,t.b2,t.histo)},avg:function(r){var o=this,i=o.histo;if(!o._avg||r){var n,e,a,h,u,c=0,p=1<<8-s,f=0,l=0,A=0;for(e=o.r1;e<=o.r2;e++)for(a=o.g1;a<=o.g2;a++)for(h=o.b1;h<=o.b2;h++)u=t(e,a,h),n=i[u]||0,c+=n,f+=n*(e+.5)*p,l+=n*(a+.5)*p,A+=n*(h+.5)*p;c?o._avg=[~~(f/c),~~(l/c),~~(A/c)]:o._avg=[~~(p*(o.r1+o.r2+1)/2),~~(p*(o.g1+o.g2+1)/2),~~(p*(o.b1+o.b2+1)/2)]}return o._avg},contains:function(t){var r=this,o=t[0]>>c;return gval=t[1]>>c,bval=t[2]>>c,o>=r.r1&&o<=r.r2&&gval>=r.g1&&gval<=r.g2&&bval>=r.b1&&bval<=r.b2}},n.prototype={push:function(t){this.vboxes.push({vbox:t,color:t.avg()})},palette:function(){return this.vboxes.map(function(t){return t.color})},size:function(){return this.vboxes.size()},map:function(t){for(var r=this.vboxes,o=0;oo||void 0===r)&&(r=o,i=n.peek(e).color);return i},forcebw:function(){var t=this.vboxes;t.sort(function(t,r){return i.naturalOrder(i.sum(t.color),i.sum(r.color))});var r=t[0].color;r[0]<5&&r[1]<5&&r[2]<5&&(t[0].color=[0,0,0]);var o=t.length-1,n=t[o].color;n[0]>251&&n[1]>251&&n[2]>251&&(t[o].color=[255,255,255])}},{quantize:u}}();r.exports=n.quantize},{}],2:[function(t,r,o){(function(){var r,o,i,n=function(t,r){return function(){return t.apply(r,arguments)}},e=[].slice;window.Swatch=o=function(){function t(t,r){this.rgb=t,this.population=r}return t.prototype.hsl=void 0,t.prototype.rgb=void 0,t.prototype.population=1,t.yiq=0,t.prototype.getHsl=function(){return this.hsl?this.hsl:this.hsl=i.rgbToHsl(this.rgb[0],this.rgb[1],this.rgb[2])},t.prototype.getPopulation=function(){return this.population},t.prototype.getRgb=function(){return this.rgb},t.prototype.getHex=function(){return"#"+((1<<24)+(this.rgb[0]<<16)+(this.rgb[1]<<8)+this.rgb[2]).toString(16).slice(1,7)},t.prototype.getTitleTextColor=function(){return this._ensureTextColors(),this.yiq<200?"#fff":"#000"},t.prototype.getBodyTextColor=function(){return this._ensureTextColors(),this.yiq<150?"#fff":"#000"},t.prototype._ensureTextColors=function(){return this.yiq?void 0:this.yiq=(299*this.rgb[0]+587*this.rgb[1]+114*this.rgb[2])/1e3},t}(),window.Vibrant=i=function(){function i(t,i,e){this.swatches=n(this.swatches,this);var a,h,u,s,c,p,f,l,A,v,T,g;"undefined"==typeof i&&(i=64),"undefined"==typeof e&&(e=5),f=new r(t);try{for(l=f.getImageData(),T=l.data,v=f.getPixelCount(),h=[],p=0;v>p;)A=4*p,g=T[A+0],c=T[A+1],u=T[A+2],a=T[A+3],a>=125&&(g>250&&c>250&&u>250||h.push([g,c,u])),p+=e;s=this.quantize(h,i),this._swatches=s.vboxes.map(function(t){return function(t){return new o(t.color,t.vbox.count())}}(this)),this.maxPopulation=this.findMaxPopulation,this.generateVarationColors(),this.generateEmptySwatches()}finally{f.removeCanvas()}}return i.prototype.quantize=t("quantize"),i.prototype._swatches=[],i.prototype.TARGET_DARK_LUMA=.26,i.prototype.MAX_DARK_LUMA=.45,i.prototype.MIN_LIGHT_LUMA=.55,i.prototype.TARGET_LIGHT_LUMA=.74,i.prototype.MIN_NORMAL_LUMA=.3,i.prototype.TARGET_NORMAL_LUMA=.5,i.prototype.MAX_NORMAL_LUMA=.7,i.prototype.TARGET_MUTED_SATURATION=.3,i.prototype.MAX_MUTED_SATURATION=.4,i.prototype.TARGET_VIBRANT_SATURATION=1,i.prototype.MIN_VIBRANT_SATURATION=.35,i.prototype.WEIGHT_SATURATION=3,i.prototype.WEIGHT_LUMA=6,i.prototype.WEIGHT_POPULATION=1,i.prototype.VibrantSwatch=void 0,i.prototype.MutedSwatch=void 0,i.prototype.DarkVibrantSwatch=void 0,i.prototype.DarkMutedSwatch=void 0,i.prototype.LightVibrantSwatch=void 0,i.prototype.LightMutedSwatch=void 0,i.prototype.HighestPopulation=0,i.prototype.generateVarationColors=function(){return this.VibrantSwatch=this.findColorVariation(this.TARGET_NORMAL_LUMA,this.MIN_NORMAL_LUMA,this.MAX_NORMAL_LUMA,this.TARGET_VIBRANT_SATURATION,this.MIN_VIBRANT_SATURATION,1),this.LightVibrantSwatch=this.findColorVariation(this.TARGET_LIGHT_LUMA,this.MIN_LIGHT_LUMA,1,this.TARGET_VIBRANT_SATURATION,this.MIN_VIBRANT_SATURATION,1),this.DarkVibrantSwatch=this.findColorVariation(this.TARGET_DARK_LUMA,0,this.MAX_DARK_LUMA,this.TARGET_VIBRANT_SATURATION,this.MIN_VIBRANT_SATURATION,1),this.MutedSwatch=this.findColorVariation(this.TARGET_NORMAL_LUMA,this.MIN_NORMAL_LUMA,this.MAX_NORMAL_LUMA,this.TARGET_MUTED_SATURATION,0,this.MAX_MUTED_SATURATION),this.LightMutedSwatch=this.findColorVariation(this.TARGET_LIGHT_LUMA,this.MIN_LIGHT_LUMA,1,this.TARGET_MUTED_SATURATION,0,this.MAX_MUTED_SATURATION),this.DarkMutedSwatch=this.findColorVariation(this.TARGET_DARK_LUMA,0,this.MAX_DARK_LUMA,this.TARGET_MUTED_SATURATION,0,this.MAX_MUTED_SATURATION)},i.prototype.generateEmptySwatches=function(){var t;return void 0===this.VibrantSwatch&&void 0!==this.DarkVibrantSwatch&&(t=this.DarkVibrantSwatch.getHsl(),t[2]=this.TARGET_NORMAL_LUMA,this.VibrantSwatch=new o(i.hslToRgb(t[0],t[1],t[2]),0)),void 0===this.DarkVibrantSwatch&&void 0!==this.VibrantSwatch?(t=this.VibrantSwatch.getHsl(),t[2]=this.TARGET_DARK_LUMA,this.DarkVibrantSwatch=new o(i.hslToRgb(t[0],t[1],t[2]),0)):void 0},i.prototype.findMaxPopulation=function(){var t,r,o,i,n;for(o=0,i=this._swatches,t=0,r=i.length;r>t;t++)n=i[t],o=Math.max(o,n.getPopulation());return o},i.prototype.findColorVariation=function(t,r,o,i,n,e){var a,h,u,s,c,p,f,l,A;for(s=void 0,c=0,p=this._swatches,a=0,h=p.length;h>a;a++)l=p[a],f=l.getHsl()[1],u=l.getHsl()[2],f>=n&&e>=f&&u>=r&&o>=u&&!this.isAlreadySelected(l)&&(A=this.createComparisonValue(f,i,u,t,l.getPopulation(),this.HighestPopulation),(void 0===s||A>c)&&(s=l,c=A));return s},i.prototype.createComparisonValue=function(t,r,o,i,n,e){return this.weightedMean(this.invertDiff(t,r),this.WEIGHT_SATURATION,this.invertDiff(o,i),this.WEIGHT_LUMA,n/e,this.WEIGHT_POPULATION)},i.prototype.invertDiff=function(t,r){return 1-Math.abs(t-r)},i.prototype.weightedMean=function(){var t,r,o,i,n,a;for(n=1<=arguments.length?e.call(arguments,0):[],r=0,o=0,t=0;t.5?i/(2-a-h):i/(a+h),a){case t:n=(r-o)/i+(o>r?6:0);break;case r:n=(o-t)/i+2;break;case o:n=(t-r)/i+4}n/=6}return[n,u,e]},i.hslToRgb=function(t,r,o){var i,n,e,a,h,u;return u=void 0,n=void 0,i=void 0,e=function(t,r,o){return 0>o&&(o+=1),o>1&&(o-=1),1/6>o?t+6*(r-t)*o:.5>o?r:2/3>o?t+(r-t)*(2/3-o)*6:t},0===r?u=n=i=o:(h=.5>o?o*(1+r):o+r-o*r,a=2*o-h,u=e(a,h,t+1/3),n=e(a,h,t),i=e(a,h,t-1/3)),[255*u,255*n,255*i]},i}(),window.CanvasImage=r=function(){function t(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),document.body.appendChild(this.canvas),this.width=this.canvas.width=t.width,this.height=this.canvas.height=t.height,this.context.drawImage(t,0,0,this.width,this.height)}return t.prototype.clear=function(){return this.context.clearRect(0,0,this.width,this.height)},t.prototype.update=function(t){return this.context.putImageData(t,0,0)},t.prototype.getPixelCount=function(){return this.width*this.height},t.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},t.prototype.removeCanvas=function(){return this.canvas.parentNode.removeChild(this.canvas)},t}()}).call(this)},{quantize:1}]},{},[2]); \ No newline at end of file diff --git a/dashboard-ui/bower_components/vibrant/gulpfile.coffee b/dashboard-ui/bower_components/vibrant/gulpfile.coffee deleted file mode 100644 index 02b987259d..0000000000 --- a/dashboard-ui/bower_components/vibrant/gulpfile.coffee +++ /dev/null @@ -1,42 +0,0 @@ -gulp = require 'gulp' -coffee = require 'gulp-coffee' -browserify = require 'browserify' -runSequence = require 'run-sequence' -source = require 'vinyl-source-stream' -del = require 'del' -closureCompiler = require 'gulp-closure-compiler' - -gulp.task 'coffee', -> - gulp.src('*.coffee') - .pipe(coffee()) - .pipe(gulp.dest('.')) - - gulp.src('src/*.coffee') - .pipe(coffee()) - .pipe(gulp.dest('src')) - -gulp.task 'browserify', -> - browserify( - entries: 'src/Vibrant.js' - ) - .bundle() - .pipe(source('Vibrant.js')) - .pipe(gulp.dest('dist')) - -gulp.task 'default', -> - runSequence 'coffee', 'browserify', 'cleanup', 'closure' - -gulp.task 'cleanup', (cb) -> - del ['src/Vibrant.js'], cb - -gulp.task 'closure', -> - gulp.src('dist/Vibrant.js') - .pipe(closureCompiler( - compilerPath: 'bower_components/closure-compiler/lib/vendor/compiler.jar', - fileName: 'Vibrant.min.js', - continueWithWarnings: true - )) - .pipe(gulp.dest('dist')); - -gulp.task 'watch', -> - gulp.watch ['**/*.coffee'], ['default'] \ No newline at end of file diff --git a/dashboard-ui/bower_components/vibrant/index.html b/dashboard-ui/bower_components/vibrant/index.html deleted file mode 100644 index f158d3e818..0000000000 --- a/dashboard-ui/bower_components/vibrant/index.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - Vibrant.js - Extract prominent colors from an image. - - - - - - - - - - - - - - - - - -
-

Vibrant.js

-

Extract prominent colors from an image.
Vibrant.js is a javascript port of the awesome Palette class in the Android support library.

- -

Showcase

-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
-
-
- -
-
-
-
- -

API

-

Use of Vibrant is pretty straight forward, but because code works better than explanation, here's an example:

- - -
-var img = document.createElement('img');
-img.setAttribute('src', 'examples/octocat.png')
-
-img.addEventListener('load', function() {
-    var vibrant = new Vibrant(img);
-    var swatches = vibrant.swatches()
-    for (var swatch in swatches)
-        if (swatches.hasOwnProperty(swatch) && swatches[swatch])
-            console.log(swatch, swatches[swatch].getHex())
-
-    /*
-     * Results into:
-     * Vibrant #7a4426
-     * Muted #7b9eae
-     * DarkVibrant #348945
-     * DarkMuted #141414
-     * LightVibrant #f3ccb4
-     */
-});
-        
-

As you can see, Vibrant's first argument is an image. Make sure it's loaded before passing it off to Vibrant.
Vibrant has 3 constructor parameters:

-
-new Vibrant(
-    img,
-    64, /* amount of colors in initial palette from which the swatches will be generated, defaults to 64 */
-    5 /* quality. 0 is highest, but takes way more processing. defaults to 5. */
-)
-        
-

The Swatch class

-

Vibrant.swatch() returns a object with Swatch objects. -
Note that some Swatches might be set to 'undefined' when Vibrant fails to find a matching color for the profile! -
A Swatch can be used to get the swatch's color (in RGB and hex), what text color works best with this color, and more.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Function nameDescription
new Swatch()Initialize a new swatch. First argument needs to be an RGB array, second argument must be the swatch' population.
.getRgb()Get swatch color in a RGB array
.getHex()Get swatch color in hex format (#EE22DD)
.getHsl()Get swatch color in a HSL array
.getPopulation()Get population (amount of times this color was used in the original image)
.getTitleTextColor()Get a color (in hex) that works best with any 'title' text that is used over this swatch's color
.getBodyTextColor()Get a color (in hex) that works best with any 'body' text that is used over this swatch's color
-
- - - - diff --git a/dashboard-ui/bower_components/vibrant/style.css b/dashboard-ui/bower_components/vibrant/style.css deleted file mode 100644 index b68dcb0d8e..0000000000 --- a/dashboard-ui/bower_components/vibrant/style.css +++ /dev/null @@ -1 +0,0 @@ -.examples img{width:100%}.colors{margin-top:20px}.colors>div{display:inline-block;text-align:center;margin-bottom:10px}.colors .color{width:40px;height:40px;margin-left:25px;margin-right:25px;margin-bottom:5px}.footer{padding-top:20px;padding-bottom:20px;color:#fff}.footer a{color:#E0F2F1} \ No newline at end of file diff --git a/dashboard-ui/bower_components/vibrant/website.coffee b/dashboard-ui/bower_components/vibrant/website.coffee deleted file mode 100644 index d92c85a94e..0000000000 --- a/dashboard-ui/bower_components/vibrant/website.coffee +++ /dev/null @@ -1,34 +0,0 @@ -document.addEventListener 'DOMContentLoaded', -> - examples = document.querySelectorAll '.examples > div' - - for example in examples - img = example.querySelector('img') - img.setAttribute('src', img.getAttribute('data-src')) - img.addEventListener 'load', (e) -> - vibrant = new Vibrant this - panel = e.target.parentElement - panel = panel.parentElement while not panel.classList.contains('panel') - - panel.style.backgroundColor = vibrant.VibrantSwatch.getHex() - panel.style.color = vibrant.VibrantSwatch.getTitleTextColor() - - colors = document.createElement 'div' - colors.classList.add 'colors' - panel.querySelector('.panel-body').appendChild colors - - profiles = ['VibrantSwatch', 'MutedSwatch', 'DarkVibrantSwatch', 'DarkMutedSwatch', 'LightVibrantSwatch', 'LightMutedSwatch'] - for profileName in profiles - profile = vibrant[profileName] - if not profile then continue - colorHolder = document.createElement 'div' - color = document.createElement 'div' - color.classList.add 'color' - color.classList.add 'shadow-z-1' - color.style.backgroundColor = profile.getHex() - colorName = document.createElement 'span' - colorName.innerHTML = profileName.substring(0, profileName.length - 6) - - colorHolder.appendChild color - colorHolder.appendChild colorName - - colors.appendChild colorHolder \ No newline at end of file diff --git a/dashboard-ui/components/accessschedule/accessschedule.template.html b/dashboard-ui/components/accessschedule/accessschedule.template.html index a388acbf1f..5abdc0f24b 100644 --- a/dashboard-ui/components/accessschedule/accessschedule.template.html +++ b/dashboard-ui/components/accessschedule/accessschedule.template.html @@ -4,7 +4,7 @@ ${HeaderAccessSchedule} -
+
diff --git a/dashboard-ui/components/apphost.js b/dashboard-ui/components/apphost.js index ac3bbd0964..f9bbd57139 100644 --- a/dashboard-ui/components/apphost.js +++ b/dashboard-ui/components/apphost.js @@ -1 +1 @@ -define(["appSettings","browser","events","htmlMediaHelper"],function(appSettings,browser,events,htmlMediaHelper){"use strict";function getBaseProfileOptions(item){var disableHlsVideoAudioCodecs=[];return item&&htmlMediaHelper.enableHlsJsPlayer(item.RunTimeTicks,item.MediaType)&&((browser.edge||browser.msie)&&disableHlsVideoAudioCodecs.push("mp3"),disableHlsVideoAudioCodecs.push("ac3"),disableHlsVideoAudioCodecs.push("eac3")),{enableMkvProgressive:!1,disableHlsVideoAudioCodecs:disableHlsVideoAudioCodecs}}function getDeviceProfileForWindowsUwp(item){return new Promise(function(resolve,reject){require(["browserdeviceprofile","environments/windows-uwp/mediacaps"],function(profileBuilder,uwpMediaCaps){var profileOptions=getBaseProfileOptions(item);profileOptions.supportsDts=uwpMediaCaps.supportsDTS(),profileOptions.supportsTrueHd=uwpMediaCaps.supportsDolby(),profileOptions.audioChannels=uwpMediaCaps.getAudioChannels(),resolve(profileBuilder(profileOptions))})})}function getDeviceProfile(item,options){return options=options||{},self.Windows?getDeviceProfileForWindowsUwp(item):new Promise(function(resolve,reject){require(["browserdeviceprofile"],function(profileBuilder){var profile=profileBuilder(getBaseProfileOptions(item));item&&!options.isRetry&&"allcomplexformats"!==appSettings.get("subtitleburnin")&&(browser.orsay||browser.tizen||(profile.SubtitleProfiles.push({Format:"ass",Method:"External"}),profile.SubtitleProfiles.push({Format:"ssa",Method:"External"}))),resolve(profile)})})}function getCapabilities(){return getDeviceProfile().then(function(profile){var supportsPersistentIdentifier=!!browser.edgeUwp,caps={PlayableMediaTypes:["Audio","Video"],SupportsPersistentIdentifier:supportsPersistentIdentifier,DeviceProfile:profile};return caps})}function generateDeviceId(){return new Promise(function(resolve,reject){require(["cryptojs-sha1"],function(){var keys=[];keys.push(navigator.userAgent),keys.push((new Date).getTime()),resolve(CryptoJS.SHA1(keys.join("|")).toString())})})}function getDeviceId(){var key="_deviceId2",deviceId=appSettings.get(key);return deviceId?Promise.resolve(deviceId):generateDeviceId().then(function(deviceId){return appSettings.set(key,deviceId),deviceId})}function getDeviceName(){var deviceName;return deviceName=browser.tizen?"Samsung Smart TV":browser.web0s?"LG Smart TV":browser.operaTv?"Opera TV":browser.xboxOne?"Xbox One":browser.ps4?"Sony PS4":browser.chrome?"Chrome":browser.edge?"Edge":browser.firefox?"Firefox":browser.msie?"Internet Explorer":"Web Browser",browser.ipad?deviceName+=" Ipad":browser.iphone?deviceName+=" Iphone":browser.android&&(deviceName+=" Android"),deviceName}function supportsVoiceInput(){return!browser.tv&&(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.oSpeechRecognition||window.msSpeechRecognition)}function supportsFullscreen(){if(browser.tv)return!1;var element=document.documentElement;return!!(element.requestFullscreen||element.mozRequestFullScreen||element.webkitRequestFullscreen||element.msRequestFullscreen)||!!document.createElement("video").webkitEnterFullscreen}function getSyncProfile(){return new Promise(function(resolve,reject){require(["browserdeviceprofile","appSettings"],function(profileBuilder,appSettings){var profile=profileBuilder();profile.MaxStaticMusicBitrate=appSettings.maxStaticMusicBitrate(),resolve(profile)})})}function getDefaultLayout(){return"desktop"}function supportsHtmlMediaAutoplay(){if(browser.edgeUwp||browser.tizen||browser.web0s||browser.orsay||browser.operaTv||browser.ps4||browser.xboxOne)return!0;if(browser.mobile)return!1;var savedResult=appSettings.get(htmlMediaAutoplayAppStorageKey);return"true"===savedResult||"false"!==savedResult&&null}function isXboxUWP(){return!1}function cueSupported(){try{var video=document.createElement("video"),style=document.createElement("style");style.textContent="video::cue {background: inherit}",document.body.appendChild(style),document.body.appendChild(video);var cue=window.getComputedStyle(video,"::cue").background;return document.body.removeChild(style),document.body.removeChild(video),!!cue.length}catch(err){return console.log("Error detecting cue support:"+err),!1}}function onAppVisible(){_isHidden&&(_isHidden=!1,console.log("triggering app resume event"),events.trigger(appHost,"resume"))}function onAppHidden(){_isHidden||(_isHidden=!0,console.log("app is hidden"))}var htmlMediaAutoplayAppStorageKey="supportshtmlmediaautoplay0",supportedFeatures=function(){var features=["sharing"];return browser.edgeUwp||browser.tv||browser.xboxOne||browser.ps4||isXboxUWP()||features.push("filedownload"),browser.operaTv||browser.tizen||browser.orsay||browser.web0s?features.push("exit"):(features.push("exitmenu"),features.push("plugins")),browser.operaTv||browser.tizen||browser.orsay||browser.web0s||browser.ps4||(features.push("externallinks"),features.push("externalpremium")),browser.operaTv||features.push("externallinkdisplay"),supportsVoiceInput()&&features.push("voiceinput"),!(browser.tv||browser.xboxOne||browser.ps4||isXboxUWP()),supportsHtmlMediaAutoplay()&&(features.push("htmlaudioautoplay"),features.push("htmlvideoautoplay")),browser.edgeUwp&&(isXboxUWP()||features.push("sync")),supportsFullscreen()&&features.push("fullscreenchange"),(browser.chrome||browser.edge&&!browser.slow)&&(browser.noAnimation||browser.edgeUwp||browser.xboxOne||features.push("imageanalysis")),Dashboard.isConnectMode()&&features.push("multiserver"),(browser.tv||browser.xboxOne||browser.ps4||browser.mobile||isXboxUWP())&&features.push("physicalvolumecontrol"),browser.tv||browser.xboxOne||browser.ps4||isXboxUWP()||features.push("remotecontrol"),browser.operaTv||browser.tizen||browser.orsay||browser.web0s||browser.edgeUwp||features.push("remotevideo"),features.push("otherapppromotions"),features.push("targetblank"),browser.orsay||browser.tizen||browser.msie||!(browser.firefox||browser.ps4||browser.edge||cueSupported())||features.push("subtitleappearancesettings"),browser.orsay||browser.tizen||features.push("subtitleburnsettings"),browser.tv||browser.ps4||browser.xboxOne||isXboxUWP()||features.push("fileinput"),Dashboard.isConnectMode()&&features.push("displaylanguage"),browser.chrome&&features.push("chromecast"),features}();supportedFeatures.indexOf("htmlvideoautoplay")===-1&&supportsHtmlMediaAutoplay()!==!1&&require(["autoPlayDetect"],function(autoPlayDetect){autoPlayDetect.supportsHtmlMediaAutoplay().then(function(){appSettings.set(htmlMediaAutoplayAppStorageKey,"true"),supportedFeatures.push("htmlvideoautoplay"),supportedFeatures.push("htmlaudioautoplay")},function(){appSettings.set(htmlMediaAutoplayAppStorageKey,"false")})});var appInfo,visibilityChange,visibilityState,version=window.dashboardVersion||"3.0",appHost={getWindowState:function(){return document.windowState||"Normal"},setWindowState:function(state){alert("setWindowState is not supported and should not be called")},exit:function(){if(browser.tizen)try{tizen.application.getCurrentApplication().exit()}catch(err){console.log("error closing application: "+err)}else window.close()},supports:function(command){return supportedFeatures.indexOf(command.toLowerCase())!==-1},appInfo:function(){return appInfo?Promise.resolve(appInfo):getDeviceId().then(function(deviceId){return appInfo={deviceId:deviceId,deviceName:getDeviceName(),appName:"Emby Mobile",appVersion:version}})},getCapabilities:getCapabilities,preferVisualCards:browser.android||browser.chrome,moreIcon:browser.android?"dots-vert":"dots-horiz",getSyncProfile:getSyncProfile,getDefaultLayout:getDefaultLayout,getDeviceProfile:getDeviceProfile},doc=self.document;doc&&("undefined"!=typeof doc.visibilityState?(visibilityChange="visibilitychange",visibilityState="hidden"):"undefined"!=typeof doc.mozHidden?(visibilityChange="mozvisibilitychange",visibilityState="mozVisibilityState"):"undefined"!=typeof doc.msHidden?(visibilityChange="msvisibilitychange",visibilityState="msVisibilityState"):"undefined"!=typeof doc.webkitHidden&&(visibilityChange="webkitvisibilitychange",visibilityState="webkitVisibilityState"));var _isHidden=!1;return doc&&doc.addEventListener(visibilityChange,function(){document[visibilityState]?onAppHidden():onAppVisible()}),self.addEventListener&&(self.addEventListener("focus",onAppVisible),self.addEventListener("blur",onAppHidden)),appHost}); \ No newline at end of file +define(["appSettings","browser","events","htmlMediaHelper"],function(appSettings,browser,events,htmlMediaHelper){"use strict";function getBaseProfileOptions(item){var disableHlsVideoAudioCodecs=[];return item&&htmlMediaHelper.enableHlsJsPlayer(item.RunTimeTicks,item.MediaType)&&((browser.edge||browser.msie)&&disableHlsVideoAudioCodecs.push("mp3"),disableHlsVideoAudioCodecs.push("ac3"),disableHlsVideoAudioCodecs.push("eac3"),disableHlsVideoAudioCodecs.push("opus")),{enableMkvProgressive:!1,disableHlsVideoAudioCodecs:disableHlsVideoAudioCodecs}}function getDeviceProfileForWindowsUwp(item){return new Promise(function(resolve,reject){require(["browserdeviceprofile","environments/windows-uwp/mediacaps"],function(profileBuilder,uwpMediaCaps){var profileOptions=getBaseProfileOptions(item);profileOptions.supportsDts=uwpMediaCaps.supportsDTS(),profileOptions.supportsTrueHd=uwpMediaCaps.supportsDolby(),profileOptions.audioChannels=uwpMediaCaps.getAudioChannels(),resolve(profileBuilder(profileOptions))})})}function getDeviceProfile(item,options){return options=options||{},self.Windows?getDeviceProfileForWindowsUwp(item):new Promise(function(resolve,reject){require(["browserdeviceprofile"],function(profileBuilder){var profile=profileBuilder(getBaseProfileOptions(item));item&&!options.isRetry&&"allcomplexformats"!==appSettings.get("subtitleburnin")&&(browser.orsay||browser.tizen||(profile.SubtitleProfiles.push({Format:"ass",Method:"External"}),profile.SubtitleProfiles.push({Format:"ssa",Method:"External"}))),resolve(profile)})})}function getCapabilities(){return getDeviceProfile().then(function(profile){var supportsPersistentIdentifier=!!browser.edgeUwp,caps={PlayableMediaTypes:["Audio","Video"],SupportsPersistentIdentifier:supportsPersistentIdentifier,DeviceProfile:profile};return caps})}function generateDeviceId(){return new Promise(function(resolve,reject){require(["cryptojs-sha1"],function(){var keys=[];keys.push(navigator.userAgent),keys.push((new Date).getTime()),resolve(CryptoJS.SHA1(keys.join("|")).toString())})})}function getDeviceId(){var key="_deviceId2",deviceId=appSettings.get(key);return deviceId?Promise.resolve(deviceId):generateDeviceId().then(function(deviceId){return appSettings.set(key,deviceId),deviceId})}function getDeviceName(){var deviceName;return deviceName=browser.tizen?"Samsung Smart TV":browser.web0s?"LG Smart TV":browser.operaTv?"Opera TV":browser.xboxOne?"Xbox One":browser.ps4?"Sony PS4":browser.chrome?"Chrome":browser.edge?"Edge":browser.firefox?"Firefox":browser.msie?"Internet Explorer":"Web Browser",browser.ipad?deviceName+=" Ipad":browser.iphone?deviceName+=" Iphone":browser.android&&(deviceName+=" Android"),deviceName}function supportsVoiceInput(){return!browser.tv&&(window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.oSpeechRecognition||window.msSpeechRecognition)}function supportsFullscreen(){if(browser.tv)return!1;var element=document.documentElement;return!!(element.requestFullscreen||element.mozRequestFullScreen||element.webkitRequestFullscreen||element.msRequestFullscreen)||!!document.createElement("video").webkitEnterFullscreen}function getSyncProfile(){return new Promise(function(resolve,reject){require(["browserdeviceprofile","appSettings"],function(profileBuilder,appSettings){var profile=profileBuilder();profile.MaxStaticMusicBitrate=appSettings.maxStaticMusicBitrate(),resolve(profile)})})}function getDefaultLayout(){return"desktop"}function supportsHtmlMediaAutoplay(){if(browser.edgeUwp||browser.tizen||browser.web0s||browser.orsay||browser.operaTv||browser.ps4||browser.xboxOne)return!0;if(browser.mobile)return!1;var savedResult=appSettings.get(htmlMediaAutoplayAppStorageKey);return"true"===savedResult||"false"!==savedResult&&null}function isXboxUWP(){return!1}function cueSupported(){try{var video=document.createElement("video"),style=document.createElement("style");style.textContent="video::cue {background: inherit}",document.body.appendChild(style),document.body.appendChild(video);var cue=window.getComputedStyle(video,"::cue").background;return document.body.removeChild(style),document.body.removeChild(video),!!cue.length}catch(err){return console.log("Error detecting cue support:"+err),!1}}function onAppVisible(){_isHidden&&(_isHidden=!1,console.log("triggering app resume event"),events.trigger(appHost,"resume"))}function onAppHidden(){_isHidden||(_isHidden=!0,console.log("app is hidden"))}var htmlMediaAutoplayAppStorageKey="supportshtmlmediaautoplay0",supportedFeatures=function(){var features=["sharing"];return browser.edgeUwp||browser.tv||browser.xboxOne||browser.ps4||isXboxUWP()||features.push("filedownload"),browser.operaTv||browser.tizen||browser.orsay||browser.web0s?features.push("exit"):(features.push("exitmenu"),features.push("plugins")),browser.operaTv||browser.tizen||browser.orsay||browser.web0s||browser.ps4||(features.push("externallinks"),features.push("externalpremium")),browser.operaTv||features.push("externallinkdisplay"),supportsVoiceInput()&&features.push("voiceinput"),!(browser.tv||browser.xboxOne||browser.ps4||isXboxUWP()),supportsHtmlMediaAutoplay()&&(features.push("htmlaudioautoplay"),features.push("htmlvideoautoplay")),browser.edgeUwp&&(isXboxUWP()||features.push("sync")),supportsFullscreen()&&features.push("fullscreenchange"),(browser.chrome||browser.edge&&!browser.slow)&&(browser.noAnimation||browser.edgeUwp||browser.xboxOne||features.push("imageanalysis")),Dashboard.isConnectMode()&&features.push("multiserver"),(browser.tv||browser.xboxOne||browser.ps4||browser.mobile||isXboxUWP())&&features.push("physicalvolumecontrol"),browser.tv||browser.xboxOne||browser.ps4||isXboxUWP()||features.push("remotecontrol"),browser.operaTv||browser.tizen||browser.orsay||browser.web0s||browser.edgeUwp||features.push("remotevideo"),features.push("otherapppromotions"),features.push("targetblank"),browser.orsay||browser.tizen||browser.msie||!(browser.firefox||browser.ps4||browser.edge||cueSupported())||features.push("subtitleappearancesettings"),browser.orsay||browser.tizen||features.push("subtitleburnsettings"),browser.tv||browser.ps4||browser.xboxOne||isXboxUWP()||features.push("fileinput"),Dashboard.isConnectMode()&&features.push("displaylanguage"),browser.chrome&&features.push("chromecast"),features}();supportedFeatures.indexOf("htmlvideoautoplay")===-1&&supportsHtmlMediaAutoplay()!==!1&&require(["autoPlayDetect"],function(autoPlayDetect){autoPlayDetect.supportsHtmlMediaAutoplay().then(function(){appSettings.set(htmlMediaAutoplayAppStorageKey,"true"),supportedFeatures.push("htmlvideoautoplay"),supportedFeatures.push("htmlaudioautoplay")},function(){appSettings.set(htmlMediaAutoplayAppStorageKey,"false")})});var appInfo,visibilityChange,visibilityState,version=window.dashboardVersion||"3.0",appHost={getWindowState:function(){return document.windowState||"Normal"},setWindowState:function(state){alert("setWindowState is not supported and should not be called")},exit:function(){if(browser.tizen)try{tizen.application.getCurrentApplication().exit()}catch(err){console.log("error closing application: "+err)}else window.close()},supports:function(command){return supportedFeatures.indexOf(command.toLowerCase())!==-1},appInfo:function(){return appInfo?Promise.resolve(appInfo):getDeviceId().then(function(deviceId){return appInfo={deviceId:deviceId,deviceName:getDeviceName(),appName:"Emby Mobile",appVersion:version}})},getCapabilities:getCapabilities,preferVisualCards:browser.android||browser.chrome,moreIcon:browser.android?"dots-vert":"dots-horiz",getSyncProfile:getSyncProfile,getDefaultLayout:getDefaultLayout,getDeviceProfile:getDeviceProfile},doc=self.document;doc&&("undefined"!=typeof doc.visibilityState?(visibilityChange="visibilitychange",visibilityState="hidden"):"undefined"!=typeof doc.mozHidden?(visibilityChange="mozvisibilitychange",visibilityState="mozVisibilityState"):"undefined"!=typeof doc.msHidden?(visibilityChange="msvisibilitychange",visibilityState="msVisibilityState"):"undefined"!=typeof doc.webkitHidden&&(visibilityChange="webkitvisibilitychange",visibilityState="webkitVisibilityState"));var _isHidden=!1;return doc&&doc.addEventListener(visibilityChange,function(){document[visibilityState]?onAppHidden():onAppVisible()}),self.addEventListener&&(self.addEventListener("focus",onAppVisible),self.addEventListener("blur",onAppHidden)),appHost}); \ No newline at end of file diff --git a/dashboard-ui/components/directorybrowser/directorybrowser.js b/dashboard-ui/components/directorybrowser/directorybrowser.js index 172da029d5..c5c662f1ff 100644 --- a/dashboard-ui/components/directorybrowser/directorybrowser.js +++ b/dashboard-ui/components/directorybrowser/directorybrowser.js @@ -1 +1 @@ -define(["loading","dialogHelper","dom","listViewStyle","emby-input","emby-button","paper-icon-button-light","css!./directorybrowser","formDialogStyle","emby-linkbutton"],function(loading,dialogHelper,dom){"use strict";function getSystemInfo(){return systemInfo?Promise.resolve(systemInfo):ApiClient.getPublicSystemInfo().then(function(info){return systemInfo=info,info})}function onDialogClosed(){loading.hide()}function refreshDirectoryBrowser(page,path,fileOptions,updatePathOnError){if(path&&"string"!=typeof path)throw new Error("invalid path");loading.show();var promises=[];"Network"===path?promises.push(ApiClient.getNetworkDevices()):path?(promises.push(ApiClient.getDirectoryContents(path,fileOptions)),promises.push(ApiClient.getParentPath(path))):promises.push(ApiClient.getDrives()),Promise.all(promises).then(function(responses){var folders=responses[0],parentPath=responses[1]||"";page.querySelector("#txtDirectoryPickerPath").value=path||"";var html="";path&&(html+=getItem("lnkPath lnkDirectory","",parentPath,"..."));for(var i=0,length=folders.length;i',html+='
',html+='
',html+=name,html+="
",html+="
",html+='arrow_forward',html+="
"}function getEditorHtml(options,systemInfo){var html="";if(html+='
',html+='
',!options.pathReadOnly){var instruction=options.instruction?options.instruction+"

":"";html+='
',html+=instruction,html+=Globalize.translate("MessageDirectoryPickerInstruction").replace("{0}","\\\\server").replace("{1}","\\\\192.168.1.101"),"bsd"===systemInfo.OperatingSystem.toLowerCase()?(html+="
",html+="
",html+=Globalize.translate("MessageDirectoryPickerBSDInstruction"),html+="
",html+=''+Globalize.translate("ButtonMoreInformation")+""):"linux"===systemInfo.OperatingSystem.toLowerCase()&&(html+="
",html+="
",html+=Globalize.translate("MessageDirectoryPickerLinuxInstruction"),html+="
"),html+="
"}html+='',html+='
',html+='
';var labelKey=options.includeFiles!==!0?"LabelFolder":"LabelPath",readOnlyAttribute=options.pathReadOnly?" readonly":"";return html+='',html+="
",readOnlyAttribute||(html+=''),html+="
",readOnlyAttribute||(html+='
'),options.enableNetworkSharePath&&(html+='
',html+='',html+='
',html+=Globalize.translate("LabelOptionalNetworkPathHelp"),html+="
",html+="
"),html+='
',html+='",html+="
",html+="",html+="
",html+="
",html+="
"}function alertText(text){alertTextWithOptions({text:text})}function alertTextWithOptions(options){require(["alert"],function(alert){alert(options)})}function validatePath(path,validateWriteable,apiClient){return apiClient.ajax({type:"POST",url:apiClient.getUrl("Environment/ValidatePath"),data:{ValidateWriteable:validateWriteable,Path:path}}).catch(function(response){if(response){if(404===response.status)return alertText("The path could not be found. Please ensure the path is valid and try again."),Promise.reject();if(500===response.status)return alertText(validateWriteable?"Emby Server requires write access to this folder. Please ensure write access and try again.":"The path could not be found. Please ensure the path is valid and try again."),Promise.reject()}return Promise.resolve()})}function initEditor(content,options,fileOptions){content.addEventListener("click",function(e){var lnkPath=dom.parentWithClass(e.target,"lnkPath");if(lnkPath){var path=lnkPath.getAttribute("data-path");lnkPath.classList.contains("lnkFile")?content.querySelector("#txtDirectoryPickerPath").value=path:refreshDirectoryBrowser(content,path,fileOptions,!0)}}),content.addEventListener("click",function(e){var btnRefreshDirectories=dom.parentWithClass(e.target,"btnRefreshDirectories");if(btnRefreshDirectories){var path=content.querySelector("#txtDirectoryPickerPath").value;refreshDirectoryBrowser(content,path,fileOptions)}}),content.addEventListener("change",function(e){var txtDirectoryPickerPath=dom.parentWithTag(e.target,"INPUT");txtDirectoryPickerPath&&"txtDirectoryPickerPath"===txtDirectoryPickerPath.id&&refreshDirectoryBrowser(content,txtDirectoryPickerPath.value,fileOptions)}),content.querySelector("form").addEventListener("submit",function(e){if(options.callback){var networkSharePath=this.querySelector("#txtNetworkPath");networkSharePath=networkSharePath?networkSharePath.value:null;var path=this.querySelector("#txtDirectoryPickerPath").value;validatePath(path,options.validateWriteable,ApiClient).then(function(){options.callback(path,networkSharePath)})}return e.preventDefault(),e.stopPropagation(),!1})}function getDefaultPath(options){return options.path?Promise.resolve(options.path):ApiClient.getJSON(ApiClient.getUrl("Environment/DefaultDirectoryBrowser")).then(function(result){return result.Path||""},function(){return""})}function directoryBrowser(){var currentDialog,self=this;self.show=function(options){options=options||{};var fileOptions={includeDirectories:!0};null!=options.includeDirectories&&(fileOptions.includeDirectories=options.includeDirectories),null!=options.includeFiles&&(fileOptions.includeFiles=options.includeFiles),Promise.all([getSystemInfo(),getDefaultPath(options)]).then(function(responses){var systemInfo=responses[0],initialPath=responses[1],dlg=dialogHelper.createDialog({size:"medium-tall",removeOnClose:!0,scrollY:!1});dlg.classList.add("ui-body-a"),dlg.classList.add("background-theme-a"),dlg.classList.add("directoryPicker"),dlg.classList.add("formDialog");var html="";html+='
',html+='',html+='

',html+=options.header||Globalize.translate("HeaderSelectPath"),html+="

",html+="
",html+=getEditorHtml(options,systemInfo),dlg.innerHTML=html,initEditor(dlg,options,fileOptions),dlg.addEventListener("close",onDialogClosed),dialogHelper.open(dlg),dlg.querySelector(".btnCloseDialog").addEventListener("click",function(){dialogHelper.close(dlg)}),currentDialog=dlg;var txtCurrentPath=dlg.querySelector("#txtDirectoryPickerPath");txtCurrentPath.value=initialPath;var txtNetworkPath=dlg.querySelector("#txtNetworkPath");txtNetworkPath&&(txtNetworkPath.value=options.networkSharePath||""),options.pathReadOnly||refreshDirectoryBrowser(dlg,txtCurrentPath.value,null,!0)})},self.close=function(){currentDialog&&dialogHelper.close(currentDialog)}}var systemInfo;return directoryBrowser}); \ No newline at end of file +define(["loading","dialogHelper","dom","listViewStyle","emby-input","emby-button","paper-icon-button-light","css!./directorybrowser","formDialogStyle","emby-linkbutton"],function(loading,dialogHelper,dom){"use strict";function getSystemInfo(){return systemInfo?Promise.resolve(systemInfo):ApiClient.getPublicSystemInfo().then(function(info){return systemInfo=info,info})}function onDialogClosed(){loading.hide()}function refreshDirectoryBrowser(page,path,fileOptions,updatePathOnError){if(path&&"string"!=typeof path)throw new Error("invalid path");loading.show();var promises=[];"Network"===path?promises.push(ApiClient.getNetworkDevices()):path?(promises.push(ApiClient.getDirectoryContents(path,fileOptions)),promises.push(ApiClient.getParentPath(path))):promises.push(ApiClient.getDrives()),Promise.all(promises).then(function(responses){var folders=responses[0],parentPath=responses[1]||"";page.querySelector("#txtDirectoryPickerPath").value=path||"";var html="";path&&(html+=getItem("lnkPath lnkDirectory","",parentPath,"..."));for(var i=0,length=folders.length;i',html+='
',html+='
',html+=name,html+="
",html+="
",html+='arrow_forward',html+="
"}function getEditorHtml(options,systemInfo){var html="";if(html+='
',html+='
',!options.pathReadOnly){var instruction=options.instruction?options.instruction+"

":"";html+='
',html+=instruction,html+=Globalize.translate("MessageDirectoryPickerInstruction").replace("{0}","\\\\server").replace("{1}","\\\\192.168.1.101"),"bsd"===systemInfo.OperatingSystem.toLowerCase()?(html+="
",html+="
",html+=Globalize.translate("MessageDirectoryPickerBSDInstruction"),html+="
",html+=''+Globalize.translate("ButtonMoreInformation")+""):"linux"===systemInfo.OperatingSystem.toLowerCase()&&(html+="
",html+="
",html+=Globalize.translate("MessageDirectoryPickerLinuxInstruction"),html+="
"),html+="
"}html+='
',html+='
',html+='
';var labelKey=options.includeFiles!==!0?"LabelFolder":"LabelPath",readOnlyAttribute=options.pathReadOnly?" readonly":"";return html+='',html+="
",readOnlyAttribute||(html+=''),html+="
",readOnlyAttribute||(html+='
'),options.enableNetworkSharePath&&(html+='
',html+='',html+='
',html+=Globalize.translate("LabelOptionalNetworkPathHelp"),html+="
",html+="
"),html+='
',html+='",html+="
",html+="
",html+="
",html+="
",html+=""}function alertText(text){alertTextWithOptions({text:text})}function alertTextWithOptions(options){require(["alert"],function(alert){alert(options)})}function validatePath(path,validateWriteable,apiClient){return apiClient.ajax({type:"POST",url:apiClient.getUrl("Environment/ValidatePath"),data:{ValidateWriteable:validateWriteable,Path:path}}).catch(function(response){if(response){if(404===response.status)return alertText("The path could not be found. Please ensure the path is valid and try again."),Promise.reject();if(500===response.status)return alertText(validateWriteable?"Emby Server requires write access to this folder. Please ensure write access and try again.":"The path could not be found. Please ensure the path is valid and try again."),Promise.reject()}return Promise.resolve()})}function initEditor(content,options,fileOptions){content.addEventListener("click",function(e){var lnkPath=dom.parentWithClass(e.target,"lnkPath");if(lnkPath){var path=lnkPath.getAttribute("data-path");lnkPath.classList.contains("lnkFile")?content.querySelector("#txtDirectoryPickerPath").value=path:refreshDirectoryBrowser(content,path,fileOptions,!0)}}),content.addEventListener("click",function(e){var btnRefreshDirectories=dom.parentWithClass(e.target,"btnRefreshDirectories");if(btnRefreshDirectories){var path=content.querySelector("#txtDirectoryPickerPath").value;refreshDirectoryBrowser(content,path,fileOptions)}}),content.addEventListener("change",function(e){var txtDirectoryPickerPath=dom.parentWithTag(e.target,"INPUT");txtDirectoryPickerPath&&"txtDirectoryPickerPath"===txtDirectoryPickerPath.id&&refreshDirectoryBrowser(content,txtDirectoryPickerPath.value,fileOptions)}),content.querySelector("form").addEventListener("submit",function(e){if(options.callback){var networkSharePath=this.querySelector("#txtNetworkPath");networkSharePath=networkSharePath?networkSharePath.value:null;var path=this.querySelector("#txtDirectoryPickerPath").value;validatePath(path,options.validateWriteable,ApiClient).then(function(){options.callback(path,networkSharePath)})}return e.preventDefault(),e.stopPropagation(),!1})}function getDefaultPath(options){return options.path?Promise.resolve(options.path):ApiClient.getJSON(ApiClient.getUrl("Environment/DefaultDirectoryBrowser")).then(function(result){return result.Path||""},function(){return""})}function directoryBrowser(){var currentDialog,self=this;self.show=function(options){options=options||{};var fileOptions={includeDirectories:!0};null!=options.includeDirectories&&(fileOptions.includeDirectories=options.includeDirectories),null!=options.includeFiles&&(fileOptions.includeFiles=options.includeFiles),Promise.all([getSystemInfo(),getDefaultPath(options)]).then(function(responses){var systemInfo=responses[0],initialPath=responses[1],dlg=dialogHelper.createDialog({size:"medium-tall",removeOnClose:!0,scrollY:!1});dlg.classList.add("ui-body-a"),dlg.classList.add("background-theme-a"),dlg.classList.add("directoryPicker"),dlg.classList.add("formDialog");var html="";html+='
',html+='',html+='

',html+=options.header||Globalize.translate("HeaderSelectPath"),html+="

",html+="
",html+=getEditorHtml(options,systemInfo),dlg.innerHTML=html,initEditor(dlg,options,fileOptions),dlg.addEventListener("close",onDialogClosed),dialogHelper.open(dlg),dlg.querySelector(".btnCloseDialog").addEventListener("click",function(){dialogHelper.close(dlg)}),currentDialog=dlg;var txtCurrentPath=dlg.querySelector("#txtDirectoryPickerPath");txtCurrentPath.value=initialPath;var txtNetworkPath=dlg.querySelector("#txtNetworkPath");txtNetworkPath&&(txtNetworkPath.value=options.networkSharePath||""),options.pathReadOnly||refreshDirectoryBrowser(dlg,txtCurrentPath.value,null,!0)})},self.close=function(){currentDialog&&dialogHelper.close(currentDialog)}}var systemInfo;return directoryBrowser}); \ No newline at end of file diff --git a/dashboard-ui/components/guestinviter/connectlink.template.html b/dashboard-ui/components/guestinviter/connectlink.template.html index 4416a712ea..913108646f 100644 --- a/dashboard-ui/components/guestinviter/connectlink.template.html +++ b/dashboard-ui/components/guestinviter/connectlink.template.html @@ -7,7 +7,7 @@ -
+

${MessageConnectAccountRequiredToInviteGuest}

diff --git a/dashboard-ui/components/guestinviter/guestinviter.template.html b/dashboard-ui/components/guestinviter/guestinviter.template.html index 587b43c867..301d5840fe 100644 --- a/dashboard-ui/components/guestinviter/guestinviter.template.html +++ b/dashboard-ui/components/guestinviter/guestinviter.template.html @@ -4,7 +4,7 @@ ${HeaderInviteUser}
-
+
diff --git a/dashboard-ui/components/medialibrarycreator/medialibrarycreator.template.html b/dashboard-ui/components/medialibrarycreator/medialibrarycreator.template.html index 9df2566063..81fbba3120 100644 --- a/dashboard-ui/components/medialibrarycreator/medialibrarycreator.template.html +++ b/dashboard-ui/components/medialibrarycreator/medialibrarycreator.template.html @@ -5,7 +5,7 @@
-
+
diff --git a/dashboard-ui/components/medialibraryeditor/medialibraryeditor.template.html b/dashboard-ui/components/medialibraryeditor/medialibraryeditor.template.html index becc4b9a63..f8624a0b6e 100644 --- a/dashboard-ui/components/medialibraryeditor/medialibraryeditor.template.html +++ b/dashboard-ui/components/medialibraryeditor/medialibraryeditor.template.html @@ -4,7 +4,7 @@
-
+

${HeadersFolders}

diff --git a/dashboard-ui/components/navdrawer/navdrawer.js b/dashboard-ui/components/navdrawer/navdrawer.js index 8e70c71756..b3fa9d4603 100644 --- a/dashboard-ui/components/navdrawer/navdrawer.js +++ b/dashboard-ui/components/navdrawer/navdrawer.js @@ -1 +1 @@ -define(["browser","dom","css!./navdrawer","scrollStyles"],function(browser,dom){"use strict";return function(options){function getTouches(e){return e.changedTouches||e.targetTouches||e.touches}function onMenuTouchStart(e){options.target.classList.remove("transition");var touches=getTouches(e),touch=touches[0]||{};menuTouchStartX=touch.clientX,menuTouchStartY=touch.clientY,menuTouchStartTime=(new Date).getTime()}function setVelocity(deltaX){var time=(new Date).getTime()-(menuTouchStartTime||0);velocity=Math.abs(deltaX)/time}function onMenuTouchMove(e){var isOpen=self.visible,touches=getTouches(e),touch=touches[0]||{},endX=touch.clientX||0,endY=touch.clientY||0,deltaX=endX-(menuTouchStartX||0),deltaY=endY-(menuTouchStartY||0);setVelocity(deltaX),isOpen&&1!==dragMode&&deltaX>0&&(dragMode=2),0===dragMode&&(!isOpen||Math.abs(deltaX)>=10)&&Math.abs(deltaY)<5?(dragMode=1,scrollContainer.addEventListener("scroll",disableEvent),self.showMask()):0===dragMode&&Math.abs(deltaY)>=5&&(dragMode=2),1===dragMode&&(newPos=currentPos+deltaX,self.changeMenuPos())}function onMenuTouchEnd(e){options.target.classList.add("transition"),scrollContainer.removeEventListener("scroll",disableEvent),dragMode=0;var touches=getTouches(e),touch=touches[0]||{},endX=touch.clientX||0,endY=touch.clientY||0,deltaX=endX-(menuTouchStartX||0),deltaY=endY-(menuTouchStartY||0);currentPos=deltaX,self.checkMenuState(deltaX,deltaY)}function onEdgeTouchStart(e){if(isPeeking)onMenuTouchMove(e);else{var touches=getTouches(e),touch=touches[0]||{},endX=touch.clientX||0;endX<=options.handleSize&&(isPeeking=!0,"touchstart"===e.type&&(dom.removeEventListener(edgeContainer,"touchmove",onEdgeTouchMove,{}),dom.addEventListener(edgeContainer,"touchmove",onEdgeTouchMove,{})),onMenuTouchStart(e))}}function onEdgeTouchMove(e){onEdgeTouchStart(e),e.preventDefault(),e.stopPropagation()}function onEdgeTouchEnd(e){isPeeking&&(isPeeking=!1,dom.removeEventListener(edgeContainer,"touchmove",onEdgeTouchMove,{}),onMenuTouchEnd(e))}function disableEvent(e){e.preventDefault(),e.stopPropagation()}function onBackgroundTouchStart(e){var touches=getTouches(e),touch=touches[0]||{};backgroundTouchStartX=touch.clientX,backgroundTouchStartTime=(new Date).getTime()}function onBackgroundTouchMove(e){var touches=getTouches(e),touch=touches[0]||{},endX=touch.clientX||0;if(endX<=options.width&&self.isVisible){countStart++;var deltaX=endX-(backgroundTouchStartX||0);if(1===countStart&&(startPoint=deltaX),deltaX<0&&2!==dragMode){dragMode=1,newPos=deltaX-startPoint+options.width,self.changeMenuPos();var time=(new Date).getTime()-(backgroundTouchStartTime||0);velocity=Math.abs(deltaX)/time}}e.preventDefault(),e.stopPropagation()}function onBackgroundTouchEnd(e){var touches=getTouches(e),touch=touches[0]||{},endX=touch.clientX||0,deltaX=endX-(backgroundTouchStartX||0);self.checkMenuState(deltaX),countStart=0}function onMaskTransitionEnd(){var classList=mask.classList;classList.contains("backdrop")||classList.add("hide")}var self,defaults,mask,newPos=0,currentPos=0,startPoint=0,countStart=0,velocity=0;options.target.classList.add("transition");var dragMode=0,scrollContainer=options.target.querySelector(".mainDrawer-scrollContainer");scrollContainer.classList.add("smoothScrollY");var TouchMenuLA=function(){self=this,defaults={width:260,handleSize:10,disableMask:!1,maxMaskOpacity:.5},this.isVisible=!1,this.initialize()};TouchMenuLA.prototype.initElements=function(){options.target.classList.add("touch-menu-la"),options.target.style.width=options.width+"px",options.target.style.left=-options.width+"px",options.disableMask||(mask=document.createElement("div"),mask.className="tmla-mask hide",document.body.appendChild(mask),dom.addEventListener(mask,dom.whichTransitionEvent(),onMaskTransitionEnd,{passive:!0}))};var menuTouchStartX,menuTouchStartY,menuTouchStartTime,edgeContainer=document.querySelector(".mainDrawerHandle"),isPeeking=!1;TouchMenuLA.prototype.animateToPosition=function(pos){requestAnimationFrame(function(){pos?options.target.style.transform="translateX("+pos+"px)":options.target.style.transform="none"})},TouchMenuLA.prototype.changeMenuPos=function(){newPos<=options.width&&this.animateToPosition(newPos)},TouchMenuLA.prototype.clickMaskClose=function(){mask.addEventListener("click",function(){self.close()})},TouchMenuLA.prototype.checkMenuState=function(deltaX,deltaY){velocity>=.4?deltaX>=0||Math.abs(deltaY||0)>=70?self.open():self.close():newPos>=100?self.open():newPos&&self.close()},TouchMenuLA.prototype.open=function(){this.animateToPosition(options.width),currentPos=options.width,this.isVisible=!0,self.showMask(),self.invoke(options.onChange)},TouchMenuLA.prototype.close=function(){this.animateToPosition(0),currentPos=0,self.isVisible=!1,self.hideMask(),self.invoke(options.onChange)},TouchMenuLA.prototype.toggle=function(){self.isVisible?self.close():self.open()};var backgroundTouchStartX,backgroundTouchStartTime;TouchMenuLA.prototype.showMask=function(){mask.classList.remove("hide"),void mask.offsetWidth,mask.classList.add("backdrop")},TouchMenuLA.prototype.hideMask=function(){mask.classList.remove("backdrop")},TouchMenuLA.prototype.invoke=function(fn){fn&&fn.apply(self)};var _edgeSwipeEnabled;return TouchMenuLA.prototype.setEdgeSwipeEnabled=function(enabled){options.disableEdgeSwipe||browser.touch&&(enabled?_edgeSwipeEnabled||(_edgeSwipeEnabled=!0,dom.addEventListener(edgeContainer,"touchstart",onEdgeTouchStart,{passive:!0}),dom.addEventListener(edgeContainer,"touchend",onEdgeTouchEnd,{passive:!0}),dom.addEventListener(edgeContainer,"touchcancel",onEdgeTouchEnd,{passive:!0})):_edgeSwipeEnabled&&(_edgeSwipeEnabled=!1,dom.removeEventListener(edgeContainer,"touchstart",onEdgeTouchStart,{passive:!0}),dom.removeEventListener(edgeContainer,"touchend",onEdgeTouchEnd,{passive:!0}),dom.removeEventListener(edgeContainer,"touchcancel",onEdgeTouchEnd,{passive:!0})))},TouchMenuLA.prototype.initialize=function(){options=Object.assign(defaults,options||{}),(browser.edge||browser.safari||browser.iOS)&&(options.disableEdgeSwipe=!0),self.initElements(),browser.touch&&(dom.addEventListener(options.target,"touchstart",onMenuTouchStart,{passive:!0}),dom.addEventListener(options.target,"touchmove",onMenuTouchMove,{passive:!0}),dom.addEventListener(options.target,"touchend",onMenuTouchEnd,{passive:!0}),dom.addEventListener(options.target,"touchcancel",onMenuTouchEnd,{passive:!0}),dom.addEventListener(mask,"touchstart",onBackgroundTouchStart,{passive:!0}),dom.addEventListener(mask,"touchmove",onBackgroundTouchMove,{}),dom.addEventListener(mask,"touchend",onBackgroundTouchEnd,{passive:!0}),dom.addEventListener(mask,"touchcancel",onBackgroundTouchEnd,{passive:!0})),self.clickMaskClose()},new TouchMenuLA}}); \ No newline at end of file +define(["browser","dom","css!./navdrawer","scrollStyles"],function(browser,dom){"use strict";return function(options){function getTouches(e){return e.changedTouches||e.targetTouches||e.touches}function onMenuTouchStart(e){options.target.classList.remove("transition");var touches=getTouches(e),touch=touches[0]||{};menuTouchStartX=touch.clientX,menuTouchStartY=touch.clientY,menuTouchStartTime=(new Date).getTime()}function setVelocity(deltaX){var time=(new Date).getTime()-(menuTouchStartTime||0);velocity=Math.abs(deltaX)/time}function onMenuTouchMove(e){var isOpen=self.visible,touches=getTouches(e),touch=touches[0]||{},endX=touch.clientX||0,endY=touch.clientY||0,deltaX=endX-(menuTouchStartX||0),deltaY=endY-(menuTouchStartY||0);setVelocity(deltaX),isOpen&&1!==dragMode&&deltaX>0&&(dragMode=2),0===dragMode&&(!isOpen||Math.abs(deltaX)>=10)&&Math.abs(deltaY)<5?(dragMode=1,scrollContainer.addEventListener("scroll",disableEvent),self.showMask()):0===dragMode&&Math.abs(deltaY)>=5&&(dragMode=2),1===dragMode&&(newPos=currentPos+deltaX,self.changeMenuPos())}function onMenuTouchEnd(e){options.target.classList.add("transition"),scrollContainer.removeEventListener("scroll",disableEvent),dragMode=0;var touches=getTouches(e),touch=touches[0]||{},endX=touch.clientX||0,endY=touch.clientY||0,deltaX=endX-(menuTouchStartX||0),deltaY=endY-(menuTouchStartY||0);currentPos=deltaX,self.checkMenuState(deltaX,deltaY)}function onEdgeTouchStart(e){if(isPeeking)onMenuTouchMove(e);else{var touches=getTouches(e),touch=touches[0]||{},endX=touch.clientX||0;endX<=options.handleSize&&(isPeeking=!0,"touchstart"===e.type&&(dom.removeEventListener(edgeContainer,"touchmove",onEdgeTouchMove,{}),dom.addEventListener(edgeContainer,"touchmove",onEdgeTouchMove,{})),onMenuTouchStart(e))}}function onEdgeTouchMove(e){onEdgeTouchStart(e),e.preventDefault(),e.stopPropagation()}function onEdgeTouchEnd(e){isPeeking&&(isPeeking=!1,dom.removeEventListener(edgeContainer,"touchmove",onEdgeTouchMove,{}),onMenuTouchEnd(e))}function disableEvent(e){e.preventDefault(),e.stopPropagation()}function onBackgroundTouchStart(e){var touches=getTouches(e),touch=touches[0]||{};backgroundTouchStartX=touch.clientX,backgroundTouchStartTime=(new Date).getTime()}function onBackgroundTouchMove(e){var touches=getTouches(e),touch=touches[0]||{},endX=touch.clientX||0;if(endX<=options.width&&self.isVisible){countStart++;var deltaX=endX-(backgroundTouchStartX||0);if(1===countStart&&(startPoint=deltaX),deltaX<0&&2!==dragMode){dragMode=1,newPos=deltaX-startPoint+options.width,self.changeMenuPos();var time=(new Date).getTime()-(backgroundTouchStartTime||0);velocity=Math.abs(deltaX)/time}}e.preventDefault(),e.stopPropagation()}function onBackgroundTouchEnd(e){var touches=getTouches(e),touch=touches[0]||{},endX=touch.clientX||0,deltaX=endX-(backgroundTouchStartX||0);self.checkMenuState(deltaX),countStart=0}function onMaskTransitionEnd(){var classList=mask.classList;classList.contains("backdrop")||classList.add("hide")}var self,defaults,mask,newPos=0,currentPos=0,startPoint=0,countStart=0,velocity=0;options.target.classList.add("transition");var dragMode=0,scrollContainer=options.target.querySelector(".mainDrawer-scrollContainer");scrollContainer.classList.add("scrollY");var TouchMenuLA=function(){self=this,defaults={width:260,handleSize:10,disableMask:!1,maxMaskOpacity:.5},this.isVisible=!1,this.initialize()};TouchMenuLA.prototype.initElements=function(){options.target.classList.add("touch-menu-la"),options.target.style.width=options.width+"px",options.target.style.left=-options.width+"px",options.disableMask||(mask=document.createElement("div"),mask.className="tmla-mask hide",document.body.appendChild(mask),dom.addEventListener(mask,dom.whichTransitionEvent(),onMaskTransitionEnd,{passive:!0}))};var menuTouchStartX,menuTouchStartY,menuTouchStartTime,edgeContainer=document.querySelector(".mainDrawerHandle"),isPeeking=!1;TouchMenuLA.prototype.animateToPosition=function(pos){requestAnimationFrame(function(){pos?options.target.style.transform="translateX("+pos+"px)":options.target.style.transform="none"})},TouchMenuLA.prototype.changeMenuPos=function(){newPos<=options.width&&this.animateToPosition(newPos)},TouchMenuLA.prototype.clickMaskClose=function(){mask.addEventListener("click",function(){self.close()})},TouchMenuLA.prototype.checkMenuState=function(deltaX,deltaY){velocity>=.4?deltaX>=0||Math.abs(deltaY||0)>=70?self.open():self.close():newPos>=100?self.open():newPos&&self.close()},TouchMenuLA.prototype.open=function(){this.animateToPosition(options.width),currentPos=options.width,this.isVisible=!0,self.showMask(),self.invoke(options.onChange)},TouchMenuLA.prototype.close=function(){this.animateToPosition(0),currentPos=0,self.isVisible=!1,self.hideMask(),self.invoke(options.onChange)},TouchMenuLA.prototype.toggle=function(){self.isVisible?self.close():self.open()};var backgroundTouchStartX,backgroundTouchStartTime;TouchMenuLA.prototype.showMask=function(){mask.classList.remove("hide"),void mask.offsetWidth,mask.classList.add("backdrop")},TouchMenuLA.prototype.hideMask=function(){mask.classList.remove("backdrop")},TouchMenuLA.prototype.invoke=function(fn){fn&&fn.apply(self)};var _edgeSwipeEnabled;return TouchMenuLA.prototype.setEdgeSwipeEnabled=function(enabled){options.disableEdgeSwipe||browser.touch&&(enabled?_edgeSwipeEnabled||(_edgeSwipeEnabled=!0,dom.addEventListener(edgeContainer,"touchstart",onEdgeTouchStart,{passive:!0}),dom.addEventListener(edgeContainer,"touchend",onEdgeTouchEnd,{passive:!0}),dom.addEventListener(edgeContainer,"touchcancel",onEdgeTouchEnd,{passive:!0})):_edgeSwipeEnabled&&(_edgeSwipeEnabled=!1,dom.removeEventListener(edgeContainer,"touchstart",onEdgeTouchStart,{passive:!0}),dom.removeEventListener(edgeContainer,"touchend",onEdgeTouchEnd,{passive:!0}),dom.removeEventListener(edgeContainer,"touchcancel",onEdgeTouchEnd,{passive:!0})))},TouchMenuLA.prototype.initialize=function(){options=Object.assign(defaults,options||{}),(browser.edge||browser.safari||browser.iOS)&&(options.disableEdgeSwipe=!0),self.initElements(),browser.touch&&(dom.addEventListener(options.target,"touchstart",onMenuTouchStart,{passive:!0}),dom.addEventListener(options.target,"touchmove",onMenuTouchMove,{passive:!0}),dom.addEventListener(options.target,"touchend",onMenuTouchEnd,{passive:!0}),dom.addEventListener(options.target,"touchcancel",onMenuTouchEnd,{passive:!0}),dom.addEventListener(mask,"touchstart",onBackgroundTouchStart,{passive:!0}),dom.addEventListener(mask,"touchmove",onBackgroundTouchMove,{}),dom.addEventListener(mask,"touchend",onBackgroundTouchEnd,{passive:!0}),dom.addEventListener(mask,"touchcancel",onBackgroundTouchEnd,{passive:!0})),self.clickMaskClose()},new TouchMenuLA}}); \ No newline at end of file diff --git a/dashboard-ui/components/tunerpicker.js b/dashboard-ui/components/tunerpicker.js index cfe6169bd1..0040077ef6 100644 --- a/dashboard-ui/components/tunerpicker.js +++ b/dashboard-ui/components/tunerpicker.js @@ -1 +1 @@ -define(["dialogHelper","dom","layoutManager","connectionManager","globalize","loading","material-icons","formDialogStyle","emby-button","emby-itemscontainer","cardStyle"],function(dialogHelper,dom,layoutManager,connectionManager,globalize,loading){"use strict";function getEditorHtml(){var html="";return html+='
',html+='
',html+='
',html+="

"+globalize.translate("DetectingDevices")+"...

",html+="

"+globalize.translate("MessagePleaseWait")+"

",html+="
",html+='

'+globalize.translate("HeaderNewDevices")+"

",html+='
',html+="
",html+="
",html+="
"}function getDeviceHtml(device){var padderClass,html="",cssClass="card scalableCard",cardBoxCssClass="cardBox visualCardBox";return cssClass+=" backdropCard backdropCard-scalable",padderClass="cardPadder-backdrop",layoutManager.tv&&(cssClass+=" card-focusscale",cardBoxCssClass+=" cardBox-focustransform"),cardBoxCssClass+=" card-focuscontent",html+='"}function renderDevices(view,devices){var i,length,html="";for(i=0,length=devices.length;i
"+globalize.translate("NoNewDevicesFound")+"

",view.querySelector(".devicesHeader").classList.add("hide"));var elem=view.querySelector(".results");elem.innerHTML=html,layoutManager.tv&&focusManager.autoFocus(elem)}function discoverDevices(view,apiClient){return loading.show(),view.querySelector(".loadingContent").classList.remove("hide"),ApiClient.getJSON(ApiClient.getUrl("LiveTv/Tuners/Discvover",{NewDevicesOnly:!0})).then(function(devices){currentDevices=devices,renderDevices(view,devices),view.querySelector(".loadingContent").classList.add("hide"),loading.hide()})}function tunerPicker(){var self=this;self.show=function(options){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+='

',html+=globalize.translate("HeaderLiveTvTunerSetup"),html+="

",html+="
",html+=getEditorHtml(),dlg.innerHTML=html,dlg.querySelector(".btnCancel").addEventListener("click",function(){dialogHelper.close(dlg)});var deviceResult;dlg.querySelector(".results").addEventListener("click",function(e){var tunerCard=dom.parentWithClass(e.target,"card");if(tunerCard){var deviceId=tunerCard.getAttribute("data-id");deviceResult=currentDevices.filter(function(d){return d.DeviceId===deviceId})[0],dialogHelper.close(dlg)}}),layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!0);var apiClient=connectionManager.getApiClient(options.serverId);return discoverDevices(dlg,apiClient),layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!1),dialogHelper.open(dlg).then(function(){return deviceResult?Promise.resolve(deviceResult):Promise.reject()})}}var currentDevices=[];return tunerPicker}); \ No newline at end of file +define(["dialogHelper","dom","layoutManager","connectionManager","globalize","loading","material-icons","formDialogStyle","emby-button","emby-itemscontainer","cardStyle"],function(dialogHelper,dom,layoutManager,connectionManager,globalize,loading){"use strict";function getEditorHtml(){var html="";return html+='
',html+='
',html+='
',html+="

"+globalize.translate("DetectingDevices")+"...

",html+="

"+globalize.translate("MessagePleaseWait")+"

",html+="
",html+='

'+globalize.translate("HeaderNewDevices")+"

",html+='
',html+="
",html+="
",html+="
"}function getDeviceHtml(device){var padderClass,html="",cssClass="card scalableCard",cardBoxCssClass="cardBox visualCardBox";return cssClass+=" backdropCard backdropCard-scalable",padderClass="cardPadder-backdrop",layoutManager.tv&&(cssClass+=" card-focusscale",cardBoxCssClass+=" cardBox-focustransform"),cardBoxCssClass+=" card-focuscontent",html+='"}function renderDevices(view,devices){var i,length,html="";for(i=0,length=devices.length;i
"+globalize.translate("NoNewDevicesFound")+"

",view.querySelector(".devicesHeader").classList.add("hide"));var elem=view.querySelector(".results");elem.innerHTML=html,layoutManager.tv&&focusManager.autoFocus(elem)}function discoverDevices(view,apiClient){return loading.show(),view.querySelector(".loadingContent").classList.remove("hide"),ApiClient.getJSON(ApiClient.getUrl("LiveTv/Tuners/Discvover",{NewDevicesOnly:!0})).then(function(devices){currentDevices=devices,renderDevices(view,devices),view.querySelector(".loadingContent").classList.add("hide"),loading.hide()})}function tunerPicker(){var self=this;self.show=function(options){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+='

',html+=globalize.translate("HeaderLiveTvTunerSetup"),html+="

",html+="
",html+=getEditorHtml(),dlg.innerHTML=html,dlg.querySelector(".btnCancel").addEventListener("click",function(){dialogHelper.close(dlg)});var deviceResult;dlg.querySelector(".results").addEventListener("click",function(e){var tunerCard=dom.parentWithClass(e.target,"card");if(tunerCard){var deviceId=tunerCard.getAttribute("data-id");deviceResult=currentDevices.filter(function(d){return d.DeviceId===deviceId})[0],dialogHelper.close(dlg)}}),layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!0);var apiClient=connectionManager.getApiClient(options.serverId);return discoverDevices(dlg,apiClient),layoutManager.tv&¢erFocus(dlg.querySelector(".formDialogContent"),!1,!1),dialogHelper.open(dlg).then(function(){return deviceResult?Promise.resolve(deviceResult):Promise.reject()})}}var currentDevices=[];return tunerPicker}); \ No newline at end of file diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 6507978871..f980ec4d17 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -1 +1 @@ -.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 +.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.5%}.layout-tv .padded-right-withalphapicker{padding-right:4.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/scripts/itemlistpage.js b/dashboard-ui/scripts/itemlistpage.js index cb2183dc42..8ceaf9fc2a 100644 --- a/dashboard-ui/scripts/itemlistpage.js +++ b/dashboard-ui/scripts/itemlistpage.js @@ -1 +1 @@ -define(["events","layoutManager","loading","libraryMenu","libraryBrowser","connectionManager","alphaPicker","listView","cardBuilder","imageLoader","emby-itemscontainer"],function(events,layoutManager,loading,libraryMenu,libraryBrowser,connectionManager,alphaPicker,listView,cardBuilder,imageLoader){"use strict";return function(view,params){function getPageData(){var pageData=data;if(!pageData){pageData=data={query:{SortBy:"IsFolder,SortName",SortOrder:"Ascending",Fields:"DateCreated,PrimaryImageAspectRatio,MediaSourceCount",ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",StartIndex:0,Limit:libraryBrowser.getDefaultPageSize()}},pageData.query.Filters="",pageData.query.NameStartsWithOrGreater="";var key=getSavedQueryKey();pageData.view=libraryBrowser.getSavedView(key)||"Poster",pageData.query.ParentId=params.parentId||null,libraryBrowser.loadSavedQueryValues(key,pageData.query)}return pageData}function getQuery(){return getPageData().query}function getSavedQueryKey(){return view.savedQueryKey||(view.savedQueryKey=libraryBrowser.getSavedQueryKey("itemsv1")),view.savedQueryKey}function onViewStyleChange(){var viewStyle=getPageData(view).view,itemsContainer=view.querySelector("#items");"List"==viewStyle?(itemsContainer.classList.add("vertical-list"),itemsContainer.classList.remove("vertical-wrap")):(itemsContainer.classList.remove("vertical-list"),itemsContainer.classList.add("vertical-wrap"),itemsContainer.classList.add("centered")),itemsContainer.innerHTML=""}function reloadItems(){loading.show();var query=getQuery(),userId=apiClient.getCurrentUserId(),parentItemPromise=query.ParentId?apiClient.getItem(userId,query.ParentId):apiClient.getRootFolder(userId),itemsPromise=apiClient.getItems(userId,query);Promise.all([parentItemPromise,itemsPromise]).then(function(responses){function onNextPageClick(){query.StartIndex+=query.Limit,reloadItems(view)}function onPreviousPageClick(){query.StartIndex-=query.Limit,reloadItems(view)}var item=responses[0];currentItem=item;var result=responses[1];window.scrollTo(0,0);var viewStyle=getPageData(view).view,html="",pagingHtml=libraryBrowser.getQueryPagingHtml({startIndex:query.StartIndex,limit:query.Limit,totalRecordCount:result.TotalRecordCount,showLimit:!1,addLayoutButton:!1,currentLayout:viewStyle,sortButton:!1,filterButton:!1});updateFilterControls();var posterOptions={items:result.Items,shape:"auto",centerText:!0,lazy:!0,coverImage:"PhotoAlbum"==item.Type,context:"folders",action:"PhotoAlbum"===item.Type?"play":null};"PosterCard"==viewStyle?(posterOptions.showTitle=!0,posterOptions.showYear=!0,posterOptions.cardLayout=!0,posterOptions.centerText=!1,posterOptions.vibrant=!0,html=cardBuilder.getCardsHtml(posterOptions)):"List"==viewStyle?html=listView.getListViewHtml({items:result.Items,sortBy:query.SortBy}):"Thumb"==viewStyle?(posterOptions.preferThumb=!0,posterOptions.showTitle=!0,posterOptions.shape="backdrop",posterOptions.centerText=!0,posterOptions.overlayText=!1,posterOptions.overlayMoreButton=!0,html=cardBuilder.getCardsHtml(posterOptions)):(posterOptions.showTitle="PhotoAlbum"!==item.Type||"auto",posterOptions.overlayText="PhotoAlbum"===item.Type,posterOptions.overlayMoreButton=!0,html=cardBuilder.getCardsHtml(posterOptions)),"boxsets"==currentItem.CollectionType?(view.querySelector(".btnNewCollection").classList.remove("hide"),result.Items.length||(html='

'+Globalize.translate("MessageNoCollectionsAvailable")+"

")):view.querySelector(".btnNewCollection").classList.add("hide");var elem=view.querySelector("#items");elem.innerHTML=html,imageLoader.lazyChildren(elem);var i,length,elems=view.querySelectorAll(".paging");for(i=0,length=elems.length;i'+Globalize.translate("MessageNoCollectionsAvailable")+"

")):view.querySelector(".btnNewCollection").classList.add("hide");var elem=view.querySelector("#items");elem.innerHTML=html,imageLoader.lazyChildren(elem);var i,length,elems=view.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 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?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=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 +define(["events","inputManager","libraryMenu","layoutManager","loading","dom","components/categorysyncbuttons","userSettings","cardBuilder","playbackManager","mainTabsManager","scrollStyles","emby-itemscontainer","emby-button"],function(events,inputManager,libraryMenu,layoutManager,loading,dom,categorysyncbuttons,userSettings,cardBuilder,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"),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}),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"),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})})}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/tvshows.js b/dashboard-ui/scripts/tvshows.js index 02150b94d9..fe891794b8 100644 --- a/dashboard-ui/scripts/tvshows.js +++ b/dashboard-ui/scripts/tvshows.js @@ -1 +1 @@ -define(["layoutManager","loading","events","libraryBrowser","imageLoader","listView","cardBuilder","apphost","alphaPicker","emby-itemscontainer"],function(layoutManager,loading,events,libraryBrowser,imageLoader,listView,cardBuilder,appHost,alphaPicker){"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:"Series",Recursive:!0,Fields:"PrimaryImageAspectRatio,BasicSyncInfo",ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",StartIndex:0,Limit:pageSize},view:libraryBrowser.getSavedView(key)||"Poster"},pageData.query.ParentId=params.topParentId,libraryBrowser.loadSavedQueryValues(key,pageData.query)),pageData}function getQuery(context){return getPageData(context).query}function getSavedQueryKey(context){return context.savedQueryKey||(context.savedQueryKey=libraryBrowser.getSavedQueryKey("series")),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:"tvshows",overlayMoreButton:!0,showTitle:!0,centerText:!0}):"ThumbCard"==viewStyle?cardBuilder.getCardsHtml({items:result.Items,shape:"backdrop",preferThumb:!0,context:"tvshows",cardLayout:!0,showTitle:!0,showYear:!0,vibrant:supportsImageAnalysis}):"Banner"==viewStyle?cardBuilder.getCardsHtml({items:result.Items,shape:"banner",preferBanner:!0,context:"tvshows"}):"List"==viewStyle?listView.getListViewHtml({items:result.Items,context:"tvshows",sortBy:query.SortBy}):"PosterCard"==viewStyle?cardBuilder.getCardsHtml({items:result.Items,shape:"portrait",context:"tvshows",showTitle:!0,showYear:!0,cardLayout:!0,vibrant:supportsImageAnalysis}):cardBuilder.getCardsHtml({items:result.Items,shape:"portrait",context:"tvshows",centerText:!0,lazy:!0,overlayMoreButton:!0,showTitle:!0});var i,length,elems=tabContent.querySelectorAll(".paging");for(i=0,length=elems.length;i