• 1
  • 2
  • 3(current)
  • 4
  • 5
  • 8
Win HOW-TO get uTorrent to tell XBMC to update its library
#31
I have been wondering for some time now on how to make utorrent do this
Thanks!

As for the vbscript erroring out when xbmc is not running, I might have an idea.
I don't know vbscript at all, I'm a php programmer myself
From what I can Google, I think this might check the connection every 30 seconds

Code:
'Check the connection, see if xbmc is running
objSvrHTTP.open "GET", xbmcConnection, False
objSvrHTTP.send
While objSvrHTTP.Status <> 200
    'Wait 30 seconds to try again
    WScript.Sleep 1000 * 30
Wend
This will keep waiting until the returned status is 200 (good url)
Maybe put the status into a variable and not run the update code below if it fails after 2 minutes.

I'm sure someone that knows vbscript better can do better than this. I'm going to keep messing with this and checking to see if I can figure this out better.
Reply
#32
It seems to still die on objSvrHTTP.send
Reply
#33
I think you can add "On Error Resume Next" after "Set objSvrHTTP......" (like the tenth row) and it will not throw error messages.
  • Livingroom - C2D E8400, P5N7A-VM on a Samsung 46" LE46M86 FullHD via HDMI
  • Kitchen - ASRock 330 HT Displayed on a Samsung Lapfit 22" dual touch screen LD220Z
  • Bedroom - LG Laptop on a 32" tv
Reply
#34
watzen, I hope you don't mind but I used parts of your script to integrate into a fully automated script that unrars, sorts, scrapes, notifies and updates XBMC's library.

Check it out:

http://forum.xbmc.org/showthread.php?tid=95204
Reply
#35
Can't get it to work.

I've followed everything above but i can't seem to get the updating process going.

settings change to allow connect via port 80 to xbmc:xbmc

'edit these two lines
xbmcConnection = "http://xbmc:[email protected]:80"
sourcePath = "C:\DLDONE\"

downloads rss feed to DLMAP, whenfinished => they are moved to DLDONE

Label e.g.: series/treme

In the map DLDONE i have created the maps as well..

what am i missing ..
Reply
#36
Raqueem Wrote:Can't get it to work.

I've followed everything above but i can't seem to get the updating process going.

settings change to allow connect via port 80 to xbmc:xbmc

'edit these two lines
xbmcConnection = "http://xbmc:[email protected]:80"
sourcePath = "C:\DLDONE\"

downloads rss feed to DLMAP, whenfinished => they are moved to DLDONE

Label e.g.: series/treme

In the map DLDONE i have created the maps as well..

what am i missing ..

It could be that your labels should be series\treme. Notice the difference? a "\" instead of a "/"

it works by concatenating the sourcePath and the label. so in your case the path would be that it requests xbmc to update the path "C:\DLDONE\series/treme", which isn't a valid path. if you change to the way it should be then the request would be for "C:\DLDONE\series\treme".

If it still doesn't work, try to change this line:
Code:
connectionString =  xbmcConnection & "/xbmcCmds/xbmcHttp?command=ExecBuiltIn(UpdateLibrary(video," & sourcePath & myPath & "[b]/[/b]))"

to:
Code:
connectionString =  xbmcConnection & "/xbmcCmds/xbmcHttp?command=ExecBuiltIn(UpdateLibrary(video," & sourcePath & myPath & "[b]\[/b]))"

p.s. I've updated the first posts with the latest iteration and one new setting for uTorrent.
  • Livingroom - C2D E8400, P5N7A-VM on a Samsung 46" LE46M86 FullHD via HDMI
  • Kitchen - ASRock 330 HT Displayed on a Samsung Lapfit 22" dual touch screen LD220Z
  • Bedroom - LG Laptop on a 32" tv
Reply
#37
njumlin Wrote:watzen, I hope you don't mind but I used parts of your script to integrate into a fully automated script that unrars, sorts, scrapes, notifies and updates XBMC's library.

Check it out:

http://forum.xbmc.org/showthread.php?tid=95204

First off, I don't like what your script does. Since it performs some unneeded things:
  • Unrars the files - xbmc can play from uncompressed rar archives
  • Involves third party media manager software - get your sources in order and the files will automatically scrape all info in xbmc
  • Deletes the downloaded files so you can't seed - This makes you a nasty leecher that don't seed after you have got what you want.

other then my opinions regarding extra media managers... feel free to use it anyway you like Smile
  • Livingroom - C2D E8400, P5N7A-VM on a Samsung 46" LE46M86 FullHD via HDMI
  • Kitchen - ASRock 330 HT Displayed on a Samsung Lapfit 22" dual touch screen LD220Z
  • Bedroom - LG Laptop on a 32" tv
Reply
#38
watzen Wrote:I think you can add "On Error Resume Next" after "Set objSvrHTTP......" (like the tenth row) and it will not throw error messages.

Yep, that does work
That statement disables errors in the whole script so you might want to check for an error after "objSvrHTTP.send"

Code:
if Err.Number <> 0 then
  status = False
else
  status = True
end if

Then wrap the code in an if statement that checks this status
Reply
#39
Question 
watzen Wrote:First off, I don't like what your script does. Since it performs some unneeded things:
  • Unrars the files - xbmc can play from uncompressed rar archives
  • Involves third party media manager software - get your sources in order and the files will automatically scrape all info in xbmc
  • Deletes the downloaded files so you can't seed - This makes you a nasty leecher that don't seed after you have got what you want.

other then my opinions regarding extra media managers... feel free to use it anyway you like Smile

1. I believe this has been covered a lot of times. XBMC will have to buffer even more when you're playing from RAR files. So that is purely a performance thing.
2. XBMC can scrape my library with the current setup of my sources. Still I prefer scraping with rogues scraper in Ember Media Manager. It gives me the option to manually edit the movies, even if I reinstall XBMC and clear it's library. But its really easy to skip EMM scraping using the script for those who like to use XBMC for that.
3. Uhm. No. My torrents are downloaded with RSS feeds, which gives me a head start of completing it faster and start seeding THEN it deletes my rar's after a certain period of time (24 hours) this usually gives me a seed ratio of 5.5/6.5-isch.
Reply
#40
I have an issue.

My main PC is always on, running uTorrent and this script.
My HTPC is always on, running XBMC. That PC is never set to sleep.

If I'm on my HTPC and watching shows or something, this script runs perfect. However, when I leave my HTPC for an extended period of time (ie, overnight), than the script runs an error on my main PC and acts as if XBMC isn't even on. I come back to my HTPC and XBMC is in a frozen state. It requires me to kill the process.

This didn't happen before I implemented this script. Any idea what could be causing this?
Reply
#41
one800higgins Wrote:I have an issue.

My main PC is always on, running uTorrent and this script.
My HTPC is always on, running XBMC. That PC is never set to sleep.

If I'm on my HTPC and watching shows or something, this script runs perfect. However, when I leave my HTPC for an extended period of time (ie, overnight), than the script runs an error on my main PC and acts as if XBMC isn't even on. I come back to my HTPC and XBMC is in a frozen state. It requires me to kill the process.

This didn't happen before I implemented this script. Any idea what could be causing this?

No I havhaven't got a clue what it could be. Maybe if you make a Debug Log when it happens, someone might be able to tell what is happening. Perhaps it is something with to many requests at the same time or something. I haven't had any problems with that though. But I run uTorrent on the same computer as xbmc.
  • Livingroom - C2D E8400, P5N7A-VM on a Samsung 46" LE46M86 FullHD via HDMI
  • Kitchen - ASRock 330 HT Displayed on a Samsung Lapfit 22" dual touch screen LD220Z
  • Bedroom - LG Laptop on a 32" tv
Reply
#42
Odd. Yea I pulled the log from last night and around 4am, the file just ends. No error, no exiting out of the program, no explanation as to why it froze. It's very strange to me.
Reply
#43
one800higgins Wrote:Odd. Yea I pulled the log from last night and around 4am, the file just ends. No error, no exiting out of the program, no explanation as to why it froze. It's very strange to me.

Maybe you could check the windows logs and see if anything shows up there.
  • Livingroom - C2D E8400, P5N7A-VM on a Samsung 46" LE46M86 FullHD via HDMI
  • Kitchen - ASRock 330 HT Displayed on a Samsung Lapfit 22" dual touch screen LD220Z
  • Bedroom - LG Laptop on a 32" tv
Reply
#44
Well, I turned off your script and it was still doing the same thing, so it wasn't your script causing it. It's just odd timing that it started doing this when I started using this script haha. Not sure why or what was causing it (couldn't find any issues in Windows logs and XBMC logs just ended). I was using a nightly build so I just went back to the main build for the time being.
Reply
#45
as i have modified the update.vbs with your last modifications, it does show me the status of the torrents when they queu or finish; but the library doesn't update.
Reply
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 8

Logout Mark Read Team Forum Stats Members Help
HOW-TO get uTorrent to tell XBMC to update its library1