mirror of
https://zotify.xyz/zotify/zotify.git
synced 2024-11-10 01:02:06 +01:00
Fix tracks getting cutoff
This commit is contained in:
parent
e74dba6344
commit
08ece45ae9
4 changed files with 6 additions and 3 deletions
|
@ -1,5 +1,8 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v0.6.4
|
||||||
|
- Fixed upstream bug causing tracks to not download fully
|
||||||
|
|
||||||
## 0.6.3
|
## 0.6.3
|
||||||
- Less stupid single format
|
- Less stupid single format
|
||||||
- Fixed error in json fetching
|
- Fixed error in json fetching
|
||||||
|
|
|
@ -57,7 +57,7 @@ CONFIG_VALUES = {
|
||||||
RETRY_ATTEMPTS: { 'default': '1', 'type': int, 'arg': '--retry-attemps' },
|
RETRY_ATTEMPTS: { 'default': '1', 'type': int, 'arg': '--retry-attemps' },
|
||||||
BULK_WAIT_TIME: { 'default': '1', 'type': int, 'arg': '--bulk-wait-time' },
|
BULK_WAIT_TIME: { 'default': '1', 'type': int, 'arg': '--bulk-wait-time' },
|
||||||
OVERRIDE_AUTO_WAIT: { 'default': 'False', 'type': bool, 'arg': '--override-auto-wait' },
|
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' },
|
DOWNLOAD_REAL_TIME: { 'default': 'False', 'type': bool, 'arg': '--download-real-time' },
|
||||||
LANGUAGE: { 'default': 'en', 'type': str, 'arg': '--language' },
|
LANGUAGE: { 'default': 'en', 'type': str, 'arg': '--language' },
|
||||||
PRINT_SPLASH: { 'default': 'False', 'type': bool, 'arg': '--print-splash' },
|
PRINT_SPLASH: { 'default': 'False', 'type': bool, 'arg': '--print-splash' },
|
||||||
|
|
|
@ -118,7 +118,7 @@ def download_episode(episode_id) -> None:
|
||||||
unit_divisor=1024
|
unit_divisor=1024
|
||||||
) as p_bar:
|
) as p_bar:
|
||||||
prepare_download_loader.stop()
|
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())
|
data = stream.input_stream.stream().read(Zotify.CONFIG.get_chunk_size())
|
||||||
p_bar.update(file.write(data))
|
p_bar.update(file.write(data))
|
||||||
downloaded += len(data)
|
downloaded += len(data)
|
||||||
|
|
|
@ -221,7 +221,7 @@ def download_track(mode: str, track_id: str, extra_keys=None, disable_progressba
|
||||||
unit_divisor=1024,
|
unit_divisor=1024,
|
||||||
disable=disable_progressbar
|
disable=disable_progressbar
|
||||||
) as p_bar:
|
) 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())
|
data = stream.input_stream.stream().read(Zotify.CONFIG.get_chunk_size())
|
||||||
p_bar.update(file.write(data))
|
p_bar.update(file.write(data))
|
||||||
downloaded += len(data)
|
downloaded += len(data)
|
||||||
|
|
Loading…
Reference in a new issue