Fix tracks getting cutoff
This commit is contained in:
parent
e74dba6344
commit
08ece45ae9
|
@ -1,5 +1,8 @@
|
|||
# Changelog
|
||||
|
||||
## v0.6.4
|
||||
- Fixed upstream bug causing tracks to not download fully
|
||||
|
||||
## 0.6.3
|
||||
- Less stupid single format
|
||||
- Fixed error in json fetching
|
||||
|
|
|
@ -57,7 +57,7 @@ CONFIG_VALUES = {
|
|||
RETRY_ATTEMPTS: { 'default': '1', 'type': int, 'arg': '--retry-attemps' },
|
||||
BULK_WAIT_TIME: { 'default': '1', 'type': int, 'arg': '--bulk-wait-time' },
|
||||
OVERRIDE_AUTO_WAIT: { 'default': 'False', 'type': bool, 'arg': '--override-auto-wait' },
|
||||
CHUNK_SIZE: { 'default': '50000', 'type': int, 'arg': '--chunk-size' },
|
||||
CHUNK_SIZE: { 'default': '20000', 'type': int, 'arg': '--chunk-size' },
|
||||
DOWNLOAD_REAL_TIME: { 'default': 'False', 'type': bool, 'arg': '--download-real-time' },
|
||||
LANGUAGE: { 'default': 'en', 'type': str, 'arg': '--language' },
|
||||
PRINT_SPLASH: { 'default': 'False', 'type': bool, 'arg': '--print-splash' },
|
||||
|
|
|
@ -118,7 +118,7 @@ def download_episode(episode_id) -> None:
|
|||
unit_divisor=1024
|
||||
) as p_bar:
|
||||
prepare_download_loader.stop()
|
||||
for _ in range(int(total_size / Zotify.CONFIG.get_chunk_size()) + 1):
|
||||
for _ in range(int(total_size / Zotify.CONFIG.get_chunk_size()) + 2):
|
||||
data = stream.input_stream.stream().read(Zotify.CONFIG.get_chunk_size())
|
||||
p_bar.update(file.write(data))
|
||||
downloaded += len(data)
|
||||
|
|
|
@ -221,7 +221,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 / Zotify.CONFIG.get_chunk_size()) + 1):
|
||||
for _ in range(int(total_size / Zotify.CONFIG.get_chunk_size()) + 2):
|
||||
data = stream.input_stream.stream().read(Zotify.CONFIG.get_chunk_size())
|
||||
p_bar.update(file.write(data))
|
||||
downloaded += len(data)
|
||||
|
|
Loading…
Reference in New Issue