From 25203157bf19773d1a7b7f5ee83ea75750736550 Mon Sep 17 00:00:00 2001 From: Tony Shadwick Date: Mon, 19 Oct 2020 13:00:58 -0500 Subject: [PATCH] Changed index.js to not require the parameter "type" when calling this.getLocations. This allows compatibility with older DirecTV STBs. Please see https://github.com/cmrust/directv-remote/issues/2 and https://github.com/ToddGreenfield/homebridge-directv/issues/17 --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 76c9b78..6ccad83 100644 --- a/index.js +++ b/index.js @@ -90,6 +90,9 @@ module.exports.Remote = function(ipAddr) { if (typeof type !== 'undefined') { options.path = buildQueryString(options.path, { type: type }); } + else + options.path = buildQueryString(options.path); + } makeRequest(options, callbackHandler(callback)); }; @@ -317,4 +320,4 @@ module.exports.Remote = function(ipAddr) { return callback(new Error('HTTP request failed: ' + err)); }); }; -}; \ No newline at end of file +};