Is there a simple way to change IP address un the library?

Hello dear people
for some reasons I had to change my static IPs to dynamic.
So all my libraries can’t acsess to my folders on my NASs.
Is there a quick way to change those new address in the path?
(192.168.0.136 to 192.168.0.136)

While using dynamic IPs normally should still allow the fixed IP address assignment from the DHCP server.

Will be tough to change identical IP’s

But if you really need to change your scraped IPs

If you would like to use a MySQL database for several Kodi clients that use different methods to access the shared media (e.g. a mix of SMB, NFS and/or system mount based access), or have need of modifying a path of an existing source (such as converting from a Kodi path to a system mount) you can use the path substitution function of Kodi to facilitate this. The following guide will provide instruction on how this works, including a section specific to MySQL usage and how your sources should be configured.

Please see [HowTo] Repairing File Paths with Path Substitution for details.

Thanks a lot fzinken.

:upside_down_face:
Sorry a bit tired.
I meant (192.168.0.136 to 192.168.0.187)

Sorry again.

Will this advancedsettings OK:

<?xml version="1.0" encoding="utf-8"?>
<advancedsettings version="1.0">
	<videolibrary>
		<recentlyaddeditems>69</recentlyaddeditems>
	</videolibrary>
 <pathsubstitution>
  <substitute>
    <from>smb://192.168.0.245/</from>
    <to> smb://192.168.0.187/</to>
  </substitute>
  <substitute>
    <from>smb://192.168.0.041/</from>
    <to> smb://192.168.0.169/</to>
  </substitute>
 </pathsubstitution>
</advancedsettings>

Nope.
This setting do not work.

Whatever I try it does not work.
Please can you help?

You seemed to have copied a typo from my guide (how it has gone unseen all this time I have no clue) and would need to remove that space you have between <to> and smb. The IP address you said you wanted to change isn’t the same in that advancedsettings.xml though. I would think it should look like this…

<?xml version="1.0" encoding="utf-8"?>
<advancedsettings version="1.0">
	<videolibrary>
		<recentlyaddeditems>69</recentlyaddeditems>
	</videolibrary>
	<pathsubstitution>
		<substitute>
			<from>smb://192.168.0.136/</from>
			<to>smb://192.168.0.187/</to>
		</substitute>
	</pathsubstitution>
</advancedsettings>

If that and a reboot doesn’t do it please post logs to provide additional insight.

Thanks. Fixed for the 1st redirection
But I have 2:

<?xml version="1.0" encoding="utf-8"?>
<advancedsettings version="1.0">
	<videolibrary>
		<recentlyaddeditems>69</recentlyaddeditems>
	</videolibrary>
<pathsubstitution>
  <substitute>
    <from>smb://192.168.0.245/</from>
    <to>smb://192.168.0.187/</to>
  </substitute>
  <substitute>
    <from>smb://192.168.0.041/</from>
    <to>smb://192.168.0.169/</to>
  </substitute>
</pathsubstitution>
</advancedsettings>

and this one doesn’t work:

  <substitute>
    <from>smb://192.168.0.041/</from>
    <to>smb://192.168.0.169/</to>
  </substitute>

What should be the right syntax?

EDIT: tried this too:

<?xml version="1.0" encoding="utf-8"?>
<advancedsettings version="1.0">
	<videolibrary>
		<recentlyaddeditems>69</recentlyaddeditems>
	</videolibrary>
<pathsubstitution>
  <substitute>
    <from>smb://192.168.0.245/</from>
    <to>smb://192.168.0.187/</to>
    <from>smb://192.168.0.041/</from>
    <to>smb://192.168.0.169/</to>
  </substitute>
</pathsubstitution>
</advancedsettings>

but no redirection.

You had the syntax correct the first time but I’m confused by the fact that you said…

but your again in your last post not putting those numbers as substitution pairs. The “from” part needs to have the IP address of the old location as found in your library and the “to” part needs to have the exact same amount of the path but with the new IP address subbed in. What is the old and new addresses for the second file path?

should be .41

1 Like

MY typo! :roll_eyes:
Sorry for being so stupid.
Thanks for all folks.

Hmm…this trick is a bit dangerous.
The media library having preserved the old path which no longer exists, if we clean it we get the warning that the volumes have disappeared.
So it would be better to avoid this tip.

No, it’s not. It is not a “trick” as it is a supported function of Kodi and the same method Kodi uses to insert credentials into SMB paths. It is also not “dangerous” as it lacks the ability to cause any harm since it makes no permanent changes and is completely reversible by simply removing the substitution lines that were added. Your confusing the risk of cleaning your library with something else.

If you see that message it means that you have a file path in your library with scraped content that is not currently valid. If you successfully path subbed ALL file paths in your library then you would have not seen this message as you would no longer have any broken file paths. Additionally, this message gave you the option of not bulk deleting the library content on this file path giving you an off-ramp before making changes to your database. This doesn’t seem all that risky to me.

So in your opinion it would be better that every time someone finds themselves in a situation where their file paths moved they should dump their library and start over again? The risk you alluding to is entirely that someone could do a bad job at using path substitution and wind up in a situation where they delete it using the clean library function. Even if that was the case the entirety of the “harm” is the (for most people) couple minutes spent editing the advancedsettings.xml file.

The fact is that the alternative is removing existing sources, cleaning up anything left behind in the library, making and configuring new sources, and then re-scraping their library. For someone who knows what their doing this process could take many hours and for more complicated setups can be a fair bit of work. There can also be watched status, customizations, or other considerations involved as well. To suggest that this is a less problematic approach than adding a couple lines in a single file that you can just keep editing with zero risk till you get it right is absurd.

I admit I have a lot of difficulty understanding.
The important thing is that my Vero is operational again.
In any case, thank you for the support and explanations.
Have a nice day.