mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-05-18 05:59:54 +08:00
新增断网彩蛋
This commit is contained in:
parent
3132cbef65
commit
73d6a77318
1
2048
Submodule
1
2048
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit fc1ef4fe5a5fcccea7590f3e4c187c75980b353f
|
@ -1920,11 +1920,12 @@ def GetNewInformation():
|
|||||||
text = requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/information/index.html").text
|
text = requests.get("https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/information/index.html").text
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
text = """<p>无法连接到服务器</p>
|
text = f"""<p>无法连接到服务器</p>
|
||||||
<hr/>
|
<hr/>
|
||||||
<p>你可以尝试:</p>
|
<p>你可以尝试:</p>
|
||||||
<p>1. 判断是否能正常连接网络</p>
|
<p>1. 判断是否能正常连接网络</p>
|
||||||
<p>2. 作者的服务出问题了?(到这反馈:https://gitee.com/gfdgd-xi/deep-wine-runner/issues)</p>"""
|
<p>2. 作者的服务出问题了?(到这反馈:<a href='https://gitee.com/gfdgd-xi/deep-wine-runner/issues'>https://gitee.com/gfdgd-xi/deep-wine-runner/issues</a>)</p>
|
||||||
|
<p>3. 玩个<a href="file://{programPath}/2048/index.html">游戏</a>解闷下</p>"""
|
||||||
global webInformation
|
global webInformation
|
||||||
if bad:
|
if bad:
|
||||||
webInformation = QtWidgets.QTextBrowser()
|
webInformation = QtWidgets.QTextBrowser()
|
||||||
@ -2399,7 +2400,9 @@ updateThingsString = transla.transe("U", '''※1、Windows 应用适配工具新
|
|||||||
11、支持禁用程序的多语言支持(默认禁用,因为是机翻的);
|
11、支持禁用程序的多语言支持(默认禁用,因为是机翻的);
|
||||||
12、支持在程序本地翻译缺失的情况下自动机翻缺失语句;
|
12、支持在程序本地翻译缺失的情况下自动机翻缺失语句;
|
||||||
13、从此版本开始不再区分吾爱版、Spark 版和 UOS 版;
|
13、从此版本开始不再区分吾爱版、Spark 版和 UOS 版;
|
||||||
14、新增下载量查询。
|
14、新增下载量查询;
|
||||||
|
15、更新程序公告;
|
||||||
|
16、新增断网彩蛋。
|
||||||
''')
|
''')
|
||||||
for i in information["Thank"]:
|
for i in information["Thank"]:
|
||||||
thankText += f"{i}\n"
|
thankText += f"{i}\n"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
# 此库用于实现 52 版不连接程序服务器
|
# 此库用于实现 52 版不连接程序服务器(不再区分)
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
unConnect = False
|
unConnect = False
|
||||||
|
# 不再区分吾爱版
|
||||||
#with open("/var/lib/dpkg/status", "r") as i:
|
#with open("/var/lib/dpkg/status", "r") as i:
|
||||||
# unConnect = "Package: spark-deepin-wine-runner-52" in open("/var/lib/dpkg/status", "r").read()
|
# unConnect = "Package: spark-deepin-wine-runner-52" in open("/var/lib/dpkg/status", "r").read()
|
||||||
#if unConnect:
|
#if unConnect:
|
||||||
@ -11,17 +12,17 @@ class Respon:
|
|||||||
text = ""
|
text = ""
|
||||||
|
|
||||||
def get(url, timeout=None): # -> requests.Response:
|
def get(url, timeout=None): # -> requests.Response:
|
||||||
if unConnect:
|
#if unConnect:
|
||||||
# 全部 Url 都拦截
|
# 全部 Url 都拦截
|
||||||
raise Exception("52专版不支持连接服务器")
|
#raise Exception("52专版不支持连接服务器")
|
||||||
if timeout == None:
|
if timeout == None:
|
||||||
return requests.get(url)
|
return requests.get(url)
|
||||||
return requests.get(url, timeout=timeout)
|
return requests.get(url, timeout=timeout)
|
||||||
|
|
||||||
def post(url, data, timeout=None):
|
def post(url, data, timeout=None):
|
||||||
if unConnect:
|
#if unConnect:
|
||||||
# 全部 Url 都拦截
|
# 全部 Url 都拦截
|
||||||
raise Exception("52专版不支持连接服务器")
|
# raise Exception("52专版不支持连接服务器")
|
||||||
if timeout == None:
|
if timeout == None:
|
||||||
return requests.post(url, data)
|
return requests.post(url, data)
|
||||||
return requests.post(url, data, timeout=timeout)
|
return requests.post(url, data, timeout=timeout)
|
Loading…
x
Reference in New Issue
Block a user