def retry_job(job, new_nzb, password):
 if job:
  history_db = sabnzbd.connect_db()
  (futuretype, url, pp, script, cat) = history_db.get_other(job)
  if futuretype:
   if (pp == 'X'):
    pp = None
   sabnzbd.add_url(url, pp, script, cat)
   history_db.remove_history(job)
  else:
   path = history_db.get_path(job)
   if path:
    nzo_id = repair_job(platform_encode(path), new_nzb, password)
    history_db.remove_history(job)
    return nzo_id
 return None

def retry_job ( job , new_nzb , password ) : if job : history_db = sabnzbd . connect_db ( ) ( futuretype , url , pp , script , cat ) = history_db . get_other ( job ) if futuretype : if ( pp == 'X' ) : pp = None sabnzbd . add_url ( url , pp , script , cat ) history_db . remove_history ( job ) else : path = history_db . get_path ( job ) if path : nzo_id = repair_job ( platform_encode ( path ) , new_nzb , password ) history_db . remove_history ( job ) return nzo_id return None
re enter failed job in the download queue .