fix
This commit is contained in:
parent
0e92e9fc60
commit
26f63c4ea7
@ -1,6 +1,5 @@
|
||||
import json
|
||||
import re
|
||||
from pathlib import Path
|
||||
from typing import Union
|
||||
|
||||
from app.chain import ChainBase
|
||||
@ -88,9 +87,6 @@ class SystemChain(ChainBase):
|
||||
"""
|
||||
获取最新版本
|
||||
"""
|
||||
version_res = RequestUtils().get_res(
|
||||
"https://api.github.com/repos/jxxghp/MoviePilot/releases/latest")
|
||||
if not version_res:
|
||||
version_res = RequestUtils(proxies=settings.PROXY).get_res(
|
||||
"https://api.github.com/repos/jxxghp/MoviePilot/releases/latest")
|
||||
if version_res:
|
||||
@ -105,7 +101,7 @@ class SystemChain(ChainBase):
|
||||
"""
|
||||
查看当前版本
|
||||
"""
|
||||
version_file = Path(__file__).parents[2] / "version.py"
|
||||
version_file = settings.ROOT_PATH / "version.py"
|
||||
if version_file.exists():
|
||||
try:
|
||||
with open(version_file, 'rb') as f:
|
||||
|
Loading…
x
Reference in New Issue
Block a user