Add config for twitch client ID

This commit is contained in:
Calvin Montgomery 2016-09-18 21:35:08 -07:00
parent edff85dfb0
commit 83987afd73
3 changed files with 17 additions and 2 deletions

View file

@ -123,7 +123,8 @@ var defaults = {
},
"google-drive": {
"html5-hack-enabled": false
}
},
"twitch-client-id": null
};
/**
@ -379,6 +380,16 @@ function preprocessConfig(cfg) {
"information on registering an API key.");
}
if (cfg["twitch-client-id"]) {
require("cytube-mediaquery/lib/provider/twitch-vod").setClientID(
cfg["twitch-client-id"]);
} else {
Logger.errlog.log("Warning: No Twitch Client ID set. Twitch VOD links will " +
"not work. See twitch-client-id in config.template.yaml and " +
"https://github.com/justintv/Twitch-API/blob/master/authentication.md#developer-setup" +
"for more information on registering a client ID");
}
return cfg;
}