fix lastItem to let
This commit is contained in:
parent
519440b549
commit
47a19dae94
1 changed files with 7 additions and 7 deletions
|
@ -340,9 +340,9 @@ const app = new Vue({
|
||||||
|
|
||||||
// load last played track
|
// load last played track
|
||||||
try {
|
try {
|
||||||
lastItem = window.localStorage.getItem("currentTrack")
|
let lastItem = window.localStorage.getItem("currentTrack")
|
||||||
time = window.localStorage.getItem("currentTime")
|
let time = window.localStorage.getItem("currentTime")
|
||||||
queue = window.localStorage.getItem("currentQueue")
|
let queue = window.localStorage.getItem("currentQueue")
|
||||||
if (lastItem != null) {
|
if (lastItem != null) {
|
||||||
lastItem = JSON.parse(lastItem)
|
lastItem = JSON.parse(lastItem)
|
||||||
var kind = lastItem.attributes.playParams.kind;
|
var kind = lastItem.attributes.playParams.kind;
|
||||||
|
@ -362,9 +362,9 @@ const app = new Vue({
|
||||||
let ids = queue.map ( e => (e.playParams ? e.playParams.id : (e.attributes.playParams ? e.attributes.playParams.id : '') ))
|
let ids = queue.map ( e => (e.playParams ? e.playParams.id : (e.attributes.playParams ? e.attributes.playParams.id : '') ))
|
||||||
if (ids.length > 0) {
|
if (ids.length > 0) {
|
||||||
for (id of ids){
|
for (id of ids){
|
||||||
try{
|
try{
|
||||||
app.mk.playLater({songs: [id] })
|
app.mk.playLater({songs: [id] })
|
||||||
} catch (err){}
|
} catch (err){}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -372,7 +372,7 @@ const app = new Vue({
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
})},1000)
|
})},1500)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue