fix(MoviePilotUpdateNotify): 修复版本描述为空时的报错

This commit is contained in:
BlueflameLi
2026-01-05 21:31:41 +08:00
parent 44d3db72b4
commit a0272dfcaf
2 changed files with 6 additions and 6 deletions

View File

@@ -23,7 +23,7 @@ class MoviePilotUpdateNotify(_PluginBase):
# 插件图标
plugin_icon = "Moviepilot_A.png"
# 插件版本
plugin_version = "2.2"
plugin_version = "2.3"
# 插件作者
plugin_author = "thsrite"
# 作者主页
@@ -171,7 +171,7 @@ class MoviePilotUpdateNotify(_PluginBase):
"""
result = self.__get_latest_version("https://api.github.com/repos/jxxghp/MoviePilot/releases")
if result:
return result['tag_name'], result['body'], result['published_at']
return result['tag_name'], f"{result['body'] or ''}", result['published_at']
return None, None, None
def __get_front_latest(self):
@@ -180,7 +180,7 @@ class MoviePilotUpdateNotify(_PluginBase):
"""
result = self.__get_latest_version("https://api.github.com/repos/jxxghp/MoviePilot-Frontend/releases")
if result:
return result['tag_name'], result['body'], result['published_at']
return result['tag_name'], f"{result['body'] or ''}", result['published_at']
return None, None, None
def get_state(self) -> bool:

View File

@@ -22,7 +22,7 @@ class MoviePilotUpdateNotify(_PluginBase):
# 插件图标
plugin_icon = "Moviepilot_A.png"
# 插件版本
plugin_version = "1.4"
plugin_version = "1.5"
# 插件作者
plugin_author = "thsrite"
# 作者主页
@@ -151,7 +151,7 @@ class MoviePilotUpdateNotify(_PluginBase):
if version_res:
ver_json = version_res.json()
version = f"{ver_json['tag_name']}"
description = f"{ver_json['body']}"
description = f"{ver_json['body'] or ''}"
update_time = f"{ver_json['published_at']}"
return version, description, update_time
else:
@@ -167,7 +167,7 @@ class MoviePilotUpdateNotify(_PluginBase):
if version_res:
ver_json = version_res.json()
version = f"{ver_json['tag_name']}"
description = f"{ver_json['body']}"
description = f"{ver_json['body'] or ''}"
update_time = f"{ver_json['published_at']}"
return version, description, update_time
else: