@command('reverse all')
def reverse_playlist():
 if ((g.last_search_query == (None, None)) or ('func' not in g.last_search_query[1])):
  g.content = content.logo()
  g.message = 'No playlist loaded'
  return
 songs_list_or_func = g.last_search_query[1]['func']
 if callable(songs_list_or_func):
  songs = reversed(songs_list_or_func(0, None))
 else:
  songs = reversed(songs_list_or_func)
 paginatesongs(list(songs))
 g.message = ((c.y + 'Reversed entire playlist') + c.w)
 g.content = content.generate_songlist_display()

@ command ( 'reverse all' ) def reverse_playlist ( ) : if ( ( g . last_search_query == ( None , None ) ) or ( 'func' not in g . last_search_query [ 1 ] ) ) : g . content = content . logo ( ) g . message = 'No playlist loaded' return songs_list_or_func = g . last_search_query [ 1 ] [ 'func' ] if callable ( songs_list_or_func ) : songs = reversed ( songs_list_or_func ( 0 , None ) ) else : songs = reversed ( songs_list_or_func ) paginatesongs ( list ( songs ) ) g . message = ( ( c . y + 'Reversed entire playlist' ) + c . w ) g . content = content . generate_songlist_display ( )
reverse order of entire loaded playlist .