KRTirtho / spotube

🎧 Open source Spotify client that doesn't require Premium nor uses Electron! Available for both desktop & mobile!
https://spotube.krtirtho.dev/
Other
26.77k stars 1.09k forks source link

Spotube uses incorrect values for MPRIS position property #1521

Open AlephNought0 opened 2 months ago

AlephNought0 commented 2 months ago

Is there an existing issue for this?

Current Behavior

Spotube currently uses QVariant(qlonglong) for position property which makes it unable to fetch the proper position of the current playing media on Spotube.

Expected Behavior

Spotube should send the value of the property according to the freedesktop specifications. Mpris:Position is not a variant. See more here. https://specifications.freedesktop.org/mpris-spec/latest/Player_Interface.html#Property:Position

Steps to reproduce

  1. Open Spotube
  2. Try fetching Mpris position property from Spotube using playerctl or other means.
  3. The returned value does not reflect the actual position of the media

Operating System

Linux, NixOS

Spotube version

v3.6.0

Installation source

GitHub Releases (Binary)

Additional information

No response

Self grab

KRTirtho commented 2 weeks ago

That's a great finding. I think we've to just change the datatype to Time_in_Us

KRTirtho commented 2 weeks ago

Actually, we are using a library audio_service_mpris that implements the DBus interface for MediaPlayer2. So, it was sending the wrong types. Now, they've updated to freedesktop specifications. So it's just simple library update.

AlephNought0 commented 2 weeks ago

Actually, we are using a library audio_service_mpris that implements the DBus interface for MediaPlayer2. So, it was sending the wrong types. Now, they've updated to freedesktop specifications. So it's just simple library update.

That's great to hear!