bug fixes

This commit is contained in:
Neythen
2021-11-16 19:11:32 +00:00
parent eb284137a8
commit f27e4eec4d
20 changed files with 78 additions and 32 deletions

View File

@@ -407,7 +407,7 @@ def combine_dict(current_settings, input_symbols, current_key):
# add any stock that arent current in the settings
for IS in input_symbols:
if IS not in current_symbols:
current_settings[current_key][IS] = -1
current_settings[current_key][IS] = []
# remove stocks not in settings
for CS in current_symbols:
@@ -436,6 +436,13 @@ def save_trade_settings(input_settings):
json.dump(current_settings, open('csv/' + filename, 'w+'))
if input_settings['feature'].lower() == 'stocks':
api_caller.sendline('s')
elif input_settings['feature'].lower() == 'crypto':
api_caller.sendline('c')
elif input_settings['feature'].lower() == 'forex':
api_caller.sendline('f')
def save_weather_settings(input_settings):
@@ -459,6 +466,8 @@ def save_weather_settings(input_settings):
json.dump(current_settings, open('csv/' + filename, 'w+'))
api_caller.sendline('w')
def save_news_settings(input_settings):
filename = 'news_settings.json'
@@ -474,6 +483,7 @@ def save_news_settings(input_settings):
current_settings['sources'] = list(set(current_settings['sources'] + input_settings['sources']))
json.dump(current_settings, open('csv/' + filename, 'w+'))
api_caller.sendline('n')
def save_sports_settings(input_settings):
@@ -499,6 +509,8 @@ def save_sports_settings(input_settings):
json.dump(current_settings, open('csv/' + filename, 'w+'))
api_caller.sendline('S')
# for images and GIFs
def save_image_settings(input_settings):
filename = 'image_settings.json' if input_settings['feature'] == 'Custom Images' else 'GIF_settings.json'