Náhledy obrázky se neukládají do DB, ale do složky (u každého profilu vlastní složka). Ukážu ti, jak to jsem to řešil já a třeba z toho něco využiješ. Každej má přeci jen jiné potřeby nebo požadavky... Já mám v kodi dva účty, jeden vlastní, druhý má dcera s pohádkama.
Na NASu jsem si vytvořil sdílenou složku 'kodi', s tředa dalšíma podložkama 'all', 'otec', 'dcera' (názvy jsem si teď vymyslel, aby to bylo srozumitelnější).
Do složky 'all' ukládám konfigurace, ale taky loga pro IPTV a další věci, které chci sdílet napříč účty. Mám potřebu překonfigurovat klávesnici nebo ovladač, pak sdílím všem konfiguraci ve složce 'keymaps' (keyboard.xml, remote.xml).
Složky 'otec' a 'dcera' obsahují podsložky 'iptv' s m3u soubory, 'library', 'playlists' a 'thumbnails'. Pak tam mám xml soubory jako např. favourites.xml, mediasources.xml, passwords.xml, RssFeeds.xml, sources.xml a taky profilovou fotografii.
Příklad Konfigurace (advancedsettings.xml) pro profil 'otec':
Kód:
<advancedsettings>
<loglevel>1</loglevel>
<videodatabase>
<type>mysql</type>
<host>192.168.1.xx</host>
<port>3306</port>
<user>KodiDbUser</user>
<pass>*******</pass>
<name>KodiVideo_otec</name>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.1.xx</host>
<port>3306</port>
<user>KodiDbUser</user>
<pass>*******</pass>
<name>KodiMusic_otec</name>
</musicdatabase>
<videolibrary>
<importwatchedstate>true</importwatchedstate>
<importresumepoint>true</importresumepoint>
</videolibrary>
<pathsubstitution>
<substitute>
<from>special://masterprofile/keymaps/</from>
<to>smb://NAS/kodi/all/keymaps/</to>
</substitute>
<substitute>
<from>special://masterprofile/sources.xml</from>
<to>smb://NAS/kodi/otec/sources.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/library/</from>
<to>smb://NAS/kodi/otec/library/</to>
</substitute>
<substitute>
<from>special://masterprofile/Thumbnails/</from>
<to>smb://NAS/kodi/otec/thumbnails/</to>
</substitute>
<substitute>
<from>special://masterprofile/playlists/</from>
<to>smb://NAS/kodi/otec/playlists/</to>
</substitute>
<substitute>
<from>special://masterprofile/favourites.xml</from>
<to>smb://NAS/kodi/otec/favourites.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/RssFeeds.xml</from>
<to>smb://NAS/kodi/otec/RssFeeds.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/mediasources.xml</from>
<to>smb://NAS/kodi/otec/mediasources.xml</to>
</substitute>
<substitute>
<from>special://masterprofile/passwords.xml</from>
<to>smb://NAS/kodi/otec/passwords.xml</to>
</substitute>
</pathsubstitution>
<video>
<excludefromscan> <!-- Regular expressions that if evaluated to true won't be added to library. -->
<regexp>[-._ \\/]extrafanart|extrathumbs[-._ \\/]</regexp>
<regexp>\@eaDir</regexp>
<regexp>\@eadir</regexp>
<regexp>\@EADIR</regexp>
<regexp>\#recycle</regexp>
<regexp>-trailer</regexp>
<regexp>\BERRYBOOT</regexp>
<regexp>\berryboot</regexp>
<regexp>[!-._ \\/]sample[-._ \\/]</regexp>
</excludefromscan>
<excludetvshowsfromscan> <!-- Regular expressions that if evaluated to true won't be added to library. -->
<regexp>[-._ \\/]extrafanart|extrathumbs[-._ \\/]</regexp>
<regexp>\@eaDir</regexp>
<regexp>\@eadir</regexp>
<regexp>\@EADIR</regexp>
<regexp>\#recycle</regexp>
<regexp>-trailer</regexp>
<regexp>\BERRYBOOT</regexp>
<regexp>\berryboot</regexp>
<regexp>[!-._ \\/]sample[-._ \\/]</regexp>
</excludetvshowsfromscan>
<excludefromlisting><!-- Regular expressions that if evaluated to true won't be displayed in Files View -->
<regexp>[-._ \\/]extrafanart|extrathumbs[-._ \\/]</regexp>
<regexp>\@eaDir</regexp>
<regexp>\@eadir</regexp>
<regexp>\BERRYBOOT</regexp>
<regexp>\berryboot</regexp>
<regexp>\@EADIR</regexp>
<regexp>\.DS_Store</regexp>
<regexp>-trailer</regexp>
<regexp>[!-._ \\/]sample[-._ \\/]</regexp>
<regexp>\#recycle</regexp>
</excludefromlisting>
</video>
<audio>
<excludefromscan> <!-- Regular expressions that if evaluated to true won't be added to library. -->
<regexp>[-._ \\/]extrafanart|extrathumbs[-._ \\/]</regexp>
<regexp>\@eaDir</regexp>
<regexp>\@eadir</regexp>
<regexp>\@EADIR</regexp>
<regexp>\#recycle</regexp>
<regexp>-trailer</regexp>
<regexp>\BERRYBOOT</regexp>
<regexp>\berryboot</regexp>
<regexp>[!-._ \\/]sample[-._ \\/]</regexp>
</excludefromscan>
<excludefromlisting><!-- Regular expressions that if evaluated to true won't be displayed in Files View -->
<regexp>[-._ \\/]extrafanart|extrathumbs[-._ \\/]</regexp>
<regexp>\@eaDir</regexp>
<regexp>\@eadir</regexp>
<regexp>\BERRYBOOT</regexp>
<regexp>\berryboot</regexp>
<regexp>\@EADIR</regexp>
<regexp>\.DS_Store</regexp>
<regexp>-trailer</regexp>
<regexp>[!-._ \\/]sample[-._ \\/]</regexp>
<regexp>\#recycle</regexp>
</excludefromlisting>
</audio>
<videoextensions>
<remove>.vsmeta</remove>
</videoextensions>
<discstubextensions>
<remove>.vsmeta</remove>
</discstubextensions>
<pictureexcludes>
<regexp>\@eaDir</regexp>
<regexp>\@eadir</regexp>
<regexp>\@EADIR</regexp>
<regexp>\BERRYBOOT</regexp>
<regexp>\berryboot</regexp>
</pictureexcludes>
</advancedsettings>
Profil 'dcera' má podobné nastavení, ale jiný název pro databázi <name> a odlišnou cestu 'from' u konfiguračních souborů, samozřejmě podle vytvořeného účtu. Příklad:
Kód:
<substitute>
<from>special://masterprofile/profiles/dcera/sources.xml</from>
<to>smb://DS213P/kodi/anezka/sources.xml</to>
</substitute>