Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistant shuffle reporting. #109

Open
LurkAndLoiter opened this issue Aug 31, 2024 · 0 comments
Open

Inconsistant shuffle reporting. #109

LurkAndLoiter opened this issue Aug 31, 2024 · 0 comments

Comments

@LurkAndLoiter
Copy link

LurkAndLoiter commented Aug 31, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant