mikedmor / OctoPrint_MultiCam

Extends the Control tab of OctoPrint, allowing the ability to switch between multiple webcam feeds.
45 stars 19 forks source link

take_webcam_snapshot() should accept a string as parameter #71

Open bchanudet opened 1 month ago

bchanudet commented 1 month ago

Hello there,

I'm the author of the OctoRant plugin, a plugin that sends messages from OctoPrint to Discord using Webhooks.

A user has reported a bug where OctoRant is not sending any message when used in combination with MultiCam.

After investigation the crash happens when my plugin calls take_webcam_snapshot(). According to the docs, I call take_webcam_snapshot() with a string containing the webcam's name, but your plugin seems to expect a complete Webcam object, according to __init__.py:159.

Looking further it seems that even OctoPrint's own timelapse plugin is sending a full Webcam object, yet at some other places it sends only the name. Maybe I'll raise an issue on their side too.

bchanudet commented 1 month ago

Given the doubts raised by reading OctoPrint source code about the usage of take_webcam_snapshot(), I've asked about it on the Discord server, I'll report back here when I have an answer.