public function doParseOnDirectories(&$xml, &$media_url, &$plugin_cookies) { hd_print(__METHOD__); $items = array(); foreach ($xml->Directory as $c) { // hd_print('media_url->key =' . $media_url->key . ' c->attributes()->key = ' . (string)$c->attributes()->key ); if (!HD::starts_with((string) $c->attributes()->key, '/')) { // hd_print((string)$c->attributes()->key . ' não começa com /'); $key = $media_url->key . '/' . (string) $c->attributes()->key; } else { // hd_print((string)$c->attributes()->key . ' começa com /'); $key = (string) $c->attributes()->key; } $title = (string) $c->attributes()->title; $summary = (string) $c->attributes()->summary; $url = $this->base_url . $key; $cache_file_name = "channel_{$title}.jpg"; $settings = (string) $c->attributes()->settings; $search = (string) $c->attributes()->search; $prompt = (string) $c->attributes()->prompt; $art = $c->attributes()->art ? (string) $c->attributes()->art : (string) $xml->attributes()->art; hd_print('art= ' . $art); $type = !$settings ? TYPE_DIRECTORY : TYPE_CONF; $type = !$search ? $type : TYPE_SEARCH; $parameters = array('key' => $key, 'type' => $type, 'params' => $art ? array('art' => $this->base_url . $art) : null); $items[] = array(PluginRegularFolderItem::media_url => $this->getNextScreen($parameters), PluginRegularFolderItem::caption => $title, PluginRegularFolderItem::view_item_params => array(ViewItemParams::icon_path => $this->getThumbURL($c), ViewItemParams::item_detailed_icon_path => $this->getThumbURL($c))); } return $items; }