mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-22 11:21:31 +00:00
Update logging to use info for key logs, also use [PodcastEpisode] prefix to match other logs
This commit is contained in:
parent
b3ba764d11
commit
32ea3e08d6
1 changed files with 2 additions and 2 deletions
|
|
@ -87,7 +87,7 @@ class PodcastEpisode extends Model {
|
||||||
} else if (rssPodcastEpisode.chapters?.length) {
|
} else if (rssPodcastEpisode.chapters?.length) {
|
||||||
podcastEpisode.chapters = rssPodcastEpisode.chapters.map((ch) => ({ ...ch }))
|
podcastEpisode.chapters = rssPodcastEpisode.chapters.map((ch) => ({ ...ch }))
|
||||||
} else {
|
} else {
|
||||||
Logger.debug("Podcast episode doesn't have chapters, attempting to generate them from timestamps", rssPodcastEpisode.title)
|
Logger.info("[PodcastEpisode] New episode doesn't have chapters, attempting to generate them from timestamps", rssPodcastEpisode.title)
|
||||||
try {
|
try {
|
||||||
let autoGeneratedChapters = PodcastEpisode.autoGenerateChaptersFromTimestamps(podcastEpisode.description, podcastEpisode.audioFile.duration)
|
let autoGeneratedChapters = PodcastEpisode.autoGenerateChaptersFromTimestamps(podcastEpisode.description, podcastEpisode.audioFile.duration)
|
||||||
podcastEpisode.chapters = autoGeneratedChapters
|
podcastEpisode.chapters = autoGeneratedChapters
|
||||||
|
|
@ -313,7 +313,7 @@ class PodcastEpisode extends Model {
|
||||||
newChapters[newChapters.length - 1].end = audioDurationSecs
|
newChapters[newChapters.length - 1].end = audioDurationSecs
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.debug(`Successfully gnerated ${newChapters.length} chapters`)
|
Logger.info(`[PodcastEpisode] Successfully gnerated ${newChapters.length} chapters`)
|
||||||
|
|
||||||
if (newChapters.length == 1) {
|
if (newChapters.length == 1) {
|
||||||
throw new Error('Only one chapter found, treating as invalid description')
|
throw new Error('Only one chapter found, treating as invalid description')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue