mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-13 13:26:43 +02:00
Compare commits
3 Commits
v0.14.9-be
...
v0.14.10-b
Author | SHA1 | Date | |
---|---|---|---|
8ba0a0a776 | |||
73ed0cea88 | |||
58a378d212 |
@ -26,14 +26,10 @@ class Aptoide extends AppSource {
|
||||
@override
|
||||
Future<String?> tryInferringAppId(String standardUrl,
|
||||
{Map<String, dynamic> additionalSettings = const {}}) async {
|
||||
return (await getLatestAPKDetails(standardUrl, additionalSettings)).version;
|
||||
return (await getAppDetailsJSON(standardUrl))['package'];
|
||||
}
|
||||
|
||||
@override
|
||||
Future<APKDetails> getLatestAPKDetails(
|
||||
String standardUrl,
|
||||
Map<String, dynamic> additionalSettings,
|
||||
) async {
|
||||
Future<Map<String, dynamic>> getAppDetailsJSON(String standardUrl) async {
|
||||
var res = await sourceRequest(standardUrl);
|
||||
if (res.statusCode != 200) {
|
||||
throw getObtainiumHttpError(res);
|
||||
@ -50,12 +46,20 @@ class Aptoide extends AppSource {
|
||||
if (res2.statusCode != 200) {
|
||||
throw getObtainiumHttpError(res);
|
||||
}
|
||||
var appDetails = jsonDecode(res2.body)?['nodes']?['meta']?['data'];
|
||||
String appName = appDetails?['name'] ?? tr('app');
|
||||
String author = appDetails?['developer']?['name'] ?? name;
|
||||
String? dateStr = appDetails?['updated'];
|
||||
String? version = appDetails?['file']?['vername'];
|
||||
String? apkUrl = appDetails?['file']?['path'];
|
||||
return jsonDecode(res2.body)?['nodes']?['meta']?['data'];
|
||||
}
|
||||
|
||||
@override
|
||||
Future<APKDetails> getLatestAPKDetails(
|
||||
String standardUrl,
|
||||
Map<String, dynamic> additionalSettings,
|
||||
) async {
|
||||
var appDetails = await getAppDetailsJSON(standardUrl);
|
||||
String appName = appDetails['name'] ?? tr('app');
|
||||
String author = appDetails['developer']?['name'] ?? name;
|
||||
String? dateStr = appDetails['updated'];
|
||||
String? version = appDetails['file']?['vername'];
|
||||
String? apkUrl = appDetails['file']?['path'];
|
||||
if (version == null) {
|
||||
throw NoVersionError();
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ import 'package:easy_localization/src/easy_localization_controller.dart';
|
||||
// ignore: implementation_imports
|
||||
import 'package:easy_localization/src/localization.dart';
|
||||
|
||||
const String currentVersion = '0.14.9';
|
||||
const String currentVersion = '0.14.10';
|
||||
const String currentReleaseTag =
|
||||
'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES
|
||||
|
||||
|
@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 0.14.9+201 # When changing this, update the tag in main() accordingly
|
||||
version: 0.14.10+202 # When changing this, update the tag in main() accordingly
|
||||
|
||||
environment:
|
||||
sdk: '>=2.18.2 <3.0.0'
|
||||
|
Reference in New Issue
Block a user