From 536a08b0054dccf2fc4047f669d7fff5f9803a80 Mon Sep 17 00:00:00 2001 From: LazeMSS Date: Wed, 16 Aug 2023 16:53:12 +0200 Subject: [PATCH 1/4] Fixed bad handling of classic cam plugin warning: #60 --- octoprint_multicam/__init__.py | 2 +- octoprint_multicam/static/js/multicam_settings.js | 2 +- octoprint_multicam/templates/multicam_settings.jinja2 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/octoprint_multicam/__init__.py b/octoprint_multicam/__init__.py index 3e7239f..97bd30b 100644 --- a/octoprint_multicam/__init__.py +++ b/octoprint_multicam/__init__.py @@ -40,7 +40,7 @@ def get_classic_webcam_status(self): return flask.jsonify(enabled=self.isClassicWebcamEnabled()) def isClassicWebcamEnabled(self): - plugin = self._plugin_manager.get_plugin("classicwebcam") + plugin = self._plugin_manager.get_plugin("classicwebcam",True) return plugin is not None def get_settings_version(self): diff --git a/octoprint_multicam/static/js/multicam_settings.js b/octoprint_multicam/static/js/multicam_settings.js index d9a22c2..4f9e4e9 100644 --- a/octoprint_multicam/static/js/multicam_settings.js +++ b/octoprint_multicam/static/js/multicam_settings.js @@ -73,7 +73,7 @@ $(function () { url: "/plugin/multicam/classicwebcamstatus", type: "GET", success: function (response) { - self.isClassicWebcamEnabled = response.enabled; + self.isClassicWebcamEnabled(response.enabled); //console.log("DEBUGGG isClassicWebcamEnabled", self.isClassicWebcamEnabled) //TODO: Inform the user that the classic webcam is enabled and they should consider disabling it diff --git a/octoprint_multicam/templates/multicam_settings.jinja2 b/octoprint_multicam/templates/multicam_settings.jinja2 index 6ee3fb3..49f5cdb 100644 --- a/octoprint_multicam/templates/multicam_settings.jinja2 +++ b/octoprint_multicam/templates/multicam_settings.jinja2 @@ -1,7 +1,7 @@

{{ _('Multicam Profiles') }}

-