mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-30 07:51:29 +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:
|
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]
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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',
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue