tomahawk-player / tomahawk

Tomahawk, the multi-source music player
http://tomahawk-player.org
GNU General Public License v3.0
2.97k stars 368 forks source link

Handle track naming deviations #386

Open theli-ua opened 8 years ago

theli-ua commented 8 years ago

Like: Tomahawk won't allow "Wendigo Pt. 1 (Quest For Fire)" to resolve "Wendigo, Part 1: Quest for Fire"

Also, things like "(Remastered)" "[Explicit]" greatly affect resolving as well

C3realGuy commented 8 years ago

There should be a smoother way to solve this. Some more things doing trouble:

Idea for local music: Maybe tomahawk should be less strict if there's a very similiar song name in the same album, it's very likely to be that missed one.

Some pseudo code:

if(songName not in localAlbumTracklist and localAlbumTracklistUnmatched.length > 0){
  for(unmatchedTrack in localAlbumTracklistUnmatched){
    # Find best matching track
    if(unmatchedTrack.startsWith(songName)){
      # could do the job for many tracks but we should check if there's more than one track being true for this
    }
    # Maybe use some regexes to remove common fails
  }
}

Next idea is to create a local database (i don't know if tomahawk already has something like that) in which files and tracks should be linked together. Example: /home/C3realGuy/Music/Artist- SomeFancyAlbum/01-Track-feat-some-people.mp3 => Artist | SomeFancyAlbum | 01 | Track Good thing would be that users could edit those references on their own, original file id3tags would be untouched and we don't need to find matching tracks again, which would result in some slightly better performance.