def bad_fetch(nzo, url, msg='', content=False):
 if msg:
  msg = unicoder(msg)
 else:
  msg = ''
 nzo.status = Status.FAILED
 if url:
  nzo.filename = url
  nzo.final_name = url.strip()
 if content:
  msg = T('Unusable NZB file')
 else:
  msg = (T('URL Fetching failed; %s') % msg)
 nzo.fail_msg = msg
 notifier.send_notification((T('URL Fetching failed; %s') % ''), ('%s\n%s' % (msg, url)), 'other')
 if (cfg.email_endjob() > 0):
  emailer.badfetch_mail(msg, url)
 NzbQueue.do.remove(nzo.nzo_id, add_to_history=True)

def bad_fetch ( nzo , url , msg = '' , content = False ) : if msg : msg = unicoder ( msg ) else : msg = '' nzo . status = Status . FAILED if url : nzo . filename = url nzo . final_name = url . strip ( ) if content : msg = T ( 'Unusable NZB file' ) else : msg = ( T ( 'URL Fetching failed; %s' ) % msg ) nzo . fail_msg = msg notifier . send_notification ( ( T ( 'URL Fetching failed; %s' ) % '' ) , ( '%s\n%s' % ( msg , url ) ) , 'other' ) if ( cfg . email_endjob ( ) > 0 ) : emailer . badfetch_mail ( msg , url ) NzbQueue . do . remove ( nzo . nzo_id , add_to_history = True )
create history entry for failed url fetch msg : message to be logged retry : make retry link in history content : report in history that cause is a bad nzb file .