-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
better snapshot and fix markdown in notification plain text #13
Conversation
I have mutlicam support ready if this is merged, since the code is based on the changes here. https://github.com/Links2004/octoprint-matrix-notifier-plugin/tree/multicam |
Thanks a lot for the contribution! The fact that there isn't a way to get the image with the correct metadata from upstream seems pretty wild. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few little code cleanups, but otherwise looks great thanks.
octoprint_matrix_notifier/plugin.py
Outdated
def take_image(self, snapshot_url=""): | ||
if snapshot_url == "": | ||
snapshot_url = self._settings.global_get(["webcam", "snapshot"]) | ||
if snapshot_url == "": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a little cleaner:
def take_image(self, snapshot_url=""): | |
if snapshot_url == "": | |
snapshot_url = self._settings.global_get(["webcam", "snapshot"]) | |
if snapshot_url == "": | |
def take_image(self, snapshot_url=None: | |
if not snapshot_url: | |
snapshot_url = self._settings.global_get(["webcam", "snapshot"]) | |
if not snapshot_url: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update the branch with the multicam support changes which refactor this place ;)
Co-authored-by: Stuart Mumford <stuart@cadair.com>
see #12, #7