Favourites.xml: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(Updated for v18)
Line 1: Line 1:
{{mininav| [[Userdata folder]] {{l2| [[Favourites]] }} }}
{{mininav| [[Userdata]] {{l2| [[Favourites]] }} }}


This is developer documentation about the markup of the favourites.xml file. For the main page about the favourites feature see '''[[Favourites]]'''.
<section begin="intro" />Developer documentation detailing the structure and modification of the favourites.xml file. For the User Guide about the favourites feature see '''''[[Favourites]]'''''.<section end="intro" />


== Favourites via xml==
== Favourites via xml==
Creating and/or editing favourites.xml in the [[userdata folder]]
The '''display order''' seen in the Favourites screen is determined by the order of the entries in the xml file. Adjust the order of the favourites in the file to modify the displayed order in {{kodi}}.


'''Example 1'''
The '''''favourites.xml''''' is located in the '''''[[Userdata]]''''' folder.
Here is how simple favourites.xml file would like for the method outlined above if you were to create it manually.
 
 
'''Example: '''
The format of the favourites.xml is as follows. The example shows Playlist, TV Show, TV Episode, Artist, Album and Add-on.
<syntaxhighlight lang="XML" enclose="div">
<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="Marvel Universe">ActivateWindow(10025,&quot;special://profile/playlists/video/Marvel Universe.xsp&quot;,return)</favourite>
    <favourite name="Continuum" thumb="E:\TV Show- TEST\Continuum\thumb.jpg">ActivateWindow(10025,&quot;E:\\TV Show- TEST\\Continuum\\&quot;,return)</favourite>
    <favourite name="1x02. Fast Times" thumb="E:\TV Show- TEST\Continuum\Continuum S01E02-thumb.jpg">PlayMedia(&quot;E:\\TV Show- TEST\\Continuum\\Continuum S01E02.mkv&quot;)</favourite>
    <favourite name="Era" thumb="F:\Music\ArtistInfoKodi\Era\folder.jpg">ActivateWindow(10502,&quot;musicdb://artists/113/?albumartistsonly=false&quot;,return)</favourite>
    <favourite name="NextPVR PVR Client" thumb="F:\Kodi v18- Nightly\addons\pvr.nextpvr\icon.png">RunAddon(pvr.nextpvr)</favourite>
    <favourite name="TV Show- TEST">ActivateWindow(10025,&quot;E:\\TV Show- TEST\\&quot;,return)</favourite>
    <favourite name="Artist Albums">ActivateWindow(10502,&quot;F:\\Music\\FLAC\\Artist Albums\\&quot;,return)</favourite>
</favourites>
</favourites>
</syntaxhighlight >
</syntaxhighlight >


'''Example 2'''


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">
<favourites>
    <favourite name="TED Talks" thumb="special://masterprofile/Thumbnails/Programs/d3b7311b.tbn">ActivateWindow(10024,plugin://video/TED Talks/)</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>
</syntaxhighlight >


==Renaming a favourite via xml==  
==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.
Change the name of any item by amending the ''<fabourite name="">'' section.


<syntaxhighlight lang="XML" enclose="div">
<syntaxhighlight lang="XML" enclose="div">
Line 33: Line 34:
</syntaxhighlight >
</syntaxhighlight >


{{Top}}
{{updated|18}}
[[Category:Index]]
[[Category:Guides]]
[[Category:Manual]]
[[Category:Development]]
[[Category:Development]]
[[Category:General topics]]

Revision as of 03:58, 4 July 2018

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

Developer documentation detailing the structure and modification of the favourites.xml file. For the User Guide about the favourites feature see Favourites.

Favourites via xml

The display order seen in the Favourites screen is determined by the order of the entries in the xml file. Adjust the order of the favourites in the file to modify the displayed order in Kodi.

The favourites.xml is located in the Userdata folder.


Example: The format of the favourites.xml is as follows. The example shows Playlist, TV Show, TV Episode, Artist, Album and Add-on.

<favourites>
    <favourite name="Marvel Universe">ActivateWindow(10025,&quot;special://profile/playlists/video/Marvel Universe.xsp&quot;,return)</favourite>
    <favourite name="Continuum" thumb="E:\TV Show- TEST\Continuum\thumb.jpg">ActivateWindow(10025,&quot;E:\\TV Show- TEST\\Continuum\\&quot;,return)</favourite>
    <favourite name="1x02. Fast Times" thumb="E:\TV Show- TEST\Continuum\Continuum S01E02-thumb.jpg">PlayMedia(&quot;E:\\TV Show- TEST\\Continuum\\Continuum S01E02.mkv&quot;)</favourite>
    <favourite name="Era" thumb="F:\Music\ArtistInfoKodi\Era\folder.jpg">ActivateWindow(10502,&quot;musicdb://artists/113/?albumartistsonly=false&quot;,return)</favourite>
    <favourite name="NextPVR PVR Client" thumb="F:\Kodi v18- Nightly\addons\pvr.nextpvr\icon.png">RunAddon(pvr.nextpvr)</favourite>
    <favourite name="TV Show- TEST">ActivateWindow(10025,&quot;E:\\TV Show- TEST\\&quot;,return)</favourite>
    <favourite name="Artist Albums">ActivateWindow(10502,&quot;F:\\Music\\FLAC\\Artist Albums\\&quot;,return)</favourite>
</favourites>


Renaming a favourite via xml

Change the name of any item by amending the <fabourite name=""> section.

<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>


Return to top