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: for i in albums_results:
index = albums_results.index(i) index = albums_results.index(i)
album_name = i.get('title') album_name = i.get('title')
artist_name = i.get('artist').get('name')
option_str = f'{index}.{album_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}' option_str += f' | Artist: {artist_name}'
view.append(f'{option_str}') view.append(f'{option_str}')
select = fzf.prompt(view)[0].split('.', 1)[0] 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 @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''' '''List playlists'''
params = { params = {
'page': page, 'page': page,
'page_size': page_size, 'page_size': page_size,
'q': q 'q': q,
'ordering': ordering
} }
if pg: if pg:
r = s.get(pg) r = s.get(pg)

View file

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

View file

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

View file

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