Trim the career's ticker, news, line-up and transfer wording; show world names in contracts

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-14 10:37:49 +01:00
1 parent 46d0341829
commit 46cd93472f
6 files changed
+29 -14

No files matched your search

+12 -1
View File
@@ -5,6 +5,7 @@
#include "modern/ui/engine_live.hpp"
#include <algorithm>
#include <cctype>
#include <map>
#include <set>
@@ -268,7 +269,17 @@ Json engine_live_progress(const Json &previous, const Json &state, const Json &b
}
Json home = m.at("home"), away = m.at("away");
home["role"] = role; away["role"] = role;
out["matches"].push_back({{"id", id}, {"home", home}, {"away", away}, {"owners", owners}, {"competition", "Spieltag"},
// the desk announced this fixture with its competition; other matches stay unnamed
std::string competition = "Spieltag";
try {
const auto &next = bundle.at("desktop").at("data").at("nextFixture");
if (next.is_object() && next.at("home").at("id") == m.at("home").at("id")) {
competition = next.at("competition").value("text", competition);
std::replace(competition.begin(), competition.end(), '\n', ' ');
}
} catch (const std::exception &) {}
out["matches"].push_back({{"id", id}, {"home", home}, {"away", away}, {"owners", owners}, {"competition", competition},
{"attendance", m.value("attendance", Json())}, {"weather", m.value("weather", Json())}});
}
if (out.at("owners").empty() || out.at("matches").empty()) return failure("live_no_human_match");