Prioritize WebM video over OGG audio for full quality

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-01-12 11:38:20 +03:00
parent c642d2125c
commit 16170fe2c3

View File

@@ -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
# Get video link (WebM)
video_url = videos[0].get("link")
# Fallback to audio link if no video
if not video_url:
audio = videos[0].get("audio")
if audio:
video_url = audio.get("link")
# Fallback to video link
if not video_url:
video_url = videos[0].get("link")
# Get song info
song_data = theme_data.get("song", {})