From fde9bb4823e12943304542d0ee205074054ed03d Mon Sep 17 00:00:00 2001 From: eli fessler Date: Tue, 25 Oct 2022 20:55:55 -1000 Subject: [PATCH] add prelim support for ignore_private used in SR --- s3s.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/s3s.py b/s3s.py index 02b40ba..2b1a6b2 100755 --- a/s3s.py +++ b/s3s.py @@ -673,7 +673,8 @@ def prepare_job_result(battle, ismonitoring, overview_data=None): '''Converts the Nintendo JSON format for a Salmon Run job to the stat.ink one.''' pass # stat.ink doesn't support SR yet - # combo of set_teammates() + salmon_post_shift() + # combo of set_teammates() + salmon_post_shift() - mirrors prepare_battle_result() + # specify if private or not; also ensure SR results are formatted the same in post_result()! # set payload["splatnet_json"] @@ -713,7 +714,7 @@ def post_result(data, ismonitoring, isblackout, istestrun, overview_data=None): continue # should have been taken care of in fetch_json() but just in case... - if payload["lobby"] == "private" and utils.custom_key_exists("ignore_private", CONFIG_DATA): # TODO - also check SR? + if payload["lobby"] == "private" and utils.custom_key_exists("ignore_private", CONFIG_DATA): continue # TODO - isblackout stuff... for SR too @@ -1006,7 +1007,8 @@ def monitor_battles(which, secs, isblackout, istestrun): cookies=dict(_gtoken=GTOKEN)) result = json.loads(result_post.text) - if False and utils.custom_key_exists("ignore_private", CONFIG_DATA): # TODO - how to check for SR private battles? + if result["data"]["coopHistoryDetail"]["jobScore"] == None \ + and utils.custom_key_exists("ignore_private", CONFIG_DATA): pass else: outcome = "Clear" if result["data"]["coopHistoryDetail"]["resultWave"] == 0 else "Defeat"