[SOLVED] How to change order of the Main Menu?

  • Hi all!

    I've been using LibreElec on my Raspberry Pi3 for a few months. For the most part its been awesome.

    I'm not interested in populating all the Main Menu Items at the moment. So at first I hid them, and just kept Add-ons in view as I use it a lot. But the interface started to look very empty.

    After some thought, I decided I'd prefer all Main Menu Items in view with Add-ons first on the list. Sounds simple right? Frustratingly I searched here/online and all I found HOW-TO:Edit the home screen skin files - Official Kodi Wiki (I know its not LibreElec) which referred to the Home.xml file, and LibreELEC but no mention of Main Menu Items. So I think all I'd need to do is edit some code which I don't mind doing. However I cannot find the Home.xml file in the LibreElec installation, or in fact any other file which could help.

    Can someone help me please? I realize this may be a simple answer, but its certainly not online for all to see IMHO?

    Edited once, last by Tennant (July 18, 2017 at 11:48 AM).

  • I'm assuming you're using krypton / Estuary (and want to stay with Estuary)...

    Your issue is that the skin is part of the initial install, so it's somewhere in the image in your flash partition. It can't be edited directly, you need to copy it to somewhere else, muck about with it and then stick it in the storage/.kodi/addons folder.

    Option 1: edit Estuary

    1. Copy the skin.estuary folder from usr/share/kodi/addons/ to somewhere you can edit it. WinSCP can do that.

    2. Open skin.estuary/addon.xml - bump the version number (so it won't be overwritten). Notepad++ will do that.

    3. Make your changes.

    4. Zip up the folder

    5. Install from zip

    Your estuary skin has the changes, but won't update.

    Option 2: make a new skin

    Step 1 as above, then:

    2. Rename the skin.estuary folder to eg skin.estuarymod

    3. Open skin.estuarymod/addon.xml in notepad++, change the addon name to 'Estuary Mod'.

    4. In notepad++ use the 'search in files' / 'replace in files' function to change every occurence of 'skin.estuary' in your new skin folder to 'skin.estuarymod'.

    5. Make your changes

    6. Zip up the folder, install from zip, switch to new skin.

    This way you have a cloned modified estuary, but can still switch back to estuary. Estuary will update, the clone won't.

    Option 3: use a custom version of estuary

    Look in the kodi forum - there are several versions of estuary with lots of customization available. Install / try one of those. As long as you install from a repo the new skin will be updated automatically.

  • Hi Trogggy

    Thanks for your reply.

    I managed to get a hold of skin.estuary/addon.xml, but it doesn't show any legacy code for the Main Menu. If that is indeed the correct file to edit for my purpose, would you know where I can find code examples of the Main Menu? Does editing the addon.xml override other functions too?

    Many thanks.

    • Official Post

    What I always find most helpful is to set a skin into debug-mode. That can be done by ssh-ing in and do:

    Code
    kodi-send --action=Skin.ToggleDebug

    After that you will see a little overlayed note at the top left of the skin you are using and it will show you which XML-file is actually in use on the activated Window. The "Main Menu" is the Home.xml for Estuary and that is the file you need to edit.

    The list for Estuary is a "fixed list" with the ID of "9000". See:

    skin.estuary/Home.xml at master · phil65/skin.estuary · GitHub


    So, that then should be the 'content' of that fixed list:

    skin.estuary/Home.xml at master · phil65/skin.estuary · GitHub

    You will see some labels like: $LOCALIZE[342]....that's a placeholder for a string. So you have to determine in the strings.po file which String is in use for which '$LOCALIZE[some_number]' and change the complete ordering for it. You might have to reorder complete sections to keep everything working.

    Hope that helps.

  • Hi trogggy

    Editing addon.xml doesn't change the menu - you're just changing the skin name / id / version etc. For editing the skin you'll need to find the right files in the skin.estuary/xml folder.

    Maybe start here:

    Skinning for kodi.

    Had a look. Its a bit too intense for me! But thanks for that anyways.

    Hi DaVu

    Thank you so much for your reply. You are right on the money there! You pointed me exactly where I need to be!

    I found the Add-Ons string, then simply cut and pasted to the top of the content list in Home.xml. But that's where the dream ended!

    I followed togggy's advice (thanks again) and changed all previous named instances to my new modified version name in the addon.xml file.

    I copied the skin.estuary-master (renaming it skin.estuary as it is in the addon.xml) from GitHub, and my modified version with a different name to my USB Drive. But neither would install. The skin.estuary had an GUI dependency incompatibility issue error, and my modified version simply failed to install.

    I'm using the latest LibreElec as of this date. Am I missing something obvious?

    Many thanks in advance.

    Edited once, last by Tennant (July 22, 2017 at 12:05 PM).

  • The GUI dependency incompatibility says you've used a different version of skin.estuary - most likely you've used the latest (leia) version from Github and tried to install in krypton?

    If you copy estuary from your own install (as in post 1 step 1) you're guaranteed to have the right version - and any customizations specific to libreelec (if there are any). You can no doubt find the same version on github, I've just found it easier to dig into my install with WinSCP.

  • Hi trogggy

    Thanks for your really helpful reply.

    I struggled to find the skin.estuary folder from usr/share/kodi/addons/. I can't seem to find it with the Kodi UI.

    Yes you are right trogggy, I downloaded the latest version of skin.estuary. I didn't know what I was doing. But since then I found a Branch for Krypton on the GitHub for skin.estuary which I downloaded and modified. It still failed to install. I found this puzzling as I thought what else could be wrong?

    I'm on a Mac, and some time ago I recalled having an issue with the Mac Default Archiver and using the resultant .zip file elsewhere due to the Mac Resource Forks being saved in the .zip file. So I used a different archiver this time called Keka which you can use to filter out the Mac Resource Forks. After that my modified skin.estuary finally installed with Addons on top of the list. Sweet!

    Thanks so much to both trogggy and DaVu. I didn't have a clue without you!

    For my next final tweak I would like to delete the Search on the Top Bar going across the screen as it keeps scrolling off screen which is a bit irritating. I suspect its in the code again, not sure where. I may try DaVu's advice about debug-mode (although I don't know how to switch it off after I've finished with it). Should I open a new thread for this, or continue here?

    Edited 6 times, last by Tennant (July 22, 2017 at 2:29 PM).

  • Tennant

    Let's continue here. Could you post a screenshot and mark the section you want to remove/delete? Not sure if we both mean the same ;)

    Thanks for your reply and support DaVu. Although I checked bubblegum57's link and actually its perfect for my needs for now. Thanks bubblegum57.

    I think this thread is SOLVED now, so I'll mark it accordingly. Thank you very much all!