diff --git a/homelab-ai-bot/savetv_web.py b/homelab-ai-bot/savetv_web.py index ff57e9f5..5c1714ff 100644 --- a/homelab-ai-bot/savetv_web.py +++ b/homelab-ai-bot/savetv_web.py @@ -18,7 +18,7 @@ sys.path.insert(0, os.path.dirname(__file__)) sys.path.insert(0, '/opt') from flask import Flask, jsonify, render_template_string, request -from tools import savetv +from tools import savetv, savetv_country_filter app = Flask(__name__) @@ -794,6 +794,7 @@ def api_films(): seen_titles = {} series_count = 0 excluded_count = 0 + filminfo_cache = savetv_country_filter.load_filminfo_cache() for e in entries: tc = e.get("STRTELECASTENTRY", {}) @@ -804,6 +805,9 @@ def api_films(): if savetv._is_excluded(title): excluded_count += 1 continue + if savetv_country_filter.should_exclude_production_country(title, filminfo_cache): + excluded_count += 1 + continue station = tc.get("STVSTATIONNAME", "?") days_left = int(tc.get("IDAYSLEFTBEFOREDELETE", 0))