From 04ea9fff63576a673a06b03efb7e86b74cb80b1d Mon Sep 17 00:00:00 2001 From: lambda <> Date: Fri, 22 Aug 2025 22:54:10 +0200 Subject: [PATCH] ZDF: Fix series names when downloading from series page --- ZDF/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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):