Favourites.xml: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
(Updated for v20)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This is developer documentation about the markup of the favourites.xml file. For the main page about the favourites feature see '''[[Favourites]]'''.
{{mininav| [[Userdata]] {{l2| [[Favourites]] }} }}


== Favourites via xml==
Creating and/or editing favourites.xml in the [[userdata folder]]


'''Example 1'''
= Introduction =
Here is how simple favourites.xml file would like for the method outline above if you were to create it manually.
The '''''favourites.xml''''' file contains the data of all items added to the '''[[Favourites]]''' listing.
<syntaxhighlight lang="XML" enclose="div">
 
For advanced users, the ''favourites.xml'' file can be edited manually, rather than using the {{kodi}} interface to create and edit the listing.
 
See also: '''[[Favourites]]'''
 
 
 
= Favourites.xml =
The '''''favourites.xml''''' file is located in the '''''[[Userdata]]''''' folder.
 
The '''User preference order''' of the Favourites screen is determined by the order of the entries in the xml file, which is the order they were added to the Favourites list.
 
To change the order, simply move the entries to the desired order.
 
 
'''Example: '''
The format of the favourites.xml is as follows.
<syntaxhighlight lang=xml enclose="div">
<favourites>
<favourites>
     <favourite name="Water Wars II: Privatization" thumb="http://static.ddmcdn.com/gif/videos/120x90/52447.jpg">PlayMedia(&quot;plugin://plugin.video.howstuffworks_com/?url=52447&amp;mode=playVideo&quot;)</favourite>
     <favourite name="The Big Bang Theory" thumb="smb://HTPC-PC/J/TV Complete AK/Big Bang Theory (2007)/poster.jpg">ActivateWindow(10025,&quot;videodb://tvshows/titles/1/&quot;,return)</favourite>
    <favourite name="Artwork Dump" thumb="C:\Kodi\KODI- v20 Release\portable_data\addons\script.artwork.dump\icon.png">RunAddon(&quot;script.artwork.dump&quot;)</favourite>
    <favourite name="U2" thumb="C:\Kodi\Test- Music\U2\Best Of 1980-1990, The\discart.png">ActivateWindow(10502,&quot;C:\\Kodi\\Test- Music\\U2\\&quot;,return)</favourite>
    <favourite name="Open Space" thumb="C:\Kodi\Test- Music\Open Space\discart.png">ActivateWindow(10502,&quot;C:\\Kodi\\Test- Music\\Open Space\\&quot;,return)</favourite>
</favourites>
</favourites>
</syntaxhighlight >
</syntaxhighlight >


'''Example 2'''
'''Note:''' When adding library items to Favourites, some items are linked by their ID's contained in the library databases. If these items are deleted and rescraped or refreshed, the ID's will most likely change and the favourites entry becomes invalid.
 
 
 
= Format of Favourite Item =


Here is how simple favourites.xml file looks like with SVN Repo Installed plugin entry (you need to have installed SVN Repo Installed and TED Video plugin previously installed):
<syntaxhighlight lang=xml enclose="div">
<syntaxhighlight lang="XML" enclose="div">
<favourites>
<favourites>
     <favourite name="TED Talks" thumb="special://masterprofile/Thumbnails/Programs/d3b7311b.tbn">ActivateWindow(10024,plugin://video/TED Talks/)</favourite>
     <favourite name="Enter name here" thumb="URL (local or online)">Action</favourite>
    <favourite name="SVN Repo Installer" thumb="special://home/plugins/programs/SVN Repo Installer/default.tbn">ActivateWindow(10001,plugin://programs/SVN Repo Installer/)</favourite>  
</favourites>
</favourites>
</syntaxhighlight >
</syntaxhighlight >


==Renaming a favourite via xml==
You can when adding the Source Name it as you wish the filename to appear, however if your not happy with the name provided by default rename it to whatever you wish.


<syntaxhighlight lang="XML" enclose="div">
<favourites>
    <favourite name="Enter Desired name here" thumb="http://static.ddmcdn.com/gif/videos/120x90/52447.jpg">PlayMedia(&quot;plugin://plugin.video.howstuffworks_com/?url=52447&amp;mode=playVideo&quot;)</favourite>
</favourites>
</syntaxhighlight >


{{Top}}
{{updated|20}}
[[Category:Development]]
[[Category:Development]]
[[Category:General topics]]

Latest revision as of 03:59, 25 January 2023

Home icon grey.png   ▶ Userdata
▶ Favourites
▶ Favourites.xml


Introduction

The favourites.xml file contains the data of all items added to the Favourites listing.

For advanced users, the favourites.xml file can be edited manually, rather than using the Kodi interface to create and edit the listing.

See also: Favourites


Favourites.xml

The favourites.xml file is located in the Userdata folder.

The User preference order of the Favourites screen is determined by the order of the entries in the xml file, which is the order they were added to the Favourites list.

To change the order, simply move the entries to the desired order.


Example: The format of the favourites.xml is as follows.

<favourites>
    <favourite name="The Big Bang Theory" thumb="smb://HTPC-PC/J/TV Complete AK/Big Bang Theory (2007)/poster.jpg">ActivateWindow(10025,&quot;videodb://tvshows/titles/1/&quot;,return)</favourite>
    <favourite name="Artwork Dump" thumb="C:\Kodi\KODI- v20 Release\portable_data\addons\script.artwork.dump\icon.png">RunAddon(&quot;script.artwork.dump&quot;)</favourite>
    <favourite name="U2" thumb="C:\Kodi\Test- Music\U2\Best Of 1980-1990, The\discart.png">ActivateWindow(10502,&quot;C:\\Kodi\\Test- Music\\U2\\&quot;,return)</favourite>
    <favourite name="Open Space" thumb="C:\Kodi\Test- Music\Open Space\discart.png">ActivateWindow(10502,&quot;C:\\Kodi\\Test- Music\\Open Space\\&quot;,return)</favourite>
</favourites>

Note: When adding library items to Favourites, some items are linked by their ID's contained in the library databases. If these items are deleted and rescraped or refreshed, the ID's will most likely change and the favourites entry becomes invalid.


Format of Favourite Item

<favourites>
    <favourite name="Enter name here" thumb="URL (local or online)">Action</favourite>
</favourites>


Return to top