From 57af9be21378ec0615fbafa4d524c1fe7b989e9e Mon Sep 17 00:00:00 2001 From: Akhil Gupta Date: Fri, 6 Nov 2020 11:00:22 +0530 Subject: [PATCH] delete episode issue fixed --- service/podcastService.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/podcastService.go b/service/podcastService.go index 91c378e..5c3031d 100644 --- a/service/podcastService.go +++ b/service/podcastService.go @@ -174,10 +174,10 @@ func DeleteEpisodeFile(podcastItemId string) error { err = DeleteFile(podcastItem.DownloadPath) - if !os.IsNotExist(err) { + if err != nil && !os.IsNotExist(err) { return err } - fmt.Println("Setting file as deleted") + return SetPodcastItemAsNotDownloaded(podcastItem.ID, db.Deleted) } func DownloadSingleEpisode(podcastItemId string) error {