MyTorrents (1 Viewer)

robomonkey

Portal Pro
August 4, 2005
207
1
Woot!! it works, very cool, and thanks very much!

I also tweaked the scrollup info box to be a little taller (300) so all the info from uTorrent is shown!

Is it be possible to pull other info like the overall speeds?
 

robomonkey

Portal Pro
August 4, 2005
207
1
lol,

Just got another error adding the following torrent "Stereophonics - Language, Sex, Violence, Other [2005/MP3/192]" Dunno if its down to the name and commas, as I added a similar torrent with dashes and it worked fine?!?:

2007-01-22 18:37:23.900563 [ERROR][MPMain]: Control has invalid animation type
2007-01-22 18:37:23.916150 [ERROR][MPMain]: Control has invalid animation type
2007-01-22 18:37:24.414934 [ERROR][MPMain]: OnMessage exception:confused:ystem.ArgumentException: Input array is longer than the number of columns in this table.
at System.Data.DataTable.NewRecordFromArray(Object[] value)
at System.Data.DataRowCollection.Add(Object[] values)
at c3o.Framework.Web.uTorrentData.TorrentList(String webUiUrl, String webUiLogin, String webUiPassword)
at MediaPortal.GUI.Rss.GUIuTorrent.ShowDownloads()
at MediaPortal.GUI.Rss.GUIuTorrent.OnPageLoad()
at MediaPortal.GUI.Library.GUIWindow.OnMessage(GUIMessage message)
 

robomonkey

Portal Pro
August 4, 2005
207
1
I get,

{"":"","label": [ ] ,"torrents": [ ["BBE3335BF3000E55BEFC74B8619DB72613E8C01D",201,"The Practice Season 8 - Complete",8308515878,1000,0,0,0,0,0,-1,"",0,4,0,4,65536,-1,0], ["FC9F9A54EE62EEE87B212113574047867A6A0064",201,"The.Guardian.DVDR-Replica",4795338586,1000,0,9404416,1,1919,0,3743409,"",3,15,0,124,129811,-1,0], ["7D4C8555E5BF731B71728249307EED2937619110",201,"Language, Sex, Violence, Other",62583599,51,3162112,0,0,29,16786,3022,"",0,0,6,6,396441,1,59421487]] ,"torrentc": "1324851865"}
 

fcsobel

Portal Pro
December 4, 2005
127
6
I put up a new version that should get around the embedded commas.

http://projects.c3o.com/MediaPortal/plugins.zip

For those who care the problem is that JSON data is comma delimited but there may be commas within strings like this:

"Language, Sex, Violence, Other"

Regular expressions are the civilized way to get around this problem but they make my head hurt so I found an example here:

http://www.4guysfromrolla.com/webtech/120400-1.3.shtml

Which helped me write this code to replaces the commas outside of quotes with '\b' which is then used to delimit the columns.

string commapat = ",(?=([^\\\"]*\\\"[^\\\"]*\\\")*(?![^\\\"]*\\\"))";
Regex reg = new Regex(commapat);
RowString = reg.Replace(RowString, "\b");
 

robomonkey

Portal Pro
August 4, 2005
207
1
Hi Sorry I still get the same error message (not sure if the upload file is correct as its modify time is 16:40?)

I also updated the png's to add transparancy if you want me to email you them PM me.
 

fcsobel

Portal Pro
December 4, 2005
127
6
The transparent pngs are much appreciated. I sent you a pm with my email address. The 16:40 time sounds about right. Email me a link to that torrent you are getting errors on so I can test.
 

mr3xcellent

Portal Member
January 15, 2007
12
0
Home Country
United States of America United States of America
fcsobel

I'm still not seeing anything on the My utorrent screen. I'm not using port 8080, but that shouldn't be an issue, right?

Here's all I have in the error.log:

2007-01-22 22:56:29.293250 [ERROR][14]: PlaneScene: re-entrancy in presentimage
2007-01-22 22:57:01.512000 [ERROR][MPMain]: Control has invalid animation type
2007-01-22 22:57:01.512000 [ERROR][MPMain]: Control has invalid animation type

Thanks for all the effort you're putting into this!

-mr3xcellent
 

fcsobel

Portal Pro
December 4, 2005
127
6
You should be able to use any port as long as you have the correct Web UI URL, login and password setup under the Plugins configuration for My Utorrent.

Mine is: http://localhost:8080/gui/ Make sure the url works using Firefox.

You can also try appending "?list=1" to see the raw data that the plugin uses:

http://localhost:8080/gui/?list=1

Should return something like this:

{"":"","label": [ ] ,"torrents": [ ["5AE4864E683547E5025962592043C8B93B84788E",136,"dnrTV_0034.zip",133854368,1000,128087200,0,0,0,0,-1,"",0,0,0,0,65536,-1,0], ["EC18A466C9E8CBBF15252B624EABED1E416EECB8",136,"dnrTV_0038.zip",100884103,1000,0,0,0,0,0,-1,"",0,0,0,0,65536,-1,0]] ,"torrentc": "389799089"}
 

Users who are viewing this thread

Top Bottom