fix: Misc

This commit is contained in:
Sayantan Santra 2023-08-10 15:41:42 -05:00
parent ae83b9e652
commit b07b9faa9a
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F
4 changed files with 9 additions and 2 deletions

View file

@ -32,7 +32,7 @@ def apkpure_dl(apk, appname, version, hard_version, session, present_vers, flag)
return return
try: 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.") print(f"Recommended version {version} of {apk} is already present.")
return return
except KeyError: except KeyError:

View file

@ -39,7 +39,7 @@ def move_apps(appstate):
# Delete logs older than 7 days # Delete logs older than 7 days
with os.scandir('logs') as dir: with os.scandir('logs') as dir:
now = time.now() now = time.time()
for f in dir: for f in dir:
if f.stat().st_ctime < now - 7 * 86400: if f.stat().st_ctime < now - 7 * 86400:
os.remove(f) os.remove(f)

View file

@ -18,6 +18,12 @@ def send_notif(appstate, error=False):
msg = json.dumps(present_vers, indent=0) msg = json.dumps(present_vers, indent=0)
msg = re.sub('("|\{|\}|,)', '', msg).strip('\n') 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: for app in build_config:
if not build_config[app].getboolean('build'): if not build_config[app].getboolean('build'):
continue continue

View file

@ -17,6 +17,7 @@ import subprocess
# TODO: README # TODO: README
# TODO: PATCHES_GUIDE.md (maybe delete it?) # TODO: PATCHES_GUIDE.md (maybe delete it?)
# TODO: Install using pip # TODO: Install using pip
# TODO: Do not download twice for root and nonroot
# Update the ReVanced tools, if needed # Update the ReVanced tools, if needed
def update_tools(appstate): def update_tools(appstate):