Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
删除了命令行选项 -f, --try-fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
nukemiko committed Jul 13, 2022
1 parent 53b4e81 commit 8349e67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
9 changes: 0 additions & 9 deletions src/takiyasha/argdefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,6 @@ def __call__(self, parser, namespace, values, option_string=None):
action='store_true',
help='不显示任何信息,仅根据退出状态码表示运行结果'
)

decrypt_options = ap.add_argument_group(title='解密相关选项')
decrypt_options.add_argument('-f', '--try-fallback',
dest='try_fallback',
action='store_true',
help='针对部分支持的加密类型,在首次解密失败时,\n'
'使用后备方案再次尝试,但不保证成功率'
)

tag_options = ap.add_argument_group(title='标签信息和封面相关选项')
tag_options.add_argument('--notag',
dest='with_tag',
Expand Down
19 changes: 6 additions & 13 deletions src/takiyasha/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,13 @@ def entry(argv: list[str] | None = None) -> int:
destdirpath_is_srcfiledirpath: bool = openfile_kwargs.pop('destdirpath_is_srcfiledirpath')
recursive: bool = openfile_kwargs.pop('recursive')
enable_multiprocessing: bool = openfile_kwargs.pop('enable_multiprocessing')
try_fallback: bool = openfile_kwargs.pop('try_fallback')
probe_only: bool = openfile_kwargs.pop('probe_only')
keep_quiet: bool = openfile_kwargs.pop('keep_quiet')
with_tag: bool = openfile_kwargs.pop('with_tag')
search_tag: bool = openfile_kwargs.pop('search_tag')

utils.DISABLE_PRINT_FUNCS = keep_quiet

if try_fallback:
openfile_kwargs.update({
'try_fallback': True
}
)

try:
if destdirpath_is_srcfiledirpath:
pending_paths: list[tuple[Path, Path]] = list(
Expand Down Expand Up @@ -75,9 +68,9 @@ def entry(argv: list[str] | None = None) -> int:
mainflow_kwargs = {
'srcfilepath': srcfilepath_,
'destdirpath': destdirpath_,
'probe_only': probe_only,
'with_tag': with_tag,
'search_tag': search_tag,
'probe_only' : probe_only,
'with_tag' : with_tag,
'search_tag' : search_tag,
'status_pool': status_pool
}
mainflow_kwargs.update(openfile_kwargs)
Expand Down Expand Up @@ -111,9 +104,9 @@ def entry(argv: list[str] | None = None) -> int:
mainflow_kwargs = {
'srcfilepath': srcfilepath_,
'destdirpath': destdirpath_,
'probe_only': probe_only,
'with_tag': with_tag,
'search_tag': search_tag,
'probe_only' : probe_only,
'with_tag' : with_tag,
'search_tag' : search_tag,
'status_pool': status_pool
}
mainflow_kwargs.update(openfile_kwargs)
Expand Down

0 comments on commit 8349e67

Please sign in to comment.