mirror of
https://github.com/vinefeeder/TwinVine.git
synced 2026-07-15 18:10:04 +02:00
CBC service
This commit is contained in:
@@ -230,12 +230,20 @@ class CBC(Service):
|
|||||||
# Service specific
|
# Service specific
|
||||||
|
|
||||||
def _show(self, data: dict) -> list[Episode]:
|
def _show(self, data: dict) -> list[Episode]:
|
||||||
lineups: list = next((x["lineups"] for x in data["content"] if x.get("title", "").lower() == "episodes"), None)
|
#lineups: list = next((x["lineups"] for x in data["content"] if x.get("title", "").lower() == "episodes"), None)
|
||||||
if not lineups:
|
#if not lineups:
|
||||||
try:
|
# try:
|
||||||
lineups = next(x["lineups"] for x in data["content"] if x.get("title", "").lower() == "parts")
|
# lineups = next(x["lineups"] for x in data["content"] if x.get("title", "").lower() == "parts")
|
||||||
except StopIteration:
|
# except StopIteration:
|
||||||
pass
|
# pass
|
||||||
|
lineups = next(
|
||||||
|
(
|
||||||
|
x["lineups"]
|
||||||
|
for x in data["content"]
|
||||||
|
if x.get("title", "").lower() in ("episodes", "parts")
|
||||||
|
),
|
||||||
|
None
|
||||||
|
)
|
||||||
|
|
||||||
if not lineups:
|
if not lineups:
|
||||||
self.log.warning("No episodes found for: {}".format(data.get("title")))
|
self.log.warning("No episodes found for: {}".format(data.get("title")))
|
||||||
|
|||||||
Reference in New Issue
Block a user