Remove Shikimori API, use AnimeThemes only, switch to WebM format
- Remove ShikimoriService, use AnimeThemes API for search - Replace shikimori_id with animethemes_slug as primary identifier - Remove FFmpeg MP3 conversion, download WebM directly - Add .webm support in storage and upload endpoints - Update frontend to use animethemes_slug 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -117,7 +117,7 @@ class S3Storage:
|
||||
|
||||
def list_audio_files(self) -> list[str]:
|
||||
"""List available audio files."""
|
||||
return self.list_files("audio/", [".mp3", ".wav", ".ogg", ".m4a"])
|
||||
return self.list_files("audio/", [".mp3", ".wav", ".ogg", ".m4a", ".webm"])
|
||||
|
||||
def list_background_videos(self) -> list[str]:
|
||||
"""List available background videos."""
|
||||
@@ -167,7 +167,15 @@ class S3Storage:
|
||||
|
||||
def upload_audio(self, filename: str, file_data: bytes) -> bool:
|
||||
"""Upload audio file to S3."""
|
||||
content_type = "audio/mpeg" if filename.lower().endswith(".mp3") else "audio/wav"
|
||||
ext = filename.lower().split(".")[-1]
|
||||
content_types = {
|
||||
"mp3": "audio/mpeg",
|
||||
"wav": "audio/wav",
|
||||
"ogg": "audio/ogg",
|
||||
"m4a": "audio/mp4",
|
||||
"webm": "video/webm",
|
||||
}
|
||||
content_type = content_types.get(ext, "audio/mpeg")
|
||||
return self.upload_file(f"audio/{filename}", file_data, content_type)
|
||||
|
||||
def upload_background(self, filename: str, file_data: bytes) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user