@command(('rmp\\s*(\\d+|%s)' % WORD))
def playlist_remove(name):
 if (name.isdigit() or g.userpl.get(name)):
  if name.isdigit():
   name = (int(name) - 1)
   name = sorted(g.userpl)[name]
  del g.userpl[name]
  g.message = ('Deleted playlist %s%s%s' % (c.y, name, c.w))
  g.content = content.playlists_display()
  playlists.save()
 else:
  g.message = (util.F('pl not found advise ls') % name)
  g.content = content.playlists_display()

@ command ( ( 'rmp\\s*(\\d+|%s)' % WORD ) ) def playlist_remove ( name ) : if ( name . isdigit ( ) or g . userpl . get ( name ) ) : if name . isdigit ( ) : name = ( int ( name ) - 1 ) name = sorted ( g . userpl ) [ name ] del g . userpl [ name ] g . message = ( 'Deleted playlist %s%s%s' % ( c . y , name , c . w ) ) g . content = content . playlists_display ( ) playlists . save ( ) else : g . message = ( util . F ( 'pl not found advise ls' ) % name ) g . content = content . playlists_display ( )
delete a saved playlist by name - or purge working playlist if *all .