From 035d19f581daaa3c773ab8e6e1bc5ad970605f4d Mon Sep 17 00:00:00 2001 From: Koen Date: Mon, 3 Jun 2024 16:30:05 +0000 Subject: [PATCH 1/4] Update LICENSE --- LICENSE | 61 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/LICENSE b/LICENSE index a3d0f019..f3d7e742 100644 --- a/LICENSE +++ b/LICENSE @@ -1,32 +1,43 @@ -# FUTO TEMPORARY LICENSE -This license grants you the rights, and only the rights, set out below in respect of the source code provided. If you take advantage of these rights, you accept this license. If you do not accept the license, do not access the code. +# Grayjay Core License 1.0 -Words used in the Terms of Service have the same meaning in this license. Where there is any inconsistency between this license and those Terms of Service, these terms prevail. +## Acceptance +By using the software, you agree to all of the terms and conditions below. -## Section 1: Definitions -- "code" means the source code made available from time, in our sole discretion, for access under this license. Reference to code in this license means the code and any part of it and any derivative of it. -- “compilation” means to compile the code from ‘source code’ to ‘machine code’. -- "defect" means a defect, bug, backdoor, security issue or other deficiency in the code. -- “non-commercial distribution” means distribution of the code or any compilation of the code, or of any other application or program containing the code or any compilation of the code, where such distribution is not intended for or directed towards commercial advantage or monetary compensation. -- "review" means to access, analyse, test and otherwise review the code as a reference, for the sole purpose of analysing it for defects. -- "you" means the licensee of rights set out in this license. +## Copyright License +FUTO Holdings, Inc. (the “Licensor”) grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations below. -## Section 2: Grant of Rights -1. Subject to the terms of this license, we grant you a non-transferable, non-exclusive, worldwide, royalty-free license to access and use the code solely for the purposes of review, compilation and non-commercial distribution. -2. You may provide the code to anyone else and publish excerpts of it for the purposes of review, compilation and non-commercial distribution, provided that when you do so you make any recipient of the code aware of the terms of this license, they must agree to be bound by the terms of this license and you must attribute the code to the provider. -3. Other than in respect of those parts of the code that were developed by other parties and as specified strictly in accordance with the open source and other licenses under which those parts of the code have been made available, as set out on our website or in those items of code, you are not entitled to use or do anything with the code for any commercial or other purpose, other than review, compilation and non-commercial distribution in accordance with the terms of this license. -4. Subject to the terms of this license, you must at all times comply with and shall be bound by our Terms of Use, Privacy and Data Policy. +## Limitations +You may use or modify the software for only for non-commercial purposes such as personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, all without any anticipated commercial application. -## Section 3: Limitations -1. This license does not grant you any rights to use the provider's name, logo, or trademarks and you must not in any way indicate you are authorised to speak on behalf of the provider. -2. If you issue proceedings in any jurisdiction against the provider because you consider the provider has infringed copyright or any patent right in respect of the code (including any joinder or counterclaim), your license to the code is automatically terminated. -3. THE CODE IS MADE AVAILABLE "AS-IS" AND WITHOUT ANY EXPRESS OR IMPLIED GUARANTEES AS TO FITNESS, MERCHANTABILITY, NON-INFRINGEMENT OR OTHERWISE. IT IS NOT BEING PROVIDED IN TRADE BUT ON A VOLUNTARY BASIS ON OUR PART AND IS NOT MADE AVAILABLE FOR ANY USE OUTSIDE THE TERMS OF THIS LICENSE. ANYONE ACCESSING THE CODE MUST ENSURE THEY HAVE THE REQUISITE EXPERTISE TO SECURE THEIR OWN SYSTEM AND DEVICES AND TO ACCESS AND USE THE CODE IN ACCORDANCE WITH THE TERMS OF THIS LICENSE. YOU BEAR THE RISK OF ACCESSING AND USING THE CODE. IN PARTICULAR, THE PROVIDER BEARS NO LIABILITY FOR ANY INTERFERENCE WITH OR ADVERSE EFFECT ON YOUR SYSTEM OR DEVICES AS A RESULT OF YOUR ACCESSING AND USING THE CODE IN ACCORDANCE WITH THE TERMS OF THIS LICENSE OR OTHERWISE. +You may distribute the software or provide it to others only if you do so free of charge for non-commercial purposes. -## Section 4: Termination, suspension and variation -1. We may suspend, terminate or vary the terms of this license and any access to the code at any time, without notice, for any reason or no reason, in respect of any licensee, group of licensees or all licensees including as may be applicable any sub-licensees. +Notwithstanding the above, you may not remove or obscure any functionality in the software related to payment to the Licensor in any copy you distribute to others. -## Section 5: General -1. This license and its interpretation and operation are governed solely by the local law. You agree to submit to the exclusive jurisdiction of the local arbitral tribunals as further described in our Terms of Service and you agree not to raise any jurisdictional issue if we need to enforce an arbitral award or judgment in our jurisdiction or another country. -2. Questions and comments regarding this license are welcomed and should be addressed at https://chat.futo.org/login/. +You may not alter, remove, or obscure any licensing, copyright, or other notices of the Licensor in the software. Any use of the Licensor’s trademarks is subject to applicable law. -Last updated 7 June 2023. +## Patents +If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company. + +## Notices +You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms. If you modify the software, you must include in any modified copies of the software a prominent notice stating that you have modified the software, such as but not limited to, a statement in a readme file or an in-application about section. + +## Fair Use +You may have "fair use" rights for the software under the law. These terms do not limit them. + +## No Other Rights +These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the Licensor from granting licenses to anyone else. These terms do not imply any other licenses. + +## Termination +If you use the software in violation of these terms, such use is not licensed, and your license will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your license will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your license to terminate automatically and permanently. + +## No Liability +As far as the law allows, the software comes as is, without any warranty or condition, and the Licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim. + +## Definitions +- The “Licensor” is the entity offering these terms, FUTO Holdings, Inc. +- The “software” is the software the licensor makes available under these terms, including any portion of it. +- “You” refers to the individual or entity agreeing to these terms. +- “Your company” is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. Control means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect. +- “Your license” is the license granted to you for the software under these terms. +- “Use” means anything you do with the software requiring your license. +- “Trademark” means trademarks, service marks, and similar rights. From 309332ac9cacc6ed0abcc9f5bf95d58db65da630 Mon Sep 17 00:00:00 2001 From: Koen Date: Mon, 3 Jun 2024 16:30:27 +0000 Subject: [PATCH 2/4] Update LICENSE --- LICENSE => LICENSE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename LICENSE => LICENSE.md (100%) diff --git a/LICENSE b/LICENSE.md similarity index 100% rename from LICENSE rename to LICENSE.md From 2a7c0a5c7962789580ce31e900135c14833b869d Mon Sep 17 00:00:00 2001 From: Koen Date: Thu, 6 Jun 2024 20:07:13 +0200 Subject: [PATCH 3/4] Changed share intent. --- .../activities/PolycentricBackupActivity.kt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/futo/platformplayer/activities/PolycentricBackupActivity.kt b/app/src/main/java/com/futo/platformplayer/activities/PolycentricBackupActivity.kt index 3326c068..a0a0fac1 100644 --- a/app/src/main/java/com/futo/platformplayer/activities/PolycentricBackupActivity.kt +++ b/app/src/main/java/com/futo/platformplayer/activities/PolycentricBackupActivity.kt @@ -6,6 +6,7 @@ import android.content.Context import android.content.Intent import android.graphics.Bitmap import android.graphics.Color +import android.net.Uri import android.os.Bundle import android.util.TypedValue import android.view.View @@ -19,7 +20,12 @@ import com.futo.platformplayer.setNavigationBarColorAndIcons import com.futo.platformplayer.states.StateApp import com.futo.platformplayer.states.StatePolycentric import com.futo.platformplayer.views.buttons.BigButton -import com.futo.polycentric.core.* +import com.futo.polycentric.core.ContentType +import com.futo.polycentric.core.SignedEvent +import com.futo.polycentric.core.StorageTypeCRDTItem +import com.futo.polycentric.core.StorageTypeCRDTSetItem +import com.futo.polycentric.core.Store +import com.futo.polycentric.core.toBase64Url import com.google.zxing.BarcodeFormat import com.google.zxing.MultiFormatWriter import com.google.zxing.common.BitMatrix @@ -64,11 +70,8 @@ class PolycentricBackupActivity : AppCompatActivity() { } _buttonShare.onClick.subscribe { - val shareIntent = Intent(Intent.ACTION_SEND).apply { - type = "text/plain"; - putExtra(Intent.EXTRA_TEXT, _exportBundle); - } - startActivity(Intent.createChooser(shareIntent, getString(R.string.share_text))); + val shareIntent = Intent(Intent.ACTION_VIEW, Uri.parse(_exportBundle)) + startActivity(Intent.createChooser(shareIntent, "Share ID")); }; _buttonCopy.onClick.subscribe { From a345da0feba51b23d8486e1b6c19ae74858adc2b Mon Sep 17 00:00:00 2001 From: Koen Date: Fri, 7 Jun 2024 09:32:16 +0200 Subject: [PATCH 4/4] Added spotify plugin. Fixed bilibili signing. Added bilibili and spotify link handling. --- .gitmodules | 6 +++++ app/src/stable/AndroidManifest.xml | 6 +++++ app/src/stable/assets/sources/bilibili | 2 +- app/src/stable/assets/sources/patreon | 2 +- app/src/stable/assets/sources/spotify | 1 + app/src/stable/res/raw/plugin_config.json | 3 ++- app/src/unstable/AndroidManifest.xml | 6 +++++ app/src/unstable/assets/sources/bilibili | 2 +- app/src/unstable/assets/sources/patreon | 2 +- app/src/unstable/assets/sources/spotify | 1 + app/src/unstable/res/raw/plugin_config.json | 3 ++- sign-all-sources.sh | 30 ++++++++++++--------- 12 files changed, 46 insertions(+), 18 deletions(-) create mode 160000 app/src/stable/assets/sources/spotify create mode 160000 app/src/unstable/assets/sources/spotify diff --git a/.gitmodules b/.gitmodules index 2e67308c..cfc1f2fa 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/app/src/stable/AndroidManifest.xml b/app/src/stable/AndroidManifest.xml index 0f4a00b8..a5fdd260 100644 --- a/app/src/stable/AndroidManifest.xml +++ b/app/src/stable/AndroidManifest.xml @@ -30,6 +30,9 @@ + + + @@ -51,6 +54,9 @@ + + + diff --git a/app/src/stable/assets/sources/bilibili b/app/src/stable/assets/sources/bilibili index 611f692c..b518be4d 160000 --- a/app/src/stable/assets/sources/bilibili +++ b/app/src/stable/assets/sources/bilibili @@ -1 +1 @@ -Subproject commit 611f692ced94bac637907b105170a4143580281a +Subproject commit b518be4dd5e162e67e9ca64e09be3fe574fccdb7 diff --git a/app/src/stable/assets/sources/patreon b/app/src/stable/assets/sources/patreon index cee1fda4..5b191993 160000 --- a/app/src/stable/assets/sources/patreon +++ b/app/src/stable/assets/sources/patreon @@ -1 +1 @@ -Subproject commit cee1fda4e875a46315a9d4492e2e3b541d98f39f +Subproject commit 5b1919934d20f8c53de9959b04bdb66e0c6af3e9 diff --git a/app/src/stable/assets/sources/spotify b/app/src/stable/assets/sources/spotify new file mode 160000 index 00000000..843cf2dc --- /dev/null +++ b/app/src/stable/assets/sources/spotify @@ -0,0 +1 @@ +Subproject commit 843cf2dc4b19c02d86a00407e2e8f9f1048cf475 diff --git a/app/src/stable/res/raw/plugin_config.json b/app/src/stable/res/raw/plugin_config.json index f679a30a..a1da4004 100644 --- a/app/src/stable/res/raw/plugin_config.json +++ b/app/src/stable/res/raw/plugin_config.json @@ -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" diff --git a/app/src/unstable/AndroidManifest.xml b/app/src/unstable/AndroidManifest.xml index 8a600a38..60fe5061 100644 --- a/app/src/unstable/AndroidManifest.xml +++ b/app/src/unstable/AndroidManifest.xml @@ -30,6 +30,9 @@ + + + @@ -51,6 +54,9 @@ + + + diff --git a/app/src/unstable/assets/sources/bilibili b/app/src/unstable/assets/sources/bilibili index 611f692c..b518be4d 160000 --- a/app/src/unstable/assets/sources/bilibili +++ b/app/src/unstable/assets/sources/bilibili @@ -1 +1 @@ -Subproject commit 611f692ced94bac637907b105170a4143580281a +Subproject commit b518be4dd5e162e67e9ca64e09be3fe574fccdb7 diff --git a/app/src/unstable/assets/sources/patreon b/app/src/unstable/assets/sources/patreon index cee1fda4..5b191993 160000 --- a/app/src/unstable/assets/sources/patreon +++ b/app/src/unstable/assets/sources/patreon @@ -1 +1 @@ -Subproject commit cee1fda4e875a46315a9d4492e2e3b541d98f39f +Subproject commit 5b1919934d20f8c53de9959b04bdb66e0c6af3e9 diff --git a/app/src/unstable/assets/sources/spotify b/app/src/unstable/assets/sources/spotify new file mode 160000 index 00000000..843cf2dc --- /dev/null +++ b/app/src/unstable/assets/sources/spotify @@ -0,0 +1 @@ +Subproject commit 843cf2dc4b19c02d86a00407e2e8f9f1048cf475 diff --git a/app/src/unstable/res/raw/plugin_config.json b/app/src/unstable/res/raw/plugin_config.json index db526f8f..551c5470 100644 --- a/app/src/unstable/res/raw/plugin_config.json +++ b/app/src/unstable/res/raw/plugin_config.json @@ -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" diff --git a/sign-all-sources.sh b/sign-all-sources.sh index ff4c0de6..3a6d783f 100755 --- a/sign-all-sources.sh +++ b/sign-all-sources.sh @@ -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 \ No newline at end of file