@command('(?:q|quit|exit)')
def quits(showlogo=True):
 if has_readline:
  readline.write_history_file(g.READLINE_FILE)
  util.dbg('Saved history file')
 cache.save()
 screen.clear()
 msg = (logo(c.r, version=__version__) if showlogo else '')
 msg += util.F('exitmsg', 2)
 if (config.CHECKUPDATE.get and showlogo):
  try:
   url = 'https://raw.githubusercontent.com/mps-youtube/mps-youtube/master/VERSION'
   v = urlopen(url, timeout=1).read().decode()
   v = re.search('^version\\s*([\\d\\.]+)\\s*$', v, re.MULTILINE)
   if v:
    v = v.group(1)
    if (v > __version__):
     msg += ('\n\nA newer version is available (%s)\n' % v)
  except (URLError, HTTPError, socket.timeout):
   util.dbg('check update timed out')
 screen.msgexit(msg)

@ command ( '(?:q|quit|exit)' ) def quits ( showlogo = True ) : if has_readline : readline . write_history_file ( g . READLINE_FILE ) util . dbg ( 'Saved history file' ) cache . save ( ) screen . clear ( ) msg = ( logo ( c . r , version = __version__ ) if showlogo else '' ) msg += util . F ( 'exitmsg' , 2 ) if ( config . CHECKUPDATE . get and showlogo ) : try : url = 'https://raw.githubusercontent.com/mps-youtube/mps-youtube/master/VERSION' v = urlopen ( url , timeout = 1 ) . read ( ) . decode ( ) v = re . search ( '^version\\s*([\\d\\.]+)\\s*$' , v , re . MULTILINE ) if v : v = v . group ( 1 ) if ( v > __version__ ) : msg += ( '\n\nA newer version is available (%s)\n' % v ) except ( URLError , HTTPError , socket . timeout ) : util . dbg ( 'check update timed out' ) screen . msgexit ( msg )
exit the program .