fix
This commit is contained in:
parent
0e92e9fc60
commit
26f63c4ea7
@ -1,6 +1,5 @@
|
|||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
from pathlib import Path
|
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
from app.chain import ChainBase
|
from app.chain import ChainBase
|
||||||
@ -88,11 +87,8 @@ class SystemChain(ChainBase):
|
|||||||
"""
|
"""
|
||||||
获取最新版本
|
获取最新版本
|
||||||
"""
|
"""
|
||||||
version_res = RequestUtils().get_res(
|
version_res = RequestUtils(proxies=settings.PROXY).get_res(
|
||||||
"https://api.github.com/repos/jxxghp/MoviePilot/releases/latest")
|
"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:
|
if version_res:
|
||||||
ver_json = version_res.json()
|
ver_json = version_res.json()
|
||||||
version = f"{ver_json['tag_name']}"
|
version = f"{ver_json['tag_name']}"
|
||||||
@ -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():
|
if version_file.exists():
|
||||||
try:
|
try:
|
||||||
with open(version_file, 'rb') as f:
|
with open(version_file, 'rb') as f:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user