Skip to content

Commit

Permalink
Fixed Error downloading non existing mp3 link
Browse files Browse the repository at this point in the history
  • Loading branch information
pmcfernandes committed Jun 17, 2023
1 parent 2e7f3e1 commit 108615c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service/fileService.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ func Download(link string, episodeTitle string, podcastName string, prefix strin
req, err := getRequest(link)
if err != nil {
Logger.Errorw("Error creating request: "+link, err)
return "", err
}

resp, err := client.Do(req)
if err != nil {
Logger.Errorw("Error getting response: "+link, err)
return "", err
// Logger.Errorw("Error getting response: "+link, nil)
return link, nil
}

fileName := getFileName(link, episodeTitle, ".mp3")
Expand Down

0 comments on commit 108615c

Please sign in to comment.