Support per-site auto download bigfile size limit
This commit is contained in:
parent
738fd1a09b
commit
b1f16857fc
1 changed files with 2 additions and 1 deletions
|
@ -501,7 +501,8 @@ class WorkerManagerPlugin(object):
|
||||||
if not self.site.storage.isFile(piecemap_inner_path):
|
if not self.site.storage.isFile(piecemap_inner_path):
|
||||||
# Start download piecemap
|
# Start download piecemap
|
||||||
piecemap_task = super(WorkerManagerPlugin, self).addTask(piecemap_inner_path, priority=30)
|
piecemap_task = super(WorkerManagerPlugin, self).addTask(piecemap_inner_path, priority=30)
|
||||||
if "|" not in inner_path and self.site.isDownloadable(inner_path) and file_info["size"] / 1024 / 1024 <= config.autodownload_bigfile_size_limit:
|
autodownload_bigfile_size_limit = self.site.settings.get("autodownload_bigfile_size_limit", config.autodownload_bigfile_size_limit)
|
||||||
|
if "|" not in inner_path and self.site.isDownloadable(inner_path) and file_info["size"] / 1024 / 1024 <= autodownload_bigfile_size_limit:
|
||||||
gevent.spawn_later(0.1, self.site.needFile, inner_path + "|all") # Download all pieces
|
gevent.spawn_later(0.1, self.site.needFile, inner_path + "|all") # Download all pieces
|
||||||
|
|
||||||
if "|" in inner_path:
|
if "|" in inner_path:
|
||||||
|
|
Loading…
Reference in a new issue