dbr / tvdb_api

Simple to use interface to TheTVDB.com API in Python
The Unlicense
339 stars 63 forks source link

Request: Custom URL support #88

Open 13steinj opened 4 years ago

13steinj commented 4 years ago

This should be a simple one-- there are several services that proxy and cache thetvdb (one such is Plex). They use the exact same API, forwarding uncached requests, however cache the request every 2 days / when requested (whichever is later).

dbr commented 4 years ago

That's a good idea. Currently you can do this in a semi-reasonable way by changing the config keys:

t = tvdb_api.Tvdb(...)
t.config['api_url'] = "https://api.thetvdb.com"

(there is also a base_url and url_artworkPrefix keys, which would need to be changed if you are also using the banner URLs etc - I'll tidy this up for the next release)

I'll make this into an init arg to Tvdb(...) in the next release to make this more explicitly supported