Minor tweak to let MPRIS2 load the correct track info on startup

It's still crashing without a proper track being loaded on startup.
Still needs to be resolved.
This commit is contained in:
Bart De Vries 2021-04-12 22:25:52 +02:00
parent c7164b3f6b
commit 2aa237342c
1 changed files with 3 additions and 0 deletions

View File

@ -55,6 +55,9 @@ MediaPlayer2Player::MediaPlayer2Player(AudioManager *audioPlayer, bool showProgr
signalPropertiesChange(QStringLiteral("Volume"), Volume());
m_mediaPlayerPresent = 1;
if (m_audioPlayer->entry()) {
setCurrentTrack(DataManager::instance().getQueue().indexOf(m_audioPlayer->entry()->id()));
}
}
MediaPlayer2Player::~MediaPlayer2Player()