DJDoubleD / refreezer

An alternative Deezer music streaming & downloading client, based on Freezer.
GNU General Public License v3.0
276 stars 10 forks source link

[Bug] download a scratched track #34

Open losbe opened 1 month ago

losbe commented 1 month ago

🐞 Bug Report

Describe the bug

download this track :

https://deezer.com/track/82635668

and the audio sounds distorted i get the following error in media info

General compliance : Bitstream synchronisation is lost (frame 127+?, offset 0x6046E+0x4AD4C1

Also the spectrum is shown like this Screenshot_2024-10-21-08-01-49-010_r r refreezer Screenshot_2024-10-21-08-02-05-131_com andrewkhandr aspectpro

DJDoubleD commented 1 month ago

The track https://deezer.com/track/82635668 is actually unavailable (in any region) on Deezer. However, ReFreezer does an automatic fallback search in the backend based on the track's ISRC code, just in case the same track is available on e.g. a different album that can be accessed by the logged in account.

In this case the ISRC returned for the track with Deezer id 82635668 is ES5150357001, which seems correct according to the ifpi. However, this same ISRC is also assigned to the track https://deezer.com/track/3863667, which is not registered in the ifpi db, but other services like Apple Music etc. also have this ISRC for this track, so there seem to be 2 different tracks with the same ISRC.

This strange case causes the backend to serve ReFreezer a track with a different length to play than expected by the UI. But it is in fact track 3863667 being played. and cut off at 4:07 (length of track 82635668), while the played track is 4:47. This mismatch probably also messes up the download and causes the corrupt file.

Given that this example proves that ISRC lookup isn't guaranteed and normally Deezer already provides a FALLBACK (see explanation in #31), I'll probably just remove the fallback ISRC lookup.

In any case, no mater the technical fix, track https://deezer.com/track/82635668 has effectively been removed from Deezer (and all other platforms, it seems).