Subject: | add(metainfo) isn't base64 encoded in RPC |
Transmission::Client::add passes @_ to Transmission::Client::rpc; this
makes rpc() miss the base64 encoding that add() did on $args{metainfo},
and the call will fail.
/Olof
Subject: | add_torrent.diff |
diff -u -r Transmission-Client-0.0602.orig/lib/Transmission/Client.pm Transmission-Client-0.0602/lib/Transmission/Client.pm
--- Transmission-Client-0.0602.orig/lib/Transmission/Client.pm 2011-04-29 22:18:36.000000000 +0200
+++ Transmission-Client-0.0602/lib/Transmission/Client.pm 2012-04-28 10:13:50.009292224 +0200
@@ -316,11 +316,11 @@
return;
}
elsif($args{'filename'}) {
- return $self->rpc('torrent-add', @_);
+ return $self->rpc('torrent-add', %args);
}
elsif($args{'metainfo'}) {
$args{'metainfo'} = encode_base64($args{'metainfo'});
- return $self->rpc('torrent-add', @_);
+ return $self->rpc('torrent-add', %args);
}
else {
$self->error("Need either filename or metainfo argument");