Add config for twitch client ID
This commit is contained in:
parent
edff85dfb0
commit
83987afd73
|
@ -243,3 +243,7 @@ channel-storage:
|
|||
service-socket:
|
||||
enabled: false
|
||||
socket: 'service.sock'
|
||||
|
||||
# Twitch Client ID for the data API (used for VOD lookups)
|
||||
# https://github.com/justintv/Twitch-API/blob/master/authentication.md#developer-setup
|
||||
twitch-client-id: null
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"author": "Calvin Montgomery",
|
||||
"name": "CyTube",
|
||||
"description": "Online media synchronizer and chat",
|
||||
"version": "3.21.3",
|
||||
"version": "3.21.4",
|
||||
"repository": {
|
||||
"url": "http://github.com/calzoneman/sync"
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue