Support multiple players in MprisRemote

Authored by nicolasfella on Apr 26 2018, 8:11 PM.



Current code only supports one player

Test Plan

Run two media sessions. Dbus inspection works fine, UI has some issues with values not updated, but out of scope for this diff

Diff Detail

R224 KDE Connect
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
nicolasfella requested review of this revision.Apr 26 2018, 8:11 PM
nicolasfella created this revision.
  • Fix build
  • fix UI not updating
  • Add new properties to interfaces
apol added a subscriber: apol.Apr 27 2018, 10:05 AM

Other than that looks good to me. Thanks!


While this will work, if the map ever gets out of sync we could get a crash.

Maybe it's just safer to do something like:

auto player = m_players.value(m_currentPlayer);
return player ? player->album() : QString();
  • Implement Aleix's suggestion
nicolasfella marked an inline comment as done.Apr 27 2018, 7:21 PM
apol accepted this revision.Apr 27 2018, 10:20 PM
This revision is now accepted and ready to land.Apr 27 2018, 10:20 PM
This revision was automatically updated to reflect the committed changes.