fixed KeyError: 'piece_size' when try to download non-optional file using '|all'
This commit is contained in:
parent
912c958ac0
commit
baa5df1d01
1 changed files with 5 additions and 0 deletions
|
@ -753,6 +753,11 @@ class SitePlugin(object):
|
||||||
|
|
||||||
inner_path = inner_path.replace("|all", "")
|
inner_path = inner_path.replace("|all", "")
|
||||||
file_info = self.needFileInfo(inner_path)
|
file_info = self.needFileInfo(inner_path)
|
||||||
|
|
||||||
|
# Use default function to download non-optional file
|
||||||
|
if "piece_size" not in file_info:
|
||||||
|
return super(SitePlugin, self).needFile(inner_path, *args, **kwargs)
|
||||||
|
|
||||||
file_size = file_info["size"]
|
file_size = file_info["size"]
|
||||||
piece_size = file_info["piece_size"]
|
piece_size = file_info["piece_size"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue