added quotes_settings

This commit is contained in:
Justin 2023-09-23 17:05:46 +08:00 committed by GitHub
parent 7f0b68f05a
commit 4903062ad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -428,6 +428,14 @@ def index():
worldclock_settings = {"speed": "fast", "speed2": "fast", "transition": "up", "pause": "20"}
with open('csv/worldclock_settings.json', 'w') as f:
json.dump(worldclock_settings, f)
try:
f = open('csv/quotes_settings.json', 'r')
quotes_settings = json.load(f)
f.close()
except:
quotes_settings = {"feature": "Inspirational Quotes", "speed": "medium", "speed2": "medium", "animation": "up", "title": True, "amount": "3", "quotes": []}
with open('csv/quotes_settings.json', 'w') as f:
json.dump(quotes_settings, f)
try:
f = open('csv/scheduler.json','r')
scheduler_settings = json.load(f)
@ -518,7 +526,8 @@ def index():
'clock_screensaver': clock_screensaver,
'clock1_settings': clock1_settings,
'clock2_settings': clock2_settings,
'worldclock_settings': worldclock_settings
'worldclock_settings': worldclock_settings,
'quotes_settings': quotes_settings
}