Is your feature request related to a problem? Please describe. Yes. Currently, in internal/media/processor.go, the application iterates through the entire movie/series list in a single continuous loop. For large libraries (e.g., 4,000+ items), this can flood the Radarr/Sonarr API with thousands of requests per second.
This causes:
- Radarr/Sonarr Instability: The SQLite database locks up under the read pressure.
- Container Crashes: The
client.go HTTP requests consume file descriptors or memory until the container is killed.
Describe the solution you'd like I suggest modifying the main processing loop in internal/media/processor.go to process items in batches (e.g., 100 items at a time), with a configurable delay between batches.
Key Changes:
- Batch Size: Default to 100.
- Batch Delay: Default to 10 seconds (allows Radarr to "cool down" and write to DB).
- Environment Variables: Add
BATCH_SIZE and BATCH_DELAY_SECONDS to cmd/labelarr/main.go.
Is your feature request related to a problem? Please describe. Yes. Currently, in
internal/media/processor.go, the application iterates through the entire movie/series list in a single continuous loop. For large libraries (e.g., 4,000+ items), this can flood the Radarr/Sonarr API with thousands of requests per second.This causes:
client.goHTTP requests consume file descriptors or memory until the container is killed.Describe the solution you'd like I suggest modifying the main processing loop in
internal/media/processor.goto process items in batches (e.g., 100 items at a time), with a configurable delay between batches.Key Changes:
BATCH_SIZEandBATCH_DELAY_SECONDStocmd/labelarr/main.go.