diff --git a/config.template.yaml b/config.template.yaml index e88873e1..74749d58 100644 --- a/config.template.yaml +++ b/config.template.yaml @@ -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 diff --git a/package.json b/package.json index cbabe27f..86eb616e 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/src/config.js b/src/config.js index e328a34a..6f9dc4ac 100644 --- a/src/config.js +++ b/src/config.js @@ -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; }