mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-06 23:31:28 +08:00
fix
This commit is contained in:
@@ -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:
|
||||
"""
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user