Bug 15924 - scanned_files table is not emptied of records when library mounted at different mount point
: scanned_files table is not emptied of records when library mounted at differe...
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.5.0
: All All
: P1 major (vote)
: 7.6.0
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-19 06:02 UTC by Alan Young
Modified: 2011-05-11 13:28 UTC (History)
1 user (show)

See Also:
Category: Bug


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Young 2010-03-19 06:02:40 UTC
Embedded

If a library is mounted with a different path prefix than last time (/media/sda1 vs. /media/sdb1, for example), and therefore with a different 'audiodir' preference value, then the code to delete rows from the scanned_files table at the start of a scan (in Slim::Utils::Scanner::Local::find()) will not clear out the old records. The resulting library DB will have duplicate entries which can only be removed by a rescan.

This points out the issue of using absolute file URLs in the DB. At least for some reasons, audiodir-relative URLs might be preferable.
Comment 1 Andy Grundman 2010-03-19 06:35:14 UTC
I'll fix it so a wipe & rescan wipes the scanned_files table, I think that's the best we can do now.
Comment 2 Andy Grundman 2011-04-07 10:58:33 UTC
scanned_files gets wiped now.
Comment 3 Paul Chandler 2011-05-11 13:28:36 UTC
WOrking correctly on either 'erase & re-scan' or 'scan for new' after changing the music folder /drive /path