def _pick_format(album, fmt=None):
 if fmt:
  return fmt
 if album:
  return config['list_format_album'].get(unicode)
 else:
  return config['list_format_item'].get(unicode)

def _pick_format ( album , fmt = None ) : if fmt : return fmt if album : return config [ 'list_format_album' ] . get ( unicode ) else : return config [ 'list_format_item' ] . get ( unicode )
pick a format string for printing album or item objects .