From 619d4f1a51fd55a280f6ef89eecb7234657ef752 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Sun, 8 Dec 2024 13:47:32 -0500 Subject: [PATCH] Fix broken "Download Asset" function for HTML source (#1998) --- lib/app_sources/html.dart | 7 ++++++- lib/providers/source_provider.dart | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/app_sources/html.dart b/lib/app_sources/html.dart index 198a018..8461943 100644 --- a/lib/app_sources/html.dart +++ b/lib/app_sources/html.dart @@ -353,7 +353,12 @@ class HTML extends AppSource { forAPKDownload: true), allowInsecure: additionalSettings['allowInsecure'] == true)) .toString(); - return APKDetails(version, [rel].map((e) => MapEntry(e, e)).toList(), + return APKDetails( + version, + [rel] + .map((e) => + MapEntry('${e.hashCode}-${Uri.parse(e).pathSegments.last}', e)) + .toList(), AppNames(uri.host, tr('app'))); } } diff --git a/lib/providers/source_provider.dart b/lib/providers/source_provider.dart index 3b87fa7..e2f9f5b 100644 --- a/lib/providers/source_provider.dart +++ b/lib/providers/source_provider.dart @@ -240,7 +240,7 @@ class App { late String name; String? installedVersion; late String latestVersion; - List> apkUrls = []; + List> apkUrls = []; // Key is name, value is URL List> otherAssetUrls = []; late int preferredApkIndex; late Map additionalSettings;