This commit is contained in:
Tomas Dvorak
2026-01-26 08:13:18 +01:00
parent aa036b6550
commit dfc079288f
505 changed files with 95755 additions and 5712 deletions
@@ -65,6 +65,15 @@ func ProcessFACRLogo(src string) (string, error) {
if u == "" {
return "", fmt.Errorf("empty url")
}
// In manual club data mode we avoid any remote FACR/fotbal.cz processing and
// return the original URL unchanged so that LogoAPI/manual overrides can be
// applied on the frontend without additional HTTP calls.
if config.AppConfig != nil {
mode := strings.ToLower(strings.TrimSpace(config.AppConfig.ClubDataMode))
if mode == "manual" {
return u, nil
}
}
// Feature flag: allow disabling background removal entirely via .env
if config.AppConfig != nil && !config.AppConfig.RembgEnabled {
// Simply return the original URL (no processing)