mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
✨ Ability to provide apk manually.
This commit is contained in:
@@ -245,7 +245,21 @@ By default, script build the version as recommended by Revanced team.
|
|||||||
fact to define your normal configurations in `.env` file and sometimes if you want to build something different just
|
fact to define your normal configurations in `.env` file and sometimes if you want to build something different just
|
||||||
once. Add it in `GitHub secrets`.<br>
|
once. Add it in `GitHub secrets`.<br>
|
||||||
Or you can ignore what I said above and always use `GitHub secrets`.
|
Or you can ignore what I said above and always use `GitHub secrets`.
|
||||||
13. Sample Envs<br>
|
13. If APKMirror or other apk source is blocked in your region or script somehow is unable to download from apkmirror.
|
||||||
|
You can download apk manually from any source. Place them in `/apks` directory and provide environment variable
|
||||||
|
in `.env` file or in `ENVS` in `GitHub secrets`(Recommended) in the format.
|
||||||
|
```dotenv
|
||||||
|
EXISTING_DOWNLOADED_APKS=<Comma,Seperate,App,Name>
|
||||||
|
```
|
||||||
|
Example:
|
||||||
|
```dotenv
|
||||||
|
EXISTING_DOWNLOADED_APKS=youtube,youtube_music
|
||||||
|
```
|
||||||
|
If you add above. Script will not download the `Youtube` & `youtube music`apk from internet and expects an apk in
|
||||||
|
`/apks` folder.
|
||||||
|
|
||||||
|
Name of the downloaded apk must match with the available app choices found [here.](#note)
|
||||||
|
14. Sample Envs<br>
|
||||||
<img src="https://i.imgur.com/ajSE5nA.png" width="600" style="left">
|
<img src="https://i.imgur.com/ajSE5nA.png" width="600" style="left">
|
||||||
|
|
||||||
Thanks to [@aliharslan0](https://github.com/aliharslan0/pyrevanced) for his work.
|
Thanks to [@aliharslan0](https://github.com/aliharslan0/pyrevanced) for his work.
|
||||||
|
|||||||
@@ -80,3 +80,4 @@ class RevancedConfig:
|
|||||||
self.alternative_youtube_music_patches = env.list(
|
self.alternative_youtube_music_patches = env.list(
|
||||||
"ALTERNATIVE_YOUTUBE_MUSIC_PATCHES", []
|
"ALTERNATIVE_YOUTUBE_MUSIC_PATCHES", []
|
||||||
)
|
)
|
||||||
|
self.existing_downloaded_apks = env.list("EXISTING_DOWNLOADED_APKS", [])
|
||||||
|
|||||||
+5
-1
@@ -263,8 +263,12 @@ class Downloader(object):
|
|||||||
|
|
||||||
:param version: version to download
|
:param version: version to download
|
||||||
:param app: App 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:
|
if app in self.config.upto_down:
|
||||||
return self.upto_down_downloader(app)
|
return self.upto_down_downloader(app)
|
||||||
elif app in self.config.apk_pure:
|
elif app in self.config.apk_pure:
|
||||||
|
|||||||
Reference in New Issue
Block a user