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

Function load_scenes_command

scenedetect/_cli/__init__.py:994–1014  ·  view source on GitHub ↗
(ctx: click.Context, input: str | None, start_col_name: str | None)

Source from the content-addressed store, hash-verified

992)
993@click.pass_context
994def load_scenes_command(ctx: click.Context, input: str | None, start_col_name: str | None):
995 ctx = ctx.obj
996 assert isinstance(ctx, CliContext)
997
998 logger.debug("Will load scenes from %s (start_col_name = %s)", input, start_col_name)
999 assert ctx.scene_manager is not None
1000 if ctx.scene_manager.get_num_detectors() > 0:
1001 raise click.ClickException("The load-scenes command cannot be used with detectors.")
1002 if ctx.load_scenes_input:
1003 raise click.ClickException("The load-scenes command must only be specified once.")
1004 if input is None:
1005 raise click.BadParameter("Input file is required.", param_hint="-i/--input")
1006 input = os.path.abspath(input)
1007 if not os.path.exists(input):
1008 raise click.BadParameter(
1009 f"Could not load scenes, file does not exist: {input}", param_hint="-i/--input"
1010 )
1011 ctx.load_scenes_input = input
1012 ctx.load_scenes_column_name = ctx.config.get_value(
1013 "load-scenes", "start-col-name", start_col_name
1014 )
1015
1016
1017SAVE_HTML_HELP = """Save scene list to HTML file.

Callers

nothing calls this directly

Calls 2

get_num_detectorsMethod · 0.80
get_valueMethod · 0.80

Tested by

no test coverage detected