A LUA SCRIPT FOR MPV TO AUTO-SKIP EYECATCHES & MORE


I've created detailed and perfectly timed chapters for each scene, cause "Part A" and "Part B" isn't nearly enough for KonoSuba, and come up with a fun name for each one. I've also enclosed each eyecatch, the opening, the ending, the prologue, and the preview in chapters (and will keep doing so in future episodes), so that you can auto-skip them using the lua script below!

Create a file in C:\Users\ ... \AppData\Roaming\mpv(.net)\scripts, name it skipfiller.lua, and paste this in it:

⎗
✓
require 'mp.options'
local opt = {
    patterns = {
        ... <---------- you will be adding lines here
    },
}
read_options(opt)

function check_chapter(_, chapter)
    if not chapter then
        return
    end
    for _, p in pairs(opt.patterns) do
        if string.match(chapter, p) then
            print("Skipping chapter:", chapter)
            mp.command("no-osd add chapter 1")
            return
        end
    end
end

mp.observe_property("chapter-metadata/by-key/title", "string", check_chapter)
if you want to skip then insert ‎ if you want to skip then insert ‎ if you want to skip then insert
eyecatches "Eyecatch", ‎ the opening "Opening", ‎ prologues "Prologue",
‎ ‎ ‎ the ending "Ending", ‎ previews "Preview",

Of course, feel free to paste all of these (on separate lines) to skip all the filler in future episodes. Note that this script will also do its job on other anime you watch, so if you just want to skip the constant eyecatches in KonoSuba, only insert that line and call it a day. Hope you find my idea helpful!

Credit for the skipchapter.lua script goes to @haasn on GitHub.

Edit

Pub: 28 Apr 2024 01:29 UTC

Edit: 02 May 2024 23:53 UTC

Views: 58