• 1
  • 4
  • 5
  • 6
  • 7
  • 8(current)
Win HOW-TO get uTorrent to tell XBMC to update its library
(2012-08-05, 03:33)achaw Wrote: Someone else are losing xbmc focus when the script es executed?

PS: I response myself, is a utorrent problem....when a toorrent is added xbmc lose focus...

What is the fix for this?

I have utorrent use the commands to open winrar and unrar all of my tv shows in their folders and then Sickbeard scans the download folder and grabs all shows and info and renames and sorts to the correct show folder elsewhere. It all works great, except....

Every time utorrent uses winrar it automatically minimizes XBMC.... How do I make XBMC full control with no minimizing or what cmd can I add to utorrent?
Image
Reply
Can i use this without using all those labels and "move completed to" options? Can i just tell XBMC to update itself once a torrent finishes downloading?
Reply
(2012-11-02, 21:18)bboo Wrote: Can i use this without using all those labels and "move completed to" options? Can i just tell XBMC to update itself once a torrent finishes downloading?

Yes, but you need to edit out the parts that refer to updating a specific directory, the script gets a lot simpler that way:

Haven't tried this, but it should work. Just add the file in run on completed torrent. No parameters needed
Code:
Dim objSvrHTTP
Dim connectionString
Dim JSONstring
Dim xbmcConnection
Set objSvrHTTP = CreateObject("MSXML2.XMLHTTP")

On Error Resume Next
'edit this line to work with your setup
xbmcConnection = "http://xbmc:xbmc@localhost/jsonrpc?request="

'if the first argument is -U (for update) then it performs the update procedure and sends a notification to xbmc.
if WScript.Arguments.Item(0) = "-U" then
    'Send a command to xbmc that tells it to update
    JSONstring = URLEncode(Replace("{''jsonrpc'':''2.0'',''method'':''VideoLibrary.Scan'',''id'':1}","''",Chr(34)))
    connectionString =  xbmcConnection & JSONstring
    WScript.Sleep 1000 * 10
    objSvrHTTP.open "GET", connectionString, False
    objSvrHTTP.send    
End if

Function URLEncode(ByVal str)
Dim strTemp, strChar
Dim intPos, intASCII
strTemp = ""
strChar = ""
For intPos = 1 To Len(str)
  intASCII = Asc(Mid(str, intPos, 1))
  If intASCII = 32 Then
   strTemp = strTemp & "+"
  ElseIf ((intASCII < 123) And (intASCII > 96)) Then
   strTemp = strTemp & Chr(intASCII)
  ElseIf ((intASCII < 91) And (intASCII > 64)) Then
   strTemp = strTemp & Chr(intASCII)
  ElseIf ((intASCII < 58) And (intASCII > 47)) Then
   strTemp = strTemp & Chr(intASCII)
  Else
   strChar = Trim(Hex(intASCII))
   If intASCII < 16 Then
    strTemp = strTemp & "%0" & strChar
   Else
    strTemp = strTemp & "%" & strChar
   End If
  End If
Next
URLEncode = strTemp
End Function

As some may notice in the above post is that I've replaced the HTTP-API code that is now depreciated in the latest nightly builds of xbmc. I have replaced it with JSON requests instead. The original post has been updated with a new version.
  • 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
Thanks for that! I'm really new to all this so i would appreciate some more assistance. Which lines exactly do i need to change and how?
Reply
The script stopped working for Frodo, it seems Sad

Any updates we could apply?
Reply
why use a 3rd program like Sickbeard or Couchpotato if uTorrent can handle everything (scanning rssfeed for new eps, downloading them to the right folders) and ping XBMC when a torrent is finished?
Reply
(2013-01-29, 01:45)zilexa Wrote: why use a 3rd program like Sickbeard or Couchpotato if uTorrent can handle everything (scanning rssfeed for new eps, downloading them to the right folders) and ping XBMC when a torrent is finished?

I can't get utorrent to ping XBMC since Frodo, though
Reply
The api for the web interface has changed, all we can do is wait for somone to come along and update the script for Frodo Smile
Reply
My version of this script works on frodo. It is based on this script, but I've changed it around a bit. Details here:
http://forum.xbmc.org/showthread.php?tid=120615

Also, watzens version on the first page was updated back in November with support for frodo.
Reply
  • 1
  • 4
  • 5
  • 6
  • 7
  • 8(current)

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