Files
audio_splitter/web/backend/api/formats.py
T

21 lines
541 B
Python

# web/backend/api/formats.py
"""Endpoint to expose format information to the frontend."""
from fastapi import APIRouter
from audio_splitter.constants import CONTAINER_INFO, CODEC_INFO, COMPATIBILITY_MATRIX
router = APIRouter(prefix="/api", tags=["formats"])
@router.get("/formats")
async def get_formats():
"""
Return the list of supported containers, codecs, and compatibility matrix.
"""
return {
"containers": CONTAINER_INFO,
"codecs": CODEC_INFO,
"compatibility": COMPATIBILITY_MATRIX,
}