Skip to content

Commit

Permalink
try fix bug...
Browse files Browse the repository at this point in the history
  • Loading branch information
xhlove committed Apr 16, 2022
1 parent 50e7ea8 commit f88dc3b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion XstreamDL_CLI/downloader.py
Expand Up @@ -443,7 +443,7 @@ def cancel_all_task() -> None:
# 没有需要下载的则尝试合并 返回False则说明需要继续下载完整
self.init_progress(stream, count, completed, speed_up_flag)
ts = time.time()
client = ClientSession(connector=get_connector(self.args), timeout=ClientTimeout(total=None, sock_connect=5, sock_read=5)) # type: ClientSession
client = ClientSession(connector=get_connector(self.args), timeout=ClientTimeout(total=None, sock_connect=15, sock_read=15)) # type: ClientSession
for segment in _left:
if segment.max_retry_404 <= 0:
self.xprogress.decrease_total_count()
Expand Down
1 change: 1 addition & 0 deletions XstreamDL_CLI/models/stream.py
Expand Up @@ -154,6 +154,7 @@ def show_segments(self):
def dump_segments(self):
self.calc()
''' 保存分段信息 '''
# 这里的 self.get_name() 好像有种情况下会调用当前类的方法 而不是重写后的方法
self.save_dir = self.save_dir.parent / self.get_name()
if self.save_dir.exists() is False:
self.save_dir.mkdir()
Expand Down
5 changes: 4 additions & 1 deletion XstreamDL_CLI/util/concat.py
Expand Up @@ -19,7 +19,10 @@ def call_mp4decrypt(out_path: Path, args: CmdArgs):
if args.overwrite is False and out_decrypted.exists():
print(t_msg.decrypted_file_exists_skip)
return
_cmd = f'""{args.mp4decrypt}" --show-progress --key {args.key} "{out}" "{out_decrypted.as_posix()}""'
if platform.system() == 'Windows':
_cmd = f'""{args.mp4decrypt}" --show-progress --key {args.key} "{out}" "{out_decrypted.as_posix()}""'
else:
_cmd = f'"{args.mp4decrypt}" --show-progress --key {args.key} "{out}" "{out_decrypted.as_posix()}"'
print(t_msg.start_decrypt)
os.system(_cmd)
if args.enable_auto_delete:
Expand Down

0 comments on commit f88dc3b

Please sign in to comment.