prevent touching thumbnail info when not needed

This commit is contained in:
CortexPE 2021-06-21 17:32:51 +08:00
parent 48fd703772
commit c455b37b67

View File

@ -926,7 +926,8 @@ class ProxyDaemon:
): ):
try: try:
content["url"] = await self._decrypt_uri(content["url"], client) content["url"] = await self._decrypt_uri(content["url"], client)
content["info"]["thumbnail_url"] = await self._decrypt_uri(content["info"]["thumbnail_url"], client) if "info" in content and "thumbnail_url" in content["info"]:
content["info"]["thumbnail_url"] = await self._decrypt_uri(content["info"]["thumbnail_url"], client)
return await self.forward_to_web( return await self.forward_to_web(
request, data=json.dumps(content), token=client.access_token request, data=json.dumps(content), token=client.access_token
) )