[MPRIS Data Engine] Refactor to reduce code duplication
AbandonedPublic

Authored by broulik on Jan 15 2020, 3:20 PM.

Details

Reviewers
fvogt
Group Reviewers
Plasma
Summary

addPlayer and playerUpdated effectively do the same, so merge the two implementations.
Also simplify nesting in setPlayerActive

Test Plan

Still behaves as before:

  • It never switches away from a playing player when another starts playing
  • It switches to a playing player if there was none before
  • When current player gets paused, it switches to another playing one, if any, or a paused one, if any, or a stopped one, if any
  • Closing a player, switches to another play one, if any, or a paused one, if any, or a stopped one, if any

Also makes it easier to adjust the code to support deduplication/proxying

Diff Detail

Repository
R120 Plasma Workspace
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Jan 15 2020, 3:20 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 15 2020, 3:20 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Jan 15 2020, 3:20 PM
broulik edited the test plan for this revision. (Show Details)
broulik abandoned this revision.Jan 17 2020, 11:20 AM

Incorporated in D26702