From f626cee7affe7818ff4bb27a97fc8e775b3e8688 Mon Sep 17 00:00:00 2001 From: Bart De Vries Date: Mon, 12 Apr 2021 09:40:18 +0200 Subject: [PATCH] Fix saving last playing item when application is shutdown --- src/audiomanager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/audiomanager.cpp b/src/audiomanager.cpp index dff85f29..fb0746e6 100644 --- a/src/audiomanager.cpp +++ b/src/audiomanager.cpp @@ -136,6 +136,8 @@ void AudioManager::setEntry(Entry* entry) d->lockPositionSaving = true; d->m_entry = entry; d->m_player.setMedia(QUrl(QStringLiteral("file://")+d->m_entry->enclosure()->path())); + // save the current playing track in the settingsfile for restoring on startup + SettingsManager::self()->setLastPlayingEntry(d->m_entry->id()); qDebug() << "Changed source to" << d->m_entry->title(); qint64 startingPosition = d->m_entry->enclosure()->playPosition();