You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
793 B
Python
39 lines
793 B
Python
from textual.app import App
|
|
|
|
from .shows_screen import ShowsScreen
|
|
from .media_details_screen import MediaDetailsScreen
|
|
|
|
|
|
class FfxApp(App):
|
|
|
|
TITLE = "FFX"
|
|
|
|
BINDINGS = [
|
|
("q", "quit()", "Quit"),
|
|
("h", "switch_mode('help')", "Help"),
|
|
]
|
|
|
|
|
|
def __init__(self, context = {}):
|
|
super().__init__()
|
|
|
|
# Data 'input' variable
|
|
self.context = context
|
|
|
|
|
|
def on_mount(self) -> None:
|
|
|
|
if 'command' in self.context.keys():
|
|
|
|
if self.context['command'] == 'shows':
|
|
self.push_screen(ShowsScreen())
|
|
|
|
if self.context['command'] == 'inspect':
|
|
self.push_screen(MediaDetailsScreen())
|
|
|
|
|
|
def getContext(self):
|
|
"""Data 'output' method"""
|
|
return self.context
|
|
|