added force update for quotes if num of jokes is changed
This commit is contained in:
parent
f331c70454
commit
aeae1a56d3
@ -1777,6 +1777,15 @@ def save_quotes_settings(input_settings):
|
||||
except:
|
||||
current_settings = {"feature": "Inspirational Quotes", "speed": "medium", "speed2": "medium", "animation": "up", "title": True, "amount": "3", "quotes": []}
|
||||
|
||||
if current_settings['amount'] != input_settings['amount']:
|
||||
f = open('csv/last_updates.json', 'r')
|
||||
last_updates = json.load(f)
|
||||
f.close()
|
||||
last_updates['quotes']['force'] = True
|
||||
f = open('csv/last_updates.json', 'w')
|
||||
json.dump(last_updates, f)
|
||||
f.close()
|
||||
|
||||
current_settings['speed'] = input_settings['speed'].lower()
|
||||
current_settings['speed2'] = input_settings['speed2'].lower()
|
||||
current_settings['animation'] = input_settings['animation'].lower()
|
||||
|
Loading…
Reference in New Issue
Block a user