Kodi Community Forum

Full Version: How to set "Favorites" as the startup window?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm trying to put "Favorites" as my startup window, but it does not appear as an option in this skin.
I can use another skin that allows the option, but I like this one~

Image
Add the following code to a simple text file renamed to autoexec.py and place it in the Userdata file in the same location as advancedsettings.xml, guisettings.xml, etc

import xbmc
xbmc.executebuiltin('ActivateWindow(Favourites)')

Restart Kodi.
Because it's not actually a window but a dialog that can be opened in any window.
(2018-11-05, 21:38)Karellen Wrote: [ -> ]Add the following code to a simple text file renamed to autoexec.py and place it in the Userdata file in the same location as advancedsettings.xml, guisettings.xml, etc

import xbmc
xbmc.executebuiltin('ActivateWindow(Favourites)')

Restart Kodi.
It worked, but not as I expected. it opens favorites window in edit mode
Image

I was thinking if there was a way to change the order of the menu items (Add-ons, Videos, Favorites, Weather, etc.) To place Favorites as the first item, then, Favorites would look like the Main Window
Left image is the favourites dialog on the home window; second image is the home menu favourites widget. Two different things.

Add an onload control to Home.xml and adjust the second value to match the Favourites item in your home list.

<?xml version="1.0" encoding="UTF-8"?>
<window>
    <defaultcontrol>9000</defaultcontrol>
    <backgroundcolor>background</backgroundcolor>
    <onload>SetFocus(9000,8)</onload>
    <controls>
so this is as easy as just redoing menu in home.xml
<item>
 <label>$LOCALIZE[10134]</label>
 <onclick>ActivateWindow(favourites)</onclick>
       <property name="menu_id">$NUMBER[14000]</property>
 <thumb>icons/sidemenu/favourites.png</thumb>
       <property name="id">favorites</property>
       <visible>!Skin.HasSetting(HomeMenuNoFavButton)</visible>
      </item>

place a first item
Thanks, I can organize the menu items from Home.xml, it was so easy, the hard part was knowing what file to modify and where to find it. Thanks thanks
Thread marked solved.
Be warned - this will get overwritten any time the skin/Kodi is updated.
Am not getting anything trying this ? 
Am clearly doing this wrong.
<onload>SetFocus(9000,8)</onload>
adjust the second value to match the Favourites item in your home list
"Favourites" in home.xml is 14000  or $NUMBER[14000]
so assuming that by "second value " you mean 9000,8   or 8 ?
I have tried ,
<onload>SetFocus(14000)</onload>
<onload>SetFocus(9000,14000)</onload>
<onload>SetFocus(9000,$NUMBER[14000])</onload>
<onload>SetFocus($NUMBER[14000])</onload>
<onload>$NUMBER[14000]</onload>
<onload>SetFocus(ActivateWindow(10025,&quot;plugin://plugin.video.****/?action=movieWidget&quot;,return)</onload>
<onload>(ActivateWindow(10025,&quot;plugin://plugin.video.****/?action=movieWidget&quot;,return)</onload>
its obviously a simple line but am not getting my head around it Hitcher ?
Please.
ignore above tx , got it with karellen option.
It refers the item 9th in the list. 9th because the first is numbered 0 by Kodi.
Hello. I used this useful little code on Leia but it's not working on Matrix 19.3 😭
Any solution ?

Thanks!
(2022-01-06, 14:51)Azertix Wrote: [ -> ]Hello. I used this useful little code on Leia but it's not working on Matrix 19.3
Which code? If it was the autoexec.py code, then it won't work in v19 as it was changed for security reasons.

Same code but you need to create it slightly differently. See... https://kodi.wiki/view/Autoexec_Service
Hello Karellen. Ups, i forget the quote 🙄
It's your little code : https://forum.kodi.tv/showthread.php?tid...pid2789159
I used it on Leia 👍🏼 but doesn't work on Matrix 😭
Pages: 1 2