mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 12:34:19 +00:00
- Made nova2dl.py more robust by downloading the torrent itself if the search plugin does not provide the download_torrent() method
This commit is contained in:
parent
843168bb62
commit
332a4121c8
@ -25,7 +25,7 @@
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#VERSION: 1.00
|
||||
#VERSION: 1.10
|
||||
|
||||
# Author:
|
||||
# Christophe DUMEZ (chris@qbittorrent.org)
|
||||
@ -33,6 +33,7 @@
|
||||
import sys
|
||||
import os
|
||||
import glob
|
||||
from helpers import download_file
|
||||
|
||||
supported_engines = dict()
|
||||
|
||||
@ -56,5 +57,8 @@ if __name__ == '__main__':
|
||||
if engine_url not in supported_engines.keys():
|
||||
raise SystemExit('./nova2dl.py: this engine_url was not recognized')
|
||||
exec "engine = %s()"%supported_engines[engine_url]
|
||||
engine.download_torrent(download_param)
|
||||
if hasattr(engine, 'download_torrent'):
|
||||
engine.download_torrent(download_param)
|
||||
else:
|
||||
print download_file(download_param)
|
||||
sys.exit(0)
|
Loading…
x
Reference in New Issue
Block a user