diff --git a/dashboard-ui/bower_components/emby-webcomponents/alphapicker/alphapicker.js b/dashboard-ui/bower_components/emby-webcomponents/alphapicker/alphapicker.js index 433f520eb9..aa35bb968f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/alphapicker/alphapicker.js +++ b/dashboard-ui/bower_components/emby-webcomponents/alphapicker/alphapicker.js @@ -1 +1 @@ -define(["focusManager","layoutManager","css!./style.css","paper-icon-button-light","material-icons"],function(focusManager,layoutManager){"use strict";function focus(){var scope=this,selected=scope.querySelector("."+selectedButtonClass);selected?focusManager.focus(selected):focusManager.autoFocus(scope,!0)}function getAlphaPickerButtonClassName(){var alphaPickerButtonClassName="alphaPickerButton";return layoutManager.tv&&(alphaPickerButtonClassName+=" alphaPickerButton-tv"),alphaPickerButtonClassName}function getLetterButton(l){return'"}function render(element,options){element.classList.add("alphaPicker"),element.classList.contains("alphaPicker-vertical")||element.classList.add("focuscontainer-x");var letters,html="",alphaPickerButtonClassName=getAlphaPickerButtonClassName(),rowClassName="alphaPickerRow";element.classList.contains("alphaPicker-vertical")&&(rowClassName+=" alphaPickerRow-vertical"),html+='
',"keyboard"===options.mode?html+='':(letters=["#"],html+=letters.map(getLetterButton).join("")),letters=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],html+=letters.map(getLetterButton).join(""),"keyboard"===options.mode?(html+='',html+="
",letters=["0","1","2","3","4","5","6","7","8","9"],html+='
',html+="
",html+=letters.map(getLetterButton).join(""),html+="
"):html+="",element.innerHTML=html,element.classList.add("focusable"),element.focus=focus}function AlphaPicker(options){function onItemFocusTimeout(){itemFocusTimeout=null,self.value(itemFocusValue)}function onAlphaFocusTimeout(){if(alphaFocusTimeout=null,document.activeElement===alphaFocusedElement){var value=alphaFocusedElement.getAttribute("data-value");self.value(value,!0)}}function parentWithClass(elem,className){for(;!elem.classList||!elem.classList.contains(className);)if(elem=elem.parentNode,!elem)return null;return elem}function onAlphaPickerInKeyboardModeClick(e){var alphaPickerButton=parentWithClass(e.target,"alphaPickerButton");if(alphaPickerButton){var value=alphaPickerButton.getAttribute("data-value");element.dispatchEvent(new CustomEvent("alphavalueclicked",{cancelable:!1,detail:{value:value}}))}}function onAlphaPickerClick(e){var alphaPickerButton=parentWithClass(e.target,"alphaPickerButton");if(alphaPickerButton){var value=alphaPickerButton.getAttribute("data-value");currentValue===value.toUpperCase()?self.value(null,!0):self.value(value,!0)}}function onAlphaPickerFocusIn(e){alphaFocusTimeout&&(clearTimeout(alphaFocusTimeout),alphaFocusTimeout=null);var alphaPickerButton=parentWithClass(e.target,"alphaPickerButton");alphaPickerButton&&(alphaFocusedElement=alphaPickerButton,alphaFocusTimeout=setTimeout(onAlphaFocusTimeout,100))}function onItemsFocusIn(e){var item=parentWithClass(e.target,itemClass);if(item){var prefix=item.getAttribute("data-prefix");prefix&&prefix.length&&(itemFocusValue=prefix[0],itemFocusTimeout&&clearTimeout(itemFocusTimeout),itemFocusTimeout=setTimeout(onItemFocusTimeout,100))}}var itemFocusValue,itemFocusTimeout,alphaFocusedElement,alphaFocusTimeout,self=this,element=options.element,itemsContainer=options.itemsContainer,itemClass=options.itemClass;self.enabled=function(enabled){enabled?(itemsContainer&&itemsContainer.addEventListener("focus",onItemsFocusIn,!0),"keyboard"===options.mode&&element.addEventListener("click",onAlphaPickerInKeyboardModeClick),"click"!==options.valueChangeEvent?element.addEventListener("focus",onAlphaPickerFocusIn,!0):element.addEventListener("click",onAlphaPickerClick)):(itemsContainer&&itemsContainer.removeEventListener("focus",onItemsFocusIn,!0),element.removeEventListener("click",onAlphaPickerInKeyboardModeClick),element.removeEventListener("focus",onAlphaPickerFocusIn,!0),element.removeEventListener("click",onAlphaPickerClick))},self.on=function(name,fn){element.addEventListener(name,fn)},self.off=function(name,fn){element.removeEventListener(name,fn)},self.destroy=function(){self.enabled(!1),element.classList.remove("focuscontainer-x")},self.visible=function(visible){element.style.visibility=visible?"visible":"hidden"};var currentValue;self.value=function(value,applyValue){var btn,selected;return void 0!==value&&(null!=value?(value=value.toUpperCase(),currentValue=value,"keyboard"!==options.mode&&(selected=element.querySelector("."+selectedButtonClass),btn=element.querySelector(".alphaPickerButton[data-value='"+value+"']"),btn&&btn!==selected&&btn.classList.add(selectedButtonClass),selected&&selected!==btn&&selected.classList.remove(selectedButtonClass))):(currentValue=value,selected=element.querySelector("."+selectedButtonClass),selected&&selected.classList.remove(selectedButtonClass))),applyValue&&element.dispatchEvent(new CustomEvent("alphavaluechanged",{cancelable:!1,detail:{value:value}})),currentValue},self.values=function(){for(var elems=element.querySelectorAll(".alphaPickerButton"),values=[],i=0,length=elems.length;i'+l+""}function render(element,options){element.classList.add("alphaPicker"),element.classList.contains("alphaPicker-vertical")||element.classList.add("focuscontainer-x");var letters,html="",alphaPickerButtonClassName=getAlphaPickerButtonClassName(),rowClassName="alphaPickerRow";element.classList.contains("alphaPicker-vertical")&&(rowClassName+=" alphaPickerRow-vertical"),html+='
',"keyboard"===options.mode?html+='':(letters=["#"],html+=letters.map(getLetterButton).join("")),letters=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],html+=letters.map(getLetterButton).join(""),"keyboard"===options.mode?(html+='',html+="
",letters=["0","1","2","3","4","5","6","7","8","9"],html+='
',html+="
",html+=letters.map(getLetterButton).join(""),html+="
"):html+="",element.innerHTML=html,element.classList.add("focusable"),element.focus=focus}function AlphaPicker(options){function onItemFocusTimeout(){itemFocusTimeout=null,self.value(itemFocusValue)}function onAlphaFocusTimeout(){if(alphaFocusTimeout=null,document.activeElement===alphaFocusedElement){var value=alphaFocusedElement.getAttribute("data-value");self.value(value,!0)}}function onAlphaPickerInKeyboardModeClick(e){var alphaPickerButton=dom.parentWithClass(e.target,"alphaPickerButton");if(alphaPickerButton){var value=alphaPickerButton.getAttribute("data-value");element.dispatchEvent(new CustomEvent("alphavalueclicked",{cancelable:!1,detail:{value:value}}))}}function onAlphaPickerClick(e){var alphaPickerButton=dom.parentWithClass(e.target,"alphaPickerButton");if(alphaPickerButton){var value=alphaPickerButton.getAttribute("data-value");this._currentValue===value.toUpperCase()?self.value(null,!0):self.value(value,!0)}}function onAlphaPickerFocusIn(e){alphaFocusTimeout&&(clearTimeout(alphaFocusTimeout),alphaFocusTimeout=null);var alphaPickerButton=dom.parentWithClass(e.target,"alphaPickerButton");alphaPickerButton&&(alphaFocusedElement=alphaPickerButton,alphaFocusTimeout=setTimeout(onAlphaFocusTimeout,100))}function onItemsFocusIn(e){var item=dom.parentWithClass(e.target,itemClass);if(item){var prefix=item.getAttribute("data-prefix");prefix&&prefix.length&&(itemFocusValue=prefix[0],itemFocusTimeout&&clearTimeout(itemFocusTimeout),itemFocusTimeout=setTimeout(onItemFocusTimeout,100))}}var self=this;this.options=options;var itemFocusValue,itemFocusTimeout,alphaFocusedElement,alphaFocusTimeout,element=options.element,itemsContainer=options.itemsContainer,itemClass=options.itemClass;self.enabled=function(enabled){enabled?(itemsContainer&&itemsContainer.addEventListener("focus",onItemsFocusIn,!0),"keyboard"===options.mode&&element.addEventListener("click",onAlphaPickerInKeyboardModeClick),"click"!==options.valueChangeEvent?element.addEventListener("focus",onAlphaPickerFocusIn,!0):element.addEventListener("click",onAlphaPickerClick)):(itemsContainer&&itemsContainer.removeEventListener("focus",onItemsFocusIn,!0),element.removeEventListener("click",onAlphaPickerInKeyboardModeClick),element.removeEventListener("focus",onAlphaPickerFocusIn,!0),element.removeEventListener("click",onAlphaPickerClick))},render(element,options),this.enabled(!0),this.visible(!0)}var selectedButtonClass="alphaPickerButton-selected";return AlphaPicker.prototype.value=function(value,applyValue){var btn,selected,element=this.options.element;return void 0!==value&&(null!=value?(value=value.toUpperCase(),this._currentValue=value,"keyboard"!==this.options.mode&&(selected=element.querySelector("."+selectedButtonClass),btn=element.querySelector(".alphaPickerButton[data-value='"+value+"']"),btn&&btn!==selected&&btn.classList.add(selectedButtonClass),selected&&selected!==btn&&selected.classList.remove(selectedButtonClass))):(this._currentValue=value,selected=element.querySelector("."+selectedButtonClass),selected&&selected.classList.remove(selectedButtonClass))),applyValue&&element.dispatchEvent(new CustomEvent("alphavaluechanged",{cancelable:!1,detail:{value:value}})),this._currentValue},AlphaPicker.prototype.on=function(name,fn){var element=this.options.element;element.addEventListener(name,fn)},AlphaPicker.prototype.off=function(name,fn){var element=this.options.element;element.removeEventListener(name,fn)},AlphaPicker.prototype.visible=function(visible){var element=this.options.element;element.style.visibility=visible?"visible":"hidden"},AlphaPicker.prototype.values=function(){for(var element=this.options.element,elems=element.querySelectorAll(".alphaPickerButton"),values=[],i=0,length=elems.length;i";var chkItemSelect=itemSelectionPanel.querySelector(".chkItemSelect");chkItemSelect.addEventListener("change",onSelectionChange)}}function showSelectionCommands(){var selectionCommandsPanel=currentSelectionCommandsPanel;if(!selectionCommandsPanel){selectionCommandsPanel=document.createElement("div"),selectionCommandsPanel.classList.add("selectionCommandsPanel"),document.body.appendChild(selectionCommandsPanel),currentSelectionCommandsPanel=selectionCommandsPanel;var html="";html+='',html+='

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

';var moreIcon="dots-horiz"===appHost.moreIcon?"":"";html+='",selectionCommandsPanel.innerHTML=html,selectionCommandsPanel.querySelector(".btnCloseSelectionPanel").addEventListener("click",hideSelections);var btnSelectionPanelOptions=selectionCommandsPanel.querySelector(".btnSelectionPanelOptions");btnSelectionPanelOptions.addEventListener("click",showMenuForSelectedItems)}}function deleteItems(apiClient,itemIds){return new Promise(function(resolve,reject){var msg=globalize.translate("sharedcomponents#ConfirmDeleteItem"),title=globalize.translate("sharedcomponents#HeaderDeleteItem");itemIds.length>1&&(msg=globalize.translate("sharedcomponents#ConfirmDeleteItems"),title=globalize.translate("sharedcomponents#HeaderDeleteItems")),require(["confirm"],function(confirm){confirm(msg,title).then(function(){var promises=itemIds.map(function(itemId){apiClient.deleteItem(itemId)});Promise.all(promises).then(resolve)},reject)})})}function showMenuForSelectedItems(e){var apiClient=connectionManager.currentApiClient();apiClient.getCurrentUser().then(function(user){var menuItems=[];menuItems.push({name:globalize.translate("sharedcomponents#AddToCollection"),id:"addtocollection",ironIcon:"add"}),menuItems.push({name:globalize.translate("sharedcomponents#AddToPlaylist"),id:"playlist",ironIcon:"playlist-add"}),user.Policy.EnableContentDeletion&&menuItems.push({name:globalize.translate("sharedcomponents#Delete"),id:"delete",ironIcon:"delete"}),user.Policy.EnableContentDownloading&&appHost.supports("filedownload"),menuItems.push({name:globalize.translate("sharedcomponents#GroupVersions"),id:"groupvideos",ironIcon:"call-merge"}),user.Policy.EnableContentDownloading&&appHost.supports("sync")&&menuItems.push({name:globalize.translate("sharedcomponents#MakeAvailableOffline"),id:"synclocal"}),menuItems.push({name:globalize.translate("sharedcomponents#MarkPlayed"),id:"markplayed"}),menuItems.push({name:globalize.translate("sharedcomponents#MarkUnplayed"),id:"markunplayed"}),menuItems.push({name:globalize.translate("sharedcomponents#Refresh"),id:"refresh"}),user.Policy.EnableContentDownloading&&menuItems.push({name:globalize.translate("sharedcomponents#SyncToOtherDevice"),id:"sync"}),require(["actionsheet"],function(actionsheet){actionsheet.show({items:menuItems,positionTo:e.target,callback:function(id){var items=selectedItems.slice(0),serverId=apiClient.serverInfo().Id;switch(id){case"addtocollection":require(["collectionEditor"],function(collectionEditor){(new collectionEditor).show({items:items,serverId:serverId})}),hideSelections(),dispatchNeedsRefresh();break;case"playlist":require(["playlistEditor"],function(playlistEditor){(new playlistEditor).show({items:items,serverId:serverId})}),hideSelections(),dispatchNeedsRefresh();break;case"delete":deleteItems(apiClient,items).then(function(){embyRouter.goHome()}),hideSelections(),dispatchNeedsRefresh();break;case"groupvideos":combineVersions(apiClient,items);break;case"markplayed":items.forEach(function(itemId){apiClient.markPlayed(apiClient.getCurrentUserId(),itemId)}),hideSelections(),dispatchNeedsRefresh();break;case"markunplayed":items.forEach(function(itemId){apiClient.markUnplayed(apiClient.getCurrentUserId(),itemId)}),hideSelections(),dispatchNeedsRefresh();break;case"refresh":require(["refreshDialog"],function(refreshDialog){new refreshDialog({itemIds:items,serverId:serverId}).show()}),hideSelections(),dispatchNeedsRefresh();break;case"sync":require(["syncDialog"],function(syncDialog){syncDialog.showMenu({items:items.map(function(i){return{Id:i}}),serverId:serverId})}),hideSelections(),dispatchNeedsRefresh();break;case"synclocal":require(["syncDialog"],function(syncDialog){syncDialog.showMenu({items:items.map(function(i){return{Id:i}}),isLocalSync:!0,serverId:serverId})}),hideSelections(),dispatchNeedsRefresh()}}})})})}function dispatchNeedsRefresh(){var elems=[];[].forEach.call(selectedElements,function(i){var container=dom.parentWithAttribute(i,"is","emby-itemscontainer");container&&elems.indexOf(container)===-1&&elems.push(container)});for(var i=0,length=elems.length;i=5||deltaY>=5)&&onMouseOut(e)}}function onTouchEnd(e){onMouseOut(e)}function onMouseDown(e){touchStartTimeout&&(clearTimeout(touchStartTimeout),touchStartTimeout=null),touchTarget=e.target,touchStartTimeout=setTimeout(onTouchStartTimerFired,550)}function onMouseOut(e){touchStartTimeout&&(clearTimeout(touchStartTimeout),touchStartTimeout=null),touchTarget=null}function onTouchStartTimerFired(){if(touchTarget){var card=dom.parentWithClass(touchTarget,"card");touchTarget=null,card&&showSelections(card)}}function initTapHold(element){browser.touch&&!browser.safari?element.addEventListener("contextmenu",onTapHold):(dom.addEventListener(element,"touchstart",onTouchStart,{passive:!0}),dom.addEventListener(element,"touchmove",onTouchMove,{passive:!0}),dom.addEventListener(element,"touchend",onTouchEnd,{passive:!0}),dom.addEventListener(element,"touchcancel",onTouchEnd,{passive:!0}),dom.addEventListener(element,"mousedown",onMouseDown,{passive:!0}),dom.addEventListener(element,"mouseleave",onMouseOut,{passive:!0}),dom.addEventListener(element,"mouseup",onMouseOut,{passive:!0}))}var touchTarget,touchStartTimeout,touchStartX,touchStartY,self=this,container=options.container;initTapHold(container),options.bindOnClick!==!1&&container.addEventListener("click",onContainerClick),self.onContainerClick=onContainerClick,self.destroy=function(){container.removeEventListener("click",onContainerClick),container.removeEventListener("contextmenu",onTapHold);var element=container;dom.removeEventListener(element,"touchstart",onTouchStart,{passive:!0}),dom.removeEventListener(element,"touchmove",onTouchMove,{passive:!0}),dom.removeEventListener(element,"touchend",onTouchEnd,{passive:!0}),dom.removeEventListener(element,"mousedown",onMouseDown,{passive:!0}),dom.removeEventListener(element,"mouseleave",onMouseOut,{passive:!0}),dom.removeEventListener(element,"mouseup",onMouseOut,{passive:!0})}}}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/sessionplayer.js b/dashboard-ui/bower_components/emby-webcomponents/sessionplayer.js index 0f9d231e3e..a97162ee5b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/sessionplayer.js +++ b/dashboard-ui/bower_components/emby-webcomponents/sessionplayer.js @@ -1 +1 @@ -define(["playbackManager","events","serverNotifications","connectionManager"],function(playbackManager,events,serverNotifications,connectionManager){"use strict";function getActivePlayerId(){var info=playbackManager.getPlayerInfo();return info?info.id:null}function sendPlayCommand(apiClient,options,playType){var sessionId=getActivePlayerId(),ids=options.ids||options.items.map(function(i){return i.Id}),remoteOptions={ItemIds:ids.join(","),PlayCommand:playType};return options.startPositionTicks&&(remoteOptions.startPositionTicks=options.startPositionTicks),apiClient.sendPlayCommand(sessionId,remoteOptions)}function sendPlayStateCommand(apiClient,command,options){var sessionId=getActivePlayerId();apiClient.sendPlayStateCommand(sessionId,command,options)}function getCurrentApiClient(instance){var currentServerId=instance.currentServerId;return currentServerId?connectionManager.getApiClient(currentServerId):connectionManager.currentApiClient()}function sendCommandByName(instance,name,options){var command={Name:name};options&&(command.Arguments=options),instance.sendCommand(command)}function unsubscribeFromPlayerUpdates(instance){instance.isUpdating=!0;var apiClient=getCurrentApiClient(instance);apiClient.isWebSocketOpen()&&apiClient.sendWebSocketMessage("SessionsStop"),instance.pollInterval&&(clearInterval(instance.pollInterval),instance.pollInterval=null)}function processUpdatedSessions(instance,sessions,apiClient){var serverId=apiClient.serverId();sessions.map(function(s){s.NowPlayingItem&&(s.NowPlayingItem.ServerId=serverId)});var currentTargetId=getActivePlayerId(),session=sessions.filter(function(s){return s.Id===currentTargetId})[0];session&&(firePlaybackEvent(instance,"statechange",session,apiClient),firePlaybackEvent(instance,"timeupdate",session,apiClient),firePlaybackEvent(instance,"pause",session,apiClient))}function onPollIntervalFired(){var instance=this,apiClient=getCurrentApiClient(instance);apiClient.isWebSocketOpen()||apiClient&&apiClient.getSessions().then(function(sessions){processUpdatedSessions(instance,sessions,apiClient)})}function subscribeToPlayerUpdates(instance){instance.isUpdating=!0;var apiClient=getCurrentApiClient(instance);apiClient.isWebSocketOpen()&&apiClient.sendWebSocketMessage("SessionsStart","100,800"),instance.pollInterval&&(clearInterval(instance.pollInterval),instance.pollInterval=null),instance.pollInterval=setInterval(onPollIntervalFired.bind(instance),5e3)}function getPlayerState(session){return session}function normalizeImages(state,apiClient){if(state&&state.NowPlayingItem){var item=state.NowPlayingItem;item.ImageTags&&item.ImageTags.Primary||item.PrimaryImageTag&&(item.ImageTags=item.ImageTags||{},item.ImageTags.Primary=item.PrimaryImageTag),item.BackdropImageTag&&item.BackdropItemId===item.Id&&(item.BackdropImageTags=[item.BackdropImageTag]),item.BackdropImageTag&&item.BackdropItemId!==item.Id&&(item.ParentBackdropImageTags=[item.BackdropImageTag],item.ParentBackdropItemId=item.BackdropItemId),item.ServerId||(item.ServerId=apiClient.serverId())}}function firePlaybackEvent(instance,name,session,apiClient){var state=getPlayerState(session);normalizeImages(state,apiClient),instance.lastPlayerData=state,events.trigger(instance,name,[state])}function SessionPlayer(){var self=this;this.name="Remote Control",this.type="mediaplayer",this.isLocalPlayer=!1,this.id="remoteplayer",events.on(serverNotifications,"Sessions",function(e,apiClient,data){processUpdatedSessions(self,data,apiClient)}),events.on(serverNotifications,"SessionEnded",function(e,apiClient,data){console.log("Server reports another session ended"),getActivePlayerId()===data.Id&&playbackManager.setDefaultPlayerActive()}),events.on(serverNotifications,"PlaybackStart",function(e,apiClient,data){data.DeviceId!==apiClient.deviceId()&&getActivePlayerId()===data.Id&&firePlaybackEvent(self,"playbackstart",data,apiClient)}),events.on(serverNotifications,"PlaybackStopped",function(e,apiClient,data){data.DeviceId!==apiClient.deviceId()&&getActivePlayerId()===data.Id&&firePlaybackEvent(self,"playbackstop",data,apiClient)})}return SessionPlayer.prototype.beginPlayerUpdates=function(){this.playerListenerCount=this.playerListenerCount||0,this.playerListenerCount<=0&&(this.playerListenerCount=0,subscribeToPlayerUpdates(this)),this.playerListenerCount++},SessionPlayer.prototype.endPlayerUpdates=function(){this.playerListenerCount=this.playerListenerCount||0,this.playerListenerCount--,this.playerListenerCount<=0&&(unsubscribeFromPlayerUpdates(this),this.playerListenerCount=0)},SessionPlayer.prototype.getPlayerState=function(){var apiClient=getCurrentApiClient(this);return apiClient?apiClient.getSessions().then(function(sessions){var currentTargetId=getActivePlayerId(),session=sessions.filter(function(s){return s.Id===currentTargetId})[0];return session&&(session=getPlayerState(session)),session}):Promise.resolve({})},SessionPlayer.prototype.getTargets=function(){var apiClient=getCurrentApiClient(this),sessionQuery={ControllableByUserId:apiClient.getCurrentUserId()};if(apiClient){var name=this.name;return apiClient.getSessions(sessionQuery).then(function(sessions){return sessions.filter(function(s){return s.DeviceId!==apiClient.deviceId()}).map(function(s){return{name:s.DeviceName,deviceName:s.DeviceName,id:s.Id,playerName:name,appName:s.Client,playableMediaTypes:s.PlayableMediaTypes,isLocalPlayer:!1,supportedCommands:s.SupportedCommands}})})}return Promise.resolve([])},SessionPlayer.prototype.sendCommand=function(command){var sessionId=getActivePlayerId(),apiClient=getCurrentApiClient(this);apiClient.sendCommand(sessionId,command)},SessionPlayer.prototype.play=function(options){var playOptions={};return playOptions.ids=options.ids||options.items.map(function(i){return i.Id}),options.startPositionTicks&&(playOptions.startPositionTicks=options.startPositionTicks),sendPlayCommand(getCurrentApiClient(),playOptions,"PlayNow")},SessionPlayer.prototype.shuffle=function(item){sendPlayCommand(getCurrentApiClient(),{ids:[item.Id]},"PlayShuffle")},SessionPlayer.prototype.instantMix=function(item){sendPlayCommand(getCurrentApiClient(this),{ids:[item.Id]},"PlayInstantMix")},SessionPlayer.prototype.queue=function(options){sendPlayCommand(getCurrentApiClient(this),options,"PlayNext")},SessionPlayer.prototype.queueNext=function(options){sendPlayCommand(getCurrentApiClient(this),options,"PlayLast")},SessionPlayer.prototype.canPlayMediaType=function(mediaType){return mediaType=(mediaType||"").toLowerCase(),"audio"===mediaType||"video"===mediaType},SessionPlayer.prototype.canQueueMediaType=function(mediaType){return this.canPlayMediaType(mediaType)},SessionPlayer.prototype.stop=function(){sendPlayStateCommand(getCurrentApiClient(this),"stop")},SessionPlayer.prototype.nextTrack=function(){sendPlayStateCommand(getCurrentApiClient(this),"nextTrack")},SessionPlayer.prototype.previousTrack=function(){sendPlayStateCommand(getCurrentApiClient(this),"previousTrack")},SessionPlayer.prototype.seek=function(positionTicks){sendPlayStateCommand(getCurrentApiClient(this),"seek",{SeekPositionTicks:positionTicks})},SessionPlayer.prototype.currentTime=function(val){if(null!=val)return this.seek(val);var state=this.lastPlayerData||{};return state=state.PlayState||{},state.PositionTicks},SessionPlayer.prototype.duration=function(){var state=this.lastPlayerData||{};return state=state.NowPlayingItem||{},state.RunTimeTicks},SessionPlayer.prototype.paused=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.IsPaused},SessionPlayer.prototype.getVolume=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.VolumeLevel},SessionPlayer.prototype.pause=function(){sendPlayStateCommand(getCurrentApiClient(this),"Pause")},SessionPlayer.prototype.unpause=function(){sendPlayStateCommand(getCurrentApiClient(this),"Unpause")},SessionPlayer.prototype.setMute=function(isMuted){isMuted?sendCommandByName(this,"Mute"):sendCommandByName(this,"Unmute")},SessionPlayer.prototype.toggleMute=function(){sendCommandByName(this,"ToggleMute")},SessionPlayer.prototype.setVolume=function(vol){sendCommandByName(this,"SetVolume",{Volume:vol})},SessionPlayer.prototype.volumeUp=function(){sendCommandByName(this,"VolumeUp")},SessionPlayer.prototype.volumeDown=function(){sendCommandByName(this,"VolumeDown")},SessionPlayer.prototype.toggleFullscreen=function(){sendCommandByName(this,"ToggleFullscreen")},SessionPlayer.prototype.audioTracks=function(){var state=this.lastPlayerData||{};state=state.NowPlayingItem||{};var streams=state.MediaStreams||[];return streams.filter(function(s){return"Audio"===s.Type})},SessionPlayer.prototype.getAudioStreamIndex=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.AudioStreamIndex},SessionPlayer.prototype.setAudioStreamIndex=function(index){sendCommandByName(this,"SetAudioStreamIndex",{Index:index})},SessionPlayer.prototype.subtitleTracks=function(){var state=this.lastPlayerData||{};state=state.NowPlayingItem||{};var streams=state.MediaStreams||[];return streams.filter(function(s){return"Subtitle"===s.Type})},SessionPlayer.prototype.getSubtitleStreamIndex=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.SubtitleStreamIndex},SessionPlayer.prototype.setSubtitleStreamIndex=function(index){sendCommandByName(this,"SetSubtitleStreamIndex",{Index:index})},SessionPlayer.prototype.getMaxStreamingBitrate=function(){},SessionPlayer.prototype.setMaxStreamingBitrate=function(options){},SessionPlayer.prototype.isFullscreen=function(){},SessionPlayer.prototype.toggleFullscreen=function(){},SessionPlayer.prototype.getRepeatMode=function(){},SessionPlayer.prototype.setRepeatMode=function(mode){sendCommandByName(this,"SetRepeatMode",{RepeatMode:mode})},SessionPlayer.prototype.displayContent=function(options){sendCommandByName(this,"DisplayContent",options)},SessionPlayer.prototype.isPlaying=function(){var state=this.lastPlayerData||{};return null!=state.NowPlayingItem},SessionPlayer.prototype.isPlayingVideo=function(){var state=this.lastPlayerData||{};return state=state.NowPlayingItem||{},"Video"===state.MediaType},SessionPlayer.prototype.isPlayingAudio=function(){var state=this.lastPlayerData||{};return state=state.NowPlayingItem||{},"Audio"===state.MediaType},SessionPlayer.prototype.getPlaylist=function(){return Promise.resolve([])},SessionPlayer.prototype.getCurrentPlaylistItemId=function(){},SessionPlayer.prototype.setCurrentPlaylistItem=function(playlistItemId){return Promise.resolve()},SessionPlayer.prototype.removeFromPlaylist=function(playlistItemIds){return Promise.resolve()},SessionPlayer.prototype.tryPair=function(target){return Promise.resolve()},SessionPlayer}); \ No newline at end of file +define(["playbackManager","events","serverNotifications","connectionManager"],function(playbackManager,events,serverNotifications,connectionManager){"use strict";function getActivePlayerId(){var info=playbackManager.getPlayerInfo();return info?info.id:null}function sendPlayCommand(apiClient,options,playType){var sessionId=getActivePlayerId(),ids=options.ids||options.items.map(function(i){return i.Id}),remoteOptions={ItemIds:ids.join(","),PlayCommand:playType};return options.startPositionTicks&&(remoteOptions.startPositionTicks=options.startPositionTicks),apiClient.sendPlayCommand(sessionId,remoteOptions)}function sendPlayStateCommand(apiClient,command,options){var sessionId=getActivePlayerId();apiClient.sendPlayStateCommand(sessionId,command,options)}function getCurrentApiClient(instance){var currentServerId=instance.currentServerId;return currentServerId?connectionManager.getApiClient(currentServerId):connectionManager.currentApiClient()}function sendCommandByName(instance,name,options){var command={Name:name};options&&(command.Arguments=options),instance.sendCommand(command)}function unsubscribeFromPlayerUpdates(instance){instance.isUpdating=!0;var apiClient=getCurrentApiClient(instance);apiClient.isWebSocketOpen()&&apiClient.sendWebSocketMessage("SessionsStop"),instance.pollInterval&&(clearInterval(instance.pollInterval),instance.pollInterval=null)}function processUpdatedSessions(instance,sessions,apiClient){var serverId=apiClient.serverId();sessions.map(function(s){s.NowPlayingItem&&(s.NowPlayingItem.ServerId=serverId)});var currentTargetId=getActivePlayerId(),session=sessions.filter(function(s){return s.Id===currentTargetId})[0];session&&(firePlaybackEvent(instance,"statechange",session,apiClient),firePlaybackEvent(instance,"timeupdate",session,apiClient),firePlaybackEvent(instance,"pause",session,apiClient))}function onPollIntervalFired(){var instance=this,apiClient=getCurrentApiClient(instance);apiClient.isWebSocketOpen()||apiClient&&apiClient.getSessions().then(function(sessions){processUpdatedSessions(instance,sessions,apiClient)})}function subscribeToPlayerUpdates(instance){instance.isUpdating=!0;var apiClient=getCurrentApiClient(instance);apiClient.isWebSocketOpen()&&apiClient.sendWebSocketMessage("SessionsStart","100,800"),instance.pollInterval&&(clearInterval(instance.pollInterval),instance.pollInterval=null),instance.pollInterval=setInterval(onPollIntervalFired.bind(instance),5e3)}function getPlayerState(session){return session}function normalizeImages(state,apiClient){if(state&&state.NowPlayingItem){var item=state.NowPlayingItem;item.ImageTags&&item.ImageTags.Primary||item.PrimaryImageTag&&(item.ImageTags=item.ImageTags||{},item.ImageTags.Primary=item.PrimaryImageTag),item.BackdropImageTag&&item.BackdropItemId===item.Id&&(item.BackdropImageTags=[item.BackdropImageTag]),item.BackdropImageTag&&item.BackdropItemId!==item.Id&&(item.ParentBackdropImageTags=[item.BackdropImageTag],item.ParentBackdropItemId=item.BackdropItemId),item.ServerId||(item.ServerId=apiClient.serverId())}}function firePlaybackEvent(instance,name,session,apiClient){var state=getPlayerState(session);normalizeImages(state,apiClient),instance.lastPlayerData=state,events.trigger(instance,name,[state])}function SessionPlayer(){var self=this;this.name="Remote Control",this.type="mediaplayer",this.isLocalPlayer=!1,this.id="remoteplayer",events.on(serverNotifications,"Sessions",function(e,apiClient,data){processUpdatedSessions(self,data,apiClient)}),events.on(serverNotifications,"SessionEnded",function(e,apiClient,data){console.log("Server reports another session ended"),getActivePlayerId()===data.Id&&playbackManager.setDefaultPlayerActive()}),events.on(serverNotifications,"PlaybackStart",function(e,apiClient,data){data.DeviceId!==apiClient.deviceId()&&getActivePlayerId()===data.Id&&firePlaybackEvent(self,"playbackstart",data,apiClient)}),events.on(serverNotifications,"PlaybackStopped",function(e,apiClient,data){data.DeviceId!==apiClient.deviceId()&&getActivePlayerId()===data.Id&&firePlaybackEvent(self,"playbackstop",data,apiClient)})}return SessionPlayer.prototype.beginPlayerUpdates=function(){this.playerListenerCount=this.playerListenerCount||0,this.playerListenerCount<=0&&(this.playerListenerCount=0,subscribeToPlayerUpdates(this)),this.playerListenerCount++},SessionPlayer.prototype.endPlayerUpdates=function(){this.playerListenerCount=this.playerListenerCount||0,this.playerListenerCount--,this.playerListenerCount<=0&&(unsubscribeFromPlayerUpdates(this),this.playerListenerCount=0)},SessionPlayer.prototype.getPlayerState=function(){var apiClient=getCurrentApiClient(this);return apiClient?apiClient.getSessions().then(function(sessions){var currentTargetId=getActivePlayerId(),session=sessions.filter(function(s){return s.Id===currentTargetId})[0];return session&&(session=getPlayerState(session)),session}):Promise.resolve({})},SessionPlayer.prototype.getTargets=function(){var apiClient=getCurrentApiClient(this),sessionQuery={ControllableByUserId:apiClient.getCurrentUserId()};if(apiClient){var name=this.name;return apiClient.getSessions(sessionQuery).then(function(sessions){return sessions.filter(function(s){return s.DeviceId!==apiClient.deviceId()}).map(function(s){return{name:s.DeviceName,deviceName:s.DeviceName,id:s.Id,playerName:name,appName:s.Client,playableMediaTypes:s.PlayableMediaTypes,isLocalPlayer:!1,supportedCommands:s.SupportedCommands}})})}return Promise.resolve([])},SessionPlayer.prototype.sendCommand=function(command){var sessionId=getActivePlayerId(),apiClient=getCurrentApiClient(this);apiClient.sendCommand(sessionId,command)},SessionPlayer.prototype.play=function(options){var playOptions={};return playOptions.ids=options.ids||options.items.map(function(i){return i.Id}),options.startPositionTicks&&(playOptions.startPositionTicks=options.startPositionTicks),sendPlayCommand(getCurrentApiClient(this),playOptions,"PlayNow")},SessionPlayer.prototype.shuffle=function(item){sendPlayCommand(getCurrentApiClient(this),{ids:[item.Id]},"PlayShuffle")},SessionPlayer.prototype.instantMix=function(item){sendPlayCommand(getCurrentApiClient(this),{ids:[item.Id]},"PlayInstantMix")},SessionPlayer.prototype.queue=function(options){sendPlayCommand(getCurrentApiClient(this),options,"PlayNext")},SessionPlayer.prototype.queueNext=function(options){sendPlayCommand(getCurrentApiClient(this),options,"PlayLast")},SessionPlayer.prototype.canPlayMediaType=function(mediaType){return mediaType=(mediaType||"").toLowerCase(),"audio"===mediaType||"video"===mediaType},SessionPlayer.prototype.canQueueMediaType=function(mediaType){return this.canPlayMediaType(mediaType)},SessionPlayer.prototype.stop=function(){sendPlayStateCommand(getCurrentApiClient(this),"stop")},SessionPlayer.prototype.nextTrack=function(){sendPlayStateCommand(getCurrentApiClient(this),"nextTrack")},SessionPlayer.prototype.previousTrack=function(){sendPlayStateCommand(getCurrentApiClient(this),"previousTrack")},SessionPlayer.prototype.seek=function(positionTicks){sendPlayStateCommand(getCurrentApiClient(this),"seek",{SeekPositionTicks:positionTicks})},SessionPlayer.prototype.currentTime=function(val){if(null!=val)return this.seek(val);var state=this.lastPlayerData||{};return state=state.PlayState||{},state.PositionTicks},SessionPlayer.prototype.duration=function(){var state=this.lastPlayerData||{};return state=state.NowPlayingItem||{},state.RunTimeTicks},SessionPlayer.prototype.paused=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.IsPaused},SessionPlayer.prototype.getVolume=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.VolumeLevel},SessionPlayer.prototype.pause=function(){sendPlayStateCommand(getCurrentApiClient(this),"Pause")},SessionPlayer.prototype.unpause=function(){sendPlayStateCommand(getCurrentApiClient(this),"Unpause")},SessionPlayer.prototype.playPause=function(){this.paused()?this.unpause():this.pause()},SessionPlayer.prototype.setMute=function(isMuted){isMuted?sendCommandByName(this,"Mute"):sendCommandByName(this,"Unmute")},SessionPlayer.prototype.toggleMute=function(){sendCommandByName(this,"ToggleMute")},SessionPlayer.prototype.setVolume=function(vol){sendCommandByName(this,"SetVolume",{Volume:vol})},SessionPlayer.prototype.volumeUp=function(){sendCommandByName(this,"VolumeUp")},SessionPlayer.prototype.volumeDown=function(){sendCommandByName(this,"VolumeDown")},SessionPlayer.prototype.toggleFullscreen=function(){sendCommandByName(this,"ToggleFullscreen")},SessionPlayer.prototype.audioTracks=function(){var state=this.lastPlayerData||{};state=state.NowPlayingItem||{};var streams=state.MediaStreams||[];return streams.filter(function(s){return"Audio"===s.Type})},SessionPlayer.prototype.getAudioStreamIndex=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.AudioStreamIndex},SessionPlayer.prototype.setAudioStreamIndex=function(index){sendCommandByName(this,"SetAudioStreamIndex",{Index:index})},SessionPlayer.prototype.subtitleTracks=function(){var state=this.lastPlayerData||{};state=state.NowPlayingItem||{};var streams=state.MediaStreams||[];return streams.filter(function(s){return"Subtitle"===s.Type})},SessionPlayer.prototype.getSubtitleStreamIndex=function(){var state=this.lastPlayerData||{};return state=state.PlayState||{},state.SubtitleStreamIndex},SessionPlayer.prototype.setSubtitleStreamIndex=function(index){sendCommandByName(this,"SetSubtitleStreamIndex",{Index:index})},SessionPlayer.prototype.getMaxStreamingBitrate=function(){},SessionPlayer.prototype.setMaxStreamingBitrate=function(options){},SessionPlayer.prototype.isFullscreen=function(){},SessionPlayer.prototype.toggleFullscreen=function(){},SessionPlayer.prototype.getRepeatMode=function(){},SessionPlayer.prototype.setRepeatMode=function(mode){sendCommandByName(this,"SetRepeatMode",{RepeatMode:mode})},SessionPlayer.prototype.displayContent=function(options){sendCommandByName(this,"DisplayContent",options)},SessionPlayer.prototype.isPlaying=function(){var state=this.lastPlayerData||{};return null!=state.NowPlayingItem},SessionPlayer.prototype.isPlayingVideo=function(){var state=this.lastPlayerData||{};return state=state.NowPlayingItem||{},"Video"===state.MediaType},SessionPlayer.prototype.isPlayingAudio=function(){var state=this.lastPlayerData||{};return state=state.NowPlayingItem||{},"Audio"===state.MediaType},SessionPlayer.prototype.getPlaylist=function(){return Promise.resolve([])},SessionPlayer.prototype.getCurrentPlaylistItemId=function(){},SessionPlayer.prototype.setCurrentPlaylistItem=function(playlistItemId){return Promise.resolve()},SessionPlayer.prototype.removeFromPlaylist=function(playlistItemIds){return Promise.resolve()},SessionPlayer.prototype.tryPair=function(target){return Promise.resolve()},SessionPlayer}); \ 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 cc71826be5..781d4594fd 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ar.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ar.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", 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 548c14eff2..689dfcd36b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/bg-bg.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/bg-bg.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json index 224e3d7008..9bda75f7a4 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ca.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "\u00cdtem desat.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sincronitza a un altre dispositiu", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json b/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json index cced0a5a60..6386c62093 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/cs.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Pros\u00edm, zadejte n\u00e1zev nebo extern\u00ed Id.", "MessageItemSaved": "Polo\u017eka ulo\u017eena.", "SearchResults": "V\u00fdsledky vyhled\u00e1v\u00e1n\u00ed", - "SyncToOtherDevice": "Synchronizovat na dal\u0161\u00ed za\u0159\u00edzen\u00ed", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Zp\u0159\u00edstupnit offline", "ServerNameIsRestarting": "Emby Server - {0} je restartov\u00e1n.", "ServerNameIsShuttingDown": "Emby Server - {0} je vyp\u00edn\u00e1n.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/da.json b/dashboard-ui/bower_components/emby-webcomponents/strings/da.json index 06dda75c66..8a9de50e56 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/da.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/da.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Indtast venligst et navn eller eksternt Id.", "MessageItemSaved": "Element gemt.", "SearchResults": "S\u00f8geresultater", - "SyncToOtherDevice": "Synk til anden enhed", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "G\u00f8r tilg\u00e6ngelig offline", "ServerNameIsRestarting": "Emby Server - {0} genstarter.", "ServerNameIsShuttingDown": "Emby Server - {0} lukker ned.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/de.json b/dashboard-ui/bower_components/emby-webcomponents/strings/de.json index de03a22dae..1a1b52a2f2 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/de.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/de.json @@ -48,7 +48,7 @@ "HeaderOfflineDownloads": "Offline Medien", "HeaderOfflineDownloadsDescription": "Lade Medien auf deine Ger\u00e4te herunter um sie einfach offline zu nutzen.", "CloudSyncFeatureDescription": "Synchronisiere deine Medien in die Cloud f\u00fcr ein Backup, eine Archivierung und Konvertierung.", - "DvrFeatureDescription": "Schedule individual Live TV recordings, series recordings, and more with Emby DVR.", + "DvrFeatureDescription": "Plane individuelle Aufnahmen von Live-TV, Serien und mehr mit Emby DVR.", "ButtonCancelSyncJob": "Download abbrechen", "CancelSyncJobConfirmation": "Der Abbruch der Synchronisation wird bereits heruntergeladene Medien bei der n\u00e4chsten Synchronisation vom Ger\u00e4t l\u00f6schen. M\u00f6chtest du wirklich fortfahren?", "CinemaModeFeatureDescription": "Der Cinema Mode bringt das richtige Kinogef\u00fchl mit Trailern und eigenen Intros vor dem Hauptfilm.", @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Bitte gib einen Namen oder eine externe Id an.", "MessageItemSaved": "Element gespeichert", "SearchResults": "Suchergebnisse", - "SyncToOtherDevice": "Mit einem anderen Ger\u00e4t synchronisieren", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Offline verf\u00fcgbar machen", "ServerNameIsRestarting": "Emby Server - {0} startet neu.", "ServerNameIsShuttingDown": "Emby Server - {0} f\u00e4hrt herunter.", @@ -430,7 +430,7 @@ "HeaderLibraryFolders": "Bibliotheksverzeichnisse", "HeaderLandingScreens": "Einstiegsbildschirme", "LandingScreensHelp": "W\u00e4hle den Standard-Einstiegsbildschirm bei Klick auf eine Bibliothek.", - "HeaderTermsOfPurchase": "Terms of Purchase", - "PrivacyPolicy": "Privacy policy", - "TermsOfUse": "Terms of use" + "HeaderTermsOfPurchase": "Bestellungsbedingungen", + "PrivacyPolicy": "Datenschutzbestimmungen", + "TermsOfUse": "Nutzungsbedingungen" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/el.json b/dashboard-ui/bower_components/emby-webcomponents/strings/el.json index 2b81ec6fc4..1c3e7cd778 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/el.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/el.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", 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 27718358c1..00dde8a06a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/en-gb.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/en-gb.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external ID.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", 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 d8fe9c4be0..ceb5e9b533 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es-ar.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es-ar.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", 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 bd29222efa..80378c76f8 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es-mx.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es-mx.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Por favor introduzca un nombre o id externo.", "MessageItemSaved": "\u00cdtem guardado.", "SearchResults": "Resultados de la b\u00fasqueda", - "SyncToOtherDevice": "Sincronizar a otro dispositivo", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Hacer disponible sin conexi\u00f3n", "ServerNameIsRestarting": "El Servidor Emby - {0} se esta reiniciando.", "ServerNameIsShuttingDown": "El Servidor Emby - {0} se esta apagando.", @@ -431,6 +431,6 @@ "HeaderLandingScreens": "Pantallas de Llegada", "LandingScreensHelp": "Seleccione la pantalla de llegada por defecto al dar clic sobre una biblioteca.", "HeaderTermsOfPurchase": "T\u00e9rminos de Compra", - "PrivacyPolicy": "Privacy policy", - "TermsOfUse": "Terms of use" + "PrivacyPolicy": "Pol\u00edtica de privacidad", + "TermsOfUse": "T\u00e9rminos de uso" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/es.json b/dashboard-ui/bower_components/emby-webcomponents/strings/es.json index fe5892c50c..1f12bb712c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Introduzca un nombre o un identificador externo.", "MessageItemSaved": "Elemento grabado.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json b/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json index f0d7acf53b..9f8e0d9c35 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/fi.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", 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 85efb151c1..6b1b9b62e7 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/fr-ca.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/fr-ca.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json b/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json index d5e0a09f05..dff72cabae 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/fr.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Veuillez saisir un nom ou un identifiant externe.", "MessageItemSaved": "Item sauvegard\u00e9.", "SearchResults": "R\u00e9sultats de la recherche", - "SyncToOtherDevice": "Sync vers un autre appareil", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Rendre disponible hors connexion", "ServerNameIsRestarting": "Emby Server - {0} est red\u00e9marr\u00e9.", "ServerNameIsShuttingDown": "Emby Server - {0} est arr\u00eater.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json b/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json index 8d8ff49b29..89ce8448d9 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/gsw.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/he.json b/dashboard-ui/bower_components/emby-webcomponents/strings/he.json index faf62d7daa..f449d4bf5a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/he.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/he.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "\u05d4\u05d6\u05df \u05e9\u05dd \u05d0\u05d5 \u05de\u05d6\u05d4\u05d4 \u05d7\u05d9\u05e6\u05d5\u05e0\u05d9.", "MessageItemSaved": "\u05d4\u05e4\u05e8\u05d9\u05d8 \u05e0\u05e9\u05de\u05e8.", "SearchResults": "\u05ea\u05d5\u05e6\u05d0\u05d5\u05ea \u05d7\u05d9\u05e4\u05d5\u05e9", - "SyncToOtherDevice": "\u05e1\u05e0\u05db\u05e8\u05df \u05dc\u05de\u05db\u05e9\u05d9\u05e8 \u05d0\u05d7\u05e8", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "\u05d4\u05e4\u05d5\u05da \u05dc\u05d6\u05de\u05d9\u05df \u05d1\u05de\u05e6\u05d1 \u05dc\u05d0 \u05de\u05e7\u05d5\u05d5\u05df", "ServerNameIsRestarting": "\u05e9\u05e8\u05ea Emby - {0} \u05de\u05d5\u05e4\u05e2\u05dc \u05de\u05d7\u05d3\u05e9.", "ServerNameIsShuttingDown": "\u05e9\u05e8\u05ea Emby - {0} \u05e0\u05db\u05d1\u05d4.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json b/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json index bb462ffb18..a3d4ea15c7 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/hr.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Unesite naziv ili vanjski Id.", "MessageItemSaved": "Stavka je snimljena.", "SearchResults": "Rezultati pretra\u017eivanja", - "SyncToOtherDevice": "Sinkronizacija na druge ure\u0111aje", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Dostupno izvanmre\u017eno", "ServerNameIsRestarting": "Emby Server - {0} se ponovo pokre\u0107e.", "ServerNameIsShuttingDown": "Emby Server - {0} se gasi.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json b/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json index 2d3f075b5e..fce6cb094f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/hu.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} \u00fajraindul.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/id.json b/dashboard-ui/bower_components/emby-webcomponents/strings/id.json index 5e1c6ddd31..cb85fcaa8c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/id.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/id.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/it.json b/dashboard-ui/bower_components/emby-webcomponents/strings/it.json index b6b4613fe5..a076abdfc1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/it.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/it.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Per favore inserisci un nome o un id esterno.", "MessageItemSaved": "Elemento salvato.", "SearchResults": "Risultati della Ricerca", - "SyncToOtherDevice": "Invia ad un altro dispositivo", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Rendi disponibile offline", "ServerNameIsRestarting": "Emby Server - {0} si sta riavviando.", "ServerNameIsShuttingDown": "Emby Server - {0} si sta arrestando.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json index cfa2dd2805..7b6d4fb7e6 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "\u0410\u0442\u044b\u043d \u043d\u0435\u043c\u0435\u0441\u0435 \u0441\u044b\u0440\u0442\u049b\u044b ID \u0435\u043d\u0433\u0456\u0437\u0456\u04a3\u0456\u0437.", "MessageItemSaved": "\u0422\u0430\u0440\u043c\u0430\u049b \u0441\u0430\u049b\u0442\u0430\u043b\u0434\u044b.", "SearchResults": "\u0406\u0437\u0434\u0435\u0443 \u043d\u04d9\u0442\u0438\u0436\u0435\u043b\u0435\u0440\u0456", - "SyncToOtherDevice": "\u0411\u0430\u0441\u049b\u0430 \u049b\u04b1\u0440\u044b\u043b\u0493\u044b\u043c\u0435\u043d \u04af\u043d\u0434\u0435\u0441\u0442\u0456\u0440\u0443", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "\u0414\u0435\u0440\u0431\u0435\u0441 \u049b\u043e\u043b\u0436\u0435\u0442\u0456\u043c\u0434\u0456 \u0435\u0442\u0443", "ServerNameIsRestarting": "Emby Server - {0} \u049b\u0430\u0439\u0442\u0430 \u0456\u0441\u043a\u0435 \u049b\u043e\u0441\u044b\u043b\u0443\u0434\u0430.", "ServerNameIsShuttingDown": "Emby Server - {0} \u0436\u04b1\u043c\u044b\u0441\u044b\u043d \u0430\u044f\u049b\u0442\u0430\u0443\u0434\u0430.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json index 00cbf1cf09..41806996f0 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ko.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "\ud56d\ubaa9\uc774 \uc800\uc7a5\ub418\uc5c8\uc2b5\ub2c8\ub2e4.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", 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 bd2d7e0f0a..0226422eec 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/lt-lt.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/lt-lt.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "\u012eveskite vard\u0105 arba i\u0161orin\u012f ID.", "MessageItemSaved": "Elementas i\u0161saugotas.", "SearchResults": "Paie\u0161kos rezultatai", - "SyncToOtherDevice": "Sinchronizuoti \u012f kit\u0105 \u012frengin\u012f", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "\u012egalinti \u017ei\u016br\u0117jim\u0105 neprisijungus", "ServerNameIsRestarting": "Emby Serveris - {0} leid\u017eiamas i\u0161 naujo.", "ServerNameIsShuttingDown": "Emby Serveris - {0} i\u0161sijungia.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json index 5922ac2fd5..f121d29c1b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ms.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json b/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json index f437ee5781..b11c41d35d 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Vennligst skriv ett navn eller en ekstern id.", "MessageItemSaved": "Element lagret.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json b/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json index edcde329cc..f91352c36f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Voer een naam of een externe Id in", "MessageItemSaved": "Item opgeslagen.", "SearchResults": "Zoekresultaten", - "SyncToOtherDevice": "Synchroniseren met een ander apparaat", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Maak offline beschikbaar", "ServerNameIsRestarting": "Emby Server - {0} is opnieuw aan het opstarten.", "ServerNameIsShuttingDown": "Emby Server - {0} is aan het afsluiten.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json b/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json index 86c36d9e1e..c98b08fd86 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/pl.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Prosz\u0119 wprowad\u017a nazw\u0119 lub zewn\u0119trzne Id.", "MessageItemSaved": "Obiekt zapisany.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", 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 f99323de33..1b45bc848d 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-br.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-br.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Por favor, digite um nome ou Id externo.", "MessageItemSaved": "Item salvo.", "SearchResults": "Resultados da Busca", - "SyncToOtherDevice": "Sincronizar para outro dispositivo", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Disponibilizar Offline", "ServerNameIsRestarting": "Servidor Emby - {0} est\u00e1 reiniciando.", "ServerNameIsShuttingDown": "Servidor Emby - {0} est\u00e1 desligando.", 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 c682de15a5..e573abf428 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/pt-pt.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/pt-pt.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Por favor, digite um nome ou Id externo.", "MessageItemSaved": "Item salvo.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json index 96cf33b82a..e881bcdd98 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ro.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json index 816ebc0215..d8727bc159 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u043b\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 ID.", "MessageItemSaved": "\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d.", "SearchResults": "\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430", - "SyncToOtherDevice": "\u0421\u0438\u043d\u0445\u0440\u043e \u0441 \u0434\u0440. \u0443\u0441\u0442\u0440-\u043e\u043c", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e", "ServerNameIsRestarting": "Emby Server - {0} \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f.", "ServerNameIsShuttingDown": "Emby Server - {0} \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json index 5922ac2fd5..f121d29c1b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/sk.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", 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 3dc1d81f22..483948d9e3 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/sl-si.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/sl-si.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json b/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json index 848291afdc..bc344d2b62 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/sv.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Ange ett namn eller externt id.", "MessageItemSaved": "Objektet har sparats.", "SearchResults": "S\u00f6kresultat", - "SyncToOtherDevice": "Synka till annan enhet", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "G\u00f6r tillg\u00e4nglig offline", "ServerNameIsRestarting": "Emby Server - {0} startas om.", "ServerNameIsShuttingDown": "Emby Server - {0} st\u00e4ngs ner.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json b/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json index 4377144803..dc72866195 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/tr.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json index 8e21b5cf26..a8e04503e6 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/uk.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json b/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json index fe0d6e9933..1ad403f03c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/vi.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", 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 54e9bda139..db49eab633 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-cn.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-cn.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "\u8bf7\u8f93\u5165\u4e00\u4e2a\u540d\u79f0\u6216\u4e00\u4e2a\u5916\u90e8ID\u3002", "MessageItemSaved": "\u9879\u76ee\u5df2\u4fdd\u5b58\u3002", "SearchResults": "\u641c\u7d22\u7ed3\u679c", - "SyncToOtherDevice": "\u540c\u6b65\u5230\u5176\u4ed6\u8bbe\u5907", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} \u91cd\u542f\u4e2d\u3002", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", 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 a11381fe4a..696a2d4709 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-hk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-hk.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", 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 9587f655ed..bd6ba473eb 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/zh-tw.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/zh-tw.json @@ -258,7 +258,7 @@ "PleaseEnterNameOrId": "Please enter a name or an external Id.", "MessageItemSaved": "Item saved.", "SearchResults": "Search Results", - "SyncToOtherDevice": "Sync to other device", + "DownloadToOtherDevice": "Download to other device", "MakeAvailableOffline": "Make available offline", "ServerNameIsRestarting": "Emby Server - {0} is restarting.", "ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.", diff --git a/dashboard-ui/components/dockedtabs/dockedtabs.js b/dashboard-ui/components/dockedtabs/dockedtabs.js index 3a0eeb805d..b297c27002 100644 --- a/dashboard-ui/components/dockedtabs/dockedtabs.js +++ b/dashboard-ui/components/dockedtabs/dockedtabs.js @@ -1 +1 @@ -define(["apphost","connectionManager","events","globalize","browser","require","dom","embyRouter","emby-tabs"],function(appHost,connectionManager,events,globalize,browser,require,dom,embyRouter){"use strict";function showUserView(id){var view=currentUserViews.filter(function(current){return current.Id==id})[0];view&&embyRouter.showItem(view)}function executeCommand(id){switch(id){case"settings":embyRouter.showSettings();break;case"signout":Dashboard.logout();break;case"selectserver":embyRouter.showSelectServer();break;case"reports":Dashboard.navigate("reports.html");break;case"metadatamanager":Dashboard.navigate("edititemmetadata.html");break;case"manageserver":Dashboard.navigate("dashboard.html");break;case"remotecontrol":Dashboard.navigate("nowplaying.html");break;case"sync":Dashboard.navigate("mysync.html");break;case"nowplaying":Dashboard.navigate("nowplaying.html");break;default:showUserView(id)}}function showMenu(menuItems,button,tabIndex){var actionSheetType=browser.safari?"actionsheet":"webActionSheet";require([actionSheetType],function(actionSheet){actionSheet.show({items:menuItems,positionTo:button,entryAnimation:"slideup",exitAnimation:"fadeout",entryAnimationDuration:160,exitAnimationDuration:100,offsetTop:-35,positionY:"top",dialogClass:"dockedtabs-dlg",menuItemClass:"dockedtabs-dlg-menuitem"}).then(function(id){if(executeCommand(id),id){var tabs=dom.parentWithClass(button,"dockedtabs-tabs");tabs.selectedIndex(tabIndex,!1)}})})}function showLibrariesMenu(button){var commands=currentUserViews.map(function(view){return{name:view.Name,id:view.Id}});showMenu(commands,button,1)}function showMoreMenu(button){var commands=[];currentUser.Policy.IsAdministrator&&(commands.push({name:globalize.translate("ButtonManageServer"),id:"manageserver"}),dom.getWindowSize().innerWidth>=1e3&&commands.push({name:globalize.translate("MetadataManager"),id:"metadatamanager"}),commands.push({name:globalize.translate("ButtonReports"),id:"reports"})),appHost.supports("multiserver")&&commands.push({name:globalize.translate("HeaderSelectServer"),id:"selectserver"}),commands.push({name:globalize.translate("TabSettings"),id:"settings"}),currentUser.Policy.EnableSync&&commands.push({name:globalize.translate("SyncToOtherDevices"),id:"sync"}),commands.push({name:globalize.translate("ButtonSignOut"),id:"signout"}),showMenu(commands,button,5)}function onTabClick(e){var index=parseInt(this.getAttribute("data-index"));switch(index){case 0:embyRouter.goHome();break;case 1:showLibrariesMenu(this),e.preventDefault(),e.stopPropagation();break;case 2:embyRouter.showLiveTV();break;case 3:Dashboard.navigate("mysync.html?mode=offline");break;case 4:Dashboard.navigate("nowplaying.html");break;case 5:showMoreMenu(this),e.preventDefault(),e.stopPropagation()}}function addNoFlexClass(buttons){setTimeout(function(){for(var i=0,length=buttons.length;i ",appHost.supports("sync")&&(html+=' "),html+=' ",html+=' ",elem.innerHTML=html;for(var buttons=elem.querySelectorAll(".emby-tab-button"),i=0,length=buttons.length;i0;hasLiveTv?element.querySelector(".docked-tab-livetv").classList.remove("hide"):element.querySelector(".docked-tab-livetv").classList.add("hide");var downloadsTab=element.querySelector(".docked-tab-syncdownloads");downloadsTab&&(user.Policy.EnableSync?downloadsTab.classList.remove("hide"):downloadsTab.classList.add("hide"))}function showUserTabs(user,element){currentUser=user;var apiClient=ConnectionManager.getApiClient(user.ServerId);apiClient.getUserViews({},user.Id).then(function(result){currentUserViews=result.Items,onUserViewResponse(user,result.Items,element)},function(){currentUserViews=[],onUserViewResponse(user,[],element)})}function showCurrentUserTabs(element){Dashboard.getCurrentUserId()&&Dashboard.getCurrentUser().then(function(user){showUserTabs(user,element)})}function onViewShow(e){e.detail.properties.indexOf("fullscreen")===-1&&Dashboard.getCurrentUserId()?instance.show():instance.hide()}function dockedTabs(options){var self=this;instance=self,self.element=render(options),events.on(connectionManager,"localusersignedin",function(e,user){self.show(),showUserTabs(user,self.element)}),events.on(connectionManager,"localusersignedout",function(){self.hide()}),showCurrentUserTabs(self.element),document.addEventListener("viewshow",onViewShow)}require(["css!./dockedtabs"]);var instance,currentUser={},currentUserViews=[];return dockedTabs.prototype.destroy=function(){document.removeEventListener("viewshow",onViewShow),instance=null;var self=this;self.element;self.element=null},dockedTabs.prototype.show=function(){this.element.classList.remove("hide")},dockedTabs.prototype.hide=function(){this.element.classList.add("hide")},dockedTabs}); \ No newline at end of file +define(["apphost","connectionManager","events","globalize","browser","require","dom","embyRouter","emby-tabs"],function(appHost,connectionManager,events,globalize,browser,require,dom,embyRouter){"use strict";function showUserView(id){var view=currentUserViews.filter(function(current){return current.Id==id})[0];view&&embyRouter.showItem(view)}function executeCommand(id){switch(id){case"settings":embyRouter.showSettings();break;case"signout":Dashboard.logout();break;case"selectserver":embyRouter.showSelectServer();break;case"reports":Dashboard.navigate("reports.html");break;case"metadatamanager":Dashboard.navigate("edititemmetadata.html");break;case"manageserver":Dashboard.navigate("dashboard.html");break;case"remotecontrol":Dashboard.navigate("nowplaying.html");break;case"sync":Dashboard.navigate("mysync.html");break;case"nowplaying":Dashboard.navigate("nowplaying.html");break;default:showUserView(id)}}function showMenu(menuItems,button,tabIndex){var actionSheetType=browser.safari?"actionsheet":"webActionSheet";require([actionSheetType],function(actionSheet){actionSheet.show({items:menuItems,positionTo:button,entryAnimation:"slideup",exitAnimation:"fadeout",entryAnimationDuration:160,exitAnimationDuration:100,offsetTop:-35,positionY:"top",dialogClass:"dockedtabs-dlg",menuItemClass:"dockedtabs-dlg-menuitem"}).then(function(id){if(executeCommand(id),id){var tabs=dom.parentWithClass(button,"dockedtabs-tabs");tabs.selectedIndex(tabIndex,!1)}})})}function showLibrariesMenu(button){var commands=currentUserViews.map(function(view){return{name:view.Name,id:view.Id}});showMenu(commands,button,1)}function showMoreMenu(button){var commands=[];currentUser.Policy.IsAdministrator&&(commands.push({name:globalize.translate("ButtonManageServer"),id:"manageserver"}),dom.getWindowSize().innerWidth>=1e3&&commands.push({name:globalize.translate("MetadataManager"),id:"metadatamanager"}),commands.push({name:globalize.translate("ButtonReports"),id:"reports"})),appHost.supports("multiserver")&&commands.push({name:globalize.translate("HeaderSelectServer"),id:"selectserver"}),commands.push({name:globalize.translate("TabSettings"),id:"settings"}),currentUser.Policy.EnableContentDownloading&&commands.push({name:globalize.translate("SyncToOtherDevices"),id:"sync"}),commands.push({name:globalize.translate("ButtonSignOut"),id:"signout"}),showMenu(commands,button,5)}function onTabClick(e){var index=parseInt(this.getAttribute("data-index"));switch(index){case 0:embyRouter.goHome();break;case 1:showLibrariesMenu(this),e.preventDefault(),e.stopPropagation();break;case 2:embyRouter.showLiveTV();break;case 3:Dashboard.navigate("mysync.html?mode=offline");break;case 4:Dashboard.navigate("nowplaying.html");break;case 5:showMoreMenu(this),e.preventDefault(),e.stopPropagation()}}function addNoFlexClass(buttons){setTimeout(function(){for(var i=0,length=buttons.length;i ",appHost.supports("sync")&&(html+=' "),html+=' ",html+=' ",elem.innerHTML=html;for(var buttons=elem.querySelectorAll(".emby-tab-button"),i=0,length=buttons.length;i0;hasLiveTv?element.querySelector(".docked-tab-livetv").classList.remove("hide"):element.querySelector(".docked-tab-livetv").classList.add("hide");var downloadsTab=element.querySelector(".docked-tab-syncdownloads");downloadsTab&&(user.Policy.EnableContentDownloading?downloadsTab.classList.remove("hide"):downloadsTab.classList.add("hide"))}function showUserTabs(user,element){currentUser=user;var apiClient=ConnectionManager.getApiClient(user.ServerId);apiClient.getUserViews({},user.Id).then(function(result){currentUserViews=result.Items,onUserViewResponse(user,result.Items,element)},function(){currentUserViews=[],onUserViewResponse(user,[],element)})}function showCurrentUserTabs(element){Dashboard.getCurrentUserId()&&Dashboard.getCurrentUser().then(function(user){showUserTabs(user,element)})}function onViewShow(e){e.detail.properties.indexOf("fullscreen")===-1&&Dashboard.getCurrentUserId()?instance.show():instance.hide()}function dockedTabs(options){var self=this;instance=self,self.element=render(options),events.on(connectionManager,"localusersignedin",function(e,user){self.show(),showUserTabs(user,self.element)}),events.on(connectionManager,"localusersignedout",function(){self.hide()}),showCurrentUserTabs(self.element),document.addEventListener("viewshow",onViewShow)}require(["css!./dockedtabs"]);var instance,currentUser={},currentUserViews=[];return dockedTabs.prototype.destroy=function(){document.removeEventListener("viewshow",onViewShow),instance=null;var self=this;self.element;self.element=null},dockedTabs.prototype.show=function(){this.element.classList.remove("hide")},dockedTabs.prototype.hide=function(){this.element.classList.add("hide")},dockedTabs}); \ No newline at end of file diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 6c86fc9731..61cd85539f 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -1 +1 @@ -.itemTag,.ui-body-b{color:#fff!important}.itemName,.itemTag{font-weight:400!important}.detailSectionHeader,.itemMiscInfo{-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden}.alphabetPicker,.itemLinks,.listPaging,.viewSettings{text-align:center}.hidingAnimatedTab{visibility:hidden}.headerArrowImage{height:20px;margin-left:.5em}.background-theme-b .backgroundContainer,.dialog.background-theme-b{background-color:#141414}.background-theme-b .backgroundContainer.withBackdrop{background-color:rgba(6,6,6,.94)!important;background:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.99)),color-stop(rgba(0,0,0,.94)),to(rgba(0,0,0,.5)))!important;background:-webkit-linear-gradient(left,rgba(0,0,0,.99),rgba(0,0,0,.94),rgba(0,0,0,.5))!important;background:-o-linear-gradient(left,rgba(0,0,0,.99),rgba(0,0,0,.94),rgba(0,0,0,.5))!important;background:linear-gradient(to right,rgba(0,0,0,.99),rgba(0,0,0,.94),rgba(0,0,0,.5))!important}.backdropContainer{position:fixed;top:0;left:0;right:0;bottom:0;z-index:-1}.libraryPage .header{padding-bottom:0}.pageTabContent{contain:style}.pageWithAbsoluteTabs .pageTabContent{padding-top:2.1em}.flexPageTabContent.is-active{display:-webkit-box!important;display:-webkit-flex!important;display:flex!important}.listHeader{margin:.25em 0;padding-left:2px;line-height:1.25em;line-height:initial}@media all and (max-width:500px){.listHeader{padding-left:5px}}.listHeader+button{margin-left:2em}.sectionHeaderButton{vertical-align:middle;margin:0 0 .25em 1.5em;position:relative;top:8px}.viewPanelTabs{margin-bottom:2em}@media all and (min-width:800px){.hiddenSectionOnNonMobile{display:none}}@media all and (min-width:1200px){.paddedItemsContainer{padding:0 .8em}}.viewSettings{margin:0 0 .25em}.viewControls+.listTopPaging{margin-left:.5em!important}.criticReview{margin:1.5em 0;background:#222;padding:.8em .8em .8em 55px;-webkit-border-radius:5px;border-radius:5px;position:relative}.criticReview:first-child{margin-top:.5em}.criticReview img{width:30px}.criticRatingScore{margin-bottom:.5em}.itemTag{display:inline-block;background-color:#333;-webkit-border-radius:4px;border-radius:4px;padding:5px 7px;margin:0 5px 5px 0;text-decoration:none}.detailSectionHeader,.detailUserDataIcons{display:-webkit-box;display:-webkit-flex;-webkit-box-align:center}.itemOverview{white-space:pre-wrap}a.itemTag:hover{background-color:#2489ce}.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}span.itemCommunityRating:not(:empty)+.userDataIcons{margin-left:1.25em}.itemBackdrop{-webkit-background-size:cover;background-size:cover;background-position:center 15%;background-repeat:no-repeat;height:45vh;position:relative}.noBackdrop{background:#181818}.itemBackdropContent{position:absolute;bottom:0;left:0;right:0;background-color:rgba(0,0,0,.7);min-height:120px}.noBackdrop .itemBackdropContent{background-color:transparent}.desktopMiscInfoContainer{position:absolute;bottom:10px}.detailUserDataIcons{display:flex;-webkit-align-items:center;align-items:center}.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:300px;height:70px;position:absolute;top:13.5%;right:19.5%;background-repeat:no-repeat;background-position:center center;-webkit-background-size:contain;background-size:contain}@media all and (max-width:1400px){.detailLogo{right:5%}}@media all and (max-width:1100px){.detailLogo{display:none}}.itemDetailImage{border:1px solid transparent;width:100%}.thumbDetailImageContainer{width:400px}.itemDetailImage.loaded{-webkit-box-shadow:0 0 20px #000;box-shadow:0 0 20px #000;border:1px solid #222}.itemDetailGalleryLink img:hover{-webkit-box-shadow:0 0 20px 3px #52B54B;box-shadow:0 0 20px 3px #52B54B}@media all and (max-width:800px){.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:800px){.itemBackdrop{display:none}.detailPagePrimaryContainer{display:-webkit-box;display:-webkit-flex;display:flex;margin-bottom:3.6em}}@media all and (max-width:1200px){.detailLogo{right:2%}.lnkSibling{display:none!important}}.parentName{display:block;margin-bottom:.5em}.emby-button.detailFloatingButton{position:absolute;background-color:rgba(0,0,0,.8)!important;z-index:1;top:50%;left:50%;margin:-2.4em 0 0 -2.4em;border:2.4px solid #eee;border:2.4px solid rgba(255,255,255,.84);padding:.4em!important;color:rgba(255,255,255,.84)}.emby-button.detailFloatingButton i{font-size:3.5em}.emby-button.btnFloatingRecord{background-color:#c33!important}@media all and (max-width:800px){.parentName{margin-bottom:1em}.itemBackdropContent{min-height:0}.itemDetailPage{padding-top:0!important}}@media all and (min-width:500px){.mobileDetails{display:none}}@media all and (max-width:500px){.desktopDetails{display:none!important}}.itemName{margin:.5em 0}.empty{margin:0}.detailSection{vertical-align:top;margin-bottom:3em}.detailCollapsibleSection:not(.hide)+.detailCollapsibleSection{margin-top:-2em}.detailPageCollabsible{margin-top:0}.detailSection h1{margin-bottom:.25em;position:relative}.detailSectionHeader{-webkit-background-clip:border-box;background-clip:border-box;padding:0 0 .25em .25em;background-color:transparent;-webkit-border-radius:0;border-radius:0;white-space:nowrap;position:relative;margin:1.5em 0 1em;display:flex;-webkit-align-items:center;align-items:center}.detailSectionHeader>h1{margin:0}.detailSectionHeaderButton{margin-left:1em}.mainDetailButtons{padding:.5em 0;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-wrap:wrap;flex-wrap:wrap}.mainDetailButtons button,.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}@media all and (min-width:400px){.mainDetailButtons>.raised{padding-left:1.5em;padding-right:1.5em}}.detailImageProgressContainer{position:absolute;bottom:4px;right:1px;left:1px;text-align:center}.listTopPaging,.viewControls{display:inline-block}@media all and (max-width:800px){.editorMenuLink{display:none}}.itemMiscInfo{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center}@media all and (max-width:500px){.mobileDetails .itemMiscInfo{text-align:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.itemMiscInfo .endsAt{display:none}}.detailPageContent{border-spacing:0;border-collapse:collapse;padding:3em 3% 0}@media all and (min-width:1200px){.detailPageContent{padding:3em 5% 0}}.detailPageParentLink{font-weight:inherit!important}.mediaInfoContent{line-height:1.5em}.mediaInfoStream{margin:1em 3em 1em 0;display:inline-block;color:#bbb;vertical-align:top}.mediaInfoStreamType{display:block;color:#fff;margin-bottom:1em}.mediaInfoAttribute{color:#fff;display:inline-block}.mediaInfoLabel{color:#aaa;margin-right:1em;display:inline-block}.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:5px;bottom:56px;display:none;line-height:1}.alphabetPicker-right{right:5px;left:auto}.layout-desktop .absolutePageTabContent .alphabetPicker{right:20px}@media all and (max-height:500px){.alphabetPicker{display:none!important}.itemBackdrop{height:52vh}}.alphaPicker-vertical .alphaPickerButton{padding-top:2px!important;padding-bottom:2px!important}@media all and (max-height:700px){.alphaPicker-vertical .alphaPickerButton{padding-top:1px!important;padding-bottom:1px!important}}@media all and (max-height:600px){.alphaPicker-vertical .alphaPickerButton{padding-top:0!important;padding-bottom:0!important}}@media all and (max-height:530px){.alphabetPicker{font-size:80%!important}}@media all and (max-height:480px){.alphabetPicker{font-size:76%!important}}@media all and (min-height:600px){.alphabetPicker{bottom:70px}}@media all and (min-height:900px){.alphabetPicker{bottom:120px}}@media all and (min-height:1000px){.alphabetPicker{bottom:200px}}@media all and (max-width:1200px){.listViewUserDataButtons{display:none!important}}.userProfileSettingsForm{max-width:700px}@media all and (max-width:700px){.userProfileSettingsForm .detailSection{margin-left:.5em;margin-right:.5em}}@media all and (max-width:800px){.detailsHiddenOnMobile{display:none}}#criticReviewsContent.hiddenScrollX{white-space:nowrap}#criticReviewsContent.hiddenScrollX .paperList{min-width:240px;width:90%;max-width:500px;display:inline-block;vertical-align:top;margin:0 4px 0 0}.btnSyncComplete{background:#673AB7!important}.btnSyncComplete i{-webkit-border-radius:1000px;border-radius:1000px}.bulletSeparator{margin:0 .35em}.mediaInfoIcons{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:1.5em 0 1em;-webkit-flex-wrap:wrap;flex-wrap:wrap}.mediaInfoText{padding:.3em .5em!important;margin-right:.5em;margin-bottom:.5em;font-size:94%!important}.sectionTitleButton,.sectionTitleIconButton{margin-right:0!important;display:inline-block;vertical-align:middle}.mediaInfoText-upper{text-transform:uppercase}.verticalSection{margin-bottom:2.8em}.layout-tv .verticalSection{margin-bottom:1.8em}.sectionTitleContainer{margin-bottom:.3em}.layout-tv .sectionTitleContainer{margin-bottom:.1em}.sectionTitle{margin-bottom:.07em}.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:.1em}.verticalSection .sectionTitle{margin-top:0}.horizontalItemsContainer{display:-webkit-box;display:-webkit-flex;display:flex}.padded-left{padding-left:2%}.padded-right{padding-right:2%}@media all and (min-height:500px){.padded-left-withalphapicker{padding-left:6%}.padded-right-withalphapicker{padding-right:6%}}.padded-top{padding-top:1em}.padded-bottom{padding-bottom:1em}.padded-top-focusscale{padding-top:1.6em;margin-top:-1.6em}.padded-bottom-focusscale{padding-bottom:1.6em;margin-bottom:-1.6em}@media all and (min-width:800px){.padded-left-withalphapicker{padding-left:4.4%}.padded-right-withalphapicker{padding-right:4.4%}}@media all and (min-width:1280px){.padded-left{padding-left:2.2%}.padded-right{padding-right:2.2%}.layout-tv .padded-left{padding-left:4%}.layout-tv .padded-right{padding-right:4%}.layout-tv .padded-left-withalphapicker{padding-left:4.4%}.layout-tv .padded-right-withalphapicker{padding-right:4.4%}}.homeLibraryButton{min-width:18%;margin:.5em!important}@media all and (max-width:800px){.homeLibraryButton{width:46%!important}} \ No newline at end of file +.itemTag,.ui-body-b{color:#fff!important}.itemName,.itemTag{font-weight:400!important}.detailSectionHeader,.itemMiscInfo{-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden}.alphabetPicker,.itemLinks,.listPaging,.viewSettings{text-align:center}.hidingAnimatedTab{visibility:hidden}.headerArrowImage{height:20px;margin-left:.5em}.background-theme-b .backgroundContainer,.dialog.background-theme-b{background-color:#141414}.background-theme-b .backgroundContainer.withBackdrop{background-color:rgba(6,6,6,.94)!important;background:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.99)),color-stop(rgba(0,0,0,.94)),to(rgba(0,0,0,.5)))!important;background:-webkit-linear-gradient(left,rgba(0,0,0,.99),rgba(0,0,0,.94),rgba(0,0,0,.5))!important;background:-o-linear-gradient(left,rgba(0,0,0,.99),rgba(0,0,0,.94),rgba(0,0,0,.5))!important;background:linear-gradient(to right,rgba(0,0,0,.99),rgba(0,0,0,.94),rgba(0,0,0,.5))!important}.backdropContainer{position:fixed;top:0;left:0;right:0;bottom:0;z-index:-1}.libraryPage .header{padding-bottom:0}.pageTabContent{contain:style}.pageWithAbsoluteTabs .pageTabContent{padding-top:2.1em}.flexPageTabContent.is-active{display:-webkit-box!important;display:-webkit-flex!important;display:flex!important}.listHeader{margin:.25em 0;padding-left:2px;line-height:1.25em;line-height:initial}@media all and (max-width:500px){.listHeader{padding-left:5px}}.listHeader+button{margin-left:2em}.sectionHeaderButton{vertical-align:middle;margin:0 0 .25em 1.5em;position:relative;top:8px}.viewPanelTabs{margin-bottom:2em}@media all and (min-width:800px){.hiddenSectionOnNonMobile{display:none}}@media all and (min-width:1200px){.paddedItemsContainer{padding:0 .8em}}.viewSettings{margin:0 0 .25em}.viewControls+.listTopPaging{margin-left:.5em!important}.criticReview{margin:1.5em 0;background:#222;padding:.8em .8em .8em 55px;-webkit-border-radius:5px;border-radius:5px;position:relative}.criticReview:first-child{margin-top:.5em}.criticReview img{width:30px}.criticRatingScore{margin-bottom:.5em}.itemTag{display:inline-block;background-color:#333;-webkit-border-radius:4px;border-radius:4px;padding:5px 7px;margin:0 5px 5px 0;text-decoration:none}.detailSectionHeader,.detailUserDataIcons{display:-webkit-box;display:-webkit-flex;-webkit-box-align:center}.itemOverview{white-space:pre-wrap}a.itemTag:hover{background-color:#2489ce}.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}span.itemCommunityRating:not(:empty)+.userDataIcons{margin-left:1.25em}.itemBackdrop{-webkit-background-size:cover;background-size:cover;background-position:center 15%;background-repeat:no-repeat;height:45vh;position:relative}.noBackdrop{background:#181818}.itemBackdropContent{position:absolute;bottom:0;left:0;right:0;background-color:rgba(0,0,0,.7);min-height:120px}.noBackdrop .itemBackdropContent{background-color:transparent}.desktopMiscInfoContainer{position:absolute;bottom:10px}.detailUserDataIcons{display:flex;-webkit-align-items:center;align-items:center}.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:300px;height:70px;position:absolute;top:13.5%;right:19.5%;background-repeat:no-repeat;background-position:center center;-webkit-background-size:contain;background-size:contain}@media all and (max-width:1400px){.detailLogo{right:5%}}@media all and (max-width:1100px){.detailLogo{display:none}}.itemDetailImage{border:1px solid transparent;width:100%}.thumbDetailImageContainer{width:400px}.itemDetailImage.loaded{-webkit-box-shadow:0 0 20px #000;box-shadow:0 0 20px #000;border:1px solid #222}.itemDetailGalleryLink img:hover{-webkit-box-shadow:0 0 20px 3px #52B54B;box-shadow:0 0 20px 3px #52B54B}@media all and (max-width:800px){.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:800px){.itemBackdrop{display:none}.detailPagePrimaryContainer{display:-webkit-box;display:-webkit-flex;display:flex;margin-bottom:3.6em}}@media all and (max-width:1200px){.detailLogo{right:2%}.lnkSibling{display:none!important}}.parentName{display:block;margin-bottom:.5em}.emby-button.detailFloatingButton{position:absolute;background-color:rgba(0,0,0,.8)!important;z-index:1;top:50%;left:50%;margin:-2.4em 0 0 -2.4em;border:2.4px solid #eee;border:2.4px solid rgba(255,255,255,.84);padding:.4em!important;color:rgba(255,255,255,.84)}.emby-button.detailFloatingButton i{font-size:3.5em}.emby-button.btnFloatingRecord{background-color:#c33!important}@media all and (max-width:800px){.parentName{margin-bottom:1em}.itemBackdropContent{min-height:0}.itemDetailPage{padding-top:0!important}}@media all and (min-width:500px){.mobileDetails{display:none}}@media all and (max-width:500px){.desktopDetails{display:none!important}}.itemName{margin:.5em 0}.empty{margin:0}.detailSection{vertical-align:top;margin-bottom:3em}.detailCollapsibleSection:not(.hide)+.detailCollapsibleSection{margin-top:-2em}.detailPageCollabsible{margin-top:0}.detailSection h1{margin-bottom:.25em;position:relative}.detailSectionHeader{-webkit-background-clip:border-box;background-clip:border-box;padding:0 0 .25em .25em;background-color:transparent;-webkit-border-radius:0;border-radius:0;white-space:nowrap;position:relative;margin:1.5em 0 1em;display:flex;-webkit-align-items:center;align-items:center}.detailSectionHeader>h1{margin:0}.detailSectionHeaderButton{margin-left:1em}.mainDetailButtons{padding:.5em 0;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-wrap:wrap;flex-wrap:wrap}.mainDetailButtons button,.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}@media all and (min-width:400px){.mainDetailButtons>.raised{padding-left:1.5em;padding-right:1.5em}}.detailImageProgressContainer{position:absolute;bottom:4px;right:1px;left:1px;text-align:center}.listTopPaging,.viewControls{display:inline-block}@media all and (max-width:800px){.editorMenuLink{display:none}}.itemMiscInfo{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;align-items:center}@media all and (max-width:500px){.mobileDetails .itemMiscInfo{text-align:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.itemMiscInfo .endsAt{display:none}}.detailPageContent{border-spacing:0;border-collapse:collapse;padding:3em 3% 0}@media all and (min-width:1200px){.detailPageContent{padding:3em 5% 0}}.detailPageParentLink{font-weight:inherit!important}.mediaInfoContent{line-height:1.5em}.mediaInfoStream{margin:1em 3em 1em 0;display:inline-block;color:#bbb;vertical-align:top}.mediaInfoStreamType{display:block;color:#fff;margin-bottom:1em}.mediaInfoAttribute{color:#fff;display:inline-block}.mediaInfoLabel{color:#aaa;margin-right:1em;display:inline-block}.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:5px;bottom:56px;display:none;line-height:1}.alphabetPicker-right{right:5px;left:auto}.layout-desktop .absolutePageTabContent .alphabetPicker{right:20px}@media all and (max-height:500px){.alphabetPicker{display:none!important}.itemBackdrop{height:52vh}}.alphaPicker-vertical .alphaPickerButton{padding-top:2px!important;padding-bottom:2px!important}@media all and (max-height:700px){.alphaPicker-vertical .alphaPickerButton{padding-top:1px!important;padding-bottom:1px!important}}@media all and (max-height:600px){.alphaPicker-vertical .alphaPickerButton{padding-top:0!important;padding-bottom:0!important}}@media all and (max-height:530px){.alphabetPicker{font-size:80%!important}}@media all and (max-height:480px){.alphabetPicker{font-size:76%!important}}@media all and (min-height:600px){.alphabetPicker{bottom:70px}}@media all and (min-height:900px){.alphabetPicker{bottom:120px}}@media all and (min-height:1000px){.alphabetPicker{bottom:200px}}@media all and (max-width:1200px){.listViewUserDataButtons{display:none!important}}.userProfileSettingsForm{max-width:700px}@media all and (max-width:700px){.userProfileSettingsForm .detailSection{margin-left:.5em;margin-right:.5em}}@media all and (max-width:800px){.detailsHiddenOnMobile{display:none}}#criticReviewsContent.hiddenScrollX{white-space:nowrap}#criticReviewsContent.hiddenScrollX .paperList{min-width:240px;width:90%;max-width:500px;display:inline-block;vertical-align:top;margin:0 4px 0 0}.btnSyncComplete{background:#673AB7!important}.btnSyncComplete i{-webkit-border-radius:1000px;border-radius:1000px}.bulletSeparator{margin:0 .35em}.mediaInfoIcons{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:1.5em 0 1em;-webkit-flex-wrap:wrap;flex-wrap:wrap}.mediaInfoText{padding:.3em .5em!important;margin-right:.5em;margin-bottom:.5em;font-size:94%!important}.sectionTitleButton,.sectionTitleIconButton{margin-right:0!important;display:inline-block;vertical-align:middle}.mediaInfoText-upper{text-transform:uppercase}.verticalSection{margin-bottom:2.8em}.layout-tv .verticalSection{margin-bottom:1.8em}.sectionTitleContainer{margin-bottom:.3em}.layout-tv .sectionTitleContainer{margin-bottom:.1em}.sectionTitle{margin-bottom:.07em}.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:.1em}.verticalSection .sectionTitle{margin-top:0}.horizontalItemsContainer{display:-webkit-box;display:-webkit-flex;display:flex}.padded-left{padding-left:2%}.padded-right{padding-right:2%}@media all and (min-height:500px){.padded-left-withalphapicker{padding-left:6%}.padded-right-withalphapicker{padding-right:6%}}.padded-top{padding-top:1em}.padded-bottom{padding-bottom:1em}.padded-top-focusscale{padding-top:1.6em;margin-top:-1.6em}.padded-bottom-focusscale{padding-bottom:1.6em;margin-bottom:-1.6em}@media all and (min-width:600px){.padded-left-withalphapicker{padding-left:3%}.padded-right-withalphapicker{padding-right:3%}}@media all and (min-width:800px){.layout-tv .padded-left-withalphapicker,.layout-tv .padded-right-withalphapicker{padding-right:4.4%}}@media all and (min-width:1280px){.padded-left{padding-left:2.2%}.padded-right{padding-right:2.2%}.layout-tv .padded-left{padding-left:4%}.layout-tv .padded-right{padding-right:4%}.layout-tv .padded-left-withalphapicker{padding-left:4.4%}.layout-tv .padded-right-withalphapicker{padding-right:4.4%}}.homeLibraryButton{min-width:18%;margin:.5em!important}@media all and (max-width:800px){.homeLibraryButton{width:46%!important}} \ No newline at end of file diff --git a/dashboard-ui/music.html b/dashboard-ui/music.html index 28902525c7..ccaa9a5ff0 100644 --- a/dashboard-ui/music.html +++ b/dashboard-ui/music.html @@ -99,15 +99,4 @@
-
-
-
-
- -
-
-
-
-
-
\ No newline at end of file diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 4b8dbdef0c..54fac95f54 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -1 +1 @@ -define(["appSettings","dom","browser","datetime","embyRouter","scrollStyles"],function(appSettings,dom,browser,datetime,embyRouter){"use strict";function fadeInRight(elem){var pct=browser.mobile?"4%":"0.5%",keyframes=[{opacity:"0",transform:"translate3d("+pct+", 0, 0)",offset:0},{opacity:"1",transform:"none",offset:1}];elem.animate(keyframes,{duration:160,iterations:1,easing:"ease-out"})}var libraryBrowser=function(window,document,screen){var pageSizeKey="pagesize_v4",libraryBrowser={getDefaultPageSize:function(key,defaultValue){return 100},getSavedQueryKey:function(modifier){return window.location.href.split("#")[0]+(modifier||"")},loadSavedQueryValues:function(key,query){var values=appSettings.get(key+"_"+Dashboard.getCurrentUserId());return values?(values=JSON.parse(values),Object.assign(query,values)):query},saveQueryValues:function(key,query){var values={};query.SortBy&&(values.SortBy=query.SortBy),query.SortOrder&&(values.SortOrder=query.SortOrder);try{appSettings.set(key+"_"+Dashboard.getCurrentUserId(),JSON.stringify(values))}catch(e){}},saveViewSetting:function(key,value){try{appSettings.set(key+"_"+Dashboard.getCurrentUserId()+"_view",value)}catch(e){}},getSavedView:function(key){var val=appSettings.get(key+"_"+Dashboard.getCurrentUserId()+"_view");return val},getSavedViewSetting:function(key){return new Promise(function(resolve,reject){var val=LibraryBrowser.getSavedView(key);resolve(val)})},allowSwipe:function(target){function allowSwipeOn(elem){return!dom.parentWithTag(elem,"input")&&(!elem.classList||!elem.classList.contains("hiddenScrollX")&&!elem.classList.contains("smoothScrollX")&&!elem.classList.contains("animatedScrollX"))}for(var parent=target;null!=parent;){if(!allowSwipeOn(parent))return!1;parent=parent.parentNode}return!0},configureSwipeTabs:function(ownerpage,tabs){if(browser.touch){var pageCount=ownerpage.querySelectorAll(".pageTabContent").length,onSwipeLeft=function(e,target){if(LibraryBrowser.allowSwipe(target)&&ownerpage.contains(target)){var selected=parseInt(tabs.selectedIndex()||"0");selected0&&tabs.selectedIndex(selected-1)}};require(["touchHelper"],function(TouchHelper){var touchHelper=new TouchHelper(ownerpage.parentNode.parentNode);Events.on(touchHelper,"swipeleft",onSwipeLeft),Events.on(touchHelper,"swiperight",onSwipeRight),ownerpage.addEventListener("viewdestroy",function(){touchHelper.destroy()})})}},configurePaperLibraryTabs:function(ownerpage,tabs,panels,animateTabs,enableSwipe){enableSwipe!==!1&&LibraryBrowser.configureSwipeTabs(ownerpage,tabs),tabs.addEventListener("beforetabchange",function(e){null!=e.detail.previousIndex&&panels[e.detail.previousIndex].classList.remove("is-active");var newPanel=panels[e.detail.selectedTabIndex];null!=e.detail.previousIndex&&e.detail.previousIndex!=e.detail.selectedTabIndex&&newPanel.animate&&(animateTabs||[]).indexOf(e.detail.selectedTabIndex)!=-1&&fadeInRight(newPanel),newPanel.classList.add("is-active")})},getArtistLinksHtml:function(artists,cssClass){for(var html=[],i=0,length=artists.length;i'+artist.Name+"")}return html=html.join(" / ")},getListItemInfo:function(elem){for(var elemWithAttributes=elem;!elemWithAttributes.getAttribute("data-id");)elemWithAttributes=elemWithAttributes.parentNode;var itemId=elemWithAttributes.getAttribute("data-id"),index=elemWithAttributes.getAttribute("data-index"),mediaType=elemWithAttributes.getAttribute("data-mediatype");return{id:itemId,index:index,mediaType:mediaType,context:elemWithAttributes.getAttribute("data-context")}},renderName:function(item,nameElem,linkToElement,context){require(["itemHelper"],function(itemHelper){var name=itemHelper.getDisplayName(item,{includeParentInfo:!1});linkToElement?nameElem.innerHTML=''+name+"":nameElem.innerHTML=name})},renderParentName:function(item,parentNameElem,context){var html=[],contextParam=context?"&context="+context:"";item.AlbumArtists?html.push(LibraryBrowser.getArtistLinksHtml(item.AlbumArtists,"detailPageParentLink")):item.ArtistItems&&item.ArtistItems.length&&"MusicVideo"==item.Type?html.push(LibraryBrowser.getArtistLinksHtml(item.ArtistItems,"detailPageParentLink")):item.SeriesName&&"Episode"==item.Type&&html.push(''+item.SeriesName+""),item.SeriesName&&"Season"==item.Type?html.push(''+item.SeriesName+""):null!=item.ParentIndexNumber&&"Episode"==item.Type?html.push(''+item.SeasonName+""):item.Album&&"Audio"==item.Type&&(item.AlbumId||item.ParentId)?html.push(''+item.Album+""):item.Album&&"MusicVideo"==item.Type&&item.AlbumId?html.push(''+item.Album+""):item.Album?html.push(item.Album):(item.IsSeries||item.EpisodeTitle)&&html.push(item.Name),html.length?(parentNameElem.classList.remove("hide"),parentNameElem.innerHTML=html.join(" - ")):parentNameElem.classList.add("hide")},showLayoutMenu:function(button,currentLayout,views){var dispatchEvent=!0;views||(dispatchEvent=!1,views=button.getAttribute("data-layouts"),views=views?views.split(","):["List","Poster","PosterCard","Thumb","ThumbCard"]);var menuItems=views.map(function(v){return{name:Globalize.translate("Option"+v),id:v,selected:currentLayout==v}});require(["actionsheet"],function(actionsheet){actionsheet.show({items:menuItems,positionTo:button,callback:function(id){button.dispatchEvent(new CustomEvent("layoutchange",{detail:{viewStyle:id},bubbles:!0,cancelable:!1})),dispatchEvent||window.$&&$(button).trigger("layoutchange",[id])}})})},getQueryPagingHtml:function(options){var startIndex=options.startIndex,limit=options.limit,totalRecordCount=options.totalRecordCount;if(limit&&options.updatePageSizeSetting!==!1)try{appSettings.set(options.pageSizeKey||pageSizeKey,limit)}catch(e){}var html="",recordsEnd=Math.min(startIndex+limit,totalRecordCount),showControls=totalRecordCount>20||limit',showControls){html+='';var startAtDisplay=totalRecordCount?startIndex+1:0;html+=startAtDisplay+"-"+recordsEnd+" of "+totalRecordCount,html+=""}if((showControls||options.viewButton||options.filterButton||options.sortButton||options.addLayoutButton)&&(html+='
',showControls&&(html+='',html+=''),options.addLayoutButton&&(html+=''),options.sortButton&&(html+=''),options.filterButton&&(html+=''),html+="
",showControls&&options.showLimit)){var id="selectPageSize",pageSizes=options.pageSizes||[20,50,100,200,300,400,500],optionsHtml=pageSizes.map(function(val){return limit==val?'":'"}).join("");html+='
"}return html+=""},showSortMenu:function(options){require(["dialogHelper","emby-radio"],function(dialogHelper){function onSortByChange(){var newValue=this.value;if(this.checked){var changed=options.query.SortBy!=newValue;options.query.SortBy=newValue.replace("_",","),options.query.StartIndex=0,options.callback&&changed&&options.callback()}}function onSortOrderChange(){var newValue=this.value;if(this.checked){var changed=options.query.SortOrder!=newValue;options.query.SortOrder=newValue,options.query.StartIndex=0,options.callback&&changed&&options.callback()}}var dlg=dialogHelper.createDialog({removeOnClose:!0,modal:!1,entryAnimationDuration:160,exitAnimationDuration:200});dlg.classList.add("ui-body-a"),dlg.classList.add("background-theme-a"),dlg.classList.add("formDialog");var html="";html+='
',html+='

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

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

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

",html+="
",isChecked="Ascending"==options.query.SortOrder?" checked":"",html+='",isChecked="Descending"==options.query.SortOrder?" checked":"",html+='",html+="
",html+="
",dlg.innerHTML=html,dialogHelper.open(dlg);var sortBys=dlg.querySelectorAll(".menuSortBy");for(i=0,length=sortBys.length;i',editable&&(html+=""),detectRatio&&item.PrimaryImageAspectRatio&&(item.PrimaryImageAspectRatio>=1.48?shape="thumb":item.PrimaryImageAspectRatio>=.85&&item.PrimaryImageAspectRatio<=1.34&&(shape="square")),html+="",editable&&(html+="");var progressHtml=item.IsFolder||!item.UserData?"":indicators.getProgressBarHtml(item);if(html+='
',progressHtml&&(html+=progressHtml),html+="
",html+="",elem.innerHTML=html,"thumb"==shape?(elem.classList.add("thumbDetailImageContainer"),elem.classList.remove("portraitDetailImageContainer"),elem.classList.remove("squareDetailImageContainer")):"square"==shape?(elem.classList.remove("thumbDetailImageContainer"),elem.classList.remove("portraitDetailImageContainer"),elem.classList.add("squareDetailImageContainer")):(elem.classList.remove("thumbDetailImageContainer"),elem.classList.add("portraitDetailImageContainer"),elem.classList.remove("squareDetailImageContainer")),url){var img=elem.querySelector("img");img.onload=function(){img.src.indexOf("empty.png")==-1&&img.classList.add("loaded")},imageLoader.lazyImage(img,url)}},renderDetailPageBackdrop:function(page,item,imageLoader){var imgUrl,screenWidth=screen.availWidth,hasbackdrop=!1,itemBackdropElement=page.querySelector("#itemBackdrop"),usePrimaryImage="Episode"===item.Type;return usePrimaryImage=!1,usePrimaryImage&&item.ImageTags&&item.ImageTags.Primary?(imgUrl=ApiClient.getScaledImageUrl(item.Id,{type:"Primary",index:0,maxWidth:screenWidth,tag:item.ImageTags.Primary}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):item.BackdropImageTags&&item.BackdropImageTags.length?(imgUrl=ApiClient.getScaledImageUrl(item.Id,{type:"Backdrop",index:0,maxWidth:screenWidth,tag:item.BackdropImageTags[0]}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):item.ParentBackdropItemId&&item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length?(imgUrl=ApiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",index:0,tag:item.ParentBackdropImageTags[0],maxWidth:screenWidth}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):(itemBackdropElement.classList.add("noBackdrop"),itemBackdropElement.style.backgroundImage=""),hasbackdrop}};return libraryBrowser}(window,document,screen);return window.LibraryBrowser=libraryBrowser,libraryBrowser}); \ No newline at end of file +define(["appSettings","dom","browser","datetime","embyRouter","scrollStyles"],function(appSettings,dom,browser,datetime,embyRouter){"use strict";function fadeInRight(elem){var pct=browser.mobile?"4%":"0.5%",keyframes=[{opacity:"0",transform:"translate3d("+pct+", 0, 0)",offset:0},{opacity:"1",transform:"none",offset:1}];elem.animate(keyframes,{duration:160,iterations:1,easing:"ease-out"})}var libraryBrowser=function(window,document,screen){var pageSizeKey="pagesize_v4",libraryBrowser={getDefaultPageSize:function(key,defaultValue){return 100},getSavedQueryKey:function(modifier){return window.location.href.split("#")[0]+(modifier||"")},loadSavedQueryValues:function(key,query){var values=appSettings.get(key+"_"+Dashboard.getCurrentUserId());return values?(values=JSON.parse(values),Object.assign(query,values)):query},saveQueryValues:function(key,query){var values={};query.SortBy&&(values.SortBy=query.SortBy),query.SortOrder&&(values.SortOrder=query.SortOrder);try{appSettings.set(key+"_"+Dashboard.getCurrentUserId(),JSON.stringify(values))}catch(e){}},saveViewSetting:function(key,value){try{appSettings.set(key+"_"+Dashboard.getCurrentUserId()+"_view",value)}catch(e){}},getSavedView:function(key){var val=appSettings.get(key+"_"+Dashboard.getCurrentUserId()+"_view");return val},getSavedViewSetting:function(key){return new Promise(function(resolve,reject){var val=LibraryBrowser.getSavedView(key);resolve(val)})},allowSwipe:function(target){function allowSwipeOn(elem){return!dom.parentWithTag(elem,"input")&&(!elem.classList||!elem.classList.contains("hiddenScrollX")&&!elem.classList.contains("smoothScrollX")&&!elem.classList.contains("animatedScrollX"))}for(var parent=target;null!=parent;){if(!allowSwipeOn(parent))return!1;parent=parent.parentNode}return!0},configureSwipeTabs:function(ownerpage,tabs){if(browser.touch){var pageCount=ownerpage.querySelectorAll(".pageTabContent").length,onSwipeLeft=function(e,target){if(LibraryBrowser.allowSwipe(target)&&ownerpage.contains(target)){var selected=parseInt(tabs.selectedIndex()||"0");selected0&&tabs.selectedIndex(selected-1)}};require(["touchHelper"],function(TouchHelper){var touchHelper=new TouchHelper(ownerpage.parentNode.parentNode);Events.on(touchHelper,"swipeleft",onSwipeLeft),Events.on(touchHelper,"swiperight",onSwipeRight),ownerpage.addEventListener("viewdestroy",function(){touchHelper.destroy()})})}},configurePaperLibraryTabs:function(ownerpage,tabs,panels,animateTabs,enableSwipe){enableSwipe!==!1&&LibraryBrowser.configureSwipeTabs(ownerpage,tabs),tabs.addEventListener("beforetabchange",function(e){null!=e.detail.previousIndex&&panels[e.detail.previousIndex].classList.remove("is-active");var newPanel=panels[e.detail.selectedTabIndex];null!=e.detail.previousIndex&&e.detail.previousIndex!=e.detail.selectedTabIndex&&newPanel.animate&&(animateTabs||[]).indexOf(e.detail.selectedTabIndex)!=-1&&fadeInRight(newPanel),newPanel.classList.add("is-active")})},getArtistLinksHtml:function(artists,cssClass){for(var html=[],i=0,length=artists.length;i'+artist.Name+"")}return html=html.join(" / ")},getListItemInfo:function(elem){for(var elemWithAttributes=elem;!elemWithAttributes.getAttribute("data-id");)elemWithAttributes=elemWithAttributes.parentNode;var itemId=elemWithAttributes.getAttribute("data-id"),index=elemWithAttributes.getAttribute("data-index"),mediaType=elemWithAttributes.getAttribute("data-mediatype");return{id:itemId,index:index,mediaType:mediaType,context:elemWithAttributes.getAttribute("data-context")}},renderName:function(item,nameElem,linkToElement,context){require(["itemHelper"],function(itemHelper){var name=itemHelper.getDisplayName(item,{includeParentInfo:!1});linkToElement?nameElem.innerHTML=''+name+"":nameElem.innerHTML=name})},renderParentName:function(item,parentNameElem,context){var html=[],contextParam=context?"&context="+context:"";item.AlbumArtists?html.push(LibraryBrowser.getArtistLinksHtml(item.AlbumArtists,"detailPageParentLink")):item.ArtistItems&&item.ArtistItems.length&&"MusicVideo"==item.Type?html.push(LibraryBrowser.getArtistLinksHtml(item.ArtistItems,"detailPageParentLink")):item.SeriesName&&"Episode"==item.Type&&html.push(''+item.SeriesName+""),item.SeriesName&&"Season"==item.Type?html.push(''+item.SeriesName+""):null!=item.ParentIndexNumber&&"Episode"==item.Type?html.push(''+item.SeasonName+""):item.Album&&"Audio"==item.Type&&(item.AlbumId||item.ParentId)?html.push(''+item.Album+""):item.Album&&"MusicVideo"==item.Type&&item.AlbumId?html.push(''+item.Album+""):item.Album?html.push(item.Album):(item.IsSeries||item.EpisodeTitle)&&html.push(item.Name),html.length?(parentNameElem.classList.remove("hide"),parentNameElem.innerHTML=html.join(" - ")):parentNameElem.classList.add("hide")},showLayoutMenu:function(button,currentLayout,views){var dispatchEvent=!0;views||(dispatchEvent=!1,views=button.getAttribute("data-layouts"),views=views?views.split(","):["List","Poster","PosterCard","Thumb","ThumbCard"]);var menuItems=views.map(function(v){return{name:Globalize.translate("Option"+v),id:v,selected:currentLayout==v}});require(["actionsheet"],function(actionsheet){actionsheet.show({items:menuItems,positionTo:button,callback:function(id){button.dispatchEvent(new CustomEvent("layoutchange",{detail:{viewStyle:id},bubbles:!0,cancelable:!1})),dispatchEvent||window.$&&$(button).trigger("layoutchange",[id])}})})},getQueryPagingHtml:function(options){var startIndex=options.startIndex,limit=options.limit,totalRecordCount=options.totalRecordCount;if(limit&&options.updatePageSizeSetting!==!1)try{appSettings.set(options.pageSizeKey||pageSizeKey,limit)}catch(e){}var html="",recordsEnd=Math.min(startIndex+limit,totalRecordCount),showControls=totalRecordCount>20||limit',showControls){html+='';var startAtDisplay=totalRecordCount?startIndex+1:0;html+=startAtDisplay+"-"+recordsEnd+" of "+totalRecordCount,html+=""}if((showControls||options.viewButton||options.filterButton||options.sortButton||options.addLayoutButton)&&(html+='
',showControls&&(html+='',html+=''),options.addLayoutButton&&(html+=''),options.sortButton&&(html+=''),options.filterButton&&(html+=''),html+="
",showControls&&options.showLimit)){var id="selectPageSize",pageSizes=options.pageSizes||[20,50,100,200,300,400,500],optionsHtml=pageSizes.map(function(val){return limit==val?'":'"}).join("");html+='
"}return html+=""},showSortMenu:function(options){require(["dialogHelper","emby-radio"],function(dialogHelper){function onSortByChange(){var newValue=this.value;if(this.checked){var changed=options.query.SortBy!=newValue;options.query.SortBy=newValue.replace("_",","),options.query.StartIndex=0,options.callback&&changed&&options.callback()}}function onSortOrderChange(){var newValue=this.value;if(this.checked){var changed=options.query.SortOrder!=newValue;options.query.SortOrder=newValue,options.query.StartIndex=0,options.callback&&changed&&options.callback()}}var dlg=dialogHelper.createDialog({removeOnClose:!0,modal:!1,entryAnimationDuration:160,exitAnimationDuration:200});dlg.classList.add("ui-body-a"),dlg.classList.add("background-theme-a"),dlg.classList.add("formDialog");var html="";html+='
',html+='

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

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

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

",html+="
",isChecked="Ascending"==options.query.SortOrder?" checked":"",html+='",isChecked="Descending"==options.query.SortOrder?" checked":"",html+='",html+="
",html+="
",dlg.innerHTML=html,dialogHelper.open(dlg);var sortBys=dlg.querySelectorAll(".menuSortBy");for(i=0,length=sortBys.length;i',editable&&(html+=""),detectRatio&&item.PrimaryImageAspectRatio&&(item.PrimaryImageAspectRatio>=1.48?shape="thumb":item.PrimaryImageAspectRatio>=.85&&item.PrimaryImageAspectRatio<=1.34&&(shape="square")),html+="",editable&&(html+="");var progressHtml=item.IsFolder||!item.UserData?"":indicators.getProgressBarHtml(item);if(html+='
',progressHtml&&(html+=progressHtml),html+="
",html+="",elem.innerHTML=html,"thumb"==shape?(elem.classList.add("thumbDetailImageContainer"),elem.classList.remove("portraitDetailImageContainer"),elem.classList.remove("squareDetailImageContainer")):"square"==shape?(elem.classList.remove("thumbDetailImageContainer"),elem.classList.remove("portraitDetailImageContainer"),elem.classList.add("squareDetailImageContainer")):(elem.classList.remove("thumbDetailImageContainer"),elem.classList.add("portraitDetailImageContainer"),elem.classList.remove("squareDetailImageContainer")),url){var img=elem.querySelector("img");img.onload=function(){img.src.indexOf("empty.png")==-1&&img.classList.add("loaded")},imageLoader.lazyImage(img,url)}},renderDetailPageBackdrop:function(page,item,imageLoader){var imgUrl,screenWidth=screen.availWidth,hasbackdrop=!1,itemBackdropElement=page.querySelector("#itemBackdrop"),usePrimaryImage="Episode"===item.Type;return usePrimaryImage&&item.ImageTags&&item.ImageTags.Primary?(imgUrl=ApiClient.getScaledImageUrl(item.Id,{type:"Primary",index:0,maxWidth:screenWidth,tag:item.ImageTags.Primary}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):item.BackdropImageTags&&item.BackdropImageTags.length?(imgUrl=ApiClient.getScaledImageUrl(item.Id,{type:"Backdrop",index:0,maxWidth:screenWidth,tag:item.BackdropImageTags[0]}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):item.ParentBackdropItemId&&item.ParentBackdropImageTags&&item.ParentBackdropImageTags.length?(imgUrl=ApiClient.getScaledImageUrl(item.ParentBackdropItemId,{type:"Backdrop",index:0,tag:item.ParentBackdropImageTags[0],maxWidth:screenWidth}),itemBackdropElement.classList.remove("noBackdrop"),imageLoader.lazyImage(itemBackdropElement,imgUrl,!1),hasbackdrop=!0):(itemBackdropElement.classList.add("noBackdrop"),itemBackdropElement.style.backgroundImage=""),hasbackdrop}};return libraryBrowser}(window,document,screen);return window.LibraryBrowser=libraryBrowser,libraryBrowser}); \ No newline at end of file diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index a374a6c462..63049e159e 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -1 +1 @@ -define(["layoutManager","viewManager","libraryBrowser","embyRouter","playbackManager","browser","paper-icon-button-light","material-icons","scrollStyles"],function(layoutManager,viewManager,libraryBrowser,embyRouter,playbackManager,browser){"use strict";function renderHeader(){var html="";html+='
';var backIcon=browser.safari?"chevron_left":"";html+='",html+='',html+='',html+='

',html+='
',html+='',html+='',html+='',html+='',html+='',html+='',browser.mobile||(html+=''),html+="
",html+="
",html+='
',html+="
";var viewMenuBar=document.createElement("div");viewMenuBar.classList.add("viewMenuBar"),viewMenuBar.innerHTML=html,browser.chrome||viewMenuBar.classList.add("viewMenuBar-blurred"),document.querySelector(".skinHeader").appendChild(viewMenuBar),lazyLoadViewMenuBarImages(),bindMenuEvents()}function lazyLoadViewMenuBarImages(){require(["imageLoader"],function(imageLoader){imageLoader.lazyChildren(document.querySelector(".viewMenuBar"))})}function onBackClick(){embyRouter.back()}function updateUserInHeader(user){var header=document.querySelector(".viewMenuBar");if(header){var hasImage,headerUserButton=header.querySelector(".headerUserButton");if(user&&user.name&&user.imageUrl){var userButtonHeight=26,url=user.imageUrl;user.supportsImageParams&&(url+="&height="+Math.round(userButtonHeight*Math.max(window.devicePixelRatio||1,2))),headerUserButton&&(updateHeaderUserButton(headerUserButton,url),hasImage=!0)}headerUserButton&&!hasImage&&updateHeaderUserButton(headerUserButton,null),user&&updateLocalUser(user.localUser),requiresUserRefresh=!1}}function updateHeaderUserButton(headerUserButton,src){src?(headerUserButton.classList.add("headerUserButtonRound"),headerUserButton.classList.remove("autoSize"),headerUserButton.innerHTML=''):(headerUserButton.classList.remove("headerUserButtonRound"),headerUserButton.classList.add("autoSize"),headerUserButton.innerHTML='person')}function updateLocalUser(user){var header=document.querySelector(".viewMenuBar"),headerSearchButton=header.querySelector(".headerSearchButton"),btnCast=header.querySelector(".btnCast"),dashboardEntryHeaderButton=header.querySelector(".dashboardEntryHeaderButton");user?(btnCast.classList.remove("hide"),headerSearchButton&&headerSearchButton.classList.remove("hide"),dashboardEntryHeaderButton&&(user.Policy.IsAdministrator?dashboardEntryHeaderButton.classList.remove("hide"):dashboardEntryHeaderButton.classList.add("hide")),require(["apphost"],function(apphost){apphost.supports("voiceinput")?header.querySelector(".headerVoiceButton").classList.add("hide"):header.querySelector(".headerVoiceButton").classList.add("hide")})):(btnCast.classList.add("hide"),header.querySelector(".headerVoiceButton").classList.add("hide"),headerSearchButton&&headerSearchButton.classList.add("hide"),dashboardEntryHeaderButton&&dashboardEntryHeaderButton.classList.add("hide"))}function showVoice(){require(["voiceDialog"],function(voiceDialog){voiceDialog.showDialog()})}function showSearch(){Dashboard.navigate("search.html")}function onHeaderUserButtonClick(e){Dashboard.showUserFlyout(e.target)}function onHeaderAppsButtonClick(){Dashboard.navigate("home.html")}function bindMenuEvents(){mainDrawerButton=document.querySelector(".mainDrawerButton"),mainDrawerButton&&mainDrawerButton.addEventListener("click",toggleMainDrawer);var headerBackButton=document.querySelector(".headerBackButton");headerBackButton&&headerBackButton.addEventListener("click",onBackClick);var headerVoiceButton=document.querySelector(".headerVoiceButton");headerVoiceButton&&headerVoiceButton.addEventListener("click",showVoice);var headerSearchButton=document.querySelector(".headerSearchButton");headerSearchButton&&headerSearchButton.addEventListener("click",showSearch);var headerUserButton=document.querySelector(".headerUserButton");headerUserButton&&headerUserButton.addEventListener("click",onHeaderUserButtonClick);var headerAppsButton=document.querySelector(".headerAppsButton");headerAppsButton&&headerAppsButton.addEventListener("click",onHeaderAppsButtonClick);var viewMenuBar=document.querySelector(".viewMenuBar");initHeadRoom(viewMenuBar),viewMenuBar.querySelector(".btnNotifications").addEventListener("click",function(){Dashboard.navigate("notificationlist.html")});var btnCast=document.querySelector(".headerButton-btnCast");btnCast&&btnCast.addEventListener("click",onCastButtonClicked)}function onCastButtonClicked(){var btn=this;require(["playerSelectionMenu"],function(playerSelectionMenu){playerSelectionMenu.show(btn)})}function getItemHref(item,context){return embyRouter.getRouteUrl(item,{context:context})}function toggleMainDrawer(){navDrawerInstance.isVisible?closeMainDrawer():openMainDrawer()}function openMainDrawer(){navDrawerInstance.open(),lastOpenTime=(new Date).getTime()}function onMainDrawerOpened(){browser.mobile&&document.body.classList.add("bodyWithPopupOpen")}function closeMainDrawer(){navDrawerInstance.close()}function onMainDrawerSelect(e){navDrawerInstance.isVisible?onMainDrawerOpened():document.body.classList.remove("bodyWithPopupOpen")}function refreshLibraryInfoInDrawer(user,drawer){var html="";html+='
';var homeHref=window.ApiClient?"home.html":"selectserver.html?showuser=1";html+=''+Globalize.translate("ButtonHome")+"",html+=''+Globalize.translate("ButtonRemote")+"",html+='
',html+='
',html+="
";var localUser=user.localUser;localUser&&localUser.Policy.IsAdministrator&&(html+='
',html+='
',html+='
',html+=Globalize.translate("HeaderAdmin"),html+="
",html+=''+Globalize.translate("ButtonManageServer")+"",html+=''+Globalize.translate("MetadataManager")+"",browser.mobile||(html+=''+Globalize.translate("ButtonReports")+""),html+="
"),html+='",navDrawerScrollContainer.innerHTML=html;var lnkManageServer=navDrawerScrollContainer.querySelector(".lnkManageServer");lnkManageServer&&lnkManageServer.addEventListener("click",onManageServerClicked),layoutManager.desktop&&navDrawerScrollContainer.classList.add("darkScroller")}function refreshDashboardInfoInDrawer(page,user){loadNavDrawer().then(function(){navDrawerScrollContainer.querySelector(".adminDrawerLogo")?updateDashboardMenuSelectedItem():createDashboardMenu(page)})}function updateDashboardMenuSelectedItem(){for(var links=navDrawerScrollContainer.querySelectorAll(".sidebarLink"),i=0,length=links.length;i',html+=Globalize.translate("HeaderMedia"),html+="",html+=items.map(function(i){var icon="folder",color="inherit",itemId=i.Id;"channels"==i.CollectionType?itemId="channels":"livetv"==i.CollectionType&&(itemId="livetv"),"photos"==i.CollectionType?(icon="photo_library",color="#009688"):"music"==i.CollectionType||"musicvideos"==i.CollectionType?(icon="library_music",color="#FB8521"):"books"==i.CollectionType?(icon="library_books",color="#1AA1E1"):"playlists"==i.CollectionType?(icon="view_list",color="#795548"):"games"==i.CollectionType?(icon="games",color="#F44336"):"movies"==i.CollectionType?(icon="video_library",color="#CE5043"):"channels"==i.CollectionType||"Channel"==i.Type?(icon="videocam",color="#E91E63"):"tvshows"==i.CollectionType?(icon="tv",color="#4CAF50"):"livetv"==i.CollectionType&&(icon="live_tv",color="#293AAE"),icon=i.icon||icon;var onclick=i.onclick?" function(){"+i.onclick+"}":"null";return''+icon+''+i.Name+""}).join(""),libraryMenuOptions.innerHTML=html;for(var elem=libraryMenuOptions,sidebarLinks=elem.querySelectorAll(".sidebarLink"),i=0,length=sidebarLinks.length;i200&&setTimeout(function(){closeMainDrawer(),setTimeout(function(){action?action():Dashboard.navigate(link.href)},getNavigateDelay())},50),event.stopPropagation(),event.preventDefault(),!1)},onLogoutClicked:function(){return(new Date).getTime()-lastOpenTime>200&&(closeMainDrawer(),setTimeout(function(){Dashboard.logout()},getNavigateDelay())),!1},onHardwareMenuButtonClick:function(){toggleMainDrawer()},onSettingsClicked:function(event){return 1!=event.which||(Dashboard.navigate("dashboard.html"),!1)},setTabs:function(type,selectedIndex,builder){require(["mainTabsManager"],function(mainTabsManager){type?mainTabsManager.setTabs(viewManager.currentView(),selectedIndex,builder):mainTabsManager.setTabs(null)})},setDefaultTitle:function(){var libraryMenuButtonText=document.querySelector(".libraryMenuButtonText");libraryMenuButtonText&&(libraryMenuButtonText.innerHTML=''),document.title="Emby"},setTitle:function(title){var html=title,page=viewManager.currentView();if(page){var helpUrl=page.getAttribute("data-helpurl");helpUrl&&(html+='info'+Globalize.translate("ButtonHelp")+"")}var libraryMenuButtonText=document.querySelector(".libraryMenuButtonText");libraryMenuButtonText&&(libraryMenuButtonText.innerHTML=html),document.title=title||"Emby"},setTransparentMenu:function(transparent){var viewMenuBar=document.querySelector(".viewMenuBar");viewMenuBar&&(transparent?viewMenuBar.classList.add("semiTransparent"):viewMenuBar.classList.remove("semiTransparent"))}},pageClassOn("pagebeforeshow","page",function(e){var page=this;page.classList.contains("withTabs")||(LibraryMenu.setTabs(null),page.classList.contains("pageWithAbsoluteTabs")?document.body.classList.add("withTallToolbar"):document.body.classList.remove("withTallToolbar"))}),pageClassOn("pageshow","page",function(e){var page=this,isDashboardPage=page.classList.contains("type-interior");isDashboardPage?(mainDrawerButton&&mainDrawerButton.classList.remove("hide"),refreshDashboardInfoInDrawer(page)):(mainDrawerButton&&(enableLibraryNavDrawer?mainDrawerButton.classList.remove("hide"):mainDrawerButton.classList.add("hide")),(navDrawerElement&&navDrawerElement.classList.contains("adminDrawer")||!navDrawerElement)&&refreshLibraryDrawer()),setDrawerClass(page),updateViewMenuBar(page),e.detail.isRestored||window.scrollTo(0,0),updateTitle(page),updateBackButton(page),page.classList.contains("libraryPage")?(document.body.classList.add("libraryDocument"),document.body.classList.remove("dashboardDocument"),document.body.classList.remove("hideMainDrawer")):isDashboardPage?(document.body.classList.remove("libraryDocument"),document.body.classList.add("dashboardDocument"),document.body.classList.remove("hideMainDrawer")):(document.body.classList.remove("libraryDocument"),document.body.classList.remove("dashboardDocument"),document.body.classList.add("hideMainDrawer")),updateLibraryNavLinks(page)}),window.ApiClient&&initializeApiClient(window.ApiClient),renderHeader(),Events.on(ConnectionManager,"apiclientcreated",function(e,apiClient){initializeApiClient(apiClient)}),Events.on(ConnectionManager,"localusersignedin",function(e,user){setDrawerClass(),ConnectionManager.user(ConnectionManager.getApiClient(user.ServerId)).then(function(user){refreshLibraryDrawer(user),updateUserInHeader(user)})}),Events.on(ConnectionManager,"localusersignedout",updateUserInHeader),Events.on(playbackManager,"playerchange",updateCastIcon),setDrawerClass(),enableBottomTabs&&require(["appfooter-shared","dockedtabs"],function(footer,dockedtabs){new dockedtabs({appFooter:footer})}),LibraryMenu}); \ No newline at end of file +define(["layoutManager","viewManager","libraryBrowser","embyRouter","playbackManager","browser","paper-icon-button-light","material-icons","scrollStyles"],function(layoutManager,viewManager,libraryBrowser,embyRouter,playbackManager,browser){"use strict";function renderHeader(){var html="";html+='
';var backIcon=browser.safari?"chevron_left":"";html+='",html+='',html+='',html+='

',html+='
',html+='',html+='',html+='',html+='',html+='',html+='',browser.mobile||(html+=''),html+="
",html+="
",html+='
',html+="
";var viewMenuBar=document.createElement("div");viewMenuBar.classList.add("viewMenuBar"),viewMenuBar.innerHTML=html,browser.chrome||viewMenuBar.classList.add("viewMenuBar-blurred"),document.querySelector(".skinHeader").appendChild(viewMenuBar),lazyLoadViewMenuBarImages(),bindMenuEvents()}function lazyLoadViewMenuBarImages(){require(["imageLoader"],function(imageLoader){imageLoader.lazyChildren(document.querySelector(".viewMenuBar"))})}function onBackClick(){embyRouter.back()}function updateUserInHeader(user){var header=document.querySelector(".viewMenuBar");if(header){var hasImage,headerUserButton=header.querySelector(".headerUserButton");if(user&&user.name&&user.imageUrl){var userButtonHeight=26,url=user.imageUrl;user.supportsImageParams&&(url+="&height="+Math.round(userButtonHeight*Math.max(window.devicePixelRatio||1,2))),headerUserButton&&(updateHeaderUserButton(headerUserButton,url),hasImage=!0)}headerUserButton&&!hasImage&&updateHeaderUserButton(headerUserButton,null),user&&updateLocalUser(user.localUser),requiresUserRefresh=!1}}function updateHeaderUserButton(headerUserButton,src){src?(headerUserButton.classList.add("headerUserButtonRound"),headerUserButton.classList.remove("autoSize"),headerUserButton.innerHTML=''):(headerUserButton.classList.remove("headerUserButtonRound"),headerUserButton.classList.add("autoSize"),headerUserButton.innerHTML='person')}function updateLocalUser(user){var header=document.querySelector(".viewMenuBar"),headerSearchButton=header.querySelector(".headerSearchButton"),btnCast=header.querySelector(".btnCast"),dashboardEntryHeaderButton=header.querySelector(".dashboardEntryHeaderButton");user?(btnCast.classList.remove("hide"),headerSearchButton&&headerSearchButton.classList.remove("hide"),dashboardEntryHeaderButton&&(user.Policy.IsAdministrator?dashboardEntryHeaderButton.classList.remove("hide"):dashboardEntryHeaderButton.classList.add("hide")),require(["apphost"],function(apphost){apphost.supports("voiceinput")?header.querySelector(".headerVoiceButton").classList.add("hide"):header.querySelector(".headerVoiceButton").classList.add("hide")})):(btnCast.classList.add("hide"),header.querySelector(".headerVoiceButton").classList.add("hide"),headerSearchButton&&headerSearchButton.classList.add("hide"),dashboardEntryHeaderButton&&dashboardEntryHeaderButton.classList.add("hide"))}function showVoice(){require(["voiceDialog"],function(voiceDialog){voiceDialog.showDialog()})}function showSearch(){Dashboard.navigate("search.html")}function onHeaderUserButtonClick(e){Dashboard.showUserFlyout(e.target)}function onHeaderAppsButtonClick(){Dashboard.navigate("home.html")}function bindMenuEvents(){mainDrawerButton=document.querySelector(".mainDrawerButton"),mainDrawerButton&&mainDrawerButton.addEventListener("click",toggleMainDrawer);var headerBackButton=document.querySelector(".headerBackButton");headerBackButton&&headerBackButton.addEventListener("click",onBackClick);var headerVoiceButton=document.querySelector(".headerVoiceButton");headerVoiceButton&&headerVoiceButton.addEventListener("click",showVoice);var headerSearchButton=document.querySelector(".headerSearchButton");headerSearchButton&&headerSearchButton.addEventListener("click",showSearch);var headerUserButton=document.querySelector(".headerUserButton");headerUserButton&&headerUserButton.addEventListener("click",onHeaderUserButtonClick);var headerAppsButton=document.querySelector(".headerAppsButton");headerAppsButton&&headerAppsButton.addEventListener("click",onHeaderAppsButtonClick);var viewMenuBar=document.querySelector(".viewMenuBar");initHeadRoom(viewMenuBar),viewMenuBar.querySelector(".btnNotifications").addEventListener("click",function(){Dashboard.navigate("notificationlist.html")});var btnCast=document.querySelector(".headerButton-btnCast");btnCast&&btnCast.addEventListener("click",onCastButtonClicked)}function onCastButtonClicked(){var btn=this;require(["playerSelectionMenu"],function(playerSelectionMenu){playerSelectionMenu.show(btn)})}function getItemHref(item,context){return embyRouter.getRouteUrl(item,{context:context})}function toggleMainDrawer(){navDrawerInstance.isVisible?closeMainDrawer():openMainDrawer()}function openMainDrawer(){navDrawerInstance.open(),lastOpenTime=(new Date).getTime()}function onMainDrawerOpened(){browser.mobile&&document.body.classList.add("bodyWithPopupOpen")}function closeMainDrawer(){navDrawerInstance.close()}function onMainDrawerSelect(e){navDrawerInstance.isVisible?onMainDrawerOpened():document.body.classList.remove("bodyWithPopupOpen")}function refreshLibraryInfoInDrawer(user,drawer){var html="";html+='
';var homeHref=window.ApiClient?"home.html":"selectserver.html?showuser=1";html+=''+Globalize.translate("ButtonHome")+"",html+=''+Globalize.translate("ButtonRemote")+"",html+='
',html+='
',html+="
";var localUser=user.localUser;localUser&&localUser.Policy.IsAdministrator&&(html+='
',html+='
',html+='
',html+=Globalize.translate("HeaderAdmin"),html+="
",html+=''+Globalize.translate("ButtonManageServer")+"",html+=''+Globalize.translate("MetadataManager")+"",browser.mobile||(html+=''+Globalize.translate("ButtonReports")+""),html+="
"),html+='",navDrawerScrollContainer.innerHTML=html;var lnkManageServer=navDrawerScrollContainer.querySelector(".lnkManageServer");lnkManageServer&&lnkManageServer.addEventListener("click",onManageServerClicked),layoutManager.desktop&&navDrawerScrollContainer.classList.add("darkScroller")}function refreshDashboardInfoInDrawer(page,user){loadNavDrawer().then(function(){navDrawerScrollContainer.querySelector(".adminDrawerLogo")?updateDashboardMenuSelectedItem():createDashboardMenu(page)})}function updateDashboardMenuSelectedItem(){for(var links=navDrawerScrollContainer.querySelectorAll(".sidebarLink"),i=0,length=links.length;i',html+=Globalize.translate("HeaderMedia"),html+="",html+=items.map(function(i){var icon="folder",color="inherit",itemId=i.Id;"channels"==i.CollectionType?itemId="channels":"livetv"==i.CollectionType&&(itemId="livetv"),"photos"==i.CollectionType?(icon="photo_library",color="#009688"):"music"==i.CollectionType||"musicvideos"==i.CollectionType?(icon="library_music",color="#FB8521"):"books"==i.CollectionType?(icon="library_books",color="#1AA1E1"):"playlists"==i.CollectionType?(icon="view_list",color="#795548"):"games"==i.CollectionType?(icon="games",color="#F44336"):"movies"==i.CollectionType?(icon="video_library",color="#CE5043"):"channels"==i.CollectionType||"Channel"==i.Type?(icon="videocam",color="#E91E63"):"tvshows"==i.CollectionType?(icon="tv",color="#4CAF50"):"livetv"==i.CollectionType&&(icon="live_tv",color="#293AAE"),icon=i.icon||icon;var onclick=i.onclick?" function(){"+i.onclick+"}":"null";return''+icon+''+i.Name+""}).join(""),libraryMenuOptions.innerHTML=html;for(var elem=libraryMenuOptions,sidebarLinks=elem.querySelectorAll(".sidebarLink"),i=0,length=sidebarLinks.length;i200&&setTimeout(function(){closeMainDrawer(),setTimeout(function(){action?action():Dashboard.navigate(link.href)},getNavigateDelay())},50),event.stopPropagation(),event.preventDefault(),!1)},onLogoutClicked:function(){return(new Date).getTime()-lastOpenTime>200&&(closeMainDrawer(),setTimeout(function(){Dashboard.logout()},getNavigateDelay())),!1},onHardwareMenuButtonClick:function(){toggleMainDrawer()},onSettingsClicked:function(event){return 1!=event.which||(Dashboard.navigate("dashboard.html"),!1)},setTabs:function(type,selectedIndex,builder){require(["mainTabsManager"],function(mainTabsManager){type?mainTabsManager.setTabs(viewManager.currentView(),selectedIndex,builder):mainTabsManager.setTabs(null)})},setDefaultTitle:function(){var libraryMenuButtonText=document.querySelector(".libraryMenuButtonText");libraryMenuButtonText&&(libraryMenuButtonText.innerHTML=''),document.title="Emby"},setTitle:function(title){var html=title,page=viewManager.currentView();if(page){var helpUrl=page.getAttribute("data-helpurl");helpUrl&&(html+='info'+Globalize.translate("ButtonHelp")+"")}var libraryMenuButtonText=document.querySelector(".libraryMenuButtonText");libraryMenuButtonText&&(libraryMenuButtonText.innerHTML=html),document.title=title||"Emby"},setTransparentMenu:function(transparent){var viewMenuBar=document.querySelector(".viewMenuBar");viewMenuBar&&(transparent?viewMenuBar.classList.add("semiTransparent"):viewMenuBar.classList.remove("semiTransparent"))}},pageClassOn("pagebeforeshow","page",function(e){var page=this;page.classList.contains("withTabs")||(LibraryMenu.setTabs(null),page.classList.contains("pageWithAbsoluteTabs")?document.body.classList.add("withTallToolbar"):document.body.classList.remove("withTallToolbar"))}),pageClassOn("pageshow","page",function(e){var page=this,isDashboardPage=page.classList.contains("type-interior");isDashboardPage?(mainDrawerButton&&mainDrawerButton.classList.remove("hide"),refreshDashboardInfoInDrawer(page)):(mainDrawerButton&&(enableLibraryNavDrawer?mainDrawerButton.classList.remove("hide"):mainDrawerButton.classList.add("hide")),(navDrawerElement&&navDrawerElement.classList.contains("adminDrawer")||!navDrawerElement)&&refreshLibraryDrawer()),setDrawerClass(page),updateViewMenuBar(page),e.detail.isRestored||window.scrollTo(0,0),updateTitle(page),updateBackButton(page),page.classList.contains("libraryPage")?(document.body.classList.add("libraryDocument"),document.body.classList.remove("dashboardDocument"),document.body.classList.remove("hideMainDrawer")):isDashboardPage?(document.body.classList.remove("libraryDocument"),document.body.classList.add("dashboardDocument"),document.body.classList.remove("hideMainDrawer")):(document.body.classList.remove("libraryDocument"),document.body.classList.remove("dashboardDocument"),document.body.classList.add("hideMainDrawer")),updateLibraryNavLinks(page)}),window.ApiClient&&initializeApiClient(window.ApiClient),renderHeader(),Events.on(ConnectionManager,"apiclientcreated",function(e,apiClient){initializeApiClient(apiClient)}),Events.on(ConnectionManager,"localusersignedin",function(e,user){setDrawerClass(),ConnectionManager.user(ConnectionManager.getApiClient(user.ServerId)).then(function(user){refreshLibraryDrawer(user),updateUserInHeader(user)})}),Events.on(ConnectionManager,"localusersignedout",updateUserInHeader),Events.on(playbackManager,"playerchange",updateCastIcon),setDrawerClass(),enableBottomTabs&&require(["appfooter-shared","dockedtabs"],function(footer,dockedtabs){new dockedtabs({appFooter:footer})}),LibraryMenu}); \ No newline at end of file diff --git a/dashboard-ui/scripts/movies.js b/dashboard-ui/scripts/movies.js index f88f4a568a..462974f866 100644 --- a/dashboard-ui/scripts/movies.js +++ b/dashboard-ui/scripts/movies.js @@ -1 +1 @@ -define(["layoutManager","loading","events","libraryBrowser","imageLoader","alphaPicker","listView","cardBuilder","apphost","emby-itemscontainer"],function(layoutManager,loading,events,libraryBrowser,imageLoader,alphaPicker,listView,cardBuilder,appHost){"use strict";return function(view,params,tabContent){function getPageData(context){var key=getSavedQueryKey(context),pageData=data[key];return pageData||(pageData=data[key]={query:{SortBy:"SortName",SortOrder:"Ascending",IncludeItemTypes:"Movie",Recursive:!0,Fields:"PrimaryImageAspectRatio,MediaSourceCount,BasicSyncInfo",ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",StartIndex:0,Limit:pageSize},view:libraryBrowser.getSavedView(key)||"Poster"},"favorites"===self.mode&&(pageData.query.IsFavorite=!0),pageData.query.ParentId=params.topParentId,libraryBrowser.loadSavedQueryValues(key,pageData.query)),pageData}function getQuery(context){return getPageData(context).query}function getSavedQueryKey(context){if(!context.savedQueryKey){var key="favorites"===self.mode?"moviefavorites":"movies";context.savedQueryKey=libraryBrowser.getSavedQueryKey(key)}return context.savedQueryKey}function onViewStyleChange(){var viewStyle=self.getCurrentViewStyle(),itemsContainer=tabContent.querySelector(".itemsContainer");"List"==viewStyle?(itemsContainer.classList.add("vertical-list"),itemsContainer.classList.remove("vertical-wrap")):(itemsContainer.classList.remove("vertical-list"),itemsContainer.classList.add("vertical-wrap")),itemsContainer.innerHTML=""}function reloadItems(page){loading.show();var query=getQuery(page);ApiClient.getItems(Dashboard.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");html="Thumb"==viewStyle?cardBuilder.getCardsHtml({items:result.Items,shape:"backdrop",preferThumb:!0,context:"movies",lazy:!0,overlayPlayButton:!0,centerText:!0}):"ThumbCard"==viewStyle?cardBuilder.getCardsHtml({items:result.Items,shape:"backdrop",preferThumb:!0,context:"movies",lazy:!0,cardLayout:!0,showTitle:!0,showYear:!0,vibrant:supportsImageAnalysis}):"Banner"==viewStyle?cardBuilder.getCardsHtml({items:result.Items,shape:"banner",preferBanner:!0,context:"movies",lazy:!0}):"List"==viewStyle?listView.getListViewHtml({items:result.Items,context:"movies",sortBy:query.SortBy}):"PosterCard"==viewStyle?cardBuilder.getCardsHtml({items:result.Items,shape:"portrait",context:"movies",showTitle:!0,showYear:!0,lazy:!0,cardLayout:!0,vibrant:supportsImageAnalysis}):cardBuilder.getCardsHtml({items:result.Items,shape:"portrait",context:"movies",centerText:!0,lazy:!0,overlayPlayButton:!0});var i,length,elems=tabContent.querySelectorAll(".paging");for(i=0,length=elems.length;i=1920?9:screenWidth>=1200?12:screenWidth>=1e3?10:8}function enableScrollX(){return!layoutManager.desktop}function getSquareShape(){return enableScrollX()?"overflowSquare":"square"}function loadLatest(page,parentId){loading.show();var userId=Dashboard.getCurrentUserId(),options={IncludeItemTypes:"Audio",Limit:itemsPerRow(),Fields:"PrimaryImageAspectRatio,BasicSyncInfo",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};ApiClient.getJSON(ApiClient.getUrl("Users/"+userId+"/Items/Latest",options)).then(function(items){var elem=page.querySelector("#recentlyAddedSongs"),supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,elem.innerHTML=cardBuilder.getCardsHtml({items:items,showUnplayedIndicator:!1,showLatestItemsPopup:!1,shape:getSquareShape(),showTitle:!0,showParentTitle:!0,lazy:!0,centerText:!supportsImageAnalysis,overlayPlayButton:!supportsImageAnalysis,allowBottomPadding:!enableScrollX(),cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis}),imageLoader.lazyChildren(elem),loading.hide()})}function loadRecentlyPlayed(page,parentId){var options={SortBy:"DatePlayed",SortOrder:"Descending",IncludeItemTypes:"Audio",Limit:itemsPerRow(),Recursive:!0,Fields:"PrimaryImageAspectRatio,AudioInfo",Filters:"IsPlayed",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};ApiClient.getItems(Dashboard.getCurrentUserId(),options).then(function(result){var elem=page.querySelector("#recentlyPlayed");result.Items.length?elem.classList.remove("hide"):elem.classList.add("hide");var itemsContainer=elem.querySelector(".itemsContainer"),supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,itemsContainer.innerHTML=cardBuilder.getCardsHtml({items:result.Items,showUnplayedIndicator:!1,shape:getSquareShape(),showTitle:!0,showParentTitle:!0,action:"instantmix",lazy:!0,centerText:!supportsImageAnalysis,overlayMoreButton:!supportsImageAnalysis,allowBottomPadding:!enableScrollX(),cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis}),imageLoader.lazyChildren(itemsContainer)})}function loadFrequentlyPlayed(page,parentId){var options={SortBy:"PlayCount",SortOrder:"Descending",IncludeItemTypes:"Audio",Limit:itemsPerRow(),Recursive:!0,Fields:"PrimaryImageAspectRatio,AudioInfo",Filters:"IsPlayed",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};ApiClient.getItems(Dashboard.getCurrentUserId(),options).then(function(result){var elem=page.querySelector("#topPlayed");result.Items.length?elem.classList.remove("hide"):elem.classList.add("hide");var itemsContainer=elem.querySelector(".itemsContainer"),supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,itemsContainer.innerHTML=cardBuilder.getCardsHtml({items:result.Items,showUnplayedIndicator:!1,shape:getSquareShape(),showTitle:!0,showParentTitle:!0,action:"instantmix",lazy:!0,centerText:!supportsImageAnalysis,overlayMoreButton:!supportsImageAnalysis,allowBottomPadding:!enableScrollX(),cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis}),imageLoader.lazyChildren(itemsContainer)})}function loadPlaylists(page,parentId){var options={SortBy:"SortName",SortOrder:"Ascending",IncludeItemTypes:"Playlist",Recursive:!0,Fields:"PrimaryImageAspectRatio,SortName,CumulativeRunTimeTicks,CanDelete",StartIndex:0,Limit:itemsPerRow(),EnableTotalRecordCount:!1};ApiClient.getItems(Dashboard.getCurrentUserId(),options).then(function(result){var elem=page.querySelector("#playlists");result.Items.length?elem.classList.remove("hide"):elem.classList.add("hide");var itemsContainer=elem.querySelector(".itemsContainer"),supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,itemsContainer.innerHTML=cardBuilder.getCardsHtml({items:result.Items,shape:getSquareShape(),showTitle:!0,lazy:!0,coverImage:!0,centerText:!supportsImageAnalysis,overlayPlayButton:!supportsImageAnalysis,allowBottomPadding:!enableScrollX(),cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis}),imageLoader.lazyChildren(itemsContainer)})}function loadSuggestionsTab(page,tabContent,parentId){console.log("loadSuggestionsTab"),loadLatest(tabContent,parentId),loadPlaylists(tabContent,parentId),loadRecentlyPlayed(tabContent,parentId),loadFrequentlyPlayed(tabContent,parentId),require(["components/favoriteitems"],function(favoriteItems){favoriteItems.render(tabContent,Dashboard.getCurrentUserId(),parentId,["favoriteArtists","favoriteAlbums","favoriteSongs"])})}function getTabs(){return[{name:Globalize.translate("TabSuggestions")},{name:Globalize.translate("TabAlbums")},{name:Globalize.translate("TabAlbumArtists")},{name:Globalize.translate("TabArtists")},{name:Globalize.translate("TabSongs")},{name:Globalize.translate("TabGenres")},{name:Globalize.translate("TabFolders")}]}return function(view,params){function reload(){loading.show();var tabContent=view.querySelector(".pageTabContent[data-index='0']");loadSuggestionsTab(view,tabContent,params.topParentId)}function enableScrollX(){return browserInfo.mobile}function onBeforeTabChange(e){preLoadTab(view,parseInt(e.detail.selectedTabIndex))}function onTabChange(e){loadTab(view,parseInt(e.detail.selectedTabIndex))}function initTabs(){var tabsReplaced=mainTabsManager.setTabs(view,currentTabIndex,getTabs);if(tabsReplaced){var viewTabs=document.querySelector(".tabs-viewmenubar");viewTabs.addEventListener("beforetabchange",onBeforeTabChange),viewTabs.addEventListener("tabchange",onTabChange),libraryBrowser.configurePaperLibraryTabs(view,viewTabs,view.querySelectorAll(".pageTabContent"),[0,4,5,6]),viewTabs.triggerBeforeTabChange||viewTabs.addEventListener("ready",function(){viewTabs.triggerBeforeTabChange()})}}function getTabController(page,index,callback){var depends=[];switch(index){case 0:break;case 1:depends.push("scripts/musicalbums");break;case 2:depends.push("scripts/musicartists");break;case 3:depends.push("scripts/musicartists");break;case 4:depends.push("scripts/songs");break;case 5:depends.push("scripts/musicgenres");break;case 6:depends.push("scripts/musicfolders")}require(depends,function(controllerFactory){var tabContent;0==index&&(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),self.tabContent=tabContent);var controller=tabControllers[index];controller||(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),controller=index?new controllerFactory(view,params,tabContent):self,2==index?controller.mode="albumartists":3==index&&(controller.mode="artists"),tabControllers[index]=controller,controller.initTab&&controller.initTab()),callback(controller)})}function preLoadTab(page,index){getTabController(page,index,function(controller){renderedTabs.indexOf(index)==-1&&controller.preRender&&controller.preRender()})}function loadTab(page,index){currentTabIndex=index,getTabController(page,index,function(controller){renderedTabs.indexOf(index)==-1&&(renderedTabs.push(index),controller.renderTab())})}var self=this,currentTabIndex=parseInt(params.tab||"0");self.initTab=function(){for(var tabContent=view.querySelector(".pageTabContent[data-index='0']"),containers=tabContent.querySelectorAll(".itemsContainer"),i=0,length=containers.length;i=1920?9:screenWidth>=1200?12:screenWidth>=1e3?10:8}function enableScrollX(){return!layoutManager.desktop}function getSquareShape(){return enableScrollX()?"overflowSquare":"square"}function loadLatest(page,parentId){loading.show();var userId=Dashboard.getCurrentUserId(),options={IncludeItemTypes:"Audio",Limit:itemsPerRow(),Fields:"PrimaryImageAspectRatio,BasicSyncInfo",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};ApiClient.getJSON(ApiClient.getUrl("Users/"+userId+"/Items/Latest",options)).then(function(items){var elem=page.querySelector("#recentlyAddedSongs"),supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,elem.innerHTML=cardBuilder.getCardsHtml({items:items,showUnplayedIndicator:!1,showLatestItemsPopup:!1,shape:getSquareShape(),showTitle:!0,showParentTitle:!0,lazy:!0,centerText:!supportsImageAnalysis,overlayPlayButton:!supportsImageAnalysis,allowBottomPadding:!enableScrollX(),cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis}),imageLoader.lazyChildren(elem),loading.hide()})}function loadRecentlyPlayed(page,parentId){var options={SortBy:"DatePlayed",SortOrder:"Descending",IncludeItemTypes:"Audio",Limit:itemsPerRow(),Recursive:!0,Fields:"PrimaryImageAspectRatio,AudioInfo",Filters:"IsPlayed",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};ApiClient.getItems(Dashboard.getCurrentUserId(),options).then(function(result){var elem=page.querySelector("#recentlyPlayed");result.Items.length?elem.classList.remove("hide"):elem.classList.add("hide");var itemsContainer=elem.querySelector(".itemsContainer"),supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,itemsContainer.innerHTML=cardBuilder.getCardsHtml({items:result.Items,showUnplayedIndicator:!1,shape:getSquareShape(),showTitle:!0,showParentTitle:!0,action:"instantmix",lazy:!0,centerText:!supportsImageAnalysis,overlayMoreButton:!supportsImageAnalysis,allowBottomPadding:!enableScrollX(),cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis}),imageLoader.lazyChildren(itemsContainer)})}function loadFrequentlyPlayed(page,parentId){var options={SortBy:"PlayCount",SortOrder:"Descending",IncludeItemTypes:"Audio",Limit:itemsPerRow(),Recursive:!0,Fields:"PrimaryImageAspectRatio,AudioInfo",Filters:"IsPlayed",ParentId:parentId,ImageTypeLimit:1,EnableImageTypes:"Primary,Backdrop,Banner,Thumb",EnableTotalRecordCount:!1};ApiClient.getItems(Dashboard.getCurrentUserId(),options).then(function(result){var elem=page.querySelector("#topPlayed");result.Items.length?elem.classList.remove("hide"):elem.classList.add("hide");var itemsContainer=elem.querySelector(".itemsContainer"),supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,itemsContainer.innerHTML=cardBuilder.getCardsHtml({items:result.Items,showUnplayedIndicator:!1,shape:getSquareShape(),showTitle:!0,showParentTitle:!0,action:"instantmix",lazy:!0,centerText:!supportsImageAnalysis,overlayMoreButton:!supportsImageAnalysis,allowBottomPadding:!enableScrollX(),cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis}),imageLoader.lazyChildren(itemsContainer)})}function loadPlaylists(page,parentId){var options={SortBy:"SortName",SortOrder:"Ascending",IncludeItemTypes:"Playlist",Recursive:!0,Fields:"PrimaryImageAspectRatio,SortName,CumulativeRunTimeTicks,CanDelete",StartIndex:0,Limit:itemsPerRow(),EnableTotalRecordCount:!1};ApiClient.getItems(Dashboard.getCurrentUserId(),options).then(function(result){var elem=page.querySelector("#playlists");result.Items.length?elem.classList.remove("hide"):elem.classList.add("hide");var itemsContainer=elem.querySelector(".itemsContainer"),supportsImageAnalysis=appHost.supports("imageanalysis");supportsImageAnalysis=!1,itemsContainer.innerHTML=cardBuilder.getCardsHtml({items:result.Items,shape:getSquareShape(),showTitle:!0,lazy:!0,coverImage:!0,centerText:!supportsImageAnalysis,overlayPlayButton:!supportsImageAnalysis,allowBottomPadding:!enableScrollX(),cardLayout:supportsImageAnalysis,vibrant:supportsImageAnalysis}),imageLoader.lazyChildren(itemsContainer)})}function loadSuggestionsTab(page,tabContent,parentId){console.log("loadSuggestionsTab"),loadLatest(tabContent,parentId),loadPlaylists(tabContent,parentId),loadRecentlyPlayed(tabContent,parentId),loadFrequentlyPlayed(tabContent,parentId),require(["components/favoriteitems"],function(favoriteItems){favoriteItems.render(tabContent,Dashboard.getCurrentUserId(),parentId,["favoriteArtists","favoriteAlbums","favoriteSongs"])})}function getTabs(){return[{name:Globalize.translate("TabSuggestions")},{name:Globalize.translate("TabAlbums")},{name:Globalize.translate("TabAlbumArtists")},{name:Globalize.translate("TabArtists")},{name:Globalize.translate("TabSongs")},{name:Globalize.translate("TabGenres")}]}return function(view,params){function reload(){loading.show();var tabContent=view.querySelector(".pageTabContent[data-index='0']");loadSuggestionsTab(view,tabContent,params.topParentId)}function enableScrollX(){return browserInfo.mobile}function onBeforeTabChange(e){preLoadTab(view,parseInt(e.detail.selectedTabIndex))}function onTabChange(e){loadTab(view,parseInt(e.detail.selectedTabIndex))}function initTabs(){var tabsReplaced=mainTabsManager.setTabs(view,currentTabIndex,getTabs);if(tabsReplaced){var viewTabs=document.querySelector(".tabs-viewmenubar");viewTabs.addEventListener("beforetabchange",onBeforeTabChange),viewTabs.addEventListener("tabchange",onTabChange),libraryBrowser.configurePaperLibraryTabs(view,viewTabs,view.querySelectorAll(".pageTabContent"),[0,4,5]),viewTabs.triggerBeforeTabChange||viewTabs.addEventListener("ready",function(){viewTabs.triggerBeforeTabChange()})}}function getTabController(page,index,callback){var depends=[];switch(index){case 0:break;case 1:depends.push("scripts/musicalbums");break;case 2:depends.push("scripts/musicartists");break;case 3:depends.push("scripts/musicartists");break;case 4:depends.push("scripts/songs");break;case 5:depends.push("scripts/musicgenres")}require(depends,function(controllerFactory){var tabContent;0==index&&(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),self.tabContent=tabContent);var controller=tabControllers[index];controller||(tabContent=view.querySelector(".pageTabContent[data-index='"+index+"']"),controller=index?new controllerFactory(view,params,tabContent):self,2==index?controller.mode="albumartists":3==index&&(controller.mode="artists"),tabControllers[index]=controller,controller.initTab&&controller.initTab()),callback(controller)})}function preLoadTab(page,index){getTabController(page,index,function(controller){renderedTabs.indexOf(index)==-1&&controller.preRender&&controller.preRender()})}function loadTab(page,index){currentTabIndex=index,getTabController(page,index,function(controller){renderedTabs.indexOf(index)==-1&&(renderedTabs.push(index),controller.renderTab())})}var self=this,currentTabIndex=parseInt(params.tab||"0");self.initTab=function(){for(var tabContent=view.querySelector(".pageTabContent[data-index='0']"),containers=tabContent.querySelectorAll(".itemsContainer"),i=0,length=containers.length;i ${OptionAllowDeleteLibraryContent} -