From 03ff52fcec5e736a841e220a0181e62bbb0cf643 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Mon, 12 Jun 2023 14:47:45 +0300 Subject: [PATCH] albums tracks count --- src/fw_albums.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fw_albums.py b/src/fw_albums.py index cfb9f39..b7f8e01 100644 --- a/src/fw_albums.py +++ b/src/fw_albums.py @@ -37,13 +37,14 @@ def list_albums(albums=None, pg=None, search=None, artist=None, library=None, in for i in albums_results: index = albums_results.index(i) album_name = i.get('title') - option_str = f'{index}.{album_name}' + album_tracks_count = i.get('tracks_count') + option_str = f'{index}.{album_name} | {album_tracks_count}' artist_name = i.get('artist') if show_artist_name_in_albums and isinstance(artist_name, dict): artist_name = artist_name.get('name') - option_str += f' | Artist: {artist_name}' + option_str += f' | {artist_name}' view.append(f'{option_str}') - select = fzf.prompt(view)[0].split('.', 1)[0] + select = fzf.prompt(view, '--header=\'map: album | tracks count | opt. artist\'')[0].split('.', 1)[0] if select == 'Next page': list_albums(pg=albums_next) elif select == 'Prev page':