if self.downloads_complete and self.filtered_book_queue.empty():
messagebox.showinfo("Download Complete", "All selected books have been downloaded.")
self.root.destroy() # 销毁窗口和所有小部件,并结束mainloop
self.output_box.yview_moveto(1)
self.root.after(100, self.process_download_queue)
新代码:
[Python] 纯文本查看复制代码
if self.downloads_complete and self.filtered_book_queue.empty():
messagebox.showinfo("Download Complete", "All selected books have been downloaded.")
return
# self.root.destroy() # 销毁窗口和所有小部件,并结束mainloop
self.output_box.yview_moveto(1)
self.root.after(100, self.process_download_queue)