Kometa-Team / TMDbAPIs

A lightweight Python library for TMDb V3 and V4 APIs.
https://tmdbapis.metamanager.wiki
MIT License
11 stars 0 forks source link

[Bug]: No TV series logos #2

Closed CollinHeist closed 2 years ago

CollinHeist commented 2 years ago

Version Number

N/A

Describe the Bug

I would expect a list of Logo objects to be returned for Breaking Bad

Logos exist on TMDb: https://www.themoviedb.org/tv/1396-breaking-bad/images/logos

>>> from tmdbapis import TMDbAPIs
>>> api_key = # xxx
>>> api = TMDbAPIs(api_key)
>>> print(api.tv_show(1396).logos)
[]

Same with any show I tested (only a handful of popular shows with logos)


Unrelated, the issue template here is the same as PMM

meisnate12 commented 2 years ago

The TMDb API doesn't have any way to return logos. The TV Images Endpoint only returns posters and backdrops i would post on their forums and see if it can be added then i would gladly add it here but until the option is in the api this isnt a bug so im going to close this for now

CollinHeist commented 2 years ago

So, confusingly, logos are returned in the Images endpoint, they're just not documented on their website. For example:

>>> from requests import get
>>> api_key = # xxx
>>> id = 1396 # Breaking Bad
>>> images = get(f'https://api.themoviedb.org/3/tv/{id}/images', {'api_key': api_key}).json()
>>> print(images.keys())
dict_keys(['backdrops', 'id', 'logos', 'posters'])
>>> print(images['logos'][0])
{'aspect_ratio': 1.68,
 'height': 219,
 'iso_639_1': 'en',
 'file_path': '/bM2bNffZlZ2UxZqwHaxr5VS3UUI.svg',
 'vote_average': 5.312,
 'vote_count': 1,
 'width': 368}

Again, not sure why this isn't documented on their docs.

meisnate12 commented 2 years ago

and boom just like that were back open haha many of these endpoints ive never actually really looked at the results like that

meisnate12 commented 2 years ago

so i did have the logos actually but the include methods didnt allow them to come through ive fixed this with 1.0.5