Solved Wiki wrong
#1
Hi,
Not sure where this should be posted so I apologize if this is the wrong place.

I am in the midst of moving to a new NAS and have been following the instructions on the wiki.
https://kodi.wiki/view/HOW-TO:Update_SQL...eo_library

For the Textures*.db file, it gives the command to update the URL,
sql:
UPDATE path SET url = REPLACE(url,'smb://my_nas/old_share', 'smb://my_nas/new_share');

but that doesn't change the actual texture address.
Running this command 
sql:
UPDATE path SET url = REPLACE(url,'nfs://192.168.1.110/export/Media', 'nfs://192.168.1.107/export/Media2');
results in this.
Image

executing another command seems to clear it up.
sql:
UPDATE path SET texture = REPLACE(url,'nfs://192.168.1.110/export/Media', 'nfs://192.168.1.107/export/Media2');

So did I do something wrong to start with, or has something changed since the Wiki was authored?
Reply
#2
Thread moved to wiki section
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#3
(2021-05-03, 15:17)akovia Wrote: executing another command seems to clear it up.

url and texture are two different fields in the path table.
You will need to adapt both fields separately in the table's records.

To be on the safe side, I would do it this way and add the extra forward slash to not have any confusion:
sql:
UPDATE
path
SET
url = REPLACE(url,'nfs://192.168.1.110/export/Media/', 'nfs://192.168.1.107/export/Media2/'),
texture = REPLACE(texture,'nfs://192.168.1.110/export/Media/', 'nfs://192.168.1.107/export/Media2/');
Reply
#4
(2021-05-03, 16:12)Klojum Wrote:
(2021-05-03, 15:17)akovia Wrote:  
To be on the safe side, I would do it this way and add the extra forward slash to not have any confusion:

Thanks Klojum,
I double checked and in my case at least I didn't need the trailing forward slash. I just wanted to confirm that the extra table-edit/step was needed since it wasn't listed in the wiki.

I'd update the wiki myself if I was certain about the edit, but I'll leave that to better suited people.

Cheers!
Reply
#5
Both the SQL and MySQL pages on the subject are probably outdated. I'll see if I can squeeze in a few minutes for a wiki update.
The extra '/' is only a safety measure, as media and media2 are very much alike.
Reply
#6
Sounds great.

Just wondered if there is a central page about moving source files. I just had another little surprise since I use lots of custom playlists and had to change my paths there as well.

Might be worth adding a snippet about that and maybe any other places you might have to edit old paths with new ones.

Thanks again!
Reply
#7
Depending on the Kodi client devices you have, you could have all the playlists on the NAS, and point your Kodi clients to that NAS location via path substitution. The same goes for the cached thumbnails.

For example:
xml:
<pathsubstitution>
<substitute>
<from>special://videoplaylists</from>
<to>/mnt/srvr/PLAYLISTS/video</to>
</substitute>
<substitute>
<from>special://masterprofile/Thumbnails/</from>
<to>/mnt/srvr/THUMBNAILS/</to>
</substitute>
</pathsubstitution>

(2021-05-03, 18:22)akovia Wrote: Just wondered if there is a central page about moving source files.

Two separate pages were made in the past, in case there would be differences in the SQLite and MySQL setups. Combining them could be a good idea perhaps.
Reply
#8
(2021-05-03, 19:01)Klojum Wrote: Depending on the Kodi client devices you have, you could have all the playlists on the NAS, and point your Kodi clients to that NAS location via path substitution. The same goes for the cached thumbnails.

That is very interesting. I'm using a Shield device.

I wish I would have known that earlier as I filled up the internal storage on the Shield and had to buy a USB stick and move the Shield storage over to it.
That is something to consider in the future as it was certainly Kodi that filled up the storage. I could move back to the internal storage which is always better/faster.

Thanks!
Reply
#9
Umm... The Shield may not be the most practical device for setting up path subs, but maybe you can still use a SMB source for it. (I use NFS by default, so my Shield gets left behind there).

The wiki page has been updated.
Reply
#10
Thanks!
Reply
#11
Thread marked solved.
Reply

Logout Mark Read Team Forum Stats Members Help
Wiki wrong0