You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To check if a track exists, tersicore will check if an entry with the same path exists in the DB. But this is not enough, since we can have different files in different paths for the same track. IMO a good solution is to generate track UUID using an hash of toLowerCase(title) + toLowerCase(album) + toLowerCase(artist), rather than generating a random one. In this way the second file will have the same UUID as the first, and it will be merged in the first track as an additional resource.
The text was updated successfully, but these errors were encountered:
Problem description
Adding two files of the same track will generate two different track objects, each one with a different resource.
Steps to reproduce
For simplicity, just copy a track in a test folder and make a duplicate, for example
Then
1 - Set test folder in
teriscore.conf
2 - Run mediascanner with the new folder
3 - Start tersicore
Expected result
Tersicore should generate a single track object with two different resources
Actual result
Tersicore generate two different tracks
Possible solution
The problem is in this part of the code
tersicore/tersicore/mediascanner.py
Lines 32 to 38 in e496d64
To check if a track exists, tersicore will check if an entry with the same path exists in the DB. But this is not enough, since we can have different files in different paths for the same track. IMO a good solution is to generate track UUID using an hash of
toLowerCase(title) + toLowerCase(album) + toLowerCase(artist)
, rather than generating a random one. In this way the second file will have the same UUID as the first, and it will be merged in the first track as an additional resource.The text was updated successfully, but these errors were encountered: