PDA

View Full Version : [RELEASE] uTorrent XBMC PauseResume Script!


f3ar007
2009-05-24, 16:23
News:
May 24th, 2009 - version 1.1.3 released. Use v1.1.3 or higher!

About:
This script interacts with the uTorrent WebUI (http://www.utorrent.com/documentation/webui) Interface! It asks for user information; user, pass, ip, and port number. It checks the data and continues, or asks again depending on correct or incorrect information. Then the script allows the user to pause and resume all active torrents in uTorrent.

Uses:
Primarily, the script is used to pause torrents before watching streaming video. This allows the streaming video to obtain maximum bandwidth.

Other:
This will be the official thread from now on! Please refer back for updates, information, news, etc!
http://img196.imageshack.us/img196/6043/screenshot001blf.th.jpg (http://img196.imageshack.us/my.php?image=screenshot001blf.jpg)
The script needs a skin! Post your ideas, or PM me.

Downloads:
http://f3ar007.bravehost.com/xbmc/
or
http://code.google.com/p/f3ar007 with SVN!

Install:
1.) Enable WebUI (http://www.utorrent.com/documentation/webui)
2.) Install Script (http://xbmc.org/wiki/?title=HOW-TO_install_and_use_scripts_in_XBMC)
3.) First run asks for and checks user information; user, pass, ip, port!
4.) Pause or Resume with on-screen buttons!
5.) Change Settings with on-screen button.

Notes:
Windows Vista - Run as Administrator! The script writes to its own directory. If XBMC privileges are not elevated to Administrator level, there will be a FileErrror.

XBOX - Advanced Tip! Not Necessary! Installing mechanize (http://wwwsearch.sourceforge.net/mechanize/) and ClientForm (http://wwwsearch.sourceforge.net/ClientForm/) in system/python/Lib directory nullifies the need to have the packages in the same folder as the script! Try installing them there!
The 15th line, in the mechanize package, of _msiecookiejar.py must be edited, change 'nt' to 'nt2' or anything else to avoid an unnecessary import. To avoid this, simply move the folder mechanize and the file ClientForm from the default script install path to system/python/Lib.

rudeboyx
2009-05-24, 16:36
wicked, nice to see a torrent script returning for XBMC Babylon.
thanks for this. i shall download and test now.

i look forward to any updates

greatant1337
2009-05-24, 17:24
This is heaps useful, cheers!

rudeboyx
2009-05-24, 18:00
whenerver i launch the script it just fails Error Q:\scripts\uTorrent\default.py

XBMC Xbox version 20585

am i missing something? do i have to put user / password in to the py file? or is it supposed to ask for details upon launch?

f3ar007
2009-05-24, 23:41
whenerver i launch the script it just fails Error Q:\scripts\uTorrent\default.py

XBMC Xbox version 20585

am i missing something? do i have to put user / password in to the py file? or is it supposed to ask for details upon launch?

Try the newest release, which is version 1.1.2. In the previous version I forgot to include the mechanize package! Let me know how it goes!

Also, please post a log if the upgrade doesn't work!

rudeboyx
2009-05-25, 01:42
that is with the latest version

where is the script log is it just the main xbmc log?

f3ar007
2009-05-25, 01:44
that is with the latest version

where is the script log is it just the main xbmc log?

Yes, turn on xbmc debugging and then post the log at a site like http://www.pastebin.com/

**The debug log is in the main directory and is named 'xbmc.log'

**Preliminary steps
1.) Turn on uTorrent WebUI
2.) Set user, pass, and port number
3.) Install Script (this can be done at any time!)
4.) Run script

**Steps to run the script
1.) script prompts for user input; user, pass, ip, port
2.) new window is drawn, buttons; pause, resume, change settings
3.) that's it!

rudeboyx
2009-05-25, 01:59
debug log here

http://pastebin.com/m10e28d05

error on line 313

f3ar007
2009-05-25, 02:04
debug log here

http://pastebin.com/m10e28d05

error on line 313

Okay, I am working on the fix right now. I was unaware mechanize called ClientForm. So I am adding it to the directory right now. The update will be ready in about 5 minutes!

Version 1.1.3 has been uploaded to both Google Code and BraveHost.

rudeboyx
2009-05-25, 02:39
alright that works.
cheers for the speedy update.

what are your plans for this script?

i for one would love to see individual torrent control and maybe something alittle more appealing to the eyes.

but a usefull little tool as it is.

cheers

f3ar007
2009-05-25, 02:50
what are your plans for this script?

i for one would love to see individual torrent control and maybe something alittle more appealing to the eyes.


Individual torrent control is a great idea, watch out for future versions! If you have any ideas for the script, I have included a screen shot, perhaps users could edit and submit their ideas! A talented skin creator could probably create a background in little to no time at all!

greatant1337
2009-05-25, 04:35
I just tried this out. I've got some suggestions.

- There's no way to exit the user->pass->ip->port questions if you want to. You have to complete them and get them correct otherwise you have to restart XBMC.

- Rather than a seperate window opening with the Pause/Resume/Settings why not just open a dialog with those options. Then your script automatically matches the current skin.

f3ar007
2009-05-25, 04:42
I just tried this out. I've got some suggestions.

- There's no way to exit the user->pass->ip->port questions if you want to. You have to complete them and get them correct otherwise you have to restart XBMC.

- Rather than a seperate window opening with the Pause/Resume/Settings why not just open a dialog with those options. Then your script automatically matches the current skin.

Thanks for the input! The second suggestion is great, it is probably faster as well. As for the first, the user can't exit in the middle of the prompts, but I could add a dialog that asks if the user wants to try again.

kricker
2009-05-25, 07:19
I just noticed the release thread for this. I posted in the test thread. I wanted to let you know 1.1.3 is working fine here on Win32. I think the idea of just opening a dialog to match the current skin for now is a good idea until more features are added and some skins created.

f3ar007
2009-05-25, 07:28
Here is a list of available features (http://forum.utorrent.com/viewtopic.php?id=25661#p318056), within the WebUI API. There is a small number of actions and job properties. The only useful ones I see are start, stop, pause, resume; and, these work the same way, almost! However, I think individual torrents is a great idea, and the ability to pause or resume certain torrents will be included in upcoming releases.

If you see anything else in that post, or have any other ideas, let me know!

kricker
2009-05-25, 07:35
I would also like to see, "remove torrent" and "remove torrent and delete data".

f3ar007
2009-05-25, 09:06
I would also like to see, "remove torrent" and "remove torrent and delete data".

I see how those could be useful. I will put together a beta tomorrow and see what result we get. The input is enough to change the script completely!

Continue to post, if you have anymore ideas!

greatant1337
2009-05-25, 15:58
If you eventually wanted to take it a step further you could add the add-url or add-file API and integration with the SceneReleases plugin may be possible (I think plugins/scripts can communicate?).

Either way, when it comes down to implementing a skin I don't mind helping out.

rudeboyx
2009-05-25, 17:18
dont know if its possible after looking at the web api commands, but there was torrent script back in the day of xbmc1.0 for utorrent/azures, which displayed most details of individual torrents like %complete and download rates/peers etc. would be great if you could get these in to the script.

greatant1337
2009-05-25, 17:42
dont know if its possible after looking at the web api commands, but there was torrent script back in the day of xbmc1.0 for utorrent/azures, which displayed most details of individual torrents like %complete and download rates/peers etc. would be great if you could get these in to the script.

I'm having a problem with my WebUI at the moment so I can't check it out but maybe it's just a matter of scraping the info?

f3ar007
2009-05-25, 20:21
If you eventually wanted to take it a step further you could add the add-url or add-file API and integration with the SceneReleases plugin may be possible (I think plugins/scripts can communicate?).

Either way, when it comes down to implementing a skin I don't mind helping out.

Any help implementing a skin would be great. If you need to, PM me, or post back here. :cool:

greatant1337
2009-05-26, 15:26
Just PM me when you need something done.

queeup
2009-05-26, 15:43
Thx for this. But this is just for Windows and Mac user. What about Linux?

If you are work on Transmission we are all have Torrent on XBMC.
http://www.xbmc.org/forum/showthread.php?t=51283

What do you think about it?

rwparris2
2009-05-26, 16:59
Thx for this. But this is just for Windows and Mac user. What about Linux?

If you are work on Transmission we are all have Torrent on XBMC.
http://www.xbmc.org/forum/showthread.php?t=51283

What do you think about it?
uTorrent works very well under WINE, and is much better than transmission IMO.

queeup
2009-05-26, 17:52
Yes ofcouse uTorrent better than Transmission but I dont have gnome or kde etc. in my linux box. Until someone add Torrent support like boxee did, i'm stick with transmission-daemon,flexget and my personal Torrent plugin.

chunk_1970
2009-06-04, 14:11
F3AR007:

Ok I have rewritten my Azureus controller based on my original Torrent-X script. If you download my old Torrent-X(which has a module to control uTorrent) script and the new Azureus script plugin you should be able to easily create a fully featured uTorrent controller as a Plugin.

Enjoy..

f3ar007
2009-06-04, 21:57
F3AR007:

Ok I have rewritten my Azureus controller based on my original Torrent-X script. If you download my old Torrent-X(which has a module to control uTorrent) script and the new Azureus script plugin you should be able to easily create a fully featured uTorrent controller as a Plugin.

Enjoy..

Thanks for the info! I will checkout the source code! Basically, my uTorrent Plugin is now working and ready for testing release. I notice you update the directory differently. I use xbmc.executebuiltin('Container.Update') or ('Container.Refresh') and you use updateListing=True/False. I will try the updateListing method, as this feature has been causing problems for the plugin. :cool:

chunk_1970
2009-06-04, 22:12
Yeah, most of the time re-coding Azureus as a plugin was understanding the way plugins work and when (as we are) trying to use it in a slightly non-standard way. Azureus is very awkward to code for in the way that commands are sent and received. If I remember correctly uTorrent actually returns pyton type variables. I think the uTorrent module was so enjoyable to write, Im just not a fan of uTorrent.

chunk_1970
2009-06-04, 22:17
What would be nice is if we collaborate on locations for downloading torrent files as I will be creating plugins for a number of sites where the files will be downloaded into a central dumping ground.

This would be nice so that ourselves and others can develop additional plugins for other sites where both of our plugins would be able to use the files.

f3ar007
2009-06-05, 04:15
What would be nice is if we collaborate on locations for downloading torrent files as I will be creating plugins for a number of sites where the files will be downloaded into a central dumping ground.

This would be nice so that ourselves and others can develop additional plugins for other sites where both of our plugins would be able to use the files.

Let me know when you want to collaborate. :cool: PM me, post here, or in #xbmc-scripting on freenode.net f3ar007

kiboy6
2009-09-15, 10:31
Thanks for the great utorrent script.

In order to maximise resources, I would love to have utorrent close altogether each time XBMC starts (and ideally then restart if xbmc is closed).

Would such a script be possible do you think?

Thanks so much!

kiboy6
2009-10-19, 05:16
So....still wondering...Is there any way this script could be tweaked to pause all torrents on XBMC startup and resume them upon exit?

Would be amazing...thanks!

f3ar007
2009-10-19, 07:24
So....still wondering...Is there any way this script could be tweaked to pause all torrents on XBMC startup and resume them upon exit?

Would be amazing...thanks!

Yes I could write one to pause everything at start up. However, I am hardly using uTorrent anymore, so it may take a while. I will update though, stay tuned.

kiboy6
2009-10-19, 08:51
Sounds awesome! Thanks so much... would there be anyway to resume them all upon exiting xbmc? Or is that impossible to code?

Thanks again!

f3ar007
2009-10-19, 11:42
i think it will only work upon start up.
i could write a script to resume, then shutdown, you would have to use that instead of the red power icons in xbmc...

kiboy6
2009-10-19, 11:45
i think it will only work upon start up.
i could write a script to resume, then shutdown, you would have to use that instead of the red power icons in xbmc...


That would work just fine :)

I'm a total noob at scripting but would there be no way to map that script function onto the xbmc shutdown button?

Thanks so much....really looking forward to the script update whenever you find yourself with enough time :grin: