Fixed sanitizer

This commit is contained in:
Footsiefat 2021-10-19 19:52:28 +13:00 committed by GitHub
parent 7546e76865
commit f95f7af40c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,10 +44,11 @@ def wait(seconds: int = 3):
def sanitize_data(value):
global sanitize
""" Returns given string with problematic removed """
for i in sanitize:
sanitized_value = value.replace(i, "")
return sanitized_value.replace("|", "-")
value = value.replace(i, "")
return value.replace("|", "-")
def splash():
@ -445,7 +446,6 @@ def download_track(track_id_str: str, extra_paths=""):
while True:
# Trys to read exactly 128kb at a time to be more efficient now
byte = stream.input_stream.stream().read(1024 * 128)
print(len(byte))
if byte == b'':
break
file.write(byte)