@command(('mv\\s*(%s\\s+%s)' % (WORD, WORD)))
def playlist_rename(playlists_):
 (a, b) = ('', playlists_.split(' '))
 while (a not in g.userpl):
  a = ((a + ' ') + b.pop(0)).strip()
  if ((not b) and (a not in g.userpl)):
   g.message = util.F('no pl match for rename')
   g.content = (g.content or content.playlists_display())
   return
 b = '-'.join(b)
 g.userpl[b] = Playlist(b)
 g.userpl[b].songs = list(g.userpl[a].songs)
 playlist_remove(a)
 g.message = (util.F('pl renamed') % (a, b))
 playlists.save()

@ command ( ( 'mv\\s*(%s\\s+%s)' % ( WORD , WORD ) ) ) def playlist_rename ( playlists_ ) : ( a , b ) = ( '' , playlists_ . split ( ' ' ) ) while ( a not in g . userpl ) : a = ( ( a + ' ' ) + b . pop ( 0 ) ) . strip ( ) if ( ( not b ) and ( a not in g . userpl ) ) : g . message = util . F ( 'no pl match for rename' ) g . content = ( g . content or content . playlists_display ( ) ) return b = '-' . join ( b ) g . userpl [ b ] = Playlist ( b ) g . userpl [ b ] . songs = list ( g . userpl [ a ] . songs ) playlist_remove ( a ) g . message = ( util . F ( 'pl renamed' ) % ( a , b ) ) playlists . save ( )
rename a playlist using mv command .