Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2 from olof/fix/write_wanted_skip_empty_list

Skip (un)wanted-files requests if list is empty
  • Loading branch information...
commit 3aad4012ec125279e06de7b8b09ecd36b77af47b 2 parents 3c045f0 + 525ce90
@jhthorsen jhthorsen authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  lib/Transmission/Torrent.pm
View
3  lib/Transmission/Torrent.pm
@@ -632,6 +632,9 @@ sub write_wanted {
}
for my $key (qw/wanted unwanted/) {
+ # Transmission interpret an empty list to mean all files
+ next unless @{$wanted{$key}};
+
$self->client->rpc('torrent-set' =>
ids => [ $self->id ], "files-$key" => $wanted{$key}
) or return;
Please sign in to comment.
Something went wrong with that request. Please try again.