Compare commits

...

3 commits

5 changed files with 9 additions and 4 deletions

View file

@ -34,9 +34,10 @@ def list_albums(albums=None, pg=None, search=None, artist=None, include_channels
for i in albums_results:
index = albums_results.index(i)
album_name = i.get('title')
artist_name = i.get('artist').get('name')
option_str = f'{index}.{album_name}'
if show_artist_name_in_albums:
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}'
view.append(f'{option_str}')
select = fzf.prompt(view)[0].split('.', 1)[0]

View file

@ -130,12 +130,13 @@ def get_channels(page=None, q=None, tag=None, pg=None):
@logger.catch
def get_playlists(page=None, page_size=None, q=None, pg=None):
def get_playlists(page=None, page_size=None, q=None, ordering='-modification_date', pg=None):
'''List playlists'''
params = {
'page': page,
'page_size': page_size,
'q': q
'q': q,
'ordering': ordering
}
if pg:
r = s.get(pg)

View file

@ -82,6 +82,7 @@ radio_event_gen = threading.Event()
@logger.catch
def radio_load(id_radio=None, type_radio='custom', name=None, related_object=None):
show_like_button = get_config('show_like_button')
player.volume = get_config('mpv_volume')
requested_radio = {
'custom_radio': id_radio,
'radio_type': type_radio,

View file

@ -24,6 +24,7 @@ def set_http_header(headers=[]):
@logger.catch
def player_menu(header='', storage={}):
player_fw_storage.storage = storage
player.volume = get_config("mpv_volume")
while True:
try:
player_items_menu = ['Next', 'Prev', 'Pause',

View file

@ -39,6 +39,7 @@ default_conf = {
"shitnoise.monster"
],
'prefetch_playlist': True,
'mpv_volume': 100,
'show_like_button': True,
'show_artist_name_in_albums': False
}