VoLT Posted October 23, 2008 Report Share Posted October 23, 2008 How get information (WebUI) about that download torrent completed (well show popup at Windows OS)and give me the source code thisPHP?PERL?IRC Script? Link to comment Share on other sites More sharing options...
schnurlos Posted October 23, 2008 Report Share Posted October 23, 2008 http://forum.utorrent.com/viewtopic.php?id=25661http://forum.utorrent.com/viewtopic.php?id=33186 Link to comment Share on other sites More sharing options...
VoLT Posted October 24, 2008 Author Report Share Posted October 24, 2008 It is not something ... there has not described how to verify the end-injectionDOWNLOAD COMPLETED Link to comment Share on other sites More sharing options...
thelittlefire Posted October 24, 2008 Report Share Posted October 24, 2008 ... Read better. Status and Remaining %. It's not going to be spoon-fed to you.If that does not help you, explain your "download completed" in a different way so someone can clarify what you are missing. Link to comment Share on other sites More sharing options...
Lord Alderaan Posted October 24, 2008 Report Share Posted October 24, 2008 The status of a torrent (as seen in the status column) is determined by a combination of two things. The bitwise STATUS value and the PERCENT PROGRESS.If the first (started), second (checking), fifth (error) and seventh (queued) bit of the bitwise STATUS are all 0 and the PERCENT PROGRESS is 1000 the torrent is Finished.I use this function:if ( $status_bit1 == 1 ) { if ( $status_bit6 == 1 ) { return Paused } else { if ( $status_bit7 == 1 ) { if ( $progress == 1000 ) { return Seeding } else { return Downloading } } else { if ( $progress == 1000 ) { return Seeding [F] } else { return Downloading [F] } } }}elseif ( $status_bit2 == 1 ) { return Checking}elseif ( $status_bit5 == 1 ) { return Error}elseif ( $status_bit7 == 1 ) { if ( $progress == 1000 ) { return Queued Seeding } else { return Queued }}if ( $progress == 1000 ) { return Finished}else { return Stopped} Link to comment Share on other sites More sharing options...
VoLT Posted October 24, 2008 Author Report Share Posted October 24, 2008 my function ... Delphifunction ConvertStatus(Status: Integer; PercentProgress: Integer): string;var i: integer; s: String;begin s := ''; for i := 0 to 7 do if Status and (1 shl i) > 0 then s := '1' + s else s := '0' + s; if s[8] = '1' then begin if s[3] = '1' then begin Result:='Pause'; exit; end else begin if s[2] = '1' then begin if PercentProgress = 1000 then begin Result:='Seeding'; exit; end else begin Result:='Downloading'; exit; end; end else begin if PercentProgress = 1000 then begin Result:='Seeding [F]'; exit; end else begin Result:='Downloading [F]'; exit; end; end; end; end else begin if s[7] = '1' then begin Result:='Checking ...'; exit; end; if s[4] = '1' then begin Result:='Error!'; exit; end; if s[2] = '1' then begin if PercentProgress = 1000 then begin Result:='Queued Seeding'; exit; end else begin Result:='Queued ...'; exit; end; end; if PercentProgress = 1000 then begin Result:='Finished'; exit; end else begin Result:='Stopped'; exit; end; end;end;thanks I'll try to understand) Link to comment Share on other sites More sharing options...
Ultima Posted October 24, 2008 Report Share Posted October 24, 2008 If you can use bitwise AND, you won't really need to convert the status into a string -- that's just an extra unnecessary step Link to comment Share on other sites More sharing options...
preair Posted December 2, 2008 Report Share Posted December 2, 2008 For example, would it be possible to make a script to have popup notifications for completed downloads as soon as a torrent download completes?OR...Am I just limited to having a script display the completed torrents after a certain time interval or after a command is executed? Link to comment Share on other sites More sharing options...
Ultima Posted December 3, 2008 Report Share Posted December 3, 2008 The WebUI (and really, websites in general) is pull-based, not push-based. That means events (like download completion) don't cause events to bubble up, eventually causing some notification to be pushed to some client using the WebUI backend. Instead, the client using the backend needs to constantly/periodically poll the backend by pulling data off of it. Link to comment Share on other sites More sharing options...
preair Posted December 3, 2008 Report Share Posted December 3, 2008 I understand now, thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.