Skip to content
This repository has been archived by the owner on Jan 20, 2021. It is now read-only.

Commit

Permalink
Merge pull request #80 from CMahaff/master
Browse files Browse the repository at this point in the history
Fixed cache clearing earlier than expected
  • Loading branch information
matthieugrieger committed Aug 13, 2015
2 parents 6415a59 + 2df3613 commit ccf4f6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service_youtube.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func NewYouTubeSong(user, id, offset string, playlist *YouTubePlaylist) (*YouTub
// All downloaded songs are stored in ~/.mumbledj/songs and should be automatically cleaned.
func (s *YouTubeSong) Download() error {
if _, err := os.Stat(fmt.Sprintf("%s/.mumbledj/songs/%s", dj.homeDir, s.Filename())); os.IsNotExist(err) {
cmd := exec.Command("youtube-dl", "--output", fmt.Sprintf(`~/.mumbledj/songs/%s`, s.Filename()), "--format", "m4a", "--", s.ID())
cmd := exec.Command("youtube-dl", "--no-mtime", "--output", fmt.Sprintf(`~/.mumbledj/songs/%s`, s.Filename()), "--format", "m4a", "--", s.ID())
if err := cmd.Run(); err == nil {
if dj.conf.Cache.Enabled {
dj.cache.CheckMaximumDirectorySize()
Expand Down

0 comments on commit ccf4f6c

Please sign in to comment.