Remove Music link from home screen
#1
Hi guys,

I just bumped into this fabolous skin and already installed a few mods to it (for the movie layout).

I have been checking the XML files to see how the code to hide entries in the home menu work, and I found that the 'Hide Music' setting was only enabled in Home views 2 and 3. I took that conditional out, so now it shows up under the settings of home view 1.

The line in question was this:

Code:
<visible>Skin.HasSetting(home2) | Skin.HasSetting(home3)</visible>
on line 252 of CustomSettings.xml.

I can toggle the radio button, but the home screen still displays the Music entry. Is there some more code I'd need to change?

Any help is appreciated.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#2
Okay... I'm a little bit closer.

I have changed the Includes_Home_1.xml file too, and although I still get the Music entry to show up, I cannot select it anymore. Using my left/right buttons will jump to the next entry, but it will directly jump from the Settings entry to the Movies one, bypassing the Music entry.

This is my patch:

Code:
diff -Naur 720p/CustomSettings.xml 720p.new//CustomSettings.xml
--- 720p/CustomSettings.xml     2010-07-27 14:53:18.471355895 +0200
+++ 720p.new//CustomSettings.xml        2010-07-27 14:45:39.431356001 +0200
@@ -252,7 +252,7 @@
                                                <label>$LOCALIZE[40015]</label>
                                                <onclick>Skin.ToggleSetting(nomusic)</onclick>
                                                <selected>Skin.HasSetting(nomusic)</selected>
-                                               <visible>Skin.HasSetting(home2) | Skin.HasSetting(home3)</visible>
+                                               <visible>Skin.HasSetting(home1) | Skin.HasSetting(home2) | Skin.HasSetting(home3)</visible>
                                        </control>
                                        <control type="radiobutton" id="255">
                                                <include>SettingsLabel</include>
diff -Naur 720p/Includes_Home_1.xml 720p.new//Includes_Home_1.xml
--- 720p/Includes_Home_1.xml    2010-07-26 08:40:30.377638519 +0200
+++ 720p.new//Includes_Home_1.xml       2010-07-27 14:45:39.111356113 +0200
@@ -29,6 +29,7 @@
                                <item id="3">
                                        <description>Music</description>
                                        <onclick>ActivateWindow(Music)</onclick>
+                                       <visible>!Skin.HasSetting(nomusic)</visible>
                                </item>
                                <item id="4">
                                        <description>Movies</description>

If anybody has a hint about what I'm overlooking, please let me know.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#3
Victory! Laugh

Since Pastebin has a better layout than the code tags on the forum I have posted the final patch on Pastebin.

This patch will add a 'Hide Music' radio button to the Home 1 settings. Just patch the skin, change skins (pick another one, let it load, pick Alaska again) or restart Xbmc and tick the button.
* MikroTik RB5009UG+S+IN :: ZyXEL GS1900-8HP v1 :: EAP615-Wall v1 :: Netgear GS108T v3 running OpenWrt 23.05
* LibreELEC 11:  HTPC Gigabyte Brix GB-BXA8-5545 with CEC adapter, Sony XR-64A84K :: Desktop AMD Ryzen 7 5800X / Sapphire Nitro+ Radeon 6700XT  / 27" Dell U2717D QHD
* Debian Bookworm x86_64: Celeron G1610, NFS/MariaDB/ZFS server
* Blog
Reply
#4
thanks for sharing this Smile
Reply
#5
hi there,

i hope it's ok to ask...but how exactly do i "patch" the skin?
do i have to add this to the xml files or create a new one..or...?

nothing i tried so far worked for me ; ( and i'm looking for this option a long time.

thanks for your help.
Reply
#6
cbierwirth Wrote:hi there,

i hope it's ok to ask...but how exactly do i "patch" the skin?
do i have to add this to the xml files or create a new one..or...?

nothing i tried so far worked for me ; ( and i'm looking for this option a long time.

thanks for your help.

This link might help: http://www.markusbe.com/2009/12/how-to-r...ified-diff

If not, google it and you might find better results (this is the first one I clicked).

If you look at the pastebin patch, at the top you'll see
PHP Code:
#
diff -Naur 720p.old//CustomSettings.xml 720p//CustomSettings.xml
#
--- 720p.old//CustomSettings.xml        2010-07-27 14:53:18.471355895 +0200
#
+++ 720p//CustomSettings.xml    2010-07-27 14:45:39.431356001 +0200
#
@@ -252,+252,@@ 
So, you want to open the file 720p/CustomSettings.xml. The "-252,7 +252,7" part is the interesting bit in this file. You'll see a "-" on line 8 and a "+" on line 9. This means, "remove the line with a minus in front of it, and replace it with the line with a plus in front of it". So, basically, go to line 255 (252 is the <label> line, 253 the line below, 254 the line under that, and 255 is the marked line) or search for the "-" marked line in 720p/CustomSettings.xml, make sure the surrounding lines look right so you are in the right place and change it to read
PHP Code:
<visible>Skin.HasSetting(home1) | Skin.HasSetting(home2) | Skin.HasSetting(home3)</visible

Then, further down, the patch applies to another file. Here you see only a "+" but no "-", meaning nothing has been removed from that file, but a line has been added. So open up 720p/Includes_home_1.xml and add the line with a "+" in front of it at line 32, and then the other marked line further down at line 244 in the same file.

Might be a good idea to backup the file first. Smile

You can also use the 'patch' utility on a unix system (and probably some other utility on windows), but this is the "easy" way. Hope it clears things up! Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Remove Music link from home screen0