From e242ceb0e7874493e268e90c2b55abb5779c8f7f Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Fri, 25 Jan 2019 10:34:56 +0800 Subject: [PATCH] Update qbittorrent_worker.py --- plugins/qbittorrent/workers/qbittorrent_worker.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/qbittorrent/workers/qbittorrent_worker.py b/plugins/qbittorrent/workers/qbittorrent_worker.py index 8b794741c..e4048ef57 100755 --- a/plugins/qbittorrent/workers/qbittorrent_worker.py +++ b/plugins/qbittorrent/workers/qbittorrent_worker.py @@ -146,11 +146,13 @@ class downloadBT(Thread): m3u8_dir = self.get_transfer_m3u5_dir(md5file) self.execShell('mkdir -p ' + m3u8_dir) - mp4file = self.get_transfer_mp4_file(md5file) - cmd_mp4 = self.fg_transfer_mp4_cmd(file, mp4file) - print 'cmd_mp4:', cmd_mp4 - data_mp4 = self.execShell(cmd_mp4) - print 'mp4:', data_mp4[1] + if not os.path.exists(mp4file): + mp4file = self.get_transfer_mp4_file(md5file) + cmd_mp4 = self.fg_transfer_mp4_cmd(file, mp4file) + print 'cmd_mp4:', cmd_mp4 + data_mp4 = self.execShell(cmd_mp4) + print 'mp4:', data_mp4[1] + print formatTime(), 'mp4 exists:', mp4file cmd_ts = self.fg_transfer_ts_cmd(mp4file, tsfile) print 'cmd_ts:', cmd_ts