fix: lax chapter range patterns producing false positives (#454)
This commit is contained in:

committed by
GitHub

parent
94ec120923
commit
1dfbbd7091
@@ -428,10 +428,23 @@ end
|
|||||||
function serialize_chapter_ranges(normalized_chapters)
|
function serialize_chapter_ranges(normalized_chapters)
|
||||||
local ranges = {}
|
local ranges = {}
|
||||||
local simple_ranges = {
|
local simple_ranges = {
|
||||||
{name = 'openings', patterns = {'^op ', '^op$', ' op$', 'opening$'}, requires_next_chapter = true},
|
{name = 'openings', patterns = {
|
||||||
{name = 'intros', patterns = {'^intro$'}, requires_next_chapter = true},
|
'^op ', '^op$', ' op$',
|
||||||
{name = 'endings', patterns = {'^ed ', '^ed$', ' ed$', 'ending$', 'closing$'}},
|
'^opening$', ' opening$'
|
||||||
{name = 'outros', patterns = {'^outro$'}},
|
}, requires_next_chapter = true},
|
||||||
|
{name = 'intros', patterns = {
|
||||||
|
'^intro$', ' intro$',
|
||||||
|
'^avant$', '^prologue$'
|
||||||
|
}, requires_next_chapter = true},
|
||||||
|
{name = 'endings', patterns = {
|
||||||
|
'^ed ', '^ed$', ' ed$',
|
||||||
|
'^ending ', '^ending$', ' ending$',
|
||||||
|
}},
|
||||||
|
{name = 'outros', patterns = {
|
||||||
|
'^outro$', ' outro$',
|
||||||
|
'^closing$', '^closing ',
|
||||||
|
'^preview$', '^pv$',
|
||||||
|
}},
|
||||||
}
|
}
|
||||||
local sponsor_ranges = {}
|
local sponsor_ranges = {}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user