From f95f7af40c0bd41d09f8c976be2cef6a5d672f5f Mon Sep 17 00:00:00 2001 From: Footsiefat <12180913+Footsiefat@users.noreply.github.com> Date: Tue, 19 Oct 2021 19:52:28 +1300 Subject: [PATCH] Fixed sanitizer --- zspotify.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zspotify.py b/zspotify.py index 19d96862..6ef152c0 100644 --- a/zspotify.py +++ b/zspotify.py @@ -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)