Compare commits

...

3 Commits

Author SHA1 Message Date
8ba0a0a776 Merge pull request #852 from ImranR98/dev
Fix Aptoide App ID inferral error (#851)
2023-09-04 03:57:56 -04:00
73ed0cea88 Increment version 2023-09-04 03:56:41 -04:00
58a378d212 Fix Aptoide App ID inferral error (#851) 2023-09-04 03:55:13 -04:00
3 changed files with 18 additions and 14 deletions

View File

@ -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();
}

View File

@ -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

View File

@ -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'