forked from distok/cutthecord
ctcci: Pull version from patchport-state.json
This commit is contained in:
parent
cf6f10a0e1
commit
30c8b07077
2 changed files with 2 additions and 14 deletions
|
@ -38,15 +38,8 @@ os.environ["DISTOK_EXTRACTED_DISCORD_PATH"] = WORK_APK_PATH
|
|||
|
||||
os.makedirs(WORK_FOLDER, exist_ok=True)
|
||||
|
||||
if LOCAL_STATE:
|
||||
# Get the version of the APK from distok state file
|
||||
with open(STATE_FILE) as f:
|
||||
STATE = json.load(f)
|
||||
else:
|
||||
# Get the version of the APK from distok.top
|
||||
STATE = requests.get("https://distok.top/state.json").json()
|
||||
|
||||
VERSION = STATE["android"][PACKAGE_ID]["version"]
|
||||
with open(os.path.join(REPO_FOLDER, "patchport-state.json")) as f:
|
||||
VERSION = f["versioncode"]
|
||||
|
||||
BASE_APK_PATH = os.path.join(WORK_FOLDER, f"discord-base-{VERSION}")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue