Compare commits

..

11 Commits

12 changed files with 168 additions and 85 deletions

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------------------
0.7.2Final by The SABnzbd-Team
-------------------------------------------------------------------------------
- Fix for NZB-icon issue when 0.7.0 was previously installed
- Check validity of totals9.sab file
- Fix startup problem when localhost has unexpected order of IP addresses
-------------------------------------------------------------------------------
0.7.2RC2 by The SABnzbd-Team
-------------------------------------------------------------------------------
- Improve support for nzbsrus.com
- Don't try to show NZB age when not known yet
- Prevent systems with unresolvable hostnames from always using 0.0.0.0
-------------------------------------------------------------------------------
0.7.2RC1 by The SABnzbd-Team
-------------------------------------------------------------------------------

View File

@@ -1,7 +1,7 @@
Metadata-Version: 1.0
Name: SABnzbd
Version: 0.7.2RC1
Summary: SABnzbd-0.7.2RC1
Version: 0.7.2
Summary: SABnzbd-0.7.2
Home-page: http://sourceforge.net/projects/sabnzbdplus
Author: The SABnzbd Team
Author-email: team@sabnzbd.org

View File

@@ -4,23 +4,48 @@
\paperw11900\paperh16840\vieww16360\viewh15680\viewkind0
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
\f0\b\fs48 \cf0 SABnzbd 0.7.2RC1\
\f0\b\fs48 \cf0 SABnzbd 0.7.2\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
\b0\fs26 \cf0 \
\b Fixes in 0.7.2RC1
\b Fixes in 0.7.2
\b0 \
- Fix fatal error in nzbsrus.com support\
- Improve support for nzbsrus.com\
- Don't try to show NZB age when not known yet\
- Prevent systems with unresolvable hostnames from always using 0.0.0.0\
- Initial "quota left" was not set correctly when enabling quota\
- Report incorrect RSS filter expressions (instead of aborting analysis)\
- Improve detection of invalid articles (so that backup server will be tried)\
- Windows installer: improve NZB association so that a reboot isn't needed\
- Windows installer: don't remove settimngs by default when uninstalling\
- Windows installer: don't remove settings by default when uninstalling\
- Fix sorting of rar files in job so that .rar preceeds .r00\
- Fix for NZB-icon issue when 0.7.0 was previously installed\
- Fix startup problem on Windows when IPv4 has precedence over IPv6\
\
\b What's new
\b Fixes in 0.7.1
\b0 \
- Fixed problem were fetching par2 files after first verification could stall in the queue\
- Fixed retry behaviour of NZB fetching from URL (with handling of nzbsrus.com error codes)\
- Verification/repair would not be executed properly when one more RAR files missed their first article.\
- Improved backup of sabnzbd.ini file, now uses backup when original is gone or corrupt\
- Several translations extended/improved\
- Plush skin: fix problems with pull-down menus in Mobile Safari\
- On some Linux and OSX systems using localhost would still make SABnzbd give access to other computers\
- Windows: the installer did not set an icon when associating NZB files with SABnzbd\
- Fix problem that the Opera browser had with Config->Servers\
- Retry a few times when accessing a mounted drive to create the final destination folder\
- Minor fixes in Window Tray icon and OSX top menu\
- Add no_ipv6 special for systems that keep having issues with [::1]\
- Fix crash in QuickCheck when expected par2 file wasn't downloaded\
- API calls "addurl" and "addid" (newzbin) can now be used interchangeably\
- Fix endless par2-fetch loop after retrying failed job\
- Don't send "bad fetch" email when emailing is off\
- Add some support for nzbrus.com's non-VIP limiting\
- Fix signing of OSX DMG\
\
\b What's new in 0.7.0
\b0 \
- Download quota management\
- Windows: simple system tray menu\

View File

@@ -1,14 +1,40 @@
Release Notes - SABnzbd 0.7.2RC1
==================================
Release Notes - SABnzbd 0.7.2
===============================
## Fixes in 0.7.2RC1
- Fix fatal error in nzbsrus.com support
## Fixes in 0.7.2
- Improve support for nzbsrus.com
- Don't try to show NZB age when not known yet
- Prevent systems with unresolvable hostnames from always using 0.0.0.0
- Initial "quota left" was not set correctly when enabling quota
- Report incorrect RSS filter expressions (instead of aborting analysis)
- Improve detection of invalid articles (so that backup server will be tried)
- Windows installer: improve NZB association so that a reboot isn't needed
- Windows installer: don't remove settimngs by default when uninstalling
- Windows installer: don't remove settings by default when uninstalling
- Fix sorting of rar files in job so that .rar preceeds .r00
- Fix for NZB-icon issue when 0.7.0 was previously installed
- Fix startup problem on Windows when IPv4 has precedence over IPv6
## Fixes in 0.7.1
- Fixed problem were fetching par2 files after first verification could stall in the queue
- Fixed retry behaviour of NZB fetching from URL (with handling of nzbsrus.com error codes)
- Verification/repair would not be executed properly when one more RAR files
missed their first article.
- Improved backup of sabnzbd.ini file, now uses backup when original is gone or corrupt
- Several translations extended/improved
- Plush skin: fix problems with pull-down menus in Mobile Safari
- On some Linux and OSX systems using localhost would still make SABnzbd
give access to other computers
- Windows: the installer did not set an icon when associating NZB files with SABnzbd
- Fix problem that the Opera browser had with Config->Servers
- Retry a few times when accessing a mounted drive to create the
final destination folder
- Minor fixes in Window Tray icon and OSX top menu
- Add no_ipv6 special for systems that keep having issues with [::1]
- Fix crash in QuickCheck when expected par2 file wasn't downloaded
- API calls "addurl" and "addid" (newzbin) can now be used interchangeably
- Fix endless par2-fetch loop after retrying failed job
- Don't send "bad fetch" email when emailing is off
- Add some support for nzbrus.com's non-VIP limiting
- Fix signing of OSX DMG
## What's new in 0.7.0

View File

@@ -525,30 +525,24 @@ def all_localhosts():
return ips
def ipv_localhost(v):
""" Return True if localhost resolves to some IPV4 ('4') or IPV6 ('6') address
def check_resolve(host):
""" Return True if 'host' resolves
"""
try:
info = socket.getaddrinfo('localhost', None)
info = socket.getaddrinfo(host, None)
except:
# localhost does not resolve
# Does not resolve
return False
for item in info:
item = item[4][0]
if v == '4' and ':' not in item:
return True
elif v == '6' and ':' in item:
return True
return False
return True
#------------------------------------------------------------------------------
def get_webhost(cherryhost, cherryport, https_port):
""" Determine the webhost address and port,
return (host, port, browserhost)
"""
if cherryhost == '0.0.0.0' and not ipv_localhost('4'):
if cherryhost == '0.0.0.0' and not check_resolve('127.0.0.1'):
cherryhost = ''
elif cherryhost == '::' and not ipv_localhost('6'):
elif cherryhost == '::' and not check_resolve('::1'):
cherryhost = ''
if cherryhost is None:
@@ -563,14 +557,18 @@ def get_webhost(cherryhost, cherryport, https_port):
try:
info = socket.getaddrinfo(socket.gethostname(), None)
except:
# Hostname does not resolve, use 0.0.0.0
if cherryhost not in ('localhost', '127.0.0.1', '::1'):
cherryhost = '0.0.0.0'
# Hostname does not resolve
try:
info = socket.getaddrinfo(localhost, None)
# Valid user defined name?
info = socket.getaddrinfo(cherryhost, None)
except:
info = socket.getaddrinfo('127.0.0.1', None)
localhost = '127.0.0.1'
if cherryhost not in ('localhost', '127.0.0.1', '::1'):
cherryhost = '0.0.0.0'
try:
info = socket.getaddrinfo(localhost, None)
except:
info = socket.getaddrinfo('127.0.0.1', None)
localhost = '127.0.0.1'
for item in info:
ip = str(item[4][0])
if ip.startswith('169.254.'):
@@ -1372,8 +1370,8 @@ def main():
hosts[1] = '::1'
# The Windows binary requires numeric localhost as primary address
if multilocal and cherryhost == 'localhost' and hosts[1] == '127.0.0.1':
cherryhost = '::1'
if multilocal and cherryhost == 'localhost':
cherryhost = hosts[0]
if enable_https:
if https_port:
@@ -1817,4 +1815,4 @@ if __name__ == '__main__':
main()
else:
main()
main()

View File

@@ -8,9 +8,8 @@
<br/>
<div id="tips" class="hidden">
$T('wizard-tip1') <span class="bold">$T('wizard-tip2')</span><br/>
<!--#if len($urls) > 1#--><!--#set $s = 's'#--><!--#else#--><!--#set $s = ''#--><!--#end if#-->
<!--#set $tip3 = $T('wizard-tip3') % $s#-->
$tip3:<br/><br/>
<!--#set $tip3 = $T('wizard-tip3') % ''#-->
$tip3<br/><br/>
<div class="quoteBlock">
<!--#set $i = 0#-->
<!--#for $url in $urls#-->

View File

@@ -578,6 +578,9 @@ elif target in ('binary', 'installer'):
# Curl for Python 2.5
os.system(r'unzip -o win\curl\curl.zip -d dist\lib')
############################
# Fix icon issue with NZB association
os.system(r'copy dist\icons\nzb.ico dist')
############################
if target == 'installer':

View File

@@ -1138,7 +1138,11 @@ def build_queue(web_dir=None, root=None, verbose=False, prim=True, webdir='', ve
datestart = datetime.datetime.now()
slot['eta'] = 'unknown'
slot['avg_age'] = calc_age(average_date, bool(trans))
if status == Status.GRABBING:
slot['avg_age'] = '---'
else:
slot['avg_age'] = calc_age(average_date, bool(trans))
slot['verbosity'] = ""
if web_dir:
finished = []

View File

@@ -136,8 +136,21 @@ class BPSMeter(object):
sabnzbd.save_admin(data, BYTES_FILE_NAME)
def defaults(self):
""" Get the latest data from the database and assign to a fake server
"""
logging.debug('Setting default BPS meter values')
grand, month, week = sabnzbd.proxy_get_history_size()
if grand: self.grand_total['x'] = grand
if month: self.month_total['x'] = month
if week: self.week_total['x'] = week
self.quota = self.left = cfg.quota_size.get_float()
def read(self):
""" Read admin from disk """
""" Read admin from disk, return True when pause is needed
"""
res = False
quota = self.left = cfg.quota_size.get_float() # Quota for this period
self.have_quota = bool(cfg.quota_size())
data = sabnzbd.load_admin(BYTES_FILE_NAME)
@@ -155,16 +168,14 @@ class BPSMeter(object):
self.quota = self.left = cfg.quota_size.get_float()
res = self.reset_quota()
except:
# Get the latest data from the database and assign to a fake server
logging.debug('Setting default BPS meter values')
grand, month, week = sabnzbd.proxy_get_history_size()
if grand: self.grand_total['x'] = grand
if month: self.month_total['x'] = month
if week: self.week_total['x'] = week
self.quota = self.left = cfg.quota_size.get_float()
res = False
# Force update of counters
self.update()
self.defaults()
# Force update of counters and validate data
try:
for server in self.grand_total:
self.update(server)
except TypeError:
self.defaults()
self.update()
return res

View File

@@ -91,7 +91,7 @@ class Decoder(Thread):
if lines:
logme = None
try:
if nzo.precheck and '223' in lines[0]:
if nzo.precheck:
raise BadYenc
register = True
logging.debug("Decoding %s", article)
@@ -123,17 +123,26 @@ class Decoder(Thread):
logme = None
except BadYenc:
# Handles precheck and badly formed articles
killed = False
for line in lines:
if match_str(line.lower(), ('dmca', 'removed', 'cancel')):
logging.info('Article removed from server (%s)', article)
killed = True
break
if not killed and nzo.precheck:
found = False
if nzo.precheck and lines and lines[0].startswith('223 '):
# STAT was used, so we only get a status code
found = True
else:
# Examine headers (for precheck) or body (for download)
# And look for DMCA clues (while skipping "X-" headers)
for line in lines:
if not line.startswith('X-') and match_str(line.lower(), ('dmca', 'removed', 'cancel')):
logging.info('Article removed from server (%s)', article)
killed = True
break
if nzo.precheck:
if found or not killed:
# Pre-check, proper article found, just register
logging.debug('Server has article %s', article)
register = True
found = True
if not killed and not found:
elif not killed and not found:
logme = Ta('Badly formed yEnc article in %s') % article
logging.info(logme)

View File

@@ -310,7 +310,7 @@ class NewsWrapper(object):
def body(self, precheck):
self.timeout = time.time() + self.server.timeout
if precheck:
command = 'HEAD <%s>\r\n' % (self.article.article)
command = 'STAT <%s>\r\n' % (self.article.article)
elif self.server.oddball:
command = 'ARTICLE <%s>\r\n' % (self.article.article)
else:

View File

@@ -49,7 +49,6 @@ class URLGrabber(Thread):
def __init__(self):
Thread.__init__(self)
now = time.time()
self.queue = Queue.Queue()
for tup in NzbQueue.do.get_urls():
url, nzo = tup
@@ -115,7 +114,10 @@ class URLGrabber(Thread):
logging.info('Removing nzbmatrix bookmark %s', matrix_id)
else:
logging.info('Grabbing URL %s', url)
opener = urllib.FancyURLopener({})
if '.nzbsrus.' in url:
opener = urllib.URLopener({})
else:
opener = urllib.FancyURLopener({})
opener.prompt_user_passwd = None
opener.addheaders = []
opener.addheader('User-Agent', 'SABnzbd+/%s' % sabnzbd.version.__version__)
@@ -314,6 +316,14 @@ def _analyse_matrix(fn, matrix_id):
return fn, msg, False, 0
RUS_FATAL = ('DENIED_MISSING_CREDENTIALS', 'DENIED_NO_ACCOUNT',
'DENIED_INVALID_CREDENTIALS', 'INCORRECT_URL',
'NZB_DELETED', 'POST_NUKED', 'FILE_UNAVAILABLE'
)
RUS_15M = ('SQL_ERROR', 'SERVICE_OFFLINE')
RUS_60M = ('MAX_DOWNLOAD_REACHED_UPGRADE_TO_VIP', 'MAX_DOWNLOAD_REACHED')
def _analyse_others(fn, url):
""" Analyse respons of indexer
returns fn|None, error-message|None, retry, wait-seconds
@@ -337,30 +347,16 @@ def _analyse_others(fn, url):
return None, msg, True, 60
if '.nzbsrus.' in url:
# Provisional support for nzbsrus.com's lack of an API
# Trying to make sense of their response
# Their non-VIP limiting is particularly weak
f = open(fn, 'r')
data = f.read(10000)
f.close()
ldata = data[:500].lower()
if misc.match_str(ldata[:50], ('invalid link', 'nuked', 'deleted')):
# Partial support for nzbsrus.com's API
if misc.match_str(data, RUS_FATAL):
logging.debug('nzbsrus says: %s, abort', data)
return None, data, False, 0
if 'temporarily' in ldata[:50]:
logging.debug('nzbsrus says: %s, retry', data)
return None, data, True, 600
if '<nzb' not in ldata:
if 'Upgrade To ViP' in data:
logging.debug('nzbsrus says: upgrade to VIP, retry after an hour')
return None, 'upgrade to VIP', True, 3600
if 'Maintenance' in data:
logging.debug('nzbsrus says: Maintenance, retry after an hour')
return None, 'Maintenance', True, 3600
if '<!doctype' in ldata:
msg = Ta('Invalid URL for nzbsrus')
logging.debug(msg)
return None, msg, False, 0
if misc.match_str(data, RUS_15M):
logging.debug('nzbsrus says: %s, wait 15m', data)
return None, data, True, 900
if misc.match_str(data, RUS_60M):
logging.debug('nzbsrus says: %s, wait 60m', data)
return None, data, True, 3600
return fn, msg, False, 0