03-06-2025, 11:36 AM
(03-06-2025, 10:38 AM)romain Wrote:(03-06-2025, 10:27 AM)Tim Curtis Wrote: Whats already shown is the REMAINING_TRACK_TIME.
So maybe something like
REMAINING_TRACK_TIME / VOLUME_DB
Yes, something like that
I have fetched formatted track time in music-libary.php with
PHP Code:formatSongTime(songData['Time']);
but I don't know where to put it to display something like ELAPSED_TIME/TOTAL_TRACK_TIME just below the decodedAt information for example. Volume in dB could be displayed below time info or after separated by a comma as for extra metadata
The track duration comes from the MPD.json array thats returned to the front-end by engine-mpd.php. Volume dB (mapped_db_vol) is also in that array. The duration is in seconds.ms. The countdown time (remaining_time) is a computed value using jQuery $('#countdown-display').countdown().
All in /var/www/js/playerlib.js
To see this array open the Browser console and type in MPD.json; You should be able to browse all the elements.
One challenge with adding " / total" or " / total / NdB" to CoverView is that it requires new HTML and associated show/hide/blank JS code in playerlib.js. Have a look at function updKnobAndTimeTrack() and variable "mapped_db_vol" to get a sense of whats needed.