From ede5bab112a8f37c4a8a611503af14fb9cbe6bf2 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Wed, 23 Jan 2019 20:50:04 +0800 Subject: [PATCH] update --- plugins/qbittorrent/install.sh | 2 -- plugins/qbittorrent/workers/qbittorrent_worker.py | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/plugins/qbittorrent/install.sh b/plugins/qbittorrent/install.sh index af5b0524b..727892f3d 100755 --- a/plugins/qbittorrent/install.sh +++ b/plugins/qbittorrent/install.sh @@ -23,8 +23,6 @@ Install_qbittorrent() yum install -y ffmpeg fi - - pip install python-qbittorrent echo '正在安装脚本文件...' > $install_tmp diff --git a/plugins/qbittorrent/workers/qbittorrent_worker.py b/plugins/qbittorrent/workers/qbittorrent_worker.py index 9f81e5cb8..6cef47346 100755 --- a/plugins/qbittorrent/workers/qbittorrent_worker.py +++ b/plugins/qbittorrent/workers/qbittorrent_worker.py @@ -106,13 +106,12 @@ class downloadBT(Thread): def ffmpeg(self, file=''): md5file = self.md5(file) - m3u8_dir = FILE_TO + '/m3u8/' + md5file + m3u8_dir = FILE_TO + '/m3u8/' + md5file[0:6] os.system('mkdir -p ' + m3u8_dir) - m3u8_file = m3u8_dir + '/' + md5file + '.m3u8' + m3u8_file = m3u8_dir + '/' + md5file[0:6] + '.m3u8' - tofile = FILE_TO + '/m3u8/' + md5file + '/%03d.ts' - cmd = 'ffmpeg -i ' + file + \ - ' -c copy -map 0 -f segment -segment_list ' + \ + tofile = FILE_TO + '/m3u8/' + md5file[0:6] + '/%03d.ts' + cmd = 'ffmpeg -i ' + file + ' -c copy -map 0 -f segment -segment_list ' + \ m3u8_file + ' -segment_time 5 ' + tofile print cmd print self.execShell(cmd)