mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-24 02:49:19 +02:00
Compare commits
No commits in common. "81f818bc2f4574f75a7f8767304c51ea83a40d31" and "c56b68bb0cc9121f2a346b4ef77ec19920e88129" have entirely different histories.
81f818bc2f
...
c56b68bb0c
|
@ -170,7 +170,7 @@ def get_recently_listened(page=None, q=None, scope=None, include_channels=None,
|
|||
|
||||
|
||||
@logger.catch
|
||||
def get_artists(page=None, q=None, artist=None, album=None, tag=None,
|
||||
def get_artists(page=None, q=None, artist=None, album=None,
|
||||
library=None, scope=None, favourites=None, refresh=False, pg=None):
|
||||
'''This function get artists by params'''
|
||||
params = {
|
||||
|
@ -178,7 +178,6 @@ def get_artists(page=None, q=None, artist=None, album=None, tag=None,
|
|||
'q': q,
|
||||
'artist': artist,
|
||||
'album': album,
|
||||
'tag': tag,
|
||||
'library': library,
|
||||
'scope': scope,
|
||||
'favourites': favourites,
|
||||
|
|
|
@ -2,7 +2,6 @@ from src.fw_api import get_artists, get_tracks, get_audio_file
|
|||
from src.fw_api_hints import hint_scope
|
||||
from src.fw_albums import list_albums
|
||||
from src.fw_libraries import libraries
|
||||
from src.fw_tags import list_tags
|
||||
from src.mpv_control import player, player_menu, track_url_to_uuid
|
||||
from pyfzf.pyfzf import FzfPrompt
|
||||
from loguru import logger
|
||||
|
@ -11,12 +10,12 @@ fzf = FzfPrompt()
|
|||
|
||||
|
||||
@logger.catch
|
||||
def list_artists(pg=None, search=None, library=None, scope=None, tag=None):
|
||||
artists = get_artists(q=search, library=library, pg=pg, scope=scope, tag=tag)
|
||||
def list_artists(pg=None, search=None, library=None, scope=None):
|
||||
artists = get_artists(q=search, library=library, pg=pg, scope=scope)
|
||||
artists_next = artists.get('next')
|
||||
artists_prev = artists.get('previous')
|
||||
artists_results = artists.get('results')
|
||||
view = ['Search', 'Tag', 'Library', 'Limit by scope']
|
||||
view = ['Search', 'Library', 'Limit by scope']
|
||||
if artists_next:
|
||||
view.append('Next page')
|
||||
if artists_prev:
|
||||
|
@ -40,8 +39,6 @@ def list_artists(pg=None, search=None, library=None, scope=None, tag=None):
|
|||
elif select == 'Search':
|
||||
print('Search by artist:')
|
||||
list_artists(search=input())
|
||||
elif select == 'Tag':
|
||||
list_artists(tag=list_tags())
|
||||
elif select == 'Library':
|
||||
select_lib = libraries()
|
||||
list_artists(library=select_lib)
|
||||
|
|
|
@ -25,9 +25,8 @@ def libraries(pg=None, radio=False):
|
|||
index = libs.index(lib_i)
|
||||
lib_name = lib_i.get('name')
|
||||
lib_tracks_count = lib_i.get('uploads_count')
|
||||
lib_access = lib_i.get('privacy_level')
|
||||
lib_by = lib_i.get('actor').get('full_username')
|
||||
libraries_listing.append(f'{index}.{lib_name} | {lib_by} | {lib_tracks_count} | {lib_access}')
|
||||
libraries_listing.append(f'{index}.{lib_name} | {lib_by} | {lib_tracks_count}')
|
||||
lib_select = fzf.prompt(
|
||||
libraries_listing,
|
||||
f'--header=\'found {libs_count} libraries\nmap: library name | owner | tracks count\'')
|
||||
|
|
Loading…
Reference in New Issue