Checking output of youtube-dl when downloading[ci skip]
This commit is contained in:
parent
488391c9da
commit
a5bebd06c8
|
@ -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,
|
||||
|
|
|
@ -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 {
|
||||
|
|
Reference in a new issue