Skip to content

Commit

Permalink
Fix listing of a genre
Browse files Browse the repository at this point in the history
Proper thumbnail and fanart.
Proper description.
  • Loading branch information
linqcan committed Sep 16, 2023
1 parent c02d3e2 commit 3e26ed5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions resources/lib/api/graphql.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,14 @@ def getProgramsForGenre(self, genre):
item = teaser["item"]
title = item["name"]
item_id = item["urls"]["svtplay"]
thumbnail = self.get_thumbnail_url(item["image"]["id"], item["image"]["changed"]) if "image" in item else ""
thumbnail = self.get_thumbnail_url(teaser["images"]["wide"]["id"], teaser["images"]["wide"]["changed"]) if "images" in teaser else ""
fanart = self.get_fanart_url(item["images"]["cleanWide"]["id"], item["images"]["cleanWide"]["changed"]) if "images" in item else ""
geo_restricted = item["restrictions"]["onlyAvailableInSweden"]
info = {
"plot" : teaser["subHeading"]
"plot" : teaser.get("description", "")
}
type_name = item["__typename"]
play_item = self.__create_item(title, type_name, item_id, geo_restricted, thumbnail, info)
play_item = self.__create_item(title, type_name, item_id, geo_restricted, thumbnail, info, fanart)
programs.append(play_item)
return programs

Expand Down

0 comments on commit 3e26ed5

Please sign in to comment.