This commit is contained in:
root
2023-08-31 15:30:17 +02:00
commit dea16b40a8
833 changed files with 142024 additions and 0 deletions

1
home_horiz/folderstab.js Normal file
View File

@@ -0,0 +1 @@
define(["exports","./../modules/tabbedview/folderstab.js"],function(_exports,_folderstab){function FoldersTab(view,params,options){_folderstab.default.apply(this,arguments)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Object.assign(FoldersTab.prototype,_folderstab.default.prototype),FoldersTab.prototype.supportsAlphaPicker=function(){return!1},FoldersTab.prototype.onItemFocused=function(item){_folderstab.default.prototype.onItemFocused.apply(this,arguments),this.onItemFocusedExternal(item)},FoldersTab.prototype.onFocusOut=function(item){_folderstab.default.prototype.onFocusOut.apply(this,arguments),this.onFocusOutExternal(item)},FoldersTab.prototype.hasSelectedItemDisplay=function(){return!0},_exports.default=FoldersTab});

1
home_horiz/home.css Normal file
View File

@@ -0,0 +1 @@
.home-horiz .itemsViewSettingsContainer,.home-horiz .alphaPicker{display:none!important}.selectedItemInfo{display:-webkit-flex;display:flex;-webkit-flex-shrink:0;flex-shrink:0;position:relative;height:12vh;margin-bottom:.5em}.withheadernowplaying .selectedItemInfo{height:8vh}.selectedItemInfoInner{position:absolute;left:3.7vw;right:2%;inset-inline-start:3.7vw;inset-inline-end:2%;max-width:70%;font-size:88%;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.selectedItemInfo h2{margin:0}.selectedItemMediaInfo{position:relative}.selectedItemInfoLogo{min-width:3em;max-width:16%;max-height:3em;background-repeat:no-repeat;background-position:right center;background-size:contain;-webkit-margin-end:1em;margin-inline-end:1em;-webkit-flex-shrink:0;flex-shrink:0;object-position:center center}.selectedItemInfoDetails{-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-grow:1;flex-grow:1}.selectedItemInfoDetails>div{white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}.horizontalSectionsContainer{display:-webkit-flex;display:flex;white-space:nowrap}.cardColumn{display:inline-block;vertical-align:top;-webkit-flex-shrink:0;flex-shrink:0}.horizontalSection{-webkit-margin-end:1.5em;margin-inline-end:1.5em;-webkit-flex-shrink:0;flex-shrink:0}.horizontalSection .sectionTitle{-webkit-padding-start:.3em;padding-inline-start:.3em;margin-bottom:.25em;margin-top:0}.home-horiz .card:focus{position:relative}.home-horiz .squareCard{width:8.196em}.home-horiz .backdropCard{width:13.95em}.categoryItemsContainer .backdropCard{width:33.3333334%}.home-horiz .portraitCard{width:8.4625em}.home-horiz .fourThreeCard{width:10.662em}.wideSpotlightCard .innerCardFooter{z-index:1}.wideSpotlightCard{width:31.85em!important}.wideSpotlightCard .cardImageContainer.coveredImage{background-size:cover!important;object-fit:cover!important}.wideSpotlightCard:focus>.cardBox-focustransform{-webkit-transform:scale(1.04,1.04)!important;transform:scale(1.04,1.04)!important}.home-horiz .cardBox{margin:.4em!important}

6
home_horiz/home.html Normal file
View File

@@ -0,0 +1,6 @@
<div class="view flex flex-direction-column withTabs home-horiz">
<div class="selectedItemInfo">
<div class="selectedItemInfoInner"></div>
</div>
</div>

1
home_horiz/home.js Normal file
View File

@@ -0,0 +1 @@
define(["exports","./../modules/tabbedview/tabbedview.js","./../modules/emby-elements/emby-scroller/emby-scroller.js","./../modules/emby-elements/emby-button/emby-button.js","./../modules/emby-apiclient/connectionmanager.js","./../modules/mediainfo/mediainfo.js","./../modules/dom.js","./../modules/common/itemmanager/itemmanager.js","./../modules/skinmanager.js"],function(_exports,_tabbedview,_embyScroller,_embyButton,_connectionmanager,_mediainfo,_dom,_itemmanager,_skinmanager){function HomeView(view,params){_tabbedview.default.call(this,view,params),this.selectedItemInfoElement=view.querySelector(".selectedItemInfoInner"),this.enableBackMenu=!0}function clearSelectedItemInfo(instance){instance.selectedItemInfoElement.innerHTML="",instance.selectedItemInfoElementHasContent=!1}function setSelectedInfo(instance,card,item){var html,logoImageUrl,selectedItemInfoElement=instance.selectedItemInfoElement;selectedItemInfoElement&&(!item.ServerId||item.IsCategory?clearSelectedItemInfo(instance):(html="",(logoImageUrl=function(item,options){options=options||{};var logoTypes=_skinmanager.default.getPreferredLogoImageTypes();return _connectionmanager.default.getApiClient(item).getLogoImageUrl(item,options,logoTypes)}(item,{}))&&(html+='<img class="selectedItemInfoLogo" loading="lazy" src="'+logoImageUrl+'" />'),logoImageUrl="Program"===item.Type?_mediainfo.default.getSecondaryMediaInfoHtml(item):_mediainfo.default.getPrimaryMediaInfoHtml(item),html+='<div class="selectedItemInfoDetails"><div class="selectedItemName">',item.AlbumArtist&&(html+=item.AlbumArtist+" - "),item.IsSeries?html+=item.Name:html+=_itemmanager.default.getDisplayName(item),html+="</div>",logoImageUrl&&(html=(html+='<div class="selectedItemMediaInfo mediaInfoItems">')+logoImageUrl+"</div>"),selectedItemInfoElement.innerHTML=html+="</div>",instance.selectedItemInfoElementHasContent=!0,item=card.getBoundingClientRect(),logoImageUrl=Math.min(item.left,.8*_dom.default.getWindowSize().innerWidth),selectedItemInfoElement.style.left=Math.max(logoImageUrl,70)+"px",html&&selectedItemInfoElement.animate&&selectedItemInfoElement.animate([{opacity:"0",offset:0},{opacity:"1",offset:1}],{duration:140,iterations:1,easing:"ease-out"})))}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,require(["css!home_horiz/home.css"]),Object.assign(HomeView.prototype,_tabbedview.default.prototype),HomeView.prototype.getTabs=function(){var items=this.item.UserViews;return function(instance){if(!instance.tabsCreated){instance.tabsCreated=!0;for(var html="",i=0,length=instance.item.UserViews.length;i<length;i++)html+='<div class="tabContent home-horiz-tabContent flex flex-grow focuscontainer-x" data-index="'+i+'"></div>';instance.view.insertAdjacentHTML("afterbegin",html)}}(this),items.map(function(i){return{name:i.Name,id:i.Id+"_"+(i.CollectionType||"")}})},HomeView.prototype.getItem=function(){var apiClient=_connectionmanager.default.currentApiClient();return apiClient.getUserViews({},apiClient.getCurrentUserId()).then(function(result){return{UserViews:result.Items||result}})},HomeView.prototype.setTitle=function(){},HomeView.prototype.onTabChange=function(previousController){_tabbedview.default.prototype.onTabChange.apply(this,arguments),clearSelectedItemInfo(this)},HomeView.prototype.loadTabController=function(id){switch(id.split("_")[1]){case"movies":return Emby.importModule("./home_horiz/views.movies.js");case"music":return Emby.importModule("./home_horiz/views.music.js");case"tvshows":return Emby.importModule("./home_horiz/views.tv.js");case"livetv":return Emby.importModule("./home_horiz/views.livetv.js");default:return Emby.importModule("./home_horiz/folderstab.js")}},HomeView.prototype.getTabControllerParams=function(id){var params=_tabbedview.default.prototype.getTabControllerParams.apply(this,arguments);return id=id.split("_")[0],params.parentId=id,params},HomeView.prototype.getTabControllerOptions=function(id){return{scrollDirection:"x"}},HomeView.prototype.onItemFocused=function(item){setSelectedInfo(this,document.activeElement,item)},HomeView.prototype.onFocusOut=function(){this.selectedItemInfoElement&&this.selectedItemInfoElementHasContent&&clearSelectedItemInfo(this)},HomeView.prototype.onTabControllerCreated=function(controller){_tabbedview.default.prototype.onTabControllerCreated.apply(this,arguments),controller.onItemFocusedExternal=this.onItemFocused.bind(this),controller.onFocusOutExternal=this.onFocusOut.bind(this)},HomeView.prototype.destroy=function(){_tabbedview.default.prototype.destroy.apply(this,arguments)},_exports.default=HomeView});

1
home_horiz/spotlight.js Normal file
View File

@@ -0,0 +1 @@
define(["exports","./../modules/cardbuilder/cardbuilder.js"],function(_exports,_cardbuilder){function trimResultByIndex(result,index){result=result.Items.slice(index);return result.length=1,{Items:result,TotalRecordCount:1}}function Spotlight(itemsContainer,getItemsFn,getDefaultItemFn){(this.itemsContainer=itemsContainer).fetchData=function(){var instance=this;return instance._itemsResult?Promise.resolve(trimResultByIndex(instance._itemsResult,instance._currentIndex)):instance.getItemsFn({Limit:20}).then(function(result){return result.Items.length||(result.Items.push(instance._defaultItem),result.TotalRecordCount=1),trimResultByIndex(instance._itemsResult=result,instance._currentIndex)})}.bind(this),itemsContainer.getListOptions=function(){return{renderer:_cardbuilder.default,options:{shape:"backdrop",multiSelect:!1,contextMenu:!1,overlayText:!0,fields:["Name"],cardClass:"wideSpotlightCard"},virtualScrollLayout:"vertical-grid"}}.bind(this),this.getItemsFn=getItemsFn,this._currentIndex=0,this._defaultItem=getDefaultItemFn()}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Spotlight.prototype.resume=function(options){this.paused=!1;var instance=this;return this.itemsContainer.resume(options).then(function(){instance.startInterval()})},Spotlight.prototype.onInterval=function(){var itemsResult,itemsContainer,newIndex;this.paused||(itemsResult=this._itemsResult)&&(itemsContainer=this.itemsContainer,document.body.contains(itemsContainer)?((newIndex=this._currentIndex+1)>=itemsResult.TotalRecordCount&&(newIndex=0),this._currentIndex=newIndex,itemsContainer.refreshItems()):this.clearInterval())},Spotlight.prototype.startInterval=function(){this.interval||(this.interval=setInterval(this.onInterval.bind(this),3e4))},Spotlight.prototype.clearInterval=function(){this.interval&&(clearInterval(this.interval),this.interval=null)},Spotlight.prototype.pause=function(){this.paused=!0,this.clearInterval()},Spotlight.prototype.destroy=function(){this.clearInterval(),this.itemsContainer=null,this._itemsResult=null,this._currentIndex=null,this._defaultItem=null},_exports.default=Spotlight});

View File

@@ -0,0 +1,60 @@
<div is="emby-scroller" data-horizontal="true" data-focusscroll="true" data-navcommands="card" class="flex flex-grow">
<div class="scrollSlider flex-grow padded-top-page padded-left padded-right scrollSliderX flex">
<div class="horizontalSection">
<div class="sectionTitle">&nbsp;</div>
<div class="cardColumn categoryItemsContainer itemsContainer" is="emby-itemscontainer">
</div>
</div>
<div class="horizontalSection latestSection hide">
<div class="sectionTitle">${HeaderLatestRecordings}</div>
<div is="emby-itemscontainer" class="itemsContainer">
</div>
</div>
<div class="horizontalSection activePrograms hide">
<div class="sectionTitle">${HeaderOnNow}</div>
<div is="emby-itemscontainer" class="itemsContainer" data-refreshinterval="300000">
</div>
</div>
<div class="horizontalSection upcomingEpisodes hide">
<div class="sectionTitle">${Shows}</div>
<div is="emby-itemscontainer" class="itemsContainer" data-refreshinterval="300000">
</div>
</div>
<div class="horizontalSection upcomingTvMovies hide">
<div class="sectionTitle">${Movies}</div>
<div is="emby-itemscontainer" class="itemsContainer" data-refreshinterval="300000">
</div>
</div>
<div class="horizontalSection upcomingSports hide">
<div class="sectionTitle">${Sports}</div>
<div is="emby-itemscontainer" class="itemsContainer" data-refreshinterval="300000">
</div>
</div>
<div class="horizontalSection upcomingKids hide">
<div class="sectionTitle">${HeaderForKids}</div>
<div is="emby-itemscontainer" class="itemsContainer" data-refreshinterval="300000">
</div>
</div>
<div class="horizontalSection upcomingNews hide">
<div class="sectionTitle">${News}</div>
<div is="emby-itemscontainer" class="itemsContainer" data-refreshinterval="300000">
</div>
</div>
</div>
</div>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,31 @@
<div is="emby-scroller" data-horizontal="true" data-focusscroll="true" data-navcommands="card" class="flex flex-grow">
<div class="scrollSlider flex-grow padded-top-page padded-left padded-right scrollSliderX flex">
<div class="horizontalSection">
<div class="sectionTitle">&nbsp;</div>
<div class="spotlightItemsContainer itemsContainer" is="emby-itemscontainer">
</div>
<div class="horizontalItemsContainer categoryItemsContainer itemsContainer" is="emby-itemscontainer">
</div>
</div>
<div class="horizontalSection resumeSection hide">
<div class="sectionTitle">${HeaderContinueWatching}</div>
<div is="emby-itemscontainer" class="itemsContainer" data-monitor="videoplayback,markplayed">
</div>
</div>
<div class="horizontalSection latestSection hide">
<div class="sectionTitle">${HeaderLatestMovies}</div>
<div is="emby-itemscontainer" class="itemsContainer" data-monitor="videoplayback,markplayed">
</div>
</div>
<div class="recommendations horizontalSection">
</div>
</div>
</div>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,60 @@
<div is="emby-scroller" data-horizontal="true" data-focusscroll="true" data-navcommands="card" class="flex flex-grow">
<div class="scrollSlider flex-grow padded-top-page padded-left padded-right scrollSliderX flex">
<div class="horizontalSection">
<div class="sectionTitle">&nbsp;</div>
<div class="cardColumn categoryItemsContainer itemsContainer" is="emby-itemscontainer">
</div>
</div>
<div class="horizontalSection latestSection hide">
<div class="sectionTitle">${HeaderLatestMusic}</div>
<div is="emby-itemscontainer" class="itemsContainer latestItemsContainer">
</div>
</div>
<div class="horizontalSection playlistsSection hide">
<div class="sectionTitle">${Playlists}</div>
<div is="emby-itemscontainer" class="itemsContainer playlistsItemsContainer">
</div>
</div>
<div class="horizontalSection recentlyPlayedSection hide">
<div class="sectionTitle">${HeaderRecentlyPlayed}</div>
<div is="emby-itemscontainer" class="itemsContainer recentlyPlayedItemsContainer">
</div>
</div>
<div class="horizontalSection frequentlyPlayedSection hide">
<div class="sectionTitle">${HeaderFrequentlyPlayed}</div>
<div is="emby-itemscontainer" class="itemsContainer frequentlyPlayedItemsContainer">
</div>
</div>
<div class="horizontalSection favoriteArtistsSection hide">
<div class="sectionTitle">${HeaderFavoriteArtists}</div>
<div is="emby-itemscontainer" class="itemsContainer favoriteArtistsItemsContainer">
</div>
</div>
<div class="horizontalSection favoriteAlbumsSection hide">
<div class="sectionTitle">${HeaderFavoriteAlbums}</div>
<div is="emby-itemscontainer" class="itemsContainer favoriteAlbumsItemsContainer">
</div>
</div>
<div class="horizontalSection favoriteSongsSection hide">
<div class="sectionTitle">${HeaderFavoriteSongs}</div>
<div is="emby-itemscontainer" class="itemsContainer favoriteSongsItemsContainer">
</div>
</div>
</div>
</div>

File diff suppressed because one or more lines are too long

27
home_horiz/views.tv.html Normal file
View File

@@ -0,0 +1,27 @@
<div is="emby-scroller" data-horizontal="true" data-focusscroll="true" data-navcommands="card" class="flex flex-grow">
<div class="scrollSlider flex-grow padded-top-page padded-left padded-right scrollSliderX flex">
<div class="horizontalSection">
<div class="sectionTitle">&nbsp;</div>
<div class="spotlightItemsContainer itemsContainer" is="emby-itemscontainer">
</div>
<div class="horizontalItemsContainer categoryItemsContainer itemsContainer" is="emby-itemscontainer">
</div>
</div>
<div class="horizontalSection resumeSection hide">
<div class="sectionTitle">${HeaderContinueWatching}</div>
<div is="emby-itemscontainer" class="itemsContainer" data-monitor="videoplayback,markplayed">
</div>
</div>
<div class="horizontalSection latestSection hide">
<div class="sectionTitle">${HeaderLatestEpisodes}</div>
<div is="emby-itemscontainer" class="itemsContainer" data-monitor="videoplayback,markplayed">
</div>
</div>
</div>
</div>

1
home_horiz/views.tv.js Normal file

File diff suppressed because one or more lines are too long