Skip to content

The only downloader you need. 下载器的集大成者。

first commit

XiaoYouChR31970d1c7f7b
diff --git a/Res.qrc b/Res.qrc
new file mode 100644
index 00000000..08370da6
--- /dev/null
+++ b/Res.qrc
@@ -0,0 +1,7 @@
+<RCC>
+ <qresource prefix="icon">
+ <file>play.svg</file>
+ <file>pause.svg</file>
+ <file>logo.png</file>
+ </qresource>
+</RCC>
diff --git a/Res_rc.py b/Res_rc.py
new file mode 100644
index 00000000..dfbf1bd8
--- /dev/null
+++ b/Res_rc.py
@@ -0,0 +1,464 @@
+# Resource object code (Python 3)
+# Created by: object code
+# Created by: The Resource Compiler for Qt version 6.4.3
+# WARNING! All changes made in this file will be lost!
+
+from PySide6 import QtCore
+
+qt_resource_data = b"\
+\x00\x00\x032\
+<\
+svg width=\x2248\x22 h\
+eight=\x2248\x22 viewB\
+ox=\x220 0 48 48\x22 f\
+ill=\x22none\x22 xmlns\
+=\x22http://www.w3.\
+org/2000/svg\x22>\x0a<\
+path d=\x22M16.7501\
+ 8.41185L41.1672\
+ 21.1167C42.7595\
+ 21.9452 43.3786\
+ 23.9076 42.5501\
+ 25.4999C42.2421\
+ 26.0919 41.7592\
+ 26.5747 41.1672\
+ 26.8828L16.7501\
+ 39.5876C15.1579\
+ 40.4161 13.1954\
+ 39.797 12.3669 \
+38.2047C12.1259 \
+37.7414 12 37.22\
+68 12 36.7045V11\
+.2949C12 9.5 13.\
+4551 8.04492 15.\
+25 8.04492C15.69\
+77 8.04492 16.13\
+97 8.13739 16.54\
+86 8.31562L16.75\
+01 8.41185ZM15.5\
+962 10.6296L15.4\
+857 10.5829C15.4\
+099 10.5578 15.3\
+303 10.5449 15.2\
+5 10.5449C14.835\
+8 10.5449 14.5 1\
+0.8807 14.5 11.2\
+949V36.7045C14.5\
+ 36.8251 14.529 \
+36.9438 14.5847 \
+37.0507C14.7759 \
+37.4182 15.2287 \
+37.5611 15.5962 \
+37.3699L40.0132 \
+24.6651C40.1499 \
+24.594 40.2613 2\
+4.4825 40.3324 2\
+4.3459C40.5236 2\
+3.9785 40.3807 2\
+3.5256 40.0132 2\
+3.3344L15.5962 1\
+0.6296Z\x22 fill=\x22#\
+212121\x22/>\x0a</svg>\
+\x0a\
+\x00\x00\x03\x14\
+<\
+svg width=\x2248\x22 h\
+eight=\x2248\x22 viewB\
+ox=\x220 0 48 48\x22 f\
+ill=\x22none\x22 xmlns\
+=\x22http://www.w3.\
+org/2000/svg\x22>\x0a<\
+path d=\x22M11.75 6\
+C9.67893 6 8 7.6\
+7893 8 9.75V38.2\
+5C8 40.3211 9.67\
+893 42 11.75 42H\
+18.25C20.3211 42\
+ 22 40.3211 22 3\
+8.25V9.75C22 7.6\
+7893 20.3211 6 1\
+8.25 6H11.75ZM10\
+.5 9.75C10.5 9.0\
+5964 11.0596 8.5\
+ 11.75 8.5H18.25\
+C18.9404 8.5 19.\
+5 9.05964 19.5 9\
+.75V38.25C19.5 3\
+8.9404 18.9404 3\
+9.5 18.25 39.5H1\
+1.75C11.0596 39.\
+5 10.5 38.9404 1\
+0.5 38.25V9.75ZM\
+29.75 6C27.6789 \
+6 26 7.67893 26 \
+9.75V38.25C26 40\
+.3211 27.6789 42\
+ 29.75 42H36.25C\
+38.3211 42 40 40\
+.3211 40 38.25V9\
+.75C40 7.67893 3\
+8.3211 6 36.25 6\
+H29.75ZM28.5 9.7\
+5C28.5 9.05964 2\
+9.0596 8.5 29.75\
+ 8.5H36.25C36.94\
+04 8.5 37.5 9.05\
+964 37.5 9.75V38\
+.25C37.5 38.9404\
+ 36.9404 39.5 36\
+.25 39.5H29.75C2\
+9.0596 39.5 28.5\
+ 38.9404 28.5 38\
+.25V9.75Z\x22 fill=\
+\x22#212121\x22/>\x0a</sv\
+g>\x0a\
+\x00\x00\x13.\
+\x89\
+PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\
+\x00\x00\xa0\x00\x00\x00\xa0\x08\x06\x00\x00\x00\x8b\xcfg-\
+\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x00\
+\x04gAMA\x00\x00\xb1\x8f\x0b\xfca\x05\x00\x00\x00\
+\x09pHYs\x00\x00\x0e\xc3\x00\x00\x0e\xc3\x01\xc7o\
+\xa8d\x00\x00\x12\xc3IDATx^\xed\x9d\xe9w\
+\x13G\x16\xc5\xf9{\xf8\xe4E\xdd\xad\xd56\xe4\x13\x9f\
+&\x09\xca\x06\x93L\xc0\x0b\xd8a16k\xc066\
+6$x\xc1f\x091\x13\x08s\xb2\x81\x80\x9c\x19&\
+\xceL\x029I\xc8\x02\x22@\x02\x08\xc2\x99\x7fF\xf3\
+nu\x97\xd4\xdd*I\xad\x15\xb5\xf4\xee9\xf7\x14\xc6\
+\xb6PU\xfd\xfa\xbeWmY\xacb\xb1X,\x16\x8b\
+\xc5b\xb1X,\x16\x8b\xc5b\xb1X,\x16\x8b\xc5b\
+\xb1X,\x16\x8b\xc5b\xb1X,\x16\x8b\xc5b\xb1X\
+,\x16\x8b\xc5b\xb1\xfc,}\xe2\x9f\xabCc\xd74\
+\xe1\xfd\x17L\xef8\xa3\xb6\xfc<,\xbf\x87\xac\xcf\xdc\
+\x5cm=\x1c\x8b\x95_\x19\xd8,\xa0\xa2\xdb\x97\xe2\xd1\
+\xed\xa7\x12\xf4wI\x95\xc3\xfb\xfe\x911>\xd6\x8f~\
+\xe7\xf8<>\x86c\x03\xd3\x89\xe8\x96\xa9xW\xff\xa4\
+\x168zC\x98\xa1d\x11p\x973\xe9f\x87M\x9f\
+!p\xc8\x1d\x1f<Ku~\xf0,\x0d\x87\xc6\xbf\xcc\
+\x98\x80\x13\x8e\xee8\x951>\x8e\x90\xf1y\xe3\xe8w\
+\xc2\xda\xc2o\xc2\xf8\xfe\xc0\xfco)m\xe1n\x06\xca\
+\xee\x81\x99Dh\xef\xc5\xb8L\xcc\xe8\xe8y\x06\xb2U\
+\x04\xf0\xa2}S\xf1X\xdf4\x01wU\xa4\x95\x84\xcd\
+\x98\xf9N@\x04\xa8z\xde\x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5\xa8\xf7\x08n\xf8}\x02\x80\xda\xe4\xd7\xd6}@N\
+\xc0F\x94\xf8a\xc1A\xea\x01)\xed\xdc\x09\xd8\x14\x00\
+foD#\xfdL3\x80\x8d#\x00\x18\xa6>]\x00\
+\x18\x1f\xb0\x12\xd0\x1c}\x0f``\xec\x92\x00P\x9b\xfa\
+O&\xfd`\xf3\xa7 \xeaI\xc1bb\x8b\x0c`=\
+$\x01\x04l\xee\x04\x0c\xef\xc6\x8fK\xd5{\x047\xfc\
+>\xe5\x02h\xf6\x80\x0c`\xe3H\x96`\xc0\x96M\xc0\
+&\x02\x10= \x9elI\x09\xb8\xc4\x00\xd6K\x00\x10\
+\xebm\x02Xb\x026\xfa>\x01\xc0\xe8\xeb#\x16\x80\
+\x94~/y\xec\x01\x19\xc0\xba\x09\xbf\xb1\xd8y\xfc\x97\
+TW\xef\x94-\x01\xcd\xd1\xf7\x00\xea\x13_\xaf\x0e\x0f\
+-$:N>J\xc7\xde\x18IwQ\xfa\xc1\xf4w\
+\xb8\x91\x99\xd7\x0c`}$\xde\xa6\xa3wJ\xec\x8f\xe3\
+\x7f&\xa0\xf4\x83\x83\xa8T\xae\xbd\xb1\xdb\x17\xfb\x84\x97\
+\xe4w,=J\xc5\xde\xd8E\xf0\xf5\x09\x87\x87\xe6\x95\
+\x13\x92f\x00\xeb#y\x00\x09\x1c\xff\xc5\x82o\xc0\x01\
+bs\x00h\xdd\x0bD\xea\xc9\x04\x8cn\x9eTNH\
+\x9a\x01\xac\x8f\xec\xb7`\xec\xe0\x09S\x02\x8a\x9f\x84(\
+\xf6G\xdaW\x00\xe2$\xdcE= \x120\xba\xf9\xb0\
+rB\xd2\x0c`}\x04\x00\x03\xc7\x7fN\x12\x84\x16x\
+2\x01\xcdQ\xb57v\xd3>\xf9\xe1U\xd1\xcb\x9a1\
+r.\x89',\xfb@\x8c\xee\xc9\xd8\xdd\xbe\xc8\x00\xd6\
+C\xf2\x00B}\xa0\x05^\xd6\xdd\x1bw+\x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12-\x8fQ\xba\x8d\x9d\xd4o\x8e\
+_W\xfe\xfb%[\xa4\xde=N\xbd\xe7\xa9\xb6\x99\x9b\
+\xa2$\xd3FT\x9c\x86n\x03H$$\xa0\xa4\x93\xae\
+\x00S\x18i\xa9\x80O~\x1e_\x8bt\xc3\xf7!\xe1\
+\xaa\xfd\xbc,s\xea5\x92d\x1aZ\xa9\xa0\xda\xb0\x9a\
+\xb8Fp\xe57\xa7^\xe3\xca\x96\x86u\x07\xb1\xe6\x96\
+\xe0q\xea5\xbe\xb0Am\xb3\xb4Q\xf3\xb4as\xf7\
+R4\xa6}k\xf3\xf9'\xc4|\x18<\x7f\xc9\x05b\
+\xd270\xe2y\xe2\xf92x\xcd!\x13\xc4\xbbZ\xc3\
+\xa7\xa2#\xed\xf0|\x19\xbc\xa6\x93\x22\x15\x9f_2\xca\
+\xa4\xe3\xb4k=eS\xd1\x91\x8c\x12\xc8\xeaCi\x87\
+\x0dv$\x1d\xa7]\xcb\xcb\x09d^(\xcbs\x0el\
+0\x03\xc7*\xa2\x5c(\xcb5\xc3\xc6b\xb1X,\x16\
+\x8b\xc5b\xb1X,\x16\x8b\xc5b\xb1X,\x16\x8b\xc5\
+b\xb1X,\x16\x8b\xc5b\xb1X,\x16\x8b\xc5b\xb1\
+X,\x16\xabJZ\xb5\xea\xff\xbc\x0a\xf1\x0b\x1e\x91k\
+\x9d\x00\x00\x00\x00IEND\xaeB`\x82\
+"
+
+qt_resource_name = b"\
+\x00\x04\
+\x00\x06\xfa^\
+\x00i\
+\x00c\x00o\x00n\
+\x00\x08\
+\x02\x8cT'\
+\x00p\
+\x00l\x00a\x00y\x00.\x00s\x00v\x00g\
+\x00\x09\
+\x0c\x98\xb7\xc7\
+\x00p\
+\x00a\x00u\x00s\x00e\x00.\x00s\x00v\x00g\
+\x00\x08\
+\x05\xe2Y'\
+\x00l\
+\x00o\x00g\x00o\x00.\x00p\x00n\x00g\
+"
+
+qt_resource_struct = b"\
+\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x02\
+\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
+\x00\x00\x01\x89\xcf8\xb8\x0a\
+\x00\x00\x00<\x00\x00\x00\x00\x00\x01\x00\x00\x06N\
+\x00\x00\x01\x89\xc4C\xfb\xd2\
+\x00\x00\x00$\x00\x00\x00\x00\x00\x01\x00\x00\x036\
+\x00\x00\x01\x89\xcf8\x96`\
+"
+
+def qInitResources():
+ QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
+
+def qCleanupResources():
+ QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data)
+
+qInitResources()
diff --git a/app/common/download_engine.py b/app/common/download_engine.py
new file mode 100644
index 00000000..36110faf
--- /dev/null
+++ b/app/common/download_engine.py
@@ -0,0 +1,304 @@
+import traceback
+from time import time, sleep
+from concurrent.futures import ThreadPoolExecutor, as_completed
+import requests
+from pathlib import Path
+import winreg
+import re
+
+Headers = {
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.64"}
+
+urlRe = re.compile(r"^" +
+ "((?:https?|ftp)://)" +
+ "(?:\\S+(?::\\S*)?@)?" +
+ "(?:" +
+ "(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])" +
+ "(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}" +
+ "(\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))" +
+ "|" +
+ "((?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)" +
+ '(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*' +
+ "(\\.([a-z\\u00a1-\\uffff]{2,}))" +
+ ")" +
+ "(?::\\d{2,5})?" +
+ "(?:/\\S*)?" +
+ "$", re.IGNORECASE)
+
+def get_windows_proxy():
+ try:
+ # 打开 Windows 注册表项
+ key = winreg.OpenKey(winreg.HKEY_CURRENT_USER,
+ r'Software\Microsoft\Windows\CurrentVersion\Internet Settings')
+
+ # 获取代理开关状态
+ proxy_enable, _ = winreg.QueryValueEx(key, 'ProxyEnable')
+
+ if proxy_enable:
+ # 获取代理地址和端口号
+ proxy_server, _ = winreg.QueryValueEx(key, 'ProxyServer')
+ return proxy_server
+ else:
+ return None
+
+ except Exception as e:
+ print("获取 Windows 系统代理失败:", e)
+ return None
+
+
+# 获取系统代理
+proxy = get_windows_proxy()
+if proxy:
+ proxy = {
+ "http": proxy,
+ "https": proxy,
+ }
+else:
+ proxy = {
+ "http": None,
+ "https": None,
+ }
+
+
+class DownloadTask:
+ def __init__(self, url, block_nums, file_name=None, save_path=None):
+ # 初始化参数
+ self.divisional_ranges = []
+ # self.url = url
+ self.blockNums = block_nums
+ self.every_process = []
+ self.total_process = 0
+
+ # 处理重定向
+ self.url = self.__get_real_url(url)
+ print(self.url)
+
+ # 获取文件大小
+ head = requests.head(self.url, headers=Headers, proxies=proxy).headers
+ self.fileSize = int(head["content-length"])
+ print(self.fileSize)
+
+ # 获取文件名
+ if not file_name:
+ try:
+ self.fileName = head["content-disposition"]
+ print(self.fileName)
+ t = re.findall(r"filename=\"([\s\S]*)\"", self.fileName)
+ if t:
+ self.fileName = t[0]
+ except KeyError:
+ # 处理没有文件名的情况
+ # print(f"KeyError:{err}")
+ self.fileName = Path(url).name
+ print(self.fileName)
+ except Exception as e:
+ # 什么都 Get 不到的情况
+ # TODO Report
+ traceback.print_exc()
+ content_type = head["content-type"].split('/')[-1]
+ self.fileName = f"downloaded_file{int(time())}.{content_type}"
+ # print(file_name)
+ else:
+ self.fileName = file_name
+
+ # 判断路径是否存在并创建路径
+ if not save_path:
+ self.savePath = Path(__file__)
+ self.savePath = self.savePath.parent
+ # print(save_path)
+ else:
+ try:
+ self.savePath = Path(save_path)
+ if not self.savePath.exists():
+ self.savePath.mkdir()
+ except:
+ # TODO 路径不对就别干了
+ return
+
+ # 文件绝对路径(合并file_name和save_path)
+ self.fileResolve = self.savePath / self.fileName
+ self.fileInfoResolve = Path(self.savePath / f"~${self.fileName}")
+ print(f"绝对路径:{self.fileResolve}")
+
+ def __get_real_url(self, url: str):
+ try:
+ response = requests.head(url=url, headers=Headers, allow_redirects=False, verify=False)
+ print(response)
+
+ if response.status_code == 400: # Bad Requests
+ # TODO 报错处理
+ print("ERROR!", "HTTP400!Bad Url!\n请尝试更换下载链接!")
+ return
+
+ while response.status_code == 302: # 当302的时候
+ rs = response.headers["location"] # 获取重定向信息
+ print(rs)
+ # 看它返回的是不是完整的URL
+ t = urlRe.search(rs)
+ if t: # 是的话直接跳转
+ url = rs
+ elif not t: # 不是在前面加上URL
+ url = re.findall(r"((?:https?|ftp)://[\s\S]*?)/", url)
+ url = url[0] + rs
+
+ print(url)
+
+ response = requests.head(url=url, headers=Headers, allow_redirects=False, verify=False) # 再访问一次
+
+ return url
+
+ # TODO 报错处理
+ except requests.exceptions.ConnectionError as err:
+ print("网络连接失败!", f"请检查网络连接!\n{err}")
+ return
+ except ValueError as err:
+ print("网络连接失败!", f"请尝试关闭代理!\n{err}")
+ return
+
+ def calc_divisional_range(self):
+ step = self.fileSize // self.blockNums # 每块大小
+ # print(f"Step:{step}")
+
+ arr = list(range(0, self.fileSize, step))
+
+ # 否则线程数可能会不按预期地少一个
+ if self.fileSize % self.blockNums == 0:
+ arr.append(self.fileSize)
+
+ # print(f"Arr:{arr}")
+ step_list = []
+ for i in range(len(arr) - 1):
+ s_pos, e_pos = arr[i], arr[i + 1] - 1
+ step_list.append([s_pos, e_pos])
+ step_list[-1][-1] = self.fileSize - 1
+ # print(f"StepList:{step_list}")
+ return step_list
+
+ def download_worker(self, number, s_pos, e_pos):
+ finished=False
+ while not finished:
+ try:
+ download_headers = {"Range": f"bytes={s_pos}-{e_pos}",
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.64"}
+ res = requests.get(self.url, headers=download_headers, proxies=proxy, stream=True, timeout=60)
+ with open(self.fileResolve, "rb+") as f:
+ f.seek(s_pos)
+ for chunk in res.iter_content(chunk_size=65536): # iter_content 的单位是字节, 即每64K写一次文件
+ if chunk:
+ f.write(chunk)
+ s_pos += 65536
+ self.every_process[number] += 65536
+ finished = True
+ except Exception as e:
+ print("正在重连,Error", e)
+ sleep(5)
+
+ self.every_process[number] = 0
+
+ def __get_readable_size(self, size):
+ units = ["B", "KB", "MB", "GB", "TB", "PB"]
+ unit_index = 0
+ K = 1024.0
+ while size >= K:
+ size = size / K
+ unit_index += 1
+ return "%.2f %s" % (size, units[unit_index])
+
+ def download_minitor(self):
+ p = self.calc_divisional_range()
+ l = 0
+
+ while self.total_process != self.fileSize:
+ _ = ""
+ t = 0
+ self.total_process = self.fileResolve.stat().st_size
+ # 写入记录文件
+ with open(self.fileInfoResolve, "w+") as f:
+ try:
+ # print(self.divisional_ranges, self.every_process)
+ for n in range(self.blockNums):
+ _ += f"{str(self.divisional_ranges[n][0] + self.every_process[n])}|{self.divisional_ranges[n][1]}\n"
+ # print(_)
+ f.write(_)
+ f.flush()
+ # 计算速度
+ for i, o in enumerate(self.every_process):
+ k = p[i][0]
+ u = self.divisional_ranges[i][0]
+ t += (o+u) - k
+ # print(f"Debug,l:{l},t:{self.total_process}")
+ speed = self.__get_readable_size(t - l)
+ # 打印信息
+ print("\r",f"P:{round(t / self.fileSize, 2)}, {t}|{self.fileSize}", speed , end="",flush=True)
+ f.close()
+ l = t
+ sleep(1) # 每 N 秒检测一次
+ except Exception as e:
+ print(e)
+
+ print("\nFinished!")
+
+ def start(self):
+ # 开始下载
+ if self.fileSize:
+ if not self.fileInfoResolve.exists(): # 不存在记录文件的话就从头下载
+ # 计算每个分块
+ self.divisional_ranges = self.calc_divisional_range()
+ # 创建空文件
+ with open(self.fileResolve, "wb") as f:
+ pass
+ # # 创建记录文件
+ # with open(self.fileInfoResolve, "wb") as f:
+ # pass
+ # # 隐藏记录文件
+ #
+ # 创建线程池
+ with ThreadPoolExecutor() as p:
+ futures = []
+ for number, _ in enumerate(self.divisional_ranges, start=0):
+ s_pos = _[0]
+ e_pos = _[1]
+ self.every_process.append(0)
+ print(number, s_pos, e_pos)
+ futures.append(p.submit(self.download_worker, number, s_pos, e_pos))
+ # 增加检测线程
+ futures.append(p.submit(self.download_minitor))
+ # 等待所有任务执行完毕
+ as_completed(futures)
+ # 删除记录文件
+ try:
+ Path.unlink(self.fileInfoResolve)
+ except:
+ pass
+
+ else:# 记录文件存在,断点续传
+ with open(self.fileInfoResolve, "r") as f:
+ with ThreadPoolExecutor() as p:
+ futures = []
+ for number, i in enumerate(f.readlines()):
+ i = i.split("|")
+ s_pos = int(i[0])
+ e_pos = int(i[1][:-1]) # 去掉最后的\n
+ self.divisional_ranges.append([s_pos, e_pos])
+ self.every_process.append(0)
+ print("断点续传:", number, s_pos, e_pos)
+ futures.append(p.submit(self.download_worker, number, s_pos, e_pos))
+ # 关闭文件,以防万一
+ f.close()
+ # 增加检测线程
+ futures.append(p.submit(self.download_minitor))
+ # 等待所有任务执行完毕
+ as_completed(futures)
+ # 删除记录文件
+ try:
+ Path.unlink(self.fileInfoResolve)
+ except:
+ pass
+
+
+# Url = "https://download.jetbrains.com.cn/python/pycharm-professional-2023.1.1.exe"
+# Url = "https://dldir1.qq.com/qqfile/qq/QQNT/342b8a70/QQ9.9.1.15489_x64.exe"
+# Url = "https://seelevollerei-my.sharepoint.com/personal/jackyao_xn--7et36u_cn/_layouts/52/download.aspx?share=Eeq2pNOeTI5Mr9m4Lo72vDYBqvTVSLF7_Pp8bxpcqagaJA"
+# task = DownloadTask(Url, 8)
+# task.start()
+# task.download_minitor()
diff --git a/app/common/signal_bus.py b/app/common/signal_bus.py
new file mode 100644
index 00000000..accd9ca7
--- /dev/null
+++ b/app/common/signal_bus.py
@@ -0,0 +1,12 @@
+# coding: utf-8
+from PySide6.QtCore import QObject, Signal
+from PySide6.QtGui import QPixmap
+
+class SignalBus(QObject):
+ """ Signal bus """
+
+ addTaskSignal = Signal(str,str,int,str,QPixmap)
+ TaskList = []
+
+
+signalBus = SignalBus()
\ No newline at end of file
diff --git a/app/components/Ui_SystemInfoCard.py b/app/components/Ui_SystemInfoCard.py
new file mode 100644
index 00000000..5c896da9
--- /dev/null
+++ b/app/components/Ui_SystemInfoCard.py
@@ -0,0 +1,88 @@
+# -*- coding: utf-8 -*-
+
+################################################################################
+## Form generated from reading UI file 'SystemInfoCard.ui'
+##
+## Created by: Qt User Interface Compiler version 6.4.3
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
+
+from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
+ QMetaObject, QObject, QPoint, QRect,
+ QSize, QTime, QUrl, Qt)
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
+ QFont, QFontDatabase, QGradient, QIcon,
+ QImage, QKeySequence, QLinearGradient, QPainter,
+ QPalette, QPixmap, QRadialGradient, QTransform)
+from PySide6.QtWidgets import (QApplication, QHBoxLayout, QSizePolicy, QVBoxLayout,
+ QWidget)
+
+from qfluentwidgets import (BodyLabel, CardWidget, PixmapLabel, PrimarySplitPushButton,
+ SplitPushButton, TitleLabel)
+
+class Ui_SystemInfoCard(object):
+ def setupUi(self, SystemInfoCard):
+ if not SystemInfoCard.objectName():
+ SystemInfoCard.setObjectName(u"SystemInfoCard")
+ SystemInfoCard.resize(793, 131)
+ SystemInfoCard.setMinimumSize(QSize(793, 131))
+ SystemInfoCard.setMaximumSize(QSize(16777215, 131))
+ self.horizontalLayout = QHBoxLayout(SystemInfoCard)
+ self.horizontalLayout.setSpacing(12)
+ self.horizontalLayout.setObjectName(u"horizontalLayout")
+ self.LogoPixmapLabel = PixmapLabel(SystemInfoCard)
+ self.LogoPixmapLabel.setObjectName(u"LogoPixmapLabel")
+ self.LogoPixmapLabel.setMinimumSize(QSize(101, 101))
+ self.LogoPixmapLabel.setMaximumSize(QSize(101, 101))
+ self.LogoPixmapLabel.setScaledContents(True)
+ self.LogoPixmapLabel.setAlignment(Qt.AlignCenter)
+
+ self.horizontalLayout.addWidget(self.LogoPixmapLabel)
+
+ self.BodyVBoxLayout = QVBoxLayout()
+ self.BodyVBoxLayout.setSpacing(0)
+ self.BodyVBoxLayout.setObjectName(u"BodyVBoxLayout")
+ self.TitleLabel = TitleLabel(SystemInfoCard)
+ self.TitleLabel.setObjectName(u"TitleLabel")
+ sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.TitleLabel.sizePolicy().hasHeightForWidth())
+ self.TitleLabel.setSizePolicy(sizePolicy)
+
+ self.BodyVBoxLayout.addWidget(self.TitleLabel)
+
+ self.BodyLabel = BodyLabel(SystemInfoCard)
+ self.BodyLabel.setObjectName(u"BodyLabel")
+ sizePolicy1 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Maximum)
+ sizePolicy1.setHorizontalStretch(0)
+ sizePolicy1.setVerticalStretch(0)
+ sizePolicy1.setHeightForWidth(self.BodyLabel.sizePolicy().hasHeightForWidth())
+ self.BodyLabel.setSizePolicy(sizePolicy1)
+ self.BodyLabel.setMaximumSize(QSize(16777215, 101))
+ self.BodyLabel.setWordWrap(True)
+
+ self.BodyVBoxLayout.addWidget(self.BodyLabel)
+
+
+ self.horizontalLayout.addLayout(self.BodyVBoxLayout)
+
+ self.PrimarySplitPushButton = PrimarySplitPushButton(SystemInfoCard)
+ self.PrimarySplitPushButton.setObjectName(u"PrimarySplitPushButton")
+ self.PrimarySplitPushButton.setMinimumSize(QSize(121, 31))
+ self.PrimarySplitPushButton.setMaximumSize(QSize(121, 31))
+
+ self.horizontalLayout.addWidget(self.PrimarySplitPushButton)
+
+
+ self.retranslateUi(SystemInfoCard)
+
+ QMetaObject.connectSlotsByName(SystemInfoCard)
+ # setupUi
+
+ def retranslateUi(self, SystemInfoCard):
+ SystemInfoCard.setWindowTitle(QCoreApplication.translate("SystemInfoCard", u"Form", None))
+ self.PrimarySplitPushButton.setProperty("text_", QCoreApplication.translate("SystemInfoCard", u" \u4e0b\u8f7d ", None))
+ # retranslateUi
+
diff --git a/app/components/Ui_TaskCard.py b/app/components/Ui_TaskCard.py
new file mode 100644
index 00000000..e4a78802
--- /dev/null
+++ b/app/components/Ui_TaskCard.py
@@ -0,0 +1,138 @@
+# -*- coding: utf-8 -*-
+
+################################################################################
+## Form generated from reading UI file 'TaskCard.ui'
+##
+## Created by: Qt User Interface Compiler version 6.4.3
+##
+## WARNING! All changes made in this file will be lost when recompiling UI file!
+################################################################################
+
+from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
+ QMetaObject, QObject, QPoint, QRect,
+ QSize, QTime, QUrl, Qt)
+from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
+ QFont, QFontDatabase, QGradient, QIcon,
+ QImage, QKeySequence, QLinearGradient, QPainter,
+ QPalette, QPixmap, QRadialGradient, QTransform)
+from PySide6.QtWidgets import (QApplication, QHBoxLayout, QSizePolicy, QSpacerItem,
+ QVBoxLayout, QWidget)
+
+from qfluentwidgets import (BodyLabel, CardWidget, PixmapLabel, ProgressBar,
+ PushButton, TitleLabel, ToolButton, PrimaryToolButton)
+
+class Ui_TaskCard(object):
+ def setupUi(self, TaskCard):
+ if not TaskCard.objectName():
+ TaskCard.setObjectName(u"TaskCard")
+ TaskCard.resize(793, 119)
+ TaskCard.setMinimumSize(QSize(793, 119))
+ TaskCard.setMaximumSize(QSize(16777215, 119))
+ self.horizontalLayout_3 = QHBoxLayout(TaskCard)
+ self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
+ self.LogoPixmapLabel = PixmapLabel(TaskCard)
+ self.LogoPixmapLabel.setObjectName(u"LogoPixmapLabel")
+ self.LogoPixmapLabel.setMinimumSize(QSize(101, 101))
+ self.LogoPixmapLabel.setMaximumSize(QSize(101, 101))
+ self.LogoPixmapLabel.setScaledContents(True)
+ self.LogoPixmapLabel.setAlignment(Qt.AlignCenter)
+
+ self.horizontalLayout_3.addWidget(self.LogoPixmapLabel)
+
+ self.verticalLayout = QVBoxLayout()
+ self.verticalLayout.setSpacing(0)
+ self.verticalLayout.setObjectName(u"verticalLayout")
+ self.TitleLabel = TitleLabel(TaskCard)
+ self.TitleLabel.setObjectName(u"TitleLabel")
+ sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.TitleLabel.sizePolicy().hasHeightForWidth())
+ self.TitleLabel.setSizePolicy(sizePolicy)
+ self.TitleLabel.setMinimumSize(QSize(0, 38))
+ self.TitleLabel.setMaximumSize(QSize(16777215, 38))
+
+ self.verticalLayout.addWidget(self.TitleLabel)
+
+ self.horizontalLayout = QHBoxLayout()
+ self.horizontalLayout.setObjectName(u"horizontalLayout")
+ self.horizontalLayout.setSpacing(6)
+ self.horizontalSpacer = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
+
+ self.horizontalLayout.addItem(self.horizontalSpacer)
+
+ self.pauseButton = ToolButton(TaskCard)
+ self.pauseButton.setObjectName(u"pauseButton")
+ self.pauseButton.setMinimumSize(QSize(31, 31))
+ self.pauseButton.setMaximumSize(QSize(31, 31))
+
+ self.horizontalLayout.addWidget(self.pauseButton)
+
+ # self.cancelButton = ToolButton(TaskCard)
+ # self.cancelButton.setObjectName(u"cancelButton")
+ # self.cancelButton.setMinimumSize(QSize(31, 31))
+ # self.cancelButton.setMaximumSize(QSize(31, 31))
+
+ # self.horizontalLayout.addWidget(self.cancelButton)
+
+ self.folderButton = PrimaryToolButton(TaskCard)
+ self.folderButton.setObjectName(u"folderButton")
+ self.folderButton.setMinimumSize(QSize(31, 31))
+ self.folderButton.setMaximumSize(QSize(31, 31))
+
+ self.horizontalLayout.addWidget(self.folderButton)
+
+ self.verticalLayout.addLayout(self.horizontalLayout)
+
+ self.horizontalLayout_2 = QHBoxLayout()
+ self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
+ self.speedLable = BodyLabel(TaskCard)
+ self.speedLable.setObjectName(u"speedLable")
+ self.speedLable.setMinimumSize(QSize(0, 19))
+ self.speedLable.setMaximumSize(QSize(151, 19))
+
+ self.horizontalLayout_2.addWidget(self.speedLable)
+
+ self.leftTimeLabel = BodyLabel(TaskCard)
+ self.leftTimeLabel.setObjectName(u"leftTimeLabel")
+ self.leftTimeLabel.setMinimumSize(QSize(0, 19))
+ self.leftTimeLabel.setMaximumSize(QSize(151, 19))
+
+ self.horizontalLayout_2.addWidget(self.leftTimeLabel)
+
+ self.horizontalSpacer_2 = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
+
+ self.horizontalLayout_2.addItem(self.horizontalSpacer_2)
+
+ self.processLabel = BodyLabel(TaskCard)
+ self.processLabel.setObjectName(u"processLabel")
+ self.processLabel.setMinimumSize(QSize(0, 19))
+ self.processLabel.setMaximumSize(QSize(201, 19))
+
+ self.horizontalLayout_2.addWidget(self.processLabel)
+
+
+ self.verticalLayout.addLayout(self.horizontalLayout_2)
+
+ self.ProgressBar = ProgressBar(TaskCard)
+ self.ProgressBar.setObjectName(u"ProgressBar")
+
+ self.verticalLayout.addWidget(self.ProgressBar)
+
+
+ self.horizontalLayout_3.addLayout(self.verticalLayout)
+
+
+ self.retranslateUi(TaskCard)
+
+ QMetaObject.connectSlotsByName(TaskCard)
+ # setupUi
+
+ def retranslateUi(self, TaskCard):
+ TaskCard.setWindowTitle(QCoreApplication.translate("TaskCard", u"Form", None))
+ self.pauseButton.setText("")
+ # self.cancelButton.setText("")
+ self.folderButton.setText("")
+ self.processLabel.setText("")
+ # retranslateUi
+
diff --git a/app/components/download_option_dialog.py b/app/components/download_option_dialog.py
new file mode 100644
index 00000000..0c3c9f2b
--- /dev/null
+++ b/app/components/download_option_dialog.py
@@ -0,0 +1,134 @@
+from PySide6.QtCore import Signal
+from PySide6.QtGui import QColor
+from PySide6.QtWidgets import QVBoxLayout, QFileDialog, QHBoxLayout, QSizePolicy
+from qfluentwidgets import PushSettingCard, SettingCardGroup, RangeSettingCard, RangeConfigItem, RangeValidator, \
+ PushButton, PrimaryPushButton, ComboBoxSettingCard, OptionsValidator, OptionsConfigItem, TextEdit, \
+ Theme, qconfig
+from qfluentwidgets.common.icon import FluentIcon as FIF
+from qfluentwidgets.components.dialog_box.mask_dialog_base import MaskDialogBase
+from ..common.signal_bus import signalBus
+
+
+class DownloadOptionDialog(MaskDialogBase):
+ startSignal = Signal()
+
+ def __init__(self, parent=None, list=None, dict=None):
+ super().__init__(parent=parent)
+
+ self.dict = dict
+ self.list = list
+ self.versions = []
+
+ self.setShadowEffect(60, (0, 10), QColor(0, 0, 0, 50))
+ self.setMaskColor(QColor(0, 0, 0, 76))
+
+ self.VBoxLayout = QVBoxLayout(self.widget)
+ self.VBoxLayout.setContentsMargins(18, 18, 18, 18)
+
+ self.widget.setLayout(self.VBoxLayout)
+
+ self.widget.setMinimumSize(510, 410)
+ self.widget.setMaximumSize(680, 420)
+ print(qconfig.themeMode.value)
+ if qconfig.themeMode.value == Theme.DARK:
+ # C = ThemeColor.DARK_3.color()
+ self.widget.setStyleSheet(".QFrame{border-radius:10px;background-color:rgb(39,39,39)}")
+ else:
+ self.widget.setStyleSheet(".QFrame{border-radius:10px;background-color:white}")
+
+ # 信息组
+ self.VersionGroup = SettingCardGroup(
+ "选择版本", self.widget)
+
+ for i in self.list:
+ self.versions.append(i["Version"])
+
+ versionItem = OptionsConfigItem(
+ "Material", "Version", self.versions[0], OptionsValidator(self.versions))
+
+ self.versionCard = ComboBoxSettingCard(
+ versionItem,
+ FIF.VIEW,
+ "选择版本",
+ "选择你想下载的版本",
+ texts=self.versions,
+ parent=self.VersionGroup
+ )
+
+ self.logTextEdit = TextEdit(self.VersionGroup)
+ self.logTextEdit.setReadOnly(True)
+ self.logTextEdit.setText(self.list[0]["Log"])
+ sizePolicy = QSizePolicy(QSizePolicy.Maximum, QSizePolicy.Maximum)
+ self.logTextEdit.setSizePolicy(sizePolicy)
+
+ self.VersionGroup.addSettingCards([self.versionCard, self.logTextEdit])
+
+ # 下载设置组
+ self.SettingGroup = SettingCardGroup(
+ "下载设置", self.widget)
+
+ # Choose Folder Card
+ self.downloadFolderCard = PushSettingCard(
+ "选择下载目录",
+ FIF.DOWNLOAD,
+ "下载目录",
+ __file__,
+ self.SettingGroup
+ )
+
+ # Choose Threading Card
+ self.blockNumCard = RangeSettingCard(
+ RangeConfigItem("Material", "AcrylicBlurRadius", 16, RangeValidator(0, 64)),
+ FIF.CHAT,
+ "下载线程数",
+ '下载线程越多,下载越快,同时也越吃性能',
+ self.SettingGroup
+ )
+
+ self.ButtonLayout = QHBoxLayout()
+
+ self.yesButton = PrimaryPushButton(self)
+ self.yesButton.setObjectName("yesButton")
+ self.yesButton.setText("开始下载")
+ self.noButton = PushButton(self)
+ self.noButton.setObjectName("noButton")
+ self.noButton.setText("取消下载")
+
+ self.ButtonLayout.addWidget(self.noButton)
+ self.ButtonLayout.addWidget(self.yesButton)
+ self.ButtonLayout.setSpacing(18)
+
+ self.SettingGroup.addSettingCards([self.downloadFolderCard, self.blockNumCard])
+
+ self.VBoxLayout.addWidget(self.VersionGroup)
+ self.VBoxLayout.addWidget(self.SettingGroup)
+ self.VBoxLayout.addLayout(self.ButtonLayout)
+
+ self.__connectSignalToSlot()
+
+ def __connectSignalToSlot(self):
+ self.downloadFolderCard.clicked.connect(
+ self.__onDownloadFolderCardClicked)
+ self.noButton.clicked.connect(self.close)
+
+ self.yesButton.clicked.connect(self.startTask)
+
+ self.versionCard.comboBox.currentIndexChanged.connect(self._onCurrentIndexChanged)
+
+ def startTask(self):
+ signalBus.addTaskSignal.emit(self.list[self.versionCard.comboBox.currentIndex()]["Url"],
+ self.downloadFolderCard.contentLabel.text(), self.blockNumCard.configItem.value,
+ self.dict["Name"], self.dict["Pixmap"])
+ self.close()
+
+ def __onDownloadFolderCardClicked(self):
+ """ download folder card clicked slot """
+ folder = QFileDialog.getExistingDirectory(
+ self, "选择文件夹", "./")
+ if not folder or self.downloadFolderCard.contentLabel.text() == folder:
+ return
+
+ self.downloadFolderCard.setContent(folder)
+
+ def _onCurrentIndexChanged(self, Index: int):
+ self.logTextEdit.setText(self.list[Index]["Log"])
diff --git a/app/components/system_info_card.py b/app/components/system_info_card.py
new file mode 100644
index 00000000..8dbef670
--- /dev/null
+++ b/app/components/system_info_card.py
@@ -0,0 +1,34 @@
+from .Ui_SystemInfoCard import Ui_SystemInfoCard
+from qfluentwidgets import CardWidget, RoundMenu, Action
+from qfluentwidgets import FluentIcon as FIF
+
+from ..components.download_option_dialog import DownloadOptionDialog
+
+from PySide6.QtGui import QDesktopServices, QPixmap
+from PySide6.QtCore import QUrl
+
+class SystemInfoCard(CardWidget, Ui_SystemInfoCard):
+ def __init__(self, parent=None):
+ super().__init__(parent=parent)
+ self.setupUi(self)
+
+ self.List = []
+ self.Video = ""
+ self.pixmap: QPixmap
+
+ self.PrimarySplitPushButton.setText(" 下载 ")
+ self.Menu = RoundMenu(parent=self)
+ self.VideoAction = Action(FIF.VIDEO, "视频")
+ self.Menu.addAction(self.VideoAction)
+ self.PrimarySplitPushButton.setFlyout(self.Menu)
+
+
+ def connect_signal_to_slot(self):
+ self.VideoAction.triggered.connect(lambda:QDesktopServices.openUrl(QUrl(self.Video)))
+ self.PrimarySplitPushButton.clicked.connect(self.open_download_messagebox)
+
+ def open_download_messagebox(self):
+ w = DownloadOptionDialog(self.parent().parent().parent().parent().parent().parent(), self.List, {"Pixmap": self.pixmap, "Name":self.TitleLabel.text()})
+ w.exec()
+
+
diff --git a/app/components/task_card.py b/app/components/task_card.py
new file mode 100644
index 00000000..215e80f1
--- /dev/null
+++ b/app/components/task_card.py
@@ -0,0 +1,384 @@
+import os
+import threading
+from concurrent.futures import ThreadPoolExecutor
+
+from .Ui_TaskCard import Ui_TaskCard
+from qfluentwidgets import CardWidget, RoundMenu, Action
+from qfluentwidgets import FluentIcon as FIF
+from ..common.download_engine import DownloadTask
+from ..common.signal_bus import signalBus
+
+
+from PySide6.QtGui import QDesktopServices, QPixmap, QIcon
+from PySide6.QtCore import QUrl, QSize, Signal
+
+import traceback
+from time import time, sleep
+from concurrent.futures import ThreadPoolExecutor, as_completed
+import requests
+from pathlib import Path
+import winreg
+import re
+
+Headers = {
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.64"}
+
+urlRe = re.compile(r"^" +
+ "((?:https?|ftp)://)" +
+ "(?:\\S+(?::\\S*)?@)?" +
+ "(?:" +
+ "(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])" +
+ "(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}" +
+ "(\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))" +
+ "|" +
+ "((?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)" +
+ '(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*' +
+ "(\\.([a-z\\u00a1-\\uffff]{2,}))" +
+ ")" +
+ "(?::\\d{2,5})?" +
+ "(?:/\\S*)?" +
+ "$", re.IGNORECASE)
+
+def get_windows_proxy():
+ try:
+ # 打开 Windows 注册表项
+ key = winreg.OpenKey(winreg.HKEY_CURRENT_USER,
+ r'Software\Microsoft\Windows\CurrentVersion\Internet Settings')
+
+ # 获取代理开关状态
+ proxy_enable, _ = winreg.QueryValueEx(key, 'ProxyEnable')
+
+ if proxy_enable:
+ # 获取代理地址和端口号
+ proxy_server, _ = winreg.QueryValueEx(key, 'ProxyServer')
+ return proxy_server
+ else:
+ return None
+
+ except Exception as e:
+ print("获取 Windows 系统代理失败:", e)
+ return None
+
+
+# 获取系统代理
+proxy = get_windows_proxy()
+if proxy:
+ proxy = {
+ "http": proxy,
+ "https": proxy,
+ }
+else:
+ proxy = {
+ "http": None,
+ "https": None,
+ }
+
+
+class TaskCard(CardWidget, Ui_TaskCard):
+
+ changeInfoSignal = Signal(int, str, str)
+
+ def __init__(self, url: str, path: str, block_num: int, number:int,name: str, pixmap: QPixmap, parent=None, file_name=None):
+ super().__init__(parent=parent)
+ self.setupUi(self)
+
+ self.TitleLabel.setText(name)
+ self.LogoPixmapLabel.setPixmap(pixmap)
+ self.LogoPixmapLabel.setFixedSize(101, 101)
+
+ # 初始化 Icon 类
+ self.pauseIcon = QIcon()
+ self.pauseIcon.addFile(u":/icon/pause.svg", QSize(), QIcon.Normal, QIcon.Off)
+ self.playIcon = QIcon()
+ self.playIcon.addFile(u":/icon/play.svg", QSize(), QIcon.Normal, QIcon.Off)
+
+ self.pauseButton.setIcon(self.pauseIcon)
+ # self.cancelButton.setIcon(FIF.DELETE)
+ self.folderButton.setIcon(FIF.FOLDER)
+
+ self.paused = False
+
+ self.number = number
+
+ # 下载相关初始化
+
+ # 初始化参数
+ self.divisional_ranges = []
+ self.blockNums = block_num
+ self.every_process = []
+ self.total_process = 0
+
+ # 处理重定向
+ self.url = self.__get_real_url(url)
+ print(self.url)
+
+ # 获取文件大小
+ head = requests.head(self.url, headers=Headers, proxies=proxy).headers
+ self.fileSize = int(head["content-length"])
+ print(self.fileSize)
+
+ # 获取文件名
+ if not file_name:
+ try:
+ self.fileName = head["content-disposition"]
+ print(self.fileName)
+ t = re.findall(r"filename=\"([\s\S]*)\"", self.fileName)
+ if t:
+ self.fileName = t[0]
+ except KeyError:
+ # 处理没有文件名的情况
+ # print(f"KeyError:{err}")
+ self.fileName = Path(url).name
+ print(self.fileName)
+ except Exception as e:
+ # 什么都 Get 不到的情况
+ # TODO Report
+ traceback.print_exc()
+ content_type = head["content-type"].split('/')[-1]
+ self.fileName = f"downloaded_file{int(time())}.{content_type}"
+ # print(file_name)
+ else:
+ self.fileName = file_name
+
+ # 判断路径是否存在并创建路径
+ if not path:
+ self.savePath = Path(__file__)
+ self.savePath = self.savePath.parent
+ # print(save_path)
+ else:
+ try:
+ self.savePath = Path(path)
+ if not self.savePath.exists():
+ self.savePath.mkdir()
+ except:
+ # TODO 路径不对就别干了
+ return
+
+ # 文件绝对路径(合并file_name和save_path)
+ self.fileResolve = self.savePath / self.fileName
+ self.fileInfoResolve = Path(self.savePath / f"~${self.fileName}")
+ print(f"绝对路径:{self.fileResolve}")
+
+ # 连接信号到槽
+ self.changeInfoSignal.connect(self.__change_info)
+ self.pauseButton.clicked.connect(self.pause_task)
+ self.folderButton.clicked.connect(lambda:os.startfile(path))
+
+ # 开始下载
+ self.Thread = threading.Thread(target=self.start, daemon=True)
+ self.Thread.start()
+
+ def pause_task(self):
+ if self.paused:
+ self.paused = False # 停止就开始
+ self.processLabel.setText("正在重启")
+ if not self.Thread.is_alive():
+ self.Thread = threading.Thread(target=self.start, daemon=True)
+ self.Thread.start()
+ self.pauseButton.setIcon(self.pauseIcon)
+ elif not self.paused:
+ self.paused = True
+ self.processLabel.setText("正在暂停")
+ while self.Thread.is_alive():
+ sleep(0.1)
+ self.pauseButton.setIcon(self.playIcon)
+ self.processLabel.setText("暂停中")
+
+ def __change_info(self, value:int, process:str, speed:str):
+ self.ProgressBar.setValue(value)
+ self.processLabel.setText(process)
+ self.speedLable.setText(speed)
+
+ def __get_real_url(self, url: str):
+ try:
+ response = requests.head(url=url, headers=Headers, allow_redirects=False, verify=False)
+ print(response)
+
+ if response.status_code == 400: # Bad Requests
+ # TODO 报错处理
+ print("ERROR!", "HTTP400!Bad Url!\n请尝试更换下载链接!")
+ return
+
+ while response.status_code == 302: # 当302的时候
+ rs = response.headers["location"] # 获取重定向信息
+ print(rs)
+ # 看它返回的是不是完整的URL
+ t = urlRe.search(rs)
+ if t: # 是的话直接跳转
+ url = rs
+ elif not t: # 不是在前面加上URL
+ url = re.findall(r"((?:https?|ftp)://[\s\S]*?)/", url)
+ url = url[0] + rs
+
+ print(url)
+
+ response = requests.head(url=url, headers=Headers, allow_redirects=False, verify=False) # 再访问一次
+
+ return url
+
+ # TODO 报错处理
+ except requests.exceptions.ConnectionError as err:
+ print("网络连接失败!", f"请检查网络连接!\n{err}")
+ return
+ except ValueError as err:
+ print("网络连接失败!", f"请尝试关闭代理!\n{err}")
+ return
+
+ def calc_divisional_range(self):
+ step = self.fileSize // self.blockNums # 每块大小
+ # print(f"Step:{step}")
+
+ arr = list(range(0, self.fileSize, step))
+
+ # 否则线程数可能会不按预期地少一个
+ if self.fileSize % self.blockNums == 0:
+ arr.append(self.fileSize)
+
+ # print(f"Arr:{arr}")
+ step_list = []
+ for i in range(len(arr) - 1):
+ s_pos, e_pos = arr[i], arr[i + 1] - 1
+ step_list.append([s_pos, e_pos])
+ step_list[-1][-1] = self.fileSize - 1
+ # print(f"StepList:{step_list}")
+ return step_list
+
+ def download_worker(self, number, s_pos, e_pos):
+ finished = False
+ while not finished:
+ try:
+ download_headers = {"Range": f"bytes={s_pos}-{e_pos}",
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.64"}
+ res = requests.get(self.url, headers=download_headers, proxies=proxy, stream=True, timeout=60)
+ with open(self.fileResolve, "rb+") as f:
+ f.seek(s_pos)
+ for chunk in res.iter_content(chunk_size=65536): # iter_content 的单位是字节, 即每64K写一次文件
+ if self.paused:
+ return
+ if chunk:
+ f.write(chunk)
+ s_pos += 65536
+ self.every_process[number] += 65536
+ finished = True
+ except Exception as e:
+ if self.paused:
+ return
+ print("正在重连,Error", e)
+ sleep(5)
+
+ self.every_process[number] = 0
+
+ def __get_readable_size(self, size):
+ units = ["B", "KB", "MB", "GB", "TB", "PB"]
+ unit_index = 0
+ K = 1024.0
+ while size >= K:
+ size = size / K
+ unit_index += 1
+ return "%.2f %s" % (size, units[unit_index])
+
+ def download_minitor(self):
+ p = self.calc_divisional_range()
+ l = 0
+
+ while self.total_process != self.fileSize:
+
+ if self.paused:
+ return
+
+ _ = ""
+ t = 0
+ self.total_process = self.fileResolve.stat().st_size
+ # 写入记录文件
+ with open(self.fileInfoResolve, "w+") as f:
+ try:
+ # print(self.divisional_ranges, self.every_process)
+ for n in range(self.blockNums):
+ _ += f"{str(self.divisional_ranges[n][0] + self.every_process[n])}|{self.divisional_ranges[n][1]}\n"
+ # print(_)
+ f.write(_)
+ f.flush()
+ # 计算速度
+ for i, o in enumerate(self.every_process):
+ k = p[i][0]
+ u = self.divisional_ranges[i][0]
+ t += (o + u) - k
+ # print(f"Debug,l:{l},t:{self.total_process}")
+ speed = self.__get_readable_size(t - l)
+ # 打印信息
+ print("\r", f"P:{round(t / self.fileSize, 2)}, {t}|{self.fileSize}", speed, end="", flush=True)
+ # 发送信号更新界面
+ self.changeInfoSignal.emit(int(round(t / self.fileSize, 2) * 100), f"{self.__get_readable_size(t)}|{self.__get_readable_size(self.fileSize)}", f"{speed}/s")
+ f.close()
+ l = t
+ sleep(1) # 每 N 秒检测一次
+ except Exception as e:
+ print(e)
+
+
+ # 打印信息
+ print("\nFinished!")
+ # 发送信号更新界面
+ self.changeInfoSignal.emit(100,
+ "已完成",
+ "")
+
+ def start(self):
+ # TODO 为了适配暂停后重新开始需要重置数据
+ self.every_process = []
+ self.total_process = 0
+ # 开始下载
+ if self.fileSize:
+ if not self.fileInfoResolve.exists(): # 不存在记录文件的话就从头下载
+ # 计算每个分块
+ self.divisional_ranges = self.calc_divisional_range()
+ # 创建空文件
+ with open(self.fileResolve, "wb") as f:
+ pass
+ # # 创建记录文件
+ # with open(self.fileInfoResolve, "wb") as f:
+ # pass
+ # # 隐藏记录文件
+ #
+ # 创建线程池
+ with ThreadPoolExecutor() as p:
+ futures = []
+ for number, _ in enumerate(self.divisional_ranges, start=0):
+ s_pos = _[0]
+ e_pos = _[1]
+ self.every_process.append(0)
+ print(number, s_pos, e_pos)
+ futures.append(p.submit(self.download_worker, number, s_pos, e_pos))
+ # 增加检测线程
+ futures.append(p.submit(self.download_minitor))
+ # 等待所有任务执行完毕
+ as_completed(futures)
+ # 删除记录文件
+ try:
+ Path.unlink(self.fileInfoResolve)
+ except:
+ pass
+
+ else: # 记录文件存在,断点续传
+ with open(self.fileInfoResolve, "r") as f:
+ with ThreadPoolExecutor() as p:
+ futures = []
+ for number, i in enumerate(f.readlines()):
+ i = i.split("|")
+ s_pos = int(i[0])
+ e_pos = int(i[1][:-1]) # 去掉最后的\n
+ self.divisional_ranges.append([s_pos, e_pos])
+ self.every_process.append(0)
+ print("断点续传:", number, s_pos, e_pos)
+ futures.append(p.submit(self.download_worker, number, s_pos, e_pos))
+ # 关闭文件,以防万一
+ f.close()
+ # 增加检测线程
+ futures.append(p.submit(self.download_minitor))
+ # 等待所有任务执行完毕
+ as_completed(futures)
+ # 删除记录文件
+ try:
+ Path.unlink(self.fileInfoResolve)
+ except:
+ pass
diff --git a/app/view/debug_interface.py b/app/view/debug_interface.py
new file mode 100644
index 00000000..e69de29b
diff --git a/app/view/home_interface.py b/app/view/home_interface.py
new file mode 100644
index 00000000..bfb5b6d2
--- /dev/null
+++ b/app/view/home_interface.py
@@ -0,0 +1,70 @@
+import requests
+from PySide6.QtWidgets import QVBoxLayout, QWidget, QHBoxLayout, QFrame
+from PySide6.QtGui import QPixmap, QImage
+from PySide6.QtCore import QByteArray, Qt
+from qfluentwidgets import SmoothScrollArea, ExpandLayout
+
+from ..common import download_engine
+from ..components.system_info_card import SystemInfoCard
+import json
+import base64
+
+
+class HomeInterface(SmoothScrollArea):
+ def __init__(self, parent=None):
+ super().__init__(parent=parent)
+
+ self.setObjectName("HomeInterface")
+ self.cards = []
+ self.setupUi()
+
+ self.setWidget(self.scrollWidget)
+ self.setWidgetResizable(True)
+
+ # Apply QSS
+ self.setStyleSheet("""QScrollArea, .QWidget {
+ border: none;
+ background-color: transparent;
+ }""")
+
+ def setupUi(self):
+ self.setMinimumWidth(816)
+ self.setFrameShape(QFrame.NoFrame)
+ self.scrollWidget = QWidget()
+ self.scrollWidget.setMinimumWidth(816)
+ self.expandLayout = ExpandLayout(self.scrollWidget)
+ self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
+
+ # with open("./Content.json", "r", encoding="utf-8") as f:
+ # self.json = json.loads(f.read())["OS"]
+ # f.close()
+
+ self.json = json.loads(requests.get(url="https://seelevollerei-my.sharepoint.com/personal/jackyao_xn--7et36u_cn/_layouts/52/download.aspx?share=Ecm5kLYVJedKlw60gcDkxPEB1PlS5Y-P-ttDSit_V8KuLw",
+ headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.64"},
+ proxies=download_engine.proxy).content)["OS"]
+
+ for i in self.json:
+ # Create Card
+ _ = SystemInfoCard(self.scrollWidget)
+ self.cards.append(SystemInfoCard)
+ _.List = i["List"]
+
+ _.TitleLabel.setText(i["Name"])
+
+ # 将字符串转换为字节数据
+ data = base64.b64decode(i["Icon"])
+
+ # 从字节数据中创建QPixmap对象
+ _.pixmap = QPixmap()
+ _.pixmap.loadFromData(data)
+
+ _.LogoPixmapLabel.setPixmap(_.pixmap)
+ _.LogoPixmapLabel.setFixedSize(101, 101)
+
+ _.BodyLabel.setText(i["Intro"])
+
+ _.Video = i["Video"]
+
+ _.connect_signal_to_slot()
+
+ self.expandLayout.addWidget(_)
diff --git a/app/view/main_window.py b/app/view/main_window.py
new file mode 100644
index 00000000..67cd7b75
--- /dev/null
+++ b/app/view/main_window.py
@@ -0,0 +1,68 @@
+# coding: utf-8
+from typing import List
+from PySide6.QtCore import Qt, Signal, QEasingCurve, QUrl, QSize
+from PySide6.QtGui import QIcon, QDesktopServices
+from PySide6.QtWidgets import QApplication, QHBoxLayout, QFrame, QWidget
+
+from qfluentwidgets import NavigationAvatarWidget, NavigationItemPosition, MessageBox, FluentWindow, SplashScreen
+from qfluentwidgets import FluentIcon as FIF
+
+from .home_interface import HomeInterface
+from .task_interface import TaskInterface
+
+
+class MainWindow(FluentWindow):
+
+ def __init__(self):
+ super().__init__()
+ self.initWindow()
+
+ # create sub interface
+ self.homeInterface = HomeInterface(self)
+ self.taskInterface = TaskInterface(self)
+
+ # add items to navigation interface
+ self.initNavigation()
+ self.splashScreen.finish()
+
+ def initNavigation(self):
+ # add navigation items
+ self.addSubInterface(self.homeInterface, FIF.HOME, "主页")
+ self.addSubInterface(self.taskInterface, FIF.DOWNLOAD, "任务列表")
+ self.addSubInterface(self.taskInterface, FIF.DOWNLOAD, "任务列表")
+ # add custom widget to bottom
+ self.navigationInterface.addItem(
+ routeKey='avatar',
+ text='关于',
+ icon=FIF.INFO,
+ onClick=self.showInfoMessageBox,
+ position=NavigationItemPosition.BOTTOM,
+ )
+
+ def initWindow(self):
+ self.resize(960, 780)
+ self.setWindowIcon(QIcon(':/icon/logo.png'))
+ self.setWindowTitle('Ghost-Downloader-3')
+
+ # create splash screen
+ self.splashScreen = SplashScreen(self.windowIcon(), self)
+ self.splashScreen.setIconSize(QSize(106, 106))
+ self.splashScreen.raise_()
+
+ desktop = QApplication.screens()[0].availableGeometry()
+ w, h = desktop.width(), desktop.height()
+ self.move(w//2 - self.width()//2, h//2 - self.height()//2)
+ self.show()
+ QApplication.processEvents()
+
+ def showInfoMessageBox(self):
+ w = MessageBox(
+ '关于 Ghost-Downloader-3',
+ '当前版本 2.9.9-alpha\n屎山作者 晓游ChR\n版本亮点 下载功能前所未有的稳定(估计)\n目前存在的问题 界面细节&进度在任务restart后显示不准确',
+ self
+ )
+ w.yesButton.setText('了解作者')
+ w.cancelButton.setText('关闭窗口')
+
+ if w.exec():
+ QDesktopServices.openUrl(QUrl("https://space.bilibili.com/437313511"))
\ No newline at end of file
diff --git a/app/view/task_interface.py b/app/view/task_interface.py
new file mode 100644
index 00000000..022f0c08
--- /dev/null
+++ b/app/view/task_interface.py
@@ -0,0 +1,78 @@
+import sys
+import re
+from PySide6.QtWidgets import QVBoxLayout, QWidget, QHBoxLayout, QFrame
+from PySide6.QtGui import QPixmap, QImage
+from PySide6.QtCore import QByteArray, Qt, QObject, Signal
+from qfluentwidgets import SmoothScrollArea, ExpandLayout
+from ..common.download_engine import DownloadTask
+from ..common.signal_bus import signalBus
+from ..components.system_info_card import SystemInfoCard
+import json
+import base64
+
+from ..components.task_card import TaskCard
+
+
+# 定义一个自定义的类,继承自QObject,用于将sys.stdout重定向到该类
+class Supervise(QObject):
+ # 定义一个新的信号newText,用于将输出的内容发送给主线程
+ newText = Signal(str)
+
+ # 重写write()方法,将输出的内容通过newText信号发送出去
+ def write(self, text):
+ self.newText.emit(str(text))
+
+
+class TaskInterface(SmoothScrollArea):
+ def __init__(self, parent=None):
+ super().__init__(parent=parent)
+
+ self.setObjectName("TaskInterface")
+ self.cards = []
+ self.setupUi()
+
+ self.setWidget(self.scrollWidget)
+ self.setWidgetResizable(True)
+
+ # 连接信号到槽
+ signalBus.addTaskSignal.connect(self.addDownloadTask)
+
+ # Apply QSS
+ self.setStyleSheet("""QScrollArea, .QWidget {
+ border: none;
+ background-color: transparent;
+ }""")
+
+ # 重定向打印
+ # sys.stdout = Supervise()
+ # sys.stdout.newText.connect(self.processText)
+ #
+ # # 处理文本
+ # def processText(self,text:str):
+ # _ = text.split("|")
+ # if len(_) == 2: # finished
+ # # 使用 re.findall 函数来匹配字符串中的 [] 里面的内容,并返回一个列表
+ # taskNum = int(re.findall("\[(.*?)\]", _[0])[0])
+ # self.cards[taskNum].changeInfo(100,"","","已完成!")
+ # elif len(_) == 4:
+ # t = re.findall("\[(.*?)\]", _[0])
+ # taskNum = int(t[0])
+ # value = int(t[1])*100
+ # process = t[2]
+ # speed = t[3] + "/s"
+ # self.cards[taskNum].changeInfo(value,process,"",speed)
+
+
+ def setupUi(self):
+ self.setMinimumWidth(816)
+ self.setFrameShape(QFrame.NoFrame)
+ self.scrollWidget = QWidget()
+ self.scrollWidget.setMinimumWidth(816)
+ self.expandLayout = ExpandLayout(self.scrollWidget)
+ self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
+
+ def addDownloadTask(self, url: str, path: str, block_num: int, name: str, pixmap: QPixmap):
+ number = len(self.cards)
+ _ = TaskCard(url, path, block_num, number, name, pixmap, self.scrollWidget)
+ self.cards.append(_)
+ self.expandLayout.addWidget(_)
diff --git a/logo.png b/logo.png
new file mode 100644
index 00000000..fa02a503
Binary files /dev/null and b/logo.png differ
diff --git a/main.py b/main.py
new file mode 100644
index 00000000..64cd15b7
--- /dev/null
+++ b/main.py
@@ -0,0 +1,49 @@
+# coding:utf-8
+import os
+import sys
+import ctypes
+import Res_rc
+
+from PySide6.QtGui import QColor
+from qfluentwidgets import setTheme, Theme, setThemeColor
+
+from PySide6.QtCore import Qt
+from PySide6.QtWidgets import QApplication
+
+from app.view.main_window import MainWindow
+
+# create application
+app = QApplication(sys.argv)
+app.setAttribute(Qt.AA_DontCreateNativeWidgetSiblings)
+
+# Enable Theme
+setTheme(Theme.AUTO)
+
+# Get Theme Color
+try:
+ # 定义用于获取主题色的函数
+ ctypes.windll.dwmapi.DwmGetColorizationColor.restype = ctypes.c_ulong
+ ctypes.windll.dwmapi.DwmGetColorizationColor.argtypes = [ctypes.POINTER(ctypes.c_ulong),
+ ctypes.POINTER(ctypes.c_bool)]
+
+ color = ctypes.c_ulong()
+ opaque = ctypes.c_bool()
+
+ # 获取主题颜色值
+ ctypes.windll.dwmapi.DwmGetColorizationColor(ctypes.byref(color), ctypes.byref(opaque))
+
+ # 将颜色值转换为RGB元组
+ b, g, r = color.value % 256, (color.value >> 8) % 256, (color.value >> 16) % 256
+
+ setThemeColor(QColor(r, g, b))
+
+except Exception as e:
+ print("获取主题色失败:", e)
+
+# create main window
+w = MainWindow()
+w.show()
+
+app.exec()
+
+sys.exit()
diff --git a/pause.svg b/pause.svg
new file mode 100644
index 00000000..d1b47500
--- /dev/null
+++ b/pause.svg
@@ -0,0 +1,3 @@
+<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M11.75 6C9.67893 6 8 7.67893 8 9.75V38.25C8 40.3211 9.67893 42 11.75 42H18.25C20.3211 42 22 40.3211 22 38.25V9.75C22 7.67893 20.3211 6 18.25 6H11.75ZM10.5 9.75C10.5 9.05964 11.0596 8.5 11.75 8.5H18.25C18.9404 8.5 19.5 9.05964 19.5 9.75V38.25C19.5 38.9404 18.9404 39.5 18.25 39.5H11.75C11.0596 39.5 10.5 38.9404 10.5 38.25V9.75ZM29.75 6C27.6789 6 26 7.67893 26 9.75V38.25C26 40.3211 27.6789 42 29.75 42H36.25C38.3211 42 40 40.3211 40 38.25V9.75C40 7.67893 38.3211 6 36.25 6H29.75ZM28.5 9.75C28.5 9.05964 29.0596 8.5 29.75 8.5H36.25C36.9404 8.5 37.5 9.05964 37.5 9.75V38.25C37.5 38.9404 36.9404 39.5 36.25 39.5H29.75C29.0596 39.5 28.5 38.9404 28.5 38.25V9.75Z" fill="#212121"/>
+</svg>
diff --git a/play.svg b/play.svg
new file mode 100644
index 00000000..90c2a016
--- /dev/null
+++ b/play.svg
@@ -0,0 +1,3 @@
+<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M16.7501 8.41185L41.1672 21.1167C42.7595 21.9452 43.3786 23.9076 42.5501 25.4999C42.2421 26.0919 41.7592 26.5747 41.1672 26.8828L16.7501 39.5876C15.1579 40.4161 13.1954 39.797 12.3669 38.2047C12.1259 37.7414 12 37.2268 12 36.7045V11.2949C12 9.5 13.4551 8.04492 15.25 8.04492C15.6977 8.04492 16.1397 8.13739 16.5486 8.31562L16.7501 8.41185ZM15.5962 10.6296L15.4857 10.5829C15.4099 10.5578 15.3303 10.5449 15.25 10.5449C14.8358 10.5449 14.5 10.8807 14.5 11.2949V36.7045C14.5 36.8251 14.529 36.9438 14.5847 37.0507C14.7759 37.4182 15.2287 37.5611 15.5962 37.3699L40.0132 24.6651C40.1499 24.594 40.2613 24.4825 40.3324 24.3459C40.5236 23.9785 40.3807 23.5256 40.0132 23.3344L15.5962 10.6296Z" fill="#212121"/>
+</svg>