I want to set the label to a variable, so I can hack it into a script. I am unsure how to set the current label a torrent has to a variable. I know php, I am just unfamiliar how the plugin grabs data since it has no DB.
It use rtorrent as DB. You can associate pair key=>value with any torrent. Something likehow the plugin grabs data since it has no DB.
Perhaps I am not as sharp as I thought. I am not quite clear on what you said. So I can grab any value from rtorrent using pair key=>value.It use rtorrent as DB. You can associate pair key=>value with any torrent. Something like
d.set_custom=key,value for set and
$d.get_custom=key for get.
BTW, torrents label already exist in these variables:
$label = rawurlencode($label);
d.set_custom1=$label
for set (this pseudocode use deprecated method d.set_customN=value instead d.set_custom=key,value)
and,
$label = rawurldecode($d.get_custom1=)
for get.
rawurl* functions is used for prevent troubles with a non-UTF labels (in theory, user can set any values from rtorrent console, but we can't send non-UTF characters via XMLRPC API)