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

playlist-count not updating properly when observed #3267

Closed
j-holub opened this issue Jun 20, 2016 · 3 comments
Closed

playlist-count not updating properly when observed #3267

j-holub opened this issue Jun 20, 2016 · 3 comments

Comments

@j-holub
Copy link

j-holub commented Jun 20, 2016

mpv version and platform

  • OS X 10.11.5
  • mpv 0.17.0

Expected behavior

I'm creating a node package to control mpv via the Json IPC protocol right now and stumbled into some bug, or at least I think it is one.

I use the observe_property to keep track of various properties, such as "playlist-count"

If I remove a song or add a song to the playlist, I would expect to get a property-change message.

Actual behavior

I don't get any message. But when I get a "playlist-pos" property-change message (which I have observed as well), receive a property-change message for "playlist-count", too.

When I only observe "playlist-pos", a playlist-remove command triggers a property-change message. 'load file' (appending) however does not.

I checked with get_property that "playlist-count" was correctly updated.

Reproduction steps

Open a running instance of mpv with more than 1 song.

mov /Folder/containing/more/than/one/song --input-ipc-socket=/tmp/mpv.sock

In another terminal open Socat

socat - UNIX-CONNECT:/tmp/node-mpv.sock   

and enter the commands to observe the property

{"command": ["observe_property", 1, "playlist-count"]}
{"command": ["observe_property", 2, "playlist-pos"]}

In a 3rd terminal send a playlist-remove and a loadfile message.

echo '{"command": ["playlist-remove", 2]}' | socat - /tmp/mpv.sock
echo '{"command": ["loadfile", "/some/song.mp3", "append"]}' | socat - /tmp/mpv.sock

Log files

http://sprunge.us/bgAg

@ghost
Copy link

ghost commented Jun 20, 2016

Yeah, that has to be explicitly handled in the mpv code. I suppose currently it only triggers a notification if you actually start/end playback of a file.

@ghost ghost closed this as completed in 22291a2 Jun 20, 2016
@ghost
Copy link

ghost commented Jun 20, 2016

I hope it works now. I didn't actually test it.

@j-holub
Copy link
Author

j-holub commented Jun 20, 2016

I just tested it with the latest build and can confirm, that it is working properly as expected. Thank you very much for addressing this so quickly.

This issue was closed.
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