2 require_once 'Services/MediaTomb.php';
4 function handleRequestMediatomb($fullPath, $prefix)
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 if ($di->mimetype !== 'audio/mpeg') {
27 //noxon iRadio cube does not want to play .ogg files
28 //FIXME: convert to mp3
29 //$di->location (on the server)
31 $listItems[] = getEpisodeItem(
38 } catch (Exception $e) {
39 sendMessage('Mediatomb error: ' . $e->getMessage());
43 sendListItems($listItems);