fix bug in saving currently played song
This commit is contained in:
parent
76a2f5b547
commit
e1596cc65a
1 changed files with 2 additions and 2 deletions
|
@ -33,13 +33,13 @@ var PlayList={
|
||||||
PlayList.player.jPlayer("setMedia", PlayList.items[PlayList.current]);
|
PlayList.player.jPlayer("setMedia", PlayList.items[PlayList.current]);
|
||||||
PlayList.items[index].playcount++;
|
PlayList.items[index].playcount++;
|
||||||
PlayList.player.jPlayer("play");
|
PlayList.player.jPlayer("play");
|
||||||
|
localStorage.setItem('oc_playlist_current',index);
|
||||||
|
localStorage.setItem('oc_playlist_playing','true');
|
||||||
if (typeof Collection !== 'undefined') {
|
if (typeof Collection !== 'undefined') {
|
||||||
Collection.registerPlay();
|
Collection.registerPlay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
localStorage.setItem('oc_playlist_current',PlayList.current);
|
|
||||||
localStorage.setItem('oc_playlist_playing','true');
|
|
||||||
PlayList.init(PlayList.items[index].type,PlayList.play);
|
PlayList.init(PlayList.items[index].type,PlayList.play);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue