From 976228683b99aefb408779739babec8f8bf91745 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Tue, 7 Apr 2015 15:42:24 -0500 Subject: [PATCH] Add note to config template, fix improper err callback --- config.template.yaml | 2 ++ lib/get-info.js | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config.template.yaml b/config.template.yaml index 71fb870f..85ecd3d8 100644 --- a/config.template.yaml +++ b/config.template.yaml @@ -122,6 +122,8 @@ mail: # See https://developers.google.com/youtube/registering_an_application # Google is closing the v2 API (which allowed anonymous requests) on # April 20, 2015 so you must register a v3 API key now. +# NOTE: You must generate a Server key under Public API access, NOT a +# browser key. youtube-v3-key: '' # Minutes between saving channel state to disk channel-save-interval: 5 diff --git a/lib/get-info.js b/lib/get-info.js index bdf592d4..52a36813 100644 --- a/lib/get-info.js +++ b/lib/get-info.js @@ -79,7 +79,7 @@ var Getters = { var media = new Media(video.id, video.title, video.duration, "yt", meta); callback(false, media); }).catch(function (err) { - callback(err.message, null); + callback(err.message || err, null); }); }, @@ -101,7 +101,7 @@ var Getters = { callback(null, videos); }).catch(function (err) { - callback(err.message, null); + callback(err.message || err, null); }); }, @@ -126,7 +126,7 @@ var Getters = { callback(null, videos); }).catch(function (err) { - callback(err.message, null); + callback(err.message || err, null); }); },