diff options
Diffstat (limited to 'zspotify-paths.patch')
-rw-r--r-- | zspotify-paths.patch | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/zspotify-paths.patch b/zspotify-paths.patch index c23786565622..57408c8ce1bb 100644 --- a/zspotify-paths.patch +++ b/zspotify-paths.patch @@ -95,6 +95,17 @@ @classmethod def get_all_genres(cls) -> bool: +--- a/zspotify/track.py ++++ b/zspotify/track.py +@@ -199,7 +199,7 @@ def download_track(mode: str, track_id: str, extra_keys=None, disable_progressba + unit_divisor=1024, + disable=disable_progressbar + ) as p_bar: +- for _ in range(int(total_size / ZSpotify.CONFIG.get_chunk_size()) + 1): ++ while stream.input_stream.stream().available() != 0: + data = stream.input_stream.stream().read(ZSpotify.CONFIG.get_chunk_size()) + p_bar.update(file.write(data)) + downloaded += len(data) --- a/zspotify/zspotify.py +++ b/zspotify/zspotify.py @@ -28,7 +28,9 @@ class ZSpotify: |