RPC question
Posted: Sat Feb 09, 2019 9:30 pm
I've been writing some code in perl (because it's the only language I know), which manipulates some torrents based on the labels from the Labels plugin.
One of the things I want to do is change the "Move on Completion" folder. I've managed to get the folder set right, but I don't seem to be able to flip the switch to turn that on, so it doesn't move on completion:
I've dug around on the net but my Google Fu fails me. What should 'move_on_completed' bit be set to? I've tried several different options: 1, move_on_completed, but none of them seem to work.
One of the things I want to do is change the "Move on Completion" folder. I've managed to get the folder set right, but I don't seem to be able to flip the switch to turn that on, so it doesn't move on completion:
Code: Select all
$data = {
'id' => '1',
'method' => 'core.set_torrent_move_completed_path',
'params' => [$this_hash, $this_folder],
};
# Call the API to set the move completed path
api_request($data);
$data = {
'id' => '2',
'method' => 'core.set_torrent_move_completed',
'params' => [$this_hash, 'move_on_completed'],
};
# Call the API to turn on 'move on completed'
api_request($data);