Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] countryCode parameter missing [204615881] #1

Closed
p2mgrup opened this issue Feb 3, 2022 · 9 comments
Closed

[BUG] countryCode parameter missing [204615881] #1

p2mgrup opened this issue Feb 3, 2022 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@p2mgrup
Copy link

p2mgrup commented Feb 3, 2022

Which tool
tidal-dl

Version
v2022.01.21.2

Platform
Windows

Bug description
In every album/track which i want to download based via your new ClientApi and yaronzz software is error CountryCode parameter missing :(

image

@p2mgrup p2mgrup added the bug Something isn't working label Feb 3, 2022
@nobodyexpectsahistorian
Copy link
Owner

Sadly I can't recreate the bug on my system. I could successfully download your track (it should be some polish(?) rap/Hip hop shouldn't it? :D)

However based on this comment, it could be that your are still using an old api key. Did you try to logout, select a working api key and then login again and reauthorize tidal-dl?
Note: You should select api key "1" which is labelled as "Master-Only(Else Error)". This is currently the only working api key that is supplied with tidal-dl as far as I know. You can ignore the "Master only" part, it will download hifi flacs, since this is what I try to solve with my changes.

@p2mgrup
Copy link
Author

p2mgrup commented Feb 3, 2022

Yes I choose the master ;) and right now this token is encrypted via base64 and now I can see that CountryCode is visible in this hash.

"countryCode": "US", "expiresAfter"

But right now i have different error ;)

[ERR] Download failed! Intuition (module 'ffmpeg' has no attribute 'input')

image

@nobodyexpectsahistorian
Copy link
Owner

Interesting observation regarding the country code. Maybe the us-part is why the api-keys get banned by tidal when they can see that a lot of people who have a non-us subscription suddenly start to login in via a supposedly us device?

Well anyways regarding your bug: At least you got a few steps further and the download itself should have worked. I had the same error when writing the fix. It seems that it occurs when the wrong ffmpeg module is installed. For me this comment helped. Alternatively you could create a python virtual environment and install the packages from requirements.txt, than the right ffmpeg module should be installed.

@p2mgrup
Copy link
Author

p2mgrup commented Feb 3, 2022

Next error ;)
[ipod @ 06a28e40] Could not find tag for codec flac in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --

@nobodyexpectsahistorian
Copy link
Owner

Oh no, more ffmpeg errors :/ Sadly I don't really have an idea what to do about these. My best guess from the error message is, that for whatever reason the downloaded file isn't a flac file.
You could try to comment out line 345 in TIDAL-PY/tidal_dl/util.py (aigpy.path.remove(srcPath)). Then the original file as downloaded from tidal shouldn't be removed and stay in the selected download directory, probably with an mp4 file extension. You could then try to open that file with e.g. vlc and see if it plays at all if so what codec vlc identifies...

@p2mgrup
Copy link
Author

p2mgrup commented Feb 3, 2022

Sorry I used the wrong file ;)
Problem now is fixed ;)

@nobodyexpectsahistorian
Copy link
Owner

Nice!
And yes, btw. it is right, that the originally downloaded file is a m4a (which contains flac audio), I was wrong that it should be a mp4.

@ScubaAlex-WPG
Copy link

If I try to download an mqa file, I get this error
image
If I try a non mqa, I get this other
image

@pqrenan
Copy link

pqrenan commented Feb 5, 2022

If I try to download an mqa file, I get this error image If I try a non mqa, I get this other image

Download ffmpeg.exe and put into your Python's Scripts directory (C:/Users/{yourusername}/appdata/local/programs/python/python310/scripts). Its working for me now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants