AlbertMN / AssistantComputerControl

Control your computer with your Google Home or Amazon Alexa assistant!
MIT License
879 stars 61 forks source link

Add special paths to `open` action #122

Closed Chris7X closed 2 years ago

Chris7X commented 2 years ago

Added management of special paths for "open" command

AlbertMN commented 2 years ago

Hi @Chris7X :) Thanks for the addition! I merged, but gonna do some changes to your code that I didn't bother requesting a revision for. But, for future reference;

} else {

}

Rather than

if (...) {

} else {

}



Then there were a few empty spaces and tabs, and the comments were `// like this`, while the standard for the rest of the code is `//Like this`

- The title of the Pull Request should explain what the change does _(I changed the title)_

These are the few things I've corrected. I can see this is your first pull request, so well done! These are minor things, and your contribution will surely help many ACC users :)

I will try and see if I can get hotfix `v1.4.6` out today, that fixes a bug and adds this.

Thanks again, keep it coming if you got anything else you wish to be added 💪
AlbertMN commented 2 years ago

Ended up re-writing this one quite a bit - check the referenced commit above for more info.

After further inspection of the PR while testing, the code was not quite in the right place. Moved it from being a part of the secondary parameter check, to being an independent function that is used by the open actions as well as a few other actions where paths are a part of the parameters.

Still using some of the base-code, just restructured quite a bit :)