Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
StageGuard committed Dec 2, 2020
1 parent 526c07f commit a197b02
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions source/SkyAutoplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,22 +286,27 @@ sheetplayer = {
sheetplayer.currentNote ++;
}
// 播放完自动下一首
if(config.values.autoPlay && !(sheetplayer.currentNote < sheetplayer.noteCount) && gui.player_panel.isShowing) {
gui.player_panel.__internal_dismiss();
sheetplayer.stop();
// gui.main.show(0);
if(sheetmgr.cachedLocalSheetList.length>0){
setTimeout(function(){
let sheet = sheetmgr.cachedLocalSheetList[random(0, sheetmgr.cachedLocalSheetList.length-1)]
if(!sheet.keyCount){
sheet.keyCount = 15 //默认键位
}
gui.player_panel.__internal_showPanel(sheet);
// sheetplayer.stop();

if(!(sheetplayer.currentNote < sheetplayer.noteCount)) {
if(config.values.autoPlay && gui.player_panel.isShowing) {
gui.player_panel.__internal_dismiss();
sheetplayer.stop();
// gui.main.show(0);
if(sheetmgr.cachedLocalSheetList.length>0){
setTimeout(function(){
sheetplayer.play(gui.player_panel.refreshStatus);
}, 1500)
}, 500)
let sheet = sheetmgr.cachedLocalSheetList[random(0, sheetmgr.cachedLocalSheetList.length-1)]
if(!sheet.keyCount){
sheet.keyCount = 15 //默认键位
}
gui.player_panel.__internal_showPanel(sheet);
// sheetplayer.stop();
setTimeout(function(){
sheetplayer.play(gui.player_panel.refreshStatus);
}, 1500)
}, 500)
}
} else {
sheetplayer.stop();
}
}
});
Expand Down Expand Up @@ -2031,7 +2036,6 @@ gui = {

};


gui.run(function(){
ui.setContentView((function(){
var layout = new android.widget.LinearLayout(ctx);
Expand Down

0 comments on commit a197b02

Please sign in to comment.