From 8fdfc489b70be00aeabbfa97205725fd652fd2ae Mon Sep 17 00:00:00 2001 From: DariusIII Date: Fri, 30 Oct 2015 10:07:22 +0100 Subject: [PATCH] Revert the change --- libs/JPinkney/TVMaze/Client.php | 1 - libs/JPinkney/TVMaze/TVShow.php | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/JPinkney/TVMaze/Client.php b/libs/JPinkney/TVMaze/Client.php index 771fef7f2..ef74112d9 100644 --- a/libs/JPinkney/TVMaze/Client.php +++ b/libs/JPinkney/TVMaze/Client.php @@ -37,7 +37,6 @@ class Client { $url = self::APIURL . "/search/shows?q=" . urlencode($show_name); $shows = $this->getFile($url); - var_dump($shows); $relevant_shows = array(); foreach($shows as $series) { diff --git a/libs/JPinkney/TVMaze/TVShow.php b/libs/JPinkney/TVMaze/TVShow.php index c08ff8f0a..6ef5c709b 100644 --- a/libs/JPinkney/TVMaze/TVShow.php +++ b/libs/JPinkney/TVMaze/TVShow.php @@ -93,7 +93,6 @@ class TVShow extends TVProduction{ function __construct($show_data){ parent::__construct($show_data); $this->type = $show_data['type']; - $this->episodes = $show_data['_embedded']['episodes']; $this->language = $show_data['language']; $this->genres = $show_data['genres']; $this->status = $show_data['status']; @@ -110,7 +109,7 @@ class TVShow extends TVProduction{ $this->akas = (isset($show_data['_embedded']['akas']) ? $show_data['_embedded']['akas'] : null); $current_date = date("Y-m-d"); - foreach($this->episodes as $episode){ + foreach($show_data['_embedded']['episodes'] as $episode){ if($episode['airdate'] >= $current_date){ $this->nextAirDate = $episode['airdate']; $this->airTime = date("g:i A", $episode['airtime']);