Skip to content

Commit

Permalink
Merge pull request #60 from jneilliii/0.5.2
Browse files Browse the repository at this point in the history
0.5.2
  • Loading branch information
jneilliii authored Sep 11, 2020
2 parents f7bfcbe + 1e3d927 commit e346c1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions octoprint_youtubelive/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def on_after_startup(self):
self.container = self.client.containers.get('YouTubeLive')
self._logger.info("%s is streaming " % self.container.name)
self._plugin_manager.send_plugin_message(self._identifier, dict(status=True,streaming=True))
except Exception, e:
except Exception as e:
self._logger.error(str(e))
self._plugin_manager.send_plugin_message(self._identifier, dict(status=True,streaming=False))

Expand Down Expand Up @@ -96,7 +96,7 @@ def startStream(self):
try:
self.container = self.client.containers.run("octoprint/youtubelive:latest",command=[self._settings.global_get(["webcam","stream"]),self._settings.get(["stream_id"]),",".join(filters)],detach=True,privileged=False,devices=["/dev/vchiq"],name="YouTubeLive",auto_remove=True,network_mode="host")
self._plugin_manager.send_plugin_message(self._identifier, dict(status=True,streaming=True))
except Exception, e:
except Exception as e:
self._plugin_manager.send_plugin_message(self._identifier, dict(error=str(e),status=True,streaming=False))
return

Expand All @@ -106,7 +106,7 @@ def stopStream(self):
self.container.stop()
self.container = None
self._plugin_manager.send_plugin_message(self._identifier, dict(status=True,streaming=False))
except Exception, e:
except Exception as e:
self._plugin_manager.send_plugin_message(self._identifier, dict(error=str(e),status=True,streaming=False))
else:
self._plugin_manager.send_plugin_message(self._identifier, dict(status=True,streaming=False))
Expand All @@ -130,6 +130,7 @@ def get_update_information(self):
)

__plugin_name__ = "YouTube Live"
__plugin_pythoncompat__ = ">=2.7,<4"

def __plugin_load__():
global __plugin_implementation__
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "YouTube Live"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.5.1"
plugin_version = "0.5.2"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit e346c1b

Please sign in to comment.