From 1bc95a4eb70f2cdadb0a28d7091848b8c1807de3 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Thu, 24 Jan 2019 17:11:09 +0800 Subject: [PATCH] update --- plugins/qbittorrent/qb.conf | 9 ++++++++- plugins/qbittorrent/workers/qbittorrent_worker.py | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/plugins/qbittorrent/qb.conf b/plugins/qbittorrent/qb.conf index df3315c3b..d2dcb6b51 100755 --- a/plugins/qbittorrent/qb.conf +++ b/plugins/qbittorrent/qb.conf @@ -13,4 +13,11 @@ QB_PWD = adminadmin [file] -FILE_TO=/www/tmp +FILE_TO={$SERVER_PATH}/tmp +FILE_TRANSFER_TO={$SERVER_PATH}/tmp +FILE_OWN=www +FILE_GROUP=www + +[task] +TASK_RATE=4 +TASK_COMPLETED_RATE=10 \ No newline at end of file diff --git a/plugins/qbittorrent/workers/qbittorrent_worker.py b/plugins/qbittorrent/workers/qbittorrent_worker.py index 521d841bf..c1fffb151 100755 --- a/plugins/qbittorrent/workers/qbittorrent_worker.py +++ b/plugins/qbittorrent/workers/qbittorrent_worker.py @@ -48,6 +48,9 @@ QB_PWD = cp.get(section_qb, "QB_PWD") section_file = cp.sections()[2] FILE_TO = cp.get(section_file, "FILE_TO") +FILE_TRANSFER_TO = cp.get(section_file, "FILE_TRANSFER_TO") +FILE_OWN = cp.get(section_file, "FILE_OWN") +FILE_GROUP = cp.get(section_file, "FILE_GROUP") class downloadBT(Thread): @@ -116,6 +119,10 @@ class downloadBT(Thread): m3u8_file + ' -segment_time 5 ' + tofile print cmd data = self.execShell(cmd) + + self.execShell('chown -R ' + FILE_OWN + ':' + + FILE_GROUP + ' ' + m3u8_dir) + print data if data[0] != '': print data