Skip to content

Commit 6a0454c

Browse files
committed
fixup! select.lua: display commented titles in watch_later files
1 parent d0fcc85 commit 6a0454c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

player/lua/select.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,14 +518,16 @@ mp.add_key_binding(nil, "select-watch-later", function ()
518518
local file_handle = io.open(watch_later_file)
519519
if file_handle then
520520
local line1 = file_handle:read()
521-
local line2 = file_handle:read()
522521
if line1 and line1 ~= "# redirect entry" and line1:find("^#") then
523522
local entry = {
524523
path = line1:sub(3),
525524
time = utils.file_info(watch_later_file).mtime
526525
}
527-
if line2 and line2:find("^# title: ") then
528-
entry.title = line2:sub(10)
526+
for line in file_handle:lines() do
527+
if line:find("^# title: ") then
528+
entry.title = line:sub(10)
529+
break
530+
end
529531
end
530532
files[#files + 1] = entry
531533
end

0 commit comments

Comments
 (0)