Get a torrent's label

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

Get a torrent's label

Postby aristidesfl » Sat Jul 07, 2012 4:50 am

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

Postby johnnyg » Sat Jul 07, 2012 7:23 am

Labels are part of a torrent's status, so you can use get_torrent_status with "label" as a key.

See viewtopic.php?f=9&t=39257&p=164825#p164825 for an example of someone using it.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 5 guests