Compare commits

..

11 Commits

Author SHA1 Message Date
Imran
e8f9159571 Merge pull request #2455 from ImranR98/dev
Fix "Bad state" bug on mark as updated/installed (#2453)
2025-08-06 18:39:36 -04:00
Imran Remtulla
d8cd17c858 Increment version 2025-08-06 18:38:50 -04:00
Imran
01f423a741 Merge pull request #2447 from ar-lex/bugfix/rustore-charset
RuStore: fix charset detection (#2304)
2025-08-06 18:38:25 -04:00
Imran Remtulla
77e764e76a Fix "Bad state" but on mark as updated/installed (#2453) 2025-08-06 18:37:11 -04:00
Imran Remtulla
a37509c5a3 Merge remote-tracking branch 'origin/dev' 2025-08-04 15:24:00 -04:00
Imran Remtulla
cb9ac4cba0 Include launch.json in git 2025-08-04 15:23:44 -04:00
Alexey Arutyunov
9524148de7 RuStore: fix charset detection (#2304)
Decode whole response body in bytes and fallback to UTF-8 instead
of auto-decoding individual fields.
2025-08-03 01:45:55 +02:00
Imran
d6d3623c63 Merge pull request #2443 from summoner001/main
Translation: Update hu.json
2025-08-02 16:51:28 -04:00
Imran
58c1bdbd00 Merge pull request #2446 from ar-lex/bugfix/rustore-updatedat
Fix update date for RuStore (#2445)
2025-08-02 16:51:17 -04:00
Alexey Arutyunov
f2b7b196a8 Fix update date for RuStore (#2445) 2025-08-02 21:20:29 +02:00
summoner
73746bcb52 Translation: Update hu.json
Fixing autotranslated strings
2025-08-02 10:38:31 +00:00
6 changed files with 45 additions and 17 deletions

3
.gitignore vendored
View File

@@ -11,7 +11,8 @@
.svn/ .svn/
.swiftpm/ .swiftpm/
migrate_working_dir/ migrate_working_dir/
.vscode/ .vscode/*
!.vscode/launch.json
# IntelliJ related # IntelliJ related
*.iml *.iml

28
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,28 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Obtainium",
"request": "launch",
"type": "dart",
"args":[ "--flavor", "normal" ]
},
{
"name": "Obtainium (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile",
"args":[ "--flavor", "normal" ]
},
{
"name": "Obtainium (release mode)",
"request": "launch",
"type": "dart",
"flutterMode": "release",
"args":[ "--flavor", "normal" ]
}
]
}

View File

@@ -167,7 +167,7 @@
"versionCorrectionDisabled": "Verziókorrekció letiltva (úgy tűnik, hogy a bővítmény nem működik)", "versionCorrectionDisabled": "Verziókorrekció letiltva (úgy tűnik, hogy a bővítmény nem működik)",
"unknown": "Ismeretlen", "unknown": "Ismeretlen",
"none": "Semmi", "none": "Semmi",
"all": "Minden", "all": "Összes",
"never": "Soha", "never": "Soha",
"latestVersionX": "Legújabb verzió: {}", "latestVersionX": "Legújabb verzió: {}",
"installedVersionX": "Telepített verzió: {}", "installedVersionX": "Telepített verzió: {}",
@@ -334,7 +334,7 @@
"foregroundService": "Obtainium előtér-szolgáltatás", "foregroundService": "Obtainium előtér-szolgáltatás",
"foregroundServiceExplanation": "Előtér-szolgáltatás használata a frissítések ellenőrzéséhez (megbízhatóbb, de több energiát fogyaszt)", "foregroundServiceExplanation": "Előtér-szolgáltatás használata a frissítések ellenőrzéséhez (megbízhatóbb, de több energiát fogyaszt)",
"fgServiceNotice": "Ez az értesítés a háttérben történő frissítésellenőrzéshez szükséges (a rendszer beállításaiban elrejthető).", "fgServiceNotice": "Ez az értesítés a háttérben történő frissítésellenőrzéshez szükséges (a rendszer beállításaiban elrejthető).",
"excludeSecrets": "Titkok kizárása", "excludeSecrets": "Érzékeny adatok (például: személyes hozzáférési tokenek) kihagyása",
"removeAppQuestion": { "removeAppQuestion": {
"one": "Eltávolítja az alkalmazást?", "one": "Eltávolítja az alkalmazást?",
"other": "Eltávolítja az alkalmazásokat?" "other": "Eltávolítja az alkalmazásokat?"

View File

@@ -36,13 +36,15 @@ class RuStore extends AppSource {
return Uri.parse(standardUrl).pathSegments.last; return Uri.parse(standardUrl).pathSegments.last;
} }
Future<String> decodeString(String str) async { Future<dynamic> decodeJsonBody(Uint8List bytes) async {
try { try {
return (await CharsetDetector.autoDecode( return jsonDecode((await CharsetDetector.autoDecode(bytes)).string);
Uint8List.fromList(str.codeUnits),
)).string;
} catch (e) { } catch (e) {
return str; try {
return jsonDecode(utf8.decode(bytes));
} catch (_) {
rethrow;
}
} }
} }
@@ -59,14 +61,14 @@ class RuStore extends AppSource {
if (res0.statusCode != 200) { if (res0.statusCode != 200) {
throw getObtainiumHttpError(res0); throw getObtainiumHttpError(res0);
} }
var appDetails = jsonDecode(res0.body)['body']; var appDetails = (await decodeJsonBody(res0.bodyBytes))['body'];
if (appDetails['appId'] == null) { if (appDetails['appId'] == null) {
throw NoReleasesError(); throw NoReleasesError();
} }
String appName = appDetails['appName'] ?? tr('app'); String appName = appDetails['appName'] ?? tr('app');
String author = appDetails['companyName'] ?? name; String author = appDetails['companyName'] ?? name;
String? dateStr = appDetails['updatedAt']; String? dateStr = appDetails['appVerUpdatedAt'];
String? version = appDetails['versionName']; String? version = appDetails['versionName'];
String? changeLog = appDetails['whatsNew']; String? changeLog = appDetails['whatsNew'];
if (version == null) { if (version == null) {
@@ -83,15 +85,11 @@ class RuStore extends AppSource {
followRedirects: false, followRedirects: false,
postBody: {"appId": appDetails['appId'], "firstInstall": true}, postBody: {"appId": appDetails['appId'], "firstInstall": true},
); );
var downloadDetails = jsonDecode(res1.body)['body']; var downloadDetails = (await decodeJsonBody(res1.bodyBytes))['body'];
if (res1.statusCode != 200 || downloadDetails['apkUrl'] == null) { if (res1.statusCode != 200 || downloadDetails['apkUrl'] == null) {
throw NoAPKError(); throw NoAPKError();
} }
appName = await decodeString(appName);
author = await decodeString(author);
changeLog = changeLog != null ? await decodeString(changeLog) : null;
return APKDetails( return APKDetails(
version, version,
getApkUrlsFromUrls([ getApkUrlsFromUrls([

View File

@@ -1084,6 +1084,7 @@ class AppsProvider with ChangeNotifier {
var trackOnly = apps[id]!.app.additionalSettings['trackOnly'] == true; var trackOnly = apps[id]!.app.additionalSettings['trackOnly'] == true;
var refreshBeforeDownload = var refreshBeforeDownload =
apps[id]!.app.additionalSettings['refreshBeforeDownload'] == true || apps[id]!.app.additionalSettings['refreshBeforeDownload'] == true ||
apps[id]!.app.apkUrls.isNotEmpty &&
apps[id]!.app.apkUrls.first.value == 'placeholder'; apps[id]!.app.apkUrls.first.value == 'placeholder';
if (refreshBeforeDownload) { if (refreshBeforeDownload) {
await checkUpdate(apps[id]!.app.id); await checkUpdate(apps[id]!.app.id);

View File

@@ -16,7 +16,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 # 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 # 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. # of the product and file versions while build-number is used as the build suffix.
version: 1.2.2+2318 version: 1.2.3+2319
environment: environment:
sdk: ^3.8.1 sdk: ^3.8.1