Skip to content

feat: Add smart collection filters#1630

Merged
benscobie merged 3 commits into
mainfrom
feat-smart-collections
Mar 21, 2025
Merged

feat: Add smart collection filters#1630
benscobie merged 3 commits into
mainfrom
feat-smart-collections

Conversation

@benscobie

@benscobie benscobie commented Mar 12, 2025

Copy link
Copy Markdown
Contributor

This PR adds 4 new rules:

  • Present in amount of other collections (incl. smart collections)
  • Present in amount of other collections (incl. parents and smart collections)
  • [list] Collections media is present in (titles) (incl. parents and smart collections)
  • [list] Collections media is present in (titles) (incl. smart collections)

These use the same logic as the existing non-smart collection rules, with the addition of checking smart collections.

Smart collections are not returned in the metadata Collection array. Instead we must iterate over each smart collection, load its children and then check if the rating key is present.

The rule IDs skip a few to cater for the ones added in PR #1627

Smart collections are not returned in the metadata Collection array. Instead we must iterate over each smart collection, load its children and then check if the rating key is present.

@ydkmlt84 ydkmlt84 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@benscobie benscobie enabled auto-merge (squash) March 21, 2025 12:49
@benscobie benscobie merged commit 8ac61fa into main Mar 21, 2025
@benscobie benscobie deleted the feat-smart-collections branch March 21, 2025 13:46
@jorenn92

Copy link
Copy Markdown
Member

🎉 This PR is included in version 2.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

enoch85 added a commit that referenced this pull request May 24, 2026
…antics

uniqueTrimmedRulePropertyNames now de-duplicates on the raw value and trims
afterwards (Array.from(new Set(names)).map(trim)) — exactly the development
behaviour from #1630. The earlier trim-then-dedupe collapsed whitespace/case
variants into one entry, which is a user-visible change for the COUNT_*
comparators on the *_including_smart TEXT_LIST rules (ids 41/42). Specs updated
to lock the restored behaviour.
enoch85 added a commit that referenced this pull request May 25, 2026
…ev mocks/seed

- uniqueTrimmedRulePropertyNames de-duplicates on the raw value, then trims,
  exactly matching the pre-refactor Plex behaviour from #1630 for the
  *_including_smart TEXT_LIST rules (ids 41/42). Titles differing only by
  surrounding whitespace or capitalization stay separate, which the COUNT_*
  comparators depend on. Specs updated to lock it.
- dev/fake-plex.mjs: stateless mock Plex (peer to dev/fake-jellyfin.mjs)
  covering the Plex-only getter paths.
- dev/seed-db.mjs: seeds rule groups with rules across the property surface
  plus notifications, cron, logs, exclusions and overlays
  (MEDIA_SERVER=plex|jellyfin).
- AGENTS.md: document the three dev scripts as a Playwright complement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants