Search

Main Menu

Login
Username:

Password:

Remember me?
Anonymous

Lost Password?

Register now!



Samurize Downloads

Report A Broken Download Link





Scripts & Plugins Scripts & Plugins : Miscellaneous Miscellaneous
Download Now! BitComet info fetcher  Popular
Version: 0.2
Submitted Date: 2005/3/8
Submitter: Mythril
Description:
This script (VBScript) fetches info from the BitComet Downloads.xml file and shows it as:
(Download name)
xxx MB left of yyy MB
... (if there are more than one download)

Please don't complain that the info doesn't update more often, because the Downloads.xml file is actually not updated very often by BitComet, so it's a problem with BitComet and not the script.

This script is version 0.2 since you can't change what it shows... but I'll probably not update it unless there is lots of interest for the script.

Screenshot Screenshot   Downloaded 3269 times 3269  File Size 1.61 KB  Rate this File 9.17 (6 votes)   


Quick Comment
Title
Message

The comments are owned by the poster. We aren't responsible for their content.

 Re: BitComet info fetcher

Posted: 2005/6/2 15:35  Updated: 2005/6/2 15:35



Just popping in
Joined: 1969/12/31
From:
Posts: 0
Function TrimName(FileName)
If Len(FileName) > 15 Then TrimName = Left(FileName,15) & "..." : Else TrimName = FileName
End Function

Function ViewTorrents()
Dim fso, file, ts
Set fso = CreateObject("Scripting.FileSystemObject"
Set file = fso.GetFile("C:\Program Files\BitComet\Downloads.xml"
Set ts = file.OpenAsTextStream()
ViewTorrents = ""
While not ts.AtEndOfStream
line = ts.ReadLine()
if InStr(line,"<Torrent " Then
Dim regex, res, tinfo
Set regex = New RegExp
regex.Global = True
regex.IgnoreCase = True
regex.Pattern = "[a-z]+=""[a-z0-9_\\:\+\[\]() .-]+"""
Set res = regex.Execute(line)
Set tinfo = CreateObject("Scripting.Dictionary"
For Each r In res
s = Split( r, "=" )
tinfo.Add s(0), Mid( s(1), 2, Len( s(1) ) - 2 )
Next
GetByte = (int(tinfo("SelectedSize") / 1024/1024) - (int(tinfo( "Left" )) /1024/1024)
TotalByte = (int(tinfo("SelectedSize") / 1024/1024)
If GetByte <> TotalByte Then
'Not Completed Download
ViewTorrents = ViewTorrents & "ļ " & TrimName(tinfo( "ShowName" )) & " DL: " & formatnumber(GetByte,2) & " of " & formatnumber(TotalByte,2) & " MB." & vbCRLF
Else
'Completed Download
ViewTorrents = ViewTorrents & "š " & TrimName(tinfo( "ShowName" )) & " DL: " & formatnumber(GetByte,2) & " of " & formatnumber(TotalByte,2) & " MB." & vbCRLF
End If
End If
WEnd
End Function

little update by me
 

 Re: BitComet info fetcher

Posted: 2006/2/8 20:15  Updated: 2006/2/8 20:15

gmar

Just popping in
Joined: 2006/2/8
From:
Posts: 1
 

 Re: BitComet info fetcher

Posted: 2006/8/1 10:45  Updated: 2006/8/1 10:45

TarmA

Just popping in
Joined: 2006/8/1
From:
Posts: 1
I have been looking for this
 
Showcase

Come On, Get Samurized!
    This page cannot be displayed due to an internal error.

If you are the administrator of this site, please visit the Xoops Troubleshooting Page for assistance.

Helpful infomation you should provide while asking for assistance: