English Description
Describe the bug
When adding a single download task with a title containing invalid Windows filename characters (e.g., full-width slashes /), the application fails to sanitize the title.
Unlike Batch analysis (which properly filters/blocks invalid names), adding a task individually bypasses this validation.
The moment the invalid task is added, the program writes it to pool.json and immediately attempts to create the task's individual .json file in the pool directory. This triggers an OSError: [WinError 123] in the background. As a result, the UI immediately enters a "zombie" state—the task appears in the list, but the user cannot start the download or delete the task via the UI. Restarting the GUI does not fix it, as the invalid entry is already saved in pool.json and view.json, perpetuating the freeze. The only workaround is to manually search and delete the invalid entries from the JSON files.
To Reproduce
- Add a single comic link (not via batch) that contains problematic characters in its title.
- The program throws
WinError 123 in the background when trying to create the file in the pool directory.
- The task appears in the GUI, but all operations (Download, Delete, etc.) become completely unresponsive.
- Restarting the application yields the same frozen state.
Expected behavior
The single task addition logic should use the same filename sanitization as the batch analysis logic to prevent invalid characters from causing background exceptions and breaking the UI event loop.
中文描述
問題描述
當使用「單筆加入」新增包含 Windows 非法字元(例如全形 /)的任務時,程式沒有正確過濾檔名。
這個過濾機制在**「批次分析 (Batch)」時會正常運作,但在「單筆加入」**時卻遺漏了驗證。
在單筆加入任務的瞬間,程式將未過濾的資料寫入 pool.json,並立刻嘗試在 pool 資料夾建立該任務的個別 .json 檔。這會馬上在背景觸發 [WinError 123] 錯誤,導致 UI 的內部邏輯斷線。任務雖然會顯示在介面上,但處於「殭屍狀態」——使用者無法點擊下載,也無法從介面上刪除該筆連結。即使重啟程式,因為 pool.json 與 view.json 已經寫入錯誤資料,介面依然會保持無法操作的狀態。只能被迫手動開啟 JSON 檔去搜尋並刪除錯誤資料才能恢復。
重現步驟
- 透過單筆加入貼上一個標題帶有非法字元的漫畫連結。
- 程式在背景嘗試建立
pool 內的檔案時觸發 WinError 123。
- 任務出現在清單中,但介面上的「下載」、「刪除」等操作立即失效。
- 關閉並重新啟動 GUI,介面依然處於無法操作該任務的狀態。
預期行為
單筆加入任務的邏輯應該要和批次分析一樣,具備相同的檔名過濾機制,避免非法字元引發系統錯誤並導致 UI 凍結。
Error Logs / 錯誤日誌
OSError: [WinError 123] 檔案名稱、目錄名稱或磁碟區標籤語法錯誤。: 'C:\\Users\\seaso\\comiccrawler\\pool\\[Amakawa is reflecting.] ... (3836837/eecd1cd76f) [c0de65].json'
Traceback (most recent call last):
# ... (omitted for brevity)
English Description
Describe the bug
When adding a single download task with a title containing invalid Windows filename characters (e.g., full-width slashes
/), the application fails to sanitize the title.Unlike Batch analysis (which properly filters/blocks invalid names), adding a task individually bypasses this validation.
The moment the invalid task is added, the program writes it to
pool.jsonand immediately attempts to create the task's individual.jsonfile in thepooldirectory. This triggers anOSError: [WinError 123]in the background. As a result, the UI immediately enters a "zombie" state—the task appears in the list, but the user cannot start the download or delete the task via the UI. Restarting the GUI does not fix it, as the invalid entry is already saved inpool.jsonandview.json, perpetuating the freeze. The only workaround is to manually search and delete the invalid entries from the JSON files.To Reproduce
WinError 123in the background when trying to create the file in thepooldirectory.Expected behavior
The single task addition logic should use the same filename sanitization as the batch analysis logic to prevent invalid characters from causing background exceptions and breaking the UI event loop.
中文描述
問題描述
當使用「單筆加入」新增包含 Windows 非法字元(例如全形
/)的任務時,程式沒有正確過濾檔名。這個過濾機制在**「批次分析 (Batch)」時會正常運作,但在「單筆加入」**時卻遺漏了驗證。
在單筆加入任務的瞬間,程式將未過濾的資料寫入
pool.json,並立刻嘗試在pool資料夾建立該任務的個別.json檔。這會馬上在背景觸發[WinError 123]錯誤,導致 UI 的內部邏輯斷線。任務雖然會顯示在介面上,但處於「殭屍狀態」——使用者無法點擊下載,也無法從介面上刪除該筆連結。即使重啟程式,因為pool.json與view.json已經寫入錯誤資料,介面依然會保持無法操作的狀態。只能被迫手動開啟 JSON 檔去搜尋並刪除錯誤資料才能恢復。重現步驟
pool內的檔案時觸發WinError 123。預期行為
單筆加入任務的邏輯應該要和批次分析一樣,具備相同的檔名過濾機制,避免非法字元引發系統錯誤並導致 UI 凍結。
Error Logs / 錯誤日誌