set to start from last played song if shuffle is off when first accessing the page

This commit is contained in:
2022-07-19 11:20:44 -05:00
parent 2101b7788b
commit bbe2e9d08e

View File

@@ -143,6 +143,7 @@
}, 1000);
g_current = trackid;
localStorage['current'] = g_current;
}
function loadNewPlaylist (playlist, track) {
@@ -375,6 +376,9 @@
if (shuffle === 'false') {
g_shuffle = false;
if (localStorage.getItem ('current') !== null) {
g_current = parseInt(localStorage.getItem ('current'))-1;
}
}
else {
g_shuffle = true;
@@ -382,7 +386,6 @@
toggleShuffleColor();
}
// If hash is set, override playlist and track
var url_track = parseTrackId (window.location.hash.substr (1));