* feat(catalog): remove smart collection item limit cap
MaxSmartCollectionItemLimit silently clamped every smart collection to
500 items, and an unset limit defaulted to 100. On servers with large
libraries this truncates collections with no indication to the admin —
a per-language smart collection (original_language is fr) has 10,625
real matches and showed under 1% of them.
Remove the cap and make an unset limit resolve the full result set: the
default becomes a large sentinel so every consumer's int plumbing (SQL
LIMIT) keeps working. An explicit positive limit in the query
definition is still honored as-is — membership size is an admin
decision, and every read path that serves collection items either
paginates in SQL or scales with the actual collection size.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(jellycompat): page smart collection browse in SQL
The Jellyfin BoxSet children path resolved a smart (live-query) collection's
entire membership and sliced one page locally. With the item cap removed
(smart collection membership is now uncapped, an admin decision), a large
collection browsed from a Jellyfin client materialized tens of thousands of
rows per request — latency and memory scaling with collection size.
For the default browse (no explicit SortBy), page the smart query directly in
SQL via QueryExecutor.PreviewPage(offset, limit), hydrating only the requested
page. Per-request work is now proportional to page size, not collection size.
TotalRecordCount still reports true membership (the count query caps at the
query's item limit), and past-the-end pages preserve the real total.
Shared query prep is extracted into prepareSmartCollectionQuery, used by both
the new paged path and the existing full-resolution path (still used by the
explicit-sort allowlist branch, whose output is already SQL-paginated).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: rxwatcher <rxwatcher@users.noreply.github.com>