mirror of https://github.com/mpv-player/mpv
ytdl_hook: sort chapters by time
mpv doesn't work well with unordered chapters. ex: https://youtu.be/DIKPUL6b4N8
This commit is contained in:
parent
274c6f36f5
commit
03ea61c895
|
@ -84,7 +84,7 @@ local function extract_chapters(data, video_length)
|
|||
table.insert(ret, {time = time, title = line})
|
||||
end
|
||||
end
|
||||
|
||||
table.sort(ret, function(a, b) return a.time < b.time end)
|
||||
return ret
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue