2018-11-13, 11:49
Distinctly odd then !!
For a query of
I get a result of
And for
I get
Those are the same type of queries the addon should be forming. Now, I know for a fact that some of those nfs paths are no longer valid as they relate to 'sdb1' which gave up the ghost a while ago. Indeed, extending the query to just that path reveals 231 entries that are actually defunct and need to be removed. I'll run the addon against the db later when I get back home and see what happens.
Oh, just to be clear, the way the addon should be working is to run the select query to show the paths to be deleted and then run the same query but using 'DELETE FROM files' WHERE idPath in..... That should remove the entries from the files table, and then Kodi's own internal clean library routine should remove all the associated stuff from the other tables.
NOTE - DO NOT run one of the above commands with the delete statement substituted for select, otherwise you WILL delete stuff from your db !! The addon is more selective in that it works by selecting paths that DON'T match it's criteria. E.G.
For a query of
Code:
SELECT strPath FROM path WHERE idPath IN (SELECT idPath FROM path WHERE (strPath LIKE 'smb://%' ));
Code:
519 rows in set (0.02 sec)
And for
Code:
mysql> SELECT strPath FROM path WHERE idPath IN (SELECT idPath FROM path WHERE (strPath LIKE 'nfs://%' ));
I get
Code:
1413 rows in set (0.06 sec)
Those are the same type of queries the addon should be forming. Now, I know for a fact that some of those nfs paths are no longer valid as they relate to 'sdb1' which gave up the ghost a while ago. Indeed, extending the query to just that path reveals 231 entries that are actually defunct and need to be removed. I'll run the addon against the db later when I get back home and see what happens.
Oh, just to be clear, the way the addon should be working is to run the select query to show the paths to be deleted and then run the same query but using 'DELETE FROM files' WHERE idPath in..... That should remove the entries from the files table, and then Kodi's own internal clean library routine should remove all the associated stuff from the other tables.
NOTE - DO NOT run one of the above commands with the delete statement substituted for select, otherwise you WILL delete stuff from your db !! The addon is more selective in that it works by selecting paths that DON'T match it's criteria. E.G.
WHERE strPath NOT LIKE 'nfs://%' AND strPath NOT like 'smb://someserver/%'
The idea being that if we exclude everything we think should be there, then everything else is safe to remove.