Can someone of the experts please confirm that path substitution will work with Kodi? I can do what I want but it will not work with my system. I can see in kodi.log that the file advancedsettings.xml is read and the substitutions occur. But the system does not read the various db-files from the Database directory. The directories on P5-Home are public (no user name, no password). Why does Kodi not recognize the data bases?
Code:
<?xml version="1.0" encoding="UTF-8"?>
<advancedsettings>
<loglevel hide="false">3</loglevel>
<pathsubstitution>
<substitute>
<from>special://masterprofile/Thumbnails/</from>
<to>smb://P5-HOME/Kodi-userdata/Thumbnails/</to>
</substitute>
<substitute>
<from>special://masterprofile/Database/</from>
<to>smb://P5-HOME/Kodi-userdata/Database/</to>
</substitute>
<substitute>
<from>special://masterprofile/playlists/</from>
<to>smb://P5-HOME/Kodi-userdata/playlists/</to>
</substitute>
</pathsubstitution>
</advancedsettings>
Have you tried using P5-HOME's IP instead of its wins-name?
Concerning the database: consider switching that to an MySQL-database anyways, it's robust and fast and easier to maintain... (I assume you want to go that route because of having more than one client in your LAN).
Yes, problem occurs with IP also. One strange thing: I have renamed the local subdirectories (Database, playlists and Thumbnails) with an preceding underline. Normally, without pathsubstitution, Kodi generates these directories if they can't be found. But this is NOT the case! This is an indicator for me, that the substitution occurs. But the db files aren't read!? I guess that thumbnails can be read because the system has stored one (!) thumbnail of an addon program external.
As I understood I will need a SQL server for the MySQL data base. Unfortunately this is not possible with my Fritz-Box (DSL Router with NAS functionality).
Ok, welcome to the AVM-world
- ARE you going to have more than 1 client in your LAN?
- if so, considering pathsubstitution using an AVM-NAS won't make you happy - those routers are really nice (using them for more than a decade now), but the NAS will always be slow considering latency and bandwith, so not the way to go to serve even a handful of clients
- ever thought of purchasing a RPi or BananaPi or a Cubietruck for stuff like this?
- last thing: there's no need for
Code:
<?xml version="1.0" encoding="UTF-8"?>
as a header of the Kodi-XMLs - although I don't think they hurt
EDIT:
which FritzBox are you using? Does it also server your media?
Many thanks for your hints Fry!
Yes, I have 4 Helix clients RaspPi, Xios Media Play, Matrix Mini PC and Amazon FireTV but not at the same time. I have planned to put a common part of files/directories on an USB stick at FritzBox 7390 'cause the stick is 24/7 online and it's really unnecessary work to keep all local data bases up to date. Yes, my music collection is on a HDD connected to FritzBox and it runs satisfactorily.
However, I also tried the path substitution with a Windows 8.1 PC with the same annoying result. So now I'm in doubt that this substitution works, especially with the Database subfolder!? Could it be a bug?
No, not a bug.
The standard database used by Kodi is sqllite which is not server- but filebased.
So, each client would have to always connect to the db-tables on its own (read/write) in order to receive results of sql-statements hardcoded into Kodi - much more traffic.
In addition, sqllite is not meant to be multiuser-enabled, so breakage of the databases could occur if more than 1 client at a time were using them.
I would REALLY suggest you bought someting like a BananaPi or a Cubietruck and used one of those as a 24/7-miniserver instead of your 7390: they both don't need much power (about the same as the RPi) plus both come with a SATA-port and both have 1GB of RAM, so f.e. an NFS-server and a MySQL-server should work quite nice.
Path subs does not work with the SQL databases, by design. Most settings files can not be path subbed. Path substitution is a limited advanced feature that only works for some files.
Thanks to all for the help! I found out that substitution does work for me with the playlist subfolder only. I give up the idea with external folders or an external SQL data base because I think that even with SQL the thumbnails will NOT be integrated there and will be held locally. Unfortunately this was my original intention to have the thumbnails on a central place because it took me a lot of time to add artists thumbnails to my library where the artists were not found with the scraper! So I will continue to keep one device up to date and copy / update the folders Database, Thumbnails and playlists to the other devices (same Kodi version!).