alhrock / phptvdb Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/phptvdb
Automatically exported from code.google.com/p/phptvdb
thetvdb.com appearently changed one of the URLs used to find a show by its
ID number. An API key is no longer needed. Here are the changes I made to
TVDB/TV_Shows.class.php
I added
CONST tvdbUrl = 'http://thetvdb.com/';
just above
CONST tvdbUrl = 'http://thetvdb.com/';
and then I changed a line in request so it looks like this now
protected function request($params) {
switch($params['action']) {
case 'show_by_id':
$id = $params['id'];
$url = self::tvdbUrl.'data/series/'.$id.'/';
$data = self::fetchData($url);
return $data;
break;
it's the $url line that I changed.
I had previous changed by code using the fixes listed on the issues list before
Original issue reported on code.google.com by [email protected]
on 24 Mar 2009 at 12:38
http://forums.thetvdb.com/viewtopic.php?f=8&t=866
http://www.thetvdb.com/api/GetEpisodeByAirDate.php?apikey=xxxxxxxxxxxxxxxxx&seri
esid=71256&airdate=2009-04-01
Original issue reported on code.google.com by [email protected]
on 15 Apr 2009 at 9:37
Currently the search can take a long time and puts extra strain on
thetvdb.com by getting the data multiple times here:
$xml = simplexml_load_string($data);
foreach($xml->Series as $show) {
$shows[] = self::findById((string)$show->seriesid);
}
This is the different pages it downloads of thetvdb
http://thetvdb.com/api/GetSeries.php?seriesname=24
http://thetvdb.com/api/################/series/76290
http://thetvdb.com/api/################/series/79848
http://thetvdb.com/api/################/series/73012
http://thetvdb.com/api/################/series/76047
http://thetvdb.com/api/################/series/74238
http://thetvdb.com/api/################/series/84312
In my case I had the error:
Show Not Found!
Cause
but that's caused because it seems to use
http://thetvdb.com/data/series/76290/
now
But if it was changed to:
$xml = simplexml_load_string($data);
foreach($xml->Series as $show) {
$shows[] = new TV_Show($show);
}
It only has to get
http://thetvdb.com/api/GetSeries.php?seriesname=24
Ok it misses some data but for selection you shouldn't need all the data
At least change it so you have to enable getting all data eg:
search($showName, true) which would get all data
Original issue reported on code.google.com by [email protected]
on 13 Mar 2009 at 1:42
Is there any way to get the banner image of the serie instead of the text name?
Original issue reported on code.google.com by [email protected]
on 11 Feb 2010 at 8:30
I downloaded version 1.0.3 and had the following errors:
Strict Standards: Non-static method TVDB::fetchData() should not be called
statically in C:\xampp\htdocs\TVDB\TVDB.class.php on line 100
and
Strict Standards: Non-static method TVDB::request() should not be called
statically in C:\xampp\htdocs\TVDB\TV_Shows.class.php on line 41
You have to add static to both function and everythink is fine.
In file TVDB.class.php in line 74 and line 47
Happens only if you have all errors on!
Original issue reported on code.google.com by [email protected]
on 23 Apr 2012 at 12:33
In a simple example of search method, give me the error:
Catchable fatal error: Object of class TV_Show could not be converted to string
in /hermes/bosweb/web247/b2474/ipg.mateusdalpicom/projects/teste/index.php on
line 7
my code:
require 'TVDB.php';
$shows = TV_Shows::search('LOST');
echo $shows[0];
Original issue reported on code.google.com by [email protected]
on 12 Feb 2011 at 8:41
Run the example code at http://www.ryandoherty.net/php-tvdb/ and you will
reproduce the 'Trying to get property of non-object' error when trying to
use the getEpisode method. As far as I can trace it the request function in
tvdb.class.php doesn't return anything when $params['action'] =
'get_episode' in v1.0.2
Original issue reported on code.google.com by [email protected]
on 17 Jun 2009 at 5:55
What steps will reproduce the problem?
1. when "$tvShows = TV_Shows::search($showname);" the returned xml is
echoed when doing an "ob_flush(); flush();"?
What is the expected output? What do you see instead?
expected to see nothing
What version of the product are you using? On what operating system?
1.0.2
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 2 Jun 2009 at 1:04
add to TVDB::fetchData
curl_setopt($ch, CURLOPT_ENCODING, "");
to enable gzip and speed up downloads
Original issue reported on code.google.com by [email protected]
on 19 Oct 2012 at 11:04
What steps will reproduce the problem?
1. Download and install fresh copy of files
2. Run example from Ryans Website
I have downloaded and install a fresh copy of the files. I have added my
API key. I then create a blank file and insert the following PHP example
from your website.
<?php
include('TVDB.php');
//Returns array of TV_Show objects matching
//'Battlestar Galactica'
$tvShows = TV_Shows::search("Battlestar Galactica");
$tvShow = $tvShows[0];
//'Battlestar Galactica (2003)'
echo $tvShow->seriesName;
//array('Edward James Olmos', 'Grace Park')
print_r($tvShow->actors);
//Fetch a specific episode. getEpisode($season, $episode)
$tvEpisode = $tvShow->getEpisode(2, 11);
//'Resurrection Ship (1)'
echo $tvEpisode->name;
//'The Battlestars Galactica and...'
echo $tvEpisode->overview;
?>
This results in the following error
Fatal error: Call to a member function getEpisode() on a non-object in
/home/usenettv/public_html/test2/index.php on line 17
I've been having a few problems with the code recently. The search by ID
function seems to be broken. The search by name function also seemed broken
but was fixed after changing my code, as outlined by Issue 2.
Using this method isn't as precise however, it also doesn't pull as much
information as search by ID does.
Original issue reported on code.google.com by [email protected]
on 17 Mar 2009 at 12:21
What steps will reproduce the problem?
I used a simple bit of code to test it.
include('TVDB.php');
$tvShows = TV_Shows::findById('75978');
$tvEpisode = $tvShows->getEpisodeByDate('20090308');
echo $tvEpisode->name;
What is the expected output? What do you see instead?
Fatal error: Call to a member function getEpisodeByDate() on a non-object
in /home/usenettv/public_html/test/test.php on line 24
What version of the product are you using? On what operating system?
Hosted on a linux server.
Please provide any additional information below.
I'm not sure whats changed since I last used this function.
Thanks
Original issue reported on code.google.com by [email protected]
on 13 Mar 2009 at 10:56
/**
* Get all episodes by show id
*
* @return array an array of TV_Episodes
**/
public function getAllEpisodes() {
$params = array('action' => 'get_all_episodes',
'show_id' => $this->id);
$data = self::request($params);
if($data)
{
$xml = simplexml_load_string($data);
$episodes = array();
foreach($xml->Episode as $episode)
{
$episodes[] = new TV_Episode($episode);
}
return $episodes;
}
else
{
return false;
}
}
Original issue reported on code.google.com by [email protected]
on 12 Apr 2012 at 5:54
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 20 Jan 2010 at 11:50
TV_Show::getSeason is returning episodes not TV_Episode objects.
Original issue reported on code.google.com by [email protected]
on 19 Oct 2012 at 11:03
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.