-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnet.py
267 lines (260 loc) · 14.3 KB
/
net.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'net.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(852, 681)
MainWindow.setStatusTip("")
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.centralwidget)
self.verticalLayout_5.setObjectName("verticalLayout_5")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.AvatarLB = QtWidgets.QLabel(self.centralwidget)
self.AvatarLB.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.AvatarLB.setStyleSheet("")
self.AvatarLB.setText("")
self.AvatarLB.setScaledContents(False)
self.AvatarLB.setObjectName("AvatarLB")
self.horizontalLayout_3.addWidget(self.AvatarLB)
self.userLB = QtWidgets.QLabel(self.centralwidget)
font = QtGui.QFont()
font.setFamily("微软雅黑 Light")
font.setPointSize(14)
font.setUnderline(False)
self.userLB.setFont(font)
self.userLB.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.userLB.setObjectName("userLB")
self.horizontalLayout_3.addWidget(self.userLB)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem)
self.verticalLayout_5.addLayout(self.horizontalLayout_3)
self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
self.tabWidget.setObjectName("tabWidget")
self.tab = QtWidgets.QWidget()
self.tab.setObjectName("tab")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.tab)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.idEdit = QtWidgets.QLineEdit(self.tab)
self.idEdit.setText("")
self.idEdit.setEchoMode(QtWidgets.QLineEdit.Normal)
self.idEdit.setObjectName("idEdit")
self.horizontalLayout.addWidget(self.idEdit)
self.brBox = QtWidgets.QComboBox(self.tab)
self.brBox.setObjectName("brBox")
self.horizontalLayout.addWidget(self.brBox)
self.queryBtn = QtWidgets.QPushButton(self.tab)
self.queryBtn.setObjectName("queryBtn")
self.horizontalLayout.addWidget(self.queryBtn)
self.verticalLayout_2.addLayout(self.horizontalLayout)
self.tableWidget = QtWidgets.QTableWidget(self.tab)
self.tableWidget.setColumnCount(0)
self.tableWidget.setObjectName("tableWidget")
self.tableWidget.setRowCount(0)
self.tableWidget.horizontalHeader().setCascadingSectionResizes(False)
self.tableWidget.verticalHeader().setCascadingSectionResizes(False)
self.verticalLayout_2.addWidget(self.tableWidget)
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.songCheck = QtWidgets.QCheckBox(self.tab)
self.songCheck.setChecked(True)
self.songCheck.setObjectName("songCheck")
self.horizontalLayout_4.addWidget(self.songCheck)
self.picCheck = QtWidgets.QCheckBox(self.tab)
self.picCheck.setChecked(True)
self.picCheck.setObjectName("picCheck")
self.horizontalLayout_4.addWidget(self.picCheck)
self.lrcCheck = QtWidgets.QCheckBox(self.tab)
self.lrcCheck.setChecked(True)
self.lrcCheck.setObjectName("lrcCheck")
self.horizontalLayout_4.addWidget(self.lrcCheck)
self.proBtn = QtWidgets.QPushButton(self.tab)
self.proBtn.setObjectName("proBtn")
self.horizontalLayout_4.addWidget(self.proBtn)
self.testBtn = QtWidgets.QPushButton(self.tab)
self.testBtn.setObjectName("testBtn")
self.horizontalLayout_4.addWidget(self.testBtn)
self.verticalLayout_2.addLayout(self.horizontalLayout_4)
self.groupBox = QtWidgets.QGroupBox(self.tab)
self.groupBox.setObjectName("groupBox")
self.verticalLayout = QtWidgets.QVBoxLayout(self.groupBox)
self.verticalLayout.setObjectName("verticalLayout")
self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
self.skipCheck = QtWidgets.QCheckBox(self.groupBox)
self.skipCheck.setChecked(True)
self.skipCheck.setObjectName("skipCheck")
self.horizontalLayout_6.addWidget(self.skipCheck)
self.tagCheck = QtWidgets.QCheckBox(self.groupBox)
self.tagCheck.setObjectName("tagCheck")
self.horizontalLayout_6.addWidget(self.tagCheck)
self.verticalLayout.addLayout(self.horizontalLayout_6)
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
self.radioButton = QtWidgets.QRadioButton(self.groupBox)
self.radioButton.setChecked(True)
self.radioButton.setObjectName("radioButton")
self.horizontalLayout_5.addWidget(self.radioButton)
self.radioButton_2 = QtWidgets.QRadioButton(self.groupBox)
self.radioButton_2.setObjectName("radioButton_2")
self.horizontalLayout_5.addWidget(self.radioButton_2)
self.radioButton_3 = QtWidgets.QRadioButton(self.groupBox)
self.radioButton_3.setObjectName("radioButton_3")
self.horizontalLayout_5.addWidget(self.radioButton_3)
self.verticalLayout.addLayout(self.horizontalLayout_5)
self.m3u8Btn = QtWidgets.QPushButton(self.groupBox)
self.m3u8Btn.setObjectName("m3u8Btn")
self.verticalLayout.addWidget(self.m3u8Btn)
self.verticalLayout_2.addWidget(self.groupBox)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.label_3 = QtWidgets.QLabel(self.tab)
self.label_3.setObjectName("label_3")
self.horizontalLayout_2.addWidget(self.label_3)
self.progressBar = QtWidgets.QProgressBar(self.tab)
self.progressBar.setProperty("value", 0)
self.progressBar.setTextVisible(True)
self.progressBar.setObjectName("progressBar")
self.horizontalLayout_2.addWidget(self.progressBar)
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
self.tabWidget.addTab(self.tab, "")
self.tab_2 = QtWidgets.QWidget()
self.tab_2.setObjectName("tab_2")
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.tab_2)
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.taskList = QtWidgets.QListWidget(self.tab_2)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.taskList.sizePolicy().hasHeightForWidth())
self.taskList.setSizePolicy(sizePolicy)
self.taskList.setMinimumSize(QtCore.QSize(590, 0))
self.taskList.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustIgnored)
self.taskList.setResizeMode(QtWidgets.QListView.Fixed)
self.taskList.setObjectName("taskList")
self.verticalLayout_3.addWidget(self.taskList)
self.tabWidget.addTab(self.tab_2, "")
self.tab_3 = QtWidgets.QWidget()
self.tab_3.setObjectName("tab_3")
self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.tab_3)
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.doneList = QtWidgets.QListWidget(self.tab_3)
self.doneList.setObjectName("doneList")
self.verticalLayout_4.addWidget(self.doneList)
self.tabWidget.addTab(self.tab_3, "")
self.verticalLayout_5.addWidget(self.tabWidget)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 852, 23))
self.menubar.setObjectName("menubar")
self.menu = QtWidgets.QMenu(self.menubar)
self.menu.setObjectName("menu")
self.menu_2 = QtWidgets.QMenu(self.menubar)
self.menu_2.setObjectName("menu_2")
self.menu_3 = QtWidgets.QMenu(self.menubar)
self.menu_3.setObjectName("menu_3")
self.menu_4 = QtWidgets.QMenu(self.menubar)
self.menu_4.setObjectName("menu_4")
self.menu_5 = QtWidgets.QMenu(self.menubar)
self.menu_5.setObjectName("menu_5")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.exitBtn = QtWidgets.QAction(MainWindow)
self.exitBtn.setCheckable(False)
self.exitBtn.setObjectName("exitBtn")
self.aboutAction = QtWidgets.QAction(MainWindow)
self.aboutAction.setObjectName("aboutAction")
self.websiteAction = QtWidgets.QAction(MainWindow)
self.websiteAction.setObjectName("websiteAction")
self.loginAction = QtWidgets.QAction(MainWindow)
self.loginAction.setObjectName("loginAction")
self.userListAction = QtWidgets.QAction(MainWindow)
self.userListAction.setObjectName("userListAction")
self.action_8 = QtWidgets.QAction(MainWindow)
self.action_8.setObjectName("action_8")
self.action_9 = QtWidgets.QAction(MainWindow)
self.action_9.setObjectName("action_9")
self.updateAction = QtWidgets.QAction(MainWindow)
self.updateAction.setObjectName("updateAction")
self.cacheAction = QtWidgets.QAction(MainWindow)
self.cacheAction.setObjectName("cacheAction")
self.METAAction = QtWidgets.QAction(MainWindow)
self.METAAction.setObjectName("METAAction")
self.fnameAction = QtWidgets.QAction(MainWindow)
self.fnameAction.setObjectName("fnameAction")
self.aria2Action = QtWidgets.QAction(MainWindow)
self.aria2Action.setObjectName("aria2Action")
self.menu.addAction(self.loginAction)
self.menu.addAction(self.userListAction)
self.menu_2.addAction(self.exitBtn)
self.menu_2.addSeparator()
self.menu_2.addAction(self.updateAction)
self.menu_2.addAction(self.aria2Action)
self.menu_3.addAction(self.action_8)
self.menu_3.addAction(self.action_9)
self.menu_4.addAction(self.aboutAction)
self.menu_4.addSeparator()
self.menu_4.addAction(self.websiteAction)
self.menu_5.addAction(self.cacheAction)
self.menu_5.addAction(self.METAAction)
self.menu_5.addAction(self.fnameAction)
self.menubar.addAction(self.menu_2.menuAction())
self.menubar.addAction(self.menu_3.menuAction())
self.menubar.addAction(self.menu.menuAction())
self.menubar.addAction(self.menu_5.menuAction())
self.menubar.addAction(self.menu_4.menuAction())
self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(0)
self.brBox.setCurrentIndex(-1)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "ncmd - NeteaseCloudMusic Downloader"))
self.userLB.setText(_translate("MainWindow", "User"))
self.idEdit.setPlaceholderText(_translate("MainWindow", "请输入id或歌单链接"))
self.queryBtn.setText(_translate("MainWindow", "查询"))
self.tableWidget.setSortingEnabled(True)
self.songCheck.setText(_translate("MainWindow", "歌曲"))
self.picCheck.setText(_translate("MainWindow", "封面"))
self.lrcCheck.setText(_translate("MainWindow", "歌词"))
self.proBtn.setText(_translate("MainWindow", "高级"))
self.testBtn.setText(_translate("MainWindow", "下载"))
self.groupBox.setTitle(_translate("MainWindow", "高级"))
self.skipCheck.setText(_translate("MainWindow", "跳过存在文件"))
self.tagCheck.setText(_translate("MainWindow", "写入mp3tag"))
self.radioButton.setText(_translate("MainWindow", "原始歌词"))
self.radioButton_2.setText(_translate("MainWindow", "翻译歌词"))
self.radioButton_3.setText(_translate("MainWindow", "原始 + 翻译歌词"))
self.m3u8Btn.setText(_translate("MainWindow", "生成m3u8歌单"))
self.label_3.setText(_translate("MainWindow", "进度"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "歌单信息"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "任务"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "已完成"))
self.menu.setTitle(_translate("MainWindow", "用户"))
self.menu_2.setTitle(_translate("MainWindow", "文件"))
self.menu_3.setTitle(_translate("MainWindow", "编辑"))
self.menu_4.setTitle(_translate("MainWindow", "关于"))
self.menu_5.setTitle(_translate("MainWindow", "设置"))
self.exitBtn.setText(_translate("MainWindow", "退出"))
self.aboutAction.setText(_translate("MainWindow", "关于作者"))
self.websiteAction.setText(_translate("MainWindow", "访问本软件网站"))
self.loginAction.setText(_translate("MainWindow", "用户登录"))
self.userListAction.setText(_translate("MainWindow", "用户歌单"))
self.action_8.setText(_translate("MainWindow", "全选"))
self.action_9.setText(_translate("MainWindow", "反选"))
self.updateAction.setText(_translate("MainWindow", "检查更新"))
self.cacheAction.setText(_translate("MainWindow", "缓存设置"))
self.METAAction.setText(_translate("MainWindow", "META信息"))
self.fnameAction.setText(_translate("MainWindow", "文件名格式"))
self.aria2Action.setText(_translate("MainWindow", "重启aria2"))