mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-05-24 23:16:44 +00:00
fix homepage适配v1.9.1-beta(不生效就重启)
This commit is contained in:
@@ -37,4 +37,4 @@ MoviePilot三方插件市场:https://github.com/thsrite/MoviePilot-Plugins/
|
||||
- Emby元数据刷新 1.1
|
||||
- Emby媒体标签 1.1
|
||||
- 热门媒体订阅 1.7
|
||||
- [HomePage 1.0](docs%2FHomePage.md)
|
||||
- [HomePage 1.2](docs%2FHomePage.md)
|
||||
|
||||
@@ -433,11 +433,12 @@
|
||||
"name": "HomePage",
|
||||
"description": "HomePage自定义API。",
|
||||
"labels": "工具",
|
||||
"version": "1.1",
|
||||
"version": "1.2",
|
||||
"icon": "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/homepage.png",
|
||||
"author": "thsrite",
|
||||
"level": 1,
|
||||
"history": {
|
||||
"v1.2": "适配v1.9.1-beta(不生效就重启)",
|
||||
"v1.1": "支持更多返回值、插件展示数据",
|
||||
"v1.0": "HomePage自定义API"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
from pathlib import Path
|
||||
|
||||
from app.chain.dashboard import DashboardChain
|
||||
from app.core.config import settings
|
||||
from app.db.subscribe_oper import SubscribeOper
|
||||
from app.helper.directory import DirectoryHelper
|
||||
from app.plugins import _PluginBase
|
||||
from typing import Any, List, Dict, Tuple, Optional
|
||||
from app.schemas import NotificationType
|
||||
@@ -17,7 +20,7 @@ class HomePage(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/homepage.png"
|
||||
# 插件版本
|
||||
plugin_version = "1.1"
|
||||
plugin_version = "1.2"
|
||||
# 插件作者
|
||||
plugin_author = "thsrite"
|
||||
# 作者主页
|
||||
@@ -61,7 +64,8 @@ class HomePage(_PluginBase):
|
||||
user_count += media_statistic.user_count
|
||||
|
||||
# 磁盘统计
|
||||
total_storage, free_storage = SystemUtils.space_usage(settings.LIBRARY_PATHS)
|
||||
library_dirs = DirectoryHelper().get_library_dirs()
|
||||
total_storage, free_storage = SystemUtils.space_usage([Path(d.path) for d in library_dirs if d.path])
|
||||
|
||||
# 订阅统计
|
||||
movie_subscribes = 0
|
||||
|
||||
Reference in New Issue
Block a user