From 16170fe2c36c603f62d98f16cc7438b973cb5b15 Mon Sep 17 00:00:00 2001 From: "mamonov.ep" Date: Mon, 12 Jan 2026 11:38:20 +0300 Subject: [PATCH] Prioritize WebM video over OGG audio for full quality MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../openings_downloader/services/animethemes.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/app/openings_downloader/services/animethemes.py b/backend/app/openings_downloader/services/animethemes.py index 26a9e45..fc82d33 100644 --- a/backend/app/openings_downloader/services/animethemes.py +++ b/backend/app/openings_downloader/services/animethemes.py @@ -181,19 +181,19 @@ class AnimeThemesService: theme_type = ThemeType.OP if match.group(1) == "OP" else ThemeType.ED sequence = int(match.group(2)) if match.group(2) else 1 - # Get video URL (prioritize audio link, then video link) + # Get video URL (prioritize video link for full quality) video_url = None entries = theme_data.get("animethemeentries", []) if entries: videos = entries[0].get("videos", []) if videos: - # Try to get audio link first - audio = videos[0].get("audio") - if audio: - video_url = audio.get("link") - # Fallback to video link + # Get video link (WebM) + video_url = videos[0].get("link") + # Fallback to audio link if no video if not video_url: - video_url = videos[0].get("link") + audio = videos[0].get("audio") + if audio: + video_url = audio.get("link") # Get song info song_data = theme_data.get("song", {})