mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-06 07:25:03 +02:00
Add volume number parsing to scanner
This commit is contained in:
parent
80e2e35dcd
commit
07994d38d5
5 changed files with 32 additions and 8 deletions
|
@ -171,13 +171,11 @@ class Stream extends EventEmitter {
|
|||
this.furthestSegmentCreated = lastSegment
|
||||
}
|
||||
|
||||
// console.log('SORT', [...this.segmentsCreated].slice(0, 200).join(', '), segments.slice(0, 200).join(', '))
|
||||
segments.forEach((seg) => {
|
||||
if (!current_chunk.length || last_seg_in_chunk + 1 === seg) {
|
||||
last_seg_in_chunk = seg
|
||||
current_chunk.push(seg)
|
||||
} else {
|
||||
// console.log('Last Seg is not equal to - 1', last_seg_in_chunk, seg)
|
||||
if (current_chunk.length === 1) chunks.push(current_chunk[0])
|
||||
else chunks.push(`${current_chunk[0]}-${current_chunk[current_chunk.length - 1]}`)
|
||||
last_seg_in_chunk = seg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue