Commit 39636de
fix: Manga import chapter population, cover caching, and series bulk actions (#115)
* fix: Manga import chapter population, cover caching, and series bulk actions
Manga imported via MangaDex or MAL all showed placeholder cover images
and 0/0 issues because: (1) cover art was never downloaded to local
cache during import, and (2) MangaDex chapter API filtered by English
only — most popular manga had English translations DMCA'd, returning 0
chapters. The `if chapters:` guard then silently skipped Total/Have.
Changes:
- Add get_total_chapter_count() to mangadex.py that calls the aggregate
endpoint WITHOUT translatedLanguage[] filter for accurate totals
- Extract shared _populate_manga_chapters() helper eliminating ~70 lines
of duplicated code between addMangaToDB() and addMangaToDB_MAL()
- Multi-source chapter population: language-filtered → unfiltered
aggregate → MAL num_chapters → explicit 0 (never NULL)
- Cache cover images locally via helpers.getImage() in both import paths
- Fix myanimelist.py truthiness bug where num_chapters=0 became None
- Add bulk selection (checkboxes) to SeriesTable with action bar
- Add POST /series/bulk-delete, bulk-pause, bulk-resume endpoints
- Add useBulkDeleteSeries, useBulkPauseSeries, useBulkResumeSeries hooks
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: Address code review findings — row selection, input validation, raw SQL
- Use getRowId to key row selection by ComicID instead of positional
index, preventing wrong-series bulk operations after sort/filter
- Reset confirmDelete state when selection changes to prevent stale
confirmation targeting unintended series
- Add _validate_bulk_ids() shared helper with: max 100 IDs cap, string
type validation, dict body type guard
- Replace raw text() SQL with SQLAlchemy table object query
- Remove dead ternary in bulk action bar count display
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 3f8ac30 commit 39636de
6 files changed
Lines changed: 513 additions & 160 deletions
File tree
- comicarr
- app/series
- frontend/src
- components/series
- hooks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 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 | + | |
98 | 172 | | |
99 | 173 | | |
100 | 174 | | |
| |||
0 commit comments