22 lines
535 B
Python
22 lines
535 B
Python
import asyncio
|
|
from typing import AsyncIterable
|
|
|
|
from v6d2ctx.context import Context
|
|
|
|
from v6d3music.core.create_ytaudio import create_ytaudio
|
|
from v6d3music.core.ytaudio import YTAudio
|
|
from v6d3music.utils.argctx import InfoCtx
|
|
|
|
|
|
async def create_ytaudios(ctx: Context, infos: list[InfoCtx]) -> AsyncIterable[YTAudio]:
|
|
for audio in await asyncio.gather(
|
|
*[
|
|
create_ytaudio(ctx, it)
|
|
for
|
|
it
|
|
in
|
|
infos
|
|
]
|
|
):
|
|
yield audio
|