👽 Update the update service to use Solsynth download source

This commit is contained in:
2025-09-07 15:31:36 +08:00
parent ca7cc5d7ee
commit 837f3fbe98

View File

@@ -211,11 +211,11 @@ class UpdateService {
// Prioritize arm64, then armeabi, then x86_64 // Prioritize arm64, then armeabi, then x86_64
if (arm64 != null) { if (arm64 != null) {
return arm64.browserDownloadUrl; return 'https://fs.solsynth.dev/d/official/solian/${arm64.name}';
} else if (armeabi != null) { } else if (armeabi != null) {
return armeabi.browserDownloadUrl; return 'https://fs.solsynth.dev/d/official/solian/${armeabi.name}';
} else if (x86_64 != null) { } else if (x86_64 != null) {
return x86_64.browserDownloadUrl; return 'https://fs.solsynth.dev/d/official/solian/${x86_64.name}';
} }
return null; return null;
} }
@@ -299,8 +299,11 @@ class _UpdateSheetState extends State<_UpdateSheet> {
} }
Future<void> _installUpdate(String url) async { Future<void> _installUpdate(String url) async {
final downloadUrl = String downloadUrl = url;
_useProxy ? 'https://ghfast.top/${Uri.encodeComponent(url)}' : url; if (_useProxy) {
final fileName = url.split('/').last;
downloadUrl = 'https://fs.solsynth.dev/d/rainyun02/solian/$fileName';
}
UpdateModel model = UpdateModel( UpdateModel model = UpdateModel(
downloadUrl, downloadUrl,
@@ -350,7 +353,7 @@ class _UpdateSheetState extends State<_UpdateSheet> {
), ),
if (!kIsWeb && Platform.isAndroid) if (!kIsWeb && Platform.isAndroid)
SwitchListTile( SwitchListTile(
title: const Text('Use GitHub Proxy for Download'), title: const Text('Use secondary source for download'),
value: _useProxy, value: _useProxy,
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {