After working around the temporary hiccup with perfmon.dll, I was in the same situation as handsforfeet in that the skin was just showing the first five torrents on the Web UI regardless of status. Rather than delete downloaded files (hey.. you never know when you'll want to watch The Big Bang S01 for the tenth time), I tiddled around with JSMorley's LUA script so that the skin would only show the torrents being downloaded.handsforfeet wrote:Update 3.1.2 worked like a charm. I had to delete my downloaded files, as it was displaying the files alphabetically and not by most recent, but it was worth it as it is now working and displaying correctly.
A modded version of the script that works on my machine is:
Code: Select all
function Initialize()
tItem = {}
tHASH = {}
tSTATUS = {}
tNAME = {}
tSIZE = {}
tPERCENTPROGRESS = {}
tDOWNLOADED = {}
tUPLOADED = {}
tRATIO = {}
tUPLOADSPEED = {}
tDOWNLOADSPEED = {}
tETA = {}
tLABEL = {}
tPEERSCONNECTED = {}
tPEERSINSWARM = {}
tSEEDSCONNECTED = {}
tSEEDSINSWARM = {}
tAVAILABILITY = {}
tTORRENTQUEUEORDER = {}
tREMAINING = {}
tField21 = {}
tField22 = {}
tTEXTSTATUS = {}
tField24 = {}
tField25 = {}
tField26 = {}
tField27 = {}
tSAVEFOLDER = {}
sNormalColor = SKIN:GetVariable("ListFontColor")
sGreyColor = SKIN:GetVariable("GreyColor")
RunningState = SKIN:GetMeasure("CalcTranslatePIDToRunningState")
msMain = SKIN:GetMeasure("MeasureWebUI")
CurrDir = SKIN:GetVariable("CURRENTPATH")
end -- function Initialize
function Update()
IsRunning = RunningState:GetValue()
if IsRunning == 1 then --uTorrent running
Pos = 0
iDL = 0
sAllText = msMain:GetStringValue()
sAllText = string.match(sAllText, ".-\034torrents\034%:(.-)$")
sTemp, iItemCount = string.gsub(sAllText, ".-%[\"(.-)\"%]", "")
for i = 1, iItemCount do
tItem[i] = "[\""..string.match(sAllText, ".-%[\"(.-)\"%]", Pos).."\"]"
Pos = Pos + string.len(tItem[i])+1
tHASH[i], tSTATUS[i], tNAME[i], tSIZE[i], tPERCENTPROGRESS[i], tDOWNLOADED[i], tUPLOADED[i], tRATIO[i], tUPLOADSPEED[i], tDOWNLOADSPEED[i], tETA[i], tLABEL[i], tPEERSCONNECTED[i], tPEERSINSWARM[i], tSEEDSCONNECTED[i], tSEEDSINSWARM[i], tAVAILABILITY[i], tTORRENTQUEUEORDER[i], tREMAINING[i], tField21[i], tField22[i], tTEXTSTATUS[i], tField24[i], tField25[i], tField26[i], tField27[i], tSAVEFOLDER[i] = string.match(tItem[i], '%[\"(.-)\",(.-),\"(.-)\",(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),\"(.-)\",(.-),(.-),(.-),(.-),(.-),(.-),(.-),\"(.-)\",\"(.-)\",\"(.-)\",\"(.-)\",(.-),(.-),\"(.-)\",\"(.-)\".-%]')
--> filter to only show the files being downloaded
if (tTEXTSTATUS[i] == "Downloading") and (iDL < 6) then
iDL = iDL + 1
tTEXTSTATUS[i] = string.gsub(tTEXTSTATUS[i], "Downloading", "Download")
tSAVEFOLDER[i] = string.gsub(tSAVEFOLDER[i], "\092\092", "\092")
SKIN:Bang("!ShowMeterGroup Torrent"..iDL)
SKIN:Bang("!SetOption Meter"..iDL.."Name Text \""..tNAME[i].."\"")
SKIN:Bang("!SetOption Meter"..iDL.."Name ToolTipText \""..tNAME[i].."#CRLF#"..tSAVEFOLDER[i].."\092#CRLF#Peers: "..tPEERSCONNECTED[i].."("..tPEERSINSWARM[i]..")#CRLF#Downloaded: "..round(tonumber(tDOWNLOADED[i]/1048576),0).." Mb".."#CRLF#Remaining: "..round(tonumber(tREMAINING[i]/1048576),0).." Mb#CRLF#Ratio: "..round(tonumber(tRATIO[i]/1000),3).."\"")
SKIN:Bang("!SetOption Meter"..iDL.."Size Text \""..round(tonumber(tSIZE[i]/1048576),0).." Mb\"")
SKIN:Bang("!SetVariable Bar"..iDL.."Calc \""..math.floor(tonumber(tPERCENTPROGRESS[i]/10)).."\"")
SKIN:Bang("!SetOption Meter"..iDL.."\% Text \""..math.floor(tonumber(tPERCENTPROGRESS[i]/10)).." \%\"")
if round(tonumber(tDOWNLOADSPEED[i]/1024),0) <= 0 then
SKIN:Bang("!SetOption Meter"..iDL.."DLSpeed FontColor \""..sGreyColor.."\"")
else
SKIN:Bang("!SetOption Meter"..iDL.."DLSpeed FontColor \""..sNormalColor.."\"")
end
SKIN:Bang("!SetOption Meter"..iDL.."DLSpeed Text \""..round(tonumber(tDOWNLOADSPEED[i]/1024),0).." k/Bs\"")
SKIN:Bang("!SetOption Meter"..iDL.."Seeds Text \""..tSEEDSCONNECTED[i].."("..tSEEDSINSWARM[i]..")\"")
SKIN:Bang("!SetOption Meter"..iDL.."Status Text \""..tTEXTSTATUS[i].."\"")
end -- found downloading torrent
SKIN:Bang("!EnableMeasureGroup AllMeasures")
if iDL == 0 then
SKIN:Bang("!HideMeterGroup Body")
else
SKIN:Bang("!ShowMeterGroup Body")
end
SKIN:Bang("!SetVariable BackgroundHeight "..tostring(iDL * 31))
if iDL < 5 then
for i = iDL + 1, 5 do
SKIN:Bang("!HideMeterGroup Torrent"..i)
end
end
end -- of scanning all items listed on the Web UI
else -- uTorrent not running
SKIN:Bang("!DisableMeasureGroup AllMeasures")
SKIN:Bang("!HideMeterGroup Body")
for i = 1, 5 do
SKIN:Bang("!HideMeterGroup Torrent"..i)
end
end -- Test for uTorrent running
return IsRunning
end -- function Update
function round(num, idp)
local mult = 10^(idp or 0)
return math.floor(num * mult + 0.5) / mult
end -- function round