Skip to content

feat: add trailer download script with shared library#1

Open
mvanbaak wants to merge 11 commits into
mainfrom
feature/trailer-downloader
Open

feat: add trailer download script with shared library#1
mvanbaak wants to merge 11 commits into
mainfrom
feature/trailer-downloader

Conversation

@mvanbaak

Copy link
Copy Markdown
Owner

Summary

  • Extract shared library scripts_common.sh from tag_dvfelmel.sh (config loading, executable checks, Radarr API helpers)
  • Refactor tag_dvfelmel.sh to source the shared library, removing duplicated code
  • Add download_trailer.sh - downloads official YouTube trailers from TMDB for Radarr movies
    • Supports MovieAdded, Download, and Bulk event types
    • Downloads trailers in movie's original language and configurable additional languages (default: pt-BR)
    • Downloads Brazilian Portuguese subtitles for original-language trailers as separate .srt files
    • Tracks downloaded trailers per-movie via yt-dlp --download-archive
    • Supports optional YouTube cookie authentication for age-restricted content
    • Creates movie/Trailers directories only when trailers are available
  • Add docs/cookie-extraction.md guide for exporting YouTube cookies from browsers (Linux, macOS, Windows, Docker)
  • Update scripts.conf.sample, README.md, and AGENTS.md with new config variables, commands, and dependencies

Files Changed

File Change
radarr/connect/scripts_common.sh New - shared library
radarr/connect/tag_dvfelmel.sh Refactored to source shared library
radarr/connect/download_trailer.sh New - trailer download script
radarr/connect/scripts.conf.sample Added TMDB_API_KEY, TRAILER_*, YT_DLP_COOKIE_FILE
docs/cookie-extraction.md New - cookie extraction guide
README.md Added download_trailer.sh section
AGENTS.md Added new files, commands, and dependencies

Test Plan

  • shellcheck -e SC3043 passes on all three shell scripts (only expected SC1091 info)
  • sh -n syntax check passes on all scripts
  • ./tag_dvfelmel.sh test mode outputs success message
  • ./download_trailer.sh test mode outputs success message
  • download_trailer.sh exits with error on missing TMDB_API_KEY
  • Manual test with real Radarr instance and TMDB API key
  • Verify trailer download with cookie file for age-restricted content

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.

1 participant