Skip to content

Commit 1a0f189

Browse files
committed
Allow disabling subtitles on mpv thumbnailing
1 parent dd3a608 commit 1a0f189

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/options.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ local thumbnailer_options = {
1616
-- Note: mpv is a bit slower, but includes eg. subtitles in the previews!
1717
prefer_mpv = false,
1818

19+
-- Explicitly disable subtitles on the mpv sub-calls
20+
mpv_no_sub = false,
21+
1922
-- Disable the built-in keybind ("T") to add your own
2023
disable_keybinds = false,
2124

src/thumbnailer_server.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ function create_thumbnail_mpv(file_path, timestamp, size, output_path)
2222
"--frames=1",
2323
"--hr-seek=yes",
2424
"--no-audio",
25+
-- Optionally disable subtitles
26+
(thumbnailer_options.mpv_no_sub and "--no-sub" or nil),
2527

2628
("--vf=scale=%d:%d"):format(size.w, size.h),
2729
"--vf-add=format=bgra",

0 commit comments

Comments
 (0)