ytdl_hook: sort chapters by time

mpv doesn't work well with unordered chapters.
ex: https://youtu.be/DIKPUL6b4N8
This commit is contained in:
Ricardo Constantino 2016-11-13 17:02:50 +00:00
parent 274c6f36f5
commit 03ea61c895
No known key found for this signature in database
GPG Key ID: EFD16019AE4FF531
1 changed files with 1 additions and 1 deletions

View File

@ -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