Skip to content

Commit

Permalink
fix(playlist): download files issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaraa committed Jul 1, 2024
1 parent b71b5d4 commit 980f9ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/services/playlists/playlists.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,10 @@ func (p *Service) Download(playlistPubId string, ownerId uint) (io.Reader, error
fmt.Sprintf("%s/%d-%s.mp3", config.Env().YouTube.MusicDir, i+1, song.Title),
os.O_WRONLY|os.O_CREATE, 0644,
)
io.Copy(newShit, ogFile)
if err != nil {
return nil, err
}
_, _ = io.Copy(newShit, ogFile)
fileNames[i] = newShit.Name()
_ = newShit.Close()
_ = ogFile.Close()
Expand Down

0 comments on commit 980f9ee

Please sign in to comment.