03-03-2025, 11:00 PM
(03-03-2025, 10:14 PM)Tim Curtis Wrote:(03-03-2025, 05:59 PM)romain Wrote:(03-03-2025, 05:49 PM)Tim Curtis Wrote: That could work.
On the other hand I have no idea how the HD badge is displayed
Have a look at the } else { block around line 685
I can determine if the stream is HD by comparing bit depth and sample rate and tried this
PHP Code:
$result = sysCmd('mediainfo --Inform="Audio;file:///var/www/util/mediainfo.tpl" ' . '"' . $songData['file'] . '"');
$bitDepth = $result[0];
$sampleRate = $result[1];
$channels = $result[2];
$format = $result[3];
$hiDef = ($bitDepth > ALBUM_BIT_DEPTH_THRESHOLD ||
$sampleRate > ALBUM_SAMPLE_RATE_THRESHOLD) ? 'h' : 's';
$encodedAt = 'UPnP ' . $format . ' ' . $bitDepth . '/' . formatRate($sampleRate) . ' kHz'. ',' . $hiDef . ',' . $channels . 'ch';
/* $encodedAt = 'UPnP ' . $format . ' ' . ($bitDepth == '?' ?
formatRate($sampleRate) . 'kHz' :
$bitDepth . '/' . formatRate($sampleRate) . ' kHz, ' . $channels . 'ch'); */
of course I miss something to get the HD badge displayed because as a result I get this