Files
karaoke-gen/scripts
Andrew Beveridge ☄️andClaude Opus 5.5 0329d47e38 fix: YouTube description backfill reverted translated-lyrics notices (v0.268.9) (#1144)
## Summary
The daily YouTube description backfill worker was undoing the
translated-lyrics notice on videos with translated lyrics.

**Root cause:** `classify()` parsed `Artist - Title (With Translation
into Spanish) (Karaoke)` with the translation label left inside the song
title, and `render_for()` never passed a `translation_language_name`.
Every translated upload therefore looked "pending". The worker re-checks
the whole channel every day, even after a cycle completes, so it rewrote
each new translated video. The rewrite dropped the `This karaoke video
includes translated lyrics (…)` notice, put the label into `{title}`,
and added it to the tags as well.

## Changes
- `backend/services/youtube_backfill.py`: `classify()` strips the `(With
Translation into X)` label from the parsed song title and records
`translation_language_name`. `render_for()` passes it to
`render_youtube_description`, which is the same thing the upload
pipeline does. Tags now use the clean song title.
- On its next run the worker restores the notice on the translated
videos it already reverted, because their titles still carry the label.
- README: added a safety note that any per-video description variant has
to be recoverable from the live title.
- Version 0.268.9

## Testing
- 5 new tests in `backend/tests/test_youtube_backfill.py`: parsing,
untranslated case, matching upload left alone, reverted description
restored, title preserved + clean tags.
- `make test-backend-unit`: 5961 passed.
- Local CodeRabbit review: no findings.

@coderabbitai ignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_013RzGSdPUXLn1nK5eMEZZTW

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 12:32:23 -04:00
..
2026-01-05 01:33:17 +00:00