Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
285e5f9b1b | ||
|
|
9e2668c7fd | ||
|
|
e6fb1926d8 | ||
|
|
e6a8caa696 | ||
|
|
08a970c7ae | ||
|
|
46abcf97a5 | ||
|
|
d42c80b9c2 | ||
|
|
db9910451d | ||
|
|
d31063c2c2 | ||
|
|
9bcf78bb30 | ||
|
|
1fe35c8258 | ||
|
|
cd644fe8c1 | ||
|
|
9dc48de772 | ||
|
|
777c5ca376 | ||
|
|
7998af8dd5 | ||
|
|
1b13fb295d | ||
|
|
c1a383f5bb | ||
|
|
05eb9b03d5 | ||
|
|
416715e28c | ||
|
|
937334be46 |
23
README.md
23
README.md
@@ -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>
|
||||||
|
|
||||||
# 图标来源
|
# 图标来源
|
||||||
@@ -138,16 +141,18 @@ 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
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
46162649517a1318c176a3808b932ec96dcce96b
|
9e2668c7fd5364b4829dde723ee929e4122a70d1
|
||||||
BIN
resources/bilibili.png
Normal file
BIN
resources/bilibili.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
BIN
resources/coolapk.png
Normal file
BIN
resources/coolapk.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
BIN
resources/douyin.png
Normal file
BIN
resources/douyin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
BIN
resources/github.png
Normal file
BIN
resources/github.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
BIN
resources/twitter.png
Normal file
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
BIN
shared_sheets/Genshin_Liyue.txt
Normal file
BIN
shared_sheets/Genshin_Liyue.txt
Normal file
Binary file not shown.
BIN
shared_sheets/Waiting_for_love.txt
Normal file
BIN
shared_sheets/Waiting_for_love.txt
Normal file
Binary file not shown.
BIN
shared_sheets/凉凉.txt
Normal file
BIN
shared_sheets/凉凉.txt
Normal file
Binary file not shown.
BIN
shared_sheets/未闻花名.txt
Normal file
BIN
shared_sheets/未闻花名.txt
Normal file
Binary file not shown.
BIN
shared_sheets/烟花易冷K.txt
Normal file
BIN
shared_sheets/烟花易冷K.txt
Normal file
Binary file not shown.
BIN
shared_sheets/陈奕迅_心的距离.txt
Normal file
BIN
shared_sheets/陈奕迅_心的距离.txt
Normal file
Binary file not shown.
@@ -1,7 +1,7 @@
|
|||||||
"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)
|
||||||
@@ -11,18 +11,20 @@
|
|||||||
(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,10 +2535,11 @@ 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({
|
||||||
onItemLongClick: function(parent, view, pos, id) {
|
onItemLongClick: function(parent, view, pos, id) {
|
||||||
|
|||||||
@@ -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(){
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
版本: 19
|
||||||
|
更新时间: 2020.11.19 21:25
|
||||||
|
更新内容:
|
||||||
|
* 修复:自然弹奏完成后再次点击播放按钮不会重新开始
|
||||||
|
* 新增:共享乐谱的详细界面添加作者社交链接跳转
|
||||||
|
|
||||||
版本: 18
|
版本: 18
|
||||||
更新时间: 2020.10.04 10:30
|
更新时间: 2020.10.04 10:30
|
||||||
更新内容:
|
更新内容:
|
||||||
|
|||||||
Reference in New Issue
Block a user