Query Builder
The Query Builder (Library → Query in the sidebar, at /library/query) answers one-off questions about your library with the same criteria lifecycle rules use: “which 1080p movies over 20 GB has nobody played in two years?”, “which shows has Sonarr tagged keep?”. You build the criteria, run them, and get every matching item in a table or a poster grid. From the results you can save the query, turn it into a lifecycle rule set, or run a Radarr, Sonarr or Lidarr action on a selection straight away.
You can also reach it from the global search palette (⌘K / Ctrl+K): Open the Query workspace sits under Advanced at the bottom of every search.
Query Scope
Section titled “Query Scope”The Query Scope card at the top decides what the query searches.
- Servers — All servers (the default), one server, or any combination. Ticking every server is the same as All servers, so a server you add later is included too. Disabled servers are not offered and are never searched. The selection is saved with the query, carried into Convert to Lifecycle Rule, and used by actions run from the page.
- Media types — Movies, Series and Music pills. With none selected the query covers all three (“None selected = all types”).
- Include individual episodes — shown while Series is in scope. Off (the default), episodes that match are grouped by show: one row per show, reading “N seasons, M episodes matched”. On, every matching episode is its own row, named by its show and episode number (Breaking Bad S01E01). Shows are grouped by series identity, so two different shows sharing a title stay separate and the same show on two servers is one row.
- Arr servers — one picker per *arr family (Radarr, Sonarr, Lidarr), shown for the media types in scope when that family has an instance configured. The *arr criteria are read from the instance you pick here, and query actions run on it. Leave it on None for a family you don’t need.
Music results are always individual tracks; the Query page has no artist grouping. Movies, tracks and individual episodes are not deduplicated across servers: a movie on two servers is two rows, one per server.
Building criteria
Section titled “Building criteria”The criteria builder is the lifecycle rule builder: conditions with a field, operator and value; AND/OR connectors that combine top to bottom; Add Condition, Add Sub-group and Stream Query groups; a NOT toggle on a group; per-condition enable/disable; drag to reorder; and the Logic Preview beside it spelling out the exact grouping with parentheses. Every field and operator is described in the lifecycle rules field reference, and the operators and Is Empty sections apply here unchanged — the two share one evaluation engine, so a query returns exactly what a rule set with the same criteria would match.
What the scope changes in the builder:
- Fields that can’t apply to any selected media type are disabled, with a tooltip saying why (for example a Sonarr-only field when only Movies is selected). A field is allowed as long as it applies to at least one selected type.
- Series criteria (episode counts, watched %, Series Last Played, …) need Series in scope and are hidden in episode mode (“Series criteria are not available in episode mode”), because they describe a whole show, not one episode. Each episode is checked against the whole query on its own, with its show’s series values carried over to it, and a show is listed with exactly the episodes that pass — Available Episode Count ≥ 20 and Resolution = 4K lists the 4K episodes of every show with at least 20 episodes, whichever of its episodes they are, and a file delete removes only those (actions on the whole series, such as Delete from Sonarr, still act on the whole show). The other criteria are the episode’s own: Play Count is the episode’s plays, not the show’s total. A show none of whose episodes passes on its own — a File Size only the whole show adds up to, say — is not listed, as for a Series rule set with series scope off.
- Episode criteria (Season Number, Episode Number, Seasons Behind Latest) need Series in scope and work in both views: episodes are matched on them, then grouped by show unless episode mode is on. Seasons Behind Latest ≥ 2, for example, finds every episode outside each show’s two newest seasons. They read as empty on movies and tracks. They describe one episode, so an action on the whole show (Delete from Sonarr, Unmonitor & Delete Files, tags, …) can’t follow them (see When a query action is refused). See Season and episode criteria.
- *arr criteria appear once an Arr server is picked in the scope.
- Seerr criteria need an enabled Seerr instance. Every enabled instance is read and their requests merged, as for lifecycle rules.
Two warnings can appear above the builder:
- “Some criteria can’t be evaluated” — the query uses *arr criteria and a media type in scope has no enabled Arr server selected (the warning names the types), Seerr criteria with no Seerr instance, or Seerr criteria on music (Seerr has no music). Without that data a rule like Found In Arr = false matches everything.
- An integration-unreachable banner — an *arr or Seerr instance the query reads is configured but not answering right now, so its criteria won’t reflect real data.
Limits: up to 20 top-level groups, 50 conditions and 10 sub-groups per group, and up to 100 servers.
Running a query
Section titled “Running a query”Run Query (beside the condition count) is enabled once every condition has a value. A progress bar walks through the phases the run needs — Resolving servers, Fetching Arr metadata, Fetching Seerr metadata, Querying library, Evaluating rules, Finalizing — showing only the ones it uses; *arr and Seerr fetches and the rule evaluation report how far they’ve got. A query that fails says so in a Query failed message with the reason, rather than showing zero results.
Every matching item is returned in one go — there is no paging. The line above the results reads “N results found · total size”, the total file size of everything that matched.
Results
Section titled “Results”Switch between the Table view and Card view icons beside Run Query; your choice is remembered in this browser. Clicking a row or card opens the item’s detail panel, and hovering shows the same hover card as the library pages.
Table view
Section titled “Table view”The table starts with Type, Title, Year, Resolution, Video Codec, Dynamic Range, Audio Codec, Size, Duration, Plays and Server. Columns adds or removes columns, including Audio Profile and Container; Title can’t be hidden. The chosen columns and their widths (drag a header edge) are remembered in this browser.
Click a column header to sort by it, and again to reverse. Results arrive sorted by title. The sort is part of the query: saving keeps it, loading a saved query restores it, and the card view shows results in the same order.
On a grouped show row, Size and Plays are the totals over the episodes that matched, Server lists every server holding one of them, and per-episode detail such as resolution or codec shows “-”.
Showing any criterion as a table column
Section titled “Showing any criterion as a table column”Every criterion a query can filter on can also be shown as a column. Open Columns and pick from the sections the builder uses (Content, Activity, Streams, Arr, Seerr, Series and so on); Search columns… finds one by name. Arr columns are offered only when an *arr instance is configured, Seerr columns only when a Seerr instance is enabled.
Turning a column on loads its values for the rows already on screen — the query is not run again. Only the table view shows these columns, so the card view loads none of them until you switch back. Very large result sets are loaded in chunks of 50,000 rows.
- Arr columns read the *arr instance selected in the query scope. With none selected they stay empty and a note above the table says why. Radarr’s Custom Format Score is the slowest *arr value to read (one request per 100 movies), so it is fetched only when that column is shown or a criterion uses it.
- Seerr columns read every enabled Seerr instance. If none can be reached, the columns stay empty and the note gives the reason.
- Series columns (episode counts, watched %, last played) apply to a grouped show row. A show row has no single value for per-episode detail such as bitrate or the number of audio tracks, so those cells show “-”.
- Episode columns (Season Number, Episode Number, Seasons Behind Latest) apply to episode rows (episode mode); a grouped show row, a movie and a track show “-”.
A source that can’t answer leaves its cells empty and explains why in the note — it never guesses a value. Columns sort like the fixed ones: numbers and dates in order, empty cells last.
Pinning columns
Section titled “Pinning columns”Click or tap the pin icon in a column header to keep that column at the left edge while the rest scroll sideways, and again to unpin it. With a mouse, the pin on an unpinned column appears when you point at its header; on a touch screen every pin is always shown. Type, Title and Year are pinned by default, and your choice is remembered in this browser. Pinned columns never take more than about 60% of the table’s width: on a phone or a narrow window, the pins that don’t fit are paused (their pin icon is dimmed and a note above the table names them) so there is still room to scroll, and they come back when the screen is wide enough.
Scrolling sideways
Section titled “Scrolling sideways”When the table is wider than the page, a scrollbar stays at the bottom of the window while the table is on screen, so you never have to scroll to the last row to reach it. Drag its handle (with a mouse or a finger), click or tap beside the handle to move one screen’s width, or point at it and turn the mouse wheel. Shift + mouse wheel over the rows also scrolls sideways, and on a touch screen you can swipe the table itself.
Card view
Section titled “Card view”The card view shows posters with year, duration (or seasons/episodes for a show) and size, and the S/M/L card size control. Select all above the grid and a checkbox on each card select results for an action.
Saving and loading queries
Section titled “Saving and loading queries”The toolbar above the scope manages saved queries:
- Save stores the query under a name (up to 100 characters); on a loaded query it offers Update instead. A saved query keeps its scope (servers, media types, episode mode, Arr servers), its criteria and its sort — not its results, columns or pins.
- Load saved query… appears once you have one, listing the most recently updated first.
- Save As copies the loaded query under a new name, and Delete removes it.
- New clears the builder.
A query whose criteria can’t apply to any of its media types is refused when saved; a refused save says why (for example which criteria don’t fit the selected media types).
Unsaved drafts. An in-progress query is kept for the current browser tab, so navigating away and back doesn’t lose it: “Restored your unsaved query from this session.” appears with Discard. The draft lives only in that tab and is cleared when you close it; it is separate from Save.
Converting a query into a rule set
Section titled “Converting a query into a rule set”If you build a query you’d like enforced on a schedule, Convert to Lifecycle Rule on the toolbar creates a rule set without re-entering the criteria. It needs at least one condition with every value filled in, at least one media type selected, and a connected server.
What the conversion does:
- Copies the rule tree verbatim — no changes to fields, operators, or values.
- Asks for a Rule set name, defaulting to the saved query’s name plus “(rule set)” and adding “(2)”, “(3)”, … when a rule set of that type already has the name.
- Prompts you to pick a Target library type when the query targets more than one (rule sets are scoped to a single type).
- Drops any rules that don’t apply to the chosen library type and lists them before submitting. For example, when targeting Movies, any series-aggregate or music-only rules are removed. If none would remain it says so and won’t create the rule set.
- Uses the query’s servers. A query that searches all servers asks you to confirm Apply the rule set to all my servers, since a rule set needs its servers listed; that is every enabled server (disabled ones are not added).
- Carries over the Arr server picked for the target type, which you can change in the rule set editor.
- Sets the rule set’s scope. For Series, Include individual episodes maps to series scope: grouped by show becomes series scope on, episode mode series scope off. Music gets artist scope on. A query using a criterion that describes one episode or track — Resolution, Year, Genre, Content Rating, a codec, Container, Duration, a stream field or a stream query, the episode criteria (Season Number, Episode Number, Seasons Behind Latest, which work only with series scope off), and the others listed under Available Fields — gets series or artist scope off either way, since a rule judging a whole show or artist can’t use those criteria; each episode or track is then checked on its own, as the query checked it. The dialog says which scope the rule set gets and, when a criterion turned it off, which one.
- Creates the rule set enabled, with actionEnabled off and no action configured — matches will be detected on the next scheduler run, but nothing is deleted or unmonitored until you choose an action. With the scope off, the dialog also names the criteria an action on the whole show or artist (Delete from Sonarr or Lidarr, Change Quality Profile, Arr tags, …) can’t follow; the editor then offers those actions disabled, and only one that acts on the matched episodes or tracks can be armed (see Actions on the whole show with series scope off).
After conversion you’re taken to the new rule set’s editor so you can pick an action type, set the delay, configure tags, and re-evaluate.
Running actions on results
Section titled “Running actions on results”For one-off cleanups you don’t want to schedule, you can run a lifecycle action on query results without creating a rule set.
-
Pick the Arr server for each media type you want to act on in the Query Scope (Radarr for movies, Sonarr for series, Lidarr for music). The action runs on that instance.
-
Run the query, then tick the results you want to act on. The table’s header checkbox and the card view’s Select all select everything.
-
In the Actions bar above the results, Choose an action…, set any options it offers, optionally pick Add tags / Remove tags (type a new tag and press Enter to add it), then Run action.
-
Confirm in the Run “…”? dialog, which says how many items it will act on, how many selected items of another media type will be skipped, how many batches it runs in, and, for a delete, that it cannot be undone.
The actions are the lifecycle actions for each family — Delete from Radarr / Sonarr / Lidarr, Unmonitor & Delete Files, Monitor & Delete Files, Delete Files Only, Unmonitor Only, Change Quality Profile, Search for New Copy and Do Nothing (tags only) (see Available Actions). The options:
- Change Quality Profile needs a quality profile from the instance, and offers Search for upgrade.
- The three file deletes offer Search after (search for a new copy once the file is gone).
- Delete from Radarr / Sonarr / Lidarr offers Add import exclusion; no other action does.
- In episode mode (Include individual episodes on), Unmonitor Only and Search for New Copy act on the selected episodes only: Sonarr unmonitors or searches those episodes and leaves the rest of the show alone. Grouped by show, they act on the whole series — unless the query uses an episode criterion (Season Number, Episode Number, Seasons Behind Latest): a show row then stands for the episodes it matched, and they act on those episodes only. (A Series rule set with series scope off does the same.) Delete from Sonarr, Change Quality Profile and tags are properties of the series in Sonarr, so they apply to the whole show in either mode.
- Add tags / Remove tags are offered with every action except Delete from Radarr / Sonarr / Lidarr, which removes the record and its tags with it. Do Nothing (tags only) changes tags and nothing else, so it needs at least one.
- An action that acts on a whole show or artist can’t follow criteria that describe one episode or track — such actions, and the tags, are offered disabled with the reason (see When a query action is refused).
The bar shows how many results are selected and their combined size — handy for gauging how much space a cleanup will reclaim. An action applies only to selected results of its media type: Delete from Radarr acts on the selected movies, and selected shows or tracks are skipped and reported. With nothing selected the bar says “Select results below to run an action.”; with no Arr server picked for the selected types, “Select an Arr instance above for the media type(s) you want to act on.”
What happens when you run one
Section titled “What happens when you run one”A progress bar tracks the action through Validating selection, Running action (item by item, naming the item and step in flight) and Finalizing. Before anything is sent:
- The query is re-run, and only selected items still in its results are acted on. The action uses the criteria of the run whose results are on screen, not edits you have made to the builder since.
- Exceptions are honoured. Items on the Lifecycle Exceptions list are skipped, including an item whose copy on another server is excepted. For a grouped show, excepted episodes are left out of a file delete, and the show is skipped only when every matched episode is excepted. A whole-record delete (Delete from Sonarr, Delete from Lidarr) is skipped entirely when any episode of the show or track of the artist is excepted — even one the query didn’t match — because it would remove that one too.
- *One action per arr record. A title found on two of your servers, or several tracks of one artist, is one record in the *arr app, so it gets one action. A file delete on an artist’s tracks deletes all the selected tracks in that one action. Likewise, a whole-show action picked in episode mode (Delete from Sonarr, Change Quality Profile, Do Nothing with tags) runs once per show, not once per selected episode; Unmonitor Only and Search for New Copy run once per show on just the selected episodes.
When it finishes, the selection is cleared and the query re-runs, so the results reflect what changed; other open pages (library listings, Matches, the dashboard) refresh too. The result message reports how many were executed, failed and skipped, with the first failure’s reason.
When a query action is refused
Section titled “When a query action is refused”The action is refused, with the reason, before anything runs when:
- *The query’s arr criteria can’t be evaluated for the action’s media type: no Arr server selected for it, or the selected one has been disabled. Without that data Found In Arr = false would match your entire library. (The query leaves such a type out of its results already; the action checks again.)
- The action would act on a whole show or artist, but the query’s criteria describe one episode or track. A query checks every episode and track on its own, so Resolution = 4K with Delete from Sonarr would delete every show with a single 4K episode. An action on the whole Sonarr series or Lidarr artist — Delete from Sonarr / Lidarr, Change Quality Profile, Unmonitor & Delete Files, Monitor & Delete Files, Lidarr’s Unmonitor Only and Search for New Copy, Search after a Lidarr file delete, any tags (so Do Nothing (tags only) too), and, grouped by show on a query without an episode criterion, Sonarr’s Unmonitor Only and Search for New Copy — may follow only what every episode of a show or track of an artist answers alike: Artist / Series, Has External ID (for series), the series-aggregate fields, and the *arr and Seerr fields. These are the criteria a rule set with series or artist scope off may use under the same action (see Actions on the whole show with series scope off); a disabled criterion counts too. The actions on the matched episodes or tracks stay available on any query: Delete Files Only (without tags; for music, without Search after), and with Include individual episodes on or an episode criterion (Season Number, Episode Number, Seasons Behind Latest) in the query, Unmonitor Only and Search for New Copy (without tags). The episode criteria are criteria of one episode like any other here: Seasons Behind Latest ≥ 2 with Delete from Sonarr or Unmonitor & Delete Files (which unmonitors the whole series) is refused. The Actions bar offers the refused actions, tags and Search after disabled with the reason on hover, and turns Run action off with the reason when a re-run brings such a criterion under the action already chosen.
- *Tags were set on an action that deletes the whole arr record.
- *The action would run on a different arr instance than the criteria were read from. A tag checked on your 1080p Radarr says nothing about the copy on your 4K Radarr. (The page always runs the action on the scope’s instance; the server checks it anyway.)
- The query’s Seerr criteria can’t be evaluated: no enabled Seerr instance, or a music action (Seerr has no music, so they would match every artist).
- The query reads play activity that isn’t known yet. Criteria reading play history — Watched By User, Play Count, Last Played and the series aggregates built on them — are refused while a server the query searches has never completed a watch-history sync, or is still importing its history from Tracearr. This matters most here: a query action executes immediately, with no Pending page to catch a library that suddenly reads as never watched. It is scoped to the query’s own servers.
- The run would exceed your deletion limit (below).
- Another action is running. One query action runs at a time (“A query action is already running — wait for it to finish”). A query action and a rule set’s actions never run at the same time either, since they can reach the same *arr record through different copies or tracks: while a query action runs, scheduled actions wait for the next execution run and Execute or Retry on the Pending page is refused; a query action that starts while a rule set’s actions are running waits up to a minute for them, then is refused (“A lifecycle execution is running — try again when it finishes”).
These are the same guards described in Deletion Safety, applied to a path with no countdown in front of it.
Large selections and batches
Section titled “Large selections and batches”Any selection size works. A selection is sent in sequential batches of up to 1,000 items, and the Actions bar and confirmation dialog tell you how many. A show’s episodes and an artist’s tracks travel in the same batch, and an *arr record acted on in one batch is skipped by every later batch of the same run (two servers’ copies of a movie can land in different batches), so a whole-record action never fires twice. File deletes are the exception by design: each batch deletes its own files. Each batch is recorded before the next starts, so a run that stops part-way loses nothing — re-run to finish the rest (“Action stopped part-way” lists what completed). The re-check of the query is done once for the whole run, not per batch.
- A batch that fails entirely, with nothing executed, stops the remaining batches (“Action stopped … check the Arr instance, then re-run”) rather than sending every one of them to an instance that is down.
- A whole-show action on more than 1,000 episodes of a single show is refused in episode mode (“Too many episodes for one series”) — switch off Include individual episodes to act on the show as one unit.
The deletion limit
Section titled “The deletion limit”The optional deletion limit (Settings → General → Delete without asking, up to N items per run) counts the whole run, not each batch: a run over the limit is refused before its first batch starts, and nothing is deleted. A show or an artist counts once, as one action. Only delete actions count; unmonitor, quality-profile and search actions are never limited. A query run over the limit is not queued anywhere — the refusal says how many items the limit allows; select at most that many or raise the limit. The refusal is shown on the page and, when a Discord webhook is set, announced there as Lifecycle deletion held for review (at most once per 15 minutes).
Audit trail
Section titled “Audit trail”Every run is recorded in the Actions history and the deletion stats labelled Ad-hoc query action, so there’s a full record even though no rule set exists. An action on exactly one episode is named by its show and episode number, for example Breaking Bad S03E10. Query actions send no Discord notifications of their own, except the deletion held notice above.
Limits
Section titled “Limits”| What | Limit |
|---|---|
| Top-level groups per query | 20 |
| Conditions per group | 50 |
| Sub-groups per group | 10 |
| Saved query name | 100 characters |
| Items per action batch | 1,000 (larger selections run as several batches) |
| Episodes of one show per whole-show action, episode mode | 1,000 |
| Servers per query | 100 |
| Wait for a running rule-set execution before refusing | 1 minute |
| Rows per criterion-column request | 50,000 (larger result sets load in chunks) |