IDM support added (#207)

master
Prayag Jain 2019-07-12 16:07:06 +05:30 committed by Vishnunarayan K I
parent 393a1f74ad
commit 430f40a945
1 changed files with 7 additions and 0 deletions

View File

@ -179,7 +179,11 @@ def format_command(cmd, episode, file_format, path):
'{aria2}': 'aria2c {stream_url} -x 12 -s 12 -j 12 -k 10M -o '
'{file_format}.mp4 --continue=true --dir={download_dir}'
' --stream-piece-selector=inorder --min-split-size=5M --referer={referer}'
,
'{idm}' : 'idman.exe /n /d {stream_url} /p {download_dir} /f {file_format}.mp4'
}
rep_dict = {
'stream_url': episode.source().stream_url,
'file_format': file_format,
@ -187,6 +191,9 @@ def format_command(cmd, episode, file_format, path):
'referer':episode.source().referer,
}
if cmd == "{idm}":
rep_dict['file_format'] = rep_dict['file_format'].replace('/','\\')
if cmd in cmd_dict:
cmd = cmd_dict[cmd]