2 require_once 'Services/MediaTomb.php';
4 function handleRequestMediatomb($fullPath, $prefix)
6 global $mediatomb, $host1;
10 $smt = new Services_MediaTomb($user, $pass, $host, $port);
12 $path = substr($fullPath, strlen($prefix));
13 $container = $smt->getContainerByPath($path);
15 addPreviousItem($listItems, $fullPath);
17 foreach ($container->getContainers() as $subContainer) {
18 $listItems[] = getDirItem(
20 pathEncode($fullPath . $subContainer->title) . '/'
24 foreach ($container->getItemIterator(false) as $item) {
25 $di = $item->getDetailedItem();
26 $itemUrl = $item->url;
27 if ($di->mimetype !== 'audio/mpeg') {
28 //noxon iRadio cube does not want to play .ogg files
29 $itemUrl = $host1 . 'transcode-nocache.php'
30 . '?url=' . urlencode($itemUrl);
32 $listItems[] = getEpisodeItem(
39 } catch (Exception $e) {
40 sendMessage('Mediatomb error: ' . $e->getMessage());
44 sendListItems($listItems);