mirror of
https://github.com/csd4ni3l/music-player.git
synced 2026-01-01 12:13:42 +01:00
Fix files not being opened with utf-8 encoding
This commit is contained in:
@@ -24,7 +24,7 @@ class Downloader(arcade.gui.UIView):
|
||||
self.pypresence_client = pypresence_client
|
||||
self.pypresence_client.update(state="Downloading music", start=self.pypresence_client.start_time)
|
||||
|
||||
with open("settings.json", "r") as file:
|
||||
with open("settings.json", "r", encoding="utf-8") as file:
|
||||
self.settings_dict = json.load(file)
|
||||
|
||||
self.tab_options = self.settings_dict.get("tab_options", ["~/Music", "~/Downloads"])
|
||||
@@ -88,7 +88,7 @@ class Downloader(arcade.gui.UIView):
|
||||
return None
|
||||
|
||||
try:
|
||||
with open("downloaded_music.mp3.info.json", "r") as file:
|
||||
with open("downloaded_music.mp3.info.json", "r", encoding="utf-8") as file:
|
||||
info = json.load(file)
|
||||
return info
|
||||
except (json.JSONDecodeError, OSError):
|
||||
|
||||
Reference in New Issue
Block a user