mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 11:58:37 +09:00
🎨 Removed patcher from downloader arguments [skip ci]
This commit is contained in:
@@ -14,32 +14,28 @@ from src.downloader.sources import (
|
||||
)
|
||||
from src.downloader.uptodown import UptoDown
|
||||
from src.exceptions import DownloadFailure
|
||||
from src.patches import Patches
|
||||
|
||||
|
||||
class DownloaderFactory(object):
|
||||
"""Downloader Factory."""
|
||||
|
||||
@staticmethod
|
||||
def create_downloader(
|
||||
app: str, patcher: Patches, config: RevancedConfig
|
||||
) -> Downloader:
|
||||
def create_downloader(app: str, config: RevancedConfig) -> Downloader:
|
||||
"""Returns appropriate downloader.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
app : App Name
|
||||
patcher : Patcher
|
||||
config : Config
|
||||
"""
|
||||
if apk_sources[app].startswith(GITHUB_BASE_URL):
|
||||
return Github(patcher, config)
|
||||
return Github(config)
|
||||
if apk_sources[app].startswith(APK_PURE_URL):
|
||||
return ApkPure(patcher, config)
|
||||
return ApkPure(config)
|
||||
elif apk_sources[app].startswith(APK_SOS_URL):
|
||||
return ApkSos(patcher, config)
|
||||
return ApkSos(config)
|
||||
elif apk_sources[app].endswith("en.uptodown.com/android"):
|
||||
return UptoDown(patcher, config)
|
||||
return UptoDown(config)
|
||||
elif apk_sources[app].startswith(APK_MIRROR_BASE_URL):
|
||||
return ApkMirror(patcher, config)
|
||||
return ApkMirror(config)
|
||||
raise DownloadFailure(f"No download factory found for {app}")
|
||||
|
||||
Reference in New Issue
Block a user