Page 2 of 27 FirstFirst 123412 ... LastLast
Results 11 to 20 of 268

Thread: Conky Deluge Python Script

  1. #11
    Join Date
    Aug 2006
    Beans
    11

    Re: Conky Deluge Python Script

    Hi, i'm a deluge developer.
    Great work.

    I noticed you copied and pasted lots of the ui.client source.
    Instead of that you could use:
    Code:
    from deluge.ui.client import sclient
    It is documented here : http://dev.deluge-torrent.org/wiki/D...Client#sclient

    For eta formatting you could also use deluge.common:
    There are other goodies in deluge.common for formatting speed and size.
    Code:
    from deluge.common import ftime, fsize, fspeed
    Last edited by mvoncken; October 17th, 2008 at 05:25 PM.

  2. #12
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Deluge Python Script

    Quote Originally Posted by markp1989 View Post
    i have been looking on torrentflux forums, and they have a few scripts using curl to login and upload new torrents.

    Code:
    !/bin/bash
    # TorrentFluxHandler - *nix edition
    # Coded by IhatemyISP @ http://www.torrentflux.com/forums/
    host=10.0.0.99/torrentflux
    user=mark
    pass=payj86
    torrent=$1
    curl -c tf_cookie -d username=$user -d iamhim=$pass $host/login.php >> /dev/null
    curl -H "Expect:" -b tf_cookie -F "upload_file=@$torrent" $host/index.php >> /dev/null
    im not sure on how curl works, is it possible to use curl to pull down stats?
    PM'ed you a suggestion so we don't clutter the deluge thread...

  3. #13
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Deluge Python Script

    Quote Originally Posted by mvoncken View Post
    Hi, i'm a deluge developer.
    Great work.

    I noticed you copied and pasted lots of the ui.client source.
    Instead of that you could use:
    Code:
    from deluge.ui.client import sclient
    It is documented here : http://dev.deluge-torrent.org/wiki/D...Client#sclient

    For eta formatting you could also use deluge.common:
    There are other goodies in deluge.common for formatting speed and size.
    Code:
    from deluge.common import ftime, fsize, fspeed
    Thanks for the heads up, I'll make the changes over the weekend hopefully

    Yes, I did source all but the DelugeInfo class from the ui.client code, it's nice when I have python code available to work with

    I assume there is no risk of this stuff changing to the point of not working for me in the future (atleast whilst Deluge is at version 1.*)?

    Edit: that was easy, made the switch to use the sclient, fsize, ftime, fpcnt imported functions...working locally, update coming I'll take a look at what else I can make use of later on
    Last edited by kaivalagi; October 17th, 2008 at 06:37 PM.

  4. #14
    Join Date
    Aug 2006
    Beans
    11

    Re: Conky Deluge Python Script

    Quote Originally Posted by kaivalagi View Post
    I assume there is no risk of this stuff changing to the point of not working for me in the future (atleast whilst Deluge is at version 1.*)?
    Some small planned changes in 1.1 (but that's probably 1.2)
    http://dev.deluge-torrent.org/wiki/D...Deluge1.0to1.1

  5. #15
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Deluge Python Script

    Quote Originally Posted by mvoncken View Post
    Some small planned changes in 1.1 (but that's probably 1.2)
    http://dev.deluge-torrent.org/wiki/D...Deluge1.0to1.1
    Okay thanks, had a look and it's very likely that nothing will affect the script and if it does it won't be much of a problem

  6. #16
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Deluge Python Script

    UPDATE

    I've updated the script to import and use deluge sclient and common formatting functions. I also disabled deluge logging functions so the console doesn't get flooded with info when conky is started from it.

    The first post is updated and the apt package is available

    Chimo

  7. #17
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Deluge Python Script

    UPDATE AGAIN

    Small problem with the progress output, so fixed it along with other possible issues too, changes below:

    • Updated to use "progress", "eta", "download_payload_rate", "upload_payload_rate" dictionary data to avoid invalid calculations
    • --version now only returns version and doesn't try to display normal output too


    The first post has been updated and the apt package is available....now at v1.04

    Chimo

  8. #18
    Join Date
    Dec 2007
    Beans
    22

    Re: Conky Deluge Python Script

    Hi,
    Great plugin, is there a way to show only de downloading torrents?
    I have 100+ and it kills my conky
    thanks for any info.

  9. #19
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Deluge Python Script

    Quote Originally Posted by wladyx View Post
    Hi,
    Great plugin, is there a way to show only de downloading torrents?
    I have 100+ and it kills my conky
    thanks for any info.
    Good suggestion, once I have sorted out intrepid I'll add an option for that

  10. #20
    Join Date
    Feb 2008
    Location
    52°38'41.6"N/1°19'43.6"E
    Beans
    Hidden!

    Re: Conky Deluge Python Script

    UPDATE

    I've updated the script with the following changes:

    • Updated error handling for when no torrent status data available, issues usually happen when half way through torrents output and a torrent is no longer there
    • Added --errorlogfile and infologfile options, when set with a filepath, errors and info are appended to the filepath given
    • Added --downloadsonly option to limit output to only currently active torrents in a downloading state


    I neglected to update the README in the package, the new help options are listed below:

    Code:
      -e FILE, --errorlogfile=FILE
                            If a filepath is set, the script appends errors to the
                            filepath.
      -i FILE, --infologfile=FILE
                            If a filepath is set, the script appends info to the
                            filepath.
      -d, --downloadsonly   If set only torrents in a downloading state will be
                            displayed.
    The changes are available in the first post and via apt.

    Chimo

Page 2 of 27 FirstFirst 123412 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •