dyphire / mpv-scripts

userscripts for mpv
MIT License
53 stars 5 forks source link

chapter-make-read.lua accepts chapter filenames with 2 or 3 letter language codes #16

Open porg opened 1 year ago

porg commented 1 year ago

Imagine this file structure

video.mp4           # Video file
video.chp           # Chapter file, language neutral
video.mp4.chp       # Chapter file, language neutral, video suffix included
video.chi.chp       # Chinese chapter file, 3-letter code (ISO 639‑3), 
video.en.chp        # English chapter file, 2-letter code (ISO 639‑1)
video.spa.chp       # Spanish chapter file, 3-letter code (ISO 639‑3)
video FR.chp        # French chapter file, 2-letter code (ISO 639‑1) at the end of the file name without a dot

Detection

Utilization

dyphire commented 1 year ago

I roughly understand your idea, but since I personally do not have such a need and cannot think of a simple way to implement it at the moment, I am afraid I do not have the motivation to implement this feature.

If anyone is willing to implement it, welcome to open PR for this.

porg commented 1 year ago