individual sports api calls
This commit is contained in:
@@ -671,12 +671,16 @@ def save_sports_settings(input_settings):
|
||||
|
||||
if feature == 'Sports (Upcoming Games)':
|
||||
filename = 'upcoming_games.json'
|
||||
update_key = 'sports_u'
|
||||
elif feature == 'Sports (Past Games)':
|
||||
filename = 'past_games.json'
|
||||
update_key = 'sports_p'
|
||||
elif feature == 'Sports (Live Games)':
|
||||
filename = 'live_games.json'
|
||||
update_key = 'sports_l'
|
||||
elif feature == 'Sports (Team Stats)':
|
||||
filename = 'league_tables.json'
|
||||
update_key = 'sports_t'
|
||||
|
||||
current_settings = json.load(open('csv/' + filename, 'r'))
|
||||
|
||||
@@ -697,7 +701,7 @@ def save_sports_settings(input_settings):
|
||||
|
||||
if any([current_settings['leagues'][k] == [] for k in input_settings['leagues']]):
|
||||
|
||||
last_updates['sports']['force'] = True
|
||||
last_updates[update_key]['force'] = True
|
||||
|
||||
f = open('csv/last_updates.json', 'w+')
|
||||
json.dump(last_updates, f)
|
||||
|
Reference in New Issue
Block a user