From 1e6fbddb5973f8717080592043075f3585986395 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 16 Aug 2023 16:16:00 +0800 Subject: [PATCH] r/place frontend --- server.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index 53060aa..fb2edcb 100755 --- a/server.py +++ b/server.py @@ -146,7 +146,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', 'Jokes', 'Gainers, Losers, Active', 'Sector Performance'] + 'IPO Calendar', 'Economic Calendar', 'Jokes', 'Gainers, Losers, Active', 'Sector Performance', 'r/place (Reddit)'] global professional @@ -368,6 +368,13 @@ def index(): except: jokes_settings = {"feature": "Jokes", "speed": "medium", "speed2": "medium", "animation": "up", "title": True, "safe": True, "categories": ["Any"], "blacklist": [], "amount": "5", "jokes": []} + try: + f = open('csv/place_settings.json', 'r') + place_settings = json.load(f) + f.close() + except: + place_settings = {"feature": "r/place", "speed": "medium", "speed2": "medium", "animation": "up", "title": True, "width": 128, "pause": "0", "places": ["r/place 2017", "r/place 2022"]} + try: f = open('csv/market_settings.json', 'r') market_settings = json.load(f) @@ -443,6 +450,7 @@ def index(): 'scheduler_settings':scheduler_settings, 'economic_settings':economic_settings, 'jokes_settings':jokes_settings, + 'place_settings':place_settings, 'market_settings':market_settings, 'sector_settings':sector_settings, 'networks_list': networks_list @@ -551,11 +559,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', 'Jokes', 'Gainers, Losers, Active', 'Sector Performance'] + 'Sports (Live Games)', 'Sports (Team Stats)', 'Custom Images', 'Custom GIFs', 'Custom Messages', 'Movies', 'IPO Calendar', 'Economic Calendar', 'Jokes', 'Gainers, Losers, Active', 'Sector Performance', 'r/place (Reddit)'] 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', 'Jokes', 'Gainers, Losers, Active', 'Sector Performance'] + 'Sports (Past Games)', 'Sports (Team Stats)', 'Sports (Live Games)', 'Custom Messages', 'Custom Images', 'Movies', 'IPO Calendar', 'Economic Calendar', 'Jokes', 'Gainers, Losers, Active', 'Sector Performance', 'r/place (Reddit)'] positions = [] display_settings = []