mirror of
https://github.com/d0zingcat/MoviePilot-Plugins.git
synced 2026-05-13 23:16:47 +00:00
修复v2版本无法读取数据的问题
This commit is contained in:
@@ -527,12 +527,13 @@
|
||||
"name": "TMDB剧集组刮削",
|
||||
"description": "从TMDB剧集组刮削季集的实际顺序。",
|
||||
"labels": "刮削",
|
||||
"version": "2.1",
|
||||
"version": "2.2",
|
||||
"icon": "Element_A.png",
|
||||
"author": "叮叮当",
|
||||
"level": 1,
|
||||
"v2": true,
|
||||
"history": {
|
||||
"v2.2": "修复v2版本无法读取数据的问题",
|
||||
"v2.1": "增加发送通知提醒选择剧集组",
|
||||
"v2.0": "增加手动选择剧集组的功能"
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ from app.schemas.types import EventType
|
||||
from app.utils.common import retry
|
||||
from app.utils.http import RequestUtils
|
||||
from app.db.models import PluginData
|
||||
from app.utils.object import ObjectUtils
|
||||
|
||||
class ExistMediaInfo(BaseModel):
|
||||
# 类型 电影、电视剧
|
||||
@@ -48,7 +47,7 @@ class EpisodeGroupMeta(_PluginBase):
|
||||
# 主题色
|
||||
plugin_color = "#098663"
|
||||
# 插件版本
|
||||
plugin_version = "2.1"
|
||||
plugin_version = "2.2"
|
||||
# 插件作者
|
||||
plugin_author = "叮叮当"
|
||||
# 作者主页
|
||||
@@ -360,6 +359,13 @@ class EpisodeGroupMeta(_PluginBase):
|
||||
"delay": 120
|
||||
}
|
||||
|
||||
def is_objstr(self, obj: Any):
|
||||
if not isinstance(obj, str):
|
||||
return False
|
||||
return str(obj).startswith("{") \
|
||||
or str(obj).startswith("[") \
|
||||
or str(obj).startswith("(")
|
||||
|
||||
def get_page(self) -> List[dict]:
|
||||
"""
|
||||
拼装插件详情页面,需要返回页面配置,同时附带数据
|
||||
@@ -372,7 +378,7 @@ class EpisodeGroupMeta(_PluginBase):
|
||||
try:
|
||||
tmdb_id = plugin_data.key
|
||||
# fix v1版本数据读取问题
|
||||
if ObjectUtils.is_obj(plugin_data.value):
|
||||
if self.is_objstr(plugin_data.value):
|
||||
data = json.loads(plugin_data.value)
|
||||
else:
|
||||
data = plugin_data.value
|
||||
|
||||
Reference in New Issue
Block a user