timmson / node-lgtv-api

Node.js API for the remote control of LG SmartTV (2012+)
MIT License
26 stars 8 forks source link

Fixing an XML builder bug #12

Closed geniusjam closed 4 years ago

geniusjam commented 4 years ago

When i tried to proceed a command, my code output something like this: (I have tried with multiple commands)

Error: Invalid character in name
    at XMLStringifier.module.exports.XMLStringifier.assertLegalName

I checked the source code and made some changes. The issue was that the params parameter had an array which was used as an object (Like this: { command: [ value: 21, name: 'HandleKeyInput' ] })

This is probably not the best way to fix this, but it does.

geniusjam commented 4 years ago

oh I just realised TV_CMD_MOUSE_MOVE doesn't work either. I log 'params': { command: [ 1, name: 'HandleTouchMove' ] }

geniusjam commented 4 years ago

Never mind I'm gonna file an issue instead because I couldn't deal with it myself