Skip to content

Commit

Permalink
🐛 修复第一次启动时无法下载的问题,默认下载线程设置为1
Browse files Browse the repository at this point in the history
  • Loading branch information
shadlc committed Nov 18, 2024
1 parent 255bc02 commit 8a1ecd0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/BiliPlus.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def __init__(self, comic_id: int, mainGUI: MainGUI, save_path: str = "") -> None
"1400avif": "avif-1400w",
"1100avif": "avif-1700w",
}
img_format = self.mainGUI.getConfig("img_format")
self.headers["cookie"] += f"manga_pic_format_http={img_format_list.get("img_format", "jpg-full")};"
img_format = self.mainGUI.getConfig("img_format", "default")
self.headers["cookie"] += f"manga_pic_format_http={img_format};"

############################################################
def getComicInfo(self) -> dict:
Expand Down
2 changes: 1 addition & 1 deletion src/Episode.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def _() -> list[dict]:
"1400avif": "@1400w.avif",
"1100avif": "@1100w.avif",
}
img_format = self.mainGUI.getConfig("img_format")
img_format = self.mainGUI.getConfig("img_format", "default")
imgs_urls = [img_url + img_format_list[img_format] for img_url in imgs_urls]

# ?###########################################################
Expand Down
2 changes: 1 addition & 1 deletion src/ui/PySide_src/mainWindow_mac.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ li.checked::marker { content: "\2612"; }
<number>2</number>
</property>
<property name="value">
<number>16</number>
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/PySide_src/mainWindow_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ def setupUi(self, MainWindow):
self.h_Slider_num_thread.setMaximum(32)
self.h_Slider_num_thread.setSingleStep(2)
self.h_Slider_num_thread.setPageStep(2)
self.h_Slider_num_thread.setValue(16)
self.h_Slider_num_thread.setValue(1)
self.h_Slider_num_thread.setOrientation(Qt.Orientation.Horizontal)

self.h_Layout_num_thread.addWidget(self.h_Slider_num_thread)
Expand Down
6 changes: 3 additions & 3 deletions src/ui/SettingUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,8 @@ def init_img_format_setting(self) -> None:
}
reversed_img_format_list = {value: key for key, value in img_format_list.items()}

img_format = self.mainGUI.getConfig("img_format")
self.mainGUI.comboBox_img_format.setCurrentText(img_format_list.get(img_format,'default'))
img_format = self.mainGUI.getConfig("img_format","default")
self.mainGUI.comboBox_img_format.setCurrentText(img_format_list.get(img_format))

def _(img_format: str) -> None:
self.mainGUI.updateConfig("img_format", reversed_img_format_list[img_format])
Expand Down Expand Up @@ -668,7 +668,7 @@ def init_recursive_read_setting(self) -> None:
if flag is not None:
self.mainGUI.checkBox_recursive_read.setChecked(flag)
else:
self.mainGUI.updateConfig("recursive_read", True)
self.mainGUI.updateConfig("recursive_read", False)

def _(checked: bool) -> None:
if checked:
Expand Down

0 comments on commit 8a1ecd0

Please sign in to comment.