20 lines
449 B
Python
20 lines
449 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
|
|
|
|
router = APIRouter(prefix="/api", tags=["formats"])
|
|
|
|
|
|
@router.get("/formats")
|
|
async def get_formats():
|
|
"""
|
|
Return the list of supported containers and codecs.
|
|
"""
|
|
return {
|
|
"containers": CONTAINER_INFO,
|
|
"codecs": CODEC_INFO,
|
|
}
|