Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Trying to create custom menu item in Transparency...
#16
All along I've been intimating that moving buttons around outside of the skin allowance isn't an easy job, but do-able as some suggest in this thread, question then becomes 'what is easy for some' isn't for others.. include me in that last part.
Reply
#17
In a previous post Pak K suggests re-purposing an existing button, but Pat does not say how, so I decided to explore that path a bit.
Suppose you keep all your videos on one NAS.
Within that NAS you create partitions, let's call them Movies, Television, AnimeMovies, and AnimeTelevision.
Next you groan at the prospect of organizing your media yet again.
After a strong cup of coffee, you populate your partitions with the appropriate content.
Within Kodi, you add and scrape the content, 2 for movies and two for TV.
Still jacked on java, you set about creating four smart playlists, 2 for movies and two for TV. Your rule for the movie playlists would be path contains AnimeMovies for one playlist and path does not contain AnimeMovies for the other playlist. Same for the two tv playlists. Here''s an example:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="tvshows">
<name>Not Anime TV</name>
<match>all</match>
<rule field="path" operator="doesnotcontain">
<value>AnimeTelevision</value>
</rule>
</smartplaylist>

After exiting Kodi, you navigate over to your playlists folder and within the Videos sub folder you add a new folder called Anime. Here's what I mean:
Image
The two scripts that exclude anime are not in the Anime folder and the two scripts that select anime are inside the anime folder.
I know the coffee is wearing off.
Within Kodi, navigate to the smart playlists folder and make the folder you created, the one called Anime, a favorite. You guessed it, add that favorite to a custom button.
You can now mod your skin so clicking the Movies button runs the Not Anime Movies script and clicking the TV button runs the Not Anime TV script. Re-order you buttons as you see fit. Here's a snip:
Image
Clicking on the anime button displays the two scripts:
Image
And so everything is properly split out.
The sucky part is if you edit the two scripts within the Anime folder Kodi will move them into the Videos folder, so you manually have to move them back to the Anime folder.
I don't follow Kodi development, but I hope blended media will get some love in Version 18.
Reply
#18
[quote='RyeHumor' pid='2428416' dateline='1475446162']

Define your button:

Open the Includes_Home.xml and around line 2630 or so you'll find the group of button definitions. Add your own here such as:

<include name="3dMoviesButton">
<item id="17">
<label>Cinema 3d</label>
<onclick>ActivateWindow(Videos,"special://profile/playlists/video/3d.xsp", return)</onclick>
<icon>special://skin/backgrounds/settings.jpg</icon>
<thumb>-</thumb>
</item>
</include>
/quote]

Thanks so much for this coding example. I'm also trying to split up Anime TV and Anime Movies, so I created 2 new buttons with only some old COBOL skills Smile.
The one area I'm still a little confused is the:

"<onclick>ActivateWindow(Videos,"special://profile/playlists/video/3d.xsp", return)</onclick>".

Is 3d.xsp the name of the playlist? If so, is that what you named the playlist? Any layman's explication of that particular line of code will be greatly appreciated.
Reply
#19
Never mind. Got it!
RyeH Thanks again.
Searching in vain for a nice skin with a vertical home menu but now Transparency works perfectly for my needs.
Reply
#20
Hi All. I am a newbie to this whole media thing. 2 weeks old in fact. I have a question regarding adding custom button of home menu. I am not a coder and have no idea on coding. So I was hoping I can achieve my result using the GUI. What I want to achieve is 3 buttons on my screen. Movies, tv shows, Bollywood.

Moves and tv shows working perfectly. Trying to get Bollywood button to work. All my movies included Bollywood movies are all in one movie folder on the Nas. So this is what I have done in order to get the Bollywood button on home screen.

Settings > Skin settings > Menu > Custom 1 > Favourite 1 - renamed to Bollywood.
So on main menu I have Movies, tv shows and Bollywood.

But now I don't know how to put my Bollywood movies in that button, so that when I press the button it brings up only Bollywood movies.

Any advice will be helpful.
Reply
#21
Well you have the cosmetic part down... Now what you need to do is create a smart playlist with the 'rule' that points at the path for the Bollywood folder, ensure it functions as you like, then mark it as a favourite. Then in that skin custom button listing you made you can link with 'favourite'; done. Smart playlists (wiki) Once you get the knack of making these smart playlists, Kodi's library becomes amazing.

http://forum.kodi.tv/showthread.php?tid=89678
Reply
#22
Ok thanks. I will give this a try later tonight. Much much appreciated!
Reply
#23
Hi, just to let you know I tried what you said and it worked liked a charm. I can't express how helpful you have been and how much I appreciate it.
Reply
#24
I found myself needing to re-install Kodi again today. After creating my smart playlists for my anime series, anime movies, movies and TV series, I was left to decide how to customize the menu. I tried a few of the suggested ways to create a whole new custom menu button, but again, I found this either screwed up Kodi's main menu or the background art didn't work. But as RyeHumor said, the order of the buttons is determined by the order in the "<content>" section below "<include name="VerticalMenu">/<include name="HorizontalMenu"> (depending on which setting you're using) so that was one issue I was never able to work out solved.

In the end, I figured out what I think is the simplest solution, as it involves simply editing the existing buttons. This also allows you to set a folder to be used for rotating backgrounds though Kodi's options as normal, I couldn't work out how to do this by editing the Includes_Home.xml file. So here's the process:

1) Create your smart playlists for the menu items you want. This includes the stock menus (Movie, TV Shows etc) as well as the menu items that will be assigned to the "custom" menu options in Kodi. In my case, this is my two anime menus.

2) Mark the playlists you want to assign to your "custom" menus as favorites, then go into Transparency's configuration and assign these favorites to your custom menus. This ensures the menus will have names, if you don't do this beforehand, you'll have working menus, but they will be blank.

3) Open up your Includes_Home.xml file and find the "<include name=" section for the menu you want to edit (i.e "<include name="HomeMoviesButton">"). Then simple replace the "<onclick>BLAH BLAH BLAH BLAH</onclick>" line with "<onclick>ActivateWindow(Videos,"special://profile/playlists/video/NAMEOFYOURPLAYLISTHERE.xsp", return)</onclick>"

4) Do this for all the smart playlists you made. In my case, that's movies, TV series and custom1 and custom2 (my two anime menus).

5) Scroll down to "<include name="VerticalMenu">/<include name="HorizontalMenu"> (depending on if you're using a horizontal or vertical menu) and look for the "<content>" section. The part with the "<include condition="Skin.HasSetting" lines. Simply cut and paste the line that belongs to the menu you want and paste to to where you want. For example, I want my "Anime Movies" and "Anime Series" to appear first. These are "HomeCustom1Button" and "HomeCustom2Button" so this is how mine begins:

<content>
<include condition="Skin.HasSetting(Menu_Custom1)">HomeCustom1Button</include>
<include condition="Skin.HasSetting(Menu_Custom2)">HomeCustom2Button</include>

That's it! Doing this will allow you to choose a folder to use for backgrounds though Transparency's settings menu as normal, so you can still get rotating backgrounds even with a custom menu button.
Reply
#25
(2017-02-06, 16:27)fireaza Wrote: I found myself needing to re-install Kodi again today. After creating my smart playlists for my anime series, anime movies, movies and TV series, I was left to decide how to customize the menu. I tried a few of the suggested ways to create a whole new custom menu button, but again, I found this either screwed up Kodi's main menu or the background art didn't work. But as RyeHumor said, the order of the buttons is determined by the order in the "<content>" section below "<include name="VerticalMenu">/<include name="HorizontalMenu"> (depending on which setting you're using) so that was one issue I was never able to work out solved.

In the end, I figured out what I think is the simplest solution, as it involves simply editing the existing buttons. This also allows you to set a folder to be used for rotating backgrounds though Kodi's options as normal, I couldn't work out how to do this by editing the Includes_Home.xml file. So here's the process:

1) Create your smart playlists for the menu items you want. This includes the stock menus (Movie, TV Shows etc) as well as the menu items that will be assigned to the "custom" menu options in Kodi. In my case, this is my two anime menus.

2) Mark the playlists you want to assign to your "custom" menus as favorites, then go into Transparency's configuration and assign these favorites to your custom menus. This ensures the menus will have names, if you don't do this beforehand, you'll have working menus, but they will be blank.

3) Open up your Includes_Home.xml file and find the "<include name=" section for the menu you want to edit (i.e "<include name="HomeMoviesButton">"). Then simple replace the "<onclick>BLAH BLAH BLAH BLAH</onclick>" line with "<onclick>ActivateWindow(Videos,"special://profile/playlists/video/NAMEOFYOURPLAYLISTHERE.xsp", return)</onclick>"

4) Do this for all the smart playlists you made. In my case, that's movies, TV series and custom1 and custom2 (my two anime menus).

5) Scroll down to "<include name="VerticalMenu">/<include name="HorizontalMenu"> (depending on if you're using a horizontal or vertical menu) and look for the "<content>" section. The part with the "<include condition="Skin.HasSetting" lines. Simply cut and paste the line that belongs to the menu you want and paste to to where you want. For example, I want my "Anime Movies" and "Anime Series" to appear first. These are "HomeCustom1Button" and "HomeCustom2Button" so this is how mine begins:

<content>
<include condition="Skin.HasSetting(Menu_Custom1)">HomeCustom1Button</include>
<include condition="Skin.HasSetting(Menu_Custom2)">HomeCustom2Button</include>

That's it! Doing this will allow you to choose a folder to use for backgrounds though Transparency's settings menu as normal, so you can still get rotating backgrounds even with a custom menu button.
I wanted to add a link to an Android app. ie. Send the Live TV to my Android IPTV app. (Shield)
So I add the link via to the IPTV app the submenu option first.
Then I searched the includes-home.xml for the code that was linking to the Android app.
I then copied it and pasted it into the Live TV section. So when I click Live TV on the main menu it launches my IPTV app.
Thanks for all of the guidance here. It really helped me solve my 3 custom menu item limit.
Now I have IPTV app link. Amazon, Disney+ and Netflix custom links. Perfect system.
Reply

Logout Mark Read Team Forum Stats Members Help
Trying to create custom menu item in Transparency...0
This forum uses Lukasz Tkacz MyBB addons.