mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-02-02 18:22:39 +08:00
Merge pull request #5417 from cddjr/fix_u115_create_folder
fix(u115): 创建目录误报失败
This commit is contained in:
@@ -268,7 +268,7 @@ class U115Pan(StorageBase, metaclass=WeakSingleton):
|
|||||||
|
|
||||||
# 返回数据
|
# 返回数据
|
||||||
ret_data = resp.json()
|
ret_data = resp.json()
|
||||||
if ret_data.get("code") != 0:
|
if ret_data.get("code") not in (0, 20004):
|
||||||
error_msg = ret_data.get("message")
|
error_msg = ret_data.get("message")
|
||||||
if not no_error_log:
|
if not no_error_log:
|
||||||
logger.warn(f"【115】{method} 请求 {endpoint} 出错:{error_msg}")
|
logger.warn(f"【115】{method} 请求 {endpoint} 出错:{error_msg}")
|
||||||
@@ -386,7 +386,10 @@ class U115Pan(StorageBase, metaclass=WeakSingleton):
|
|||||||
resp = self._request_api(
|
resp = self._request_api(
|
||||||
"POST",
|
"POST",
|
||||||
"/open/folder/add",
|
"/open/folder/add",
|
||||||
data={"pid": int(parent_item.fileid or "0"), "file_name": name},
|
data={
|
||||||
|
"pid": 0 if parent_item.path == "/" else int(parent_item.fileid or 0),
|
||||||
|
"file_name": name,
|
||||||
|
},
|
||||||
)
|
)
|
||||||
if not resp:
|
if not resp:
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user