mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-26 21:41:28 +00:00
Compare commits
3 commits
eac531c373
...
9139e0c78a
Author | SHA1 | Date | |
---|---|---|---|
localhost_frssoft | 9139e0c78a | ||
localhost_frssoft | 12a02ab6be | ||
localhost_frssoft | 5556a0c3de |
|
@ -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]
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -39,6 +39,7 @@ default_conf = {
|
|||
"shitnoise.monster"
|
||||
],
|
||||
'prefetch_playlist': True,
|
||||
'mpv_volume': 100,
|
||||
'show_like_button': True,
|
||||
'show_artist_name_in_albums': False
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue