|
|
@ -91,8 +91,7 @@ class PatternDetailsScreen(Screen):
|
|
|
|
self.__tac = TagController(context = self.context)
|
|
|
|
self.__tac = TagController(context = self.context)
|
|
|
|
|
|
|
|
|
|
|
|
self.__pattern : Pattern = self.__pc.getPattern(patternId) if patternId is not None else None
|
|
|
|
self.__pattern : Pattern = self.__pc.getPattern(patternId) if patternId is not None else None
|
|
|
|
|
|
|
|
self.__showDescriptor = self.__sc.getShowDescriptor(showId) if showId is not None else None
|
|
|
|
self.show_obj = self.__sc.getShowDescriptor(showId) if showId is not None else {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#TODO: per controller
|
|
|
|
#TODO: per controller
|
|
|
@ -167,8 +166,8 @@ class PatternDetailsScreen(Screen):
|
|
|
|
|
|
|
|
|
|
|
|
def on_mount(self):
|
|
|
|
def on_mount(self):
|
|
|
|
|
|
|
|
|
|
|
|
if self.show_obj:
|
|
|
|
if not self.__showDescriptor is None:
|
|
|
|
self.query_one("#showlabel", Static).update(f"{self.show_obj['id']} - {self.show_obj['name']} ({self.show_obj['year']})")
|
|
|
|
self.query_one("#showlabel", Static).update(f"{self.__showDescriptor.getId()} - {self.__showDescriptor.getName()} ({self.__showDescriptor.getYear()})")
|
|
|
|
|
|
|
|
|
|
|
|
if self.__pattern is not None:
|
|
|
|
if self.__pattern is not None:
|
|
|
|
|
|
|
|
|
|
|
@ -333,7 +332,7 @@ class PatternDetailsScreen(Screen):
|
|
|
|
if event.button.id == "save_button":
|
|
|
|
if event.button.id == "save_button":
|
|
|
|
|
|
|
|
|
|
|
|
patternDescriptor = {}
|
|
|
|
patternDescriptor = {}
|
|
|
|
patternDescriptor['show_id'] = self.show_obj['id']
|
|
|
|
patternDescriptor['show_id'] = self.__showDescriptor.getId()
|
|
|
|
patternDescriptor['pattern'] = self.getPatternFromInput()
|
|
|
|
patternDescriptor['pattern'] = self.getPatternFromInput()
|
|
|
|
|
|
|
|
|
|
|
|
if self.__pattern is not None:
|
|
|
|
if self.__pattern is not None:
|
|
|
|