idk what im doing going to try screens

This commit is contained in:
0x01FE committed 2025-01-23 11:21:10 -06:00
1 parent f20d89af5b
commit e7f7f70f7b
2 files changed
+22 -17

No files matched your search

+12 -16
View File
@@ -57,20 +57,11 @@ class TextualSubpyPlayer(App):
with TabbedContent(initial="Artists"): with TabbedContent(initial="Artists"):
with TabPane("Artists", id="Artists"): with TabPane("Artists", id="Artists"):
yield OptionList(id="Artists") yield OptionList(id="Artists")
with TabPane("Albums", id="Albums"):
yield DataTable(id="Albums")
yield Footer() yield Footer()
# yield OptionList(
# Option("Browse Artists", id="BrowseArtists"),
# Option("Browse Albums"),
# Option("Browse Songs"),
# Option("Browse Playlists"),
# id=Menus.MAIN.value
# )
# def on_mount(self) -> None:
# self.query_one(Tabs).allow_focus(False)
# async def action_menu_back(self) -> None: # async def action_menu_back(self) -> None:
# logging.debug('Menu Back Called') # logging.debug('Menu Back Called')
# match self.lastMenu: # match self.lastMenu:
@@ -92,18 +83,23 @@ class TextualSubpyPlayer(App):
# def on_tabs_tab_activated(self, event: Tabs.TabActivated) -> None: # def on_tabs_tab_activated(self, event: Tabs.TabActivated) -> None:
# logging.debug(f'{event.tab.id} selected') # logging.debug(f'{event.tab.id} selected')
@on(Tabs.TabActivated) @on(TabbedContent.TabActivated)
async def artists_tab(self, event: Tabs.TabActivated) -> None: async def artists_tab(self, event: TabbedContent.TabActivated) -> None:
if self.last_menu_type: if self.last_menu_type:
await self.query_one(self.last_menu_type).remove() await self.query_one(self.last_menu_type).remove()
self.last_menu_type = None self.last_menu_type = None
logging.debug(f'{event.tab.name} tab selected') logging.debug(f'{event.pane.id} tab selected')
id = event.tab.id id = event.pane.id
# id = event.tab.id
match id: match id:
case "Artists": case "Artists":
self.artists = self.conn.getArtists()
artistList: OptionList = self.query_one(OptionList)
if not artistList:
artistList: OptionList = await self._getArtistMenu() artistList: OptionList = await self._getArtistMenu()
await self.mount(artistList) await self.mount(artistList)
@@ -122,7 +118,7 @@ class TextualSubpyPlayer(App):
async def _getArtistMenu(self) -> OptionList: async def _getArtistMenu(self) -> OptionList:
self.artists = self.conn.getArtists() # self.artists = self.conn.getArtists()
return OptionList(id=Menus.ARTISTS.value) return OptionList(id=Menus.ARTISTS.value)
+10 -1
View File
@@ -1 +1,10 @@
[2025-01-22 14:48:12,080] DEBUG in proactor_events: Using proactor: IocpProactor [2025-01-23 11:19:08,906] DEBUG in selector_events: Using selector: EpollSelector
[2025-01-23 11:19:08,964] DEBUG in textual-test: Artists tab selected
[2025-01-23 11:19:08,966] DEBUG in connectionpool: Starting new HTTPS connection (1): music.0x01fe.net:443
[2025-01-23 11:19:09,267] DEBUG in connectionpool: https://music.0x01fe.net:443 "GET /rest/getIndexes?u=pseudo&t=dff0ee3a818ed4cd4b15e1d30972b9de&s=419LM0NL&v=1.16.1&c=testing HTTP/1.1" 200 None
[2025-01-23 11:19:10,298] DEBUG in textual-test: Key Pressed right
[2025-01-23 11:19:10,307] DEBUG in textual-test: Albums tab selected
[2025-01-23 11:19:11,009] DEBUG in textual-test: Key Pressed left
[2025-01-23 11:19:11,015] DEBUG in textual-test: Artists tab selected
[2025-01-23 11:19:11,017] DEBUG in connectionpool: Starting new HTTPS connection (1): music.0x01fe.net:443
[2025-01-23 11:19:11,338] DEBUG in connectionpool: https://music.0x01fe.net:443 "GET /rest/getIndexes?u=pseudo&t=df38529ec337b09026c038ea4ed94b26&s=C0ADXZ3M&v=1.16.1&c=testing HTTP/1.1" 200 None