Checking output of youtube-dl when downloading[ci skip]
This commit is contained in:
parent
255c516967
commit
fa0dd24677
|
@ -34,7 +34,7 @@ type Song interface {
|
|||
Title() string
|
||||
ID() string
|
||||
Filename() string
|
||||
Duration() int
|
||||
Duration() string
|
||||
Thumbnail() string
|
||||
Playlist() Playlist
|
||||
DontSkip() bool
|
||||
|
|
|
@ -102,7 +102,7 @@ func (sc SoundCloud) NewSong(user *gumble.User, trackData *jsonq.JsonQuery, play
|
|||
url: url,
|
||||
thumbnail: thumbnail,
|
||||
submitter: user,
|
||||
duration: duration,
|
||||
duration: string(duration),
|
||||
playlist: playlist,
|
||||
skippers: make([]string, 0),
|
||||
dontSkip: false,
|
||||
|
|
|
@ -17,7 +17,7 @@ type YouTubeDLSong struct {
|
|||
title string
|
||||
thumbnail string
|
||||
submitter *gumble.User
|
||||
duration int
|
||||
duration string
|
||||
url string
|
||||
offset int
|
||||
playlist Playlist
|
||||
|
@ -52,7 +52,7 @@ func (dl *YouTubeDLSong) Download() error {
|
|||
for s := range cmd.Args {
|
||||
Verbose("youtube-dl args: " + cmd.Args[s])
|
||||
}
|
||||
Verbose(string(cmd.Output()))
|
||||
Verbose(string(cmd.CombinedOutput()))
|
||||
return errors.New("Song download failed.")
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ func (dl *YouTubeDLSong) Filename() string {
|
|||
}
|
||||
|
||||
// Duration returns the duration of the Song.
|
||||
func (dl *YouTubeDLSong) Duration() int {
|
||||
func (dl *YouTubeDLSong) Duration() string {
|
||||
return dl.duration
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue