Merge pull request #104 from nikhilbadyal/provide-apk

Ability to provide apk manually.
This commit is contained in:
Nikhil Badyal
2022-12-21 15:35:52 +05:30
committed by GitHub
3 changed files with 21 additions and 2 deletions
+1
View File
@@ -83,3 +83,4 @@ class RevancedConfig:
self.alternative_youtube_music_patches = env.list(
"ALTERNATIVE_YOUTUBE_MUSIC_PATCHES", []
)
self.existing_downloaded_apks = env.list("EXISTING_DOWNLOADED_APKS", [])
+5 -1
View File
@@ -272,8 +272,12 @@ class Downloader(object):
:param version: version to download
:param app: App to download
:return: Version of apk
:return: Version of apk.
"""
if app in self.config.existing_downloaded_apks:
logger.debug("Will not download apk from the internet as it already exist.")
# Returning Latest as I don't know, which version user provided.
return "latest"
if app in self.config.upto_down:
return self.upto_down_downloader(app)
elif app in self.config.apk_pure: