support track selection before playback

This commit is contained in:
Luke Pulverenti 2017-11-05 16:51:23 -05:00
parent 8742246096
commit 06a9394de5
19 changed files with 47 additions and 22 deletions

View File

@ -1 +1 @@
.emby-select{display:block;margin:0;margin-bottom:0!important;font-size:110%;font-family:inherit;font-weight:inherit;padding:.5em;-webkit-box-sizing:border-box;box-sizing:border-box;outline:0!important;-webkit-tap-highlight-color:transparent;width:100%}.emby-select::-moz-focus-inner{border:0}.emby-select+.fieldDescription{margin-top:.25em}.selectContainer{margin-bottom:1.8em;position:relative}.selectLabel{display:block;margin-bottom:.25em}.emby-select-withcolor{-webkit-appearance:none;-moz-appearance:none;appearance:none}.selectArrowContainer{position:absolute;right:.35em;top:.27em;color:inherit;pointer-events:none}.selectArrow{margin-top:.35em;font-size:1.7em}.emby-select-iconbutton{-webkit-align-self:flex-end;align-self:flex-end}
.emby-select{display:block;margin:0;margin-bottom:0!important;font-size:110%;font-family:inherit;font-weight:inherit;padding:.5em 1.9em .5em .5em;-webkit-box-sizing:border-box;box-sizing:border-box;outline:0!important;-webkit-tap-highlight-color:transparent;width:100%}.selectContainer-inline>.emby-select{padding:.1em 1.9em .1em .5em}.emby-select::-moz-focus-inner{border:0}.emby-select-focusscale{-webkit-transition:-webkit-transform 180ms ease-out!important;-o-transition:transform 180ms ease-out!important;transition:transform 180ms ease-out!important;-webkit-transform-origin:center center;transform-origin:center center}.emby-select-focusscale:focus{-webkit-transform:scale(1.16);transform:scale(1.16);z-index:1}.emby-select+.fieldDescription{margin-top:.25em}.selectContainer{margin-bottom:1.8em;position:relative}.selectContainer-inline{display:-webkit-inline-box;display:-webkit-inline-flex;display:inline-flex;margin-bottom:0;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.selectLabel{display:block;margin-bottom:.25em;margin-right:.75em}.selectContainer-inline>.selectLabel{margin-bottom:0}.emby-select-withcolor{-webkit-appearance:none;-moz-appearance:none;appearance:none}.selectArrowContainer{position:absolute;right:.3em;top:.27em;color:inherit;pointer-events:none}.selectContainer-inline>.selectArrowContainer{top:initial;bottom:0}.selectArrow{margin-top:.35em;font-size:1.7em}.emby-select-iconbutton{-webkit-align-self:flex-end;align-self:flex-end}

View File

@ -1 +1 @@
define(["layoutManager","browser","actionsheet","css!./emby-select","registerElement"],function(layoutManager,browser,actionsheet){"use strict";function enableNativeMenu(){return!(!browser.edgeUwp&&!browser.xboxOne)||!browser.tizen&&!browser.orsay&&(!!browser.tv||!layoutManager.tv)}function triggerChange(select){var evt=document.createEvent("HTMLEvents");evt.initEvent("change",!1,!0),select.dispatchEvent(evt)}function setValue(select,value){select.value=value}function showActionSheet(select){var labelElem=getLabel(select),title=labelElem?labelElem.textContent||labelElem.innerText:null;actionsheet.show({items:select.options,positionTo:select,title:title}).then(function(value){setValue(select,value),triggerChange(select)})}function getLabel(select){for(var elem=select.previousSibling;elem&&"LABEL"!==elem.tagName;)elem=elem.previousSibling;return elem}function onFocus(e){var label=getLabel(this);label&&(label.classList.add("selectLabelFocused"),label.classList.remove("selectLabelUnfocused"))}function onBlur(e){var label=getLabel(this);label&&(label.classList.add("selectLabelUnfocused"),label.classList.remove("selectLabelFocused"))}function onMouseDown(e){e.button||enableNativeMenu()||(e.preventDefault(),showActionSheet(this))}function onKeyDown(e){switch(e.keyCode){case 13:return void(enableNativeMenu()||(e.preventDefault(),showActionSheet(this)));case 37:case 38:case 39:case 40:return void(layoutManager.tv&&e.preventDefault())}}var EmbySelectPrototype=Object.create(HTMLSelectElement.prototype),inputId=0;EmbySelectPrototype.createdCallback=function(){this.id||(this.id="embyselect"+inputId,inputId++),browser.firefox||this.classList.add("emby-select-withcolor"),this.addEventListener("mousedown",onMouseDown),this.addEventListener("keydown",onKeyDown),this.addEventListener("focus",onFocus),this.addEventListener("blur",onBlur)},EmbySelectPrototype.attachedCallback=function(){if(!this.classList.contains("emby-select")){this.classList.add("emby-select");var label=this.ownerDocument.createElement("label");label.innerHTML=this.getAttribute("label")||"",label.classList.add("selectLabel"),label.classList.add("selectLabelUnfocused"),label.htmlFor=this.id,this.parentNode.insertBefore(label,this),this.classList.contains("emby-select-withcolor")&&this.parentNode.insertAdjacentHTML("beforeend",'<div class="selectArrowContainer"><div style="visibility:hidden;">0</div><i class="selectArrow md-icon">&#xE313;</i></div>')}},EmbySelectPrototype.setLabel=function(text){var label=this.parentNode.querySelector("label");label.innerHTML=text},document.registerElement("emby-select",{prototype:EmbySelectPrototype,extends:"select"})});
define(["layoutManager","browser","actionsheet","css!./emby-select","registerElement"],function(layoutManager,browser,actionsheet){"use strict";function enableNativeMenu(){return!(!browser.edgeUwp&&!browser.xboxOne)||!browser.tizen&&!browser.orsay&&(!!browser.tv||!layoutManager.tv)}function triggerChange(select){var evt=document.createEvent("HTMLEvents");evt.initEvent("change",!1,!0),select.dispatchEvent(evt)}function setValue(select,value){select.value=value}function showActionSheet(select){var labelElem=getLabel(select),title=labelElem?labelElem.textContent||labelElem.innerText:null;actionsheet.show({items:select.options,positionTo:select,title:title}).then(function(value){setValue(select,value),triggerChange(select)})}function getLabel(select){for(var elem=select.previousSibling;elem&&"LABEL"!==elem.tagName;)elem=elem.previousSibling;return elem}function onFocus(e){var label=getLabel(this);label&&(label.classList.add("selectLabelFocused"),label.classList.remove("selectLabelUnfocused"))}function onBlur(e){var label=getLabel(this);label&&(label.classList.add("selectLabelUnfocused"),label.classList.remove("selectLabelFocused"))}function onMouseDown(e){e.button||enableNativeMenu()||(e.preventDefault(),showActionSheet(this))}function onKeyDown(e){switch(e.keyCode){case 13:return void(enableNativeMenu()||(e.preventDefault(),showActionSheet(this)));case 37:case 38:case 39:case 40:return void(layoutManager.tv&&e.preventDefault())}}var EmbySelectPrototype=Object.create(HTMLSelectElement.prototype),inputId=0;EmbySelectPrototype.createdCallback=function(){this.id||(this.id="embyselect"+inputId,inputId++),browser.firefox||this.classList.add("emby-select-withcolor"),layoutManager.tv&&this.classList.add("emby-select-focusscale"),this.addEventListener("mousedown",onMouseDown),this.addEventListener("keydown",onKeyDown),this.addEventListener("focus",onFocus),this.addEventListener("blur",onBlur)},EmbySelectPrototype.attachedCallback=function(){if(!this.classList.contains("emby-select")){this.classList.add("emby-select");var label=this.ownerDocument.createElement("label");label.innerHTML=this.getAttribute("label")||"",label.classList.add("selectLabel"),label.classList.add("selectLabelUnfocused"),label.htmlFor=this.id,this.parentNode.insertBefore(label,this),this.classList.contains("emby-select-withcolor")&&this.parentNode.insertAdjacentHTML("beforeend",'<div class="selectArrowContainer"><div style="visibility:hidden;">0</div><i class="selectArrow md-icon">&#xE313;</i></div>')}},EmbySelectPrototype.setLabel=function(text){var label=this.parentNode.querySelector("label");label.innerHTML=text},document.registerElement("emby-select",{prototype:EmbySelectPrototype,extends:"select"})});

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
define(["dom","browser","events","emby-tabs","emby-button","emby-linkbutton"],function(dom,browser,events){"use strict";function enableTabsInFooter(){return!1}function ensureElements(enableInFooter){enableInFooter&&(footerTabsContainer||(footerTabsContainer=document.createElement("div"),footerTabsContainer.classList.add("footerTabs"),footerTabsContainer.classList.add("sectionTabs"),footerTabsContainer.classList.add("hide"))),headerTabsContainer||(headerTabsContainer=queryScope.querySelector(".headerTabs"))}function allowSwipe(target){function allowSwipeOn(elem){return!dom.parentWithTag(elem,"input")&&(!elem.classList||!elem.classList.contains("hiddenScrollX")&&!elem.classList.contains("smoothScrollX")&&!elem.classList.contains("animatedScrollX"))}for(var parent=target;null!=parent;){if(!allowSwipeOn(parent))return!1;parent=parent.parentNode}return!0}function configureSwipeTabs(view,tabsElem,getTabContainersFn){if(browser.touch){var onSwipeLeft=(getTabContainersFn().length,function(e,target){allowSwipe(target)&&view.contains(target)&&tabsElem.selectNext()}),onSwipeRight=function(e,target){allowSwipe(target)&&view.contains(target)&&tabsElem.selectPrevious()};require(["touchHelper"],function(TouchHelper){var touchHelper=new TouchHelper(view.parentNode.parentNode);events.on(touchHelper,"swipeleft",onSwipeLeft),events.on(touchHelper,"swiperight",onSwipeRight),view.addEventListener("viewdestroy",function(){touchHelper.destroy()})})}}function setTabs(view,selectedIndex,getTabsFn,getTabContainersFn,onBeforeTabChange,onTabChange){var enableInFooter=enableTabsInFooter();if(!view)return tabOwnerView&&(headerTabsContainer||(headerTabsContainer=queryScope.querySelector(".headerTabs")),ensureElements(enableInFooter),document.body.classList.remove("withSectionTabs"),headerTabsContainer.innerHTML="",headerTabsContainer.classList.add("hide"),footerTabsContainer&&(footerTabsContainer.innerHTML="",footerTabsContainer.classList.add("hide")),tabOwnerView=null),{tabsContainer:headerTabsContainer,replaced:!1};ensureElements(enableInFooter);var tabsContainerElem=enableInFooter?footerTabsContainer:headerTabsContainer;if(tabOwnerView||tabsContainerElem.classList.remove("hide"),tabOwnerView!==view){var index=0,indexAttribute=null==selectedIndex?"":' data-index="'+selectedIndex+'"',tabsHtml='<div is="emby-tabs"'+indexAttribute+' class="tabs-viewmenubar"><div class="emby-tabs-slider" style="white-space:nowrap;">'+getTabsFn().map(function(t){var tabClass="emby-tab-button";t.enabled===!1&&(tabClass+=" hide");var tabHtml;return t.cssClass&&(tabClass+=" "+t.cssClass),tabHtml=t.href?'<a href="'+t.href+'" is="emby-linkbutton" class="'+tabClass+'" data-index="'+index+'"><div class="emby-button-foreground">'+t.name+"</div></a>":'<button type="button" is="emby-button" class="'+tabClass+'" data-index="'+index+'"><div class="emby-button-foreground">'+t.name+"</div></button>",index++,tabHtml}).join("")+"</div></div>";return tabsContainerElem.innerHTML=tabsHtml,document.body.classList.add("withSectionTabs"),tabOwnerView=view,tabsElem=tabsContainerElem.querySelector('[is="emby-tabs"]'),configureSwipeTabs(view,tabsElem,getTabContainersFn),tabsElem.addEventListener("beforetabchange",function(e){var tabContainers=getTabContainersFn();if(null!=e.detail.previousIndex){var previousPanel=tabContainers[e.detail.previousIndex];previousPanel&&previousPanel.classList.remove("is-active")}var newPanel=tabContainers[e.detail.selectedTabIndex];newPanel&&newPanel.classList.add("is-active")}),onBeforeTabChange&&tabsElem.addEventListener("beforetabchange",onBeforeTabChange),onTabChange&&tabsElem.addEventListener("tabchange",onTabChange),!tabsElem.triggerBeforeTabChange,{tabsContainer:tabsContainerElem,tabs:tabsContainerElem.querySelector('[is="emby-tabs"]'),replaced:!0}}return tabsElem||(tabsElem=tabsContainerElem.querySelector('[is="emby-tabs"]')),tabsElem.selectedIndex(selectedIndex),tabOwnerView=view,{tabsContainer:tabsContainerElem,tabs:tabsElem,replaced:!1}}function selectedTabIndex(index){var tabsContainerElem=headerTabsContainer;tabsElem||(tabsElem=tabsContainerElem.querySelector('[is="emby-tabs"]')),null!=index?tabsElem.selectedIndex(index):tabsElem.triggerTabChange()}function getTabsElement(){return document.querySelector(".tabs-viewmenubar")}var tabOwnerView,footerTabsContainer,headerTabsContainer,tabsElem,queryScope=document.querySelector(".skinHeader");return{setTabs:setTabs,getTabsElement:getTabsElement,selectedTabIndex:selectedTabIndex}});
define(["dom","browser","events","emby-tabs","emby-button","emby-linkbutton"],function(dom,browser,events){"use strict";function enableTabsInFooter(){return!1}function ensureElements(enableInFooter){enableInFooter&&(footerTabsContainer||(footerTabsContainer=document.createElement("div"),footerTabsContainer.classList.add("footerTabs"),footerTabsContainer.classList.add("sectionTabs"),footerTabsContainer.classList.add("hide"))),headerTabsContainer||(headerTabsContainer=queryScope.querySelector(".headerTabs"))}function onViewTabsReady(){this.selectedIndex(this.readySelectedIndex),this.readySelectedIndex=null}function allowSwipe(target){function allowSwipeOn(elem){return!dom.parentWithTag(elem,"input")&&(!elem.classList||!elem.classList.contains("hiddenScrollX")&&!elem.classList.contains("smoothScrollX")&&!elem.classList.contains("animatedScrollX"))}for(var parent=target;null!=parent;){if(!allowSwipeOn(parent))return!1;parent=parent.parentNode}return!0}function configureSwipeTabs(view,tabsElem,getTabContainersFn){if(browser.touch){var onSwipeLeft=(getTabContainersFn().length,function(e,target){allowSwipe(target)&&view.contains(target)&&tabsElem.selectNext()}),onSwipeRight=function(e,target){allowSwipe(target)&&view.contains(target)&&tabsElem.selectPrevious()};require(["touchHelper"],function(TouchHelper){var touchHelper=new TouchHelper(view.parentNode.parentNode);events.on(touchHelper,"swipeleft",onSwipeLeft),events.on(touchHelper,"swiperight",onSwipeRight),view.addEventListener("viewdestroy",function(){touchHelper.destroy()})})}}function setTabs(view,selectedIndex,getTabsFn,getTabContainersFn,onBeforeTabChange,onTabChange){var enableInFooter=enableTabsInFooter();if(!view)return tabOwnerView&&(headerTabsContainer||(headerTabsContainer=queryScope.querySelector(".headerTabs")),ensureElements(enableInFooter),document.body.classList.remove("withSectionTabs"),headerTabsContainer.innerHTML="",headerTabsContainer.classList.add("hide"),footerTabsContainer&&(footerTabsContainer.innerHTML="",footerTabsContainer.classList.add("hide")),tabOwnerView=null),{tabsContainer:headerTabsContainer,replaced:!1};ensureElements(enableInFooter);var tabsContainerElem=enableInFooter?footerTabsContainer:headerTabsContainer;if(tabOwnerView||tabsContainerElem.classList.remove("hide"),tabOwnerView!==view){var index=0,indexAttribute=null==selectedIndex?"":' data-index="'+selectedIndex+'"',tabsHtml='<div is="emby-tabs"'+indexAttribute+' class="tabs-viewmenubar"><div class="emby-tabs-slider" style="white-space:nowrap;">'+getTabsFn().map(function(t){var tabClass="emby-tab-button";t.enabled===!1&&(tabClass+=" hide");var tabHtml;return t.cssClass&&(tabClass+=" "+t.cssClass),tabHtml=t.href?'<a href="'+t.href+'" is="emby-linkbutton" class="'+tabClass+'" data-index="'+index+'"><div class="emby-button-foreground">'+t.name+"</div></a>":'<button type="button" is="emby-button" class="'+tabClass+'" data-index="'+index+'"><div class="emby-button-foreground">'+t.name+"</div></button>",index++,tabHtml}).join("")+"</div></div>";return tabsContainerElem.innerHTML=tabsHtml,document.body.classList.add("withSectionTabs"),tabOwnerView=view,tabsElem=tabsContainerElem.querySelector('[is="emby-tabs"]'),configureSwipeTabs(view,tabsElem,getTabContainersFn),tabsElem.addEventListener("beforetabchange",function(e){var tabContainers=getTabContainersFn();if(null!=e.detail.previousIndex){var previousPanel=tabContainers[e.detail.previousIndex];previousPanel&&previousPanel.classList.remove("is-active")}var newPanel=tabContainers[e.detail.selectedTabIndex];newPanel&&newPanel.classList.add("is-active")}),onBeforeTabChange&&tabsElem.addEventListener("beforetabchange",onBeforeTabChange),onTabChange&&tabsElem.addEventListener("tabchange",onTabChange),tabsElem.selectedIndex?tabsElem.selectedIndex(selectedIndex):(tabsElem.readySelectedIndex=selectedIndex,tabsElem.addEventListener("ready",onViewTabsReady)),{tabsContainer:tabsContainerElem,tabs:tabsContainerElem.querySelector('[is="emby-tabs"]'),replaced:!0}}return tabsElem||(tabsElem=tabsContainerElem.querySelector('[is="emby-tabs"]')),tabsElem.selectedIndex(selectedIndex),tabOwnerView=view,{tabsContainer:tabsContainerElem,tabs:tabsElem,replaced:!1}}function selectedTabIndex(index){var tabsContainerElem=headerTabsContainer;tabsElem||(tabsElem=tabsContainerElem.querySelector('[is="emby-tabs"]')),null!=index?tabsElem.selectedIndex(index):tabsElem.triggerTabChange()}function getTabsElement(){return document.querySelector(".tabs-viewmenubar")}var tabOwnerView,footerTabsContainer,headerTabsContainer,tabsElem,queryScope=document.querySelector(".skinHeader");return{setTabs:setTabs,getTabsElement:getTabsElement,selectedTabIndex:selectedTabIndex}});

File diff suppressed because one or more lines are too long

View File

@ -609,5 +609,8 @@
"GenreValue": "Genre: {0}",
"GenresValue": "Genres: {0}",
"LinksValue": "Links: {0}",
"TagsValue": "Tags: {0}"
"TagsValue": "Tags: {0}",
"LabelAudio": "Audio:",
"LabelSubtitles": "Subtitles:",
"Off": "Off"
}

View File

@ -1 +1 @@
define(["playbackManager","userSettings","connectionManager"],function(playbackManager,userSettings,connectionManager){"use strict";function playThemeMedia(items,ownerId){var currentThemeItems=items.filter(function(i){return enabled(i.MediaType)});if(currentThemeItems.length){if(!currentOwnerId&&playbackManager.isPlaying())return;currentThemeIds=currentThemeItems.map(function(i){return i.Id}),playbackManager.play({items:currentThemeItems,fullscreen:!1,enableRemotePlayers:!1}).then(function(){currentOwnerId=ownerId})}else currentOwnerId&&playbackManager.stop(),currentOwnerId=null}function enabled(mediaType){return"Video"===mediaType?userSettings.enableThemeVideos():userSettings.enableThemeSongs()}function loadThemeMedia(item){var apiClient=connectionManager.getApiClient(item.ServerId);apiClient.getThemeMedia(apiClient.getCurrentUserId(),item.Id,!0).then(function(themeMediaResult){var ownerId=themeMediaResult.ThemeVideosResult.Items.length?themeMediaResult.ThemeVideosResult.OwnerId:themeMediaResult.ThemeSongsResult.OwnerId;if(ownerId!==currentOwnerId){var items=themeMediaResult.ThemeVideosResult.Items.length?themeMediaResult.ThemeVideosResult.Items:themeMediaResult.ThemeSongsResult.Items;playThemeMedia(items,ownerId)}})}var currentOwnerId,currentThemeIds=[];document.addEventListener("viewshow",function(e){var state=e.detail.state||{},item=state.item;if(item&&item.ServerId)return void loadThemeMedia(item);var viewOptions=e.detail.options||{};viewOptions.supportsThemeMedia||playThemeMedia([],null)},!0)});
define(["playbackManager","userSettings","connectionManager"],function(playbackManager,userSettings,connectionManager){"use strict";function playThemeMedia(items,ownerId){var currentThemeItems=items.filter(function(i){return enabled(i.MediaType)});if(currentThemeItems.length){if(!currentOwnerId&&playbackManager.isPlaying())return;currentThemeIds=currentThemeItems.map(function(i){return i.Id}),playbackManager.play({items:currentThemeItems,fullscreen:!1,enableRemotePlayers:!1}).then(function(){currentOwnerId=ownerId})}else currentOwnerId&&playbackManager.stop(),currentOwnerId=null}function enabled(mediaType){return"Video"===mediaType?userSettings.enableThemeVideos():userSettings.enableThemeSongs()}function loadThemeMedia(item){if(!item.CollectionType&&excludeTypes.indexOf(item.Type)===-1){var apiClient=connectionManager.getApiClient(item.ServerId);apiClient.getThemeMedia(apiClient.getCurrentUserId(),item.Id,!0).then(function(themeMediaResult){var ownerId=themeMediaResult.ThemeVideosResult.Items.length?themeMediaResult.ThemeVideosResult.OwnerId:themeMediaResult.ThemeSongsResult.OwnerId;if(ownerId!==currentOwnerId){var items=themeMediaResult.ThemeVideosResult.Items.length?themeMediaResult.ThemeVideosResult.Items:themeMediaResult.ThemeSongsResult.Items;playThemeMedia(items,ownerId)}})}}var currentOwnerId,currentThemeIds=[],excludeTypes=["CollectionFolder","UserView","Program","SeriesTimer","Person","TvChannel","Channel"];document.addEventListener("viewshow",function(e){var state=e.detail.state||{},item=state.item;if(item&&item.ServerId)return void loadThemeMedia(item);var viewOptions=e.detail.options||{};viewOptions.supportsThemeMedia||playThemeMedia([],null)},!0)});

File diff suppressed because one or more lines are too long

View File

@ -46,6 +46,21 @@
</div>
<div class="trackSelections flex align-items-center flex-wrap hide" style="margin: 1.5em 0;font-size:92%;">
<div class="selectContainer selectContainer-inline selectSourceContainer hide trackSelectionFieldContainer" style="margin-right:2em;">
<select is="emby-select" class="selectSource" label="">
</select>
</div>
<div class="selectContainer selectContainer-inline selectAudioContainer hide trackSelectionFieldContainer" style="margin-right:2em;">
<select is="emby-select" class="selectAudio" label="">
</select>
</div>
<div class="selectContainer selectContainer-inline selectSubtitlesContainer hide trackSelectionFieldContainer">
<select is="emby-select" class="selectSubtitles" label="">
</select>
</div>
</div>
<div class="mainDetailButtons">
<button is="emby-button" type="button" class="button-flat btnResume btnPlaySimple hide detailButton-mobile" data-mode="resume">
@ -142,8 +157,6 @@
<p class="itemGenres"></p>
<h3 class="tagline"></h3>
<p class="overview"></p>
<div class="mediaInfoIcons hide">
</div>
<p id="itemBirthday"></p>
<p id="itemBirthLocation"></p>
<p id="itemDeathDate"></p>

View File

@ -52,6 +52,13 @@
</label>
<div class="fieldDescription checkboxFieldDescription">${LabelSkipIfGraphicalSubsPresentHelp}</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="chkSaveLocal" />
<span>${SaveSubtitlesInOriginalMediaFolders}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${SaveSubtitlesInOriginalMediaFoldersHelp}</div>
</div>
<br />
<div class="inputContainer">
<input is="emby-input" type="text" id="txtOpenSubtitleUsername" autocomplete="off" label="${LabelOpenSubtitlesUsername}" />

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
define(["cardBuilder","apphost","imageLoader","libraryMenu","libraryBrowser","loading","emby-itemscontainer"],function(cardBuilder,appHost,imageLoader,libraryMenu,libraryBrowser,loading){"use strict";return function(view,params){function getSavedQueryKey(){return libraryBrowser.getSavedQueryKey()}function reloadItems(page){loading.show();var promise="Recordings"==params.type?ApiClient.getLiveTvRecordings(query):"RecordingSeries"==params.type?ApiClient.getLiveTvRecordingSeries(query):"true"==params.IsAiring?ApiClient.getLiveTvRecommendedPrograms(query):ApiClient.getLiveTvPrograms(query);promise.then(function(result){function onNextPageClick(){query.StartIndex+=query.Limit,reloadItems(page)}function onPreviousPageClick(){query.StartIndex-=query.Limit,reloadItems(page)}window.scrollTo(0,0);var html="",pagingHtml=libraryBrowser.getQueryPagingHtml({startIndex:query.StartIndex,limit:query.Limit,totalRecordCount:result.TotalRecordCount,showLimit:!1});page.querySelector(".listTopPaging").innerHTML=pagingHtml,page.querySelector(".bottomPaging").innerHTML=pagingHtml,html=cardBuilder.getCardsHtml({items:result.Items,shape:query.IsMovie||"RecordingSeries"==params.type?"portrait":"auto",preferThumb:!query.IsMovie&&"RecordingSeries"!=params.type&&"auto",defaultShape:query.IsMovie||"RecordingSeries"==params.type?"portrait":"backdrop",inheritThumb:"Recordings"==params.type,context:"livetv",centerText:!0,overlayText:!1,showTitle:!0,showParentTitle:!query.IsMovie,showAirTime:"Recordings"!=params.type&&"RecordingSeries"!=params.type,showAirDateTime:"Recordings"!=params.type&&"RecordingSeries"!=params.type,overlayMoreButton:!0,showYear:query.IsMovie&&"Recordings"==params.type,showSeriesYear:"RecordingSeries"===params.type,coverImage:!0});var elem=page.querySelector(".itemsContainer");elem.innerHTML=html,imageLoader.lazyChildren(elem);var i,length,elems;for(elems=page.querySelectorAll(".btnNextPage"),i=0,length=elems.length;i<length;i++)elems[i].addEventListener("click",onNextPageClick);for(elems=page.querySelectorAll(".btnPreviousPage"),i=0,length=elems.length;i<length;i++)elems[i].addEventListener("click",onPreviousPageClick);libraryBrowser.saveQueryValues(getSavedQueryKey(),query),loading.hide()})}var query={UserId:Dashboard.getCurrentUserId(),StartIndex:0,Fields:"ChannelInfo,PrimaryImageAspectRatio",Limit:libraryBrowser.getDefaultPageSize()};"Recordings"==params.type?params.groupid&&(query.GroupId=params.groupid):"RecordingSeries"==params.type?(query.SortOrder="SortName",query.SortOrder="Ascending"):(query.HasAired=!1,query.SortBy="StartDate,SortName",query.SortOrder="Ascending"),view.addEventListener("viewbeforeshow",function(e){query.ParentId=libraryMenu.getTopParentId();var page=this;if("true"==params.IsMovie?query.IsMovie=!0:"false"==params.IsMovie&&(query.IsMovie=!1),"true"==params.IsSeries?query.IsSeries=!0:"false"==params.IsSeries&&(query.IsSeries=!1),"true"==params.IsNews?query.IsNews=!0:"false"==params.IsNews&&(query.IsNews=!1),"true"==params.IsSports?query.IsSports=!0:"false"==params.IsSports&&(query.IsSports=!1),"true"==params.IsKids?query.IsKids=!0:"false"==params.IsKids&&(query.IsKids=!1),"true"==params.IsAiring?query.IsAiring=!0:"false"==params.IsAiring&&(query.IsAiring=!1),"Recordings"==params.type?"true"==params.IsMovie?libraryMenu.setTitle(Globalize.translate("TabMovies")):"true"==params.IsSports?libraryMenu.setTitle(Globalize.translate("Sports")):"true"==params.IsKids?libraryMenu.setTitle(Globalize.translate("HeaderForKids")):libraryMenu.setTitle(Globalize.translate("TabRecordings")):"RecordingSeries"==params.type?libraryMenu.setTitle(Globalize.translate("TabShows")):"true"==params.IsMovie?libraryMenu.setTitle(Globalize.translate("TabMovies")):"true"==params.IsSports?libraryMenu.setTitle(Globalize.translate("Sports")):"true"==params.IsKids?libraryMenu.setTitle(Globalize.translate("HeaderForKids")):"true"==params.IsAiring?libraryMenu.setTitle(Globalize.translate("HeaderOnNow")):"true"==params.IsNews?libraryMenu.setTitle(Globalize.translate("News")):"true"==params.IsSeries?libraryMenu.setTitle(Globalize.translate("TabShows")):libraryMenu.setTitle(Globalize.translate("Programs")),!e.detail.isRestored){var viewkey=getSavedQueryKey();libraryBrowser.loadSavedQueryValues(viewkey,query),reloadItems(page)}})}});
define(["cardBuilder","apphost","imageLoader","libraryMenu","libraryBrowser","loading","emby-itemscontainer"],function(cardBuilder,appHost,imageLoader,libraryMenu,libraryBrowser,loading){"use strict";return function(view,params){function getSavedQueryKey(){return libraryBrowser.getSavedQueryKey()}function reloadItems(page){loading.show();var promise="Recordings"==params.type?ApiClient.getLiveTvRecordings(query):"RecordingSeries"==params.type?ApiClient.getLiveTvRecordingSeries(query):"true"==params.IsAiring?ApiClient.getLiveTvRecommendedPrograms(query):ApiClient.getLiveTvPrograms(query);promise.then(function(result){function onNextPageClick(){query.StartIndex+=query.Limit,reloadItems(page)}function onPreviousPageClick(){query.StartIndex-=query.Limit,reloadItems(page)}window.scrollTo(0,0);var html="",pagingHtml=libraryBrowser.getQueryPagingHtml({startIndex:query.StartIndex,limit:query.Limit,totalRecordCount:result.TotalRecordCount,showLimit:!1});page.querySelector(".listTopPaging").innerHTML=pagingHtml,page.querySelector(".bottomPaging").innerHTML=pagingHtml,html=cardBuilder.getCardsHtml({items:result.Items,shape:query.IsMovie||"RecordingSeries"==params.type?"portrait":"auto",preferThumb:!query.IsMovie&&"RecordingSeries"!=params.type&&"auto",defaultShape:query.IsMovie||"RecordingSeries"==params.type?"portrait":"backdrop",inheritThumb:"Recordings"==params.type,context:"livetv",centerText:!0,overlayText:!1,showTitle:!0,showParentTitle:!query.IsMovie,showAirTime:"Recordings"!=params.type&&"RecordingSeries"!=params.type,showAirDateTime:"Recordings"!=params.type&&"RecordingSeries"!=params.type,overlayMoreButton:!0,showYear:query.IsMovie&&"Recordings"==params.type,showSeriesYear:"RecordingSeries"===params.type,coverImage:!0});var elem=page.querySelector(".itemsContainer");elem.innerHTML=html,imageLoader.lazyChildren(elem);var i,length,elems;for(elems=page.querySelectorAll(".btnNextPage"),i=0,length=elems.length;i<length;i++)elems[i].addEventListener("click",onNextPageClick);for(elems=page.querySelectorAll(".btnPreviousPage"),i=0,length=elems.length;i<length;i++)elems[i].addEventListener("click",onPreviousPageClick);libraryBrowser.saveQueryValues(getSavedQueryKey(),query),loading.hide()})}var query={UserId:Dashboard.getCurrentUserId(),StartIndex:0,Fields:"ChannelInfo,PrimaryImageAspectRatio",Limit:libraryBrowser.getDefaultPageSize()};"Recordings"==params.type?params.groupid&&(query.GroupId=params.groupid):"RecordingSeries"==params.type?(query.SortOrder="SortName",query.SortOrder="Ascending"):(query.HasAired=!1,query.SortBy="StartDate,SortName",query.SortOrder="Ascending"),view.addEventListener("viewshow",function(e){query.ParentId=libraryMenu.getTopParentId();var page=this;if("true"==params.IsMovie?query.IsMovie=!0:"false"==params.IsMovie&&(query.IsMovie=!1),"true"==params.IsSeries?query.IsSeries=!0:"false"==params.IsSeries&&(query.IsSeries=!1),"true"==params.IsNews?query.IsNews=!0:"false"==params.IsNews&&(query.IsNews=!1),"true"==params.IsSports?query.IsSports=!0:"false"==params.IsSports&&(query.IsSports=!1),"true"==params.IsKids?query.IsKids=!0:"false"==params.IsKids&&(query.IsKids=!1),"true"==params.IsAiring?query.IsAiring=!0:"false"==params.IsAiring&&(query.IsAiring=!1),"Recordings"==params.type?"true"==params.IsMovie?libraryMenu.setTitle(Globalize.translate("TabMovies")):"true"==params.IsSports?libraryMenu.setTitle(Globalize.translate("Sports")):"true"==params.IsKids?libraryMenu.setTitle(Globalize.translate("HeaderForKids")):libraryMenu.setTitle(Globalize.translate("TabRecordings")):"RecordingSeries"==params.type?libraryMenu.setTitle(Globalize.translate("TabShows")):"true"==params.IsMovie?libraryMenu.setTitle(Globalize.translate("TabMovies")):"true"==params.IsSports?libraryMenu.setTitle(Globalize.translate("Sports")):"true"==params.IsKids?libraryMenu.setTitle(Globalize.translate("HeaderForKids")):"true"==params.IsAiring?libraryMenu.setTitle(Globalize.translate("HeaderOnNow")):"true"==params.IsNews?libraryMenu.setTitle(Globalize.translate("News")):"true"==params.IsSeries?libraryMenu.setTitle(Globalize.translate("TabShows")):libraryMenu.setTitle(Globalize.translate("Programs")),!e.detail.isRestored){var viewkey=getSavedQueryKey();libraryBrowser.loadSavedQueryValues(viewkey,query),reloadItems(page)}})}});

View File

@ -1 +1 @@
define(["jQuery","loading","fnchecked","emby-linkbutton"],function($,loading){"use strict";function loadPage(page,config,languages){$("#chkSubtitlesMovies",page).checked(config.DownloadMovieSubtitles),$("#chkSubtitlesEpisodes",page).checked(config.DownloadEpisodeSubtitles),$("#chkSkipIfGraphicalSubsPresent",page).checked(config.SkipIfEmbeddedSubtitlesPresent),$("#chkSkipIfAudioTrackPresent",page).checked(config.SkipIfAudioTrackMatches),$("#chkRequirePerfectMatch",page).checked(config.RequirePerfectMatch),$("#txtOpenSubtitleUsername",page).val(config.OpenSubtitlesUsername),$("#txtOpenSubtitlePassword",page).val(config.OpenSubtitlesPasswordHash||""),populateLanguages(page,config,languages),loading.hide()}function populateLanguages(page,config,languages){for(var html="",i=0,length=languages.length;i<length;i++){var culture=languages[i];html+='<label><input type="checkbox" is="emby-checkbox" class="chkLang" data-lang="'+culture.ThreeLetterISOLanguageName.toLowerCase()+'" /><span>'+culture.DisplayName+"</span></label>"}$(".downloadLanguages",page).html(html);var langs=config.DownloadLanguages||[];$(".chkLang",page).each(function(){this.checked=langs.indexOf(this.getAttribute("data-lang"))!=-1})}function onSubmit(){loading.show();var form=this;return ApiClient.getNamedConfiguration("subtitles").then(function(config){config.DownloadMovieSubtitles=$("#chkSubtitlesMovies",form).checked(),config.DownloadEpisodeSubtitles=$("#chkSubtitlesEpisodes",form).checked(),config.SkipIfEmbeddedSubtitlesPresent=$("#chkSkipIfGraphicalSubsPresent",form).checked(),config.SkipIfAudioTrackMatches=$("#chkSkipIfAudioTrackPresent",form).checked(),config.RequirePerfectMatch=$("#chkRequirePerfectMatch",form).checked(),config.OpenSubtitlesUsername=$("#txtOpenSubtitleUsername",form).val();var newPassword=$("#txtOpenSubtitlePassword",form).val();newPassword&&(config.OpenSubtitlesPasswordHash=newPassword),config.DownloadLanguages=$(".chkLang",form).get().filter(function(c){return c.checked}).map(function(c){return c.getAttribute("data-lang")}),ApiClient.updateNamedConfiguration("subtitles",config).then(Dashboard.processServerConfigurationUpdateResult)}),!1}$(document).on("pageinit","#metadataSubtitlesPage",function(){$(".metadataSubtitlesForm").off("submit",onSubmit).on("submit",onSubmit)}).on("pageshow","#metadataSubtitlesPage",function(){loading.show();var page=this,promise1=ApiClient.getNamedConfiguration("subtitles"),promise2=ApiClient.getCultures();Promise.all([promise1,promise2]).then(function(responses){loadPage(page,responses[0],responses[1])})})});
define(["jQuery","loading","fnchecked","emby-linkbutton"],function($,loading){"use strict";function loadPage(page,config,languages){$("#chkSubtitlesMovies",page).checked(config.DownloadMovieSubtitles),$("#chkSubtitlesEpisodes",page).checked(config.DownloadEpisodeSubtitles),$("#chkSkipIfGraphicalSubsPresent",page).checked(config.SkipIfEmbeddedSubtitlesPresent),$("#chkSkipIfAudioTrackPresent",page).checked(config.SkipIfAudioTrackMatches),$("#chkRequirePerfectMatch",page).checked(config.RequirePerfectMatch),$("#txtOpenSubtitleUsername",page).val(config.OpenSubtitlesUsername),$("#txtOpenSubtitlePassword",page).val(config.OpenSubtitlesPasswordHash||""),$("#chkSaveLocal",page).checked(config.SaveSubtitlesInMediaFolders||!1),populateLanguages(page,config,languages),loading.hide()}function populateLanguages(page,config,languages){for(var html="",i=0,length=languages.length;i<length;i++){var culture=languages[i];html+='<label><input type="checkbox" is="emby-checkbox" class="chkLang" data-lang="'+culture.ThreeLetterISOLanguageName.toLowerCase()+'" /><span>'+culture.DisplayName+"</span></label>"}$(".downloadLanguages",page).html(html);var langs=config.DownloadLanguages||[];$(".chkLang",page).each(function(){this.checked=langs.indexOf(this.getAttribute("data-lang"))!=-1})}function onSubmit(){loading.show();var form=this;return ApiClient.getNamedConfiguration("subtitles").then(function(config){config.DownloadMovieSubtitles=$("#chkSubtitlesMovies",form).checked(),config.DownloadEpisodeSubtitles=$("#chkSubtitlesEpisodes",form).checked(),config.SkipIfEmbeddedSubtitlesPresent=$("#chkSkipIfGraphicalSubsPresent",form).checked(),config.SkipIfAudioTrackMatches=$("#chkSkipIfAudioTrackPresent",form).checked(),config.RequirePerfectMatch=$("#chkRequirePerfectMatch",form).checked(),config.OpenSubtitlesUsername=$("#txtOpenSubtitleUsername",form).val(),config.SaveSubtitlesInMediaFolders=$("#chkSaveLocal",form).checked();var newPassword=$("#txtOpenSubtitlePassword",form).val();newPassword&&(config.OpenSubtitlesPasswordHash=newPassword),config.DownloadLanguages=$(".chkLang",form).get().filter(function(c){return c.checked}).map(function(c){return c.getAttribute("data-lang")}),ApiClient.updateNamedConfiguration("subtitles",config).then(Dashboard.processServerConfigurationUpdateResult)}),!1}$(document).on("pageinit","#metadataSubtitlesPage",function(){$(".metadataSubtitlesForm").off("submit",onSubmit).on("submit",onSubmit)}).on("pageshow","#metadataSubtitlesPage",function(){loading.show();var page=this,promise1=ApiClient.getNamedConfiguration("subtitles"),promise2=ApiClient.getCultures();Promise.all([promise1,promise2]).then(function(responses){loadPage(page,responses[0],responses[1])})})});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1851,5 +1851,7 @@
"ButtonStopRecording": "Stop Recording",
"StopRecording": "Stop recording",
"CancelSeries": "Cancel series",
"EnableDebugLoggingHelp": "Debug logging should only be enabled as needed for troubleshooting purposes. The increased file system access may prevent the server machine from being able to sleep in some environments."
"EnableDebugLoggingHelp": "Debug logging should only be enabled as needed for troubleshooting purposes. The increased file system access may prevent the server machine from being able to sleep in some environments.",
"SaveSubtitlesInOriginalMediaFolders": "Save subtitles into media folders",
"SaveSubtitlesInOriginalMediaFoldersHelp": "Saving subtitles into media folders will make them easier to locate and manage."
}