mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-06 03:49:56 +02:00
Fix UPnP browse (beautiful url setting required)
This commit is contained in:
parent
aa54f4952b
commit
073899b399
2 changed files with 7 additions and 3 deletions
|
@ -585,7 +585,7 @@ class Upnp_Api
|
|||
'childCount' => $album->song_count,
|
||||
'dc:title' => $album->f_title,
|
||||
'upnp:class' => 'object.container',
|
||||
'upnp:album_art'=> $art_url,
|
||||
//'upnp:album_art'=> $art_url,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -615,6 +615,7 @@ class Upnp_Api
|
|||
{
|
||||
$api_session = (AmpConfig::get('require_session')) ? Stream::$session : false;
|
||||
$art_url = Art::url($song->album, 'album', $api_session);
|
||||
|
||||
$fileTypesByExt = self::_getFileTypes();
|
||||
$arrFileType = $fileTypesByExt[$song->type];
|
||||
|
||||
|
@ -623,7 +624,7 @@ class Upnp_Api
|
|||
'parentID' => $parent,
|
||||
'dc:title' => $song->f_title,
|
||||
'upnp:class' => (isset($arrFileType['class'])) ? $arrFileType['class'] : 'object.item.unknownItem',
|
||||
'upnp:album_art'=> $art_url,
|
||||
//'upnp:album_art'=> $art_url,
|
||||
'dc:date' => date("c", $song->addition_time),
|
||||
'res' => Song::play_url($song->id),
|
||||
'size' => $song->size,
|
||||
|
|
|
@ -7,6 +7,8 @@ if (!AmpConfig::get('upnp_backend')) {
|
|||
exit;
|
||||
}
|
||||
|
||||
set_time_limit(600);
|
||||
|
||||
header ("Content-Type: text/html; charset=UTF-8");
|
||||
$rootMediaItems = array();
|
||||
$rootMediaItems[] = Upnp_Api::_musicMetadata('');
|
||||
|
@ -83,7 +85,7 @@ $rootMediaItems[] = Upnp_Api::_musicMetadata('');
|
|||
|
||||
$totMatches = count($items);
|
||||
if ($totMatches == 0) {
|
||||
$domDIDL = _createDIDL('');
|
||||
$domDIDL = Upnp_Api::createDIDL('');
|
||||
$numRet = 0;
|
||||
} else {
|
||||
if ($upnpRequest['requestedcount'] == 0) {
|
||||
|
@ -99,4 +101,5 @@ $rootMediaItems[] = Upnp_Api::_musicMetadata('');
|
|||
$soapXML = $domSOAP->saveXML();
|
||||
|
||||
echo $soapXML;
|
||||
debug_event('upnp', 'Response: ' . $soapXML, '5');
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue