Don't panic when .arl is not writable

This commit is contained in:
Lukáš Kucharczyk 2024-08-02 17:24:34 +02:00
parent 6e10a30c48
commit d26b1cfe46
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
1 changed files with 5 additions and 2 deletions

View File

@ -48,8 +48,11 @@ def download(url, bitrate, portable, path):
arl = f.readline().rstrip("\n").strip()
if not dz.login_via_arl(arl): arl = requestValidArl()
else: arl = requestValidArl()
try:
with open(configFolder / '.arl', 'w', encoding="utf-8") as f:
f.write(arl)
except:
print(f"Error opening {configFolder / '.arl'}, continuing anyway.")
plugins = {}
if Spotify: