You can subscribe to this list here.
2003 |
Jan
|
Feb
(20) |
Mar
(122) |
Apr
(16) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <bel...@us...> - 2003-03-16 01:22:05
|
Update of /cvsroot/btplusplus/BT++/dist In directory sc8-pr-cvs1:/tmp/cvs-serv14380 Modified Files: README_WT.txt Log Message: Readme update. WT doesn't need wx. Doh! Index: README_WT.txt =================================================================== RCS file: /cvsroot/btplusplus/BT++/dist/README_WT.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README_WT.txt 16 Mar 2003 01:17:57 -0000 1.1 --- README_WT.txt 16 Mar 2003 01:21:57 -0000 1.2 *************** *** 65,68 **** --- 65,69 ---- like downloading of multiple files at once, configuration of upload and download speeds as well as other behaviours. + As it has no GUI it doesn't depend on wxWindows/wxPython. ************************ *************** *** 75,87 **** Unix / Linux: 1 - Install Python(http://www.python.org) ! 2 - Install wxWindows+wxPython(http://www.wxpython.org) ! 3 - Unpack the tar.gz / tar.bz either ! 4 - go to the src directory and use 'python WT++.py' to start WT++ (on some systems with both python 1.x and 2.x you might have to use 'python2' instead of 'python') or ! 4 - make WT++.py in the src directory executable ('chmod +x WT++.py') ! 5 - go to the src directory and use './WT++.py' to start WT++ (be sure the first line in WT++.py points to your python 2.x executable) --- 76,87 ---- Unix / Linux: 1 - Install Python(http://www.python.org) ! 2 - Unpack the tar.gz / tar.bz either ! 3 - go to the src directory and use 'python WT++.py' to start WT++ (on some systems with both python 1.x and 2.x you might have to use 'python2' instead of 'python') or ! 3 - make WT++.py in the src directory executable ('chmod +x WT++.py') ! 4 - go to the src directory and use './WT++.py' to start WT++ (be sure the first line in WT++.py points to your python 2.x executable) |
From: <bel...@us...> - 2003-03-16 01:18:04
|
Update of /cvsroot/btplusplus/BT++/src/WebTemplates In directory sc8-pr-cvs1:/tmp/cvs-serv13101/src/WebTemplates Modified Files: config.tmpl menu.tmpl root.tmpl torrent.tmpl Log Message: Implemented seed number control Updated to wxPython 2.4.0.6 (false/true deprecated) Fixed: If last torrent completed it wasn't removed from list Fixed: Chckboxes in WT++ config not working Added shell command to BT++.py Added WT++ readme Updated BT++ readme (linux setup) Improved some html templates Index: config.tmpl =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/WebTemplates/config.tmpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config.tmpl 11 Mar 2003 01:07:21 -0000 1.2 --- config.tmpl 16 Mar 2003 01:17:58 -0000 1.3 *************** *** 35,52 **** <tr> <td>Automatically start new downloads</td> ! <td width=5% align=center><input type=checkbox name=Download_AutoStart <TMPL_IF download_autostart>CHECKED</TMPL_IF> value="1"></td> </tr> <tr> <td>Automatically pause downloads (if current>max)</td> ! <td width=5% align=center><input type=checkbox name=Download_AutoPause <TMPL_IF download_autopause>CHECKED</TMPL_IF> value="1"></td> </tr> <tr> <td>Automatically seed completed downloads</td> ! <td width=5% align=center><input type=checkbox name=Download_KeepUpload <TMPL_IF download_keepupload>CHECKED</TMPL_IF> value="1"></td> </tr> <tr> ! <td>Maximal simultanous downloads (1-10)</td> <td width=5%><input type=text style="width:100%" name=Download_MaxSimDown value="<TMPL_VAR download_maxsimdown>"></td> </tr> </table></td> </tr> --- 35,59 ---- <tr> <td>Automatically start new downloads</td> ! <td width=5% align=center><input type=hidden name=Download_AutoStart value="0"> ! <input type=checkbox name=Download_AutoStart <TMPL_IF download_autostart>CHECKED</TMPL_IF> value="1"></td> </tr> <tr> <td>Automatically pause downloads (if current>max)</td> ! <td width=5% align=center><input type=hidden name=Download_AutoPause value="0"> ! <input type=checkbox name=Download_AutoPause <TMPL_IF download_autopause>CHECKED</TMPL_IF> value="1"></td> </tr> <tr> <td>Automatically seed completed downloads</td> ! <td width=5% align=center><input type=hidden name=Download_KeepUpload value="0"> ! <input type=checkbox name=Download_KeepUpload <TMPL_IF download_keepupload>CHECKED</TMPL_IF> value="1"></td> </tr> <tr> ! <td>Maximal simultanous downloads</td> <td width=5%><input type=text style="width:100%" name=Download_MaxSimDown value="<TMPL_VAR download_maxsimdown>"></td> </tr> + <tr> + <td>Keep uploading the last x finished files (0 for unlimited)</td> + <td width=5%><input type=text style="width:100%" name=Seed_MaxSimSeed value="<TMPL_VAR seed_maxsimseed>"></td> + </tr> </table></td> </tr> *************** *** 67,71 **** <tr> <td>Use background hashing</td> ! <td width=5% align=center><input type=checkbox name=Hash_Background <TMPL_IF hash_background>CHECKED</TMPL_IF> value="1"></td> </tr> <tr> --- 74,79 ---- <tr> <td>Use background hashing</td> ! <td width=5% align=center><input type=hidden name=Hash_Background value="0"> ! <input type=checkbox name=Hash_Background <TMPL_IF hash_background>CHECKED</TMPL_IF> value="1"></td> </tr> <tr> *************** *** 109,113 **** <tr> <td>Allow access from localhost</td> ! <td width=5% align=center><input type=checkbox name=Access_AllowLocal <TMPL_IF access_allowlocal>CHECKED</TMPL_IF> value="1"></td> </tr> <tr> --- 117,122 ---- <tr> <td>Allow access from localhost</td> ! <td width=5% align=center><input type=hidden name=Access_AllowLocal value="0"> ! <input type=checkbox name=Access_AllowLocal <TMPL_IF access_allowlocal>CHECKED</TMPL_IF> value="1"></td> </tr> <tr> Index: menu.tmpl =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/WebTemplates/menu.tmpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** menu.tmpl 2 Mar 2003 02:55:41 -0000 1.1 --- menu.tmpl 16 Mar 2003 01:17:58 -0000 1.2 *************** *** 19,23 **** <tr> <td width=100%><input type=text style="width:100%" name=torr title="Paste Torrent URLs here"></td> ! <td><input type=hidden name=command value=Add><button type=submit>Add</button></td> </tr> </table> --- 19,23 ---- <tr> <td width=100%><input type=text style="width:100%" name=torr title="Paste Torrent URLs here"></td> ! <td nowrap><input type=hidden name=command value=Add><button type=submit>Add</button><button type=reset>Clear</button></td> </tr> </table> Index: root.tmpl =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/WebTemplates/root.tmpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** root.tmpl 2 Mar 2003 02:55:41 -0000 1.1 --- root.tmpl 16 Mar 2003 01:17:58 -0000 1.2 *************** *** 4,8 **** </head> <frameset rows="50,*"> ! <frame name="top" src="menu"> <frame name="body" src="torrents"> </frameset> --- 4,8 ---- </head> <frameset rows="50,*"> ! <frame name="top" scrolling=no noresize src="menu"> <frame name="body" src="torrents"> </frameset> Index: torrent.tmpl =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/WebTemplates/torrent.tmpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** torrent.tmpl 11 Mar 2003 01:07:21 -0000 1.2 --- torrent.tmpl 16 Mar 2003 01:17:58 -0000 1.3 *************** *** 11,15 **** <tr bgcolor=#DDDDDD> <th colspan=2>Incomplete</th> ! <th align=left>File</th> <th>Status</th> <th>Downloaded</th> --- 11,15 ---- <tr bgcolor=#DDDDDD> <th colspan=2>Incomplete</th> ! <th align=left width=100%>File</th> <th>Status</th> <th>Downloaded</th> |
From: <bel...@us...> - 2003-03-16 01:18:03
|
Update of /cvsroot/btplusplus/BT++/src/WebServer In directory sc8-pr-cvs1:/tmp/cvs-serv13101/src/WebServer Modified Files: BTWebServer.py HTTPConfigFile.py Log Message: Implemented seed number control Updated to wxPython 2.4.0.6 (false/true deprecated) Fixed: If last torrent completed it wasn't removed from list Fixed: Chckboxes in WT++ config not working Added shell command to BT++.py Added WT++ readme Updated BT++ readme (linux setup) Improved some html templates Index: BTWebServer.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/WebServer/BTWebServer.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** BTWebServer.py 11 Mar 2003 01:07:15 -0000 1.8 --- BTWebServer.py 16 Mar 2003 01:17:58 -0000 1.9 *************** *** 159,162 **** --- 159,176 ---- if Config.Get('Download', 'KeepUpload'): new.StartDownload() + + if HTTPConfig.Get('Seed', 'MaxSimSeed')>0: + c = 0 + for loader in WTSeeds.Loaders: + if loader.IsRunning(): + c = c + 1 + c = c - HTTPConfig.Get('Seed', 'MaxSimSeed') + if c > 0: + for loader in WTSeeds.Loaders: + if loader.IsRunning(): + loader.PauseDownload() + c = c - 1 + if c == 0: + return WTLoaders = LoaderManager( [ Config.Get('Paths', 'Torrent'), *************** *** 257,263 **** elif result['command']=='Config': for key in result: if key != 'command': majkey, minkey = key.split('_') ! if majkey in ['Host','Access','Display','WebColors']: HTTPConfig.Set(majkey, minkey, result[key]) elif (majkey == 'Paths') or (minkey == 'Ip'): --- 271,278 ---- elif result['command']=='Config': for key in result: + #WebLogit(key+' '+result[key]) if key != 'command': majkey, minkey = key.split('_') ! if majkey in ['Host','Access','Display','Seed']: HTTPConfig.Set(majkey, minkey, result[key]) elif (majkey == 'Paths') or (minkey == 'Ip'): *************** *** 349,353 **** LoaderInfo['Command'] = 'Resume' LoaderInfo['FileName'] = loader.Config['File'] ! LoaderInfo['Status'] = loader.Info['Status'] ## LoaderInfo['Hashing'] = (loader.Info['Status']=='Hashing') ## LoaderInfo['Finished'] = loader.IsFinished() --- 364,371 ---- LoaderInfo['Command'] = 'Resume' LoaderInfo['FileName'] = loader.Config['File'] ! if loader.Info['Status']=='Downloading': ! LoaderInfo['Status'] = 'Active' ! else: ! LoaderInfo['Status'] = loader.Info['Status'] ## LoaderInfo['Hashing'] = (loader.Info['Status']=='Hashing') ## LoaderInfo['Finished'] = loader.IsFinished() *************** *** 383,386 **** --- 401,405 ---- tproc.set('download_keepupload', int(Config.Get('Download', 'KeepUpload'))) tproc.set('download_maxsimdown', Config.Get('Download', 'MaxSimDown')) + tproc.set('seed_maxsimseed', HTTPConfig.Get('Seed', 'MaxSimSeed')) tproc.set('download_maxspeeddown', Config.Get('Download', 'MaxSpeedDown')) tproc.set('download_maxspeedup', Config.Get('Download', 'MaxSpeedUp')) Index: HTTPConfigFile.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/WebServer/HTTPConfigFile.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** HTTPConfigFile.py 2 Mar 2003 02:52:39 -0000 1.4 --- HTTPConfigFile.py 16 Mar 2003 01:17:58 -0000 1.5 *************** *** 15,22 **** 'LogCount': '200' }, ! ## 'Seed': { ## 'AutoStart': 1, ! ## 'MaxSimSeed': 3 ! ## }, } --- 15,22 ---- 'LogCount': '200' }, ! 'Seed': { ## 'AutoStart': 1, ! 'MaxSimSeed': 0 ! }, } |
From: <bel...@us...> - 2003-03-16 01:18:02
|
Update of /cvsroot/btplusplus/BT++/src/TabTrans In directory sc8-pr-cvs1:/tmp/cvs-serv13101/src/TabTrans Modified Files: Grid.py Renderer.py Log Message: Implemented seed number control Updated to wxPython 2.4.0.6 (false/true deprecated) Fixed: If last torrent completed it wasn't removed from list Fixed: Chckboxes in WT++ config not working Added shell command to BT++.py Added WT++ readme Updated BT++ readme (linux setup) Improved some html templates Index: Grid.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/TabTrans/Grid.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Grid.py 9 Mar 2003 12:10:02 -0000 1.11 --- Grid.py 16 Mar 2003 01:17:58 -0000 1.12 *************** *** 34,38 **** wxNORMAL, wxNORMAL, ! false, '', wxFONTENCODING_SYSTEM ), --- 34,38 ---- wxNORMAL, wxNORMAL, ! False, '', wxFONTENCODING_SYSTEM ), Index: Renderer.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/TabTrans/Renderer.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Renderer.py 9 Mar 2003 12:10:02 -0000 1.5 --- Renderer.py 16 Mar 2003 01:17:58 -0000 1.6 *************** *** 18,22 **** wxNORMAL, wxNORMAL, ! false, '', wxFONTENCODING_SYSTEM ) --- 18,22 ---- wxNORMAL, wxNORMAL, ! False, '', wxFONTENCODING_SYSTEM ) |
From: <bel...@us...> - 2003-03-16 01:18:00
|
Update of /cvsroot/btplusplus/BT++/src In directory sc8-pr-cvs1:/tmp/cvs-serv13101/src Modified Files: BT++.py LoaderManager.py Log Message: Implemented seed number control Updated to wxPython 2.4.0.6 (false/true deprecated) Fixed: If last torrent completed it wasn't removed from list Fixed: Chckboxes in WT++ config not working Added shell command to BT++.py Added WT++ readme Updated BT++ readme (linux setup) Improved some html templates Index: BT++.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/BT++.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BT++.py 22 Feb 2003 13:37:16 -0000 1.2 --- BT++.py 16 Mar 2003 01:17:57 -0000 1.3 *************** *** 1,2 **** --- 1,4 ---- + #!/usr/bin/python + from sys import argv, version from os import path, chdir, mkdir Index: LoaderManager.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/LoaderManager.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LoaderManager.py 9 Mar 2003 16:14:34 -0000 1.5 --- LoaderManager.py 16 Mar 2003 01:17:58 -0000 1.6 *************** *** 145,150 **** # UPDATE TORRENT LIST tors = listdir( self.DirTorrent ) - if len(tors) == 0: - return FilesConf = ConfigFile() --- 145,148 ---- *************** *** 166,169 **** --- 164,169 ---- self.Loaders.remove(l) con = true + + FilesConf.Save() for loader in self.Loaders: *************** *** 175,178 **** --- 175,181 ---- new.append(key) + + if len(tors) == 0: + return for tor in tors: |
From: <bel...@us...> - 2003-03-16 01:18:00
|
Update of /cvsroot/btplusplus/BT++/dist In directory sc8-pr-cvs1:/tmp/cvs-serv13101/dist Modified Files: README.txt Added Files: README_WT.txt Log Message: Implemented seed number control Updated to wxPython 2.4.0.6 (false/true deprecated) Fixed: If last torrent completed it wasn't removed from list Fixed: Chckboxes in WT++ config not working Added shell command to BT++.py Added WT++ readme Updated BT++ readme (linux setup) Improved some html templates --- NEW FILE: README_WT.txt --- +----------------------------------------------------------------------+ | WebTorrent++ | | | | Latest Version: http://sf.net/projects/btplusplus/ | | | | Copyright (c) 2003 Tobias "Belgabor" Minich | | | | Contact: bel...@us... | | | | Built upon BitTorrent++ | | | | Copyright (c) 2003 Florian "SirElvis" Wagner | | and | | Joshua "xamphear" Cantara | | | | Contact: sir...@gm... | | jca...@gr... | +----------------------------------------------------------------------+ | This file is part of BitTorrent++. | | | | BitTorrent++ is free software; you can redistribute it and/or modify | | it under the terms of the GNU General Public License as published | | by the Free Software Foundation; either version 2 of the License, | | or (at your option) any later version. | | | | BitTorrent++ is distributed in the hope that it will be useful, but | | WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | GNU General Public License for more details. | | | | You should have received a copy of the GNU General Public License | | along with BitTorrent++; if not, write to the | | | | Free Software Foundation, Inc. | | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | | | | The Initial Developer of the Original Code is Florian Wagner. | | All Rights Reserved. | | | | A copy of the license can be found in the file 'LICENSE.rtf'. | +----------------------------------------------------------------------+ | All files contained in the 'core' subdirectory of BitTorrent++ are | | directly copied (and sometimes modified) from the original | | BitTorrent client and thus are licensed under "The MIT License" and | | are | | | | Copyright (C) 2001-2002 Bram Cohen | | | | A copy of the license can be found in the file 'LICENSE.rtf'. | +----------------------------------------------------------------------+ | WebTorrent++ uses htmltmpl by Tomas Stybloas html template engine | | See README.htmltmpl in src/WebServer for more information | +----------------------------------------------------------------------+ ************************ *** INTRODUCTION *** ************************ WebTorrent++ is a client for the BitTorrent peer-to-peer file sharing solution. Based on the original BitTorrent software it is also written in Python, thus allowing it to run on Win32 as well as Linux like platforms(hopfully). In contrast to BitTorrent++ it acts as a http server and as such offers a web interface similar to mldonkey. Like BitTorrent++ It improves (or will improve) many parts of the original BitTorrent client, like downloading of multiple files at once, configuration of upload and download speeds as well as other behaviours. ************************ *** INSTALLATION *** ************************ Windows: Use the installer!! Unix / Linux: 1 - Install Python(http://www.python.org) 2 - Install wxWindows+wxPython(http://www.wxpython.org) 3 - Unpack the tar.gz / tar.bz either 4 - go to the src directory and use 'python WT++.py' to start WT++ (on some systems with both python 1.x and 2.x you might have to use 'python2' instead of 'python') or 4 - make WT++.py in the src directory executable ('chmod +x WT++.py') 5 - go to the src directory and use './WT++.py' to start WT++ (be sure the first line in WT++.py points to your python 2.x executable) ************************ *** USAGE *** ************************ When starting the tool the first time it will create four subdirectories. In the one, called 'torrent', you have to put the downloaded torrent files. Files that are currently downloaded are put in the 'temp' dir and moved to 'incoming' after they are finished. 'history' will contain all the torrents of finished files. Depending on your settings WT++ will start new downloads and background hashing automatically. There is some kind of priority implemented. If set to auto download WT++ will start the downloads at the top of the list first. You can move items by clicking on the arrows. By default the web interface WT++ will run on port 5080 and only accept connections from localhost. These settings can either be changed via the web interface or by editing http.ini. The defaults are the following: [Access] validips = (space seperated list of allowed ips) allowlocal = 1 (allow access from localhost) [Host] ip = (ip for the webserver to bind to) port = 5080 (webserver port) [Display] loglevel = 1 logcount = 200 refresh = 10 The Display settings are not vital for the initial setup, see the webinterface for an explanation. All the other settings are shared with BT++. Most of the interface should be self-explanatory. These things might be not obvious: - Pressing the "Torrents" button not only refreshes the display but also updates the torrents - Paste links to torrents into the red bar and press 'Add' to download them - After pressing buttons in the torrent view WT++ can sometimes be a bit sluggish, so it might be necessary to press the 'Torrents' button or wait for the next update to see the changes - If you start WT++ from the command line you can enter 'exit' or 'quit' to stop the server as an alternative to stopping it via the web interface. At least on linux its possible that the terminal you started WT++ from stops echoing typed characters after you quit WT++. This seems to be related to threading in python and to my knowledge can't be helped (if you know how to fix it I'm grateful for patches) All pages are kept as templates (*.tmpl) in the WebTemplates folder, so if you don't like the looks, you can modify it. Index: README.txt =================================================================== RCS file: /cvsroot/btplusplus/BT++/dist/README.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** README.txt 23 Feb 2003 21:06:34 -0000 1.9 --- README.txt 16 Mar 2003 01:17:57 -0000 1.10 *************** *** 64,72 **** Unix / Linux: ! 1 - Install wxWindows(http://www.wxwindows.org) ! 2 - Install Python(http://www.python.org) ! 3 - Install wxPython(http://www.wxpython.org) ! 4 - Unpack the tar.gz / tar.bz ! 5 - use 'run.sh' to start BT++ ************************ --- 64,78 ---- Unix / Linux: ! 1 - Install Python(http://www.python.org) ! 2 - Install wxWindows+wxPython(http://www.wxpython.org) ! 3 - Unpack the tar.gz / tar.bz ! either ! 4 - go to the src directory and use 'python BT++.py' to start BT++ ! (on some systems with both python 1.x and 2.x you might have to use ! 'python2' instead of 'python') ! or ! 4 - make BT++.py in the src directory executable ('chmod +x BT++.py') ! 5 - go to the src directory and use './BT++.py' to start BT++ ! (be sure the first line in BT++.py points to your python 2.x executable) ************************ |
From: <bel...@us...> - 2003-03-11 01:23:38
|
Update of /cvsroot/btplusplus/BT++/src In directory sc8-pr-cvs1:/tmp/cvs-serv30844 Added Files: SeedManager.py Log Message: Abstraction of seed management --- NEW FILE: SeedManager.py --- from BTConstants import * from os import listdir, path from Loader import Loader from LoaderManager import LoaderManager from ConfigFile import Config class SeedManager(LoaderManager): Loaders = [] Log = None Refresh = None Finish = None UpMeasure = None DirTorrent = '' DirTemp = '' DirFilFinish = '' DirTorFinish = '' def Update(self): self.UpdateList() def UpdateList(self): # UPDATE TORRENT LIST tors = listdir( self.DirTorrent ) if len(tors) == 0: return for tor in tors: con = false for loader in self.Loaders: if loader.Config['Tor'] == tor: con = true if con == true: continue self.CreateNewLoader(tor) def CreateNewLoader(self, torrent): try: loader = Loader( torrent, [ self.DirTorrent, self.DirTemp, self.DirFilFinish, self.DirTorFinish ], self.UpMeasure, self.Refresh, self.Log, self.Finish, CheckExist = true ) ## if not path.exists( loader.Config['Filename'] ): ## return None self.Loaders.append(loader) if self.Log != None: self.Log( 'Added seed "' + torrent + '"...', loglevel = LOG_INFO ) return loader except: ## if self.Log != None: ## self.Log( 'Error adding seed "' + torrent + '"...', loglevel = LOG_ERROR ) return None |
From: <bel...@us...> - 2003-03-11 01:07:48
|
Update of /cvsroot/btplusplus/BT++/src/TabHistory In directory sc8-pr-cvs1:/tmp/cvs-serv23728/TabHistory Modified Files: HistLoaderManager.py Log Message: Abstraction of seed management, seed managament for WT++, a few bug fixes Index: HistLoaderManager.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/TabHistory/HistLoaderManager.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HistLoaderManager.py 9 Mar 2003 16:15:32 -0000 1.2 --- HistLoaderManager.py 11 Mar 2003 01:07:14 -0000 1.3 *************** *** 1,66 **** ! from wxPython.wx import * ! from os import listdir, path ! ! from Loader import Loader ! from LoaderManager import LoaderManager from ConfigFile import Config ! class HistLoaderManager(LoaderManager): ! Loaders = [] ! ! Log = None ! Refresh = None ! Finish = None ! UpMeasure = None ! ! DirTorrent = '' ! DirTemp = '' ! DirFilFinish = '' ! DirTorFinish = '' ! ! def Update(self): ! self.UpdateList() ! ! def UpdateList(self): ! # UPDATE TORRENT LIST ! tors = listdir( self.DirTorrent ) ! if len(tors) == 0: ! return ! ! for tor in tors: ! con = false ! ! for loader in self.Loaders: ! if loader.Config['Tor'] == tor: ! con = true ! ! if con == true: ! continue ! ! self.CreateNewLoader(tor) ! ! def CreateNewLoader(self, torrent): ! try: ! loader = Loader( torrent, ! [ self.DirTorrent, ! self.DirTemp, ! self.DirFilFinish, ! self.DirTorFinish ], ! self.UpMeasure, ! self.Refresh, ! self.Log, ! self.Finish ) ! ! if not path.exists( loader.Config['Filename'] ): ! return None ! ! self.Loaders.append(loader) ! ! return loader ! except: ! return None ! ! ManagerUp = HistLoaderManager( [ Config.Get('Paths', 'History'), ! Config.Get('Paths', 'Incoming'), ! '', ! '' ] ) --- 1,7 ---- ! from SeedManager import SeedManager from ConfigFile import Config ! ManagerUp = SeedManager( [ Config.Get('Paths', 'History'), ! Config.Get('Paths', 'Incoming'), ! '', ! ''] ) |
From: <bel...@us...> - 2003-03-11 01:07:47
|
Update of /cvsroot/btplusplus/BT++/src In directory sc8-pr-cvs1:/tmp/cvs-serv23728 Modified Files: Loader.py WT++.py Log Message: Abstraction of seed management, seed managament for WT++, a few bug fixes Index: Loader.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/Loader.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Loader.py 9 Mar 2003 11:49:46 -0000 1.2 --- Loader.py 11 Mar 2003 01:07:07 -0000 1.3 *************** *** 33,37 **** Finish = None ! def __init__(self, torrent, dirs, globup, refresh = None, log = None, finish = None): self.Refresh = refresh --- 33,37 ---- Finish = None ! def __init__(self, torrent, dirs, globup, refresh = None, log = None, finish = None, CheckExist = false): self.Refresh = refresh *************** *** 60,64 **** self.Config['DirTorFinish'] = dirs[3] ! if self.Init(torrent) == false: raise --- 60,64 ---- self.Config['DirTorFinish'] = dirs[3] ! if self.Init(torrent, CheckExist) == false: raise *************** *** 69,73 **** ########################################################################################################### ! def Init(self, tor): self.UpdateStatus( fractionDone = -1, timeEst = -1, --- 69,73 ---- ########################################################################################################### ! def Init(self, tor, CheckExist): self.UpdateStatus( fractionDone = -1, timeEst = -1, *************** *** 101,104 **** --- 101,109 ---- self.Config['NumFiles'] = 1 self.Config['Size'] = torinfo['length'] + if CheckExist: + if not path.exists( self.Config['Filename'] ): + # Tends to spam log, therefore logged as Trivial + self.OnTrivial('File not readable.') + return false else: self.Config['Files'] = [] *************** *** 119,122 **** --- 124,132 ---- 'Size': item['length'] } ) + if CheckExist: + if not path.exists( file ): + # Tends to spam log, therefore logged as Trivial + self.OnTrivial("File '"+item['path'][len(item['path'])-1]+"' not readable.") + return false self.Info['Size'] = self.Config['Size'] Index: WT++.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/WT++.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WT++.py 7 Mar 2003 23:42:15 -0000 1.3 --- WT++.py 11 Mar 2003 01:07:10 -0000 1.4 *************** *** 5,9 **** from shutil import copyfile from ConfigFile import Config ! from WebServer.BTWebServer import BTWebServer, BTWait, BTHandler from threading import * from readline import * --- 5,9 ---- from shutil import copyfile from ConfigFile import Config ! from WebServer.BTWebServer import BTWebServer, BTWait, WTLoaders, WTSeeds from threading import * from readline import * *************** *** 44,47 **** BTWait.wait() ! BTHandler.ShutDown() --- 44,48 ---- BTWait.wait() ! WTLoaders.ShutDown() ! WTSeeds.ShutDown() |
From: <bel...@us...> - 2003-03-11 01:07:27
|
Update of /cvsroot/btplusplus/BT++/src/WebTemplates In directory sc8-pr-cvs1:/tmp/cvs-serv23728/WebTemplates Modified Files: config.tmpl torrent.tmpl Log Message: Abstraction of seed management, seed managament for WT++, a few bug fixes Index: config.tmpl =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/WebTemplates/config.tmpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** config.tmpl 2 Mar 2003 02:55:41 -0000 1.1 --- config.tmpl 11 Mar 2003 01:07:21 -0000 1.2 *************** *** 42,45 **** --- 42,49 ---- </tr> <tr> + <td>Automatically seed completed downloads</td> + <td width=5% align=center><input type=checkbox name=Download_KeepUpload <TMPL_IF download_keepupload>CHECKED</TMPL_IF> value="1"></td> + </tr> + <tr> <td>Maximal simultanous downloads (1-10)</td> <td width=5%><input type=text style="width:100%" name=Download_MaxSimDown value="<TMPL_VAR download_maxsimdown>"></td> Index: torrent.tmpl =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/WebTemplates/torrent.tmpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** torrent.tmpl 27 Feb 2003 00:44:40 -0000 1.1 --- torrent.tmpl 11 Mar 2003 01:07:21 -0000 1.2 *************** *** 21,24 **** --- 21,25 ---- <form method=POST action="torrents"> <input type=hidden name=nr value=<TMPL_VAR __PASS__>> + <input type=hidden name=seed value=0> <TMPL_IF Auto> <tr bgcolor=#CCFFCC> *************** *** 75,78 **** --- 76,104 ---- </table> </TMPL_UNLESS> + <TMPL_IF Seeds> + <p> + <table border=1 width=100% cellpadding=3> + <tr bgcolor=#DDDDDD> + <th>Seeds</th> + <th align=left>File</th> + <th>Size</th> + <th>Speed</th> + <th>Status</th> + </tr> + <TMPL_LOOP Seeds> + <form method=POST action="torrents"> + <input type=hidden name=nr value=<TMPL_VAR __PASS__>> + <input type=hidden name=seed value=1> + <tr bgcolor=#FFCCCC> + <td><button type=submit name=command value=<TMPL_VAR Command>><TMPL_VAR Command></button></td> + <td align=left nowrap width=100%><TMPL_VAR FileName></td> + <td align=center nowrap><TMPL_VAR FileSize></td> + <td align=center nowrap><TMPL_VAR SpeedUp></td> + <td align=center><TMPL_VAR Status></td> + </tr> + </form> + </TMPL_LOOP> + </table> + </TMPL_IF> </body> </html> |
From: <bel...@us...> - 2003-03-11 01:07:25
|
Update of /cvsroot/btplusplus/BT++/src/WebServer In directory sc8-pr-cvs1:/tmp/cvs-serv23728/WebServer Modified Files: BTWebServer.py Log Message: Abstraction of seed management, seed managament for WT++, a few bug fixes Index: BTWebServer.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/WebServer/BTWebServer.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** BTWebServer.py 9 Mar 2003 11:50:27 -0000 1.7 --- BTWebServer.py 11 Mar 2003 01:07:15 -0000 1.8 *************** *** 3,7 **** from HTTPConfigFile import HTTPConfig from threading import Event ! from os import listdir, path, chdir, mkdir, remove from LoaderManager import LoaderManager from urlparse import urlparse --- 3,7 ---- from HTTPConfigFile import HTTPConfig from threading import Event ! from os import listdir, path, chdir, mkdir, remove, rename from LoaderManager import LoaderManager from urlparse import urlparse *************** *** 11,14 **** --- 11,15 ---- from BTConstants import * from htmltmpl import TemplateManager, TemplateProcessor + from SeedManager import SeedManager import socket *************** *** 81,107 **** WebLog[-1]['Entry'] = "Last entry repeated " + str(WebLog[-1]['Count']) + " times" WebLog[-1]['TimeCode'] = strftime("[%a, %d %b %Y %H:%M:%S]", localtime()) - ## log = WebLog[-1] - ## log['Count'] = log['Count'] + 1 - ## log['Entry'] = "Last entry repeated " + log['Count'] + " times" - ## log['TimeCode'] = strftime("[%a, %d %b %Y %H:%M:%S]", localtime()) - ## WebLog[-1] = log - ## log['TimeCode'] = strftime("[%a, %d %b %Y %H:%M:%S]", localtime()) - ## log['LogLevel'] = loglevel - ## log['LogLevelTrivial'] = false - ## log['LogLevelInfo'] = false - ## log['LogLevelError'] = false - ## log['LogLevelCritical'] = false - ## if loglevel == LOG_TRIVIAL: - ## log['LogLevelTrivial'] = true - ## elif loglevel == LOG_INFO: - ## log['LogLevelInfo'] = true - ## elif loglevel == LOG_ERROR: - ## log['LogLevelError'] = true - ## else: - ## log['LogLevelCritical'] = true - ## log['Count'] = WebLog[-1]['Count'] + 1 - ## log['Entry'] = "Last entry repeated " + str(log['Count']) + " times" - ## WebLog.pop() - ## WebLog.append( log ) elif (len(WebLog)>0) and (a == WebLog[-1]['Entry']): log['TimeCode'] = strftime("[%a, %d %b %Y %H:%M:%S]", localtime()) --- 82,85 ---- *************** *** 142,152 **** if len(WebLog) > int(HTTPConfig.Get('Display', 'LogCount')): del WebLog[0] ! BTHandler = LoaderManager( [ Config.Get('Paths', 'Torrent'), Config.Get('Paths', 'Temp'), Config.Get('Paths', 'Incoming'), Config.Get('Paths', 'History') ], ! log = WebLogit ) ! BTHandler.Update() ########################################################################################################### --- 120,171 ---- if len(WebLog) > int(HTTPConfig.Get('Display', 'LogCount')): del WebLog[0] + + WTSeeds = SeedManager( [ Config.Get('Paths', 'History'), + Config.Get('Paths', 'Incoming'), + '', + '' ], + log = WebLogit ) + + def MoveToHistory(loader): + + loader.PauseDownload() + loader.Hashed = true + loader.Finished = true + loader.Obj['Storage'].close() + + loader.UpdateStatus( fractionDone = 1, + timeEst = 0, + downRate = 0, + upRate = 0, + activity = 'Done' ) + + if loader.Config['DirTorFinish'] != '': + try: + rename( loader.Config['TorFull'], path.join(loader.Config['DirTorFinish'], loader.Config['Tor']) ) + loader.OnInfo( 'Download complete.' ) + except: + loader.OnError('Could not move torrent.') + + if loader.Config['DirFilFinish'] != '': + try: + rename( loader.Config['Filename'], path.join(loader.Config['DirFilFinish'], loader.Config['File']) ) + except: + loader.OnError('Could not move downloaded file.') + + new = WTSeeds.CreateNewLoader(loader.Config['Tor']) + if new == None: + return + + if Config.Get('Download', 'KeepUpload'): + new.StartDownload() ! WTLoaders = LoaderManager( [ Config.Get('Paths', 'Torrent'), Config.Get('Paths', 'Temp'), Config.Get('Paths', 'Incoming'), Config.Get('Paths', 'History') ], ! log = WebLogit, ! finish = MoveToHistory ) ! WTLoaders.Update() ! WTSeeds.Update() ########################################################################################################### *************** *** 166,170 **** self.wfile.write(tproc.process(templateRoot)) elif self.requested == 'torrents': ! BTHandler.Update() sleep(0.5) self.send_torrents() --- 185,190 ---- self.wfile.write(tproc.process(templateRoot)) elif self.requested == 'torrents': ! WTLoaders.Update() ! WTSeeds.Update() sleep(0.5) self.send_torrents() *************** *** 177,184 **** elif self.requested == 'exit': self.wfile.write(tproc.process(templateExit)) ! for loader in BTHandler.Loaders: ! if loader.IsRunning(): loader.PauseDownload() ! # for loader in BTHandler.Seeds: ! # if loader.IsRunning(): loader.PauseDownload() BTWait.set() --- 197,202 ---- elif self.requested == 'exit': self.wfile.write(tproc.process(templateExit)) ! ## WTLoaders.ShutDown() ! ## WTSeeds.ShutDown() BTWait.set() *************** *** 196,220 **** if self.requested == 'torrents': if result['command']=='Pause': ! # if result['seed']=='0': ! BTHandler.Loaders[int(result['nr'])-1].PauseDownload() ! # else: ! # BTHandler.Seeds[int(result['nr'])-1].PauseDownload() elif result['command']=='Resume': ! # if result['seed']=='0': ! BTHandler.Loaders[int(result['nr'])-1].StartDownload() ! # else: ! # BTHandler.Seeds[int(result['nr'])-1].StartDownload() elif result['command']=='MoveUp': c = int(result['nr']) ! # if result['seed']=='0': ! BTHandler.Move(c-1, c-2) ! # else: ! # BTHandler.MoveSeed(c-1, c-2) elif result['command']=='MoveDown': c = int(result['nr']) ! # if result['seed']=='0': ! BTHandler.Move(c-1, c) ! # else: ! # BTHandler.MoveSeed(c-1, c) elif result['command']=='Add': url = result['torr'] --- 214,234 ---- if self.requested == 'torrents': if result['command']=='Pause': ! if result['seed']=='0': ! WTLoaders.Loaders[int(result['nr'])-1].PauseDownload() ! else: ! WTSeeds.Loaders[int(result['nr'])-1].PauseDownload() elif result['command']=='Resume': ! if result['seed']=='0': ! WTLoaders.Loaders[int(result['nr'])-1].StartDownload() ! else: ! WTSeeds.Loaders[int(result['nr'])-1].StartDownload() elif result['command']=='MoveUp': c = int(result['nr']) ! if result['seed']=='0': ! WTLoaders.Move(c-1, c-2) elif result['command']=='MoveDown': c = int(result['nr']) ! if result['seed']=='0': ! WTLoaders.Move(c-1, c) elif result['command']=='Add': url = result['torr'] *************** *** 255,259 **** WebLogit("Configuration Changed.", loglevel = LOG_TRIVIAL) ! BTHandler.Update() sleep(0.5) self.send_torrents() --- 269,274 ---- WebLogit("Configuration Changed.", loglevel = LOG_TRIVIAL) ! WTLoaders.Update() ! WTSeeds.Update() sleep(0.5) self.send_torrents() *************** *** 298,302 **** LoaderInfos = [] c = 0 ! for loader in BTHandler.Loaders: LoaderInfo = {} c = c + 1 --- 313,317 ---- LoaderInfos = [] c = 0 ! for loader in WTLoaders.Loaders: LoaderInfo = {} c = c + 1 *************** *** 315,319 **** LoaderInfo['PercentDonePrec'] = '%.1f' % (loader.Info['FractionDone']*100) LoaderInfo['PercentLeftPrec'] = '%.1f' % (loader.Info['FractionRemain']*100) ! LoaderInfo['FileSize'] = '%.2f MB' % (loader.Config['Size'] / 1024 / 1024) if loader.Info['FractionDone'] == -1: LoaderInfo['FileSizeDone'] = '?' --- 330,334 ---- LoaderInfo['PercentDonePrec'] = '%.1f' % (loader.Info['FractionDone']*100) LoaderInfo['PercentLeftPrec'] = '%.1f' % (loader.Info['FractionRemain']*100) ! LoaderInfo['FileSize'] = '%.2f MB' % (float(loader.Config['Size']) / 1024 / 1024) if loader.Info['FractionDone'] == -1: LoaderInfo['FileSizeDone'] = '?' *************** *** 326,466 **** LoaderInfo['ETA'] = loader.Info['ETA'] LoaderInfos.append(LoaderInfo) tproc.set("Loaders", LoaderInfos) self.wfile.write(tproc.process(templateTorrent)) ! ! ! ## ret = "<html>\n<head>\n<title>WebTorrent++ Download Status</title>\n" ! ## ret = ret + "<META HTTP-EQUIV=\"Refresh\" CONTENT=\""+HTTPConfig.Get('Display', 'Refresh')+"\">\n" ! ## ret = ret + "</head>\n<body bgcolor=#%s>" % HTTPConfig.Get('WebColors','TorrBackground') ! ## if BTHandler.Loaders: ! ## ret = ret + "<table border=1 width=100% cellpadding=3>\n<tr bgcolor=#DDDDDD><th colspan=2>Incomplete</th><th align=left>File</th><th>Size</th><th>Transfered</th><th>Speed</th><th>Status</th><th width=15%>Progress</th><th>Remaining</th></tr>\n" ! ## c = 0 ! ## for loader in BTHandler.Loaders: ! ## c = c + 1 ! ## if loader.IsFinished(): ! ## ret = ret + "<tr bgcolor=#%s>" % HTTPConfig.Get('WebColors','TorrFinished') ! ## if c <= Config.Get('Download', 'MaxSimDown'): ! ## ret = ret + "<tr bgcolor=#%s>" % HTTPConfig.Get('WebColors','TorrAuto') ! ## else: ! ## ret = ret + "<tr bgcolor=#%s>" % HTTPConfig.Get('WebColors','TorrNonAuto') ! ## ! ## # Buttons ! ## if loader.Info['Status']!='Paused': ! ## cc = 'Pause' ! ## else: ! ## cc = 'Resume' ! ## ret = ret + "<form method=\"POST\" action=\"torrents\"><td>" ! ## ret = ret + "<button type=submit name=command value=%s>%s</button></td><td>" % (cc,cc) ! ## if c == 1: ! ## cc = 'DISABLED' ! ## else: ! ## cc = '' ! ## ret = ret + "<table><tr><td><button type=submit name=command %s value=MoveUp style=\"font-size:xx-small; font-weight:bold\">↑</button></td></tr>" % (cc) ! ## if c == len(BTHandler.Loaders): ! ## cc = 'DISABLED' ! ## else: ! ## cc = '' ! ## ret = ret + "<tr><td><button type=submit name=command %s value=MoveDown style=\"font-size:xx-small; font-weight:bold\">↓</button></td></tr></table>" % (cc) ! ## ret = ret + "<input type=hidden name=seed value=0><input type=hidden name=nr value=%d>" % (c) ! ## ret = ret + "</td></form>" ! ## ! ## # Filename ! ## ret = ret + "<td align=left nowrap><table width=100%><tr><td>" + loader.Config['File'] + "</td></tr>" ! ## ret = ret + "<tr><td><table width=100% bordercolor=#0000BB border=1 cellspacing=0 cellpadding=0><tr><td><table width=100% height=100%><tr>" ! ## if loader.Info['Status']=='Hashing': ! ## c1='#CC6666' ! ## c2='#6666CC' ! ## else: ! ## c1='#66CC66' ! ## c2='#CC6666' ! ## if loader.Info['FractionDone'] == -1: ! ## ret = ret + '<td bgcolor=#6666CC width=100% style=\"font-size:2px\"> </td>' ! ## else: ! ## ret = ret + ('<td bgcolor=%s width=%d%% style=\"font-size:2px\"> </td><td bgcolor=%s width=%d%% style=\"font-size:2px\"> \0\0</td>' % (c1, loader.Info['FractionDone']*100, c2, loader.Info['FractionRemain']*100)) ! ## ret = ret + "</tr></table></td></tr></table></td></tr></table></td>" ! ## ! ## # Filesize ! ## ret = ret + "<td align=center>" + ('%.2f MB' % (loader.Config['Size'] / 1024 / 1024)) + "</td>" ! ## ! ## # Fraction Done ! ## ret = ret + "<td align=center>" ! ## if loader.Info['FractionDone'] == -1: ! ## ret = ret + '?' ! ## else: ! ## ret = ret + ('%.2f MB' % (loader.Info['FractionDone'] * loader.Config['Size'] / 1024 / 1024)) ! ## ret = ret + "</td>" ! ## ! ## # Speed ! ## ret = ret + "<td align=center>" + ('%.1f / %.1f' % (loader.Info['SpeedDown'], loader.Info['SpeedUp'])) + "</td>" ! ## ! ## # Status ! ## ret = ret + "<td align=center>" + loader.Info['Status'] +"</td>" ! ## ! ## # Progress ! #### ret = ret + "<td><table width=100% bordercolor=#0000BB border=1 cellspacing=0 cellpadding=0><tr><td><table width=100% height=100%><tr>" ! #### if loader.Info['Status']=='Hashing': ! #### c1='#FF0000' ! #### c2='#0000FF' ! #### else: ! #### c1='#00FF00' ! #### c2='#FF0000' ! #### if loader.Info['FractionDone'] == -1: ! #### ret = ret + '<td bgcolor=#0000FF width=100%> </td>' ! #### else: ! #### ret = ret + ('<td bgcolor=%s width=%d%%> </td><td bgcolor=%s width=%d%%> </td>' % (c1, loader.Info['FractionDone']*100, c2, loader.Info['FractionRemain']*100)) ! #### ret = ret + "</tr></table></td></tr></table></td>" ! ## ! ## # Rest ! ## ret = ret + ('<td><table width=100%%><tr><td align=center width=100%% nowrap>%.1f%% [%.2f MB]</td></tr>' % (loader.Info['FractionRemain'] * 100, loader.Info['FractionRemain'] * loader.Config['Size'] / 1024 / 1024)) ! ## ret = ret + '<tr><td align=center width=100%% nowrap>%s</td></tr></table></td>' % loader.Info['ETA'] ! ## ! ## ret = ret + "</tr>\n" ! ## ret = ret + "</table>\n" ! ## else: ! ## ret = ret + "<p> No Torrents" ! ## if BTHandler.Seeds: ! ## ret = ret + "<p><table border=1 width=100% cellpadding=3>\n<tr bgcolor=#DDDDDD><th colspan=2>Seeds</th><th align=left>File</th><th>Size</th><th>Status</th><th>Speed</th></tr>\n" ! ## c = 0 ! ## for loader in BTHandler.Seeds: ! ## c = c + 1 ! ## if c <= HTTPConfig.Get('Seed', 'MaxSimSeed'): ! ## ret = ret + "<tr bgcolor=#FFCCCC>" ! ## else: ! ## ret = ret + "<tr bgcolor=#D8BFBC>" ! ## if loader.Info['Status']!='Paused': ! ## cc = 'Pause' ! ## else: ! ## cc = 'Resume' ! ## ret = ret + "<form method=\"POST\" action=\"torrents\"><td>" ! ## ret = ret + "<button type=submit name=command value=%s>%s</button></td><td>" % (cc,cc) ! ## if c == 1: ! ## cc = 'DISABLED' ! ## else: ! ## cc = '' ! ## ret = ret + "<table><tr><td><button type=submit name=command %s value=MoveUp style=\"font-size:xx-small; font-weight:bold\">↑</button></td></tr>" % (cc) ! ## if c == len(BTHandler.Seeds): ! ## cc = 'DISABLED' ! ## else: ! ## cc = '' ! ## ret = ret + "<tr><td><button type=submit name=command %s value=MoveDown style=\"font-size:xx-small; font-weight:bold\">↓</button></td></tr></table>" % (cc) ! ## ret = ret + "<input type=hidden name=seed value=1><input type=hidden name=nr value=%d>" % (c) ! ## ret = ret + "</td></form>" ! ## ret = ret + "<td align=left width=70%>" + loader.Config['File'] + "</td>" ! ## ret = ret + "<td align=center>" + ('%.2f MB' % (loader.Config['Size'] / 1024 / 1024)) + "</td>" ! ## if loader.Info['Status']!='Hashing': ! ## ret = ret + "<td align=center>" + loader.Info['Status'] ! ## else: ! ## ret = ret + ('<td align=center>Hashing (%.1f%%)' % (loader.Info['FractionDone'] * 100)) ! ## ret = ret + "</td><td align=center>" + ('%.1f' % (loader.Info['SpeedUp'])) + "</td>" ! ## ret = ret + "</tr>\n" ! ## ret = ret + "</table>\n" ! ## if BTHandler.StaleSeeds: ! ## ret = ret + "<p><table border=1 cellpadding=10><tr><td><b style=\"color:red\">Stale Seeds (content lacking):</b></td></tr><tr><td><b>" ! ## for s in BTHandler.StaleSeeds: ! ## ret = ret + s + "<br>" ! ## ret = ret + "</b></td></tr></table>" ! ## ret = ret + "</body>\n</html>\n" ! ## self.wfile.write(ret) ! def send_config(self): tproc = TemplateProcessor() --- 341,376 ---- LoaderInfo['ETA'] = loader.Info['ETA'] LoaderInfos.append(LoaderInfo) + SeedInfos = [] + for loader in WTSeeds.Loaders: + LoaderInfo = {} + if loader.Info['Status']!='Paused': + LoaderInfo['Command'] = 'Pause' + else: + LoaderInfo['Command'] = 'Resume' + LoaderInfo['FileName'] = loader.Config['File'] + LoaderInfo['Status'] = loader.Info['Status'] + ## LoaderInfo['Hashing'] = (loader.Info['Status']=='Hashing') + ## LoaderInfo['Finished'] = loader.IsFinished() + ## LoaderInfo['Auto'] = (c <= Config.Get('Download', 'MaxSimDown')) + ## LoaderInfo['Preparing'] = (loader.Info['FractionDone'] == -1) + ## LoaderInfo['PercentDone'] = '%d' % (loader.Info['FractionDone']*100) + ## LoaderInfo['PercentLeft'] = '%d' % (loader.Info['FractionRemain']*100) + ## LoaderInfo['PercentDonePrec'] = '%.1f' % (loader.Info['FractionDone']*100) + ## LoaderInfo['PercentLeftPrec'] = '%.1f' % (loader.Info['FractionRemain']*100) + LoaderInfo['FileSize'] = '%.2f MB' % (float(loader.Config['Size']) / 1024 / 1024) + ## if loader.Info['FractionDone'] == -1: + ## LoaderInfo['FileSizeDone'] = '?' + ## LoaderInfo['FileSizeLeft'] = LoaderInfo['FileSize'] + ## else: + ## LoaderInfo['FileSizeDone'] = ('%.2f MB' % (loader.Info['FractionDone'] * loader.Config['Size'] / 1024 / 1024)) + ## LoaderInfo['FileSizeLeft'] = ('%.2f MB' % (loader.Info['FractionRemain'] * loader.Config['Size'] / 1024 / 1024)) + ## LoaderInfo['SpeedDown'] = '%.1f' % loader.Info['SpeedDown'] + LoaderInfo['SpeedUp'] = '%.1f' % loader.Info['SpeedUp'] + ## LoaderInfo['ETA'] = loader.Info['ETA'] + SeedInfos.append(LoaderInfo) tproc.set("Loaders", LoaderInfos) + tproc.set("Seeds", SeedInfos) self.wfile.write(tproc.process(templateTorrent)) ! def send_config(self): tproc = TemplateProcessor() *************** *** 471,474 **** --- 381,385 ---- tproc.set('download_autostart', int(Config.Get('Download', 'AutoStart'))) tproc.set('download_autopause', int(Config.Get('Download', 'AutoPause'))) + tproc.set('download_keepupload', int(Config.Get('Download', 'KeepUpload'))) tproc.set('download_maxsimdown', Config.Get('Download', 'MaxSimDown')) tproc.set('download_maxspeeddown', Config.Get('Download', 'MaxSpeedDown')) |
From: <sir...@us...> - 2003-03-10 18:46:02
|
Update of /cvsroot/btplusplus/BT++/src/DlgMain In directory sc8-pr-cvs1:/tmp/cvs-serv5620/src/DlgMain Modified Files: TaskManager.py Log Message: - Fixed bug in lock/unlock. - Added clear button to the log tab. Index: TaskManager.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/DlgMain/TaskManager.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TaskManager.py 3 Mar 2003 20:49:38 -0000 1.4 --- TaskManager.py 10 Mar 2003 18:45:58 -0000 1.5 *************** *** 64,67 **** --- 64,70 ---- if self.Locked == true: self.Menu_Unlock(None) + + if self.Locked == true: + return self.RemoveIcon() |
From: <sir...@us...> - 2003-03-10 18:46:00
|
Update of /cvsroot/btplusplus/BT++/src/TabLog In directory sc8-pr-cvs1:/tmp/cvs-serv5620/src/TabLog Modified Files: TabLog.py Log Message: - Fixed bug in lock/unlock. - Added clear button to the log tab. Index: TabLog.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/TabLog/TabLog.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TabLog.py 3 Mar 2003 22:15:26 -0000 1.3 --- TabLog.py 10 Mar 2003 18:45:57 -0000 1.4 *************** *** 6,10 **** wxPanel.__init__(self, parent, -1, wxPoint(2,65), wxSize(786,347), style = 0) ! self.LogWnd = LogWindow( self, wxPoint(0,0), wxSize(786,200) ) self.LogWnd.SetHelpText("This is the log window, details on torrents (and errors) will appear here.") --- 6,10 ---- wxPanel.__init__(self, parent, -1, wxPoint(2,65), wxSize(786,347), style = 0) ! self.LogWnd = LogWindow( self, wxPoint(0,0), wxSize(786,180) ) self.LogWnd.SetHelpText("This is the log window, details on torrents (and errors) will appear here.") *************** *** 12,17 **** Log( 'Starting up...', [0,0,0], false ) sizer = wxBoxSizer(wxVERTICAL) ! sizer.Add( self.LogWnd, 1, wxEXPAND | wxALL, 3) self.SetSizer( sizer ) --- 12,25 ---- Log( 'Starting up...', [0,0,0], false ) + self.ButClearLog = wxButton(self, -1, 'Clear Log', wxPoint(0,180) ) + sizer = wxBoxSizer(wxVERTICAL) ! sizer.Add( self.LogWnd, 1, wxEXPAND | wxALL, 3) ! sizer.Add( self.ButClearLog, 0, wxALIGN_RIGHT | wxBOTTOM | wxLEFT | wxRIGHT, 3) self.SetSizer( sizer ) + + EVT_BUTTON( self, self.ButClearLog.GetId(), self.Func_ButClearLog ) + + def Func_ButClearLog(self, evt): + self.LogWnd.Clear() |
From: <sir...@us...> - 2003-03-10 18:44:55
|
Update of /cvsroot/btplusplus/BT++/src/DlgAddTor In directory sc8-pr-cvs1:/tmp/cvs-serv4960/src/DlgAddTor Modified Files: DlgAddTor.py Log Message: - Fixed problem with spaces. - Improved downloading code. Index: DlgAddTor.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/DlgAddTor/DlgAddTor.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DlgAddTor.py 19 Feb 2003 20:52:49 -0000 1.1 --- DlgAddTor.py 10 Mar 2003 18:44:51 -0000 1.2 *************** *** 4,9 **** from shutil import copyfile from urlparse import urlparse ! from urllib import unquote ! from urllib2 import urlopen class DlgAddTor(wxDialog): --- 4,8 ---- from shutil import copyfile from urlparse import urlparse ! from urllib import urlopen, unquote class DlgAddTor(wxDialog): *************** *** 62,66 **** copyfile(file, path.join(Config.Get('Paths', 'Torrent'), path.split(file)[1])) except: ! wxMessageBox("Couldn't copy the torrent to the BT++ torren directory.") elif self.UrlRadio.GetValue() == true: --- 61,65 ---- copyfile(file, path.join(Config.Get('Paths', 'Torrent'), path.split(file)[1])) except: ! wxMessageBox("Couldn't copy the torrent to the BT++ torrent directory.") elif self.UrlRadio.GetValue() == true: *************** *** 70,79 **** if url != '': try: ! url = unquote(url) h = urlopen(url) ! spl = urlparse(url) ! file = path.split(spl[2])[1] ! if file == '': raise --- 69,90 ---- if url != '': try: ! while(1): ! url = unquote(url) ! if url == unquote(url): ! break ! h = urlopen(url) ! if url.startswith('http'): ! i = str(h.info()) ! ! s = i.find('filename') + 9 ! e = i.find('\n', s) - 1 ! ! file = i[s:e] ! else: ! spl = urlparse(url) ! file = path.split(spl[2])[1] ! if file == '': raise |
From: <sir...@us...> - 2003-03-10 18:42:24
|
Update of /cvsroot/btplusplus/BT++/dist In directory sc8-pr-cvs1:/tmp/cvs-serv2690/dist Modified Files: BT++.nsi Log Message: Fixed error in the torrent association. Index: BT++.nsi =================================================================== RCS file: /cvsroot/btplusplus/BT++/dist/BT++.nsi,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** BT++.nsi 9 Mar 2003 12:19:35 -0000 1.10 --- BT++.nsi 10 Mar 2003 18:42:20 -0000 1.11 *************** *** 75,79 **** WriteRegBin HKCR bittorrent EditFlags 00000100 WriteRegStr HKCR "bittorrent\shell" "" open ! WriteRegStr HKCR "bittorrent\shell\open\command" "" '$INSTDIR\BT++.exe %1' SectionEnd --- 75,79 ---- WriteRegBin HKCR bittorrent EditFlags 00000100 WriteRegStr HKCR "bittorrent\shell" "" open ! WriteRegStr HKCR "bittorrent\shell\open\command" "" '$INSTDIR\BT++.exe "%1"' SectionEnd |
From: <sir...@us...> - 2003-03-09 16:15:35
|
Update of /cvsroot/btplusplus/BT++/src/TabHistory In directory sc8-pr-cvs1:/tmp/cvs-serv26735/src/TabHistory Modified Files: HistLoaderManager.py Log Message: Fix: Torrents that couldn't be added to the history were retried and logged all the time... Index: HistLoaderManager.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/TabHistory/HistLoaderManager.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HistLoaderManager.py 9 Mar 2003 12:10:02 -0000 1.1 --- HistLoaderManager.py 9 Mar 2003 16:15:32 -0000 1.2 *************** *** 41,50 **** def CreateNewLoader(self, torrent): ! l = LoaderManager.CreateNewLoader(self, torrent) ! if not path.exists( l.Config['Filename'] ): ! self.Loaders.remove(l) ! else: ! return l ManagerUp = HistLoaderManager( [ Config.Get('Paths', 'History'), --- 41,63 ---- def CreateNewLoader(self, torrent): ! try: ! loader = Loader( torrent, ! [ self.DirTorrent, ! self.DirTemp, ! self.DirFilFinish, ! self.DirTorFinish ], ! self.UpMeasure, ! self.Refresh, ! self.Log, ! self.Finish ) ! if not path.exists( loader.Config['Filename'] ): ! return None ! ! self.Loaders.append(loader) ! ! return loader ! except: ! return None ManagerUp = HistLoaderManager( [ Config.Get('Paths', 'History'), |
From: <sir...@us...> - 2003-03-09 16:14:37
|
Update of /cvsroot/btplusplus/BT++/src In directory sc8-pr-cvs1:/tmp/cvs-serv26443/src Modified Files: LoaderManager.py Log Message: Removed wxPython stuff... this shouldn't be in there. Index: LoaderManager.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/LoaderManager.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LoaderManager.py 9 Mar 2003 11:49:46 -0000 1.4 --- LoaderManager.py 9 Mar 2003 16:14:34 -0000 1.5 *************** *** 5,10 **** from BTConstants import * - from wxPython.wx import * - class LoaderManager: Loaders = [] --- 5,8 ---- *************** *** 34,38 **** def CreateNewLoader(self, torrent): - #wxMessageBox(torrent) try: loader = Loader( torrent, --- 32,35 ---- |
From: <sir...@us...> - 2003-03-09 12:19:39
|
Update of /cvsroot/btplusplus/BT++/dist In directory sc8-pr-cvs1:/tmp/cvs-serv20032/dist Modified Files: BT++.nsi Log Message: Uninstaller didn't remove 'helpc.pyd'. Index: BT++.nsi =================================================================== RCS file: /cvsroot/btplusplus/BT++/dist/BT++.nsi,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** BT++.nsi 9 Mar 2003 12:11:55 -0000 1.9 --- BT++.nsi 9 Mar 2003 12:19:35 -0000 1.10 *************** *** 104,107 **** --- 104,108 ---- Delete "$INSTDIR\_winreg.pyd" Delete "$INSTDIR\BT++.exe" + Delete "$INSTDIR\helpc.pyd" Delete "$INSTDIR\python22.dll" Delete "$INSTDIR\select.pyd" |
From: <sir...@us...> - 2003-03-09 12:11:57
|
Update of /cvsroot/btplusplus/BT++/dist In directory sc8-pr-cvs1:/tmp/cvs-serv18349/dist Modified Files: BT++.nsi Added Files: CHANGELOG.txt Log Message: Added Changelog. --- NEW FILE: CHANGELOG.txt --- [0.5.0 (alpha)] - Fixed bug when downloading multi-file torrents. - Now uses a toolbar for switching between tabs; no notebook anymore - The whole window is now resizable. - Nice icons for the tabs. - Help button within the toolbar. - Images and icons are embedded in the distribution ('src/Images.py') - Improved about dialog. Now with more text and nice image. - Vastly improved grid, especially the look; highlighted rows, progress bar, no more flickering. - Fixed flaw in the Add Torrent dialog. - Tasbbar icon now shows the number of open connections. - Nice images for the toolbar. - Grid is now handmade completly in Python to reduce refresh-flicker. - Added a history tab that shows all finished downloads. [0.4.0 (alpha)] - associate BT++ with .torrent files - new preference options - improvements of the tray icon - refreshing of torrent folder - added incoming and history folder - about dialog - new, much better looking icons - context-sensitive help - configurable background hashing - improved handling of not valid/damaged torrents - grid right click menu improvements - add torrent from url / local file - global upload rate restriction settings - extremly simple progress bars - many, many bugfixes [0.3.0 (alpha)] - now uses a grid instead of a tree for transfers - many cosmetic changes and improvements - file priority - some major rewrites and code cleanups - new important features, like up/down speed coming soon (fundation has been set through rewrites) - some fixes, but rewrite will surely have introduced new bugs [0.2.1 (alpha)] - bugfix for torrents containing multiple files - validator for the preference window - log window now read only [0.2.0 (alpha)] - Linux compatibility - Added: Preference dialog. - Added: Class for reading and wiriting to the config file. - Buttons for preference window, collaps/expand all. - Respect preferences from config file when starting download - Fixes for some bugs introduced with the latest features. - Cosmetic changes. - Tree: Right click menu implemented(only pause/resume). - Colors in log window(not yet used). [0.1.0 (alpha)] - first public release - first set of functions works - tool is usable - there ARE bugs and problems Index: BT++.nsi =================================================================== RCS file: /cvsroot/btplusplus/BT++/dist/BT++.nsi,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** BT++.nsi 9 Mar 2003 11:51:34 -0000 1.8 --- BT++.nsi 9 Mar 2003 12:11:55 -0000 1.9 *************** *** 48,51 **** --- 48,52 ---- File "..\build\BT++\zlib.pyd" File "README.txt" + File "CHANGELOG.txt" File "LICENSE.rtf" SectionEnd *************** *** 61,64 **** --- 62,66 ---- CreateShortCut "$SMPROGRAMS\BitTorrent++\BitTorrent++.lnk" "$INSTDIR\BT++.exe" CreateShortCut "$SMPROGRAMS\BitTorrent++\Readme.lnk" "$INSTDIR\README.txt" + CreateShortCut "$SMPROGRAMS\BitTorrent++\Changelog.lnk" "$INSTDIR\CHANGELOG.txt" CreateShortCut "$SMPROGRAMS\BitTorrent++\License.lnk" "$INSTDIR\LICENSE.rtf" IfFileExists "$INSTDIR\Uninstall.exe" "" +2 *************** *** 108,111 **** --- 110,114 ---- Delete "$INSTDIR\zlib.pyd" Delete "$INSTDIR\README.txt" + Delete "$INSTDIR\CHANGELOG.txt" Delete "$INSTDIR\LICENSE.rtf" Delete "$INSTDIR\Uninstall.exe" |
From: <sir...@us...> - 2003-03-09 12:10:06
|
Update of /cvsroot/btplusplus/BT++/src In directory sc8-pr-cvs1:/tmp/cvs-serv17691/src Modified Files: ConfigFile.py Log Message: - Made History working. - Added option for History. - Fixes. Index: ConfigFile.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/ConfigFile.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ConfigFile.py 3 Mar 2003 20:49:39 -0000 1.4 --- ConfigFile.py 9 Mar 2003 12:10:03 -0000 1.5 *************** *** 13,17 **** 'MaxSimDown': 3, 'MaxSpeedDown': 0, ! 'MaxSpeedUp': 0 }, 'Hash': { --- 13,18 ---- 'MaxSimDown': 3, 'MaxSpeedDown': 0, ! 'MaxSpeedUp': 0, ! 'KeepUpload': 1 }, 'Hash': { *************** *** 48,55 **** 'HistCol2': 80, 'HistCol3': 70, ! 'HistCol4': 120, ! 'HistCol5': 70, ! 'HistCol6': 90, ! 'HistCol7': 90 } } --- 49,53 ---- 'HistCol2': 80, 'HistCol3': 70, ! 'HistCol4': 120 } } *************** *** 147,149 **** Config = ConfigFile() Config.Read('preferences.ini') ! Config.InstallDefaults(cfg_default) \ No newline at end of file --- 145,147 ---- Config = ConfigFile() Config.Read('preferences.ini') ! Config.InstallDefaults(cfg_default) |
From: <sir...@us...> - 2003-03-09 12:10:06
|
Update of /cvsroot/btplusplus/BT++/src/DlgMain In directory sc8-pr-cvs1:/tmp/cvs-serv17691/src/DlgMain Modified Files: DlgMain.py Log Message: - Made History working. - Added option for History. - Fixes. Index: DlgMain.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/DlgMain/DlgMain.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DlgMain.py 3 Mar 2003 22:15:29 -0000 1.7 --- DlgMain.py 9 Mar 2003 12:10:02 -0000 1.8 *************** *** 63,71 **** # Gets the current down and upload speeds def GetSpeeds(self): ! return [self.Panel.Tabs['Transfer'].Grid.Table.Manager.GetDownSpeed(), ! self.Panel.Tabs['Transfer'].Grid.Table.Manager.GetUpSpeed()] def GetConnections(self): ! return self.Panel.Tabs['Transfer'].Grid.Table.Manager.GetNumConnections() ########################################################################################################### --- 63,73 ---- # Gets the current down and upload speeds def GetSpeeds(self): ! return [ self.Panel.Tabs['Transfer'].Grid.Table.Manager.GetDownSpeed(), ! self.Panel.Tabs['Transfer'].Grid.Table.Manager.GetUpSpeed() + ! self.Panel.Tabs['History'] .Grid.Table.Manager.GetUpSpeed() ] def GetConnections(self): ! return ( self.Panel.Tabs['Transfer'].Grid.Table.Manager.GetNumConnections() + ! self.Panel.Tabs['History'].Grid.Table.Manager.GetNumConnections() ) ########################################################################################################### *************** *** 121,125 **** self.SwitchTab( 'Transfer' ) self.SetSizer(sizer) - ########################################################################################################### --- 123,126 ---- |
From: <sir...@us...> - 2003-03-09 12:10:06
|
Update of /cvsroot/btplusplus/BT++/src/TabTrans In directory sc8-pr-cvs1:/tmp/cvs-serv17691/src/TabTrans Modified Files: TabTrans.py Renderer.py GridTable.py Grid.py Log Message: - Made History working. - Added option for History. - Fixes. Index: TabTrans.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/TabTrans/TabTrans.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TabTrans.py 2 Mar 2003 16:36:28 -0000 1.3 --- TabTrans.py 9 Mar 2003 12:10:02 -0000 1.4 *************** *** 10,14 **** def __init__(self, parent): ! wxPanel.__init__(self, parent, -1, wxPoint(0,65), wxSize(786,347)) self.Grid = Grid( self ) --- 10,14 ---- def __init__(self, parent): ! wxPanel.__init__(self, parent, -1, wxPoint(0,65), wxSize(786,347), style = 0) self.Grid = Grid( self ) Index: Renderer.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/TabTrans/Renderer.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Renderer.py 28 Feb 2003 21:31:51 -0000 1.4 --- Renderer.py 9 Mar 2003 12:10:02 -0000 1.5 *************** *** 1,4 **** from wxPython.wx import * - from wxPython.grid import * ########################################################################################################### --- 1,3 ---- Index: GridTable.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/TabTrans/GridTable.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** GridTable.py 3 Mar 2003 15:52:12 -0000 1.6 --- GridTable.py 9 Mar 2003 12:10:02 -0000 1.7 *************** *** 1,11 **** from wxPython.wx import * - from wxPython.grid import * from TabLog.LogWindow import Log from LoaderManager import LoaderManager import Renderer ! class GridTable(wxPyGridTableBase): Sizes = { 'ColLabel': 18, --- 1,13 ---- + from os import path, rename from wxPython.wx import * from TabLog.LogWindow import Log from LoaderManager import LoaderManager + from ConfigFile import Config import Renderer + from TabHistory.HistLoaderManager import ManagerUp ! class GridTable: Sizes = { 'ColLabel': 18, *************** *** 27,34 **** def __init__(self, grid): - wxPyGridTableBase.__init__(self) - self.Grid = grid ! self.Manager = LoaderManager(self.Refresh, Log) def Update(self): --- 29,40 ---- def __init__(self, grid): self.Grid = grid ! self.Manager = LoaderManager( [ Config.Get('Paths', 'Torrent'), ! Config.Get('Paths', 'Temp'), ! Config.Get('Paths', 'Incoming'), ! Config.Get('Paths', 'History') ], ! self.Refresh, ! Log, ! self.MoveToHistory ) def Update(self): *************** *** 76,87 **** ########################################################################################################### - def IsEmptyCell(self, row, col): - if col > 6: - return true - if row > self.GetNumberRows() - 1: - return true - - return false - def GetColLabelValue(self, col): if col == 0: return 'Filename' --- 82,85 ---- *************** *** 146,149 **** --- 144,183 ---- ########################################################################################################### + def MoveToHistory(self, loader): + + loader.PauseDownload() + loader.Hashed = true + loader.Finished = true + loader.Obj['Storage'].close() + + loader.UpdateStatus( fractionDone = 1, + timeEst = 0, + downRate = 0, + upRate = 0, + activity = 'Done' ) + + if loader.Config['DirTorFinish'] != '': + try: + rename( loader.Config['TorFull'], path.join(loader.Config['DirTorFinish'], loader.Config['Tor']) ) + loader.OnInfo( 'Download complete.' ) + except: + loader.OnError('Could not move torrent.') + + if loader.Config['DirFilFinish'] != '': + try: + rename( loader.Config['Filename'], path.join(loader.Config['DirFilFinish'], loader.Config['File']) ) + except: + loader.OnError('Could not move downloaded file.') + + new = ManagerUp.CreateNewLoader(loader.Config['Tor']) + if new == None: + return + + if Config.Get('Download', 'KeepUpload'): + new.StartDownload() + + ########################################################################################################### + ########################################################################################################### + def Destroy(self, evt = wxCloseEvent()): self.Manager.Destroy() Index: Grid.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/TabTrans/Grid.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Grid.py 3 Mar 2003 15:37:05 -0000 1.10 --- Grid.py 9 Mar 2003 12:10:02 -0000 1.11 *************** *** 22,25 **** --- 22,47 ---- 'PosX': -1 } + + DrawTools = { + 'HighlightOutline': wxPen( wxColour( 10, 36,106) ), + 'HighlightColor': wxBrush( wxColour(194,200,218), wxSOLID), + + 'EmptyBackground': wxBrush( wxColour(255,255,255), wxSOLID), + + 'LabelFontColor': wxColour(0, 0, 0), + 'LabelFont': wxFont( 8, + wxDEFAULT, + wxNORMAL, + wxNORMAL, + false, + '', + wxFONTENCODING_SYSTEM ), + + 'LabelOutlineC1': wxPen( wxColor(255,255,255) ), + 'LabelOutlineC2': wxPen( wxColor(128,128,128) ), + 'LabelOutlineC3': wxPen( wxColor( 64, 64, 64) ), + 'LabelFill': wxBrush( wxColor(212,208,200), wxSOLID ), + 'LabelSizeCursor': wxStockCursor( wxCURSOR_SIZEWE ) + } def __init__(self, parent): *************** *** 80,114 **** EVT_MOTION( self, self.OnMouseMove ) - self.DrawTools = { - 'HighlightOutline': wxPen( wxColour( 10, 36,106) ), - 'HighlightColor': wxBrush( wxColour(194,200,218), wxSOLID), - - 'EmptyBackground': wxBrush( wxColour(255,255,255), wxSOLID), - - 'LabelFontColor': wxColour(0, 0, 0), - 'LabelFont': wxFont( 8, - wxDEFAULT, - wxNORMAL, - wxNORMAL, - false, - '', - wxFONTENCODING_SYSTEM ), - - 'LabelOutlineC1': wxPen( wxColor(255,255,255) ), - 'LabelOutlineC2': wxPen( wxColor(128,128,128) ), - 'LabelOutlineC3': wxPen( wxColor( 64, 64, 64) ), - 'LabelFill': wxBrush( wxColor(212,208,200), wxSOLID ), - 'LabelSizeCursor': wxStockCursor( wxCURSOR_SIZEWE ), - - 'ArrowBitmap': GetBitmap('Grid_Arrow') - } - EVT_PAINT( self, self.OnPaint ) EVT_SIZE( self, self.OnSize ) ########################################################################################################### def Update(self): self.Table.Update() ########################################################################################################### --- 102,115 ---- EVT_MOTION( self, self.OnMouseMove ) EVT_PAINT( self, self.OnPaint ) EVT_SIZE( self, self.OnSize ) + self.DrawTools['ArrowBitmap'] = GetBitmap('Grid_Arrow') + ########################################################################################################### def Update(self): self.Table.Update() + self.OnSize(None) ########################################################################################################### *************** *** 303,306 **** --- 304,310 ---- if code == WXK_CONTROL: self.Selection['Add'] = true + return + + evt.Skip() ########################################################################################################### *************** *** 311,314 **** --- 315,321 ---- if code == WXK_CONTROL: self.Selection['Add'] = false + return + + evt.Skip() ########################################################################################################### *************** *** 378,381 **** --- 385,392 ---- self.PrepareDC(ondc) ondc.BeginDrawing() + + ondc.SetBackground( self.DrawTools['EmptyBackground'] ) + ondc.Clear() + ondc.Blit(0, 0, w, h, dc, 0, 0 ) |
From: <sir...@us...> - 2003-03-09 12:10:05
|
Update of /cvsroot/btplusplus/BT++/src/DlgPref In directory sc8-pr-cvs1:/tmp/cvs-serv17691/src/DlgPref Modified Files: DlgPref.py Log Message: - Made History working. - Added option for History. - Fixes. Index: DlgPref.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/DlgPref/DlgPref.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DlgPref.py 3 Mar 2003 20:49:37 -0000 1.2 --- DlgPref.py 9 Mar 2003 12:10:02 -0000 1.3 *************** *** 97,148 **** wxStaticBox(self, -1, 'Downloading', wxPoint(5, 5), wxSize(314,82)) ! wxStaticBox(self, -1, 'Transfer Limits', wxPoint(5, 92), wxSize(314,66)) ! wxStaticBox(self, -1, 'Hashing', wxPoint(5,163), wxSize(314,62)) ! self.AutoLoad = PrefCheckBox( self, ! wxPoint(12,22), ! ['Download', 'AutoStart'], ! 'Automatically start new downloads' ) ! self.AutoLoad.SetHelpText("If checked new torrents will start automatically.") ! ! self.AutoPause = PrefCheckBox( self, ! wxPoint(12,42), ! ['Download', 'AutoPause'], ! 'Automatically pause downloads (if current > max)' ) ! self.AutoPause.SetHelpText("If checked new torrents that exceed the number below will be paused.") ! self.MaxSimDown = PrefTextCtrl( self, ! wxPoint(10,60), wxSize(25,20), ! ['Download', 'MaxSimDown'], ! 'Max. simultaneous downloads (1 - 10)', ! validator = ValidatorAlpha(1,10) ) ! self.MaxSimDown.SetHelpText("Maximum number of downloads to preform at the same time.") ! self.MaxDown = PrefTextCtrl( self, ! wxPoint(10,108), wxSize(25,20), ! ['Download', 'MaxSpeedDown'], ! 'Max Download Speed (0 = unlimited)' ) ! self.MaxDown.SetHelpText("Maximum download speed. Setting applies to the total of all torrents. Not yet enabled.") ! self.MaxUp = PrefTextCtrl( self, ! wxPoint(10,132), wxSize(25,20), ! ['Download', 'MaxSpeedUp'], ! 'Max Upload Speed (0 = unlimited)' ) ! self.MaxUp.SetHelpText("Maximum upload speed. Setting applies to the total of all torrents.") ! self.HashBack = PrefCheckBox( self, ! wxPoint(12,180), ! ['Hash', 'Background'], ! 'Use background hashing.' ) ! self.HashBack.SetHelpText("If checked hashing will occur as a background process.") ! self.HasNum = PrefTextCtrl( self, ! wxPoint(10,198), wxSize(25,20), ! ['Hash', 'NumSimHash'], ! 'Max. simultaneous files hashed (1 - 5)', ! validator = ValidatorAlpha(1,10) ) ! self.HasNum.SetHelpText("Maximum number of torrents to hash at the same time.") ! self.MaxDown.Enable(false) class TabAdvanced(wxWindow): --- 97,150 ---- wxStaticBox(self, -1, 'Downloading', wxPoint(5, 5), wxSize(314,82)) ! wxStaticBox(self, -1, 'Uploading', wxPoint(5, 92), wxSize(314,36)) ! wxStaticBox(self, -1, 'Transfer Limits', wxPoint(5,133), wxSize(314,41)) ! wxStaticBox(self, -1, 'Hashing', wxPoint(5,179), wxSize(314,62)) ! # Downloading ! PrefCheckBox( self, ! wxPoint(12,22), ! ['Download', 'AutoStart'], ! 'Automatically start new downloads', ! help = 'If checked new torrents will start automatically.' ) ! PrefCheckBox( self, ! wxPoint(12,42), ! ['Download', 'AutoPause'], ! 'Automatically pause downloads (if current > max)', ! help = 'If checked new torrents that exceed the number below will be paused.' ) ! PrefTextCtrl( self, ! wxPoint(10,60), wxSize(25,20), ! ['Download', 'MaxSimDown'], ! 'Max. simultaneous downloads (1 - 10)', ! validator = ValidatorAlpha(1,10), ! help = 'Maximum number of downloads to preform at the same time.' ) ! # Uploading ! PrefCheckBox( self, ! wxPoint(10,108), ! ['Download', 'KeepUpload'], ! 'Keep uploading after download finishes.' ) ! # Transfer Limits ! PrefTextCtrl( self, ! wxPoint(10,148), wxSize(25,20), ! ['Download', 'MaxSpeedUp'], ! 'Max Upload Speed (0 = unlimited)', ! help = 'Maximum upload speed. Setting applies to the total of all torrents.' ) ! # Hashing ! PrefCheckBox( self, ! wxPoint(12,196), ! ['Hash', 'Background'], ! 'Use background hashing.', ! help = 'If checked hashing will occur as a background process.' ) ! PrefTextCtrl( self, ! wxPoint(10,214), wxSize(25,20), ! ['Hash', 'NumSimHash'], ! 'Max. simultaneous files hashed (1 - 5)', ! validator = ValidatorAlpha(1,10), ! help = 'Maximum number of torrents to hash at the same time.' ) class TabAdvanced(wxWindow): *************** *** 152,174 **** wxStaticBox(self, -1, 'Bind to IP/Ports', wxPoint(5, 5), wxSize(314,92)) ! self.IpAdd = PrefTextCtrl( self, ! wxPoint(10,22), wxSize(95,20), ! ['Bind', 'Ip'], ! 'IP Address' ) ! self.IpAdd.SetHelpText("Manually set an IP Address for BT++ to use.") ! self.MinPort = PrefTextCtrl( self, ! wxPoint(10,46), wxSize(75,20), ! ['Bind', 'PortMin'], ! 'Start port', ! validator = ValidatorAlpha(1025,65536) ) ! self.MinPort.SetHelpText("The lowest port for BT++ to use for transfers. Must be between 1025 and 65536") ! self.MaxPort = PrefTextCtrl( self, ! wxPoint(10,70), wxSize(75,20), ! ['Bind', 'PortMax'], ! 'End port', ! validator = ValidatorAlpha(1025,65536) ) ! self.MaxPort.SetHelpText("The highest port for BT++ to use for transfers. Must be between 1025 and 65536") --- 154,176 ---- wxStaticBox(self, -1, 'Bind to IP/Ports', wxPoint(5, 5), wxSize(314,92)) ! PrefTextCtrl( self, ! wxPoint(10,22), wxSize(95,20), ! ['Bind', 'Ip'], ! 'IP Address', ! help = 'Manually set an IP Address for BT++ to use.' ) ! PrefTextCtrl( self, ! wxPoint(10,46), wxSize(75,20), ! ['Bind', 'PortMin'], ! 'Start port', ! validator = ValidatorAlpha(1025,65536), ! help = 'The lowest port for BT++ to use for transfers. Must be between 1025 and 65536.' ) ! PrefTextCtrl( self, ! wxPoint(10,70), wxSize(75,20), ! ['Bind', 'PortMax'], ! 'End port', ! validator = ValidatorAlpha(1025,65536), ! help = 'The highest port for BT++ to use for transfers. Must be between 1025 and 65536.' ) *************** *** 177,199 **** wxWindow.__init__(self, parent, -1, name = name) ! wxStaticBox(self, -1, 'General', wxPoint(5, 5), wxSize(314,40)) ! wxStaticBox(self, -1, 'Tray Password', wxPoint(5,50), wxSize(314,82)) ! self.ConfirmExit = PrefCheckBox( self, ! wxPoint(12,22), ! ['LookFeel', 'ConfirmExit'], ! 'Ask confirmation when exiting BT++.' ) ! self.ConfirmExit.SetHelpText("If checked the program will prompt you before exiting.") ! self.TPWord = PrefTextCtrl( self, ! wxPoint(11,65), wxSize(75,20), ! ['LookFeel', 'TPWord'], ! 'Tray password (leave empty for none)', ! style = 0, ! help = 'If text is entered here it will act as the password when restoring BT++ from a tray icon.' ) ! self.TPAuto = PrefCheckBox( self, ! wxPoint(12,89), ! ['LookFeel', 'TPAuto'], ! 'Auto lock tray on minimize.', ! 'If checked the tray will be locked (password-protected) as soon as minimized.' ) --- 179,201 ---- wxWindow.__init__(self, parent, -1, name = name) ! wxStaticBox(self, -1, 'General', wxPoint(5, 5), wxSize(314,38)) ! wxStaticBox(self, -1, 'Tray Password', wxPoint(5,48), wxSize(314,62)) ! PrefCheckBox( self, ! wxPoint(12,22), ! ['LookFeel', 'ConfirmExit'], ! 'Ask confirmation when exiting BT++.', ! help = 'If checked the program will prompt you before exiting.' ) ! PrefTextCtrl( self, ! wxPoint(11,65), wxSize(75,20), ! ['LookFeel', 'TPWord'], ! 'Tray password (leave empty for none)', ! style = 0, ! help = 'If text is entered here it will act as the password when restoring BT++ from a tray icon.' ) ! PrefCheckBox( self, ! wxPoint(12,89), ! ['LookFeel', 'TPAuto'], ! 'Auto lock tray on minimize.', ! 'If checked the tray will be locked (password-protected) as soon as minimized.' ) |
From: <sir...@us...> - 2003-03-09 12:10:05
|
Update of /cvsroot/btplusplus/BT++/src/TabHistory In directory sc8-pr-cvs1:/tmp/cvs-serv17691/src/TabHistory Modified Files: TabHistory.py Added Files: HistLoaderManager.py Grid.py Log Message: - Made History working. - Added option for History. - Fixes. --- NEW FILE: HistLoaderManager.py --- from wxPython.wx import * from os import listdir, path from Loader import Loader from LoaderManager import LoaderManager from ConfigFile import Config class HistLoaderManager(LoaderManager): Loaders = [] Log = None Refresh = None Finish = None UpMeasure = None DirTorrent = '' DirTemp = '' DirFilFinish = '' DirTorFinish = '' def Update(self): self.UpdateList() def UpdateList(self): # UPDATE TORRENT LIST tors = listdir( self.DirTorrent ) if len(tors) == 0: return for tor in tors: con = false for loader in self.Loaders: if loader.Config['Tor'] == tor: con = true if con == true: continue self.CreateNewLoader(tor) def CreateNewLoader(self, torrent): l = LoaderManager.CreateNewLoader(self, torrent) if not path.exists( l.Config['Filename'] ): self.Loaders.remove(l) else: return l ManagerUp = HistLoaderManager( [ Config.Get('Paths', 'History'), Config.Get('Paths', 'Incoming'), '', '' ] ) --- NEW FILE: Grid.py --- from wxPython.wx import * from TabLog.LogWindow import Log from ConfigFile import Config from TimedUpdate import TimedUpdate from Images import GetBitmap import TabTrans.Renderer import TabTrans.Grid import TabTrans.GridTable from HistLoaderManager import ManagerUp class HistGrid(TabTrans.Grid.Grid): def __init__(self, parent): wxScrolledWindow.__init__(self, parent, -1, wxPoint(0,0), wxSize(786,335), style = wxSIMPLE_BORDER | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE) self.Table = HistGridTable(self) self.SetBackgroundColour(wxColour(255,255,255)) for col in range(self.Table.GetNumberCols()): size = Config.Get('GUI', 'HistCol%i' % col) self.Table.SetColSize(col, size) self.SetScrollRate( 5, 5 ) self.Updater = TimedUpdate( 10.0, self.Update ) self.Updater.Start() # Menu creation self.Menu = wxMenu('') self.itemCancel = wxMenuItem( self.Menu, 1, 'Cancel' ) self.itemResume = wxMenuItem( self.Menu, 2, 'Resume' ) self.itemPause = wxMenuItem( self.Menu, 3, 'Pause' ) self.itemUp = wxMenuItem( self.Menu, 4, 'Move Up' ) self.itemDown = wxMenuItem( self.Menu, 5, 'Move Down' ) self.itemCancel.SetBitmap( GetBitmap('Menu_Cancel') ) self.itemResume.SetBitmap( GetBitmap('Menu_Resume') ) self.itemPause .SetBitmap( GetBitmap('Menu_Pause') ) self.Menu.AppendItem( self.itemCancel ) self.Menu.AppendSeparator() self.Menu.AppendItem( self.itemResume ) self.Menu.AppendItem( self.itemPause ) EVT_MENU( self, self.itemCancel.GetId(), self.Menu_Cancel ) EVT_MENU( self, self.itemResume.GetId(), self.Menu_Resume ) EVT_MENU( self, self.itemPause.GetId(), self.Menu_Pause ) EVT_KEY_DOWN( self, self.OnKeyDown ) EVT_KEY_UP( self, self.OnKeyUp ) EVT_LEFT_DOWN( self, self.OnMouseLeftDown ) EVT_LEFT_UP( self, self.OnMouseLeftUp ) EVT_RIGHT_DOWN( self, self.OnMouseRightDown ) EVT_MOTION( self, self.OnMouseMove ) EVT_PAINT( self, self.OnPaint ) EVT_SIZE( self, self.OnSize ) self.DrawTools['ArrowBitmap'] = GetBitmap('Grid_Arrow') def Destroy(self, evt = wxCloseEvent()): for col in range(self.Table.GetNumberCols()): Config.Set('GUI', 'HistCol%i' % col, self.Table.GetColSize(col)) Config.Save() self.Table.Destroy() self.Updater.Shutdown() wxScrolledWindow.Destroy(self) ########################################################################################################### ########################################################################################################### class HistGridTable(TabTrans.GridTable.GridTable): Renderers = { 'Default': TabTrans.Renderer.Default(), 'Rows': {}, 'Cols': {} } def __init__(self, grid): self.Grid = grid self.Manager = ManagerUp self.Manager.Refresh = self.Refresh self.Manager.Log = Log def GetNumberCols(self): return 5 def GetColLabelValue(self, col): if col == 0: return 'Filename' if col == 1: return 'Size' if col == 2: return 'Transfered' if col == 3: return 'Speed' if col == 4: return 'Status' def GetValue(self, row, col): def info(name): return self.Manager.GetInfo(row, name) if col == 0: return info('File') if col == 1: return '%.2f MB' % (info('Size') / 1024 / 1024) if col == 2: if info('FractionDone') == -1.0 or \ info('Status') == 'Hashing': return '?' else: return '%.2f MB' % (info('FractionDone') * info('Size') / 1024 / 1024) if col == 3: return '%.1f' % info('SpeedUp') if col == 4: return info('Status') Index: TabHistory.py =================================================================== RCS file: /cvsroot/btplusplus/BT++/src/TabHistory/TabHistory.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TabHistory.py 2 Mar 2003 16:39:38 -0000 1.1 --- TabHistory.py 9 Mar 2003 12:10:02 -0000 1.2 *************** *** 1,5 **** ! from wxPython.wx import * ! from TabTrans.Grid import Grid ! from TabTrans.GridTable import GridTable ########################################################################################################### --- 1,4 ---- ! from wxPython.wx import * ! from Grid import HistGrid ########################################################################################################### *************** *** 11,19 **** def __init__(self, parent): ! wxPanel.__init__(self, parent, -1, wxPoint(0,65), wxSize(786,347)) ! #self.Grid = Grid( self ) sizer = wxBoxSizer(wxHORIZONTAL) ! #sizer.Add( self.Grid, 1, wxEXPAND | wxALL, 3) self.SetSizer(sizer) --- 10,18 ---- def __init__(self, parent): ! wxPanel.__init__(self, parent, -1, wxPoint(0,65), wxSize(786,347), style = 0) ! self.Grid = HistGrid( self ) sizer = wxBoxSizer(wxHORIZONTAL) ! sizer.Add( self.Grid, 1, wxEXPAND | wxALL, 3) self.SetSizer(sizer) *************** *** 22,25 **** def Destroy(self, evt = wxCloseEvent()): ! #self.Grid.Destroy() wxPanel.Destroy(self) --- 21,24 ---- def Destroy(self, evt = wxCloseEvent()): ! self.Grid.Destroy() wxPanel.Destroy(self) |
From: <sir...@us...> - 2003-03-09 11:51:37
|
Update of /cvsroot/btplusplus/BT++/dist In directory sc8-pr-cvs1:/tmp/cvs-serv13028/dist Modified Files: BT++.nsi Log Message: 0.5.0 Index: BT++.nsi =================================================================== RCS file: /cvsroot/btplusplus/BT++/dist/BT++.nsi,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** BT++.nsi 14 Feb 2003 21:43:56 -0000 1.7 --- BT++.nsi 9 Mar 2003 11:51:34 -0000 1.8 *************** *** 1,4 **** !define MUI_PRODUCT "BitTorrent++" ! !define MUI_VERSION "0.4.0" !include "${NSISDIR}\Contrib\Modern UI\System.nsh" --- 1,4 ---- !define MUI_PRODUCT "BitTorrent++" ! !define MUI_VERSION "0.5.0" !include "${NSISDIR}\Contrib\Modern UI\System.nsh" *************** *** 37,51 **** Section "" SecCopyUI SetOutPath "$INSTDIR" ! File "BT++\_socket.pyd" ! File "BT++\_sre.pyd" ! File "BT++\_winreg.pyd" ! File "BT++\BT++.exe" ! File "BT++\gridc.pyd" ! File "BT++\helpc.pyd" ! File "BT++\IconTray.ico" ! File "BT++\python22.dll" ! File "BT++\select.pyd" ! File "BT++\wxc.pyd" ! File "BT++\wxmsw240h.dll" File "README.txt" File "LICENSE.rtf" --- 37,50 ---- Section "" SecCopyUI SetOutPath "$INSTDIR" ! File "..\build\BT++\_socket.pyd" ! File "..\build\BT++\_sre.pyd" ! File "..\build\BT++\_winreg.pyd" ! File "..\build\BT++\BT++.exe" ! File "..\build\BT++\helpc.pyd" ! File "..\build\BT++\python22.dll" ! File "..\build\BT++\select.pyd" ! File "..\build\BT++\wxc.pyd" ! File "..\build\BT++\wxmsw240h.dll" ! File "..\build\BT++\zlib.pyd" File "README.txt" File "LICENSE.rtf" *************** *** 103,112 **** Delete "$INSTDIR\_winreg.pyd" Delete "$INSTDIR\BT++.exe" - Delete "$INSTDIR\gridc.pyd" - Delete "$INSTDIR\IconTray.ico" Delete "$INSTDIR\python22.dll" Delete "$INSTDIR\select.pyd" Delete "$INSTDIR\wxc.pyd" Delete "$INSTDIR\wxmsw240h.dll" Delete "$INSTDIR\README.txt" Delete "$INSTDIR\LICENSE.rtf" --- 102,110 ---- Delete "$INSTDIR\_winreg.pyd" Delete "$INSTDIR\BT++.exe" Delete "$INSTDIR\python22.dll" Delete "$INSTDIR\select.pyd" Delete "$INSTDIR\wxc.pyd" Delete "$INSTDIR\wxmsw240h.dll" + Delete "$INSTDIR\zlib.pyd" Delete "$INSTDIR\README.txt" Delete "$INSTDIR\LICENSE.rtf" |