Skip to content
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

Merged
merged 10 commits into from
Mar 6, 2024

Conversation

Links2004
Copy link
Contributor

see #12, #7

@Links2004
Copy link
Contributor Author

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

@Cadair
Copy link
Owner

Cadair commented Dec 27, 2021

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.

Copy link
Owner

@Cadair Cadair left a 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.

Comment on lines 294 to 297
def take_image(self, snapshot_url=""):
if snapshot_url == "":
snapshot_url = self._settings.global_get(["webcam", "snapshot"])
if snapshot_url == "":
Copy link
Owner

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:

Suggested change
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:

Copy link
Contributor Author

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 ;)

octoprint_matrix_notifier/plugin.py Outdated Show resolved Hide resolved
octoprint_matrix_notifier/plugin.py Outdated Show resolved Hide resolved
octoprint_matrix_notifier/plugin.py Outdated Show resolved Hide resolved
octoprint_matrix_notifier/plugin.py Outdated Show resolved Hide resolved
@Cadair Cadair merged commit 2141cc8 into Cadair:main Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants