mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-10-30 21:13:28 +01:00
Multi-host support + add '.net' host to APKPure source (#1250)
This commit is contained in:
@@ -5,12 +5,12 @@ import 'package:obtainium/providers/source_provider.dart';
|
||||
|
||||
class Signal extends AppSource {
|
||||
Signal() {
|
||||
host = 'signal.org';
|
||||
hosts = ['signal.org'];
|
||||
}
|
||||
|
||||
@override
|
||||
String sourceSpecificStandardizeURL(String url) {
|
||||
return 'https://$host';
|
||||
return 'https://${hosts[0]}';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -19,7 +19,7 @@ class Signal extends AppSource {
|
||||
Map<String, dynamic> additionalSettings,
|
||||
) async {
|
||||
Response res =
|
||||
await sourceRequest('https://updates.$host/android/latest.json');
|
||||
await sourceRequest('https://updates.${hosts[0]}/android/latest.json');
|
||||
if (res.statusCode == 200) {
|
||||
var json = jsonDecode(res.body);
|
||||
String? apkUrl = json['url'];
|
||||
|
||||
Reference in New Issue
Block a user