Quick hack to generate xmltv listings from TVxb style .ini files.
*/
+// seriously it's this bad..
+error_reporting(E_ALL & ~E_STRICT &~E_NOTICE);
+
+
if (!extension_loaded('mbstring')) {
$res = $this->$method($ddata,$cols,date('Y-m-d',$dn));
if (is_string($res)) {
$start = $res;
- $use_cols =0;
+ $use_cols =0;
continue;
}
if (!is_array($res)) {
}
$day_id = strtotime($start) + (($i * $use_cols ) * 24 * 60 * 60 );
+ //print_r($res);
+
if (empty($this->schedule[$chid][$day_id])) {
$this->schedule[$chid][$day_id] = array();
}
- $this->schedule[$chid][$day_id] += $res;
+ $this->schedule[$chid][$day_id] = array_merge($this->schedule[$chid][$day_id], $res);
}
return;
}
- function parseJade($data, $colnames)
+ function parseJade($data, $colnames, $day=0)
{
$rows = preg_split('#</li>#i', $data);
$r = str_ireplace(' ',' ', $r);
$rdata = array();
- list($time,$r) = explode('</span>', $r, 2);
+ @list($time,$r) = explode('</span>', $r, 2);
$rdata['hour'] = trim(strip_tags($time));
if (!strlen($rdata['hour'])) {
if (isset($lines[1]) && preg_match('/<div/', trim($lines[1]))) {
preg_match('/<BR>([0-9]{4}-[0-9]{2}-[0-9]{2})/i', $lines[1], $matches);
- var_dump($matches[1]);
+ //var_dump($matches[1]);
return $matches[1];
}
//return;
array_shift($rows);
-
+ $ret = array();
//$day = false;
foreach($rows as $r) {
//print_r($r);
- $c = $kv[1];
+ $c = isset($kv[1]) ? $kv[1] : '';
$c = str_ireplace('<br>',' ', $c);
$c = str_ireplace(' ',' ', $c);
$c = str_replace("\n",' ', $c);