Add Anilife proxy settings (proxy_url, get_proxy, get_proxies)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
title: "애니 다운로더"
|
||||
version: "0.6.1"
|
||||
version: "0.6.2"
|
||||
package_name: "anime_downloader"
|
||||
developer: "projectdx"
|
||||
description: "anime downloader"
|
||||
|
||||
@@ -81,6 +81,7 @@ class LogicAniLife(AnimeModuleBase):
|
||||
db_default = {
|
||||
"anilife_db_version": "1",
|
||||
"anilife_url": "https://anilife.live",
|
||||
"anilife_proxy_url": "",
|
||||
"anilife_download_path": os.path.join(path_data, P.package_name, "ohli24"),
|
||||
"anilife_auto_make_folder": "True",
|
||||
"anilife_auto_make_season_folder": "True",
|
||||
@@ -100,6 +101,17 @@ class LogicAniLife(AnimeModuleBase):
|
||||
"anilife_camoufox_installed": "False",
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def get_proxy(cls) -> str:
|
||||
return P.ModelSetting.get("anilife_proxy_url")
|
||||
|
||||
@classmethod
|
||||
def get_proxies(cls) -> Optional[Dict[str, str]]:
|
||||
proxy = cls.get_proxy()
|
||||
if proxy:
|
||||
return {"http": proxy, "https": proxy}
|
||||
return None
|
||||
|
||||
current_headers = None
|
||||
current_data = None
|
||||
referer = None
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<form id="setting" class="mt-4">
|
||||
<div class="tab-content" id="nav-tabContent">
|
||||
{{ macros.m_tab_content_start('normal', true) }}
|
||||
{{ macros.setting_input_text_and_buttons('anilife_url', '애니라이프 URL', [['go_btn', 'GO']], value=arg['anilife_url']) }}
|
||||
{{ macros.setting_input_text_and_buttons('anilife_url', '애니라이프 URL', [['go_btn', 'GO']], value=arg['anilife_url']) }}\n {{ macros.setting_input_text('anilife_proxy_url', '프록시 URL', col='4', value=arg.get('anilife_proxy_url', ''), desc='차단 시 프록시 서버를 입력하세요. 예: http://IP:PORT') }}
|
||||
|
||||
<!-- 저장 폴더 (탐색 버튼 포함) -->
|
||||
<div class="row" style="padding-top: 10px; padding-bottom:10px; align-items: center;">
|
||||
|
||||
Reference in New Issue
Block a user