szclsya / mpdris2-rs

Exposing MPRIS V2.2 D-Bus interface for mpd
GNU General Public License v3.0
31 stars 1 forks source link

Mpdris not updating tracks after starting #6

Closed VitoFe closed 1 year ago

VitoFe commented 1 year ago

After starting the mpdris2-rs service KDE can read the track playing, but then when changing tracks it can't anymore, it still shows the first track.

System info: Arch Linux, KDE Plasma v: 5.27.6 tk: Qt v: 5.15.10 wm: kwin_wayland Music Player Daemon 0.23.13 mpdris2-rs 0.1.4-0

This is the output of systemctl --user status mpdris2-rs

systemd[1348]: Starting Music Player Daemon D-Bus Bridge...
systemd[1348]: Started Music Player Daemon D-Bus Bridge.
mpdris2-rs[45030]:  INFO [mpdris2_rs] Notification enabled, starting notification sender...
mpdris2-rs[45030]:  INFO [mpdris2_rs] Service started.
mpdris2-rs[45030]: ERROR [mpdris2_rs::plugins::fdo_notification] NotificationRelay dead, restarting. Reason: org.freedesktop.Notifications.Error.ExcessNotificationGeneration: Created too many similar>

EDIT:

It seems like this zombified state is easily triggered by changing tracks fast. Then the thing will be out of sync from mpd and will need a systemct --user restart mpdris2-rs in order to sync again. Any solutions?

szclsya commented 1 year ago

Can you try to run it with -v flag? So it will be mpdris2-rs -v. It should spit out more debug information so I can try to figure out the root of the problem.

VitoFe commented 1 year ago

Can you try to run it with -v flag? So it will be mpdris2-rs -v. It should spit out more debug information so I can try to figure out the root of the problem.

DEBUG [mpdris2_rs::mpd::client] Issuing command to MPD: status DEBUG [mpdris2_rs::mpd::client] Command status returned DEBUG [mpdris2_rs::mpd::client] Issuing command to MPD: currentsong DEBUG [mpdris2_rs::mpd::client] Command currentsong returned DEBUG [mpdris2_rs::mpd::client] Issuing command to MPD: readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 0 DEBUG [mpdris2_rs::mpd::client] Command readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 0 returned DEBUG [mpdris2_rs::mpd::client] Issuing command to MPD: readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 8192 DEBUG [mpdris2_rs::mpd::client] Command readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 8192 returned DEBUG [mpdris2_rs::mpd::client] Issuing command to MPD: readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 16384 DEBUG [mpdris2_rs::mpd::client] Command readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 16384 returned DEBUG [mpdris2_rs::mpd::client] Issuing command to MPD: readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 24576 DEBUG [mpdris2_rs::mpd::client] Command readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 24576 returned DEBUG [mpdris2_rs::mpd::client] Issuing command to MPD: readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 32768 DEBUG [mpdris2_rs::mpd::client] Command readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 32768 returned DEBUG [mpdris2_rs::mpd::client] Issuing command to MPD: readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 40960 DEBUG [mpdris2_rs::mpd::client] Command readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 40960 returned DEBUG [mpdris2_rs::mpd::client] Issuing command to MPD: readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 49152 DEBUG [mpdris2_rs::mpd::client] Command readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 49152 returned DEBUG [mpdris2_rs::mpd::client] Issuing command to MPD: readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 57344 DEBUG [mpdris2_rs::mpd::client] Command readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 57344 returned DEBUG [mpdris2_rs::mpd::client] Issuing command to MPD: readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 65536 DEBUG [mpdris2_rs::mpd::client] Command readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 65536 returned DEBUG [mpdris2_rs::mpd::client] Issuing command to MPD: readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 73728 DEBUG [mpdris2_rs::mpd::client] Command readpicture "ChillCoding/Lofi Fruits Music, Chill Fruits Music - L's Theme.mp3" 73728 returned DEBUG [mpdris2_rs::mpd::stateserver] Album art updated from embedded image at /run/user/1000/mpd/album_art/120 DEBUG [mpdris2_rs::mpd::stateserver] Album art update finished DEBUG [mpdris2_rs::mpd::client] Issuing command to MPD: ping DEBUG [mpdris2_rs::mpd::client] Command ping returned DEBUG [mpdris2_rs::mpd::stateserver] Entering idle... DEBUG [mpdris2_rs::mpd::client] Issuing command to MPD: idle stored_playlist playlist player mixer options ERROR name already taken on the bus

szclsya commented 1 year ago

Tried it on my KDE setup and turned out to be an internal compatibility issue between two Rust libraries I used (zbus and smol).

I've pushed a fix to switch to Tokio (see dccb7ae9ec578ffa0fa5293981c4be1de79b478e). Have a try!

VitoFe commented 1 year ago

Tried it on my KDE setup and turned out to be an internal compatibility issue between two Rust libraries I used (zbus and smol).

I've pushed a fix to switch to Tokio (see dccb7ae). Have a try!

Looks like it works fine now! Thank you very much.