summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert S. Gerus <ar@bash.org.pl>2015-12-24 09:53:50 +0100
committerRobert S. Gerus <ar@bash.org.pl>2015-12-24 09:53:50 +0100
commit37f5ac96d5df3f719318d71d921ff2b5a0f712e9 (patch)
tree4aa0d24ebd6837ed07301900c446ae315cde5e91
parent4998f0b548eb00ad92ed696f7e34cb746d5b4293 (diff)
downloadgorepost-37f5ac96d5df3f719318d71d921ff2b5a0f712e9.tar.gz
gorepost-37f5ac96d5df3f719318d71d921ff2b5a0f712e9.tar.bz2
gorepost-37f5ac96d5df3f719318d71d921ff2b5a0f712e9.zip
Give information about video author.
-rw-r--r--bot/plugins_test.go4
-rw-r--r--bot/urltitle.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/bot/plugins_test.go b/bot/plugins_test.go
index d20602a..2b7800f 100644
--- a/bot/plugins_test.go
+++ b/bot/plugins_test.go
@@ -818,7 +818,7 @@ var variableOutputTestEvents = []struct {
Name: "idontexist",
},
},
- outRegex: *regexp.MustCompile("^↳ title: Rick Astley - Never Gonna Give You Up"),
+ outRegex: *regexp.MustCompile("^↳ title: Rick Astley - Never Gonna Give You Up by RickAstleyVEVO$"),
function: linktitle,
},
{
@@ -830,7 +830,7 @@ var variableOutputTestEvents = []struct {
Name: "idontexist",
},
},
- outRegex: *regexp.MustCompile("^↳ title: Rick Astley - Never Gonna Give You Up"),
+ outRegex: *regexp.MustCompile("^↳ title: Rick Astley - Never Gonna Give You Up by RickAstleyVEVO$"),
function: linktitle,
},
}
diff --git a/bot/urltitle.go b/bot/urltitle.go
index f87a863..1b95640 100644
--- a/bot/urltitle.go
+++ b/bot/urltitle.go
@@ -38,7 +38,7 @@ func youtube(vid string) string {
if err != nil {
return "error decoding data from youtube"
}
- return dat["title"].(string)
+ return fmt.Sprint(dat["title"].(string), " by ", dat["author_name"].(string))
}
func youtubeLong(l string) string {