Autostart torrent fix
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michel Roux 2021-07-11 16:58:56 +02:00
parent a7c39054b1
commit 54042c6cd9

View File

@ -248,8 +248,9 @@ def admin_edit(link_id=None):
if title.folder.path is not None and title.folder.path != '': if title.folder.path is not None and title.folder.path != '':
download_url = link.link.replace('/view/', '/download/') + '.torrent' download_url = link.link.replace('/view/', '/download/') + '.torrent'
torrent_path = '%s/%s' % (title.folder.path, title.name) torrent_path = '%s/%s' % (title.folder.path, title.name)
torrent = transmission.add_torrent(download_url, download_dir=torrent_path, paused=False) torrent = transmission.add_torrent(download_url, download_dir=torrent_path)
transmission.move_torrent_data(torrent.id, torrent_path) transmission.move_torrent_data(torrent.id, torrent_path)
transmission.start_torrent(torrent.id)
return redirect(url_for('admin')) return redirect(url_for('admin'))