mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-24 12:54:31 +02:00
Fix:Podcast episodes duplicated when a scan runs while the episode is downloading #2785
This commit is contained in:
parent
a5ebd89817
commit
850ed48955
5 changed files with 40 additions and 6 deletions
|
@ -97,6 +97,7 @@ class PodcastManager {
|
|||
|
||||
// Ignores all added files to this dir
|
||||
Watcher.addIgnoreDir(this.currentDownload.libraryItem.path)
|
||||
Watcher.ignoreFilePathsDownloading.add(this.currentDownload.targetPath)
|
||||
|
||||
// Make sure podcast library item folder exists
|
||||
if (!(await fs.pathExists(this.currentDownload.libraryItem.path))) {
|
||||
|
@ -151,6 +152,8 @@ class PodcastManager {
|
|||
SocketAuthority.emitter('episode_download_queue_updated', this.getDownloadQueueDetails())
|
||||
|
||||
Watcher.removeIgnoreDir(this.currentDownload.libraryItem.path)
|
||||
|
||||
Watcher.ignoreFilePathsDownloading.delete(this.currentDownload.targetPath)
|
||||
this.currentDownload = null
|
||||
if (this.downloadQueue.length) {
|
||||
this.startPodcastEpisodeDownload(this.downloadQueue.shift())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue