Solved How to set "Favorites" as the startup window?
#1
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
Reply
#2
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

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

Restart Kodi.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
Because it's not actually a window but a dialog that can be opened in any window.
Reply
#4
(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

xml:
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
Reply
#5
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:
<?xml version="1.0" encoding="UTF-8"?>
<window>
    <defaultcontrol>9000</defaultcontrol>
    <backgroundcolor>background</backgroundcolor>
    <onload>SetFocus(9000,8)</onload>
    <controls>
Reply
#6
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
Reply
#7
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
Reply
#8
Thread marked solved.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#9
Be warned - this will get overwritten any time the skin/Kodi is updated.
Reply
#10
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.
Reply
#11
ignore above tx , got it with karellen option.
Reply
#12
It refers the item 9th in the list. 9th because the first is numbered 0 by Kodi.
Reply
#13
Hello. I used this useful little code on Leia but it's not working on Matrix 19.3 😭
Any solution ?

Thanks!
Reply
#14
(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
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#15
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 😭
Reply

Logout Mark Read Team Forum Stats Members Help
How to set "Favorites" as the startup window?0