Get photos destination path from config without creating directory. Args: config: Configuration dictionary Returns: Photos destination path string
(config: dict)
| 452 | |
| 453 | |
| 454 | def get_photos_destination_path(config: dict) -> str: |
| 455 | """Get photos destination path from config without creating directory. |
| 456 | |
| 457 | Args: |
| 458 | config: Configuration dictionary |
| 459 | |
| 460 | Returns: |
| 461 | Photos destination path string |
| 462 | """ |
| 463 | config_path = ["photos", "destination"] |
| 464 | photos_destination = get_config_value_or_default( |
| 465 | config=config, |
| 466 | config_path=config_path, |
| 467 | default=DEFAULT_PHOTOS_DESTINATION, |
| 468 | ) |
| 469 | |
| 470 | if not traverse_config_path(config=config, config_path=config_path): |
| 471 | log_config_not_found_warning( |
| 472 | config_path, |
| 473 | f"destination is missing. Using default photos destination: {config_path_to_string(config_path)}", |
| 474 | ) |
| 475 | |
| 476 | return photos_destination |
| 477 | |
| 478 | |
| 479 | def prepare_photos_destination(config: dict) -> str: |
no test coverage detected