(2023-01-15, 22:59)larsete Wrote: Hi guys!
I have a couple orphaned entries like:
Code:
2023-01-15 21:51:23.009 T:21600 WARNING <general>: MUSIC_INFO::CMusicInfoScanner:: Process directory 'smb://NAS/Multimedia/movie1/' does not exist - skipping scan.
2023-01-15 21:51:23.009 T:21600 WARNING <general>: MUSIC_INFO::CMusicInfoScanner:: Process directory 'smb://NAS/Multimedia/movie2/' does not exist - skipping scan.
But I couldn't clean the Database, even using "Deep Clean" and selecting the source containing those entries. How can I find and clean orphaned files like that with the cleaner?
Thank you in advance!
I used to use the following SQL query to clean up obsolete entries from my Kodi's db located externally in MariaDB on NAS:
DELETE FROM files WHERE idfile not in (select idfile from episode) and idfile not in (select idfile from movie) and idfile not in (select idfile from musicvideo) ORDER BY `idFile` DESC;
Before running this query check what will be targeted launching that query:
SELECT * FROM files WHERE idfile not in (select idfile from episode) and idfile not in (select idfile from movie) and idfile not in (select idfile from musicvideo) ORDER BY `idFile` DESC;
but... today I have discovered hundreds of obsolete entries in
path table - this table contain all your movies and TV shows folders names and file names including those that are deleted either manually from your library or using Kodi's Clean Library mechanism...
I don't know what Video Database Cleaner add-on do but it do nothing with these obsoletes in
path table.
So far I have built the following query to find what obsoletes I can delete from my folder containing TV Shows:
SELECT * FROM path WHERE idpath not in (select idpath from files) and idpath not IN (SELECT idpath FROM tvshowlinkpath) AND strPath LIKE 'nfs://MyIP/volume1/MyNAS/3_TVShows/%' ORDER BY `strPath` asc;
(number of rows returned: 853)
but still it return around 5% "false" positive entries...
I will continue investigation if it would be safe to delete these entries that are return from that query.