ytdl_hook: sort chapters by time
mpv doesn't work well with unordered chapters. ex: https://youtu.be/DIKPUL6b4N8
This commit is contained in:
1 file changed
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user