-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
feat(docs): obtainium usage information and generator #20574
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
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Obtainium | ||
|
|
||
| Here is a config generator: | ||
|
|
||
| import ObtainiumConfig from '@site/src/components/obtainium.tsx'; | ||
| import React from 'react'; | ||
|
|
||
| <ObtainiumConfig /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| import React, { useState } from 'react'; | ||
| export default function ObtainiumConfig(): JSX.Element { | ||
| let [inputUrl, setInputUrl] = useState(''); | ||
| let [inputApiKey, setInputApiKey] = useState(''); | ||
| let [archVariant, setArchVariant] = useState(''); | ||
| let obtainiumUrl = `https://apps.obtainium.imranr.dev/redirect?r=obtainium://app/%7B%22id%22%3A%22app.alextran.immich%22%2C%22url%22%3A%22${inputUrl}%2Fapi%2Fserver%2Fapk-links%22%2C%22author%22%3A%22Immich%22%2C%22name%22%3A%22Immich%22%2C%22preferredApkIndex%22%3A0%2C%22additionalSettings%22%3A%22%7B%5C%22intermediateLink%5C%22%3A%5B%5D%2C%5C%22customLinkFilterRegex%5C%22%3A%5C%22%5C%22%2C%5C%22filterByLinkText%5C%22%3Afalse%2C%5C%22skipSort%5C%22%3Afalse%2C%5C%22reverseSort%5C%22%3Afalse%2C%5C%22sortByLastLinkSegment%5C%22%3Afalse%2C%5C%22versionExtractWholePage%5C%22%3Afalse%2C%5C%22requestHeader%5C%22%3A%5B%7B%5C%22requestHeader%5C%22%3A%5C%22User-Agent%3A%20Mozilla%2F5.0%20(Linux%3B%20Android%2010%3B%20K)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F114.0.0.0%20Mobile%20Safari%2F537.36%5C%22%7D%2C%7B%5C%22requestHeader%5C%22%3A%5C%22x-api-key%3A%20${inputApiKey}%5C%22%7D%5D%2C%5C%22defaultPseudoVersioningMethod%5C%22%3A%5C%22partialAPKHash%5C%22%2C%5C%22trackOnly%5C%22%3Afalse%2C%5C%22versionExtractionRegEx%5C%22%3A%5C%22%2Fv(%5C%5C%5C%5Cd%2B).(%5C%5C%5C%5Cd%2B).(%5C%5C%5C%5Cd%2B)%2F%5C%22%2C%5C%22matchGroupToUse%5C%22%3A%5C%22%241.%242.%243%5C%22%2C%5C%22versionDetection%5C%22%3Atrue%2C%5C%22useVersionCodeAsOSVersion%5C%22%3Afalse%2C%5C%22apkFilterRegEx%5C%22%3A%5C%22${archVariant}%24%5C%22%2C%5C%22invertAPKFilter%5C%22%3Afalse%2C%5C%22autoApkFilterByArch%5C%22%3Atrue%2C%5C%22appName%5C%22%3A%5C%22%5C%22%2C%5C%22appAuthor%5C%22%3A%5C%22%5C%22%2C%5C%22shizukuPretendToBeGooglePlay%5C%22%3Afalse%2C%5C%22allowInsecure%5C%22%3Afalse%2C%5C%22exemptFromBackgroundUpdates%5C%22%3Afalse%2C%5C%22skipUpdateNotifications%5C%22%3Afalse%2C%5C%22about%5C%22%3A%5C%22%5C%22%2C%5C%22refreshBeforeDownload%5C%22%3Afalse%7D%22%2C%22overrideSource%22%3Anull%7D`; | ||
|
|
||
| return ( | ||
| <div> | ||
| <h3>Enter values into the inputs to get a link.</h3> | ||
| <form> | ||
| <label> | ||
| URL:{' '} | ||
| <input | ||
| value={inputUrl} | ||
| placeholder="https://my.immich.app" | ||
| onChange={(update) => setInputUrl(update.target.value)} | ||
| required | ||
| /> | ||
| </label> | ||
| <br /> | ||
| <label> | ||
| API Key:{' '} | ||
| <input | ||
| value={inputApiKey} | ||
| placeholder="<immich-api-key>" | ||
| onChange={(update) => setInputApiKey(update.target.value)} | ||
| required | ||
| /> | ||
| </label> | ||
| <p> | ||
| Variant:{' '} | ||
| <label> | ||
| <input | ||
| type="radio" | ||
| name="archVariantOption" | ||
| value="app-arm64-v8a-release" | ||
| onChange={(update) => setArchVariant(update.target.value)} | ||
| required | ||
| /> | ||
| arm64-v8a | ||
| </label> | ||
| <label> | ||
| <input | ||
| type="radio" | ||
| name="archVariantOption" | ||
| value="app-armeabi-v7a-release" | ||
| onChange={(update) => setArchVariant(update.target.value)} | ||
| required | ||
| /> | ||
| armeabi-v7a | ||
| </label> | ||
| <label> | ||
| <input | ||
| type="radio" | ||
| name="archVariantOption" | ||
| value="app-release" | ||
| onChange={(update) => setArchVariant(update.target.value)} | ||
| required | ||
| /> | ||
| Universal | ||
| </label> | ||
| <label> | ||
| <input | ||
| type="radio" | ||
| name="archVariantOption" | ||
| value="app-x86_64-release" | ||
| onChange={(update) => setArchVariant(update.target.value)} | ||
| required | ||
| /> | ||
| x86_64 | ||
| </label> | ||
| </p> | ||
| </form> | ||
| <a hidden={!(inputUrl && inputApiKey && archVariant)} href={obtainiumUrl} target="_blank"> | ||
Check warningCode scanning / CodeQL DOM text reinterpreted as HTML Medium documentation DOM text Error loading related location Loading DOM text Error loading related location Loading DOM text Error loading related location Loading DOM text Error loading related location Loading DOM text Error loading related location Loading DOM text Error loading related location Loading |
||
| <img className="h-24" alt="Get it on Obtainium" src="/img/obtainium-badge.png" /> | ||
| </a> | ||
| </div> | ||
| ); | ||
| } | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apkFilterRegExneeds.apkbefore the$.Could probably also use
APKLinkHashfordefaultPseudoVersioningMethod, since the version is in the URL.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could probably add
.apkin case we ever get iOS.ipareleases but currently I'm not including it and I don't have$at the end.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mentioned that because it does insert a
$at the end. The%24after${archVariant}is a$.edit: which makes the regex fail because there's a
.apkat the end of the filenames.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You know, I seem to remember leaving a
$in there and having to remove it. I guess I forgot to update that and push the change. I appreciate the review!Edit: I'll have to see if I can do that and rebase tonight.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait, I updated it in my newer PR, can you review this there?
#20589