diff --git a/service.go b/service.go index 08c7404..15a5947 100644 --- a/service.go +++ b/service.go @@ -34,7 +34,7 @@ type Song interface { Title() string ID() string Filename() string - Duration() int + Duration() string Thumbnail() string Playlist() Playlist DontSkip() bool diff --git a/service_soundcloud.go b/service_soundcloud.go index 6c3a5ef..1c3c77c 100644 --- a/service_soundcloud.go +++ b/service_soundcloud.go @@ -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, diff --git a/youtube_dl.go b/youtube_dl.go index cd17f8f..cd77416 100644 --- a/youtube_dl.go +++ b/youtube_dl.go @@ -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 }