Issue #47 resolved

tc.change_torrent()

pyed
created an issue

Hi, thanks for writing this great rpc

but i can't figure out how to use 'change_torrent()'

can you please give an example on add/delete trackers ?

Comments (4)

  1. pyed reporter

    I was trying to change the tracker with some other way but nothing works

    In [15]: my_torrent = tc.get_torrent(1)
    
    In [16]: my_torrent.trackers
    Out[16]: 
    [{u'announce': u'http://xxxxxxx.org/announce.php',
      u'id': 0,
      u'scrape': u'http://xxxxxxx.org/scrape.php',
      u'tier': 0}]
    
    In [17]: my_torrent.trackers = [{u'announce': 'http://someannounceurl.com',
      u'id': 0,
      u'scrape': u'http://someotherurl.org',
      u'tier': 0}]
    
    In [18]: my_torrent.trackers
    Out[18]: 
    [{u'announce': 'http://someannounceurl.com',
      u'id': 0,
      u'scrape': u'http://someotherurl.org',
      u'tier': 0}]
    
  2. pyed reporter

    i think my problem is that i don't understand how to work with any method with **kwargs with it

    import transmissionrpc
    
    tc = transmissionrpc.Client()
    
    tc.add_torrent('http://releases.ubuntu.com/12.10/ubuntu-12.10-desktop-amd64.iso.torrent', {'paused': True})
    

    this code will give me

    TypeError: a float is required
    

    i think i'm missing something here

  3. pyed reporter

    Never mind i figured it out

    import transmissionrpc
    
    tc = transmissionrpc.Client()
    
    tc.add_torrent('http://releases.ubuntu.com/12.10/ubuntu-12.10-desktop-amd64.iso.torrent', paused=True)
    

    that would work

  4. Log in to comment