foo_discord_rich icon indicating copy to clipboard operation
foo_discord_rich copied to clipboard

only shows HDCD info when manually selecting track

Open bsdinis1 opened this issue 1 year ago • 1 comments

I am using the following for the Top section: [%album artist% - ][%date% - ][%album%][ '['$meta(DISCID)']'][ '['Disc %discnumber%/%totaldiscs%']'] | [%codec%]$if($info(hdcd),' HDCD') [%bitrate%]kbps $if($stricmp($info(encoding),lossless),[%__bitspersample%]bit,) $div(%samplerate%,1000)$replace($insert($right($div(%samplerate%,100),1),.,0),.0,)kHz

This piece of code $if($info(hdcd),' HDCD') only shows "HDCD" when I manually select a track to play, when the track ends and the next one starts playing automatically, "HDCD" is no longer shown until I manually select a track to play.

The same applies to the shown bitdepth $if($stricmp($info(encoding),lossless),[%__bitspersample%]bit,), it shows "24-bit" when track is manually selected, but the tracks that play automatically will only show "16-bit".

incorrect HDCD info image

correct HDCD info when I manually change to that same track image

bsdinis1 avatar Oct 16 '23 05:10 bsdinis1

Might be coz it sends data at the beginning and doesn't update it afterwards, the same thing I have with streamed audio when the bitrate is reported only while decoding so doesn't get updated. Auto-update period would likely fix that I think but there isn't any :(

RadegasTCZ avatar Nov 01 '23 20:11 RadegasTCZ

Auto-update period would likely fix that

I might add auto-update (radio seems to be a valid use-case), but it will be really far from real-time updates, since Discord only allows to update status once per 15 seconds.

TheQwertiest avatar Aug 03 '24 19:08 TheQwertiest

once/15sec is perfectly fine in my opinion, it could also benefit from some routine when it detects if there are variables, such as bitrate or HDCD, radio station updates song title and whatnot and then have that 15 second delay if that's possible

RadegasTCZ avatar Aug 03 '24 21:08 RadegasTCZ

Note to self: track name change (e.g. radio) is already handle by on_playback_dynamic_info_track

TheQwertiest avatar Aug 05 '24 11:08 TheQwertiest