From 6aae146f8b395f68966357021b05ec84896ecf27 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Tue, 17 Sep 2013 13:19:33 -0500 Subject: [PATCH] Fix ustream for channels with /channel/foo syntax; ustream wtf are you doing --- changelog | 4 ++++ lib/get-info.js | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/changelog b/changelog index 68b89172..9be048d3 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +Tue Sep 17 13:16 2013 CDT + * lib/get-info.js: Fix ustream for channels that have /channel/ in the + path. + Fri Sep 13 10:10 2013 CDT * www/reset.html: Fix data.js dependency * lib/api.js: Fix ActionLog trying to record wrong data. How long has diff --git a/lib/get-info.js b/lib/get-info.js index 091968ce..613dec23 100644 --- a/lib/get-info.js +++ b/lib/get-info.js @@ -515,7 +515,12 @@ module.exports = function (Server) { /* ustream.tv */ us: function (id, callback) { - var m = id.match(/([\w-]+)/); + // 2013-09-17 + // They couldn't fucking decide whether channels should + // be at http://www.ustream.tv/channel/foo or just + // http://www.ustream.tv/foo so they do both. + // [](/cleese) + var m = id.match(/([^\?&#]+)|(channel\/[^\?&#]+)/); if (m) { id = m[1]; } else {