[PR #3312] [MERGED] Close comics during scan #3931

Closed
opened 2026-04-25 00:17:36 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3312
Author: @nichwall
Created: 8/20/2024
Status: Merged
Merged: 8/22/2024
Merged by: @advplyr

Base: masterHead: close_comics_during_scan


📝 Commits (2)

  • 4de65b4 Autoformat parseComicMetadata
  • 9c87c3a Free memory after extracting comic

📊 Changes

1 file changed (+18 additions, -12 deletions)

View changed files

📝 server/utils/parsers/parseComicMetadata.js (+18 -12)

📄 Description

This PR partially addresses some of the CBR/CBZ issues.

As mentioned in https://github.com/advplyr/audiobookshelf/issues/2750, the memory does not get freed until after the comics have completed parsing. This PR adds the archive.close() call at the end of the extraction functions.

I tested this by:

  • Grabbing a number of random images from my personal photos
  • Created a 1.8 GB CBZ and CBR comic file (no cover image, just ran the directory of images through the zip and rar bash utilities)
  • Ran a scan without these changes (server crashed during scan of second book)
  • Ran a scan including these changes (server completed scan of both books)

I don't have any "real" comics, so additional testing should be done on edge before this is part of a full release. My homemade comics did not actually load in the ereader, but were parsed during the scan.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/3312 **Author:** [@nichwall](https://github.com/nichwall) **Created:** 8/20/2024 **Status:** ✅ Merged **Merged:** 8/22/2024 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `close_comics_during_scan` --- ### 📝 Commits (2) - [`4de65b4`](https://github.com/advplyr/audiobookshelf/commit/4de65b43692ea3fdd0526d572a17583e3be96755) Autoformat `parseComicMetadata` - [`9c87c3a`](https://github.com/advplyr/audiobookshelf/commit/9c87c3a095d6c9de30f3b9c1a2daa4bc3e2789b8) Free memory after extracting comic ### 📊 Changes **1 file changed** (+18 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/parsers/parseComicMetadata.js` (+18 -12) </details> ### 📄 Description This PR partially addresses some of the CBR/CBZ issues. As mentioned in https://github.com/advplyr/audiobookshelf/issues/2750, the memory does not get freed until after the comics have completed parsing. This PR adds the `archive.close()` call at the end of the extraction functions. I tested this by: - Grabbing a number of random images from my personal photos - Created a 1.8 GB CBZ and CBR comic file (no cover image, just ran the directory of images through the `zip` and `rar` bash utilities) - Ran a scan without these changes (server crashed during scan of second book) - Ran a scan including these changes (server completed scan of both books) I don't have any "real" comics, so additional testing should be done on `edge` before this is part of a full release. My homemade comics did not actually load in the ereader, but were parsed during the scan. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:17:36 +02:00
adam closed this issue 2026-04-25 00:17:36 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3931