8 Commits
v19 ... v20

Author SHA1 Message Date
StageGuard
6eb41d212d fix 2020-12-02 23:40:48 +08:00
StageGuard
a197b02fdf fix 2020-12-02 23:39:13 +08:00
StageGuard
526c07fcde Update README.md 2020-12-02 18:39:56 +08:00
StageGuard
9252f74d81 Update version 20 2020-12-02 18:38:22 +08:00
StageGuard
c2b393274a Merge pull request #3 from tiaod/master
添加连续随机播放功能
2020-12-02 04:33:34 -06:00
hackerMei
a708d72b49 set default keyCount. 2020-12-02 11:27:13 +08:00
tiaod
4a333ab0b2 Add auto play randomly. 2020-12-01 18:22:39 +08:00
StageGuard
caa9364e28 Correct outdated notice 2020-11-22 10:08:08 +08:00
4 changed files with 47 additions and 10 deletions

View File

@@ -95,7 +95,8 @@ files.removeDir("/storage/emulated/0/Documents/SkyAutoPlayer/");
### 请仔细阅读以下使用须知! ### 请仔细阅读以下使用须知!
1. 未充分测试若遇到BUG请酷安私信@StageGuard或新建Issue来反馈BUG 1. 未充分测试若遇到BUG请酷安私信@StageGuard或新建Issue来反馈BUG
2. **SkyAutoPlayer是完全免费且开源的软件/脚本([https://github.com/StageGuard/SkyAutoPlayerScript](https://github.com/StageGuard/SkyAutoPlayerScript))禁止使用本脚本作为盈利用途!** 2. **SkyAutoPlayer是完全免费且开源的软件/脚本([https://github.com/StageGuard/SkyAutoPlayerScript](https://github.com/StageGuard/SkyAutoPlayerScript))使用SkyAutoPlayer盈利的同时请标注源项目链接。**
3. **共享乐谱不遵守LGPL-2.1协议如您想在SkyAutoPlayer以外使用这些乐谱请自行找乐谱作者授权**
3. 本脚本仅可用作娱乐用途,请不要在正规场合使用本脚本(请自行体会\"正规场合\"是什么意思)若因使用本脚本所出现了一些不友好的问题与脚本作者StageGuard无关。 3. 本脚本仅可用作娱乐用途,请不要在正规场合使用本脚本(请自行体会\"正规场合\"是什么意思)若因使用本脚本所出现了一些不友好的问题与脚本作者StageGuard无关。
4. 脚本只能给你一时满足感而不能使你进步,请适当使用,只有真正的技术才是王道,才能使你感到快乐。 4. 脚本只能给你一时满足感而不能使你进步,请适当使用,只有真正的技术才是王道,才能使你感到快乐。
5. 本脚本只是一个"弹奏机"并不内置曲谱请在GooglePlay下载[SkyStudio](https://play.google.com/store/apps/details?id=com.Maple.SkyStudio)编谱。 5. 本脚本只是一个"弹奏机"并不内置曲谱请在GooglePlay下载[SkyStudio](https://play.google.com/store/apps/details?id=com.Maple.SkyStudio)编谱。
@@ -107,7 +108,8 @@ files.removeDir("/storage/emulated/0/Documents/SkyAutoPlayer/");
## 贡献者名单(按照首次贡献时间排序) ## 贡献者名单(按照首次贡献时间排序)
### SkyAutoPlayerScript ### SkyAutoPlayerScript
[@tiaod](https://github.com/tiaod)<br>
<br>
### 共享乐谱 ### 共享乐谱
酷安[@Aex技术总监](http://www.coolapk.com/u/1286879)<br> 酷安[@Aex技术总监](http://www.coolapk.com/u/1286879)<br>

View File

@@ -1 +1 @@
9e2668c7fd5364b4829dde723ee929e4122a70d1 a197b02fdf36e282ff3180caab0d4248eb8f2b40

View File

@@ -35,7 +35,7 @@ const user_agreements =
"3. 脚本只能给你一时满足感而不能使你进步,请适当使用,只有真正的技术才是王道,才能使你感到快乐。\n\n" + "3. 脚本只能给你一时满足感而不能使你进步,请适当使用,只有真正的技术才是王道,才能使你感到快乐。\n\n" +
"4. 本脚本只是一个\"弹奏机\"并不内置曲谱请在GooglePlay下载SkyStudio编谱。\n\n" + "4. 本脚本只是一个\"弹奏机\"并不内置曲谱请在GooglePlay下载SkyStudio编谱。\n\n" +
"5. 本脚本不会增加解密乐谱功能包括但不限于加密的SkyStudio乐谱加密的JS等也不接受加密乐谱的共享。\n\n" + "5. 本脚本不会增加解密乐谱功能包括但不限于加密的SkyStudio乐谱加密的JS等也不接受加密乐谱的共享。\n\n" +
"6. 本脚本的发行遵守GPLv3协议,若你不了解协议内容,请访问 https://www.gnu.org/licenses 查看" "6. 本脚本的发行遵守LGPL-2.1协议,若你不了解协议内容,请访问 https://www.gnu.org/licenses 查看"
; ;
//Script global scope //Script global scope
@@ -285,7 +285,30 @@ sheetplayer = {
java.lang.Thread.sleep(sheetplayer.nextInterval = Math.round(sheetplayer.nextInterval * sheetplayer.speed)); java.lang.Thread.sleep(sheetplayer.nextInterval = Math.round(sheetplayer.nextInterval * sheetplayer.speed));
sheetplayer.currentNote ++; sheetplayer.currentNote ++;
} }
if(!(sheetplayer.currentNote < sheetplayer.noteCount)) 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(){
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();
}
}
}); });
}, },
@@ -348,7 +371,7 @@ config = {
_global_storage: null, _global_storage: null,
values: { values: {
currentVersion: 19, currentVersion: 20,
gitVersion: "", gitVersion: "",
key_coordinates15: [], key_coordinates15: [],
@@ -363,6 +386,7 @@ config = {
showFailedSheets: true, showFailedSheets: true,
tipOnAndroidR: true, tipOnAndroidR: true,
theme: "dark", theme: "dark",
autoPlay: false
}, },
bitmaps: {}, bitmaps: {},
@@ -382,7 +406,7 @@ config = {
this.values.showFailedSheets = this._global_storage.get("show_failed_sheets", this.values.showFailedSheets); this.values.showFailedSheets = this._global_storage.get("show_failed_sheets", this.values.showFailedSheets);
this.values.tipOnAndroidR = this._global_storage.get("tip_storage_on_android_r", this.values.tipOnAndroidR); this.values.tipOnAndroidR = this._global_storage.get("tip_storage_on_android_r", this.values.tipOnAndroidR);
this.values.theme = this._global_storage.get("theme", this.values.theme); this.values.theme = this._global_storage.get("theme", this.values.theme);
this.values.autoPlay = this._global_storage.get("auto_play", this.values.autoPlay);
try { try {
android.os.Build.VERSION_CODES.R android.os.Build.VERSION_CODES.R
sheetmgr.rootDir = android.os.Environment.getExternalStorageDirectory() + "/Documents/SkyAutoPlayer/sheets/"; sheetmgr.rootDir = android.os.Environment.getExternalStorageDirectory() + "/Documents/SkyAutoPlayer/sheets/";
@@ -2012,7 +2036,6 @@ gui = {
}; };
gui.run(function(){ gui.run(function(){
ui.setContentView((function(){ ui.setContentView((function(){
var layout = new android.widget.LinearLayout(ctx); var layout = new android.widget.LinearLayout(ctx);
@@ -3082,6 +3105,13 @@ gui.dialogs.showProgressDialog(function(o) {
toast("坐标设置已保存至存储!"); toast("坐标设置已保存至存储!");
}); });
} }
}, {
type: "checkbox",
name: "连续随机播放",
check: config.values.autoPlay,
onClick: function(checked) {
config.values.autoPlay = config.save("auto_play", checked);
}
}, { }, {
type: "checkbox", type: "checkbox",
name: "显示加载失败的乐谱", name: "显示加载失败的乐谱",
@@ -3172,7 +3202,7 @@ gui.dialogs.showProgressDialog(function(o) {
try { try {
android.os.Build.VERSION_CODES.R android.os.Build.VERSION_CODES.R
} catch (e) { } catch (e) {
sList.list.splice(4, 1); sList.list.splice(5, 1);
} }
return sList.list; return sList.list;
}()), function self(element) { }()), function self(element) {

View File

@@ -1,3 +1,8 @@
版本: 20
更新时间: 2020.12.02 18:40
更新内容:
* 新增:增加当前乐谱弹奏完成后自动随机弹奏下一首本地乐谱的选项(@tiaod)。
版本: 19 版本: 19
更新时间: 2020.11.19 21:25 更新时间: 2020.11.19 21:25
更新内容: 更新内容: