mirror of
https://github.com/kokarare1212/librespot-python.git
synced 2026-04-25 08:35:49 +03:00
[GH-ISSUE #101] Retrieve the whole file instead of chunks #10
Labels
No labels
bug
dependencies
duplicate
enhancement
invalid
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot-python-kokarare1212#10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @staniel359 on GitHub (Dec 21, 2021).
Original GitHub issue: https://github.com/kokarare1212/librespot-python/issues/101
Hello.
I've noticed that
stream.input_stream.stream().read()command retrieves audio file by chunks, one by one, which takes time.Is there a reason why it doesn't download the whole file?
@kokarare1212 commented on GitHub (Dec 21, 2021):
It has already been implemented.
You can now get all streams by entering a number less than or equal to 0 in the read argument.
Please refer to the following code.
github.com/kokarare1212/librespot-python@447c4f4116/librespot/audio/init.py#L150-L198@staniel359 commented on GitHub (Dec 22, 2021):
@kokarare1212 I tried entering
0, but seems like it is already a default value.What I see is this:

43 chunks are processed one by one.
Is it possible to process the whole file at once?
@kokarare1212 commented on GitHub (Dec 22, 2021):
I'm sure it's technically possible but I don't think this is realistic because it will be slow to retry when network or other errors occur.
The upstream librespot-java also uses the current method.
@staniel359 commented on GitHub (Dec 22, 2021):
@kokarare1212 I see, thanks.
else/elifwhenifblock has acontinuestatement #72else/elifwhenifblock has acontinuestatement #73