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
! },
}
|