fix(podcasts): make sure we use safeFilename for podcast episodes too (#339)

Co-authored-by: Brian Doherty <brian@mediaserver.dohertyfamily.me>
This commit is contained in:
brian-doherty
2023-07-17 05:58:36 -05:00
committed by GitHub
parent b4df1fa3f6
commit 5fb9c49ed2

View File

@@ -419,7 +419,7 @@ func (p *Podcasts) DownloadEpisode(episodeID int) error {
} }
filename = path.Base(audioURL.Path) filename = path.Base(audioURL.Path)
} }
filename = p.findUniqueEpisodeName(&podcast, &podcastEpisode, filename) filename = p.findUniqueEpisodeName(&podcast, &podcastEpisode, safeFilename(filename))
audioFile, err := os.Create(path.Join(absPath(p.baseDir, &podcast), filename)) audioFile, err := os.Create(path.Join(absPath(p.baseDir, &podcast), filename))
if err != nil { if err != nil {
return fmt.Errorf("create audio file: %w", err) return fmt.Errorf("create audio file: %w", err)