diff --git a/server.py b/server.py index f11f092..d2ceebf 100755 --- a/server.py +++ b/server.py @@ -122,7 +122,7 @@ def index(): global command 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', - 'IPO Calendar', 'Economic Calendar'] + 'IPO Calendar', 'Economic Calendar', 'Jokes'] global professional @@ -335,6 +335,13 @@ def index(): except: 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: f = open('csv/scheduler.json','r') scheduler_settings = json.load(f) @@ -398,7 +405,8 @@ def index(): 'wifi_SSID':wifi_SSID, 'wifi_PSK':wifi_PSK, '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 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 if professional: 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 = [] display_settings = []