savetv: Web-UI API filtert DE/FR-Produktionslaender (Wikidata-Cache)
This commit is contained in:
parent
03f67af781
commit
4aaa206147
1 changed files with 5 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue