def add_url(url, pp=None, script=None, cat=None, priority=None, nzbname=None):
 if ('http' not in url):
  return
 if ((not pp) or (pp == '-1')):
  pp = None
 if (script and (script.lower() == 'default')):
  script = None
 if (cat and (cat.lower() == 'default')):
  cat = None
 logging.info('Fetching %s', url)
 msg = (T('Trying to fetch NZB from %s') % url)
 future_nzo = NzbQueue.do.generate_future(msg, pp, script, cat, url=url, priority=priority, nzbname=nzbname)
 URLGrabber.do.add(url, future_nzo)
 return future_nzo.nzo_id

def add_url ( url , pp = None , script = None , cat = None , priority = None , nzbname = None ) : if ( 'http' not in url ) : return if ( ( not pp ) or ( pp == '-1' ) ) : pp = None if ( script and ( script . lower ( ) == 'default' ) ) : script = None if ( cat and ( cat . lower ( ) == 'default' ) ) : cat = None logging . info ( 'Fetching %s' , url ) msg = ( T ( 'Trying to fetch NZB from %s' ) % url ) future_nzo = NzbQueue . do . generate_future ( msg , pp , script , cat , url = url , priority = priority , nzbname = nzbname ) URLGrabber . do . add ( url , future_nzo ) return future_nzo . nzo_id
add nzb based on a url .