Skip to content
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

MPRIS support broken since 0007bf6de2002398b54a7fcb88f5b620aadd981d #1449

Closed
maru-sama opened this issue May 3, 2024 · 8 comments · Fixed by #1453
Closed

MPRIS support broken since 0007bf6de2002398b54a7fcb88f5b620aadd981d #1449

maru-sama opened this issue May 3, 2024 · 8 comments · Fixed by #1453
Labels
bug Something isn't working

Comments

@maru-sama
Copy link

Describe the bug
Starting with 0007bf6 the playing song is no longer showing correctly but instead you get an unknown artist unknown title message. Going back one commit to 5b4a175 makes it work again.

To Reproduce
Steps to reproduce the behavior:

  1. Checkout 0007bf6
  2. Compile
  3. Start ncspot and check the mpris messages
  4. See error

Expected behavior
The artist and title should be displayed correctly

Screenshots
If applicable, add screenshots to help explain your problem.

System (please complete the following information):

  • OS: Linux
  • Terminal: kitty
  • Version: 0007bf6
  • Installed from: cargo
@maru-sama maru-sama added the bug Something isn't working label May 3, 2024
@maru-sama
Copy link
Author

Reverting to zbus 3.15 for testing fixes the issue for me.

@hrkfdn
Copy link
Owner

hrkfdn commented May 4, 2024

Thanks for the report. What are you using to see the MPRIS status so I can reproduce it?

Edit: Nevermind, can reproduce it with GNOME.

@maru-sama
Copy link
Author

Hi, gnome automatically displays controls once media is playing, while i see the controls I do not see the information. Let me try and get a screenshot.

@maru-sama maru-sama changed the title MPRIS support broken with 0007bf6de2002398b54a7fcb88f5b620aadd981d MPRIS support broken since 0007bf6de2002398b54a7fcb88f5b620aadd981d May 4, 2024
@hrkfdn
Copy link
Owner

hrkfdn commented May 4, 2024

I did some digging and the only difference I could spot so far is how the PropertiesChanged message structure has changed:

Old:

   array [
      dict entry(
         string "Metadata"
         variant             array [
               dict entry(
                  string "mpris:length"
                  variant                      int64 169887000
               )
               dict entry(
                  string "xesam:userRating"
                  variant                      double 0
               )
               dict entry(
                  string "xesam:artist"
                  variant                      array [
                        string "Thing"
                     ]
               )
               dict entry(
                  string "xesam:url"
                  variant                      string "https://open.spotify.com/track/4EPRCsMgi6sKI68VE6iads"
               )
               dict entry(
                  string "xesam:discNumber"
                  variant                      int32 1
               )
               dict entry(
                  string "xesam:title"
                  variant                      string "Past Love"
               )
               dict entry(
                  string "xesam:albumArtist"
                  variant                      array [
                        string "Thing"
                     ]
               )
               dict entry(
                  string "xesam:trackNumber"
                  variant                      int32 1
               )
               dict entry(
                  string "mpris:artUrl"
                  variant                      string "https://i.scdn.co/image/ab67616d0000b2739498ee18bdbdcf28e80ffa05"
               )
               dict entry(
                  string "xesam:album"
                  variant                      string "Past Love"
               )
               dict entry(
                  string "mpris:trackid"
                  variant                      object path "/org/ncspot/spotify/track/4EPRCsMgi6sKI68VE6iads"
               )
            ]
      )
   ]
   array [
   ]

New:

   array [
      dict entry(
         string "Metadata"
         variant             array [
               dict entry(
                  string "mpris:artUrl"
                  variant                      string "https://i.scdn.co/image/ab67616d0000b2739498ee18bdbdcf28e80ffa05"
               )
               dict entry(
                  string "mpris:length"
                  variant                      int64 169887000
               )
               dict entry(
                  string "mpris:trackid"
                  variant                      object path "/org/ncspot/spotify/track/4EPRCsMgi6sKI68VE6iads"
               )
               dict entry(
                  string "xesam:album"
                  variant                      string "Past Love"
               )
               dict entry(
                  string "xesam:albumArtist"
                  variant                      array [
                        string "Thing"
                     ]
               )
               dict entry(
                  string "xesam:artist"
                  variant                      array [
                        string "Thing"
                     ]
               )
               dict entry(
                  string "xesam:discNumber"
                  variant                      int32 1
               )
               dict entry(
                  string "xesam:title"
                  variant                      string "Past Love"
               )
               dict entry(
                  string "xesam:trackNumber"
                  variant                      int32 1
               )
               dict entry(
                  string "xesam:url"
                  variant                      string "https://open.spotify.com/track/4EPRCsMgi6sKI68VE6iads"
               )
               dict entry(
                  string "xesam:userRating"
                  variant                      double 0
               )
            ]
      )
   ]
   array [
      string "Metadata"
   ]

So at the end there is another array with a string containing Metadata. The same happens when the VolumeChanged signal is emitted. I could imagine this being the culprit, but not 100% sure. Also I don't know how to influence this behavior, yet.

@maru-sama
Copy link
Author

Hmm this explains why I see the info for a brief second after start. It shows the metadata but then it is getting cleared with the empty array.

@maru-sama
Copy link
Author

Hmm since it looks like that this is a zbus issue, what about reverting back to zbus 3.15 until it gets fixed?

@hrkfdn
Copy link
Owner

hrkfdn commented May 8, 2024

Looks like a fix is already in zbus, maybe we can update soon! :)

@maru-sama
Copy link
Author

Thanks I saw it as well, so I guess this will part of an upcoming 4.2.1 release. Since it is just visual issue and nothing breaks because of it I guess this can wait.

hrkfdn added a commit that referenced this issue May 10, 2024
hrkfdn added a commit that referenced this issue May 10, 2024
Would show unknown artist/title before. Fixed upstream via zbus upgrade to 4.2.1.

Fixes #1449

See also:
- dbus2/zbus#765
hrkfdn added a commit that referenced this issue May 10, 2024
Would show unknown artist/title before. Fixed upstream via zbus upgrade to 4.2.1.

Fixes #1449

See also:
- dbus2/zbus#765
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants