Skip to content

Commit

Permalink
release v0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rachpt committed Jun 21, 2020
1 parent 959a28f commit 35c6bfe
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 60 deletions.
File renamed without changes.
45 changes: 45 additions & 0 deletions build_exe.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# -*- mode: python ; coding: utf-8 -*-

# 本文件用于打包 Windows 程序
# pyinstaller --clean build_exe.spec

block_cipher = None


a = Analysis(['main.py'],
pathex=['.'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=['./lanzou/gui/login_assister.py', ],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)

a.binaries = [x for x in a.binaries if 'login_assister' not in x[0]]

pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name='lanzou-gui',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
version='./version_info.txt',
icon='./app_icon.ico')
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='lanzou-gui')
2 changes: 1 addition & 1 deletion lanzou/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from lanzou.api.core import LanZouCloud

version = '2.5.0'
version = '2.5.1'

__all__ = ['utils', 'types', 'models', 'LanZouCloud', 'version']
3 changes: 2 additions & 1 deletion lanzou/gui/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
version = '0.3.0'
version = '0.3.1'
USE_WEB_ENG = True
9 changes: 4 additions & 5 deletions lanzou/gui/dialogs/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@

from lanzou.gui.others import QDoublePushButton, MyLineEdit
from lanzou.gui.qss import dialog_qss_style, btn_style
from lanzou.gui import USE_WEB_ENG

HAVE_WEB_ENG = True # 是否使用 PyQtWebEngine 辅助登录


if HAVE_WEB_ENG:
if USE_WEB_ENG: # 是否使用 PyQtWebEngine 辅助登录
from lanzou.gui.login_assister import LoginWindow


Expand All @@ -34,6 +32,7 @@ def __init__(self, config):
self.initUI()
self.setStyleSheet(dialog_qss_style)
self.setMinimumWidth(380)
self.name_ed.setFocus()
# 信号
self.name_ed.textChanged.connect(self.set_user)
self.pwd_ed.textChanged.connect(self.set_pwd)
Expand Down Expand Up @@ -281,7 +280,7 @@ def change_ok_btn(self):
self._config.set_infos(up_info)
self.clicked_ok.emit()
self.close()
elif HAVE_WEB_ENG:
elif USE_WEB_ENG:
self.web = LoginWindow(self._user, self._pwd)
self.web.cookie.connect(self.get_cookie_by_web)
self.web.setWindowModality(Qt.ApplicationModal)
Expand Down
11 changes: 5 additions & 6 deletions lanzou/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,8 @@ def show_full_path(self):
tip = f"fid:{item.id} | 描述:{item.desc}" if item.desc else f"fid:{item.id}"
self._locs[index].setToolTip(tip)
self._locs[index].setIcon(QIcon("./src/folder.gif"))
self._locs[index].setStyleSheet("QPushButton {border:none; background:transparent;}")
self._locs[index].setStyleSheet("QPushButton {border:none; background:transparent;\
color: rgb(139,0,139); font-weight:bold;}")
self.disk_loc_hbox.insertWidget(index, self._locs[index])
self._locs[index].clicked.connect(self.call_change_dir(item.id))
index += 1
Expand Down Expand Up @@ -924,14 +925,16 @@ def init_extract_share_ui(self):
self.model_share = QStandardItemModel(1, 3)
self.config_tableview("share")

self.get_shared_info_thread.update.connect(lambda: self.model_share.removeRows(0, self.model_share.rowCount())) # 清理旧的信息
# 清理旧的信息
self.get_shared_info_thread.update.connect(lambda: self.model_share.removeRows(0, self.model_share.rowCount()))
self.get_shared_info_thread.msg.connect(self.show_status) # 提示信息
self.get_shared_info_thread.infos.connect(self.show_share_url_file_lists) # 内容信息
self.get_shared_info_thread.finished.connect(lambda: self.btn_extract.setEnabled(True))
self.get_shared_info_thread.finished.connect(lambda: self.line_share_url.setEnabled(True))
# 控件设置
self.line_share_url.setPlaceholderText("蓝奏云链接,如有提取码,放后面,空格或汉字等分割,回车键提取")
self.line_share_url.returnPressed.connect(self.call_get_shared_info)
self.line_share_url.setFocus() # 光标焦点
self.btn_extract.clicked.connect(self.call_get_shared_info)
self.btn_share_dl.clicked.connect(lambda: self.call_multi_manipulator("download"))
self.btn_share_dl.setIcon(QIcon("./src/downloader.ico"))
Expand All @@ -943,10 +946,6 @@ def init_extract_share_ui(self):
self.share_set_dl_path.setText(self._config.path)
self.share_set_dl_path.clicked.connect(self.set_download_path)

# QSS
self.label_share_url.setStyleSheet("#label_share_url {color: rgb(255,255,60);}")
self.label_dl_path.setStyleSheet("#label_dl_path {color: rgb(255,255,60);}")

# jobs tab
def call_jobs_clean_all(self):
try:
Expand Down
17 changes: 16 additions & 1 deletion lanzou/gui/qss.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
QTabWidget::pane {
border: 1px;
/* background:transparent; # 完全透明 */
background-color: rgba(255, 255, 255, 100);
background-color: rgba(255, 255, 255, 90);
}
QTabWidget::tab-bar {
background:transparent;
Expand Down Expand Up @@ -106,6 +106,21 @@
color: white;
background:transparent;
}
/*提取界面文字颜色*/
#label_share_url {
color: rgb(255,255,60);
}
#label_dl_path {
color: rgb(255,255,60);
}
/*网盘界面文字颜色*/
#label_disk_loc {
color: rgb(0,0,0);
font-weight:bold;
}
#disk_tab {
background-color: rgba(255, 255, 255, 120);
}
'''

btn_style = """
Expand Down
2 changes: 1 addition & 1 deletion lanzou/gui/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def setupUi(self, MainWindow):
self.disk_hlayout_top = QtWidgets.QHBoxLayout()
self.disk_hlayout_top.setObjectName("disk_hlayout_top")
self.disk_loc_hbox = QtWidgets.QHBoxLayout()
self.disk_loc_hbox.setObjectName("disk_loc")
self.disk_loc_hbox.setObjectName("disk_loc_hbox")
self.label_disk_loc = QtWidgets.QLabel(self.disk_tab)
self.label_disk_loc.setObjectName("label_disk_loc")
self.disk_loc_hbox.addWidget(self.label_disk_loc)
Expand Down
4 changes: 2 additions & 2 deletions lanzou/gui/workers/down.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def _down_failed(self, code, file):
"""显示下载失败的回调函数"""
self.folder_file_failed.emit(code, file)

# def __del__(self):
# self.wait()
def __del__(self):
self.wait()

def set_values(self, name, url, pwd, save_path):
self.name = name
Expand Down
43 changes: 0 additions & 43 deletions pyinstaller_version_info.txt

This file was deleted.

29 changes: 29 additions & 0 deletions version_info.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# version infos

VSVersionInfo(
ffi=FixedFileInfo(
filevers=(0, 3, 1, 0),
prodvers=(0, 3, 1, 0),
mask=0x3f,
flags=0x0,
OS=0x4,
fileType=0x1,
subtype=0x0,
date=(0, 0)
),
kids=[
StringFileInfo([
StringTable(
u'040904B0',
[StringStruct(u'CompanyName', u'rachpt.cn'),
StringStruct(u'FileDescription', u'蓝奏云客户端'),
StringStruct(u'FileVersion', u'0.3.1'),
StringStruct(u'InternalName', u'lanzou-gui'),
StringStruct(u'LegalCopyright', u'Copyright (c) rachpt'),
StringStruct(u'OriginalFilename', u'lanzou-gui_win64_v0.3.1.exe'),
StringStruct(u'ProductName', u'lanzou-gui_win64'),
StringStruct(u'ProductVersion', u'0.3.1 (r200621)')])
]),
VarFileInfo([VarStruct(u'Translation', [2052, 1033])])
]
)

0 comments on commit 35c6bfe

Please sign in to comment.