Browse Source

Make newzbin fetch queue more robust.

pull/25/head
shypike 13 years ago
parent
commit
9fb74616e8
  1. 1
      sabnzbd/growler.py
  2. 5
      sabnzbd/misc.py
  3. 4
      sabnzbd/newzbin.py

1
sabnzbd/growler.py

@ -175,6 +175,7 @@ def send_growl(title , msg, gtype):
if _GROWL:
assert isinstance(_GROWL, GrowlNotifier)
_GROWL_REG = True
if not isinstance(msg, str): msg = str(msg)
logging.debug('Send to Growl: %s %s %s', gtype, latin1(title), latin1(msg))
try:
ret = _GROWL.notify(

5
sabnzbd/misc.py

@ -875,7 +875,10 @@ def bad_fetch(nzo, url, msg='', retry=False, content=False):
retry : make retry link in histort
content : report in history that cause is a bad NZB file
"""
msg = unicoder(msg)
if msg:
msg = unicoder(msg)
else:
msg = ''
pp = nzo.pp
if pp is None:

4
sabnzbd/newzbin.py

@ -134,7 +134,7 @@ class MSGIDGrabber(Thread):
else:
# Fatal error, give up on this one
bad_fetch(nzo, msgid, msg=nzo_info, retry=True)
msgid = None
msgid = None
if msgid:
growler.send_notification(T('NZB added to queue'), filename, 'download')
@ -190,7 +190,7 @@ def _grabnzb(msgid):
pass
if not (rcode or rtext):
logging.error(T('Newzbin server changed its protocol'))
return None, None, None, None
return retry
# Official return codes:
# 200 = OK, NZB content follows

Loading…
Cancel
Save