1
0
Fork 0

Handle shows without series and correctly affiliate title with title and series with series.

This commit is contained in:
Andrew Tomaka 2011-10-14 01:10:57 -04:00
parent ea4f928110
commit ac6516bad7
2 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@ $dataSources = array(
'lastfm' => 60,
'sc2ranks' => 43200,
'steam' => 3600,
//'wow' => 43200,
'wow' => 43200,
);
$cacheData = json_decode(file_get_contents($CACHE_FILE),true);
@ -131,8 +131,8 @@ function hulu() {
preg_match('/<img src="(.*)" align="right"/',(string)$lastShow->description,$thumb);
return array(
'title' => $title[2],
'series' => $title[0],
'series' => isset($title[2]) ? $title[2] : 'Not Available',
'title' => $title[0],
'time' => strtotime($lastShow->pubDate),
'url' => (string)$lastShow->link,
'thumb' => $thumb[1],

View File

@ -111,8 +111,8 @@ $links = $db->query("SELECT id,url,text,status,released_date FROM wia_links WHER
</td>
<td class="top">
<span class="right"><a href="http://www.hulu.com/profiles/atomaka"><img src="img/badges/hulu.png" class="icon" alt="Hulu" /></a></span>
<a href="<?php echo $data->hulu->url ?>"><?php echo $data->hulu->series ?></a><br/>
from <?php echo $data->hulu->title ?><br/><br/>
<a href="<?php echo $data->hulu->url ?>"><?php echo $data->hulu->title ?></a><br/>
from <?php echo $data->hulu->series ?><br/><br/>
<?php echo time_since($data->hulu->time) ?> ago<br/>
</td>
</tr>