Skip to content

Commit 7aefb05

Browse files
vjrgkkulikJeremy Wootten
authored
Fix error on clicking previous button for the first time (#573)
* merge master (#1) * Translated using Weblate (Silesian) Currently translated at 100.0% (321 of 321 strings) Translation: Music/Music Translate-URL: https://l10n.elementary.io/projects/music/music/szl/ * Translated using Weblate (Silesian) Currently translated at 2.2% (1 of 45 strings) Translation: Music/Music (Extra) Translate-URL: https://l10n.elementary.io/projects/music/extra/szl/ * Specify ver 10.17.0 for node_js (#572) * Enable playback buttons on startup if media is available (#571) * Enable playback buttons on startup if media is available * Fix error on play_media at startup Co-authored-by: Jeremy Wootten <[email protected]> Co-authored-by: gkkulik <[email protected]> Co-authored-by: Jeremy Wootten <[email protected]> * Fix error on clicking previous button for the first time Co-authored-by: gkkulik <[email protected]> Co-authored-by: Jeremy Wootten <[email protected]>
1 parent 30f62cf commit 7aefb05

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/PlaybackManager.vala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,10 @@ public class Music.PlaybackManager : Object {
433433
} else {
434434
_playing_queued_song = false;
435435

436+
if (_current.is_empty) {
437+
queue_media (library.get_medias ());
438+
}
439+
436440
if (current_media == null) {
437441
_current_index = _current.size - 1;
438442
rv = _current.get (_current_index);
@@ -461,8 +465,6 @@ public class Music.PlaybackManager : Object {
461465

462466
rv = _current.get (_current_index);
463467
} else {
464-
queue_media (library.get_medias ());
465-
466468
_current_index = _current.size - 1;
467469
rv = _current.get (_current_index);
468470
}

0 commit comments

Comments
 (0)