Skip to content

v1.2.1: Migrate from downloader + video_normalizer to Advanced Downloader#22

Merged
Geek-MD merged 3 commits intomainfrom
copilot/fix-downloader-integration-installation
Mar 10, 2026
Merged

v1.2.1: Migrate from downloader + video_normalizer to Advanced Downloader#22
Geek-MD merged 3 commits intomainfrom
copilot/fix-downloader-integration-installation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 10, 2026

Automations combining the core downloader integration with the standalone video_normalizer integration break after removing both config entries as required. Three gaps prevented full migration to advanced_downloader alone: target_aspect_ratio was never forwarded to VideoProcessor, the status sensor had no last_job attribute, and no migration guide existed.

Changes

  • const.py — Added ATTR_TARGET_ASPECT_RATIO
  • sensor.py — Added last_job: null | "success" | "failed" to sensor.advanced_downloader_status attributes; added set_last_job() method
  • __init__.py — Reads optional target_aspect_ratio from service call; passes it as a kwarg to VideoProcessor.process_video() when provided; calls sensor.set_last_job("success"|"failed") before firing the corresponding bus event; added vol.Optional(ATTR_TARGET_ASPECT_RATIO): vol.Coerce(float) to the service schema
  • services.yaml — Added target_aspect_ratio field (number selector, step 0.001) to download_file
  • README.md — Updated sensor attributes table; added Migration Guide section with full before/after YAML and a mapping table
  • CHANGELOG.md — Expanded [1.2.1] entry

Migrated automation (condensed)

# Before: two integrations, ~15 steps
- action: downloader.download_file
  data: { url: "{{ url }}", subdir: ring, filename: ring.mp4, overwrite: true }
- wait_for_trigger: [event: downloader_download_completed]
- action: video_normalizer.normalize_video
  data: { ..., target_aspect_ratio: 1.777 }
- wait/poll: sensor.video_normalizer_status → idle
- if last_job == success/skipped → send_video else send_message

# After: one integration, ~5 steps
- action: advanced_downloader.download_file
  data: { url: "{{ url }}", subdir: ring, filename: ring.mp4, overwrite: true, target_aspect_ratio: 1.777 }
- wait_for_trigger:
    - event: advanced_downloader_job_completed
    - event: advanced_downloader_download_failed
- if trigger == job_completed → send_video else send_message

Key mapping

Old New
downloader.download_file advanced_downloader.download_file
video_normalizer.normalize_video (built-in, no separate call)
downloader_download_completed + poll sensor.video_normalizer_status advanced_downloader_job_completed / advanced_downloader_download_failed events
sensor.video_normalizer_status last_job sensor.advanced_downloader_status last_job

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

… Video Normalizer guidance

Co-authored-by: Geek-MD <25725990+Geek-MD@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix downloader integration installation issue v1.2.1: Detect and notify on core downloader integration conflict Mar 10, 2026
…d automation migration guide

Co-authored-by: Geek-MD <25725990+Geek-MD@users.noreply.github.com>
Copilot AI changed the title v1.2.1: Detect and notify on core downloader integration conflict v1.2.1: Migrate from downloader + video_normalizer to Advanced Downloader Mar 10, 2026
@Geek-MD Geek-MD marked this pull request as ready for review March 10, 2026 16:37
@Geek-MD Geek-MD merged commit 5f17040 into main Mar 10, 2026
3 checks passed
@Geek-MD Geek-MD deleted the copilot/fix-downloader-integration-installation branch March 10, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants