Fix inspect details screen
This commit is contained in:
@@ -62,6 +62,13 @@ class ConfirmScreen(Screen):
|
|||||||
yield build_screen_log_pane()
|
yield build_screen_log_pane()
|
||||||
yield Footer()
|
yield Footer()
|
||||||
|
|
||||||
|
|
||||||
|
def on_mount(self):
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
|
|
||||||
def on_button_pressed(self, event: Button.Pressed) -> None:
|
def on_button_pressed(self, event: Button.Pressed) -> None:
|
||||||
if event.button.id == "confirm_button":
|
if event.button.id == "confirm_button":
|
||||||
self.dismiss(True)
|
self.dismiss(True)
|
||||||
|
|||||||
@@ -20,5 +20,12 @@ class HelpScreen(Screen):
|
|||||||
yield build_screen_log_pane()
|
yield build_screen_log_pane()
|
||||||
yield Footer()
|
yield Footer()
|
||||||
|
|
||||||
|
|
||||||
|
def on_mount(self):
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
|
|
||||||
def action_back(self):
|
def action_back(self):
|
||||||
go_back_or_exit(self)
|
go_back_or_exit(self)
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ class InspectDetailsScreen(MediaWorkflowScreenBase):
|
|||||||
CSS = f"""
|
CSS = f"""
|
||||||
|
|
||||||
Grid {{
|
Grid {{
|
||||||
grid-size: 6 11;
|
grid-size: 6 8;
|
||||||
grid-rows: 9 2 2 2 2 8 2 2 2 8 8;
|
grid-rows: 9 2 2 2 2 10 2 10;
|
||||||
grid-columns: {GRID_COLUMN_LABEL_MIN} {GRID_COLUMN_2} {GRID_COLUMN_3} {GRID_COLUMN_4} {GRID_COLUMN_5} {GRID_COLUMN_6};
|
grid-columns: {GRID_COLUMN_LABEL_MIN} {GRID_COLUMN_2} {GRID_COLUMN_3} {GRID_COLUMN_4} {GRID_COLUMN_5} {GRID_COLUMN_6};
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -88,6 +88,10 @@ class InspectDetailsScreen(MediaWorkflowScreenBase):
|
|||||||
#differences-table {{
|
#differences-table {{
|
||||||
row-span: 10;
|
row-span: 10;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
.yellow {{
|
||||||
|
tint: yellow 40%;
|
||||||
|
}}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -157,6 +161,7 @@ class InspectDetailsScreen(MediaWorkflowScreenBase):
|
|||||||
yield Static(" ")
|
yield Static(" ")
|
||||||
yield self.differencesTable
|
yield self.differencesTable
|
||||||
|
|
||||||
|
|
||||||
# Row 2
|
# Row 2
|
||||||
yield Static(" ", classes="five")
|
yield Static(" ", classes="five")
|
||||||
|
|
||||||
@@ -165,29 +170,26 @@ class InspectDetailsScreen(MediaWorkflowScreenBase):
|
|||||||
yield Button(t("Substitute"), id="pattern_button")
|
yield Button(t("Substitute"), id="pattern_button")
|
||||||
yield Static(" ", classes="three")
|
yield Static(" ", classes="three")
|
||||||
|
|
||||||
|
|
||||||
# Row 4
|
# Row 4
|
||||||
yield Static(t("Pattern"))
|
yield Static(t("Pattern"))
|
||||||
yield Input(type="text", id="pattern_input", classes="three")
|
yield Input(type="text", id="pattern_input", classes="three")
|
||||||
yield Static(" ")
|
yield Static(" ")
|
||||||
|
|
||||||
|
|
||||||
# Row 5
|
# Row 5
|
||||||
yield Static(" ", classes="five")
|
yield Static(" ", classes="five")
|
||||||
|
|
||||||
# Row 6
|
# Row 6
|
||||||
yield Static(t("Media Tags"))
|
yield Static(t("Media Tags"))
|
||||||
yield self.mediaTagsTable
|
yield self.mediaTagsTable
|
||||||
yield Static(" ", classes="two")
|
yield Static(" ")
|
||||||
|
|
||||||
|
|
||||||
# Row 7
|
# Row 7
|
||||||
yield Static(" ", classes="five")
|
yield Static(" ", classes="five")
|
||||||
|
|
||||||
# Row 8
|
# Row 8
|
||||||
yield Static(" ")
|
|
||||||
yield Button(t("Set Default"), id="select_default_button")
|
|
||||||
yield Button(t("Set Forced"), id="select_forced_button")
|
|
||||||
yield Static(" ", classes="two")
|
|
||||||
|
|
||||||
# Row 9
|
|
||||||
yield Static(t("Streams"))
|
yield Static(t("Streams"))
|
||||||
yield self.tracksTable
|
yield self.tracksTable
|
||||||
yield Static(" ")
|
yield Static(" ")
|
||||||
@@ -314,6 +316,10 @@ class InspectDetailsScreen(MediaWorkflowScreenBase):
|
|||||||
self._update_show_header_labels()
|
self._update_show_header_labels()
|
||||||
|
|
||||||
def on_mount(self):
|
def on_mount(self):
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
self._update_grid_layout()
|
self._update_grid_layout()
|
||||||
|
|
||||||
if self._currentPattern is None:
|
if self._currentPattern is None:
|
||||||
|
|||||||
@@ -178,6 +178,10 @@ class MediaEditScreen(MediaWorkflowScreenBase):
|
|||||||
yield Footer()
|
yield Footer()
|
||||||
|
|
||||||
def on_mount(self):
|
def on_mount(self):
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
self._update_grid_layout()
|
self._update_grid_layout()
|
||||||
self.updateMediaTags()
|
self.updateMediaTags()
|
||||||
self.updateTracks()
|
self.updateTracks()
|
||||||
|
|||||||
@@ -68,6 +68,10 @@ class PatternDeleteScreen(Screen):
|
|||||||
|
|
||||||
|
|
||||||
def on_mount(self):
|
def on_mount(self):
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
if self.__showDescriptor:
|
if self.__showDescriptor:
|
||||||
self.query_one("#showlabel", Static).update(f"{self.__showDescriptor.getId()} - {self.__showDescriptor.getName()} ({self.__showDescriptor.getYear()})")
|
self.query_one("#showlabel", Static).update(f"{self.__showDescriptor.getId()} - {self.__showDescriptor.getName()} ({self.__showDescriptor.getYear()})")
|
||||||
if not self.__pattern is None:
|
if not self.__pattern is None:
|
||||||
|
|||||||
@@ -326,6 +326,9 @@ class PatternDetailsScreen(Screen):
|
|||||||
|
|
||||||
def on_mount(self):
|
def on_mount(self):
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
if not self.__showDescriptor is None:
|
if not self.__showDescriptor is None:
|
||||||
self.query_one("#showlabel", Static).update(f"{self.__showDescriptor.getId()} - {self.__showDescriptor.getName()} ({self.__showDescriptor.getYear()})")
|
self.query_one("#showlabel", Static).update(f"{self.__showDescriptor.getId()} - {self.__showDescriptor.getName()} ({self.__showDescriptor.getYear()})")
|
||||||
|
|
||||||
|
|||||||
@@ -20,5 +20,12 @@ class SettingsScreen(Screen):
|
|||||||
yield build_screen_log_pane()
|
yield build_screen_log_pane()
|
||||||
yield Footer()
|
yield Footer()
|
||||||
|
|
||||||
|
|
||||||
|
def on_mount(self):
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
|
|
||||||
def action_back(self):
|
def action_back(self):
|
||||||
go_back_or_exit(self)
|
go_back_or_exit(self)
|
||||||
|
|||||||
@@ -67,6 +67,9 @@ class ShiftedSeasonDeleteScreen(Screen):
|
|||||||
|
|
||||||
def on_mount(self):
|
def on_mount(self):
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
shiftedSeason: ShiftedSeason = self.__ssc.getShiftedSeason(self.__shiftedSeasonId)
|
shiftedSeason: ShiftedSeason = self.__ssc.getShiftedSeason(self.__shiftedSeasonId)
|
||||||
|
|
||||||
ownerLabel = (
|
ownerLabel = (
|
||||||
|
|||||||
@@ -109,6 +109,9 @@ class ShiftedSeasonDetailsScreen(Screen):
|
|||||||
|
|
||||||
def on_mount(self):
|
def on_mount(self):
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
if self.__shiftedSeasonId is not None:
|
if self.__shiftedSeasonId is not None:
|
||||||
shiftedSeason: ShiftedSeason = self.__ssc.getShiftedSeason(self.__shiftedSeasonId)
|
shiftedSeason: ShiftedSeason = self.__ssc.getShiftedSeason(self.__shiftedSeasonId)
|
||||||
|
|
||||||
|
|||||||
@@ -109,5 +109,12 @@ class ShowDeleteScreen(Screen):
|
|||||||
if event.button.id == "cancel_button":
|
if event.button.id == "cancel_button":
|
||||||
self.app.pop_screen()
|
self.app.pop_screen()
|
||||||
|
|
||||||
|
|
||||||
|
def on_mount(self):
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
|
|
||||||
def action_back(self):
|
def action_back(self):
|
||||||
go_back_or_exit(self)
|
go_back_or_exit(self)
|
||||||
|
|||||||
@@ -175,6 +175,9 @@ class ShowDetailsScreen(Screen):
|
|||||||
|
|
||||||
def on_mount(self):
|
def on_mount(self):
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
if self.__showDescriptor is not None:
|
if self.__showDescriptor is not None:
|
||||||
|
|
||||||
showId = int(self.__showDescriptor.getId())
|
showId = int(self.__showDescriptor.getId())
|
||||||
|
|||||||
@@ -244,6 +244,10 @@ class ShowsScreen(Screen):
|
|||||||
|
|
||||||
|
|
||||||
def on_mount(self) -> None:
|
def on_mount(self) -> None:
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
for show in self.__sc.getAllShows():
|
for show in self.__sc.getAllShows():
|
||||||
self._add_show_row(show.getDescriptor(self.context))
|
self._add_show_row(show.getDescriptor(self.context))
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,9 @@ class TagDeleteScreen(Screen):
|
|||||||
|
|
||||||
def on_mount(self):
|
def on_mount(self):
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
self.query_one("#keylabel", Static).update(str(self.__key))
|
self.query_one("#keylabel", Static).update(str(self.__key))
|
||||||
self.query_one("#valuelabel", Static).update(str(self.__value))
|
self.query_one("#valuelabel", Static).update(str(self.__value))
|
||||||
|
|
||||||
|
|||||||
@@ -87,6 +87,9 @@ class TagDetailsScreen(Screen):
|
|||||||
|
|
||||||
def on_mount(self):
|
def on_mount(self):
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
if self.__key is not None:
|
if self.__key is not None:
|
||||||
self.query_one("#key_input", Input).value = str(self.__key)
|
self.query_one("#key_input", Input).value = str(self.__key)
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,9 @@ class TrackDeleteScreen(Screen):
|
|||||||
|
|
||||||
def on_mount(self):
|
def on_mount(self):
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
self.query_one("#subindexlabel", Static).update(str(self.__trackDescriptor.getSubIndex()))
|
self.query_one("#subindexlabel", Static).update(str(self.__trackDescriptor.getSubIndex()))
|
||||||
self.query_one("#patternlabel", Static).update(str(self.__trackDescriptor.getPatternId()))
|
self.query_one("#patternlabel", Static).update(str(self.__trackDescriptor.getPatternId()))
|
||||||
self.query_one("#languagelabel", Static).update(str(self.__trackDescriptor.getLanguage().label()))
|
self.query_one("#languagelabel", Static).update(str(self.__trackDescriptor.getLanguage().label()))
|
||||||
|
|||||||
@@ -236,6 +236,9 @@ class TrackDetailsScreen(Screen):
|
|||||||
|
|
||||||
def on_mount(self):
|
def on_mount(self):
|
||||||
|
|
||||||
|
if self.context.get('debug', False):
|
||||||
|
self.title = f"{self.app.title} - {self.__class__.__name__}"
|
||||||
|
|
||||||
self.query_one("#index_label", Static).update(
|
self.query_one("#index_label", Static).update(
|
||||||
str(self.__index) if self.__index is not None else "-"
|
str(self.__index) if self.__index is not None else "-"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user