20 Commits
v18 ... v19

Author SHA1 Message Date
StageGuard
285e5f9b1b fix: stop when pause 2020-11-19 23:37:14 +08:00
StageGuard
9e2668c7fd fix: stop when pause 2020-11-19 23:36:02 +08:00
StageGuard
e6fb1926d8 Update version 19 2020-11-19 21:36:36 +08:00
StageGuard
e6a8caa696 Update version 19 2020-11-19 21:35:50 +08:00
StageGuard
08a970c7ae Update version 19 2020-11-19 21:27:59 +08:00
StageGuard
46abcf97a5 Update version 19 2020-11-19 21:27:27 +08:00
StageGuard
d42c80b9c2 fix incorrect information. 2020-11-19 21:17:18 +08:00
StageGuard
db9910451d Add resources 2020-11-19 21:13:42 +08:00
StageGuard
d31063c2c2 Change social list format and fix incorrect information. 2020-11-19 20:16:30 +08:00
StageGuard
9bcf78bb30 Update shared sheet list. 2020-11-19 18:54:36 +08:00
StageGuard
1fe35c8258 Add social link icons 2020-11-19 18:52:43 +08:00
StageGuard
cd644fe8c1 Upload user shared sheets. 2020-11-19 16:38:03 +08:00
StageGuard
9dc48de772 Upload user shared sheets. 2020-11-19 16:34:50 +08:00
StageGuard
777c5ca376 improve parsing note process 2020-11-17 09:39:12 +08:00
StageGuard
7998af8dd5 improve parsing note process 2020-11-17 09:33:00 +08:00
StageGuard
1b13fb295d Upload user shared sheets 2020-11-17 09:32:27 +08:00
StageGuard
c1a383f5bb Update uesr shared sheets 2020-10-05 22:37:37 +08:00
StageGuard
05eb9b03d5 Upload user shared sheets 2020-10-05 13:29:17 +08:00
StageGuard
416715e28c Upload user shared sheets 2020-10-04 21:00:09 +08:00
StageGuard
937334be46 Change LICENSE to LGPL 2020-10-04 12:24:43 +08:00
18 changed files with 2423 additions and 1667 deletions

1017
LICENSE

File diff suppressed because it is too large Load Diff

View File

@@ -123,6 +123,9 @@ files.removeDir("/storage/emulated/0/Documents/SkyAutoPlayer/");
哔哩哔哩[@UTF16](https://space.bilibili.com/623364258)<br> 哔哩哔哩[@UTF16](https://space.bilibili.com/623364258)<br>
酷安[@Syngenex](http://www.coolapk.com/u/1093421)<br> 酷安[@Syngenex](http://www.coolapk.com/u/1093421)<br>
Twitter[Phoebe@huunhut1217](https://mobile.twitter.com/huunhut1217)<br> Twitter[Phoebe@huunhut1217](https://mobile.twitter.com/huunhut1217)<br>
酷安[@终究是错付了](http://www.coolapk.com/u/2293899)<br>
酷安[@DesperatU](http://www.coolapk.com/u/1075889)<br>
酷安[@明明酱](http://www.coolapk.com/u/1706128)<br>
<br> <br>
# 图标来源 # 图标来源
@@ -135,19 +138,21 @@ Twitter[Phoebe@huunhut1217](https://mobile.twitter.com/huunhut1217)<br>
# 许可证协议 # 许可证协议
``` ```
SkyAutoPlayer (Auto.js script) SkyAutoPlayer (Auto.js script)
Copyright © 2020 StageGuard Copyright © 2020 StageGuard
This program is free software: you can redistribute it and/or modify This library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 3 of the License, or License as published by the Free Software Foundation; either
(at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
GNU General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU Lesser General Public
along with this program. If not, see <https://www.gnu.org/licenses/> License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
``` ```

View File

@@ -1 +1 @@
46162649517a1318c176a3808b932ec96dcce96b 9e2668c7fd5364b4829dde723ee929e4122a70d1

BIN
resources/bilibili.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
resources/coolapk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
resources/douyin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
resources/github.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

BIN
resources/twitter.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

BIN
shared_sheets/凉凉.txt Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,28 +1,30 @@
"ui"; "ui";
"use strict"; "use strict";
/* /*
Sky Auto Player (Auto.js script) SkyAutoPlayer (Auto.js script)
Copyright © 2020 StageGuard Copyright © 2020 StageGuard
Contact : Contact :
(QQ: 1355416608) (QQ: 1355416608)
(Email: beamiscool@qq.com) (Email: beamiscool@qq.com)
(BaiduTieba@拐角处_等你) (BaiduTieba@拐角处_等你)
(Weibo@StageGuard) (Weibo@StageGuard)
(CoolApk@StageGuard) (CoolApk@StageGuard)
(Twiter@stageguardcn) (Twiter@stageguardcn)
This program is free software: you can redistribute it and/or modify This library is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by modify it under the terms of the GNU Lesser General Public
the Free Software Foundation, either version 3 of the License, or License as published by the Free Software Foundation; either
(at your option) any later version. version 2.1 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
GNU General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU Lesser General Public
along with this program. If not, see <https://www.gnu.org/licenses/> License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
*/ */
const user_agreements = const user_agreements =
@@ -157,8 +159,9 @@ sheetmgr = {
var r = []; var r = [];
var t_time = 0; var t_time = 0;
var t_sets = []; var t_sets = [];
const regexp = /^(\d)Key(\d{1,})$/;
for(var i in raw) { for(var i in raw) {
var key = Number(raw[i].key.replace(/^(\d)Key(\d{1,})$/, "$2")); var key = Number(raw[i].key.replace(regexp, "$2"));
if(raw[i].time != t_time) { if(raw[i].time != t_time) {
r.push({time: t_time, keys: t_sets}); r.push({time: t_time, keys: t_sets});
t_sets = []; t_sets = [];
@@ -282,8 +285,8 @@ 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();
}); });
}, },
stop: function() { stop: function() {
@@ -345,7 +348,7 @@ config = {
_global_storage: null, _global_storage: null,
values: { values: {
currentVersion: 18, currentVersion: 19,
gitVersion: "", gitVersion: "",
key_coordinates15: [], key_coordinates15: [],
@@ -417,7 +420,7 @@ config = {
fetchResources: function(listener) { fetchResources: function(listener) {
var remoteHost = "https://cdn.jsdelivr.net/gh/StageGuard/SkyAutoPlayerScript@" + this.values.gitVersion + "/resources/"; var remoteHost = "https://cdn.jsdelivr.net/gh/StageGuard/SkyAutoPlayerScript@" + this.values.gitVersion + "/resources/";
var resourceList = ["local.png", "online.png", "play.png", "pause.png", "refresh.png", "settings.png", "info.png", "download.png", "bin.png", "speedup.png", "search.png", "note.png", "user.png", "piano.png", "clock.png"/*, "filter.png"*/]; var resourceList = ["local.png", "online.png", "play.png", "pause.png", "refresh.png", "settings.png", "info.png", "download.png", "bin.png", "speedup.png", "search.png", "note.png", "user.png", "piano.png", "clock.png"/*, "filter.png"*/, "coolapk.png", "douyin.png", "github.png", "twitter.png", "bilibili.png"];
var localRootDir = android.os.Environment.getExternalStorageDirectory() + "/Documents/SkyAutoPlayer/bitmaps/"; var localRootDir = android.os.Environment.getExternalStorageDirectory() + "/Documents/SkyAutoPlayer/bitmaps/";
var downloadQueue = []; var downloadQueue = [];
var tryCount = 1; var tryCount = 1;
@@ -2212,9 +2215,99 @@ gui.dialogs.showProgressDialog(function(o) {
sug.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER); sug.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
sug.setTextColor(gui.config.colors[config.values.theme].sec_text); sug.setTextColor(gui.config.colors[config.values.theme].sec_text);
sug.setTextSize(15); sug.setTextSize(15);
sug.getLayoutParams().setMargins(7 * dp, 5 * dp, 0, 0); sug.getLayoutParams().setMargins(7 * dp, 5 * dp, 0, 7 * dp);
layout.addView(sug); layout.addView(sug);
if(item.social) {
var colorPicker = function(platform) {
switch(platform) {
case "coolapk": return "#11B566";
case "twitter": return "#1DA1F2";
case "douyin": return (function(){
if(config.values.theme == "light") {
return "#1F0B1A";
} else {
return "#FFFFFF";
}
}());
case "github": return (function(){
if(config.values.theme == "light") {
return "#24292E";
} else {
return "#FFFFFF";
}
}());
case "bilibili": return "#FB7299";
}
}
var filterBitmap = function(bitmap, replacedColor) {
var rBitmap = android.graphics.Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), android.graphics.Bitmap.Config.ARGB_8888);
var canvas = new android.graphics.Canvas(rBitmap);
var paint = new android.graphics.Paint();
var rect = new android.graphics.Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0);
paint.setColorFilter(new android.graphics.PorterDuffColorFilter(replacedColor, android.graphics.PorterDuff.Mode.SRC_IN));
canvas.drawBitmap(bitmap, rect, rect, paint);
return rBitmap;
};
var socialPrompt = new android.widget.TextView(ctx);
socialPrompt.setText("查看作者:");
socialPrompt.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-2, -2));
socialPrompt.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
socialPrompt.setTextColor(gui.config.colors[config.values.theme].text);
socialPrompt.setTextSize(16);
socialPrompt.getLayoutParams().setMargins(0, 5 * dp, 0, 5 * dp);
layout.addView(socialPrompt);
var socialLayout = new android.widget.LinearLayout(ctx);
socialLayout.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-2, -2));
socialLayout.setOrientation(android.widget.LinearLayout.HORIZONTAL);
socialLayout.setGravity(android.view.Gravity.CENTER | android.view.Gravity.CENTER);
socialLayout.getLayoutParams().setMargins(dp * 2, dp * 6, dp * 2, 0);
socialLayout.setPadding(5 * dp, 5 * dp, 5 * dp, 5 * dp);
socialLayout.measure(0, 0);
if(item.social.length == 1) {
var socialImage = new android.widget.ImageView(ctx);
socialImage.setScaleType(android.widget.ImageView.ScaleType.CENTER_CROP);
socialImage.setLayoutParams(new android.widget.LinearLayout.LayoutParams(dp * 34, dp * 34));
socialImage.getLayoutParams().setMargins(0, 0, dp * 5, 0);
socialImage.setImageBitmap(filterBitmap(config.bitmaps[item.social[0].platform], android.graphics.Color.parseColor(colorPicker(item.social[0].platform))));
socialLayout.addView(socialImage);
var socialPrompt1 = new android.widget.TextView(ctx);
socialPrompt1.setText(android.text.Html.fromHtml(("在 <font color=" + colorPicker(item.social[0].platform) + ">" + item.social[0].name +"</font> 查看作者")));
socialPrompt1.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-2, dp * 34));
socialPrompt1.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
socialPrompt1.setTextColor(gui.config.colors[config.values.theme].text);
socialPrompt1.setTextSize(14);
socialLayout.addView(socialPrompt1);
socialLayout.setBackgroundDrawable(gui.utils.ripple_drawable(socialLayout.getMeasuredWidth(), socialLayout.getMeasuredHeight(), "rect"));
socialLayout.setOnClickListener(new android.view.View.OnClickListener({
onClick: function() {
app.openUrl(item.social[0].link);
}
}));
} else {
for(var i in item.social) {
var socialImage = new android.widget.ImageView(ctx);
socialImage.setId(i);
socialImage.setScaleType(android.widget.ImageView.ScaleType.CENTER_CROP);
socialImage.setLayoutParams(new android.widget.LinearLayout.LayoutParams(dp * 34, dp * 34));
socialImage.getLayoutParams().setMargins(dp * 5, 0, dp * 5, 0);
socialImage.setImageBitmap(filterBitmap(config.bitmaps[item.social[i].platform], android.graphics.Color.parseColor(colorPicker(item.social[i].platform))));
socialImage.measure(0, 0);
socialImage.setBackgroundDrawable(gui.utils.ripple_drawable(socialImage.getMeasuredWidth(), socialImage.getMeasuredHeight(), "rect"));
socialImage.setOnClickListener(new android.view.View.OnClickListener({
onClick: function(view) {
print(view.getId())
app.openUrl(item.social[view.getId()].link);
}
}));
socialLayout.addView(socialImage);
}
}
layout.addView(socialLayout);
}
scr.addView(layout); scr.addView(layout);
return scr; return scr;
}); });
gui.main.addPage({ gui.main.addPage({
@@ -2442,9 +2535,10 @@ gui.dialogs.showProgressDialog(function(o) {
canExit: true, canExit: true,
buttons: ["确认"] buttons: ["确认"]
}); });
return; } else {
gui.dialogs.showDialog(gui.getViewMaker("sheetInfo")(item), -2, -2, null, true);
} }
gui.dialogs.showDialog(gui.getViewMaker("sheetInfo")(item), -2, -2, null, true);
} }
})); }));
s.ns0_listView.setOnItemLongClickListener(new android.widget.AdapterView.OnItemLongClickListener({ s.ns0_listView.setOnItemLongClickListener(new android.widget.AdapterView.OnItemLongClickListener({

View File

@@ -1,5 +1,33 @@
"ui"; "ui";
"use strict"; "use strict";
/*
SkyAutoPlayer (Auto.js script)
Copyright © 2020 StageGuard
Contact :
(QQ: 1355416608)
(Email: beamiscool@qq.com)
(BaiduTieba@拐角处_等你)
(Weibo@StageGuard)
(CoolApk@StageGuard)
(Twiter@stageguardcn)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
*/
var emitter = events.emitter(threads.currentThread()); var emitter = events.emitter(threads.currentThread());
threads.start(function() { threads.start(function() {
emitter.emit("evaluate", (function(){ emitter.emit("evaluate", (function(){

View File

@@ -1,3 +1,9 @@
版本: 19
更新时间: 2020.11.19 21:25
更新内容:
* 修复:自然弹奏完成后再次点击播放按钮不会重新开始
* 新增:共享乐谱的详细界面添加作者社交链接跳转
版本: 18 版本: 18
更新时间: 2020.10.04 10:30 更新时间: 2020.10.04 10:30
更新内容: 更新内容: