best_match_under_conditions_interface(window, values) elif event == "SPORT_STAKE": try: matches = sorted(list( sportsbetting.ODDS[values["SPORT_STAKE"][0]])) window['MATCHES'].update(values=matches) except KeyError: window['MATCHES'].update(values=[]) elif event == "BEST_STAKE": best_stakes_match_interface(window, values) elif event == "BEST_MATCH_FREEBET": best_match_freebet_interface(window, values) elif event == "BEST_MATCH_CASHBACK": best_match_cashback_interface(window, values) elif event == "BEST_MATCHES_COMBINE": sportsbetting.ODDS_INTERFACE = best_matches_combine_interface( window, values) elif not window_odds_active and event in [ "ODDS_COMBINE", "ODDS_STAKES", "ODDS_FREEBETS" ]: window_odds_active = True table = odds_table_combine(sportsbetting.ODDS_INTERFACE) layout_odds = [[ sg.Table(table[1:], headings=table[0], size=(None, 20)) ]] window_odds = sg.Window('Cotes', layout_odds) elif window_odds_active: ev2, vals2 = window_odds.Read(timeout=100) if ev2 is None or ev2 == 'Exit': window_odds_active = False window_odds.close() elif event == "ADD_STAKES":
def combine_thread(): best_matches_combine_interface(window, values)