Initial torrent support

Transmission downloader
Code cleanup
This commit is contained in:
Ruud
2012-02-17 11:15:51 +01:00
parent 02fab2d04d
commit c7507e14ed
19 changed files with 794 additions and 197 deletions
+8
View File
@@ -23,4 +23,12 @@ class Score(Plugin):
score += sizeScore(nzb['size'])
# Torrents only
if nzb.get('seeds'):
try:
score += nzb.get('seeds') / 5
score += nzb.get('leechers') / 10
except:
pass
return score
@@ -28,7 +28,7 @@ config = [{
{
'name': 'ignored_words',
'label': 'Ignored words',
'default': 'german, dutch, french, danish, swedish, dubbed, swesub, korsub',
'default': 'german, dutch, french, danish, swedish, spanish, italian, korean, dubbed, swesub, korsub',
},
],
}, {
+1 -1
View File
@@ -161,7 +161,7 @@ class Searcher(Plugin):
single_category = kwargs.get('single_category', False)
retention = Env.setting('retention', section = 'nzb')
if retention < nzb.get('age', 0):
if nzb.get('seeds') is None and retention < nzb.get('age', 0):
log.info('Wrong: Outside retention, age is %s, needs %s or lower: %s' % (nzb['age'], retention, nzb['name']))
return False