ns = { 'id':params_kw.id } db = DBPools() async with db.sqlorContext('mediadb') as sor: recs = await sor.R('media', ns) if len(recs) >= 1: r = recs[0] mtype = r.mlocation.rsplit('.',1)[-1] typ = f'audio/{mtype}' return { "widgettype":"AudioPlayer", "id":"player", "options":{ "height":"99%", "width":"30%", "url":entire_url('/idfile') + "?path=" + r.mlocation, "autoplay":True } }