azymohliad / watchmate

PineTime smart watch companion app for Linux phone and desktop
GNU General Public License v3.0
136 stars 4 forks source link

Media Player doesn't work with Cozy #26

Closed steve5289 closed 7 months ago

steve5289 commented 1 year ago

Not sure if this is a Cozy, Infinitime, or watchmate issue.

What I see

When cozy is running(whether it is playing anything makes no difference):

Things Attempted

  1. I tried playing a 1 minute audiobook chapter just in case it was an overflow issue(most audiobook chapters have far greater run lengths than music). No effect.
  2. Resetting the pinetime (holding the button down until it resets). No effect

Software Versions

Cozy: https://github.com/geigi/cozy

azymohliad commented 1 year ago

Thanks! It is a WatchMate issue, I reproduced and found the rootcause (Cozy doesn't have LoopStatus property, and WatchMate hangs media player control session waiting for it, even though it's optional by the standard). Looking for the best fix now

azymohliad commented 1 year ago

It actually seems to be a Cozy issue, missing property requests shouldn't hang the client (details are here). It can be worked around in WatchMate, but not without tradeoffs. The easiest thing WatchMate could do is to not read loop and shuffle statuses at all (Infinitime doesn't display them currently anyway), but Infinitime has API for setting them, so I'd prefer to preserve the full implementation, in case Infinitime starts displaying those at some point.

I might contribute the fix to Cozy a bit later if that would help to resolve it faster, it is pretty simple.

steve5289 commented 1 year ago

Let me see if I can figure it out. I'm trying to learn how to develop using gtk and you've pointed me in a direction that I think I can dig into. If it's ok I may ask some questions.

azymohliad commented 1 year ago

Well, there's no GTK really involved in the fix (unless you mean the stack beneath it too, such as GIO D-Bus helpers). I think what I described in my Cozy bug report would be the whole fix. I'd wait for Cozy maintainers to respond there, just to be sure they agree with it, and maybe they have a specific preferred way to implement it (for example, raise an exception in MPRIS.Get(), or keep MPRIS class intact, and rather process its return value in Server.on_method_call. Although maybe they would prefer a PR already, idk. I'm of course happy to answer any questions as much as my knowledge allows

steve5289 commented 1 year ago

I've mostly just written daemons, and command line based stuff so to me it's the audio/visual stuff that I'm trying to learn how it all works enough to be competent at writing/maintaining it.

Ok, I'll hold off on creating something for this issue, yeah your bug report basically spells out the exact proposed solution. Your explanation of this issue has helped me understand another bug in cozy that I'll try to track down though.

azymohliad commented 11 months ago

Hey, just FYI I submitted a fix here, in case you'd want to try it. I guess Cozy dev isn't actively working on the app atm, so I figured it would be more useful to submit a patch.

I also noticed that turning the volume down to 0 with PineTime/WatchMate (or any other MPRIS client) would break Cozy media player control again, but that might be a GStreamer issue (more details here).

grahamvh commented 11 months ago

Hey! thanks for looking into this! I gave it a try, and it seems to work well for me.

azymohliad commented 7 months ago

Hey, so the fix was merged in Cozy and will be included in its next release, so I'm closing the issue here