From ea07d55b9ef63f915aa65d07ea68da020d883664 Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 27 Apr 2015 09:23:27 +0000 Subject: [PATCH] fix youtube stuff --- modules/lastfm/lastfm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lastfm/lastfm.js b/modules/lastfm/lastfm.js index 24f7d13..7b979c8 100644 --- a/modules/lastfm/lastfm.js +++ b/modules/lastfm/lastfm.js @@ -222,7 +222,7 @@ var lastfm = function(dbot) { var term = track.name + ' ' + track.artist.name; dbot.api.youtube.search(term, function(body) { if(_.isObject(body) && _.has(body, 'items') && body.items.length > 0) { - var link = body.items[0].id + var link = body.items[0].id.videoId if(link) { output += ' - http://youtu.be/' + link; } @@ -274,7 +274,7 @@ var lastfm = function(dbot) { } dbot.api.youtube.search(term, function(body) { if(_.isObject(body) && _.has(body, 'items') && body.items.length > 0) { - var link = body.items[0].id + var link = body.items[0].id.videoId if(link) { output += ' - http://youtu.be/' + link; }