set to start from last played song if shuffle is off when first accessing the page
This commit is contained in:
@@ -143,6 +143,7 @@
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
g_current = trackid;
|
g_current = trackid;
|
||||||
|
localStorage['current'] = g_current;
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadNewPlaylist (playlist, track) {
|
function loadNewPlaylist (playlist, track) {
|
||||||
@@ -375,6 +376,9 @@
|
|||||||
|
|
||||||
if (shuffle === 'false') {
|
if (shuffle === 'false') {
|
||||||
g_shuffle = false;
|
g_shuffle = false;
|
||||||
|
if (localStorage.getItem ('current') !== null) {
|
||||||
|
g_current = parseInt(localStorage.getItem ('current'))-1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
g_shuffle = true;
|
g_shuffle = true;
|
||||||
@@ -382,7 +386,6 @@
|
|||||||
|
|
||||||
toggleShuffleColor();
|
toggleShuffleColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// If hash is set, override playlist and track
|
// If hash is set, override playlist and track
|
||||||
var url_track = parseTrackId (window.location.hash.substr (1));
|
var url_track = parseTrackId (window.location.hash.substr (1));
|
||||||
|
Reference in New Issue
Block a user