Browse Source

Merge revisions 3382-3387 from 0.5.x to trunk.

tags/0.6.0
shypike 15 years ago
parent
commit
6012061228
  1. 2
      main/CHANGELOG.txt
  2. 4
      main/ISSUES.txt
  3. 32
      main/language/email-fr-fr.tmpl
  4. 3
      main/sabnzbd/cfg.py
  5. 9
      main/sabnzbd/config.py
  6. 2
      main/sabnzbd/misc.py
  7. 9
      main/sabnzbd/nzbstuff.py
  8. 2
      main/sabnzbd/tvsort.py

2
main/CHANGELOG.txt

@ -1,6 +1,8 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
0.5.1 RC1 by The SABnzbd-Team 0.5.1 RC1 by The SABnzbd-Team
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
- Add 'size_limit' option. Any job bigger than this limit will be set to
low priority and be paused.
- TV Season sort now has "affected categories" too. Check your settings!! - TV Season sort now has "affected categories" too. Check your settings!!
- Fixed problems that could lead to an infinite unpacking loop - Fixed problems that could lead to an infinite unpacking loop
(when using a "sick" NZB and using +U instead of +D postprocessing) (when using a "sick" NZB and using +U instead of +D postprocessing)

4
main/ISSUES.txt

@ -2,6 +2,10 @@
*** Known issues *** *** Known issues ***
******************************************* *******************************************
- To prevent unexpectedly large NZBs from eating your quotum you can set
the option 'size_limit' in the INI file.
Any NZB larger than this size will be set to paused and get a low priority.
- When par2 or unrar hang up, never just stop SABnzbd. - When par2 or unrar hang up, never just stop SABnzbd.
Instead use your operating system's task manager to stop the par2 or unrar program. Instead use your operating system's task manager to stop the par2 or unrar program.
Forcing SABnzbd to quit may damage your queues. Forcing SABnzbd to quit may damage your queues.

32
main/language/email-fr-fr.tmpl

@ -1,41 +1,41 @@
## ##
## Default Email template for SABnzbd ## Template Email pour SABnzbd
## This a Cheetah template ## Ceci est un template Cheetah
## Documentation: http://sabnzbd.wikidot.com/email-templates ## Documentation: http://sabnzbd.wikidot.com/email-templates
## ##
## Newlines and whitespace are significant! ## Les retours à la ligne et les espaces sont importants !
## ##
## These are the email headers ## Entêtes de l'email
to: $to to: $to
from: $from from: $from
date: $date date: $date
subject: SABnzbd has <!--#if $status then "completed" else "failed" #--> job $name subject: SABnzbd <!--#if $status then "Succès" else "Echec" #--> du téléchargement $name
X-priority: 5 X-priority: 5
X-MS-priority: 5 X-MS-priority: 5
## After this comes the body, the empty line is required! ## Le contenu du message, la ligne vide est obligatoire !
Hi, Bonjour,
<!--#if $status #--> <!--#if $status #-->
SABnzbd has downloaded "$name" <!--#if $msgid=="" then "" else "(newzbin #" + $msgid + ")"#--> SABnzbd a téléchargé avec succès "$name" <!--#if $msgid=="" then "" else "(newzbin #" + $msgid + ")"#-->
<!--#else#--> <!--#else#-->
SABnzbd has failed to download "$name" <!--#if $msgid=="" then "" else "(newzbin #" + $msgid + ")"#--> SABnzbd a téléchargé sans succès "$name" <!--#if $msgid=="" then "" else "(newzbin #" + $msgid + ")"#-->
<!--#end if#--> <!--#end if#-->
Finished at $end_time Terminé à $end_time
Downloaded $size Téléchargé $size
Results of the job: Résultat du téléchargement :
<!--#for $stage in $stages #--> <!--#for $stage in $stages #-->
Stage $stage <!--#slurp#--> Etape $stage <!--#slurp#-->
<!--#for $result in $stages[$stage]#--> <!--#for $result in $stages[$stage]#-->
$result <!--#slurp#--> $result <!--#slurp#-->
<!--#end for#--> <!--#end for#-->
<!--#end for#--> <!--#end for#-->
<!--#if $script!="" #--> <!--#if $script!="" #-->
Output from user script "$script" (Exit code = $script_ret): Sortie du script utilisateur "$script" (Code Retour = $script_ret):
$script_output $script_output
<!--#end if#--> <!--#end if#-->
<!--#if $status #--> <!--#if $status #-->
Enjoy! A bientôt !
<!--#else#--> <!--#else#-->
Sorry! Désolé !
<!--#end if#--> <!--#end if#-->

3
main/sabnzbd/cfg.py

@ -119,7 +119,7 @@ schedules = OptionList('misc', 'schedlines')
enable_tv_sorting = OptionBool('misc', 'enable_tv_sorting', False) enable_tv_sorting = OptionBool('misc', 'enable_tv_sorting', False)
tv_sort_string = OptionStr('misc', 'tv_sort_string') tv_sort_string = OptionStr('misc', 'tv_sort_string')
tv_sort_countries = OptionNumber('misc', 'tv_sort_countries', 1) tv_sort_countries = OptionNumber('misc', 'tv_sort_countries', 1)
tv_categories = OptionList('misc', 'tv_categories', ['tv']) tv_categories = OptionList('misc', 'tv_categories', '')
enable_movie_sorting = OptionBool('misc', 'enable_movie_sorting', False) enable_movie_sorting = OptionBool('misc', 'enable_movie_sorting', False)
movie_sort_string = OptionStr('misc', 'movie_sort_string') movie_sort_string = OptionStr('misc', 'movie_sort_string')
@ -147,6 +147,7 @@ admin_dir = OptionDir('misc', 'admin_dir', 'admin', validation=validate_safedir)
#log_dir = OptionDir('misc', 'log_dir', 'logs') #log_dir = OptionDir('misc', 'log_dir', 'logs')
dirscan_dir = OptionDir('misc', 'dirscan_dir', create=False) dirscan_dir = OptionDir('misc', 'dirscan_dir', create=False)
dirscan_speed = OptionNumber('misc', 'dirscan_speed', DEF_SCANRATE, 1, 3600) dirscan_speed = OptionNumber('misc', 'dirscan_speed', DEF_SCANRATE, 1, 3600)
SIZE_LIMIT = OptionStr('misc', 'size_limit')
cherryhost = OptionStr('misc','host', DEF_HOST) cherryhost = OptionStr('misc','host', DEF_HOST)
if sabnzbd.WIN32: if sabnzbd.WIN32:

9
main/sabnzbd/config.py

@ -213,10 +213,15 @@ class OptionList(Option):
Option.__init__(self, section, keyword, default_val, add=add) Option.__init__(self, section, keyword, default_val, add=add)
def set(self, value): def set(self, value):
""" Set value, convert single item to list of one """ """ Set value, convert single item to list of one
Empty string will be an empty list.
"""
if value != None: if value != None:
if type(value) != type([]): if type(value) != type([]):
value = [ value ] if value == '':
value = []
else:
value = [ value ]
return self._Option__set(value) return self._Option__set(value)
return None return None

2
main/sabnzbd/misc.py

@ -45,7 +45,7 @@ if sabnzbd.FOUNDATION:
import Foundation import Foundation
RE_VERSION = re.compile('(\d+)\.(\d+)\.(\d+)([a-zA-Z]*)(\d*)') RE_VERSION = re.compile('(\d+)\.(\d+)\.(\d+)([a-zA-Z]*)(\d*)')
RE_UNITS = re.compile('(\d+\.*\d*)\s*([KMGTP]*)', re.I) RE_UNITS = re.compile('(\d+\.*\d*)\s*([KMGTP]{0,1})', re.I)
TAB_UNITS = ('', 'K', 'M', 'G', 'T', 'P') TAB_UNITS = ('', 'K', 'M', 'G', 'T', 'P')
PANIC_NONE = 0 PANIC_NONE = 0

9
main/sabnzbd/nzbstuff.py

@ -23,7 +23,6 @@ import os
import time import time
import re import re
import logging import logging
import sabnzbd
import datetime import datetime
import xml.sax import xml.sax
import xml.sax.handler import xml.sax.handler
@ -594,6 +593,14 @@ class NzbObject(TryList):
# Set nzo save-delay to 6 sec per GB with a max of 5 min # Set nzo save-delay to 6 sec per GB with a max of 5 min
self.extra4 = min(6.0 * float(self.__bytes) / GIGI, 300.0) self.extra4 = min(6.0 * float(self.__bytes) / GIGI, 300.0)
# Pause job when above size limit
limit = cfg.SIZE_LIMIT.get_int()
if limit and self.__bytes > limit:
logging.info('Job too large, forcing low prio and paused (%s)', self.__dirname)
self.pause_nzo()
self.set_priority(LOW_PRIORITY)
## begin nzo.Mutators ##################################################### ## begin nzo.Mutators #####################################################
## excluding nzo.__try_list ############################################### ## excluding nzo.__try_list ###############################################
def check_for_dupe(self, nzf): def check_for_dupe(self, nzf):

2
main/sabnzbd/tvsort.py

@ -169,7 +169,7 @@ class SeriesSorter:
def match(self): def match(self):
''' Checks the regex for a match, if so set self.match to true ''' ''' Checks the regex for a match, if so set self.match to true '''
if cfg.enable_tv_sorting() and cfg.tv_sort_string(): if cfg.enable_tv_sorting() and cfg.tv_sort_string():
if (self.cat and self.cat.lower() in self.cats) or (not self.cat and 'None' in self.cats): if (not self.cats) or (self.cat and self.cat.lower() in self.cats) or (not self.cat and 'None' in self.cats):
#First check if the show matches TV episode regular expressions. Returns regex match object #First check if the show matches TV episode regular expressions. Returns regex match object
self.match_obj, self.extras = check_regexs(self.original_dirname, series_match, double=True) self.match_obj, self.extras = check_regexs(self.original_dirname, series_match, double=True)
if self.match_obj: if self.match_obj:

Loading…
Cancel
Save