Kodi Community Forum

Full Version: Pathsubstitution doesn't work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
The problem in your case is nfs and changes done recently how nfs is handled in Kodi. If you have the possibility to mount the network path that contains your shared files before starting Kodi and to put the full path to your shared sources into advancedsettings.xml, that should do the trick.
(2018-10-11, 10:38)HeresJohnny Wrote: [ -> ]
(2018-10-11, 10:11)Martijn Wrote: [ -> ]Pathsubstition of sources is not recommended and will not be fixed.

That is the first I hear of it. Is that your personal opinion or the official statement for Team Kodi?

Then you should discourage all users from using MySQL and update the Wiki accordingly
here https://kodi.wiki/view/MySQL/Sync_other_parts_of_Kodi
and here https://kodi.wiki/view/MySQL/Setting_up_Kodi

MySQL support doesn't depend on path substitution. Path substitution has been proposed for people that want to use MySQL but can't or won't rescrape their library with the correct network accessible paths.
Thanks for these pointers. I would certainly prefer to use network paths instead of pathsubstitution. However, I seem to remember having read that the problem is that Kodi uses relative paths for its configuraiton files. Maybe someone could lend me a hand and point me to some examples that would help me?
I just realized there's been a whole lot of exchange since I last wrote. I would politely ask @drpizznock to be less emotional and not antagonize the people who are able to change something in Kodi, however you may feel about them personally.
@HeresJohnny could you please disable the NFS adoon you have installed and report back whether this fixes your problem? Kodi should use internal NFS, then.

That one: 10:07:03.118 T:5372  NOTICE: ADDON: vfs.nfs v1.0.1 installed
1. Case 1
No NFS addon
No local sources.xml
and this in advancedsettings.xml

Code:
<pathsubstitution>
<substitute>
<from>special://profile/sources.xml</from>
<to>nfs://192.168.1.185/TV-Movie2/Software/Kodi/sources_nfs.xml</to>
</substitute>
<substitute>
<from>special://profile/favourites.xml</from>
<to>nfs://192.168.1.185/TV-Movie2/Software/Kodi/favourites.xml</to>
</substitute>
</pathsubstitution>
Kodi crashes instantly, never starts.

2. Case 2
No NFS addon
No local sources.xml
and this in advancedsettings.xml

Code:
<pathsubstitution>
<substitute>
<from>special://profile/sources.xml</from>
<to>nfs://192.168.1.185/TV-Movie2/Software/Kodi/sources_nfs.xml</to>
<from>special://profile/favourites.xml</from>
<to>nfs://192.168.1.185/TV-Movie2/Software/Kodi/favourites.xml</to>
</substitute>
</pathsubstitution>
Kodi starts but no sources are added. (probably only looks for local sources because of invalid syntax?).

Other cases
a) No difference in the above behaviour when NFS addon is enabled.
b) No difference in the above behaviour when local sources.xml is present AND NFS addon is enabled.

CONCLUSIONSad?)

Pathsubstituion for sources.xml (via NFS at least) must not be enabled at the moment.
I've also tried this on CoreElec with Kodi codebase 2018-10-04 with the same result. As soon as I correct the syntax for pathsubstitution as has been pointed out, Kodi crashes. At least this let me discover the awesome feature that is Kodi safe mode...
(2018-10-12, 00:05)HeresJohnny Wrote: [ -> ]CONCLUSIONSad?)

Pathsubstituion for sources.xml (via NFS at least) must not be enabled at the moment.
 Path substitution for sources is broken and will not be fixed.
(2018-10-11, 20:31)DarrenHill Wrote: [ -> ]Sources substitution can cause problems and cannot easily be fixed without a total rework that isn't worth the investment of the limited dev time, even if anyone was actually interested in doing it.
Sources substitution doesn't work because the Media Source Settings are loaded before the Path Substitutions are loaded from AdvancedSettings.xml.

Even with my limited programming knowledge I've got Sources Substitution working.

If any of the developers are interested then I could raise a PR, but if it is just going to be rejected then it wouldn't be worth the effort.
(2019-04-20, 19:56)linknet Wrote: [ -> ]If any of the developers are interested then I could raise a PR, but if it is just going to be rejected then it wouldn't be worth the effort.

If the changes/fixes are that relatively simple, then by all means, do raise a PR. Smile
i have no idea why we would reject such a PR for no reason. Plenty of people are still using path substitution.
@Klojum 

OK, I've raised a pull request here: https://github.com/xbmc/xbmc/pull/15947 which fixes the sources path substitution  Smile
Yes, thank you, we already noticed. Smile

When all things work out, I can remove all wiki references to it "not working" again.. Rolleyes Rofl
Hi,

Great news if path substitution is fixed; i miss it since Kodi 18 !

When will it be available ? Kodi 18.2 ? Kodi 19 ? 

Thanks Smile
(2019-04-22, 08:32)nonob Wrote: [ -> ]When will it be available ? Kodi 18.2 ? Kodi 19 ? 

First it needs to be accepted by Team Kodi devs, and so far not everyone is happy as per the last Github reply.
(2019-04-22, 08:32)nonob Wrote: [ -> ]When will it be available ? Kodi 18.2 ? Kodi 19 ? 
 

My version of the sources path substitution fix inspired ksooo to find a better solution. 

So ksooo's fix should be in Kodi 18.3  Smile

@Klojum  Is it too early to update the documentation ?
Pages: 1 2 3 4 5