Skip to content

Commit

Permalink
#704 Try to get rid of duplicate tracks if only the case of the file …
Browse files Browse the repository at this point in the history
…name changes.

URL comparisons on the tracks table are case insensitive. Therefore we must make those checks against `scanned_files` case insensitive, too. Otherwise files renamed from ABC.mp3 to abc.mp3 would be discovered as new instead of modified only.

I change a schema file without adding a new one, as I don't want everybody to have to fully rescan the library for this corner case. Users who care about the change can always delete the library.db to start over from scratch and get the latest schema.
  • Loading branch information
mherger committed Jan 31, 2022
1 parent 949a06d commit dfa56a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SQL/SQLite/schema_11_up.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

DROP TABLE IF EXISTS scanned_files;
CREATE TABLE scanned_files (
url text NOT NULL,
url text NOT NULL COLLATE NOCASE, -- URL must be case insensitive, or we might duplicate tracks if the filename changes case only (https://github.com/Logitech/slimserver/issues/705#issuecomment-1026229542)
timestamp int(10),
filesize int(10)
);
Expand Down

0 comments on commit dfa56a7

Please sign in to comment.