Refactor ContentView to add media browser
This commit is contained in:
@@ -111,6 +111,16 @@ class Provider(QObject):
|
||||
def getShow(self, id) -> Show:
|
||||
return self._shows[id]
|
||||
|
||||
@pyqtProperty(list)
|
||||
def showsAlphabetic(self) -> list[int]:
|
||||
return [
|
||||
elem[0]
|
||||
for elem in sorted(
|
||||
[(id, show) for id, show in self._shows.items()],
|
||||
key=lambda elem: elem[1].title,
|
||||
)
|
||||
]
|
||||
|
||||
@pyqtProperty(list)
|
||||
def recentlyAdded(self) -> list[int]:
|
||||
return self._recently_added
|
||||
|
||||
Reference in New Issue
Block a user