Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Randark-JMT committed Feb 15, 2022
1 parent ba19d99 commit cff54c5
Show file tree
Hide file tree
Showing 8 changed files with 1,436 additions and 13 deletions.
8 changes: 7 additions & 1 deletion MainGUI.ui
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<property name="windowTitle">
<string>Bilibili漫画下载器 V1.4.0</string>
</property>
<property name="windowIcon">
<iconset resource="main.qrc">
<normaloff>:/main.ico</normaloff>:/main.ico</iconset>
</property>
<property name="iconSize">
<size>
<width>25</width>
Expand Down Expand Up @@ -237,6 +241,8 @@
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<resources>
<include location="main.qrc"/>
</resources>
<connections/>
</ui>
13 changes: 4 additions & 9 deletions download.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,7 @@ def download_manga_each(comic_id: int, section: int, text_output):
os.makedirs(root_path)
manga_list = data['ep_list']
manga_list.reverse()
for ep in manga_list:
# 检查付费章节是否购买
if not ep['is_locked']:
# section_temp = int(ep['short_title'])
if ep['short_title'] == str(section):
# main_gui_log_insert('正在下载第' + ep['short_title'].rjust(3, '0') + '话:' + ep['title'] + '\n', text_output)
download_manga_episode(ep['id'], root_path, text_output)
else:
print(ep['short_title'])

if not manga_list[section -1]['is_locked']: # 检查付费章节是否购买
# main_gui_log_insert('正在下载第' + ep['short_title'].rjust(3, '0') + '话:' + ep['title'] + '\n', text_output)
download_manga_episode(manga_list[section -1]['id'], root_path, text_output)
4 changes: 1 addition & 3 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import sys
import time
from PySide6.QtGui import QIcon
from PySide6.QtWidgets import *
from PySide6.QtCore import Slot, QThread, Signal, QObject, SignalInstance
from ui_MainGUI import Ui_MainWindow
Expand Down Expand Up @@ -63,7 +62,7 @@ def download_manga(self): # 下载
if self.textEdit_2.toPlainText() == "" or not self.textEdit_2.toPlainText().isnumeric():
self.textBrowser.append("漫画ID输入错误,请检查输入")
return None
if self.textEdit_3.toPlainText() == "" or not self.textEdit_3.toPlainText().isnumeric():
if self.textEdit_3.toPlainText() == "":
self.textBrowser.append("下载范围输入错误,请检查输入")
return None
from settings import comic_dic
Expand Down Expand Up @@ -125,7 +124,6 @@ def __init__(self, parent=None):

if __name__ == "__main__":
app = QApplication()
app.setWindowIcon(QIcon("main.ico"))
window = MainWindow()
window.show()
sys.exit(app.exec())
5 changes: 5 additions & 0 deletions main.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/">
<file>main.ico</file>
</qresource>
</RCC>
40 changes: 40 additions & 0 deletions main.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# -*- mode: python ; coding: utf-8 -*-


block_cipher = None


a = Analysis(['main.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)

exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='main',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None , icon='D:\\_Code\\Bilibili_manga_download\\main.ico')
Loading

0 comments on commit cff54c5

Please sign in to comment.