Home of the Squeezebox™ & Transporter® network music players.
Page 5 of 5 FirstFirst ... 345
Results 41 to 47 of 47
  1. #41
    Senior Member
    Join Date
    Mar 2011
    Posts
    158
    Quote Originally Posted by erland View Post
    I wonder if musicbrainz_releasetrackid is unique ?
    I donít remember which tag LMS writes to the tracks table but that should be easy for you to see by looking at the tracks table for this music file.
    yes will do, also with tracks which have several release version.
    At the moment my whole library got scanned with index on the trackstat temp table. Will see if this helps.
    Report here my findings

  2. #42
    Senior Member
    Join Date
    Mar 2011
    Posts
    158
    Quote Originally Posted by mamema View Post
    yes will do, also with tracks which have several release version.
    At the moment my whole library got scanned with index on the trackstat temp table. Will see if this helps.
    Report here my findings
    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.

  3. #43
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,285
    Quote Originally Posted by mamema View Post
    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.
    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 )

  4. #44
    Senior Member
    Join Date
    Mar 2011
    Posts
    158
    Quote Originally Posted by erland View Post
    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.
    yes, file size changes, so the whole file is different. Which at the end could always be the case it someone tags files. Even i i would introduce a special hash value for trackstat.
    Last edited by mamema; 2021-02-28 at 00:23.

  5. #45
    Senior Member
    Join Date
    Mar 2011
    Posts
    158
    Quote Originally Posted by mamema View Post
    yes, file size changes, so the whole file is different. Which at the end could always be the case it someone tags files. Even i i would introduce a special hash value for trackstat.
    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

  6. #46
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,285
    Quote Originally Posted by mamema View Post
    added the filesize to the dbcreate.sql
    https://github.com/mamema/lms-tracks...e/dbcreate.sql
    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.

    Quote Originally Posted by mamema View Post
    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 )

  7. #47
    Senior Member
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •