-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add a blocking status query #37
Comments
Hi, That's already possible with the library. A script to do this might be a good contribution. |
A command like |
Yeah, actually I think we can do this.
|
Ok how should this work? Here are the issues:
Does anyone have any thoughts? |
Hey,
|
Yeah I think we'll block if the player isn't up and connect to any player that matches when it shows up.
Would it be enough to extend the format template language to add a
Yes, there are two cases here. Either there is no song because the player has exited, or no song because the player has stopped. Empty line would work here, but you can't distinguish between those two cases then.
Yes, anything is possible. But the rules on this are going to be very subtle because there's a lot of edge cases with the players coming and going. The details will be noticible. |
I'm not sure if that approach makes the point clear to the user. Having a default per variable makes it sound like a beautifier for some missing data, instead of a feature needed in order to distinguish all metadata being empty from no song being played. I like the
This is right, but I don't think it matters to the user. There is no active playback, no matter the cause.
We can default to output lines for any player when the state changes, and only for a given player if |
Yeah that seems like the most intuitive thing to do. I was thinking about a case where we could inject other variables into the template context for metadata on demand like |
Yeah, there's one edge case I can think of here when multiple players are given. If I do The rule is pretty simple. If a new player shows up, just rerun the selection algorithm. It's also conceptually a bit simpler because you don't have to worry about what player you ran last. You can just look at the output and if vlc is up, then that's it. It also allows the user to express that the first player in the list is more important and takes precedence. There might be good arguments against it though. |
Ok I just committed something in the master branch. Please test and let me know what you think about the behavior, especially with opening up new players and passing multiple players. |
I wasn't even thinking about the possibility of supplying multiple players, but that would be cool. Either the priority approach you mentioned would be fine, or perhaps even a pure whitelist approach where only the players passed will be shown but in a fcfs basis. Either is fine to me as long as it's documented, since as I said I think it's not a common use case specifying more than one player and wanting one to take precedence over the other.
Sure, I'll give it a quick look and come back with some feedback. |
I'm back.
Also, regarding the help message:
I haven't been able to reproduce this behavior, playerctl blocks until a new player appears and then shows the info (which in fact it is what I think is better (help typo?)) Also I'm having some issues by attaching this to polybar, but it's probably my fault so I'll come back with more feedback when I get it working. |
What player is this? I haven't gotten this message but I can try to reproduce it.
Yeah, that's where I ended up with it. When multiple players are matched, the default is to only attach to the one with the highest priority. Pass |
I got the non-existing behavior by not supplying neither
Rhythmbox (which is terrible but the only thing supporting ampache afaik). |
this would enable waiting for song changes etc.
The text was updated successfully, but these errors were encountered: