@command('history')
def view_history(duplicates=True):
 history = g.userhist.get('history')
 try:
  hist_list = list(reversed(history.songs))
  message = 'Viewing play history'
  if (not duplicates):
   seen = set()
   seen_add = seen.add
   hist_list = [x for x in hist_list if (not ((x in seen) or seen_add(x)))]
   message = 'Viewing recent played songs'
  paginatesongs(hist_list)
  g.message = message
 except AttributeError:
  g.content = logo(c.r)
  g.message = 'History empty'

@ command ( 'history' ) def view_history ( duplicates = True ) : history = g . userhist . get ( 'history' ) try : hist_list = list ( reversed ( history . songs ) ) message = 'Viewing play history' if ( not duplicates ) : seen = set ( ) seen_add = seen . add hist_list = [ x for x in hist_list if ( not ( ( x in seen ) or seen_add ( x ) ) ) ] message = 'Viewing recent played songs' paginatesongs ( hist_list ) g . message = message except AttributeError : g . content = logo ( c . r ) g . message = 'History empty'
display the users play history .