From c455b37b67573531fd0f96a292d67fac32173b09 Mon Sep 17 00:00:00 2001 From: CortexPE Date: Mon, 21 Jun 2021 17:32:51 +0800 Subject: [PATCH] prevent touching thumbnail info when not needed --- pantalaimon/daemon.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pantalaimon/daemon.py b/pantalaimon/daemon.py index 71f474a..a2f5a37 100755 --- a/pantalaimon/daemon.py +++ b/pantalaimon/daemon.py @@ -926,7 +926,8 @@ class ProxyDaemon: ): try: 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( request, data=json.dumps(content), token=client.access_token )