From 439a67208fb47a036a51e487dd21df9b2f76432a Mon Sep 17 00:00:00 2001 From: salt11ar Date: Tue, 9 Sep 2025 17:04:21 -0300 Subject: [PATCH] Update gui_utils.py Fixes #2408 --- utils/gui_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/gui_utils.py b/utils/gui_utils.py index 31c135f..97ebdc1 100644 --- a/utils/gui_utils.py +++ b/utils/gui_utils.py @@ -128,11 +128,11 @@ def modify_settings(data: dict, config_load, checks: dict): # Delete background video def delete_background(key): # Read backgrounds.json - with open("utils/backgrounds.json", "r", encoding="utf-8") as backgrounds: + with open("utils/backgrounds_videos.json", "r", encoding="utf-8") as backgrounds: data = json.load(backgrounds) # Remove background from backgrounds.json - with open("utils/backgrounds.json", "w", encoding="utf-8") as backgrounds: + with open("utils/backgrounds_videos.json", "w", encoding="utf-8") as backgrounds: if data.pop(key, None): json.dump(data, backgrounds, ensure_ascii=False, indent=4) else: @@ -181,7 +181,7 @@ def add_background(youtube_uri, filename, citation, position): filename = filename.replace(" ", "_") # Check if the background doesn't already exist - with open("utils/backgrounds.json", "r", encoding="utf-8") as backgrounds: + with open("utils/backgrounds_videos.json", "r", encoding="utf-8") as backgrounds: data = json.load(backgrounds) # Check if key isn't already taken @@ -195,7 +195,7 @@ def add_background(youtube_uri, filename, citation, position): return # Add background video to json file - with open("utils/backgrounds.json", "r+", encoding="utf-8") as backgrounds: + with open("utils/backgrounds_videos.json", "r+", encoding="utf-8") as backgrounds: data = json.load(backgrounds) data[filename] = [youtube_uri, filename + ".mp4", citation, position]