Clean library prompting to remove files from valid source
#1
I'm running Kodi via a shared MySQL DB. I recently moved all my media from old sources to a collective new source. and as part of that
1) I updated all paths within the database from smb://oldshare/oldfolder/... to smb://newshare/newfolder/...
2) i edited sources.xml to remove the old sources and add the new source as smb://newshare/newfolder/

For the most part, everything seems to have worked. All videos play, and when I updated it, it found some new video files I had placed there.

the problem is that when I run a Clean Library, it keeps listing the new smb://newshare/newfolder/ as an Unknown Source and prompting me to remove files from it (which will empty my library).

How can I get Clean Library to recognize this path as a valid source (even when Kodi continues to serve files from this source without issue) ?
Reply
#2
(2020-03-20, 08:08)Zxurian Wrote: 1) I updated all paths within the database from smb://oldshare/oldfolder/... to smb://newshare/newfolder/...
Which tables?
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
(2020-03-20, 08:08)Zxurian Wrote: the problem is that when I run a Clean Library, it keeps listing the new smb://newshare/newfolder/ as an Unknown Source

Then perhaps you missed a spot when hacking your database to the new paths?
Or maybe something went wrong all the same. Typos are made easily.

There is no database backup/dump from before you made the changes?
Reply
#4
(2020-03-20, 08:23)Karellen Wrote:
(2020-03-20, 08:08)Zxurian Wrote: 1) I updated all paths within the database from smb://oldshare/oldfolder/... to smb://newshare/newfolder/...
Which tables? 
txt:
path.strPath
movie.c22
episode.c18
art.url
tvshow.c16
files.strFilename
Reply
#5
(2020-03-20, 08:30)Klojum Wrote:
(2020-03-20, 08:08)Zxurian Wrote: the problem is that when I run a Clean Library, it keeps listing the new smb://newshare/newfolder/ as an Unknown Source

Then perhaps you missed a spot when hacking your database to the new paths?
Or maybe something went wrong all the same. Typos are made easily.

There is no database backup/dump from before you made the changes? 

I do have a backup pre-upgrade, so I can always start-over. My DB upgrade script is the following if you think there could be a typo. I'm certainly not immune. My issue is that if Kodi itself is okay scanning the new paths & sources, then why does it reference the same path as unknown?

sql:
UPDATE path SET strPath = REPLACE(strPath,'smb://oldshare1/oldfolder1', 'smb://newshare/newfolder');
UPDATE path SET strPath = REPLACE(strPath,'smb://oldshare2/oldfolder2', 'smb://newshare/newfolder');
UPDATE movie SET c22 = REPLACE(c22,'smb://oldshare1/oldfolder1', 'smb://newshare/newfolder');
UPDATE movie SET c22 = REPLACE(c22,'smb://oldshare2/oldfolder2', 'smb://newshare/newfolder');
UPDATE episode SET c18 = REPLACE(c18,'smb://oldshare1/oldfolder1', 'smb://newshare/newfolder');
UPDATE episode SET c18 = REPLACE(c18,'smb://oldshare2/oldfolder2', 'smb://newshare/newfolder');
UPDATE art SET url = REPLACE(url,'smb://oldshare1/oldfolder1', 'smb://newshare/newfolder');
UPDATE art SET url = REPLACE(url,'smb://oldshare2/oldfolder2', 'smb://newshare/newfolder');
UPDATE tvshow SET c16 = REPLACE(c16,'smb://oldshare1/oldfolder1', 'smb://newshare/newfolder');
UPDATE tvshow SET c16 = REPLACE(c16,'smb://oldshare2/oldfolder2', 'smb://newshare/newfolder');
UPDATE files SET strFilename = REPLACE(strFilename,'smb://oldshare1/oldfolder1', 'smb://newshare/newfolder');
UPDATE files SET strFilename = REPLACE(strFilename,'smb://oldshare2/oldfolder2', 'smb://newshare/newfolder');
Reply

Logout Mark Read Team Forum Stats Members Help
Clean library prompting to remove files from valid source0