feat 多媒体库目录支持

This commit is contained in:
jxxghp
2023-07-14 20:49:16 +08:00
parent 94a5c5e2e2
commit 085409049d
4 changed files with 50 additions and 23 deletions

View File

@ -38,7 +38,9 @@ def storage(_: schemas.TokenPayload = Depends(verify_token)) -> Any:
查询存储空间信息
"""
if settings.LIBRARY_PATH:
total_storage, free_storage = SystemUtils.space_usage(Path(settings.LIBRARY_PATH))
total_storage, free_storage = SystemUtils.space_usage(
[Path(path) for path in settings.LIBRARY_PATH.split(",")]
)
else:
total_storage, free_storage = 0, 0
return schemas.Storage(