basic jokes backend added
This commit is contained in:
parent
d87e2b556f
commit
72222ba64f
16
server.py
16
server.py
@ -122,7 +122,7 @@ def index():
|
|||||||
global command
|
global command
|
||||||
all_features = ['Current Weather','Daily Forecast','News', 'Sports (Upcoming Games)','Sports (Past Games)','Sports (Live Games)',
|
all_features = ['Current Weather','Daily Forecast','News', 'Sports (Upcoming Games)','Sports (Past Games)','Sports (Live Games)',
|
||||||
'Sports (Team Stats)','Custom Images', 'Custom GIFs', 'Custom Messages', 'Stocks', 'Crypto', 'Forex', 'Commodities', 'Indices', 'Movies',
|
'Sports (Team Stats)','Custom Images', 'Custom GIFs', 'Custom Messages', 'Stocks', 'Crypto', 'Forex', 'Commodities', 'Indices', 'Movies',
|
||||||
'IPO Calendar', 'Economic Calendar']
|
'IPO Calendar', 'Economic Calendar', 'Jokes']
|
||||||
|
|
||||||
global professional
|
global professional
|
||||||
|
|
||||||
@ -335,6 +335,13 @@ def index():
|
|||||||
except:
|
except:
|
||||||
economic_settings = {"feature": "Economic Calendar", "speed": "medium", "speed2": "medium", "animation": "up", "importance": "Med - High", "title": True, "timezone": "US/Eastern", "countries": ["United States"], "events": []}
|
economic_settings = {"feature": "Economic Calendar", "speed": "medium", "speed2": "medium", "animation": "up", "importance": "Med - High", "title": True, "timezone": "US/Eastern", "countries": ["United States"], "events": []}
|
||||||
|
|
||||||
|
try:
|
||||||
|
f = open('csv/jokes_settings.json', 'r')
|
||||||
|
jokes_settings = json.load(f)
|
||||||
|
f.close()
|
||||||
|
except:
|
||||||
|
jokes_settings = {"feature": "Jokes", "speed": "medium", "speed2": "medium", "animation": "up", "title": True, "categories": ["Any"], "blacklist": [], "amount": "5", "jokes": []}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
f = open('csv/scheduler.json','r')
|
f = open('csv/scheduler.json','r')
|
||||||
scheduler_settings = json.load(f)
|
scheduler_settings = json.load(f)
|
||||||
@ -398,7 +405,8 @@ def index():
|
|||||||
'wifi_SSID':wifi_SSID,
|
'wifi_SSID':wifi_SSID,
|
||||||
'wifi_PSK':wifi_PSK,
|
'wifi_PSK':wifi_PSK,
|
||||||
'scheduler_settings':scheduler_settings,
|
'scheduler_settings':scheduler_settings,
|
||||||
'economic_settings':economic_settings
|
'economic_settings':economic_settings,
|
||||||
|
'jokes_settings':jokes_settings
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -504,11 +512,11 @@ def save_displaying(input_settings):
|
|||||||
global professional
|
global professional
|
||||||
|
|
||||||
all_settings = ['Stocks', 'Crypto', 'Forex', 'Commodities', 'Indices', 'Current Weather', 'Daily Forecast', 'News', 'Sports (Upcoming Games)', 'Sports (Past Games)',
|
all_settings = ['Stocks', 'Crypto', 'Forex', 'Commodities', 'Indices', 'Current Weather', 'Daily Forecast', 'News', 'Sports (Upcoming Games)', 'Sports (Past Games)',
|
||||||
'Sports (Live Games)', 'Sports (Team Stats)', 'Custom Images', 'Custom GIFs', 'Custom Messages', 'Movies', 'IPO Calendar', 'Economic Calendar']
|
'Sports (Live Games)', 'Sports (Team Stats)', 'Custom Images', 'Custom GIFs', 'Custom Messages', 'Movies', 'IPO Calendar', 'Economic Calendar', 'Jokes']
|
||||||
professional = len(input_settings) == 2
|
professional = len(input_settings) == 2
|
||||||
if professional:
|
if professional:
|
||||||
all_settings = ['Stocks', 'Crypto', 'Forex', 'Commodities', 'Indices', 'Current Weather', 'News', 'Daily Forecast', 'Sports (Upcoming Games)',
|
all_settings = ['Stocks', 'Crypto', 'Forex', 'Commodities', 'Indices', 'Current Weather', 'News', 'Daily Forecast', 'Sports (Upcoming Games)',
|
||||||
'Sports (Past Games)', 'Sports (Team Stats)', 'Sports (Live Games)', 'Custom Messages', 'Custom Images', 'Movies', 'IPO Calendar', 'Economic Calendar']
|
'Sports (Past Games)', 'Sports (Team Stats)', 'Sports (Live Games)', 'Custom Messages', 'Custom Images', 'Movies', 'IPO Calendar', 'Economic Calendar', 'Jokes']
|
||||||
|
|
||||||
positions = []
|
positions = []
|
||||||
display_settings = []
|
display_settings = []
|
||||||
|
Loading…
Reference in New Issue
Block a user