Skip to content

Comments

widgets/now_playing_mpris: rewrite#84

Open
acrisci wants to merge 1 commit intoLokaltog:developfrom
acrisci:feature/mpris-rewrite
Open

widgets/now_playing_mpris: rewrite#84
acrisci wants to merge 1 commit intoLokaltog:developfrom
acrisci:feature/mpris-rewrite

Conversation

@acrisci
Copy link

@acrisci acrisci commented May 10, 2014

Improve render quirks and support configuration-free mpris widget
suitable for use with multiple media players.

The widget polls for mpris players. When it finds one, it subscribes to
events and updates the player status appropriately.

If no player name is configured, when the player exits, polling starts
again for another player.

Improve render quirks and support configuration-free mpris widget
suitable for use with multiple media players.

The widget polls for mpris players. When it finds one, it subscribes to
events and updates the player status appropriately.

If no player name is configured, when the player exits, polling starts
again for another player.
@acrisci
Copy link
Author

acrisci commented May 10, 2014

Sorry for the rewrite, but this was the easiest way for me to do it given the new things I wrote into the library to make this possible.

I think the configuration-free aspect of this is important because without it, people don't have to know what dbus is. With configuration, people have to know what a dbus interface is.

On that, I would like to see "mpris" taken out of the name, because nobody knows what that is.

@Lokaltog
Copy link
Owner

Looks great! I'm thinking we could possibly join this widget and now_playing_mpd into a common now_playing widget that attempts to automatically detect any running media player, which works with both mpd and mpris players. It could work without configuration by polling for any player which is "playing" or "paused" ("stopped" should hide the widget), and use the first one it comes across. By doing this we could also use one widget in the theme instead of having it split up.

I'm thinking that we could create a new subdirectory (src/widgets/now_playing), and have separate C files for mpris, mpd and any other players to maintain encapsulation. What do you think?

@acrisci
Copy link
Author

acrisci commented May 10, 2014

I think that makes sense.

I think I am going to add a server class to playerctl so I can write wrappers for the other players. Depending on how that goes, it might be enough to just use the mpris wrappers and only have one widget for mpd, cmus, etc.

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

Successfully merging this pull request may close these issues.

2 participants