mirror of
https://github.com/jxxghp/MoviePilot-Plugins.git
synced 2026-03-27 10:05:57 +00:00
fix(MoviePilotUpdateNotify): 修复版本描述为空时的报错
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user