Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deluged move_torrent() when seed location is specified in the configuration #7586

Merged
merged 1 commit into from
Jan 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion medusa/clients/torrent/deluged.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ def move_torrent(self, info_hash):
"""
if not app.TORRENT_SEED_LOCATION or not info_hash:
return

if not self.connect():
log.warning('Error while moving torrent. Could not connect to daemon.')
return

return self.drpc.move_storage(info_hash, app.TORRENT_SEED_LOCATION)

def _set_torrent_label(self, result):
Expand Down Expand Up @@ -237,7 +242,7 @@ def move_storage(self, torrent_id, location):
"""
try:
self.connect()
self.client.core.move_storage(torrent_id, location)
self.client.core.move_storage([torrent_id], location)
except Exception:
return False
else:
Expand Down