hoyon / mpv-mpris

MPRIS plugin for mpv
MIT License
607 stars 35 forks source link

Inconsistant shuffle reporting. #109

Open LurkAndLoiter opened 2 months ago

LurkAndLoiter commented 2 months ago

Long poll the shuffle status. This will check the shuffle status every tenth of a second and print the status if changed.

#!/usr/bin/sh

old_shuf_stat=''

while true;do
  shuf_stat=$(gdbus introspect -p --session --dest "org.mpris.MediaPlayer2.mpv" --object-path /org/mpris/MediaPlayer2 | awk -F"= |;" '/Shuffle/{print $2}') 
  [ "$shuf_stat" != "$old_shuf_stat" ] && echo $shuf_stat && old_shuf_stat="$shuf_stat"
  sleep 0.1
done

Recreate: have a mpv instance playing or paused audio file. Run above code to poll the shuffle status. Expectation: print if shuffle state is altered by user. Actual: prints on shuffle changes sporadically ( several time a minute ) regardless of any users input.

I expect this is a mpv issue/design choice. Posting here for good measure just in case.