Page 1 of 1

Get a torrent's label

Posted: Sat Jul 07, 2012 4:50 am
by aristidesfl
Is there a way to do this in the last version?


Exposing this method in the label plugin would do the trick..

Code: Select all

    def _status_get_label(self, torrent_id):
        return self.torrent_labels.get(torrent_id) or ""

Cheers

Re: Get a torrent's label

Posted: Sat Jul 07, 2012 7:23 am
by johnnyg
Labels are part of a torrent's status, so you can use get_torrent_status with "label" as a key.

See http://forum.deluge-torrent.org/viewtop ... 25#p164825 for an example of someone using it.