diff --git a/fifa17-recon/tools/utas_server.py b/fifa17-recon/tools/utas_server.py index 33c97b2..ce400d5 100755 --- a/fifa17-recon/tools/utas_server.py +++ b/fifa17-recon/tools/utas_server.py @@ -1409,7 +1409,30 @@ def club_route(h): if sweep_window(): return 200, {"itemData": sweep_items()} items = STORE.items() - if CLUB_PAGE: + + # HONOUR ?type=. This route ignored it, so the STAFF tab -- which asks for + # type=manager, observed live 2026-08-04 -- was answered with the player list + # and displayed footballers as coaching staff. + # + # Filtering is deliberately NARROW. `player` and `manager` are the two values + # actually observed; `custom` (the by-league and by-team drill-downs) and a + # missing type keep exactly the behaviour that is already live-proven on + # screen, because the drill-down counts were only just fixed and this must not + # disturb them. An unrecognised type is treated like manager -- filtered, not + # unfiltered -- since answering an unknown question with the whole player list + # is what produced this bug in the first place. + kind = "" + if "?" in h.path: + for part in h.path.split("?", 1)[1].split("&"): + if part.startswith("type="): + kind = part[5:] + if kind and kind not in ("player", "custom"): + # cardsubtypeid 0..3 is a player (FUN_1800d8330); everything else is + # staff or a manager. We own no staff cards yet, so this is [] today -- + # an empty item list, which is the same shape the parser already accepts. + items = [i for i in items if i.get("cardsubtypeid", 0) not in (0, 1, 2, 3)] + log(" CLUB: type=%s -> %d item(s) (players filtered out)" % (kind, len(items))) + elif CLUB_PAGE: log(" CLUB: returning %d item(s) [FUT_CLUB_PAGE experiment -- compare this " "number against the MY CLUB counter on screen]" % len(items)) return 200, {"itemData": items}