Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge https://github.com/LittleRey/dolby_beta #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Android CI


on:
push:
branches: [ master ]
Expand Down Expand Up @@ -32,4 +33,4 @@ jobs:
name: app-release
path: ${{github.workspace}}/app/build/outputs/apk/release/*.apk
if-no-files-found: warn
retention-days: 30
retention-days: 30
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ public static void startHttpProxyMode(final Context context) {
}

public static void startScript() {
String script = String.format("export ENABLE_FLAC=%s&&export MIN_BR=%s&&libnode.so app.js -a 127.0.0.1 -o %s -p %s",
String script = String.format("export ENABLE_FLAC=%s&&export MIN_BR=%s&&libnode.so app.js -a 127.0.0.1 -o %s -e %s -p %s",
SettingHelper.getInstance().getSetting(SettingHelper.proxy_flac_key), SettingHelper.getInstance().getSetting(SettingHelper.proxy_priority_key) ? "256000" : "96000",
SettingHelper.getInstance().getProxyOriginal(), SettingHelper.getInstance().getProxyPort() + ":" + (SettingHelper.getInstance().getProxyPort() + 1));
SettingHelper.getInstance().getProxyOriginal(), SettingHelper.getInstance().getProxyEndpoint(), SettingHelper.getInstance().getProxyPort() + ":" + (SettingHelper.getInstance().getProxyPort() + 1));

String[] START_PROXY = new String[]{"node=$(ps -ef |grep \"libnode.so app.js\" |grep -v grep)",
"if [ ! \"$node\" ]; then",
Expand Down
13 changes: 13 additions & 0 deletions app/src/main/java/com/raincat/dolby_beta/helper/SettingHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ public class SettingHelper {
public static final String proxy_port_title = "代理端口(1~65535)";
public static final int proxy_port_default = 23338;

public static final String proxy_Endpoint_key = "β_proxy_Endpoint_key";
public static final String proxy_Endpoint_title = "Endpoint";
public static final String proxy_Endpoint_default = "https://music.163.com";

public static final String proxy_original_key = "β_proxy_original_key";
public static final String proxy_original_title = "代理源(空格隔开)";
public static final String proxy_original_default = "kuwo pyncmd";
Expand Down Expand Up @@ -263,6 +267,15 @@ public void setProxyOriginal(String original) {
sharedPreferences.edit().putString(SettingHelper.proxy_original_key, original).apply();
}

public String getProxyEndpoint() {
return sharedPreferences.getString(SettingHelper.proxy_Endpoint_key, SettingHelper.proxy_Endpoint_default);
}

public void setProxyEndpoint(String Endpoint) {
if (!TextUtils.isEmpty(Endpoint))
sharedPreferences.edit().putString(SettingHelper.proxy_Endpoint_key, Endpoint).apply();
}

public void setHttpProxy(String http) {
if (!TextUtils.isEmpty(http))
sharedPreferences.edit().putString(SettingHelper.http_proxy_key, http).apply();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void init(Context context, AttributeSet attrs) {
setData(false, false);

setOnClickListener(view -> {
Uri uri = Uri.parse("https://github.com/nining377/dolby_beta");
Uri uri = Uri.parse("https://github.com/LittleRey/dolby_beta");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
context.startActivity(intent);
});
Expand Down