mirror of
https://github.com/THIS-IS-NOT-A-BACKUP/zspotify.git
synced 2025-07-01 15:23:15 +00:00
Fixed sanitizer
This commit is contained in:
parent
7546e76865
commit
f95f7af40c
@ -44,10 +44,11 @@ def wait(seconds: int = 3):
|
|||||||
|
|
||||||
|
|
||||||
def sanitize_data(value):
|
def sanitize_data(value):
|
||||||
|
global sanitize
|
||||||
""" Returns given string with problematic removed """
|
""" Returns given string with problematic removed """
|
||||||
for i in sanitize:
|
for i in sanitize:
|
||||||
sanitized_value = value.replace(i, "")
|
value = value.replace(i, "")
|
||||||
return sanitized_value.replace("|", "-")
|
return value.replace("|", "-")
|
||||||
|
|
||||||
|
|
||||||
def splash():
|
def splash():
|
||||||
@ -445,7 +446,6 @@ def download_track(track_id_str: str, extra_paths=""):
|
|||||||
while True:
|
while True:
|
||||||
# Trys to read exactly 128kb at a time to be more efficient now
|
# Trys to read exactly 128kb at a time to be more efficient now
|
||||||
byte = stream.input_stream.stream().read(1024 * 128)
|
byte = stream.input_stream.stream().read(1024 * 128)
|
||||||
print(len(byte))
|
|
||||||
if byte == b'':
|
if byte == b'':
|
||||||
break
|
break
|
||||||
file.write(byte)
|
file.write(byte)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user