Skip to content

Commit

Permalink
Added: Season and Episode info.
Browse files Browse the repository at this point in the history
  • Loading branch information
basrieter committed Nov 19, 2023
1 parent a918a1f commit 40260b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion channels/channel.nos/nos2010/chn_nos2010.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ def create_api_season_item(self, result_set: dict) -> Optional[MediaItem]:
title = f"{title} - {label}"
url = f"https://npo.nl/start/api/domain/programs-by-season?guid={guid}"
item = FolderItem(title, url, content_type=contenttype.EPISODES,
media_type=mediatype.SEASON)
media_type=mediatype.FOLDER)
item.description = result_set.get("synopsis")
item.metaData["seasonKey"] = result_set["seasonKey"]

Expand Down Expand Up @@ -665,6 +665,12 @@ def create_api_episode_item(self, result_set: dict, show_info: bool = False) ->
break
if subscription == "premium":
item.isPaid = True

episode_number = result_set.get("programKey")
season_number = result_set.get("season", {}).get("seasonKey")
if episode_number and season_number:
item.set_season_info(season_number, episode_number)

return item


Expand Down

0 comments on commit 40260b4

Please sign in to comment.