Here is the patch
in file /var/www/daemon/worker.php, line 1732
replace
with
This way the comparison is exactly identical and we keep in account the bitrate too.
With this the currentsong.txt file is updated ONLY when there are changes and if the status is paused or stopped, there is no update
in file /var/www/daemon/worker.php, line 1732
replace
PHP Code:
if ($current['title'] != $fileMeta['title'] || $current['album'] != $fileMeta['album'] || $_SESSION['volknob'] != $fileMeta['volume'] || $_SESSION['volmute'] != $fileMeta['mute'] || $current['state'] != $fileMeta['state'] || $fileMeta['outrate'] != $hwParamsFormat . $hwParamsCalcrate) {
with
PHP Code:
if ($current['title'] != $fileMeta['title'] || $current['album'] != $fileMeta['album'] || $_SESSION['volknob'] != $fileMeta['volume'] || $_SESSION['volmute'] != $fileMeta['mute'] || $current['state'] != $fileMeta['state'] || $fileMeta['outrate'] != $current['output'] . $hwParamsCalcrate || $fileMeta['bitrate'] != $current['bitrate']) {
This way the comparison is exactly identical and we keep in account the bitrate too.
With this the currentsong.txt file is updated ONLY when there are changes and if the status is paused or stopped, there is no update
Location: Malaga, Spain | RPi4 / HifiBerry DAC+ / Teac A-H300