diff --git a/ZDF/__init__.py b/ZDF/__init__.py index c3f0849..93a01be 100644 --- a/ZDF/__init__.py +++ b/ZDF/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations from http.cookiejar import MozillaCookieJar from typing import Any, Optional, Union +import json import sys import re @@ -162,7 +163,11 @@ class ZDF(Service): )]) else: name = video["title"] - series_title = video["smartCollection"].get("title", "DUMMY") + series_title = video["smartCollection"].get("title") + + # When loading from series page (handle_series_page), use this hack to get series title + if not series_title: + series_title = video["tracking"]["piano"]["video"]["av_show"] # Ignore fake episode names like "Episode 123" or "Series Name (1/8)" if re.match(fr"^(Folge \d+|{series_title} \(\d+/\d+\))$", name):