fix exception
This commit is contained in:
parent
f726130c31
commit
c06bdf0491
@ -95,6 +95,7 @@ class SystemChain(ChainBase, metaclass=Singleton):
|
||||
"""
|
||||
获取后端最新版本
|
||||
"""
|
||||
try:
|
||||
with RequestUtils(proxies=settings.PROXY, headers=settings.GITHUB_HEADERS).get_res(
|
||||
"https://api.github.com/repos/jxxghp/MoviePilot/releases/latest") as version_res:
|
||||
if version_res:
|
||||
@ -103,12 +104,16 @@ class SystemChain(ChainBase, metaclass=Singleton):
|
||||
return version
|
||||
else:
|
||||
return None
|
||||
except Exception as err:
|
||||
logger.error(f"获取后端最新版本失败:{str(err)}")
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def __get_front_release_version():
|
||||
"""
|
||||
获取前端最新版本
|
||||
"""
|
||||
try:
|
||||
with RequestUtils(proxies=settings.PROXY, headers=settings.GITHUB_HEADERS).get_res(
|
||||
"https://api.github.com/repos/jxxghp/MoviePilot-Frontend/releases/latest") as version_res:
|
||||
if version_res:
|
||||
@ -117,6 +122,9 @@ class SystemChain(ChainBase, metaclass=Singleton):
|
||||
return version
|
||||
else:
|
||||
return None
|
||||
except Exception as err:
|
||||
logger.error(f"获取前端最新版本失败:{str(err)}")
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def get_server_local_version():
|
||||
|
Loading…
x
Reference in New Issue
Block a user