From 394422232579cd77eecb880fcfa544ecde6ac299 Mon Sep 17 00:00:00 2001 From: Naser Mirzaei Date: Sun, 16 Oct 2016 17:27:14 +0330 Subject: [PATCH 1/2] add caption to audio --- configs.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configs.go b/configs.go index b91d070..7302f4e 100644 --- a/configs.go +++ b/configs.go @@ -278,6 +278,7 @@ type AudioConfig struct { Duration int Performer string Title string + Caption string } // values returns a url.Values representation of AudioConfig. @@ -295,6 +296,9 @@ func (config AudioConfig) values() (url.Values, error) { if config.Title != "" { v.Add("title", config.Title) } + if config.Caption != "" { + v.Add("caption", config.Caption) + } return v, nil } From b6ec41750b565069fe8325c53580e2710d0e5784 Mon Sep 17 00:00:00 2001 From: Naser Mirzaei Date: Sun, 16 Oct 2016 17:53:46 +0330 Subject: [PATCH 2/2] add caption to audio config params --- configs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs.go b/configs.go index 7302f4e..787cb2c 100644 --- a/configs.go +++ b/configs.go @@ -317,6 +317,9 @@ func (config AudioConfig) params() (map[string]string, error) { if config.Title != "" { params["title"] = config.Title } + if config.Caption != "" { + params["caption"] = config.Caption + } return params, nil }