Merge pull request #3149 from grafixeyehero/Fix-LiveTV-DefaultTab

This commit is contained in:
Bill Thornton 2021-11-07 12:51:30 -05:00 committed by GitHub
commit 9b74165cea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 13 deletions

View file

@ -1,7 +1,5 @@
<div id="liveTvSuggestedPage" data-dom-cache="true" data-role="page" class="page libraryPage liveTvPage pageWithAbsoluteTabs withTabs" data-title="${LiveTV}" data-backdroptype="series,movie">
<div class="liveTvContainer">
<div class="pageTabContent" id="suggestionsTab" data-index="0">
<div id="activePrograms" class="verticalSection">
<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">
@ -90,8 +88,5 @@
<div class="pageTabContent padded-top" id="seriesTab" data-index="5">
<div is="emby-itemscontainer" class="vertical-wrap itemsContainer centered padded-left padded-right" id="items"></div>
</div>
<div class="pageTabContent" data-index="6">
</div>
</div>
</div>

View file

@ -200,11 +200,20 @@ function setScrollClasses(elem, scrollX) {
}
function getDefaultTabIndex(folderId) {
if (userSettings.get('landing-' + folderId) === 'guide') {
return 1;
switch (userSettings.get('landing-' + folderId)) {
case 'guide':
return 1;
case 'channels':
return 2;
case 'recordings':
return 3;
case 'schedule':
return 4;
case 'series':
return 5;
default:
return 0;
}
return 0;
}
export default function (view, params) {
@ -279,10 +288,6 @@ export default function (view, params) {
if (index === 0) {
controller = self;
} else if (index === 6) {
controller = new controllerFactory(view, tabContent, {
collectionType: 'livetv'
});
} else {
controller = new controllerFactory(view, params, tabContent);
}