Results 41 to 47 of 47
-
2021-02-27, 04:32 #41
- Join Date
- Mar 2011
- Posts
- 158
-
2021-02-27, 10:21 #42
- Join Date
- Mar 2011
- Posts
- 158
so, confirmed, i have duplicates in temp_track_statistics. In library.db there is no additional musicbrainz track id, but another interesting value, which i'm now thinking about to use to tackle this duplicate issue. It's "filesize". musicbrainz_id and filesize shouldn't be duplicate that easy.... should work with several file formats.
BTW: my 3 hour run was interrupted with a watchtower (docker) refresh of the LMS container. :-) So Michael is very active.Last edited by mamema; 2021-02-27 at 10:37.
-
2021-02-27, 12:05 #43
I’m guessing file size might change when changing tagging ?
However, it’s certainly better than the current solution, as long as the logic only operates on tracks which can’t be joined using url you are probably fine. The corner case it would potentially loose data in would be if the user both changes tags and move/rename a file, assuming file size changes if you edit tags of course.Erland Isaksson (My homepage)
Developer of many plugins/applets
Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )
-
2021-02-27, 23:57 #44
- Join Date
- Mar 2011
- Posts
- 158
-
2021-03-02, 02:50 #45
- Join Date
- Mar 2011
- Posts
- 158
added the filesize to the dbcreate.sql
https://github.com/mamema/lms-tracks...e/dbcreate.sql
and to the query
https://github.com/mamema/lms-tracks...orage.pm#L1324
-
2021-03-02, 12:31 #46
Should work for testing purposes in an empty database but dbcreate.sql only runs if the table doesn’t exist so it won’t work in an existing installation that already have TrackStat installed. In a new plugin version you need to put this in a separate scrip that uses alter table to add the column. Compare with how urlmd5 column is added through the dbupgrade_urlmd5.sql script which is executed by the Perl code if the column doesn’t exist.
Looks like you have a linefeed and an extra c in the middle of the query.
Also shouldn’t the query check that file size is equal instead of not equal ? Thinking that you want to find entries with a non matching urlmd5 but which have the same musicbrainz id and same file size since this is likely a renamed/moved file. However, you need to verify it properly since you are the one that can run the code.Erland Isaksson (My homepage)
Developer of many plugins/applets
Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )
-
2021-03-03, 03:13 #47
- Join Date
- Mar 2011
- Posts
- 158
Hi Erland,
the linefeed and double c was a cut'n paste issue between VI and github. Corrected, thank you.
You're right, corrected the filesize query.