mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-11-04 07:13:28 +01:00 
			
		
		
		
	Compare commits
	
		
			6 Commits
		
	
	
		
			v0.11.22-b
			...
			v0.11.23-b
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					e8cbac8657 | ||
| 
						 | 
					b66c13d319 | ||
| 
						 | 
					782d055bc3 | ||
| 
						 | 
					d557746965 | ||
| 
						 | 
					e6b05d50b9 | ||
| 
						 | 
					9fe8a200ef | 
@@ -219,7 +219,7 @@
 | 
			
		||||
    "importFromURLsInFile": "Importálás fájlban található URL-ből (mint pl. OPML)",
 | 
			
		||||
    "versionDetection": "Verzió érzékelés",
 | 
			
		||||
    "standardVersionDetection": "Alapért. verzió érzékelés",
 | 
			
		||||
    "groupByCategory": "Group by Category",
 | 
			
		||||
    "groupByCategory": "Csoportosítás Kategória alapján",
 | 
			
		||||
    "removeAppQuestion": {
 | 
			
		||||
        "one": "Eltávolítja az alkalmazást?",
 | 
			
		||||
        "other": "Eltávolítja az alkalmazást?"
 | 
			
		||||
 
 | 
			
		||||
@@ -14,12 +14,14 @@ class FDroid extends AppSource {
 | 
			
		||||
  @override
 | 
			
		||||
  String standardizeURL(String url) {
 | 
			
		||||
    RegExp standardUrlRegExB =
 | 
			
		||||
        RegExp('^https?://$host/+[^/]+/+packages/+[^/]+');
 | 
			
		||||
        RegExp('^https?://(cloudflare\\.)?$host/+[^/]+/+packages/+[^/]+');
 | 
			
		||||
    RegExpMatch? match = standardUrlRegExB.firstMatch(url.toLowerCase());
 | 
			
		||||
    if (match != null) {
 | 
			
		||||
      url = 'https://$host/packages/${Uri.parse(url).pathSegments.last}';
 | 
			
		||||
      url =
 | 
			
		||||
          'https://${Uri.parse(url.substring(0, match.end)).host}/packages/${Uri.parse(url).pathSegments.last}';
 | 
			
		||||
    }
 | 
			
		||||
    RegExp standardUrlRegExA = RegExp('^https?://$host/+packages/+[^/]+');
 | 
			
		||||
    RegExp standardUrlRegExA =
 | 
			
		||||
        RegExp('^https?://(cloudflare\\.)?$host/+packages/+[^/]+');
 | 
			
		||||
    match = standardUrlRegExA.firstMatch(url.toLowerCase());
 | 
			
		||||
    if (match == null) {
 | 
			
		||||
      throw InvalidURLError(name);
 | 
			
		||||
@@ -61,9 +63,10 @@ class FDroid extends AppSource {
 | 
			
		||||
    Map<String, dynamic> additionalSettings,
 | 
			
		||||
  ) async {
 | 
			
		||||
    String? appId = tryInferringAppId(standardUrl);
 | 
			
		||||
    String host = Uri.parse(standardUrl).host;
 | 
			
		||||
    return getAPKUrlsFromFDroidPackagesAPIResponse(
 | 
			
		||||
        await get(Uri.parse('https://f-droid.org/api/v1/packages/$appId')),
 | 
			
		||||
        'https://f-droid.org/repo/$appId',
 | 
			
		||||
        await get(Uri.parse('https://$host/api/v1/packages/$appId')),
 | 
			
		||||
        'https://$host/repo/$appId',
 | 
			
		||||
        standardUrl);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -185,9 +185,11 @@ class GitHub extends AppSource {
 | 
			
		||||
      Map<String, String> urlsWithDescriptions = {};
 | 
			
		||||
      for (var e in (jsonDecode(res.body)['items'] as List<dynamic>)) {
 | 
			
		||||
        urlsWithDescriptions.addAll({
 | 
			
		||||
          e['html_url'] as String: e['description'] != null
 | 
			
		||||
              ? e['description'] as String
 | 
			
		||||
              : tr('noDescription')
 | 
			
		||||
          e['html_url'] as String:
 | 
			
		||||
              ((e['archived'] == true ? '[ARCHIVED] ' : '') +
 | 
			
		||||
                  (e['description'] != null
 | 
			
		||||
                      ? e['description'] as String
 | 
			
		||||
                      : tr('noDescription')))
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
      return urlsWithDescriptions;
 | 
			
		||||
 
 | 
			
		||||
@@ -21,7 +21,7 @@ import 'package:easy_localization/src/easy_localization_controller.dart';
 | 
			
		||||
// ignore: implementation_imports
 | 
			
		||||
import 'package:easy_localization/src/localization.dart';
 | 
			
		||||
 | 
			
		||||
const String currentVersion = '0.11.22';
 | 
			
		||||
const String currentVersion = '0.11.23';
 | 
			
		||||
const String currentReleaseTag =
 | 
			
		||||
    'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -334,11 +334,10 @@ class _AddAppPageState extends State<AddAppPage> {
 | 
			
		||||
          ],
 | 
			
		||||
        );
 | 
			
		||||
 | 
			
		||||
    Widget getSourcesListWidget() => Expanded(
 | 
			
		||||
            child: Column(
 | 
			
		||||
                crossAxisAlignment: CrossAxisAlignment.center,
 | 
			
		||||
                mainAxisAlignment: MainAxisAlignment.center,
 | 
			
		||||
                children: [
 | 
			
		||||
    Widget getSourcesListWidget() => Column(
 | 
			
		||||
            crossAxisAlignment: CrossAxisAlignment.center,
 | 
			
		||||
            mainAxisAlignment: MainAxisAlignment.center,
 | 
			
		||||
            children: [
 | 
			
		||||
              const SizedBox(
 | 
			
		||||
                height: 48,
 | 
			
		||||
              ),
 | 
			
		||||
@@ -365,16 +364,17 @@ class _AddAppPageState extends State<AddAppPage> {
 | 
			
		||||
                            fontStyle: FontStyle.italic),
 | 
			
		||||
                      )))
 | 
			
		||||
                  .toList()
 | 
			
		||||
            ]));
 | 
			
		||||
            ]);
 | 
			
		||||
 | 
			
		||||
    return Scaffold(
 | 
			
		||||
        backgroundColor: Theme.of(context).colorScheme.surface,
 | 
			
		||||
        body: CustomScrollView(slivers: <Widget>[
 | 
			
		||||
        body: CustomScrollView(shrinkWrap: true, slivers: <Widget>[
 | 
			
		||||
          CustomAppBar(title: tr('addApp')),
 | 
			
		||||
          SliverFillRemaining(
 | 
			
		||||
          SliverToBoxAdapter(
 | 
			
		||||
            child: Padding(
 | 
			
		||||
                padding: const EdgeInsets.all(16),
 | 
			
		||||
                child: Column(
 | 
			
		||||
                    mainAxisSize: MainAxisSize.min,
 | 
			
		||||
                    crossAxisAlignment: CrossAxisAlignment.stretch,
 | 
			
		||||
                    children: [
 | 
			
		||||
                      getUrlInputRow(),
 | 
			
		||||
 
 | 
			
		||||
@@ -147,7 +147,7 @@ class _AppPageState extends State<AppPage> {
 | 
			
		||||
              height: 25,
 | 
			
		||||
            ),
 | 
			
		||||
            Text(
 | 
			
		||||
              app?.installedInfo?.name ?? app?.app.name ?? tr('app'),
 | 
			
		||||
              app?.app.name ?? tr('app'),
 | 
			
		||||
              textAlign: TextAlign.center,
 | 
			
		||||
              style: Theme.of(context).textTheme.displayLarge,
 | 
			
		||||
            ),
 | 
			
		||||
 
 | 
			
		||||
@@ -670,6 +670,9 @@ class AppsProvider with ChangeNotifier {
 | 
			
		||||
    for (var app in apps) {
 | 
			
		||||
      AppInfo? info = await getInstalledInfo(app.id);
 | 
			
		||||
      app.name = info?.name ?? app.name;
 | 
			
		||||
      if (app.additionalSettings['appName']?.toString().isNotEmpty == true) {
 | 
			
		||||
        app.name = app.additionalSettings['appName'].toString().trim();
 | 
			
		||||
      }
 | 
			
		||||
      if (attemptToCorrectInstallStatus) {
 | 
			
		||||
        app = getCorrectedInstallStatusAppIfPossible(app, info) ?? app;
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
@@ -278,7 +278,8 @@ class AppSource {
 | 
			
		||||
              return regExValidator(value);
 | 
			
		||||
            }
 | 
			
		||||
          ])
 | 
			
		||||
    ]
 | 
			
		||||
    ],
 | 
			
		||||
    [GeneratedFormTextField('appName', label: tr('appName'), required: false)]
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  // Previous 2 variables combined into one at runtime for convenient usage
 | 
			
		||||
@@ -362,7 +363,7 @@ class SourceProvider {
 | 
			
		||||
    url = preStandardizeUrl(url);
 | 
			
		||||
    AppSource? source;
 | 
			
		||||
    for (var s in sources.where((element) => element.host != null)) {
 | 
			
		||||
      if (url.contains('://${s.host}')) {
 | 
			
		||||
      if (RegExp('://(.+\\.)?${s.host}').hasMatch(url)) {
 | 
			
		||||
        source = s;
 | 
			
		||||
        break;
 | 
			
		||||
      }
 | 
			
		||||
@@ -427,8 +428,10 @@ class SourceProvider {
 | 
			
		||||
      throw NoAPKError();
 | 
			
		||||
    }
 | 
			
		||||
    String apkVersion = apk.version.replaceAll('/', '-');
 | 
			
		||||
    var name = currentApp?.name.trim() ??
 | 
			
		||||
        apk.names.name[0].toUpperCase() + apk.names.name.substring(1);
 | 
			
		||||
    var name = currentApp != null ? currentApp.name.trim() : '';
 | 
			
		||||
    name = name.isNotEmpty
 | 
			
		||||
        ? name
 | 
			
		||||
        : apk.names.name[0].toUpperCase() + apk.names.name.substring(1);
 | 
			
		||||
    return App(
 | 
			
		||||
        currentApp?.id ??
 | 
			
		||||
            source.tryInferringAppId(standardUrl,
 | 
			
		||||
@@ -436,9 +439,7 @@ class SourceProvider {
 | 
			
		||||
            generateTempID(standardUrl, additionalSettings),
 | 
			
		||||
        standardUrl,
 | 
			
		||||
        apk.names.author[0].toUpperCase() + apk.names.author.substring(1),
 | 
			
		||||
        name.trim().isNotEmpty
 | 
			
		||||
            ? name
 | 
			
		||||
            : apk.names.name[0].toUpperCase() + apk.names.name.substring(1),
 | 
			
		||||
        name,
 | 
			
		||||
        currentApp?.installedVersion,
 | 
			
		||||
        apkVersion,
 | 
			
		||||
        apk.apkUrls,
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,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
 | 
			
		||||
# 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.
 | 
			
		||||
version: 0.11.22+144 # When changing this, update the tag in main() accordingly
 | 
			
		||||
version: 0.11.23+145 # When changing this, update the tag in main() accordingly
 | 
			
		||||
 | 
			
		||||
environment:
 | 
			
		||||
  sdk: '>=2.18.2 <3.0.0'
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user