Merge pull request #1 from SimoMay/minimum-skip-length

Fix feedback for #278 (duplicate code)
This commit is contained in:
Matthew Stern
2025-05-14 00:16:16 -04:00
committed by GitHub
2 changed files with 5 additions and 13 deletions

View File

@@ -203,18 +203,6 @@ def main(config, debug: bool) -> None:
config.minimum_skip_length = minimum_skip_length
# Ask for minimum skip length. Confirm input is an integer
while True:
try:
minimum_skip_length = int(
input("Enter minimum length of segment to skip in seconds: ")
)
break
except ValueError:
print("You entered a non integer value, try again.")
continue
config.minimum_skip_length = minimum_skip_length
choice = get_yn_input(REPORT_SKIPPED_SEGMENTS_PROMPT)
config.skip_count_tracking = choice != "n"

View File

@@ -733,7 +733,11 @@ class MinimumSkipLengthManager(Vertical):
def compose(self) -> ComposeResult:
yield Label("Minimum Skip Length", classes="title")
yield Label(
"Specify the minimum length a segment must meet in order to skip it (in seconds). Default is 1 second; entering 0 will skip all segments.",
(
"Specify the minimum length a segment must meet in order to skip "
"it (in seconds). Default is 1 second; entering 0 will skip all "
"segments."
),
classes="subtitle",
)
yield Input(