Skip to content

Commit ba8906e

Browse files
committed
Merge branch 'master' into dev
2 parents 33b2fd1 + 5467376 commit ba8906e

File tree

6 files changed

+11
-30
lines changed

6 files changed

+11
-30
lines changed

Dockerfile.python2

Lines changed: 0 additions & 11 deletions
This file was deleted.

docker-compose.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
version: '3.7'
22

33
services:
4-
op_python2:
5-
hostname: octoprint_python2
6-
restart: unless-stopped
7-
build:
8-
context: .
9-
dockerfile: Dockerfile.python2
10-
ports:
11-
- "${OP_PYTHON2_PORT-5002}:5000"
12-
volumes:
13-
- ./:/app
14-
environment:
15-
DEBUG: 'True'
16-
JANUS_SERVER: 'janus'
17-
depends_on:
18-
- janus
19-
command: bash -c "sleep 11111111111"
20-
214
op:
225
hostname: octoprint
236
restart: unless-stopped

octoprint_obico/janus_config_builder.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def streaming_jcfg_rtsp_section(stream_id, rtsp_url, dataport):
123123
videopt = 96
124124
videortpmap = "H264/90000"
125125
videofmtp = "profile-level-id=42e01f;packetization-mode=1"
126+
videobufferkf = true
126127
data = true
127128
dataport = {dataport}
128129
datatype = "binary"
@@ -148,6 +149,7 @@ def streaming_jcfg_rtp_section(stream_id, videoport, videortcpport, dataport):
148149
videopt = 96
149150
videortpmap = "H264/90000"
150151
videofmtp = "profile-level-id=42e01f;packetization-mode=1"
152+
videobufferkf = true
151153
data = true
152154
dataport = {dataport}
153155
datatype = "binary"

octoprint_obico/print_job_tracker.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ def status(self, plugin, status_only=False):
9696
data['status']['_ts'] = int(time.time())
9797
data['status']['currentLayerHeight'] = self.current_layer_height # use camel-case to be consistent with the existing convention
9898

99+
# Backfill progress.filamentUsed from job.filament.tool0.length for new OctoPrint versions
100+
progress = (data.get('status') or {}).get('progress') or {}
101+
if progress and 'filamentUsed' not in progress:
102+
filament_length = ((((data.get('status') or {}).get('job') or {}).get('filament') or {}).get('tool0') or {}).get('length')
103+
if filament_length is not None:
104+
progress['filamentUsed'] = filament_length
105+
99106
if status_only:
100107
if self._file_metadata_cache:
101108
data['status']['file_metadata'] = self._file_metadata_cache

octoprint_obico/webcam_stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ def preconfigured_webcams(self):
539539
preconfigured = json.loads(os.getenv('PRECONFIGURED_WEBCAMS'))
540540

541541
if preconfigured:
542-
self.janus = JanusConn(self.plugin, preconfigured['janus_server'], JANUS_WS_PORT)
542+
self.janus = JanusConn(self.plugin, preconfigured['janus_server'])
543543
self.janus.start_janus_ws()
544544

545545
return preconfigured

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
plugin_name = "OctoPrint-Obico"
1515

1616
# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
17-
plugin_version = "2.5.2"
17+
plugin_version = "2.5.5"
1818

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

0 commit comments

Comments
 (0)