mirror of
https://github.com/dmunozv04/iSponsorBlockTV.git
synced 2025-12-06 03:46:44 +03:00
Merge pull request #1 from SimoMay/minimum-skip-length
Fix feedback for #278 (duplicate code)
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user