mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-21 21:51:28 +00:00
reduce visual overhead in recents/liked menu
This commit is contained in:
parent
d39a86a2a9
commit
f401700e78
|
@ -9,10 +9,10 @@ fzf = FzfPrompt()
|
|||
@logger.catch
|
||||
def list_fav_or_history(pg=None, search=None, scope=None, is_history_view=False):
|
||||
if is_history_view:
|
||||
caption = 'listened:'
|
||||
action = 'listened'
|
||||
tracks = get_recently_listened(q=search, scope=scope, pg=pg)
|
||||
else:
|
||||
caption = 'liked:'
|
||||
action = 'liked'
|
||||
tracks = get_favorires_tracks(q=search, scope=scope, pg=pg)
|
||||
tracks_next = tracks.get('next')
|
||||
tracks_prev = tracks.get('previous')
|
||||
|
@ -27,8 +27,8 @@ def list_fav_or_history(pg=None, search=None, scope=None, is_history_view=False)
|
|||
index = tracks_results.index(i)
|
||||
track_name = i['track'].get('title')
|
||||
who_user = i['user'].get('username')
|
||||
view.append(f'{index}.{track_name} | {caption} {who_user}')
|
||||
select = fzf.prompt(view, '--multi')
|
||||
view.append(f'{index}.{track_name} | {who_user}')
|
||||
select = fzf.prompt(view, f'--multi --header=\'map: track title | who {action}\'')
|
||||
if 'Next page' in select:
|
||||
list_fav_or_history(pg=tracks_next, is_history_view=is_history_view)
|
||||
elif 'Prev page' in select:
|
||||
|
|
Loading…
Reference in a new issue