po5 / chapterskip

mpv script to skip chapters based on their title
32 stars 7 forks source link

[Question] Syntax #1

Closed Obegg closed 2 years ago

Obegg commented 2 years ago

I have quite a few chapters I would like it to skip, But I don't understand the syntax usage. For example I would like it to skip only "OP", But it skips the "OPENING THE DOOR" chapter too, Probably because it has "OP" in it. How can I use the script to skip only the chapter "OP"? Do I use opening = "OP$", or do I use opening = "^OP", or something else entirely? What is the difference and what is the proper way to use it?

po5 commented 2 years ago

These are lua pattersn. ^ is the start anchor, $ is the end.
You can use ^OP$ to only skip an exact match for "OP", the preset doesn't do that because it's rarely if ever how people name their chapters, calling them "OP Whatever", "Opening 3" etc.