This commit is contained in:
jxxghp
2025-07-28 16:55:22 +08:00
parent 70dd8f0f1d
commit 5340e3a0a7
9 changed files with 17 additions and 17 deletions

View File

@@ -165,7 +165,7 @@ class FileManagerModule(_ModuleBase):
episodes_info=episodes_info,
file_ext=Path(meta.title).suffix)
)
return str(path)
return path.as_posix() if path else ""
def save_config(self, storage: str, conf: Dict) -> None:
"""

View File

@@ -783,7 +783,7 @@ class AliPan(StorageBase, metaclass=WeakSingleton):
"/adrive/v1.0/openFile/get_by_path",
json={
"drive_id": drive_id or self._default_drive_id,
"file_path": str(path)
"file_path": path.as_posix()
}
)
if not resp:

View File

@@ -44,7 +44,7 @@ class LocalStorage(StorageBase):
return schemas.FileItem(
storage=self.schema.value,
type="file",
path=str(path).replace("\\", "/"),
path=path.as_posix(),
name=path.name,
basename=path.stem,
extension=path.suffix[1:],
@@ -59,7 +59,7 @@ class LocalStorage(StorageBase):
return schemas.FileItem(
storage=self.schema.value,
type="dir",
path=str(path).replace("\\", "/") + "/",
path=path.as_posix() + "/",
name=path.name,
basename=path.stem,
modify_time=path.stat().st_mtime,

View File

@@ -269,7 +269,7 @@ class Rclone(StorageBase):
retcode = subprocess.run(
[
'rclone', 'copyto',
str(path),
path.as_posix(),
f'MP:{new_path}'
],
startupinfo=self.__get_hidden_shell()

View File

@@ -672,7 +672,7 @@ class U115Pan(StorageBase, metaclass=WeakSingleton):
"/open/folder/get_info",
"data",
data={
"path": str(path)
"path": path.as_posix()
}
)
if not resp:
@@ -680,7 +680,7 @@ class U115Pan(StorageBase, metaclass=WeakSingleton):
return schemas.FileItem(
storage=self.schema.value,
fileid=str(resp["file_id"]),
path=str(path) + ("/" if resp["file_category"] == "0" else ""),
path=path.as_posix() + ("/" if resp["file_category"] == "0" else ""),
type="file" if resp["file_category"] == "1" else "dir",
name=resp["file_name"],
basename=Path(resp["file_name"]).stem,

View File

@@ -330,7 +330,7 @@ class TransHandler:
"""
return FileItem(
storage=target_storage,
path=str(_path).replace("\\", "/"),
path=_path.as_posix(),
name=_path.name,
basename=_path.stem,
type="file",