Skip to content

Commit

Permalink
Fix showing previous track in mpris
Browse files Browse the repository at this point in the history
  • Loading branch information
kraxarn committed Aug 21, 2023
1 parent 8d1a099 commit 873965d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,12 @@ void MainWindow::refresh()

void MainWindow::refreshed(const lib::spt::playback &playback)
{
emit playbackRefreshed(playback, current.playback);

const auto trackChange = current.playback.item.id != playback.item.id;
const auto previous = current.playback;
const auto trackChange = previous.item.id != playback.item.id;
current.playback = playback;

emit playbackRefreshed(playback, previous);

if (!current.playback.item.is_valid())
{
setWindowTitle(APP_NAME);
Expand Down

0 comments on commit 873965d

Please sign in to comment.