mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-29 01:58:49 +01:00
Update server/objects/FeedEpisode.js
This commit is contained in:
parent
8c23704e17
commit
df7e331605
@ -92,10 +92,10 @@ class FeedEpisode {
|
||||
const media = libraryItem.media
|
||||
const mediaMetadata = media.metadata
|
||||
|
||||
let title = audioTrack.title
|
||||
if (libraryItem.media.tracks.length == 1) { // If audiobook is a single file, use book title instead of chapter/file title
|
||||
var title = libraryItem.media.metadata.title
|
||||
title = libraryItem.media.metadata.title
|
||||
} else {
|
||||
var title = audioTrack.title
|
||||
if (libraryItem.media.chapters.length) {
|
||||
// If audio track start and chapter start are within 1 seconds of eachother then use the chapter title
|
||||
var matchingChapter = libraryItem.media.chapters.find(ch => Math.abs(ch.start - audioTrack.startOffset) < 1)
|
||||
|
Loading…
Reference in New Issue
Block a user