lightpdf-aipdf-mcp 0.1.65__py3-none-any.whl → 0.1.67__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -152,12 +152,12 @@ class BaseApiClient:
152
152
  await self.logger.log("warning", f"获取任务状态失败。状态码: {status_response.status_code}")
153
153
  continue
154
154
 
155
- status_result = status_response.json()
156
- state = status_result.get("data", {}).get("state")
157
- progress = status_result.get("data", {}).get("progress", 0)
155
+ status_result = status_response.json().get("data", {})
156
+ state = status_result.get("state")
157
+ progress = status_result.get("progress", 0)
158
158
 
159
159
  if state == 1: # 完成
160
- download_url = status_result.get("data", {}).get("file")
160
+ download_url = status_result.get("file")
161
161
  if not download_url:
162
162
  await self.logger.error(f"任务完成但未找到下载链接。任务状态:{json.dumps(status_result, ensure_ascii=False)}")
163
163
  return download_url
@@ -251,9 +251,9 @@ class Converter(BaseApiClient):
251
251
  # 如果提供了密码,将其添加到extra_params
252
252
  if password:
253
253
  extra_params["password"] = password
254
-
254
+
255
255
  if original_name:
256
- extra_params["filename"] = original_name
256
+ extra_params["filename"] = os.path.splitext(original_name)[0]
257
257
 
258
258
  # 创建转换任务
259
259
  task_id = await self._create_task(client, file_path, format, extra_params)
@@ -455,7 +455,7 @@ class Editor(BaseApiClient):
455
455
  extra_params["password"] = password
456
456
 
457
457
  if original_name:
458
- extra_params["filename"] = original_name
458
+ extra_params["filename"] = os.path.splitext(original_name)[0]
459
459
 
460
460
  # 创建编辑任务
461
461
  task_id = await self._create_task(client, file_path, edit_type, extra_params)
@@ -556,7 +556,7 @@ class Editor(BaseApiClient):
556
556
  data = {"type": EditType.MERGE.value}
557
557
 
558
558
  if original_name:
559
- data["filename"] = original_name
559
+ data["filename"] = os.path.splitext(original_name)[0]
560
560
 
561
561
  # 准备URL格式的输入
562
562
  url_inputs = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lightpdf-aipdf-mcp
3
- Version: 0.1.65
3
+ Version: 0.1.67
4
4
  Summary: MCP Server for LightPDF AI-PDF
5
5
  Author: LightPDF Team
6
6
  License: Proprietary
@@ -0,0 +1,9 @@
1
+ lightpdf_aipdf_mcp/__init__.py,sha256=PPnAgpvJLYLVOTxnHDmJAulFnHJD6wuTwS6tRGjqq6s,141
2
+ lightpdf_aipdf_mcp/common.py,sha256=TLzWfiukB7uN9-EPbT3vVX1i4ero5j3d4L9vLe3MSCw,6601
3
+ lightpdf_aipdf_mcp/converter.py,sha256=7X4pK2y2NQBqhU1LLIJQhf7LUx6KaMiW26jt_KsX9fg,14567
4
+ lightpdf_aipdf_mcp/editor.py,sha256=xgoJoF2W_y41XpF_0_kvYTIB0rcDdskpMldoijqUeFI,26712
5
+ lightpdf_aipdf_mcp/server.py,sha256=kZR4sc6z-MFom88XgGWJK8Sw4JFSJkvGV0WVIGt7hvA,46946
6
+ lightpdf_aipdf_mcp-0.1.67.dist-info/METADATA,sha256=ZUIX05RVjSuZ9NL0QaAU8X6FS0_p4T8L90d3LPz3CNI,8119
7
+ lightpdf_aipdf_mcp-0.1.67.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
+ lightpdf_aipdf_mcp-0.1.67.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
9
+ lightpdf_aipdf_mcp-0.1.67.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- lightpdf_aipdf_mcp/__init__.py,sha256=PPnAgpvJLYLVOTxnHDmJAulFnHJD6wuTwS6tRGjqq6s,141
2
- lightpdf_aipdf_mcp/common.py,sha256=-7LU6gm-As_F8Ly68ssy15Vc9Zt_eNSnvDLEtVZDwlI,6633
3
- lightpdf_aipdf_mcp/converter.py,sha256=YAE9zKPYU5jqM9IKlPmN6AGkC5InzpJ-UYoTnmoa_rM,14562
4
- lightpdf_aipdf_mcp/editor.py,sha256=wnvPSFhscnJkDojUz63MVcSprCQEBKbTvVFOzcVU2kk,26670
5
- lightpdf_aipdf_mcp/server.py,sha256=kZR4sc6z-MFom88XgGWJK8Sw4JFSJkvGV0WVIGt7hvA,46946
6
- lightpdf_aipdf_mcp-0.1.65.dist-info/METADATA,sha256=5Vparq-GfFsOjXnXYO1Zal_QfcCbA5nZnow_oEKNcPc,8119
7
- lightpdf_aipdf_mcp-0.1.65.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- lightpdf_aipdf_mcp-0.1.65.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
9
- lightpdf_aipdf_mcp-0.1.65.dist-info/RECORD,,