Skip to content

Commit 1e5fe51

Browse files
committed
[scanner] Fix incorrect string conversion for OutputMode
1 parent 1d6a057 commit 1e5fe51

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

dvr_scan/controller.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,5 @@ def run_dvr_scan(
210210
# start1-end1[,[+]start2-end2[,[+]start3-end3...]]
211211
print(",".join(timecode_list))
212212

213-
# TODO: Fix private variable access.
214-
if scanner._output_mode != OutputMode.SCAN_ONLY:
213+
if scanner.output_mode != OutputMode.SCAN_ONLY:
215214
logger.info("Motion events written to disk.")

dvr_scan/scanner.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ def __str__(self):
9898
if self == OutputMode.SCAN_ONLY:
9999
return "SCAN_ONLY"
100100
if self == OutputMode.OPENCV:
101-
return "SCAN_ONLY"
101+
return "OPENCV"
102102
if self == OutputMode.COPY:
103-
return "SCAN_ONLY"
103+
return "COPY"
104104
if self == OutputMode.FFMPEG:
105-
return "SCAN_ONLY"
105+
return "FFMPEG"
106106

107107

108108
@dataclass
@@ -302,6 +302,10 @@ def __init__(
302302
self.set_thumbnail_params()
303303
self.set_video_time()
304304

305+
@property
306+
def output_mode(self) -> OutputMode:
307+
return self._output_mode
308+
305309
@property
306310
def framerate(self) -> float:
307311
"""Get the framerate of the currently loaded video(s)."""

0 commit comments

Comments
 (0)