Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve gitlab .apk retrieval (#1450, #1381, #1380) #1459

Merged
merged 4 commits into from
Mar 9, 2024

Conversation

akramer-zibra
Copy link
Contributor

@akramer-zibra akramer-zibra commented Mar 9, 2024

Obtainium 1.0.4 has two strategies to retrieve .apk information from Gitlab: This is either (a) by using the Gitlab API with a Private Access Token (PAT) or either (b) by using the tags-page of a repository. In some cases (e.g. Aurora Store) the tags-page does not have information about related .apk files, but the Gitlab API has (#1450, #1381, #1380).

This patch removes the tags-page as an information provider and simplifies the retrieval logic. As it turned out: Gitlab's REST API works without Private Access Token authentication for public repositories. So the Private Access Token is optional in case authentication is required.

Previous discussion: #1438

Tested with Android 14 on an emulated AVD

  • When I add AuroraStore with its Gitlab url Then Obtainium shows the latest version correctly And When I click install Then Obtainium installs this version successfully
  • When I add AppWarden with its Gitlab url Then Obtainium shows the latest version correctly And When i click install Then Obtainium installs this version successfully

Notice: I haven't tested this patch with private repositories and/or private Gitlab instances yet.

So this code does focus on the official Gitlab REST API. With this the retrieval logic changes.
This may prepare for later refactorings and code simplification
It turned out: If the parameter `private_token` is given but empty, the Gitlab REST API does expect a valid access token otherwise responds with an authorization error
@akramer-zibra
Copy link
Contributor Author

akramer-zibra commented Mar 9, 2024

Are there any texts in the UI which should have been updated, too?

@ImranR98 ImranR98 merged commit efc6846 into ImranR98:main Mar 9, 2024
ImranR98 pushed a commit that referenced this pull request Mar 9, 2024
ImranR98 added a commit that referenced this pull request Mar 9, 2024
Removed outdated translations related to #1459
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants