01-11-2021, 08:54 PM
Here is the code block in playerlib.php. Maybe some debug lines need to be added in order to verify that in fact the line $current['coverurl'] = getUpnpCoverUrl(); is being executed.
Code:
// Song file, UPnP URL or Podcast
else {
$current['artist'] = isset($song['Artist']) ? $song['Artist'] : 'Unknown artist';
$current['title'] = isset($song['Title']) ? $song['Title'] : pathinfo(basename($song['file']), PATHINFO_FILENAME);
$current['album'] = isset($song['Album']) ? $song['Album'] : 'Unknown album';
$current['disc'] = isset($song['Disc']) ? $song['Disc'] : 'Disc tag missing';
if (substr($song['file'], 0, 4) == 'http') {
// Podcast
if (isset($_SESSION[$song['file']])) {
$current['coverurl'] = LOGO_ROOT_DIR . $_SESSION[$song['file']]['name'] . ".jpg";
$current['artist'] = 'Radio station';
$current['album'] = $_SESSION[$song['file']]['name'];
}
// UPnP file
else {
$current['coverurl'] = getUpnpCoverUrl();
}
}
// Song file
else {
$current['coverurl'] = '/coverart.php/' . rawurlencode($song['file']);
}
// In case 2 url's are returned, use the first
$current['coverurl'] = explode(',', $current['coverurl'])[0];
if (substr($song['file'], 0, 4) == 'http') {
//workerLog('enhanceMetadata(): UPnP url');
}
else {
//workerLog('enhanceMetadata(): Song file');
}
}