mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-13 13:26:43 +02:00
Removed Steam Source (existing apps auto-switched to HTML) (#1244) + bugfixes
This commit is contained in:
@ -34,7 +34,6 @@ Currently supported App sources:
|
||||
- Other - App-Specific:
|
||||
- [WhatsApp](https://whatsapp.com)
|
||||
- [Telegram App](https://telegram.org)
|
||||
- [Steam Mobile Apps](https://store.steampowered.com/mobile)
|
||||
- [Neutron Code](https://neutroncode.com)
|
||||
- "HTML" (Fallback): Any other URL that returns an HTML page with links to APK files
|
||||
|
||||
|
@ -123,7 +123,7 @@ class GeneratedFormSubForm extends GeneratedFormItem {
|
||||
final List<List<GeneratedFormItem>> items;
|
||||
|
||||
GeneratedFormSubForm(super.key, this.items,
|
||||
{super.label, super.belowWidgets, super.defaultValue});
|
||||
{super.label, super.belowWidgets, super.defaultValue = const []});
|
||||
|
||||
@override
|
||||
ensureType(val) {
|
||||
|
@ -527,9 +527,10 @@ class AppsProvider with ChangeNotifier {
|
||||
? 0
|
||||
: 1;
|
||||
case InstallMethodSettings.root:
|
||||
code = (await NativeFeatures.installWithRoot(apkFilePath: file.file.path))
|
||||
? 0
|
||||
: 1;
|
||||
code =
|
||||
(await NativeFeatures.installWithRoot(apkFilePath: file.file.path))
|
||||
? 0
|
||||
: 1;
|
||||
}
|
||||
bool installed = false;
|
||||
if (code != null && code != 0 && code != 3) {
|
||||
@ -1300,6 +1301,9 @@ class AppsProvider with ChangeNotifier {
|
||||
settingsProvider.prefs?.setInt(key, value);
|
||||
} else if (value is bool) {
|
||||
settingsProvider.prefs?.setBool(key, value);
|
||||
} else if (value is List) {
|
||||
settingsProvider.prefs
|
||||
?.setStringList(key, value.map((e) => e as String).toList());
|
||||
} else {
|
||||
settingsProvider.prefs?.setString(key, value as String);
|
||||
}
|
||||
|
@ -163,6 +163,24 @@ appJSONCompatibilityModifiers(Map<String, dynamic> json) {
|
||||
return e['customLinkFilterRegex']?.isNotEmpty == true;
|
||||
}).toList();
|
||||
}
|
||||
// Steam source apps should be converted to HTML (#1244)
|
||||
var legacySteamSourceApps = SteamMobile().apks.keys;
|
||||
if (legacySteamSourceApps.contains(additionalSettings['app'] ?? '')) {
|
||||
json['url'] = '${json['url']}/mobile';
|
||||
var replacementAdditionalSettings = getDefaultValuesFromFormItems(
|
||||
HTML().combinedAppSpecificSettingFormItems);
|
||||
for (var s in replacementAdditionalSettings.keys) {
|
||||
if (additionalSettings.containsKey(s)) {
|
||||
replacementAdditionalSettings[s] = additionalSettings[s];
|
||||
}
|
||||
}
|
||||
replacementAdditionalSettings['customLinkFilterRegex'] =
|
||||
'/${additionalSettings['app']}-(([0-9]+\\.?){1,})\\.apk';
|
||||
replacementAdditionalSettings['versionExtractionRegEx'] =
|
||||
replacementAdditionalSettings['customLinkFilterRegex'];
|
||||
replacementAdditionalSettings['matchGroupToUse'] = '\$1';
|
||||
additionalSettings = replacementAdditionalSettings;
|
||||
}
|
||||
}
|
||||
json['additionalSettings'] = jsonEncode(additionalSettings);
|
||||
// F-Droid no longer needs cloudflare exception since override can be used - migrate apps appropriately
|
||||
@ -658,13 +676,11 @@ class SourceProvider {
|
||||
APKMirror(),
|
||||
HuaweiAppGallery(),
|
||||
Jenkins(),
|
||||
// APKCombo(), // Can't get past their scraping blocking yet (get 403 Forbidden)
|
||||
Mullvad(),
|
||||
Signal(),
|
||||
VLC(),
|
||||
WhatsApp(), // As of 2023-03-20 this is unusable as the version on the webpage is months out of date
|
||||
WhatsApp(),
|
||||
TelegramApp(),
|
||||
SteamMobile(),
|
||||
NeutronCode(),
|
||||
HTML() // This should ALWAYS be the last option as they are tried in order
|
||||
];
|
||||
|
Reference in New Issue
Block a user