Fixed a bug where track numbers would not be correct if the last loaded session was a playlist

This commit is contained in:
casey langen 2021-01-08 23:31:37 -08:00
parent aa67c471c6
commit 5e3f02074e
3 changed files with 4 additions and 3 deletions

View File

@ -7,6 +7,8 @@
by linking against the less buggy, homebrew-provided version of ncurses.
* upgraded to the most recent version of Android Studio tooling for the
musikdroid app.
* fixed a bug where track numbers would not be correct after loading a session
where the last viewed content was a playlist.
* ongoing warning cleanups against more modern compilers.
--------------------------------------------------------------------------------

View File

@ -128,9 +128,7 @@ void GaplessTransport::StartWithPlayer(Player* newPlayer, StartMode mode) {
/* first argument suppresses the "Stop" event from getting triggered,
the second param is used for gapless playback -- we won't stop the output
and will allow pending buffers to finish if we're not automatically
playing the next track. note we do this outside of critical section so
outputs *can* stop buffers immediately, and not to worry about causing a
deadlock. */
playing the next track. */
this->StopInternal(true, !playingNext, newPlayer);
this->SetNextCanStart(false);
this->output->Resume();

View File

@ -178,6 +178,7 @@ void BrowseLayout::LoadLastSession() {
const std::string field = session->GetString(keys::LastBrowseCategoryType, "");
const int64_t id = (int64_t) session->GetDouble(keys::LastBrowseCategoryId, -1.0);
if (field.size()) {
this->SwitchCategory(field);
this->ScrollTo(field, id);
}
}