mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-10 06:51:28 +08:00
fix local
This commit is contained in:
@@ -38,7 +38,7 @@ class FileManagerModule(_ModuleBase):
|
||||
def init_module(self) -> None:
|
||||
# 加载模块
|
||||
self._storage_schemas = ModuleHelper.load('app.modules.filemanager.storage',
|
||||
filter_func=lambda _, obj: hasattr(obj, 'schema'))
|
||||
filter_func=lambda _, obj: hasattr(obj, 'schema') and obj.schema)
|
||||
|
||||
@staticmethod
|
||||
def get_name() -> str:
|
||||
@@ -264,7 +264,7 @@ class FileManagerModule(_ModuleBase):
|
||||
获取存储操作对象
|
||||
"""
|
||||
for storage_schema in self._storage_schemas:
|
||||
if storage_schema.schema == _storage:
|
||||
if storage_schema.schema and storage_schema.schema.value == _storage:
|
||||
return storage_schema()
|
||||
return None
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ class LocalStorage(StorageBase):
|
||||
ret_items.append(self.__get_diritem(item))
|
||||
|
||||
# 遍历所有文件,不含子目录
|
||||
for item in SystemUtils.list_sub_all(path_obj):
|
||||
for item in SystemUtils.list_sub_file(path_obj):
|
||||
ret_items.append(self.__get_fileitem(item))
|
||||
return ret_items
|
||||
|
||||
|
||||
Reference in New Issue
Block a user