madmatt / streamdeck-plugins

A repository for featuring the best plugins for the Elgato StreamDeck
113 stars 45 forks source link

Please Add streamdeck-octodeck #35

Closed cpeuschel closed 3 years ago

cpeuschel commented 3 years ago

Plugin name: OctoDeck Plugin description: This plugin shows your 3D-Printer completion state in percent on your StreamDeck (OctoPrint required) Supports Windows (Yes/No): Yes Supports Mac (Yes/No): Not testet Author name: Christian Peuschel Homepage URL: https://github.com/cpeuschel Plugin download link: https://github.com/cpeuschel/streamdeck-octodeck/releases

BarRaider commented 3 years ago

Looks like you have a small bug in your code. https://github.com/cpeuschel/streamdeck-octodeck/blob/4c854a5afe9932662fe4567fab1d486e9f4b4c17/com.cpeuschel.octodeck.sdPlugin/main.html#L55

You should save this into a variable and stop it with the OnWillDisappear event, otherwise you'll cause a memory leak

cpeuschel commented 3 years ago

Hello @BarRaider, thank you for your code review. I have modified my code. Here is the PR. Do you think its ok now?

BarRaider commented 3 years ago

I think you may want to set autoUpdate back to null after calling clearInterval but it may be fine like this too. Eother way, yeah, it solves the issue I was referring to. I will push the update to add your plugin later today

cpeuschel commented 3 years ago

Thank you very much.