Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: currentsong.txt is updated too often
#2
Here is the patch

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
Reply


Messages In This Thread
currentsong.txt is updated too often - by AkelGe - 02-19-2024, 09:44 AM
RE: currentsong.txt is updated too often - by AkelGe - 02-19-2024, 11:27 AM

Forum Jump: