@command(('play\\s+(%s|\\d+)' % WORD))
def play_pl(name):
 if name.isdigit():
  name = int(name)
  name = sorted(g.userpl)[(name - 1)]
 saved = g.userpl.get(name)
 if (not saved):
  name = util.get_near_name(name, g.userpl)
  saved = g.userpl.get(name)
 if saved:
  g.model.songs = list(saved.songs)
  play_all('', '', '')
 else:
  g.message = (util.F('pl not found') % name)
  g.content = content.playlists_display()

@ command ( ( 'play\\s+(%s|\\d+)' % WORD ) ) def play_pl ( name ) : if name . isdigit ( ) : name = int ( name ) name = sorted ( g . userpl ) [ ( name - 1 ) ] saved = g . userpl . get ( name ) if ( not saved ) : name = util . get_near_name ( name , g . userpl ) saved = g . userpl . get ( name ) if saved : g . model . songs = list ( saved . songs ) play_all ( '' , '' , '' ) else : g . message = ( util . F ( 'pl not found' ) % name ) g . content = content . playlists_display ( )
play a playlist by name .