Fix:Podcast episodes duplicated when a scan runs while the episode is downloading #2785

This commit is contained in:
advplyr committed 2024-11-07 17:26:51 -06:00
1 parent a5ebd89817
commit 850ed48955
5 files changed
+40 -6

No files matched your search

+3
View File
@@ -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())