Skip to content

Commit

Permalink
0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jneilliii committed Sep 19, 2018
1 parent 7e52159 commit 852ab28
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion octoprint_rtmpstreamer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ def on_after_startup(self):
except Exception, e:
self._logger.error(str(e))
self._plugin_manager.send_plugin_message(self._identifier, dict(status=True,streaming=False))

if self._settings.get(["auto_start_on_power_up"]) and self._settings.get(["stream_url"]) != "":
self._logger.info("Auto starting stream on start up.")
self.startStream()

##~~ TemplatePlugin
def get_template_configs(self):
Expand All @@ -48,7 +52,7 @@ def on_event(self, event, payload):

##~~ SettingsPlugin
def get_settings_defaults(self):
return dict(view_url="",stream_url="",stream_resolution="640x480",stream_framerate="5",streaming=False,auto_start=False)
return dict(view_url="",stream_url="",stream_resolution="640x480",stream_framerate="5",streaming=False,auto_start=False,auto_start_on_power_up=False)

##~~ SimpleApiPlugin
def get_api_commands(self):
Expand Down
6 changes: 6 additions & 0 deletions octoprint_rtmpstreamer/templates/rtmpstreamer_settings.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@
<input class="input-checkbox" type="checkbox" data-bind="checked: settings.plugins.rtmpstreamer.auto_start"></input>
</div>
</div>
<div class="control-group" data-bind="visible: settings.plugins.rtmpstreamer.stream_url().length > 0">
<label class="control-label">{{ _('Stream On Startup') }}</label>
<div class="controls">
<input class="input-checkbox" type="checkbox" data-bind="checked: settings.plugins.rtmpstreamer.auto_start_on_power_up"></input>
</div>
</div>
</form>
Binary file modified settings_screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 = "RTMP Streamer"

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

# 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 852ab28

Please sign in to comment.