-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for specifying minimum skip length #169
base: main
Are you sure you want to change the base?
Changes from 7 commits
138c97c
1c4ffe6
4d4016c
2636a4b
6c679f2
2b1b0f6
16b8fa1
cab33e5
0e87da5
d11bcba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,7 @@ def __init__(self, data_dir): | |
self.skip_count_tracking = True | ||
self.mute_ads = False | ||
self.skip_ads = False | ||
self.minimum_skip_length = 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe that the minimum ought to be 0 rather than 1, since sponsorblock segments are defined by frames so there could be a segment that's less than 1 second that would be skipped when the user might think that no skipping is happening. Although one of the configurators will likely always be ran, so the user will define a minimum segment length, I still think that ideally the default would represent no skipping. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I find 1 to be an appropriate minimum time length, considering that YouTube only allows setting the play head to integer values (so no 10.8 seconds allowed, it'll just round it down to 10). If a user were to want to disable skipping, they should be able to just set the list of skippable categories to an empty one (that should work but it isn't something I've tested) |
||
self.__load() | ||
|
||
def validate(self): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR #150 was merged probably between when you raised this one and now which refactored this script a bit. It should be pretty simple to adapt this to use the
get_yn_input
function - though truthfully this is likely fine as is. But you will need to pull the changes for the rest of the script to merge without conflict.It also might be helpful for the user to include something like "set this to 0 to not skip any segments" or something to that effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, #150 was merged after raising this PR, but refactoring this section of the cli configurator shouldn't be too much work, and ideally a new "panel" would be added to the tui config editor to allow changing this value from there too. I'll be able to do it at some point but if someone wants to go ahead and help you're free to do it. PRs are always appreciated. Thanks for your comment @ryankupk