Checking output of youtube-dl when downloading[ci skip]

This commit is contained in:
MichaelOultram 2015-08-13 14:07:04 +01:00
parent 488391c9da
commit a5bebd06c8
2 changed files with 2 additions and 1 deletions

View file

@ -165,6 +165,7 @@ func (yt YouTube) NewSong(user *gumble.User, id, offset string, playlist Playlis
submitter: user,
title: title,
id: id,
url: "https://youtu.be/" + id,
offset: int((offsetDays * 86400) + (offsetHours * 3600) + (offsetMinutes * 60) + offsetSeconds),
duration: durationString,
thumbnail: thumbnail,

View file

@ -40,7 +40,7 @@ func (dl *YouTubeDLSong) Download() error {
// Checks to see if song is already downloaded
if _, err := os.Stat(fmt.Sprintf("%s/.mumbledj/songs/%s", dj.homeDir, dl.Filename())); os.IsNotExist(err) {
cmd := exec.Command("youtube-dl", "--output", fmt.Sprintf("%s/.mumbledj/songs/%s", dj.homeDir, dl.Filename()), "--format m4a", "--prefer-ffmpeg", "--", dl.url)
cmd := exec.Command("youtube-dl", "--no-mtime", "--output", fmt.Sprintf("%s/.mumbledj/songs/%s", dj.homeDir, dl.Filename()), "--format m4a", "--prefer-ffmpeg", "--", dl.url)
err = cmd.Run()
if err == nil {
if dj.conf.Cache.Enabled {