Refactored Aria2c Settings

This commit is contained in:
Jared-02 2021-10-19 21:04:52 +08:00
parent 8c4bef86df
commit cac68bafff
3 changed files with 39 additions and 26 deletions

View File

@ -34,11 +34,11 @@ MUXER = {
"DEFAULT": False, # to use the normal renaming. EX: Stranger Things S01E01 [1080p].mkv "DEFAULT": False, # to use the normal renaming. EX: Stranger Things S01E01 [1080p].mkv
"AUDIO": "hin", # default audio language. "AUDIO": "hin", # default audio language.
"SUB": "None", # default subtitle language. EX: "eng" or "spa" "SUB": "None", # default subtitle language. EX: "eng" or "spa"
"GROUP": "YOURGROUP", # to change the group name!. it's also possible to use this "--gr LOL", on the ripping commands. "GROUP": "TJUPT", # to change the group name!. it's also possible to use this "--gr LOL", on the ripping commands.
"noTitle": False, # this will remove titles from the episodes EX: (The Witcher S01E01). insstead of (The Witcher S01E01 The End's Beginning). "noTitle": True, # this will remove titles from the episodes EX: (The Witcher S01E01). insstead of (The Witcher S01E01 The End's Beginning).
"scheme": "p2p", # add/change any needed scheme naming. it's also possible to use this "--muxscheme repack", on the ripping commands. "scheme": "p2p", # add/change any needed scheme naming. it's also possible to use this "--muxscheme repack", on the ripping commands.
"schemeslist": { "schemeslist": {
"p2p": "{t}.{r}.{s}.WEB-DL.{ac}.{vc}-{gr}", "p2p": "{t}.{r}.{s}.WEB-DL.{vc}.{ac}-{gr}",
"test": "{t}.{r}.{s}.WEB-DL-{gr}", "test": "{t}.{r}.{s}.WEB-DL-{gr}",
}, },
"EXTRAS": [], # extra mkvmerge.exe commands. "EXTRAS": [], # extra mkvmerge.exe commands.
@ -60,6 +60,19 @@ PATHS = {
ARIA2C = { ARIA2C = {
"enable_logging": False, # True "enable_logging": False, # True
"enable_pass_config_to_aria2c": True, #传递aria2c参数
"file_allocation": "none", # 文件预分配方式:机械硬盘 falloc固态硬盘 none
"http_proxy_aria2c": "http://127.0.0.1:7890", # 代理地址,根据需要修改
"https_proxy_aria2c": "http://127.0.0.1:7890",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36",
"connection": "64", # 单服务器最大连接线程数
"split": "64", # 单任务最大连接线程数
"summary_interval": "0", # 下载进度摘要输出间隔时间
"continue_aria2c": "true", # 断点续传
"max_tries": "0", # 最大尝试次数0 表示无限
"piece_length": "1M", # HTTP/FTP下载分片大小
"min_split_size": "4M", # 文件最小分段大小,理论上值越小下载速度越快
"disk_cache": "64M", # 磁盘缓存,提升读写性能,有足够内存情况下增加
} }
SETTINGS = { SETTINGS = {
@ -67,7 +80,7 @@ SETTINGS = {
} }
#####################################(VPN)##################################### #####################################(VPN)#####################################
# 不要修改这部分
VPN = { VPN = {
"proxies": None, # "http://151.253.165.70:8080", "proxies": None, # "http://151.253.165.70:8080",
"nordvpn": { "nordvpn": {
@ -78,7 +91,7 @@ VPN = {
}, },
"private": { "private": {
"port": "8080", "port": "8080",
"email": "abdalhmohmd8@gmail.com", "email": "xxx",
"passwd": "123456", "passwd": "123456",
"http": "http://{email}:{passwd}@{ip}:{port}", "http": "http://{email}:{passwd}@{ip}:{port}",
}, },
@ -105,8 +118,8 @@ Config["NETFLIX"] = {
"cookies_txt": f"{dirPath}/configs/Cookies/cookies.txt", "cookies_txt": f"{dirPath}/configs/Cookies/cookies.txt",
"keys_file": f"{dirPath}/configs/KEYS/netflix.keys", "keys_file": f"{dirPath}/configs/KEYS/netflix.keys",
"token_file": f"{dirPath}/configs/Tokens/netflix_token.json", "token_file": f"{dirPath}/configs/Tokens/netflix_token.json",
"email": "Cfklop@max07.club", "email": "xxxxxx@gmail.com",
"password": "1111", "password": "123123",
"manifest_language": "en-US", "manifest_language": "en-US",
"metada_language": "en", "metada_language": "en",
"manifestEsn": "NFCDIE-03-{}".format(utils().random_hex(30)), "manifestEsn": "NFCDIE-03-{}".format(utils().random_hex(30)),

View File

@ -169,43 +169,45 @@ class aria2:
enable_color=True, enable_color=True,
concurrent_downloads=5, concurrent_downloads=5,
header="skip", header="skip",
user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36", user_agent="",
uri_selector="inorder", uri_selector="inorder",
console_log_level="skip", console_log_level="skip",
download_result="hide", download_result="hide",
quiet="false", quiet="false",
extra_commands=[], extra_commands=[],
# 单服务器最大连接线程数 # Jared_mod settings
connection=64, connection=64,
# 单任务最大连接线程数
split=64, split=64,
# 代理地址,根据需要修改 http_proxy_aria2c="",
http_proxy_aria2c="http://127.0.0.1:7890", https_proxy_aria2c="",
https_proxy_aria2c="http://127.0.0.1:7890",
# 保存会话进度,用于断点续传
save_session_interval=1, save_session_interval=1,
auto_save_interval=30, auto_save_interval=30,
force_save="false", force_save="false",
# 文件最小分段大小
min_split_size="4M", min_split_size="4M",
# 磁盘缓存
max_tries="0", max_tries="0",
# HTTP/FTP下载分片大小
piece_length="1M", piece_length="1M",
# 下载进度摘要输出间隔时间
summary_interval=0, summary_interval=0,
# 断点续传
continue_aria2c="true", continue_aria2c="true",
# 文件预分配方式 可选none, prealloc, trunc, falloc
# 机械硬盘falloc
# 固态硬盘none
# prealloc 分配速度慢, trunc 无实际作用,不推荐使用。
file_allocation="none", file_allocation="none",
# 磁盘缓存
disk_cache="64M", disk_cache="64M",
): ):
if self.config["enable_pass_config_to_aria2c"]:
file_allocation = self.config["file_allocation"]
http_proxy_aria2c = self.config["http_proxy_aria2c"]
https_proxy_aria2c = self.config["https_proxy_aria2c"]
user_agent = self.config["user_agent"]
connection = self.config["connection"]
split = self.config["split"]
summary_interval = self.config["summary_interval"]
continue_aria2c = self.config["continue_aria2c"]
max_tries = self.config["max_tries"]
piece_length = self.config["piece_length"]
min_split_size = self.config["min_split_size"]
disk_cache = self.config["disk_cache"]
else: pass
options = [] + extra_commands options = [] + extra_commands
allow_overwrite = self.convert_args(allow_overwrite) allow_overwrite = self.convert_args(allow_overwrite)
quiet = self.convert_args(quiet) quiet = self.convert_args(quiet)

View File

@ -322,8 +322,6 @@ class netflix:
auto_file_renaming=False, auto_file_renaming=False,
async_dns="skip", async_dns="skip",
retry_wait=5, retry_wait=5,
summary_interval=0,
concurrent_downloads=5,
uri_selector="inorder", uri_selector="inorder",
console_log_level="warn", console_log_level="warn",
download_result="hide", download_result="hide",