[GUI] fix for web interface - 'background_choice' -> 'background_video'

pull/1932/head
Piotr Rajnisz 2 years ago
parent 0825026597
commit 2593132ccb

@ -200,9 +200,9 @@
</div>
</div>
<div class="row mb-2">
<label for="background_choice" class="col-4">Background Choice</label>
<label for="background_video" class="col-4">Background Choice</label>
<div class="col-8">
<select name="background_choice" class="form-select" data-toggle="tooltip"
<select name="background_video" class="form-select" data-toggle="tooltip"
data-original-title='Sets the background of the video'>
<option value=" ">Random Video</option>
{% for background in checks["background_video"]["options"][1:] %}

@ -151,7 +151,7 @@ def delete_background(key):
# Remove background video from ".config.template.toml"
config = tomlkit.loads(Path("utils/.config.template.toml").read_text())
config["settings"]["background"]["background_choice"]["options"].remove(key)
config["settings"]["background"]["background_video"]["options"].remove(key)
with Path("utils/.config.template.toml").open("w") as toml_file:
toml_file.write(tomlkit.dumps(config))
@ -216,7 +216,7 @@ def add_background(youtube_uri, filename, citation, position):
# Add background video to ".config.template.toml"
config = tomlkit.loads(Path("utils/.config.template.toml").read_text())
config["settings"]["background"]["background_choice"]["options"].append(filename)
config["settings"]["background"]["background_video"]["options"].append(filename)
with Path("utils/.config.template.toml").open("w") as toml_file:
toml_file.write(tomlkit.dumps(config))

Loading…
Cancel
Save