mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-13 06:51:29 +00:00
Update updating of end values to use new chaptersToPush temp array
This commit is contained in:
parent
e096a04603
commit
256c341f06
1 changed files with 4 additions and 4 deletions
|
|
@ -141,8 +141,8 @@ class PodcastEpisode extends Model {
|
|||
|
||||
let chapter = { title: chapterTitleMatch[1].trim(), id: i, start: startTime }
|
||||
|
||||
if (podcastEpisode.chapters.length > 0) {
|
||||
podcastEpisode.chapters[podcastEpisode.chapters.length - 1].end = startTime
|
||||
if (chaptersToPush.length > 0) {
|
||||
chaptersToPush[chaptersToPush.length - 1].end = startTime
|
||||
}
|
||||
|
||||
chaptersToPush.push(chapter)
|
||||
|
|
@ -150,8 +150,8 @@ class PodcastEpisode extends Model {
|
|||
Logger.debug('Added chapter', chapter)
|
||||
}
|
||||
if (errorMessage == null) {
|
||||
if (podcastEpisode.chapters.length > 0) {
|
||||
podcastEpisode.chapters[podcastEpisode.chapters.length - 1].end = podcastEpisode.audioFile.duration
|
||||
if (chaptersToPush.length > 0) {
|
||||
chaptersToPush[chaptersToPush.length - 1].end = podcastEpisode.audioFile.duration
|
||||
}
|
||||
|
||||
podcastEpisode.chapters.push(...chaptersToPush)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue