Skip to content

feat: batch processing, keyword prefix, Plex webhooks#1

Merged
ttlequals0 merged 28 commits intomainfrom
feature/batch-webhook-prefix
Apr 10, 2026
Merged

feat: batch processing, keyword prefix, Plex webhooks#1
ttlequals0 merged 28 commits intomainfrom
feature/batch-webhook-prefix

Conversation

@ttlequals0
Copy link
Copy Markdown
Owner

Summary

  • Batch processing -- BATCH_SIZE, BATCH_DELAY, ITEM_DELAY env vars prevent API flooding on large libraries (4000+ items)
  • Keyword prefix -- KEYWORD_PREFIX env var to visually separate TMDb keywords from real genres when using UPDATE_FIELD=genre
  • Plex webhook support -- WEBHOOK_ENABLED, WEBHOOK_PORT, WEBHOOK_DEBOUNCE for real-time processing on library.new events
  • Upstream sync -- Rebased onto upstream/main (export feature, ephemeral container fix, CI improvements)
  • Code cleanup -- Removed all emoji from Go source, extracted helpers (Clients struct, forEachLibrary, batch helpers), added keyword cache with concurrency safety, graceful shutdown
  • Documentation -- README rewritten with ToC, CHANGELOG cleaned up, docker-compose.yml updated with all new env vars

Docker Image

ttlequals0/labelarr:latest pushed to Docker Hub.

Test plan

  • Docker image builds successfully (linux/amd64)
  • Docker image pushed to Docker Hub
  • No emoji remaining in Go source
  • gofmt applied to all modified files
  • Manual test with Plex instance

nullable-eth and others added 28 commits July 6, 2025 18:44
feature: Enhanced Labelarr with Radarr/Sonarr Integration and Keyword Normalization
- Integrate Docker publishing directly into release workflow
- Remove separate docker-publish.yml workflow to eliminate conflicts
- Ensure exact version matching between GitHub releases and GHCR packages
- Publish both versioned tag (e.g., v1.1.4) and latest tag simultaneously
- This resolves the issue where packages weren't published after releases
fix: consolidate release and Docker publishing workflows
…for-txt

bug: only create directories on txt export
when DATA_DIR not set
…ntainer

bug: fix ephemeral container state when DATA_DIR is not set
bug: fix the label export for skipped labels
- Pinned Alpine to 3.21 instead of latest (more stable)
- Removed apk update && apk upgrade (unnecessary and flaky under QEMU)
- Removed busybox-extras (not needed)
- Simplified the RUN command (removed debug echo statements)
Added step to set up QEMU in the release workflow.
…uild-and-avoid-errors-due-to-flaky-network

Fixing build actions with flaky errors under QEMU
- Batch processing (BATCH_SIZE, BATCH_DELAY, ITEM_DELAY) to prevent
  API flooding on large libraries
- Keyword prefix (KEYWORD_PREFIX) to separate TMDb keywords from real
  genres in Plex dropdown
- Plex webhook server (WEBHOOK_ENABLED, WEBHOOK_PORT, WEBHOOK_DEBOUNCE)
  for real-time processing on media add events
- Remove all emoji from Go source, replace with bracketed tags
- Rewrite README with table of contents and accurate feature docs
- Clean up CHANGELOG to remove AI writing patterns
- Refactor: Clients struct, keyword cache, batch helpers,
  forEachLibrary, graceful shutdown, concurrency safety
Keep feature branch versions for all three conflicted files
(CHANGELOG.md, README.md, processor.go). The origin/main content
was the old pre-cleanup version that our branch replaces.
- Remove remaining emoji and unicode arrows from processor.go and
  tmdb/client.go
- Expand webhook payload struct to match Plex spec
- Use LibrarySectionType for correct media type resolution
- Note Plex Pass requirement for webhooks in README
- Cache GetAllMovies/GetAllSeries results per client instance to
  eliminate thousands of redundant API calls per processing cycle
- Add bidirectional title matching (either string contains the other)
- Add CleanTitle matching (strips all punctuation for fuzzy matching)
  Fixes movies like "(500) Days of Summer" where Plex strips parens
- Clear Radarr/Sonarr caches alongside keyword cache each cycle
- Apply same improvements to both Radarr and Sonarr clients
Replace globe and timer emojis in verbose Plex API logging with
bracketed tags [API] and [TIMING].
- Replace [ERROR] with [SKIP] for expected lookup misses (not found
  in Radarr/Sonarr, no TMDb ID in path). Keep [ERROR] only for real
  API/fetch failures.
- Collapse duplicate file path iteration: check both API path match
  and TMDb ID regex in a single pass instead of listing paths twice.
- Cap file path logging at 3 paths with "and N more" summary.
- Consolidate episode fetching in TV show extraction to a single call
  instead of fetching twice (once for Sonarr, again for regex).
- Shorter, more scannable log format for lookup results.
…ions

Add build/test/deploy commands (Docker + Portainer webhook), architecture
overview, coding conventions, key patterns, and gotchas.
- Create internal/version/version.go as single source of truth
- Log version at startup before config loading
- Tag Docker images with version (1.2.0 + latest)
- Update CHANGELOG with 1.2.0 release date
@ttlequals0 ttlequals0 merged commit 6fe9e0f into main Apr 10, 2026
@ttlequals0 ttlequals0 deleted the feature/batch-webhook-prefix branch April 10, 2026 18:36
@ttlequals0 ttlequals0 restored the feature/batch-webhook-prefix branch April 11, 2026 23:56
@ttlequals0 ttlequals0 deleted the feature/batch-webhook-prefix branch April 20, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants