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]: Episode object fails to reload when found by ID #3

Closed CollinHeist closed 2 years ago

CollinHeist commented 2 years ago

Version Number

1.0.5

Describe the Bug

An Episode object returned by find_by_id() raises NotFound when reloaded, despite obviously being found by the find method, and existing on TMDb.


I've noticed it with The Boys, S03E08. Reproduced below:

from tmdbapis import TMDbAPIs

api_key = # ...
api = TMDbAPIs(api_key)

# This way works and the episode can be reloaded
ep = api.tv_episode(76479, 3, 8) 
print(ep)
# Prints [3435049:The Instant White-Hot Wild]
ep.reload() # No error

# This way does not work
ep = api.find_by_id(tvdb_id=8932006).tv_episode_results[0]
print(ep)
# Prints [3435049:The Instant White-Hot Wild]
ep.reload()
# Raises *** tmdbapis.exceptions.NotFound: (404 [Not Found]) Requested Item Not Found

Obviously does not happen with all episodes returned by this method.

CollinHeist commented 2 years ago

Looks like this was fixed in e70792e57f6ce2d0e53f4d52ace753dd53c19c30 - thanks!