Skip to content

Commit

Permalink
Debug mode console outputs now does not contain brackets and & making…
Browse files Browse the repository at this point in the history
… the command run in subshell
  • Loading branch information
pjaspinski committed Oct 18, 2020
1 parent b24f0ed commit aa16141
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions youtube-dl-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class YoutubeDlCard extends LitElement {
this._hass = hass;
this.state = {
returnedInfo: this._hass.states[this._config.sensor].state
}
};
if(this.state.returnedInfo == "Download complete!" || this.state.returnedInfo == "Error!"){
this.disableButton = false;
}
Expand All @@ -98,7 +98,7 @@ class YoutubeDlCard extends LitElement {
onButtonClick() {
this.disableButton = true;
this.command = this.command_before_url + this.url + this.command_after_url;
if(this._config.debug) console.log("Youtube-DL card command output: \n"+this.command);
if(this._config.debug) console.log("Youtube-DL card command output: \n"+this.command.substring(1,this.command.length-3));
this._hass.callService("script","turn_on",{
entity_id: this._config.script, variables: {command: this.command}
});
Expand Down

0 comments on commit aa16141

Please sign in to comment.