miraclx / freyr-js

A tool for downloading songs from music streaming services like Spotify and Apple Music.
https://git.io/freyr-js
Apache License 2.0
1.52k stars 95 forks source link

DJ Sets / Freyr downloads "wrong" tracks #418

Open tobeehh opened 1 year ago

tobeehh commented 1 year ago

When downloading DJ sets, Freyr seems to download the "wrong" titles, meaning the "standalone" ones without the transitions. Especially in DJ Sets, this leads to rough transitions within the album. An example can be found here: https://music.apple.com/de/album/a-state-of-trance-1000-celebration-mix-mixed-by/1549277933

Is this expected behaviour due to freyr simply searching for title/artist or can this be fixed somehow?

miraclx commented 1 year ago

One possible solution is mentioned in https://github.com/miraclx/freyr-js/issues/406#issuecomment-1375863641

One potential approach is to search by ISRC on YouTube Music instead of the current implementation of searching for the title+artist(s) and filtering for best-match. Especially since the classification criteria doesn't include explicitness.

But observing the first track on the album you referenced - "A State of Trance 1000 - Celebration Mix (Intro - The Boy on His Bike) [Mixed]", its ISRC is NLF712100555 of which there are no matching results.

So, we can start off with an ISRC check for best-match, and falling back to textual search if that fails for the best results.