Fixing issue with youtube-dl and ffmpeg
This commit is contained in:
parent
9d80bcd1f6
commit
82f00aaf13
1
test.go
1
test.go
|
@ -80,5 +80,6 @@ func (t TestSettings) testYoutubeSong() {
|
||||||
skip(dummyUser, false, false)
|
skip(dummyUser, false, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
os.Exit(0)
|
||||||
//dummyClient.Disconnect()
|
//dummyClient.Disconnect()
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ func (dl *YouTubeDLSong) Download() error {
|
||||||
|
|
||||||
// Checks to see if song is already downloaded
|
// 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) {
|
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", "--output", fmt.Sprintf("%s/.mumbledj/songs/%s", dj.homeDir, dl.Filename()), "--format m4a", "--prefer-ffmpeg", "--", dl.ID())
|
||||||
err = cmd.Run()
|
err = cmd.Run()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if dj.conf.Cache.Enabled {
|
if dj.conf.Cache.Enabled {
|
||||||
|
|
Reference in a new issue