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
.gitmodules vendored
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

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>

@ -1 +1 @@
Subproject commit 611f692ced94bac637907b105170a4143580281a
Subproject commit b518be4dd5e162e67e9ca64e09be3fe574fccdb7

@ -1 +1 @@
Subproject commit cee1fda4e875a46315a9d4492e2e3b541d98f39f
Subproject commit 5b1919934d20f8c53de9959b04bdb66e0c6af3e9

@ -0,0 +1 @@
Subproject commit 843cf2dc4b19c02d86a00407e2e8f9f1048cf475

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"

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>

@ -1 +1 @@
Subproject commit 611f692ced94bac637907b105170a4143580281a
Subproject commit b518be4dd5e162e67e9ca64e09be3fe574fccdb7

@ -1 +1 @@
Subproject commit cee1fda4e875a46315a9d4492e2e3b541d98f39f
Subproject commit 5b1919934d20f8c53de9959b04bdb66e0c6af3e9

@ -0,0 +1 @@
Subproject commit 843cf2dc4b19c02d86a00407e2e8f9f1048cf475

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"

View file

@ -1,21 +1,27 @@
#!/bin/bash
# Array of directories to look in
dirs=("app/src/unstable/assets/sources" "app/src/stable/assets/sources")
# Loop through each directory
sign_scripts() {
local plugin_dir=$1
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 # Check if directory exists
for plugin in "$dir"/*; do # Loop through each plugin folder
if [[ -d "$dir" ]]; then
for plugin in "$dir"/*; do
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"
if [[ -f "$sign_script" && -n "$script_file" && -n "$config_file" ]]; then
sh "$sign_script" "$script_file" "$config_file"
fi
sign_scripts "$plugin"
fi
done
fi
done
done