Compare commits

..

No commits in common. "9ec77975e5fef89a3189fd61d56865b3cd8df798" and "add2ef572cf44eddbaaf656883c4c5e4378bb9a3" have entirely different histories.

2 changed files with 18 additions and 17 deletions

View File

@ -11,7 +11,8 @@ from src.fw_recents import list_fav_or_history
import src.settings as settings import src.settings as settings
import src.mpv_control import src.mpv_control
import json import json
import os import sys
import time
from shlex import quote from shlex import quote
from loguru import logger from loguru import logger
from pyfzf.pyfzf import FzfPrompt from pyfzf.pyfzf import FzfPrompt
@ -121,22 +122,21 @@ Insert token from "Access token" here''')
current_instance.select_instance(instance) current_instance.select_instance(instance)
if selected == 'Donate': if selected == 'Donate':
os.system(f'less <<EOF\nSupport instance message:\n{support_message}') print('Support instance message:')
print(support_message)
input()
if selected == 'About instance': if selected == 'About instance':
about_instance_info = []
for i in ins_settings: for i in ins_settings:
k, v = i.get('verbose_name'), i.get('value') k, v = i.get('verbose_name'), i.get('value')
about_instance_info.append(f'{k}: {v}') print(f'{k}: {v}')
about_instance_info.append('|||||Some stats:') print('|||||Some stats:')
for k, v in ins_nodeinfo['metadata']['usage'].items(): for k, v in ins_nodeinfo['metadata']['usage'].items():
about_instance_info.append(f'{k}: {v}') print(f'{k}: {v}')
for k, v in ins_nodeinfo['metadata']['library'].items(): for k, v in ins_nodeinfo['metadata']['library'].items():
about_instance_info.append(f'{k}: {v}') print(f'{k}: {v}')
for k, v in ins_nodeinfo['usage'].items(): for k, v in ins_nodeinfo['usage'].items():
about_instance_info.append(f'{k}: {v}') print(f'{k}: {v}')
about_instance_info = '\n'.join(about_instance_info) input()
os.system(f'less <<EOF\n{about_instance_info}')
del about_instance_info
if selected == 'Player': if selected == 'Player':
src.mpv_control.player_menu( src.mpv_control.player_menu(
storage=src.mpv_control.player_fw_storage.storage) storage=src.mpv_control.player_fw_storage.storage)

View File

@ -35,6 +35,7 @@ class current_instance:
token = auth.get(instance) token = auth.get(instance)
listen_token = None listen_token = None
@logger.catch @logger.catch
def select_instance(new_instance=None): def select_instance(new_instance=None):
current_instance.instance = new_instance current_instance.instance = new_instance