$sx = simplexml_load_file($cacheFile);
$listItems = array();
- addPreviousItem($listItems, $path);
foreach ($sx->channel->item as $item) {
$title = (string) $item->title;
$desc = (string) $item->description;
$url = $item->enclosure['url'];
- $listItems[] = '<Item>'
- . '<ItemType>ShowEpisode</ItemType>'
- . '<ShowEpisodeName>' . utf8_decode(htmlspecialchars($title)) . '</ShowEpisodeName>'
- . '<ShowEpisodeURL>' . $host1 . 'play-url?url=' . urlencode($url) . '</ShowEpisodeURL>'
- . '<ShowDesc>' . utf8_decode(htmlspecialchars($desc)) . '</ShowDesc>'
- . '<ShowMime>MP3</ShowMime>'
- . '</Item>';
+ $listItems[] = getEpisodeItem(
+ $title,
+ $host1 . 'deredirect.php?url=' . urlencode($url),
+ $desc,
+ 'MP3'
+ );
}
- sendListItems($listItems);
+ sendListItems($listItems, buildPreviousItem($path));
}