Update qbittorrent_worker.py

pull/5/head
Mr Chen 6 years ago
parent ffd1258d26
commit 0094d4e573
  1. 8
      plugins/qbittorrent/workers/qbittorrent_worker.py

@ -105,7 +105,6 @@ class downloadBT(Thread):
return False return False
def ffmpeg(self, file=''): def ffmpeg(self, file=''):
#vfile = '/Users/midoks/Desktop/www/btplayer/public/video/test.mp4'
md5file = self.md5(file) md5file = self.md5(file)
m3u8_dir = FILE_TO + '/m3u8/' + md5file m3u8_dir = FILE_TO + '/m3u8/' + md5file
os.system('mkdir -p ' + m3u8_dir) os.system('mkdir -p ' + m3u8_dir)
@ -116,10 +115,11 @@ class downloadBT(Thread):
' -c copy -map 0 -f segment -segment_list ' + \ ' -c copy -map 0 -f segment -segment_list ' + \
m3u8_file + ' -segment_time 5 ' + tofile m3u8_file + ' -segment_time 5 ' + tofile
print cmd print cmd
self.execShell(cmd) print self.execShell(cmd)
def video_do(self, dir): def video_do(self, dir):
# self.ffmpeg('/Users/midoks/Desktop/www/btplayer/public/video/test.mp4')
return '' return ''
def checkTask(self): def checkTask(self):
@ -137,9 +137,7 @@ class downloadBT(Thread):
for torrent in torrents: for torrent in torrents:
path = torrent['save_path'] + torrent['name'] path = torrent['save_path'] + torrent['name']
self.video_do(path) self.video_do(path)
print path, torrent print torrent
# self.ffmpeg(
# '/Users/midoks/Desktop/www/btplayer/public/video/test.mp4')
print time.time(), "done task!" print time.time(), "done task!"
else: else:
print time.time(), "no task!" print time.time(), "no task!"

Loading…
Cancel
Save