mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-26 18:59:25 +02:00
Fix:Podcast episode downloads where RSS feed uses the same title #1802
This commit is contained in:
parent
7a0f27e3cc
commit
ea79948122
3 changed files with 14 additions and 2 deletions
|
@ -15,6 +15,8 @@ class PodcastEpisodeDownload {
|
|||
this.isFinished = false
|
||||
this.failed = false
|
||||
|
||||
this.appendEpisodeId = false
|
||||
|
||||
this.startedAt = null
|
||||
this.createdAt = null
|
||||
this.finishedAt = null
|
||||
|
@ -29,6 +31,7 @@ class PodcastEpisodeDownload {
|
|||
libraryId: this.libraryId || null,
|
||||
isFinished: this.isFinished,
|
||||
failed: this.failed,
|
||||
appendEpisodeId: this.appendEpisodeId,
|
||||
startedAt: this.startedAt,
|
||||
createdAt: this.createdAt,
|
||||
finishedAt: this.finishedAt,
|
||||
|
@ -52,7 +55,9 @@ class PodcastEpisodeDownload {
|
|||
}
|
||||
|
||||
get targetFilename() {
|
||||
return sanitizeFilename(`${this.podcastEpisode.title}.${this.fileExtension}`)
|
||||
const appendage = this.appendEpisodeId ? ` (${this.podcastEpisode.id})` : ''
|
||||
const filename = `${this.podcastEpisode.title}${appendage}.${this.fileExtension}`
|
||||
return sanitizeFilename(filename)
|
||||
}
|
||||
get targetPath() {
|
||||
return Path.join(this.libraryItem.path, this.targetFilename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue