mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-01-22 20:18:30 +03:00
pull in current config version into default config
This commit is contained in:
parent
bf01852197
commit
8b7cc127bf
@ -28,6 +28,7 @@ from frigate.util.builtin import (
|
|||||||
get_ffmpeg_arg_list,
|
get_ffmpeg_arg_list,
|
||||||
)
|
)
|
||||||
from frigate.util.config import (
|
from frigate.util.config import (
|
||||||
|
CURRENT_CONFIG_VERSION,
|
||||||
StreamInfoRetriever,
|
StreamInfoRetriever,
|
||||||
convert_area_to_pixels,
|
convert_area_to_pixels,
|
||||||
find_config_file,
|
find_config_file,
|
||||||
@ -76,11 +77,12 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
yaml = YAML()
|
yaml = YAML()
|
||||||
|
|
||||||
DEFAULT_CONFIG = """
|
DEFAULT_CONFIG = f"""
|
||||||
mqtt:
|
mqtt:
|
||||||
enabled: False
|
enabled: False
|
||||||
|
|
||||||
cameras: {} # No cameras defined, UI wizard should be used
|
cameras: {{}} # No cameras defined, UI wizard should be used
|
||||||
|
version: {CURRENT_CONFIG_VERSION}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
DEFAULT_DETECTORS = {"cpu": {"type": "cpu"}}
|
DEFAULT_DETECTORS = {"cpu": {"type": "cpu"}}
|
||||||
@ -753,8 +755,7 @@ class FrigateConfig(FrigateBaseModel):
|
|||||||
if new_config and f.tell() == 0:
|
if new_config and f.tell() == 0:
|
||||||
f.write(DEFAULT_CONFIG)
|
f.write(DEFAULT_CONFIG)
|
||||||
logger.info(
|
logger.info(
|
||||||
"Created default config file, see the getting started docs \
|
"Created default config file, see the getting started docs for configuration: https://docs.frigate.video/guides/getting_started"
|
||||||
for configuration https://docs.frigate.video/guides/getting_started"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
f.seek(0)
|
f.seek(0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user