MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / add_detector

Method add_detector

scenedetect/_cli/context.py:119–125  ·  view source on GitHub ↗

Instantiate and add `detector` to the processing pipeline.

(self, detector: type[SceneDetector], detector_args: dict[str, ty.Any])

Source from the content-addressed store, hash-verified

117 self.commands.append((command, command_args))
118
119 def add_detector(self, detector: type[SceneDetector], detector_args: dict[str, ty.Any]):
120 """Instantiate and add `detector` to the processing pipeline."""
121 if self.load_scenes_input:
122 raise click.ClickException("The load-scenes command cannot be used with detectors.")
123 assert self.scene_manager is not None
124 logger.debug("Adding detector: %s(%s)", detector.__name__, detector_args)
125 self.scene_manager.add_detector(detector(**detector_args))
126
127 def ensure_detector(self):
128 """Ensures at least one detector has been instantiated, otherwise adds a default one."""

Callers 6

ensure_detectorMethod · 0.95
detect_content_commandFunction · 0.45
detect_adaptive_commandFunction · 0.45
detect_threshold_commandFunction · 0.45
detect_hist_commandFunction · 0.45
detect_hash_commandFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected