fix(iP): Fix title parsing for movies

This commit is contained in:
stabbedbybrick 2024-11-01 18:10:56 +01:00
parent 60a2036f4a
commit 3f35bd9056

View File

@ -110,7 +110,7 @@ class iP(Service):
elif data is None:
raise ValueError(f"Metadata was not found - if {pid} is an episode, use full URL as input")
if not data.get("labels") or "Film" in data.get("labels", {}).get("category", ""):
if data.get("count", 0) < 2:
data = self.session.get(self.config["endpoints"]["episodes"].format(pid=pid)).json()
if not data.get("episodes"):
raise ValueError(f"Metadata was not found for {pid}")