From b07b9faa9a0748ab62fa253da595b5ce6249f9db Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Thu, 10 Aug 2023 15:41:42 -0500 Subject: [PATCH] fix: Misc --- APKPure_dl.py | 2 +- Cleanup.py | 2 +- Notifications.py | 6 ++++++ ReVancedBuilder.py | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/APKPure_dl.py b/APKPure_dl.py index 439197e..069e557 100644 --- a/APKPure_dl.py +++ b/APKPure_dl.py @@ -32,7 +32,7 @@ def apkpure_dl(apk, appname, version, hard_version, session, present_vers, flag) return try: - if present_vers[apk] == version and flag != 'force' and os.path.isfile(apk): + if present_vers[apk] == version and flag != 'force' and os.path.isfile(apk+'.apk'): print(f"Recommended version {version} of {apk} is already present.") return except KeyError: diff --git a/Cleanup.py b/Cleanup.py index be9f8a1..ee661fe 100644 --- a/Cleanup.py +++ b/Cleanup.py @@ -39,7 +39,7 @@ def move_apps(appstate): # Delete logs older than 7 days with os.scandir('logs') as dir: - now = time.now() + now = time.time() for f in dir: if f.stat().st_ctime < now - 7 * 86400: os.remove(f) diff --git a/Notifications.py b/Notifications.py index dfee15b..8375e32 100644 --- a/Notifications.py +++ b/Notifications.py @@ -18,6 +18,12 @@ def send_notif(appstate, error=False): msg = json.dumps(present_vers, indent=0) msg = re.sub('("|\{|\}|,)', '', msg).strip('\n') + msg = msg.replace('revanced-', 'ReVanced ') + msg = msg.replace('cli', 'CLI') + msg = msg.replace('integrations', 'Integrations') + msg = msg.replace('patches', 'Patches') + msg = msg.replace('VancedMicroG', 'Vanced microG') + for app in build_config: if not build_config[app].getboolean('build'): continue diff --git a/ReVancedBuilder.py b/ReVancedBuilder.py index d39bc20..92456c5 100755 --- a/ReVancedBuilder.py +++ b/ReVancedBuilder.py @@ -17,6 +17,7 @@ import subprocess # TODO: README # TODO: PATCHES_GUIDE.md (maybe delete it?) # TODO: Install using pip +# TODO: Do not download twice for root and nonroot # Update the ReVanced tools, if needed def update_tools(appstate):