https://bugs.kde.org/show_bug.cgi?id=508300

--- Comment #3 from Marco Mattiolo <[email protected]> ---
I've analyzed this a bit more: the media player (e.g. elisa) sends updates on
D-Bus
https://invent.kde.org/multimedia/elisa/-/blob/master/src/mpris2/mediaplayer2player.cpp?ref_type=heads
on the other side, plasma-workspace collects and updates the QML applet
https://invent.kde.org/plasma/plasma-workspace/-/blob/master/libkmpris/playercontainer.cpp
https://invent.kde.org/plasma/plasma-workspace/-/blob/master/libkmpris/multiplexermodel.cpp
https://invent.kde.org/plasma/plasma-workspace/-/blob/master/applets/mediacontroller/ExpandedRepresentation.qml

It's still not clear whether the issue lies (and is better fixed) on the media
player side or on plasma-workspace side. I've seen elisa sending out a complete
D-Bus telegram when reproduction starts from track's beginning, including
track's title and artist. I don't recall seeing such a signal on D-Bus when
track reproduction starts from a position other than 0.

signal time=1768747167.257229 sender=:1.115 -> destination=(null destination)
serial=123 path=/org/mpris/MediaPlayer2;
interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
   string "org.mpris.MediaPlayer2.Player"
   array [
      dict entry(
         string "Metadata"
         variant             array [
               dict entry(
                  string "mpris:length"
                  variant                      int64 426000000
               )
               dict entry(
                  string "mpris:trackid"
                  variant                      object path
"/org/kde/elisa/playlist/9"
               )
               dict entry(
                  string "xesam:artist"
                  variant                      array [
                        string "Tears for fears"
                     ]
               )
               dict entry(
                  string "xesam:title"
                  variant                      string "Pale shelter (long
version)"
               )
               dict entry(
                  string "xesam:url"
                  variant                      string
"file:///home/marco/Music/Tears for fears - Pale shelter (long version).ogg"
               )
            ]
      )
   ]
   array [
   ]


Then, if it's a matter of the mediaplayer not broadcasting track's information,
this should probably be fixed on the media player side. I would still like to
fix this on the plasma-workspace side, otherwise every media player would need
to be fixed separately.
Therefore I've tried

diff --git a/libkmpris/playercontainer.cpp b/libkmpris/playercontainer.cpp
index 50736d6c04..6c3eb4ca08 100644
--- a/libkmpris/playercontainer.cpp
+++ b/libkmpris/playercontainer.cpp
@@ -431,6 +431,7 @@ void PlayerContainer::updatePosition()
         }

         m_position = propsReply.value().toLongLong();
+        if (m_length == 0) {refresh();}
     });
 }


to trigger plasmashell to request the missing information to the media player
in case the track length's is zero. This doesn't seem to fix the issue.

A side-note: I've tried to reproduce the issue with other media players, e.g.
strawberry, but they don't seem to allow the reproduction to start other than
at track's beginning. Or maybe they just do not store reproduction position
along the track on app's closure...

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to