-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for API V2 #60
Fixes for API V2 #60
Conversation
Note there is a pull request MythTV/mythtv#141 for mythtv which has all these changes + doctests in ttvdb.py which run and generate the same output on both python 2.7.13 and 3.5.4. |
I don't understand the Also all the tests are failing on Travis (ignore Appveyor as I have set it up incorrectly) |
A new cache_key algo is required as the authentication token changes with each run. Also there are other header params which also change with each request (e.g. timestamp). Excluding all headers means that Accept-Language is excluded which means different language requests will return the cached response from the wrong language. |
I'm not sure why the tests are failing, Im assuming it has to do with auth and I also don't understand how key without username and userkey can succeed unless it is a special. It will probably means that auth will fail as it will attempt to do it with a blank username/userkey. I will investigate further and try to understand the unit tests. The ttvdb doctests are quite extensive but use the mythtv account for auth which is a proper account on thetvdb.com. This could be the difference. These commits are a backport/merge from the mythtv commits. |
* More Logging * parameter keys assigned correctly * Cache uses Accept-Language as part of the key but nothing else from the headers * Cache is pruned at start * Additional exceptions for new errors * Check cache before authorization so there is no network traffic if not required * Add langauge key for v1 compatability * Add extra banners keys * Add raw banners for easier filtering
I had not considered a non standard cache or no cache. |
Merged, thanks! |
the headers
if not required