瀏覽代碼

鞋宽详情图

rambo 3 月之前
父節點
當前提交
42f8663466
共有 1 個文件被更改,包括 8 次插入7 次删除
  1. 8 7
      python/custom_plugins/plugins/detail_template/huilima/detail_huilima4.py

+ 8 - 7
python/custom_plugins/plugins/detail_template/huilima/detail_huilima4.py

@@ -167,13 +167,14 @@ class DetailPicGet(DetailBase):
             text = self.get_text_value(text_data["text"])
             if not text:
                 text = text_data["default"]
-            _pp = PictureProcessing().get_text_image_advanced(
-                font=font_1,
-                text=text,
-                fill=(0, 0, 0),
-                return_mode="min_image",
-            )
-            pp_bg_2 = pp_bg_2.paste_img(top_img=_pp, value=text_data["pos"], base="nw")
+            if text:
+                _pp = PictureProcessing().get_text_image_advanced(
+                    font=font_1,
+                    text=text,
+                    fill=(0, 0, 0),
+                    return_mode="min_image",
+                )
+                pp_bg_2 = pp_bg_2.paste_img(top_img=_pp, value=text_data["pos"], base="nw")
         detailed_images.append(pp_bg_2)
 
         return PictureProcessing(im=self.add_pic(detailed_images))