Get a torrent's label

Suggestions and discussion of future versions
Post Reply
aristidesfl
New User
New User
Posts: 8
Joined: Sat Jul 07, 2012 4:46 am

Get a torrent's label

Post 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
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: Get a torrent's label

Post 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.
Post Reply