diff --git a/assets/translations/bs.json b/assets/translations/bs.json index c28637b..56191e8 100644 --- a/assets/translations/bs.json +++ b/assets/translations/bs.json @@ -263,6 +263,7 @@ "debugMenu": "Debug Menu", "bgTaskStarted": "Background task started - check logs.", "runBgCheckNow": "Run Background Update Check Now", + "versionExtractWholePage": "Apply Version Extraction Regex to Entire Page", "removeAppQuestion": { "one": "Želite li ukloniti aplikaciju?", "other": "Želite li ukloniti aplikacije?" diff --git a/assets/translations/cs.json b/assets/translations/cs.json index 0aceed9..b8c9e9a 100644 --- a/assets/translations/cs.json +++ b/assets/translations/cs.json @@ -263,6 +263,7 @@ "debugMenu": "Debug Menu", "bgTaskStarted": "Background task started - check logs.", "runBgCheckNow": "Run Background Update Check Now", + "versionExtractWholePage": "Apply Version Extraction Regex to Entire Page", "removeAppQuestion": { "one": "Odstranit Apku?", "other": "Odstranit Apky?" diff --git a/assets/translations/de.json b/assets/translations/de.json index a554cd6..124e759 100644 --- a/assets/translations/de.json +++ b/assets/translations/de.json @@ -263,6 +263,7 @@ "debugMenu": "Debug Menü", "bgTaskStarted": "Hintergrundaufgabe gestartet – Logs prüfen.", "runBgCheckNow": "Hintergrundaktualisierungsprüfung jetzt durchführen", + "versionExtractWholePage": "Apply Version Extraction Regex to Entire Page", "removeAppQuestion": { "one": "App entfernen?", "other": "Apps entfernen?" diff --git a/assets/translations/en.json b/assets/translations/en.json index a283052..d790e89 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -252,7 +252,7 @@ "bgUpdatesOnWiFiOnly": "Disable background updates when not on WiFi", "autoSelectHighestVersionCode": "Auto-select highest versionCode APK", "versionExtractionRegEx": "Version Extraction RegEx", - "matchGroupToUse": "Match Group to Use", + "matchGroupToUse": "Match Group to Use for Version Extraction Regex", "highlightTouchTargets": "Highlight less obvious touch targets", "pickExportDir": "Pick Export Directory", "autoExportOnChanges": "Auto-export on changes", @@ -263,6 +263,7 @@ "debugMenu": "Debug Menu", "bgTaskStarted": "Background task started - check logs.", "runBgCheckNow": "Run Background Update Check Now", + "versionExtractWholePage": "Apply Version Extraction Regex to Entire Page", "removeAppQuestion": { "one": "Remove App?", "other": "Remove Apps?" diff --git a/assets/translations/es.json b/assets/translations/es.json index b835405..df72937 100644 --- a/assets/translations/es.json +++ b/assets/translations/es.json @@ -263,6 +263,7 @@ "debugMenu": "Debug Menu", "bgTaskStarted": "Background task started - check logs.", "runBgCheckNow": "Run Background Update Check Now", + "versionExtractWholePage": "Apply Version Extraction Regex to Entire Page", "removeAppQuestion": { "one": "¿Eliminar Aplicación?", "other": "¿Eliminar Aplicaciones?" diff --git a/assets/translations/fa.json b/assets/translations/fa.json index e2c51a3..2f78a02 100644 --- a/assets/translations/fa.json +++ b/assets/translations/fa.json @@ -263,6 +263,7 @@ "debugMenu": "Debug Menu", "bgTaskStarted": "Background task started - check logs.", "runBgCheckNow": "Run Background Update Check Now", + "versionExtractWholePage": "Apply Version Extraction Regex to Entire Page", "removeAppQuestion": { "one": "برنامه حذف شود؟", "other": "برنامه ها حذف شوند؟" diff --git a/assets/translations/fr.json b/assets/translations/fr.json index c057e28..43bf149 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -263,6 +263,7 @@ "debugMenu": "Debug Menu", "bgTaskStarted": "Background task started - check logs.", "runBgCheckNow": "Run Background Update Check Now", + "versionExtractWholePage": "Apply Version Extraction Regex to Entire Page", "removeAppQuestion": { "one": "Supprimer l'application ?", "other": "Supprimer les applications ?" diff --git a/assets/translations/hu.json b/assets/translations/hu.json index c0cd3b3..5402c95 100644 --- a/assets/translations/hu.json +++ b/assets/translations/hu.json @@ -263,6 +263,7 @@ "bgTaskStarted": "A háttérfeladat elindult – ellenőrizze a naplókat.", "enableBackgroundUpdates": "Frissítések a háttérben", "runBgCheckNow": "Futtassa a Háttérben frissítés ellenőrzését most", + "versionExtractWholePage": "Apply Version Extraction Regex to Entire Page", "removeAppQuestion": { "one": "Eltávolítja az alkalmazást?", "other": "Eltávolítja az alkalmazást?" diff --git a/assets/translations/it.json b/assets/translations/it.json index 8818644..62a5911 100644 --- a/assets/translations/it.json +++ b/assets/translations/it.json @@ -263,6 +263,7 @@ "debugMenu": "Debug Menu", "bgTaskStarted": "Background task started - check logs.", "runBgCheckNow": "Run Background Update Check Now", + "versionExtractWholePage": "Apply Version Extraction Regex to Entire Page", "removeAppQuestion": { "one": "Rimuovere l'app?", "other": "Rimuovere le app?" diff --git a/assets/translations/ja.json b/assets/translations/ja.json index 4f6c398..55d9a4d 100644 --- a/assets/translations/ja.json +++ b/assets/translations/ja.json @@ -263,6 +263,7 @@ "debugMenu": "Debug Menu", "bgTaskStarted": "Background task started - check logs.", "runBgCheckNow": "Run Background Update Check Now", + "versionExtractWholePage": "Apply Version Extraction Regex to Entire Page", "removeAppQuestion": { "one": "アプリを削除しますか?", "other": "アプリを削除しますか?" diff --git a/assets/translations/pl.json b/assets/translations/pl.json index 21db5f1..ef4d950 100644 --- a/assets/translations/pl.json +++ b/assets/translations/pl.json @@ -263,6 +263,7 @@ "debugMenu": "Menu debugowania", "bgTaskStarted": "Uruchomiono zadanie w tle - sprawdź logi.", "runBgCheckNow": "Wymuś sprawdzenie aktualizacji w tle", + "versionExtractWholePage": "Apply Version Extraction Regex to Entire Page", "removeAppQuestion": { "one": "Usunąć aplikację?", "few": "Usunąć aplikacje?", diff --git a/assets/translations/pt.json b/assets/translations/pt.json index 1271fc5..d30faea 100644 --- a/assets/translations/pt.json +++ b/assets/translations/pt.json @@ -263,6 +263,7 @@ "debugMenu": "Menu Debug", "bgTaskStarted": "Tarefa em segundo plano iniciada - verifique os logs.", "runBgCheckNow": "Execute a verificação de atualização em segundo plano agora", + "versionExtractWholePage": "Apply Version Extraction Regex to Entire Page", "removeAppQuestion": { "one": "Remover App?", "other": "Remover Apps?" diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 8ea5c0f..c725b05 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -263,6 +263,7 @@ "debugMenu": "Меню Отладки", "bgTaskStarted": "Фоновая задача начата - проверьте журналы.", "runBgCheckNow": "Запустить проверку фонового обновления сейчас", + "versionExtractWholePage": "Apply Version Extraction Regex to Entire Page", "removeAppQuestion": { "one": "Удалить приложение?", "other": "Удалить приложения?" diff --git a/assets/translations/zh.json b/assets/translations/zh.json index 69954f9..615eb90 100644 --- a/assets/translations/zh.json +++ b/assets/translations/zh.json @@ -263,6 +263,7 @@ "debugMenu": "调试选项", "bgTaskStarted": "后台任务已启动 - 详见日志", "runBgCheckNow": "立即进行后台更新检查", + "versionExtractWholePage": "Apply Version Extraction Regex to Entire Page", "removeAppQuestion": { "one": "是否删除应用?", "other": "是否删除应用?" diff --git a/lib/app_sources/html.dart b/lib/app_sources/html.dart index ee1593a..91911e7 100644 --- a/lib/app_sources/html.dart +++ b/lib/app_sources/html.dart @@ -117,6 +117,8 @@ class HTML extends AppSource { label: tr('versionExtractionRegEx'), required: false, additionalValidators: [(value) => regExValidator(value)]), + ], + [ GeneratedFormTextField('matchGroupToUse', label: tr('matchGroupToUse'), required: false, @@ -131,6 +133,10 @@ class HTML extends AppSource { return intValidator(value); } ]) + ], + [ + GeneratedFormSwitch('versionExtractWholePage', + label: tr('versionExtractWholePage')) ] ]; overrideVersionDetectionFormDefault('noVersionDetection', @@ -212,7 +218,8 @@ class HTML extends AppSource { var versionExtractionRegEx = additionalSettings['versionExtractionRegEx'] as String?; if (versionExtractionRegEx?.isNotEmpty == true) { - var match = RegExp(versionExtractionRegEx!).allMatches(rel); + var match = RegExp(versionExtractionRegEx!).allMatches( + res.body.split('\r\n').join('\n').split('\n').join('\\n')); if (match.isEmpty) { throw NoVersionError(); }