TvDb
TvDb copied to clipboard
Update Client.php
Force https:// addresses as api has changed to redirect to https:// and will give 301 errors to http:// requests
I don't get it, if they change their own API, that's their responsibility to change their mirrors as well.
I made this alteration to try and get things functional again but it appears there is other things that TheTVDB people have broken, are there some other changes we should be making to get things functional again?
At the moment just trying to use the library I'm getting Server 500 errors from my own webserver whenever I try to call something like $tvdb->getSerie(75710); etc
Sorry if this is not the right venue to bring this up, also I know none of this is your fault Moinax. Been using the library for many years 👍
So a little background on what's going on:
The modification I proposed fixes a small issue interpreting the mirrors.xml urls, this is due to the release of v3 of thetvdb api, they are currently experience issues with some parts of the api, including accessing episode XML data when using v1 of the api, which I believe is what the Moinax library uses & 301 redirects being handled by some clients(this was due to an intended change on the server for workload issues).
This code change was due to it failing to redirect from http to https, and it will still function properly if they add the 's' in https in the mirrors.xml file.
The v3 api will be backwards compatible with applications still using the v1 & v2 apis (as far as I know) how ever they are still trying to fix a few issues. This has been going on since last Thursday/Friday
More info on current issues and their fix status can be found here: https://forums.thetvdb.com/viewtopic.php?f=122&t=60239
On Wed, Nov 20, 2019 at 5:06 PM proxycheck.io [email protected] wrote:
I made this alteration to try and get things functional again but it appears there is other things that TheTVDB people have broken, are there some other changes we should be making to get things functional again?
At the moment just trying to use the library I'm getting Server 500 errors from my own webserver whenever I try to call something like $tvdb->getSerie(75710); etc
Sorry if this is not the right venue to bring this up, also I know none of this is your fault Moinax. Been using the library for many years 👍
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Moinax/TvDb/pull/44?email_source=notifications&email_token=AAUD6WFVTOZLN5J3J652773QUWREHA5CNFSM4JOOA46KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEU6XUY#issuecomment-556395475, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUD6WEUEK3FTDKVYORVVN3QUWREHANCNFSM4JOOA46A .
--
Hi guys,
I created this library and used it for many years, but when I saw that it was becoming deprecated due to their new API 2.0 and that there was already plenty of good libraries implementing the new version, I decided that there was no need of adapting this one any longer.
So I would recommend you to jump on a newer implementation like https://github.com/canihavesomecoffee/theTVDbAPI
I should update the README.md file to make this clear for everyone, but I never thought about it, sorry.
Anyway, thank you a lot for using this library for so many years.
@Moinax Thanks for your input on this topic. I will look into the library you suggested.
Old topic but as I am still using this lib I tought I would add a comment :-)
Instead of changing http to https you could simply instruct curl to follow redirects which is less invasive and allow TheTvDb to use whatever place they want!
Line 298 add curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);