separate long hints

This commit is contained in:
localhost_frssoft 2023-06-12 13:49:49 +03:00
parent f401700e78
commit 7ab1058937
2 changed files with 12 additions and 10 deletions

10
src/fw_api_hints.py Normal file
View file

@ -0,0 +1,10 @@
def hint_scope():
print(
'''Limit the results to a given user or pod:
Use all (or do not specify the property to disable scope filtering)
Use me to retrieve content relative to the current user
Use subscribed to retrieve content in libraries you follow
Use actor:alice@example.com to retrieve content relative to the account `alice@example.com
Use domain:example.com to retrieve content relative to the domain `example.com
You can specify multiple coma separated scopes, e.g me,subscribed to retrieve content matching either scopes
''')

View file

@ -1,5 +1,6 @@
from src.fw_api import get_favorires_tracks, get_recently_listened, get_audio_file
from src.mpv_control import player, player_menu, track_url_to_uuid, player_fw_storage
from src.fw_api_hints import hint_scope
from pyfzf.pyfzf import FzfPrompt
from loguru import logger
@ -37,16 +38,7 @@ def list_fav_or_history(pg=None, search=None, scope=None, is_history_view=False)
print('Search by track:')
list_fav_or_history(search=input(), is_history_view=is_history_view)
elif 'Limit by scope' in select:
print('''
Limit the results to a given user or pod:
Use all (or do not specify the property to disable scope filtering)
Use me to retrieve content relative to the current user
Use subscribed to retrieve content in libraries you follow
Use actor:alice@example.com to retrieve content relative to the account `alice@example.com
Use domain:example.com to retrieve content relative to the domain `example.com
''')
hint_scope()
scope = input()
list_fav_or_history(scope=scope, search=search, is_history_view=is_history_view)
elif 'Play this page' in select: