Skip to content

Commit

Permalink
Skip (un)wanted-files requests if list is empty
Browse files Browse the repository at this point in the history
Transmission treats an empty list as a list of all files.
  • Loading branch information
olof committed Aug 13, 2012
1 parent 3c045f0 commit 525ce90
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Transmission/Torrent.pm
Expand Up @@ -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;
Expand Down

0 comments on commit 525ce90

Please sign in to comment.