forked from kenzuya/unshackle
Use correct name of image attachment
This commit is contained in:
@@ -285,13 +285,17 @@ class Netflix(Service):
|
|||||||
if title.data and "boxart" in title.data and title.data["boxart"]:
|
if title.data and "boxart" in title.data and title.data["boxart"]:
|
||||||
tracks.add(
|
tracks.add(
|
||||||
Attachment.from_url(
|
Attachment.from_url(
|
||||||
url=title.data["boxart"][0]["url"]
|
url=title.data["boxart"][0]["url"],
|
||||||
|
name=f"{title.name} ({title.year}) Poster"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
if title.data and "stills" in title.data and title.data["stills"]:
|
if title.data and "stills" in title.data and title.data["stills"]:
|
||||||
tracks.add(
|
tracks.add(
|
||||||
Attachment.from_url(title.data["stills"][0]["url"])
|
Attachment.from_url(
|
||||||
|
url=title.data["stills"][0]["url"],
|
||||||
|
name=f"{title.title} S{title.season:02d}E{title.number:02d}{' - ' + title.name if title.name else ''} Poster"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
return tracks
|
return tracks
|
||||||
|
|||||||
Reference in New Issue
Block a user