Improve sync feedback and dashboard layout
Add request counters to Radio 357 backfill logs, clarify RNŚ warnings, and refine responsive dashboard metrics and configuration layout.
This commit is contained in:
@@ -253,6 +253,7 @@ class RNScraper:
|
||||
|
||||
new_found = 0
|
||||
missing_player_count = 0
|
||||
missing_player_titles = []
|
||||
valid_cards = 0
|
||||
|
||||
for card in cards:
|
||||
@@ -266,6 +267,8 @@ class RNScraper:
|
||||
|
||||
if not player_box:
|
||||
missing_player_count += 1
|
||||
if title_el := card.find("p", class_="rns-post-title"):
|
||||
missing_player_titles.append(title_el.get_text(strip=True))
|
||||
|
||||
if audio_url and not audio_url.startswith("http"):
|
||||
audio_url = f"{BASE_URL}/{audio_url.lstrip('/')}"
|
||||
@@ -315,7 +318,10 @@ class RNScraper:
|
||||
invalid_response("rns", "HTML_SCHEMA_CHANGED", "Znaleziono karty podcastów bez oczekiwanych identyfikatorów", url, content=html)
|
||||
|
||||
if missing_player_count:
|
||||
warning = f"{missing_player_count} odcinków bez dostępnego playera audio; pomijam ich URL-e."
|
||||
titles = ", ".join(missing_player_titles[:3])
|
||||
warning = f"Audycja {program_slug}: {missing_player_count} odcinków bez dostępnego playera audio; pomijam ich URL-e."
|
||||
if titles:
|
||||
warning += f" Odcinki: {titles}."
|
||||
if self.warning_callback:
|
||||
self.warning_callback(warning)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user