igeoorge 26 Posted October 15, 2019 Share Posted October 15, 2019 Hi @ Happy2Play Is it possible to remove items within the red square without affecting anything? Link to comment Share on other sites More sharing options...
Solution Happy2Play 8138 Posted October 15, 2019 Solution Share Posted October 15, 2019 Not that I have found do to the way they exist by index id in header. Since the index id is different in each section you would be removing Trailers for Movies would remove Upcoming in TV body > div.skinHeader.focuscontainer-x.skinHeader-withBackground.headroom > div > div.headerMiddle.sectionTabs > div > div > button:nth-child(3) = TV Upcoming tab body > div.skinHeader.focuscontainer-x.skinHeader-withBackground.headroom > div > div.headerMiddle.sectionTabs > div > div > button:nth-child(3) = Movies Trailers tab So my google foo css skills does not see a way for it to be done. Same discussion here. https://emby.media/community/index.php?/topic/75931-remove-menu-buttons 1 Link to comment Share on other sites More sharing options...
igeoorge 26 Posted October 15, 2019 Author Share Posted October 15, 2019 thanks again Link to comment Share on other sites More sharing options...
Happy2Play 8138 Posted October 16, 2019 Share Posted October 16, 2019 (edited) I would make backups of the files but you would have to edit the \system\dashboard-ui\movies\movies.js and \system\dashboard-ui\tv\tv.js to remove the tabs you do not want. example for removing Trailers tab from Movies. define(["tabbedView","require","globalize","userSettings","emby-itemscontainer","emby-tabs","emby-button","emby-scroller"],function(TabbedView,require,globalize,userSettings){"use strict";function MovieView(view,params){TabbedView.call(this,view,params)}return Object.assign(MovieView.prototype,TabbedView.prototype),MovieView.prototype.getTabs=function(){return[{name:globalize.translate("Movies")},{name:globalize.translate("Suggestions")},{name:globalize.translate("Trailers")},{name:globalize.translate("Collections")},{name:globalize.translate("Favorites")},{name:globalize.translate("Genres")},{name:globalize.translate("Folders")}]},MovieView.prototype.getDefaultTabIndex=function(folderId){switch(userSettings.get("landing-"+folderId)){case"suggestions":return 1;case"favorites":return 4;case"collections":return 3;case"genres":return 5;case"folders":return 6;default:return 0}},MovieView.prototype.getTabController=function(index){if(null==index)throw new Error("index cannot be null");var depends=[];switch(index){case 0:depends.push("./moviestab");break;case 1:depends.push("./suggestions");break;case 2:depends.push("./trailers");break;case 3:depends.push("./collections");break;case 4:depends.push("./moviestab");break;case 5:depends.push("./genres");break;case 6:depends.push("foldersTab")}var instance=this;return function(deps){return new Promise(function(resolve,reject){require(deps,resolve)})}(depends).then(function(controllerFactory){var controller=instance.tabControllers[index];controller||(controller=new controllerFactory(instance.view.querySelector(".tabContent[data-index="+index+"]"),instance.params),4===index&&(controller.mode="favorites"),instance.tabControllers[index]=controller);return controller})},MovieView}); But requires change with every server update. Edited October 16, 2019 by Happy2Play 2 Link to comment Share on other sites More sharing options...
igeoorge 26 Posted October 18, 2019 Author Share Posted October 18, 2019 I would make backups of the files but you would have to edit the \system\dashboard-ui\movies\movies.js and \system\dashboard-ui\tv\tv.js to remove the tabs you do not want. example for removing Trailers tab from Movies. But requires change with every server update. Hi @@Happy2Play I had not seen this comment. Thanks, I'm already trying! Link to comment Share on other sites More sharing options...
Happy2Play 8138 Posted October 19, 2019 Share Posted October 19, 2019 Still messing around but removing the tab messes up the tabs behind them. So you shouldn't have a issue with TV as you want to remove the last three, but Movies will create a issue with Favorites and Genres. Link to comment Share on other sites More sharing options...
igeoorge 26 Posted October 19, 2019 Author Share Posted October 19, 2019 (edited) Hi @@Happy2Play You're right. In movies, I had a little headache. But I got it, it was like this: define(["tabbedView","require","globalize","userSettings","emby-itemscontainer","emby-tabs","emby-button","emby-scroller"],function(TabbedView,require,globalize,userSettings){"use strict";function MovieView(view,params){TabbedView.call(this,view,params)}return Object.assign(MovieView.prototype,TabbedView.prototype),MovieView.prototype.getTabs=function(){return[{name:globalize.translate("Movies")},{name:globalize.translate("Suggestions")},{name:globalize.translate("Favorites")},{name:globalize.translate("Genres")}]},MovieView.prototype.getDefaultTabIndex=function(folderId){switch(userSettings.get("landing-"+folderId)){case"suggestions":return 1;case"favorites":return 2;case"genres":return 3;case"collections":return 5;case"folders":return 6;default:return 0}},MovieView.prototype.getTabController=function(index){if(null==index)throw new Error("index cannot be null");var depends=[];switch(index){case 0:depends.push("./moviestab");break;case 1:depends.push("./suggestions");break;case 2:depends.push("./moviestab");break;case 3:depends.push("./genres");break;case 4:depends.push("./moviestab");break;case 5:depends.push("./genres");break;case 6:depends.push("foldersTab")}var instance=this;return function(deps){return new Promise(function(resolve,reject){require(deps,resolve)})}(depends).then(function(controllerFactory){var controller=instance.tabControllers[index];controller||(controller=new controllerFactory(instance.view.querySelector(".tabContent[data-index="+index+"]"),instance.params),2===index&&(controller.mode="favorites"),instance.tabControllers[index]=controller);return controller})},MovieView}); Edited October 19, 2019 by igeoorge Link to comment Share on other sites More sharing options...
igeoorge 26 Posted October 19, 2019 Author Share Posted October 19, 2019 This inside the red square i can't remove Link to comment Share on other sites More sharing options...
Happy2Play 8138 Posted November 9, 2019 Share Posted November 9, 2019 (edited) This inside the red square i can't remove Something like this. #moviesPage [data-index="3"] div.flex.align-items-center.focuscontainer-x.itemsViewSettingsContainer.padded-bottom {display: none; } But the issue is Favorites=Trailer html section and Genre=Collection html section, do to the html page for the original index numbers. Reordering in the js would require the same html div reordering in the page html. Edited November 9, 2019 by Happy2Play Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now