Skip to content

Commit

Permalink
Merge pull request #2008 from ImranR98/dev
Browse files Browse the repository at this point in the history
- Fix broken "Download Asset" function for HTML source (#1998)
- Add "refresh before download" (#1943)
- Remove WhatsApp, VLC, and Telegram App sources - no longer needed as HTML source sufficient (#1943)
  • Loading branch information
ImranR98 authored Dec 8, 2024
2 parents f207967 + 243b1eb commit c0968e8
Show file tree
Hide file tree
Showing 32 changed files with 139 additions and 206 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ Currently supported App sources:
- [Tencent App Store](https://sj.qq.com/)
- Jenkins Jobs
- [APKMirror](https://apkmirror.com/) (Track-Only)
- Open Source - App-Specific:
- [VLC](https://videolan.org/)
- Other - App-Specific:
- [WhatsApp](https://whatsapp.com)
- [Telegram App](https://telegram.org)
- [Neutron Code](https://neutroncode.com)
- Direct APK Link
- "HTML" (Fallback): Any other URL that returns an HTML page with links to APK files
Expand Down
1 change: 1 addition & 0 deletions assets/translations/bs.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Crowdsourced App Configs",
"allowInsecure": "Allow insecure HTTP requests",
"stayOneVersionBehind": "Stay one version behind latest",
"refreshBeforeDownload": "Refresh app details before download",
"removeAppQuestion": {
"one": "Želite li ukloniti aplikaciju?",
"other": "Želite li ukloniti aplikacije?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Konfigurace aplikací s využitím crowdsourcingu",
"allowInsecure": "Povolení nezabezpečených požadavků HTTP",
"stayOneVersionBehind": "Zůstaňte o jednu verzi pozadu za nejnovější",
"refreshBeforeDownload": "Obnovení údajů o aplikaci před stažením",
"removeAppQuestion": {
"one": "Odstranit Apku?",
"other": "Odstranit Apky?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Crowdsourcede app-konfigurationer",
"allowInsecure": "Tillad usikre HTTP-anmodninger",
"stayOneVersionBehind": "Forbliv én version bagud den seneste",
"refreshBeforeDownload": "Opdater app-detaljer før download",
"removeAppQuestion": {
"one": "Fjern app?",
"other": "Fjern apps?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Crowdsourced App-Konfigurationen",
"allowInsecure": "Unsichere HTTP-Anfragen zulassen",
"stayOneVersionBehind": "Eine Version hinter der neuesten Version bleiben",
"refreshBeforeDownload": "App-Details vor dem Download aktualisieren",
"removeAppQuestion": {
"one": "App entfernen?",
"other": "Apps entfernen?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/en-EO.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Crowdsourced App Configs",
"allowInsecure": "Allow insecure HTTP requests",
"stayOneVersionBehind": "Stay one version behind latest",
"refreshBeforeDownload": "Refresh app details before download",
"removeAppQuestion": {
"one": "Forigi la aplikaĵon?",
"other": "Forigi la aplikaĵojn?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Crowdsourced App Configs",
"allowInsecure": "Allow insecure HTTP requests",
"stayOneVersionBehind": "Stay one version behind latest",
"refreshBeforeDownload": "Refresh app details before download",
"removeAppQuestion": {
"one": "Remove App?",
"other": "Remove Apps?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Configuración de aplicaciones por crowdsourcing",
"allowInsecure": "Permitir peticiones HTTP inseguras",
"stayOneVersionBehind": "Mantenerse una versión por detrás de la última",
"refreshBeforeDownload": "Actualiza los datos de la aplicación antes de descargarla",
"removeAppQuestion": {
"one": "¿Eliminar aplicación?",
"other": "¿Eliminar aplicaciones?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/fa.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Crowdsourced App Configs",
"allowInsecure": "درخواست های HTTP ناامن را مجاز کنید",
"stayOneVersionBehind": "Stay one version behind latest",
"refreshBeforeDownload": "Refresh app details before download",
"removeAppQuestion": {
"one": "برنامه حذف شود؟",
"other": "برنامه ها حذف شوند؟"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Applis communautaires",
"allowInsecure": "Autoriser les requêtes HTTP non sécurisées",
"stayOneVersionBehind": "Rester à une version de la dernière",
"refreshBeforeDownload": "Actualiser les détails de l'application avant de la télécharger",
"removeAppQuestion": {
"one": "Supprimer l'application ?",
"other": "Supprimer les applications ?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Crowdsourced App Configs",
"allowInsecure": "Nem biztonságos HTTP-kérések engedélyezése",
"stayOneVersionBehind": "Maradjon egy verzióval a legújabb mögött",
"refreshBeforeDownload": "Az alkalmazás adatainak frissítése letöltés előtt",
"removeAppQuestion": {
"one": "Eltávolítja az alkalmazást?",
"other": "Eltávolítja az alkalmazásokat?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Konfigurasi Aplikasi Crowdsourced",
"allowInsecure": "Izinkan permintaan HTTP yang tidak aman",
"stayOneVersionBehind": "Tetap satu versi di belakang versi terbaru",
"refreshBeforeDownload": "Segarkan detail aplikasi sebelum mengunduh",
"removeAppQuestion": {
"one": "Hapus aplikasi?",
"other": "Hapus aplikasi?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Configurazioni di app in crowdsourcing",
"allowInsecure": "Consentire le richieste HTTP non sicure",
"stayOneVersionBehind": "Rimanere una versione indietro rispetto alla più recente",
"refreshBeforeDownload": "Aggiornare i dettagli dell'app prima del download",
"removeAppQuestion": {
"one": "Rimuovere l'app?",
"other": "Rimuovere le app?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "クラウドソーシングによるアプリの設定",
"allowInsecure": "安全でないHTTPリクエストを許可する",
"stayOneVersionBehind": "最新のバージョンから1つ前のものを使用する",
"refreshBeforeDownload": "ダウンロード前にアプリの詳細を更新する",
"removeAppQuestion": {
"one": "アプリを削除しますか?",
"other": "アプリを削除しますか?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "App-configuraties door menigte",
"allowInsecure": "Onveilige HTTP-verzoeken toestaan",
"stayOneVersionBehind": "Blijf een versie achter op de nieuwste",
"refreshBeforeDownload": "Vernieuw app details voor download",
"removeAppQuestion": {
"one": "App verwijderen?",
"other": "Apps verwijderen?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Baza konfiguracji",
"allowInsecure": "Zezwalaj na niezabezpieczone żądania HTTP",
"stayOneVersionBehind": "Pozostań jedną wersję w tyle za najnowszą",
"refreshBeforeDownload": "Odśwież szczegóły aplikacji przed pobraniem",
"removeAppQuestion": {
"one": "Usunąć aplikację?",
"few": "Usunąć aplikacje?",
Expand Down
1 change: 1 addition & 0 deletions assets/translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Configurações de aplicações com base em crowdsourcing",
"allowInsecure": "Permitir pedidos HTTP inseguros",
"stayOneVersionBehind": "Manter-se uma versão atrás da mais recente",
"refreshBeforeDownload": "Atualizar os detalhes da aplicação antes da transferência",
"removeAppQuestion": {
"one": "Remover aplicativo?",
"other": "Remover aplicativos?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Конфиги приложений с помощью краудсорсинга",
"allowInsecure": "Разрешить небезопасные HTTP-запросы",
"stayOneVersionBehind": "Не отставайте от последней версии",
"refreshBeforeDownload": "Обновляйте информацию о приложении перед загрузкой",
"removeAppQuestion": {
"one": "Удалить приложение?",
"other": "Удалить приложения?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Appkonfigurationer med hjälp av crowdsourcing",
"allowInsecure": "Tillåt osäkra HTTP-förfrågningar",
"stayOneVersionBehind": "Håll dig en version bakom den senaste",
"refreshBeforeDownload": "Uppdatera appdetaljerna före nedladdning",
"removeAppQuestion": {
"one": "Ta Bort App?",
"other": "Ta Bort Appar?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Kitle Kaynaklı Uygulama Yapılandırmaları",
"allowInsecure": "Güvensiz HTTP isteklerine izin ver",
"stayOneVersionBehind": "En son sürümün bir sürüm gerisinde kalın",
"refreshBeforeDownload": "İndirmeden önce uygulama ayrıntılarını yenileyin",
"removeAppQuestion": {
"one": "Uygulamayı Kaldır?",
"other": "Uygulamaları Kaldır?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Налаштування краудсорсингових додатків",
"allowInsecure": "Дозволити незахищені HTTP-запити",
"stayOneVersionBehind": "Залишайтеся на одну версію актуальнішою",
"refreshBeforeDownload": "Оновіть інформацію про програму перед завантаженням",
"removeAppQuestion": {
"one": "Видалити застосунок?",
"other": "Видалити застосунки?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Crowdsourced App Configs",
"allowInsecure": "Allow insecure HTTP requests",
"stayOneVersionBehind": "Stay one version behind latest",
"refreshBeforeDownload": "Refresh app details before download",
"removeAppQuestion": {
"one": "Gỡ ứng dụng?",
"other": "Gỡ ứng dụng?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/zh-Hant-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "Crowdsourced App Configs",
"allowInsecure": "Allow insecure HTTP requests",
"stayOneVersionBehind": "Stay one version behind latest",
"refreshBeforeDownload": "Refresh app details before download",
"removeAppQuestion": {
"one": "移除應用程式?",
"other": "移除應用程式?"
Expand Down
1 change: 1 addition & 0 deletions assets/translations/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
"crowdsourcedConfigsShort": "众包应用程序配置",
"allowInsecure": "允许不安全的 HTTP 请求",
"stayOneVersionBehind": "比最新版本晚一个版本",
"refreshBeforeDownload": "下载前刷新应用程序详细信息",
"removeAppQuestion": {
"one": "是否删除应用?",
"other": "是否删除应用?"
Expand Down
10 changes: 9 additions & 1 deletion lib/app_sources/html.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import 'package:obtainium/providers/apps_provider.dart';
import 'package:obtainium/providers/source_provider.dart';

String ensureAbsoluteUrl(String ambiguousUrl, Uri referenceAbsoluteUrl) {
if (ambiguousUrl.startsWith('//')) {
ambiguousUrl = '${referenceAbsoluteUrl.scheme}:$ambiguousUrl';
}
try {
Uri.parse(ambiguousUrl).origin;
return ambiguousUrl;
Expand Down Expand Up @@ -353,7 +356,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')));
}
}
110 changes: 0 additions & 110 deletions lib/app_sources/vlc.dart

This file was deleted.

55 changes: 0 additions & 55 deletions lib/app_sources/whatsapp.dart

This file was deleted.

Loading

0 comments on commit c0968e8

Please sign in to comment.