CDrummond / cantata

Qt5 Graphical MPD Client
GNU General Public License v3.0
1.05k stars 184 forks source link

better mpris2 support #190

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The current mpris2 support is good, but it doesn't provide support for the 
progress bar.  Also, the "Now Playing" plasma widget allows you to pause the 
music, but not unpause.

Original issue reported on code.google.com by ryan...@gmail.com on 20 Mar 2013 at 4:00

GoogleCodeExporter commented 9 years ago
Umm, yes the current mpris interface *does* support the progress bar, try:

qdbus com.googlecode.cantata /org/mpris/MediaPlayer2 
org.mpris.MediaPlayer2.Player.Position

...this will return the position.

Play/Pause also work:

qdbus com.googlecode.cantata /org/mpris/MediaPlayer2 
org.mpris.MediaPlayer2.Player.Play
qdbus com.googlecode.cantata /org/mpris/MediaPlayer2 
org.mpris.MediaPlayer2.Player.Pause

...as to why the 'Now playing' applet does not work, I dont know. I'm no expert 
on MPRIS. However, Cantata is fully controllable via Unity's soundmenu - and 
this uses MPRIS.

Original comment by craig.p....@gmail.com on 20 Mar 2013 at 10:31

GoogleCodeExporter commented 9 years ago
OK, I spoke too soon!!! Looks like Cantata's MPRIS times are wrong - its 
outputting seconds, but MPRS seems to want micro seconds. Also, the 
CanPlay/CanPause states need to be set in the properties!

I'll fix these for the next release.

Original comment by craig.p....@gmail.com on 20 Mar 2013 at 11:41

GoogleCodeExporter commented 9 years ago
Fixed, in trunk.

Original comment by craig.p....@gmail.com on 20 Mar 2013 at 7:37

GoogleCodeExporter commented 9 years ago
Cool!  Works much better, play/pause works from the Now Playing widget.

There is an issue however, the progress bar works initially, but when it 
switches to the next song, the progress bar stops working.  When I hit 
play/pause it starts working properly.

If I click next, or use ncmpcpp to go to the next song, it either displays the 
wrong position for the progress bar (part of the way through the song even 
though it should be at the beginning) or it doesn't display the progress at all 
(similar behavior to what happened when it was outputting in seconds)

This seems to point at an issue with reporting the progress time when changing 
songs.  Maybe it needs to be refreshed?  Thanks for the quick response! :)

Original comment by ryan...@gmail.com on 22 Mar 2013 at 5:41

GoogleCodeExporter commented 9 years ago
Also I should note, it doesn't update the progress bar when you seek (fast 
forward or go backward within the song.  It keeps going as if the seek never 
happens.  This is likely related to the other issue.

Original comment by ryan...@gmail.com on 22 Mar 2013 at 5:45

GoogleCodeExporter commented 9 years ago
OK, I obviously set this to 'fixed' too soon! Sorry :-)

Should now (hopefully!) be fixed in trunk. Please check.

Original comment by craig.p....@gmail.com on 22 Mar 2013 at 9:18

GoogleCodeExporter commented 9 years ago
It works better now.  However, after a few songs it goes back to not being 
reported.  Going to the next song or playing/pausing makes it work again.

Original comment by ryan...@gmail.com on 23 Mar 2013 at 2:18

GoogleCodeExporter commented 9 years ago
I've made some more changes, can you please update and try again?

Also - you filed bug #189, but have not answered my questions relating to it.

Original comment by craig.p....@gmail.com on 24 Mar 2013 at 4:39

GoogleCodeExporter commented 9 years ago
Unfortunately I am no longer on openSUSE/KDE so I can't test it.  Thanks for 
working on this though, hopefully it benefits someone.

Original comment by ryan...@gmail.com on 24 Mar 2013 at 6:19

GoogleCodeExporter commented 9 years ago
Bug appears to now be fixed for me - and as you are no longer using KDE, I'm 
assuming you cannot check.

Original comment by craig.p....@gmail.com on 26 Mar 2013 at 1:12