Added spotify plugin. Fixed bilibili signing. Added bilibili and spotify link handling.

This commit is contained in:
Koen
2024-06-07 09:32:16 +02:00
parent 7353edb058
commit a345da0feb
12 changed files with 46 additions and 18 deletions
+6
View File
@@ -64,3 +64,9 @@
[submodule "app/src/stable/assets/sources/bilibili"]
path = app/src/stable/assets/sources/bilibili
url = ../plugins/bilibili.git
[submodule "app/src/stable/assets/sources/spotify"]
path = app/src/stable/assets/sources/spotify
url = ../plugins/spotify.git
[submodule "app/src/unstable/assets/sources/spotify"]
path = app/src/unstable/assets/sources/spotify
url = ../plugins/spotify.git
+6
View File
@@ -30,6 +30,9 @@
<data android:host="patreon.com" />
<data android:host="soundcloud.com" />
<data android:host="twitch.tv" />
<data android:host="bilibili.com" />
<data android:host="bilibili.tv" />
<data android:host="spotify.com" />
<data android:pathPrefix="/" />
</intent-filter>
<intent-filter android:autoVerify="true">
@@ -51,6 +54,9 @@
<data android:host="patreon.com" />
<data android:host="soundcloud.com" />
<data android:host="twitch.tv" />
<data android:host="bilibili.com" />
<data android:host="bilibili.tv" />
<data android:host="spotify.com" />
</intent-filter>
</activity>
</application>
+2 -1
View File
@@ -9,7 +9,8 @@
"4a78c2ff-c20f-43ac-8f75-34515df1d320": "sources/kick/KickConfig.json",
"aac9e9f0-24b5-11ee-be56-0242ac120002": "sources/patreon/PatreonConfig.json",
"9d703ff5-c556-4962-a990-4f000829cb87": "sources/nebula/NebulaConfig.json",
"cf8ea74d-ad9b-489e-a083-539b6aa8648c": "sources/bilibili/build/BiliBiliConfig.json"
"cf8ea74d-ad9b-489e-a083-539b6aa8648c": "sources/bilibili/build/BiliBiliConfig.json",
"4e365633-6d3f-4267-8941-fdc36631d813": "sources/spotify/build/SpotifyConfig.json"
},
"SOURCES_EMBEDDED_DEFAULT": [
"35ae969a-a7db-11ed-afa1-0242ac120002"
+6
View File
@@ -30,6 +30,9 @@
<data android:host="patreon.com" />
<data android:host="soundcloud.com" />
<data android:host="twitch.tv" />
<data android:host="bilibili.com" />
<data android:host="bilibili.tv" />
<data android:host="spotify.com" />
<data android:pathPrefix="/" />
</intent-filter>
<intent-filter android:autoVerify="true">
@@ -51,6 +54,9 @@
<data android:host="patreon.com" />
<data android:host="soundcloud.com" />
<data android:host="twitch.tv" />
<data android:host="bilibili.com" />
<data android:host="bilibili.tv" />
<data android:host="spotify.com" />
</intent-filter>
</activity>
</application>
+2 -1
View File
@@ -9,7 +9,8 @@
"4a78c2ff-c20f-43ac-8f75-34515df1d320": "sources/kick/KickConfig.json",
"aac9e9f0-24b5-11ee-be56-0242ac120002": "sources/patreon/PatreonConfig.json",
"9d703ff5-c556-4962-a990-4f000829cb87": "sources/nebula/NebulaConfig.json",
"cf8ea74d-ad9b-489e-a083-539b6aa8648c": "sources/bilibili/build/BiliBiliConfig.json"
"cf8ea74d-ad9b-489e-a083-539b6aa8648c": "sources/bilibili/build/BiliBiliConfig.json",
"4e365633-6d3f-4267-8941-fdc36631d813": "sources/spotify/build/SpotifyConfig.json"
},
"SOURCES_EMBEDDED_DEFAULT": [
"35ae969a-a7db-11ed-afa1-0242ac120002"
+18 -12
View File
@@ -1,20 +1,26 @@
#!/bin/bash
# Array of directories to look in
dirs=("app/src/unstable/assets/sources" "app/src/stable/assets/sources")
# Loop through each directory
for dir in "${dirs[@]}"; do
if [[ -d "$dir" ]]; then # Check if directory exists
for plugin in "$dir"/*; do # Loop through each plugin folder
if [[ -d "$plugin" ]]; then
script_file=$(find "$plugin" -maxdepth 1 -name '*Script.js')
config_file=$(find "$plugin" -maxdepth 1 -name '*Config.json')
sign_script="$plugin/sign.sh"
sign_scripts() {
local plugin_dir=$1
if [[ -f "$sign_script" && -n "$script_file" && -n "$config_file" ]]; then
sh "$sign_script" "$script_file" "$config_file"
fi
if [[ -d "$plugin_dir" ]]; then
script_file=$(find "$plugin_dir" -maxdepth 2 -name '*Script.js')
config_file=$(find "$plugin_dir" -maxdepth 2 -name '*Config.json')
sign_script="$plugin_dir/sign.sh"
if [[ -f "$sign_script" && -n "$script_file" && -n "$config_file" ]]; then
sh "$sign_script" "$script_file" "$config_file"
fi
fi
}
for dir in "${dirs[@]}"; do
if [[ -d "$dir" ]]; then
for plugin in "$dir"/*; do
if [[ -d "$plugin" ]]; then
sign_scripts "$plugin"
fi
done
fi