async def convert_thumbnail(self, info: Info) -> dict[str, str]: thumnbnail_url = await self.get_thumbnail(info.id, info.thumbnail.to_dict()) info_dict = cast(dict[str, str], info.to_dict()) info_dict["thumbnail"] = thumnbnail_url return info_dict
async def add_info(self, info: Info) -> None: await self.collection.insert_one(info.to_dict())