def _preload(song, delay, override):
 if g.preload_disabled:
  return
 ytid = song.ytid
 g.preloading.append(ytid)
 time.sleep(delay)
 video = config.SHOW_VIDEO.get
 video = (True if (override in ('fullscreen', 'window', 'forcevid')) else video)
 video = (False if (override == 'audio') else video)
 try:
  m4a = ('mplayer' not in config.PLAYER.get)
  streamlist = get(song)
  stream = select(streamlist, audio=(not video), m4a_ok=m4a)
  if ((not stream) and (not video)):
   stream = select(streamlist, audio=False)
  get_size(ytid, stream['url'], preloading=True)
 except (ValueError, AttributeError, IOError) as e:
  util.dbg(e)
 finally:
  g.preloading.remove(song.ytid)

def _preload ( song , delay , override ) : if g . preload_disabled : return ytid = song . ytid g . preloading . append ( ytid ) time . sleep ( delay ) video = config . SHOW_VIDEO . get video = ( True if ( override in ( 'fullscreen' , 'window' , 'forcevid' ) ) else video ) video = ( False if ( override == 'audio' ) else video ) try : m4a = ( 'mplayer' not in config . PLAYER . get ) streamlist = get ( song ) stream = select ( streamlist , audio = ( not video ) , m4a_ok = m4a ) if ( ( not stream ) and ( not video ) ) : stream = select ( streamlist , audio = False ) get_size ( ytid , stream [ 'url' ] , preloading = True ) except ( ValueError , AttributeError , IOError ) as e : util . dbg ( e ) finally : g . preloading . remove ( song . ytid )
get streams .