-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Timeout for httpx. #36
Comments
Hi. Thank you for your advice. I can implement this. But can you re-open this issue on the audible-cli repo? Thank you very much! |
Sure, np. I really like what you've done. P.S. I wrote my own aaxc decryp that doesn't use ffmpeg if you want. |
Decrypting aaxc without ffmpeg sounds really fantastic. Not everyone has a patched ffmpeg bin with aaxc patch applied. Have you realized that in pure Python. I would be very greatful if you send me your code. P.S.: If you don’t want to make it public, you can send me a pn to [email protected]!!! |
I've got a working version in Java, I think I wrote a proof of concept in Python first but I'm having trouble finding it. Give me a few days to rewrite it in Python. aax[c]? is at the file structure level mp4, you can feed it through any mp4 parser. The only difference is they change some tag names, encrypted the samples and put in some extra padding in the sample section. Crypto wise, it's decent, they've done everything right (including leaving themselves space to completely rework how the crypto is done). As to the complexity of the code, it's pretty simple. More code is spent doing tag renaming then anything else. I wouldn't release my code but ffmpeg and yourself have let the cat out of the bag so... it's moot now. |
You are welcome to use this as you see fit as long as it isn't used for commercial use or violating the rights of others. It doesn't meet Python naming conventions (I can't be bothered) and you are welcome to clean it up. You should have seen the Java code I translated this from. It's super ugly. I had a lot of fun writing both this and that. How it works: Wait... what? Doesn't Audible add all this extra stuff to the file? If you want to learn more about the mp4 format I recommend getting Bento4, it's a really easy mp4 toolkit that isn't the mess that ffmpeg is. But I digress. Don't you need to jump around the file from the sample tables into the mdat section to perform decryption? How is it that you don't have a sample table or file seeking? Areas for Improvement
Limitations
|
That’s really fantastic. Thank you for your hard work! Very clever! I will try it out as fast as possible and will report here. P.S.: I‘m a single developer without any company in the background. I don’t want to make money with my projects, I only want to fill my sparetime. And writing code is my hobby. |
@BlindWanderer |
This issue has not been updated for a while and will be closed soon. |
This issue has automatically been closed due to no activities. |
Describe the bug
When fetching the library (calling aget_from_api in models.py::Library), if the library is very large (or transfer is slow), the underlying httpx call can timeout,
Workaround
Replace:
resp = await api_client.get("library", params=request_params)
With:
resp = await api_client.get("library", params=request_params, timeout=None)
Suggested Solution
Expose a timeout parameter in aget_from_api.
This makes the problem the consumer of the library and avoids the infinite timeout employed by the workaround.
The text was updated successfully, but these errors were encountered: