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] Broken sources. #31

Closed Multisquid2k3 closed 1 month ago

Multisquid2k3 commented 1 month ago

Since Freezer has the ability to listen to tracks that are not available in my country, Refreezer has the same feature, but it's somehow broken, for example I use this track from an album that is not available in my country: https://www.deezer.com/en/track/352059471, and when I listen on my phone, the track is different on my phone than on my pc. https://github.com/user-attachments/assets/cac66993-b282-45f2-941e-b7e0bd6711a6 (phone using my personal free account) https://github.com/user-attachments/assets/cba23f82-5408-419a-9334-7c12472bec70 (freezer/saturn PC using the same account)

The thing is, this does not happen, when I use a premium account.

(Context: the song Akcent "Dragoste de închiriat" is in Romanian, but it has another version called "Kylie", in English, which Refreezer is using the wrong one)

DJDoubleD commented 1 month ago

The track you are trying to play, is officially only available in the following countries:

"available_countries": [
        "AM",
        "AZ",
        "BY",
        "EE",
        "KG",
        "KZ",
        "LT",
        "LV",
        "MD",
        "RU",
        "TJ",
        "TM",
        "UA",
        "UZ"
    ]

When you try to access a track that isn't available in the region of your logged in account, the Deezer API also returns a FALLBACK track, if one is available in your account region. Normally, this FALLBACK track is the same track, but just has a different ID (e.g. same track from a different album that IS available in the given region). In your case, Deezer's API returns the English version of the track as FALLBACK.

The original Freezer apps did not check for the presence of a FALLBACK track and would just try to get the original one anyway. Through some old "bug" in 1 of Deezer's back-ends, a MP3 128kbps version of that actual track could still be played/downloaded, even though it shouldn't be available for the logged in account.

In ReFreezer, I deliberately chose to implement the same thing Deezer themselves seem to do: use the FALLBACK if one is provided, to ensure the highest quality track available. This is a change I will not be reverting as it would lead to some tracks being streamed/downloaded in the lowest quality instead of the highest available. The problem here is that, unfortunately, Deezer catalogued the English version of the track as the FALLBACK for the Romanian version (even though it isn't available in Romania?).

I tried to play the track 352059471 with a premium account from 1 of the countries in the list where it is available and in that case, the Deezer API did return the Romanian version in highest quality, with no FALLBACK track in the API results. So the app behaves as expected.

I do wonder: did you find multiple tracks like this? I would be interested in getting a list to explore this more in detail and if this is a common phenomenon, I'll thing about possible solutions, but at this point, I don't see how this can be helped as I do have examples where not using the FALLBACK will lead to the exact same track being played/downloaded in the lowest quality, while a higher quality source is available.

Multisquid2k3 commented 1 month ago

Yes, I have many of them

DJDoubleD commented 1 month ago

Yes, I have many of them

@Multisquid2k3 Like I said, could you please add the direct links to a list of examples so I have more than 1 reference point to test?

You also said:

The thing is, this does not happen, when I use a premium account.

Just to be sure, what did you mean by that? What does happens when you use a premium account? (And from which country? A country where the original track is available or unavailable?)

Multisquid2k3 commented 1 month ago

I was trying to edit my last comment, Great explanation of what's going on in the back, yes I have examples of tracks that use fallback with the wrong tracks: 71981897- when I put in the favorites playlist it uses another version with this 100621180 msedge_doQJbCno2C 4619793 - 70170478 (wrong one) msedge_8DB6TLeWJu Also the FALLBACK doesn't apply on Refreezer in my free account on songs that are greyed out: msedge_kX6JwgvaJo

Never mind, it doesn't work on a premium account from US.

Multisquid2k3 commented 1 month ago

Ok, I closed this because i'm confused, sorry for all this.