103 Commits

Author SHA1 Message Date
Tom Wheeler
07f0a14ef0 fix(placeholders): add Plex Webhook support to mark placeholders as unwatched 2026-03-15 23:42:12 +13:00
bitr8
8d850322b9
fix(overlays): support Maintainerr v3 API (mediaServerId rename) (#504)
Maintainerr v3 renamed `plexId` (number) to `mediaServerId` (string)
in their API response. The overlay context builder compared against the
old field, silently failing to match any media items so daysUntilAction
never populated.

Read `mediaServerId` with fallback to `plexId`, compare as strings.
Supports both Maintainerr v2 and v3.

Fixes #501

Co-authored-by: bitr8 <bitr8@users.noreply.github.com>
2026-03-03 00:18:43 +13:00
bitr8
d8655cad41
fix(placeholders): handle Plex returning TV seasons as Children.Directory (#491)
Plex returns seasons as Children.Directory (not Children.Metadata)
when using ?includeChildren=1. All placeholder detection code only
checked Children.Metadata, so isPlaceholderItem() always returned
false for TV shows — skipping title fixes and triggering false
cleanup of valid placeholders.

Added Metadata || Directory fallback across all detection paths,
type casts, and getChildrenMetadata() API helper.

Fixes #414

Co-authored-by: bitr8 <bitr8@users.noreply.github.com>
2026-03-03 00:15:31 +13:00
bitr8
68d832a2bd
fix: guard splice in arrangeCollectionItemsInOrder (#481)
When an item isn't yet visible in Plex, indexOf returns -1 and
splice(-1, 1) removes the last element of the tracking array,
corrupting all subsequent move decisions.

Co-authored-by: bitr8 <bitr8@users.noreply.github.com>
2026-03-03 00:14:13 +13:00
bitr8
831ccaba98
fix(collections): index MAL IDs for constant-time lookups (#482)
lookupByMal() iterates all ~25k anime ID rows to find a MAL ID match.
MAL sources can fetch thousands of items, each calling lookupByMal(),
so preview requests time out before returning results.

Added a _byMal Map index built during loadAnimeIds(), matching the
existing _byAniDB pattern. Lookups are now O(1) instead of O(n).

Fixes #480

Co-authored-by: bitr8 <bitr8@users.noreply.github.com>
2026-02-23 10:54:24 +13:00
Tom Wheeler
9b272e37b1 fix(overlays): add TVDB TV Status as additional TV Status option
add base TVDB client for future integration.

fix #342
2026-02-13 11:31:45 +13:00
bitr8
a6e3e017bd
fix(collections): use correct Plex API endpoint for collection title updates (#444)
Collections require the /library/sections/{id}/all?type=18 endpoint for
metadata updates, not /library/metadata/{ratingKey}. This fixes dynamic
cycle titles (DYNAMIC_CYCLE_TITLE) not updating in Plex after first sync.

- Add libraryKey parameter to updateCollectionTitle()
- Use correct Plex API endpoint for collection metadata updates
- Lock title field to prevent Plex overwriting
- Propagate errors instead of swallowing them

Fixes #432

Co-authored-by: bitr8 <bitr8@users.noreply.github.com>
2026-02-13 08:37:58 +13:00
bitr8
bf569aea54
fix: use searchPerson API for person spotlight TMDB disambiguation (#452)
searchMulti returns all media types without known_for_department,
causing wrong person selection when names collide (e.g., actor
"Ingmar Bergman" chosen over the director). Switch to searchPerson
and rank results by department match, profile image, then popularity.

Relates to #443

Co-authored-by: bitr8 <bitr8@users.noreply.github.com>
2026-02-08 21:29:44 +13:00
Tom Wheeler
9787db3bda feat(overlays): add Plex Labels as condition
fix #243
2026-02-02 20:55:56 +13:00
Ryan Brothers
3668ec2931
feat(collections): Add custom TMDB Collection Builder (#416)
Collections can now be created using the TMDB Discover Movie/TV endpoint, allowing for complex filters to create custom collections. Includes custom builder with dropdowns and search fields.
---------

Co-authored-by: Tom Wheeler <thomas.wheeler.tcw@gmail.com>
2026-02-02 16:18:20 +13:00
Tom Wheeler
84db0e23c2 feat(collections): items that fall off collections now have a label 'agregarr-stale' added
includes check after each collection is processed to handle items existing in multiple collections

fix #384
2026-01-29 19:29:20 +13:00
Tom Wheeler
f7083d760b feat(tags): tags can now be created directly in agregarr 2026-01-29 17:51:28 +13:00
Tom Wheeler
9962d5e0ef feat(overlays): add RT Verified Hot support and preset
fix #394
2026-01-29 17:49:58 +13:00
Tom Wheeler
a87ab2557d feat(radarr-sonarr): add option to tag existing media
previously only missing items could have tags added, a new option in radarr/sonarr settings allows
the addition of tags to existing media, using the existing tags used in missing items. also extracts
and refactors tagging functions to remove duplication.

fix #248
2026-01-29 17:27:26 +13:00
Tom Wheeler
9b0d319102 feat(tautulli): add 'Most Watched' collection by Play Count or Watch Duration
fix #426
2026-01-29 10:52:34 +13:00
bitr8
e482b58a29
fix(api): pass options to ExternalAPI constructor correctly (#413)
ImdbRatingsAPI and FlixPatrolAPI were passing headers and nodeCache as the
second argument (params) instead of the third argument (options). This meant
nodeCache was being treated as URL query params rather than cache configuration,
so responses were never cached.

Fixed by passing empty object for params and moving options to third argument.

Co-authored-by: bitr8 <bitr8@users.noreply.github.com>
2026-01-26 09:42:27 +13:00
Tom Wheeler
9087e84a9f fix(sonarr): add all sonarr mointoring options to main settings and collection config
update styles, load server defaults for new collections

fix #397
2026-01-21 07:47:23 +13:00
Tom Wheeler
8b1d1c67a5 feat(trakt): add Trakt watchlist support (via OAuth)
fix #377
2026-01-17 16:50:19 +13:00
Tom Wheeler
4e4edb5f2a fix(imdb): replace ExternalAPI with ImdbAxiosClient for improved list fetching 2026-01-15 17:19:43 +13:00
Tom Wheeler
e621b7554f fix(overseerr): disable notifications for overseerr users
fix #240
2026-01-15 04:31:26 +13:00
Tom Wheeler
193833ce85 fix(trakt): add support for new app.trakt.tv urls 2026-01-14 23:09:47 +13:00
Tom Wheeler
030c928844 fix(mdblist): fix mdblist for multi-source collections
fix #299
2026-01-14 11:39:06 +13:00
bitr8
01f94d5c1f
feat(imdb): add Top 250 English Movies collection type (#358)
Adds support for IMDb's Top 250 English-language movies list as a new
collection source. The list is available at /chart/top-english-movies/.

- Added TOP_250_ENGLISH_MOVIES enum value and URL mapping
- Added 'top_250_english' subtype to collection sources
- Added UI options in CollectionTypeSection and MultiSourceConfigSection
- Added title presets for the new collection type
- Auto-sets mediaType to 'movie' when selecting this subtype

Closes agregarr/agregarr#330

Co-authored-by: bitr8 <bitr8@users.noreply.github.com>
2026-01-14 10:19:36 +13:00
bitr8
7c6ff6b030
fix(security): harden API clients and file operations (#300)
- overseerr.ts: Redact credentials in error logs (whitelist headers,
  sanitize URL query params, try/catch stringify with pre-truncation)
- externalapi.ts: Add catch handler to rolling cache background refresh
- animeIds.ts: Add 30s timeout and 50MB size limit with streaming
- MultiSourceOrchestrator.ts: Validate sources array before cycle_lists
- LocalPosterFolderService.ts: Validate poster downloads (size, status, type)
- placeholderManager.ts: Prevent path traversal with realpath validation

Reviewed by Codex - addresses credential leakage, unhandled rejections,
resource exhaustion, division by zero, and directory traversal vectors.

Co-authored-by: bitr8 <bitr8@users.noreply.github.com>
2026-01-11 22:22:38 +13:00
bitr8
452a2be4a9
fix(placeholders): trigger Plex scan and empty trash after cleanup (#332)
When placeholders are cleaned up because real content arrived, Plex
wasn't notified and ghost entries remained in the library. This adds:

- New emptyTrash() method to PlexAPI
- Fire-and-forget scan + empty trash after placeholder cleanup
- New autoEmptyTrash setting (default: true) with UI toggle
- Setting in Plex settings page with "advanced" badge

The scan runs in the background so it doesn't block the sync process.

Co-authored-by: bitr8 <bitr8@users.noreply.github.com>
2026-01-11 22:20:25 +13:00
grokdesigns
7b2187108d
fix(rt-ratings): add roman numeral search support (#334)
* Add Roman Numeral Support
2026-01-11 08:12:48 +13:00
Tom Wheeler
1c21a0e7b2 feat(sort-order): add release date and date added to plex as sort order options
also refactors overseerrSync to use Plex Lookup

fix #187, fix #203
2026-01-11 07:42:34 +13:00
Tom Wheeler
8073c3418c fix(plex-libraries): fixes non-movie/show libraries being discovered inconsistently
fix #255
2026-01-10 00:47:24 +13:00
Tom Wheeler
3aadbf0b44 feat(overlays): add Plex User Rating condition/variable
fix #254
2026-01-09 23:36:12 +13:00
Tom Wheeler
33ac103895 fix(rt-ratings): fix year and title case mismatch
fix #289
2026-01-09 02:10:15 +13:00
Tom Wheeler
309f196e3b chore(mdblist): add axios error logging 2026-01-05 23:16:38 +13:00
Tom Wheeler
af701fc045 fix(placeholders): add check for plex poster, apply TMDB poster if not present 2026-01-04 14:05:18 +13:00
Tom Wheeler
f4acd17144 fix(networks): fix parsing of hyphenated lists
fix #259, fix #263
2026-01-02 04:22:02 +13:00
Tom Wheeler
691ae055f8 fix(plex libraries): improved error handling. remove dual update paths
re #255
2026-01-01 14:03:23 +13:00
Tom Wheeler
b2e645bc95 fix(overlays): add backend support for DoVi, add preset for HDR and DoVi
fix #183
2025-12-31 10:44:57 +13:00
Tom Wheeler
553e99a8a0 fix(api): fix caching of api clients causing settings to not reflect in sync 2025-12-26 08:22:39 +13:00
Tom Wheeler
858f7934a6 feat(overlays): add support for overlays based on maintainerr action
fix #233
2025-12-24 12:29:45 +13:00
Tom Wheeler
8c94464c17 fix(item order): fixes item ordering in plex collections
fix #225
2025-12-24 00:46:29 +13:00
Tom Wheeler
5b0023de68 fix(filtered hubs): adds recently released episodes filtered hub 2025-12-17 19:45:17 +13:00
akina5525
f91b7faa80
feat(sources): add actor and director collections with seperators (#198)
adds new source 'Plex Library' with Auto Director and Auto Actor collection sub-types, option to configure minimum items. utilises smart collections. adds new poster template. adds separators option.

---------

Co-authored-by: Tom Wheeler <thomas.wheeler.tcw@gmail.com>
2025-12-17 00:17:23 +13:00
Tom Wheeler
aaf0c50848 fix(filtered hubs): ensure existing filtered hubs get updated 2025-12-16 11:45:37 +13:00
Tom Wheeler
f13bba0763 feat(plex watchlist): adds plex watchlist grabbing via overseerr and radarr/sonarr 2025-12-16 11:40:39 +13:00
Tom Wheeler
0551af0027 fix(minor fixes): add editionTitle, remove duplicate poster storage intialisation 2025-12-16 03:01:12 +13:00
Tom Wheeler
bd92c8047d fix(letterboxd): fixes parsing of apostrophe
fix #199
2025-12-15 14:33:03 +13:00
samohtxotom
df99edd807
feat(trakt): add recommendations collection type (#193, #197)
* Add Trakt recommendations subtype

---------

Co-authored-by: Akin Altas <akin@sistemart.com>
2025-12-14 18:27:36 +13:00
akina5525
81de7ac38d
Add Trakt OAuth (#192)
* Adds Trakt Oauth to access private lists/watchlist

Thanks to @akina5525

---------

Co-authored-by: Tom Wheeler <thomas.wheeler.tcw@gmail.com>
2025-12-14 17:39:14 +13:00
Tom Wheeler
d8e8183741 fix(smart collections): adds max items for smart collections
exposes max items for smart collections, adds passthrough to smart collection URI
2025-12-06 17:02:06 +13:00
Tom Wheeler
a017de4ea7 feat(poster languages): adds option for poster languages under Settings -> General
plan for future expansion (hence location), likely including locale for i18n translation, and TMDB
metadata language with fallback (where possible)

re #144
2025-12-04 20:26:33 +13:00
Tom Wheeler
f459595da4 feat(plex metadata): adds hashing system for posters, wallpapers, and themes
adds migrations for collection and item metadata tables. posters (items + collections), wallpapers,
and themes now have a hash calculated based on their variables. adds check before generating poster,
comparing metadata slug to stored slug from previous sync, if both hash and slug are equal, then
generation/upload is skipped. will significantly reduce bloat from repeated uploads, and reduces
poster overlays re-run time significantly (e.g. 45 mins to 18 mins)

re #144
2025-12-04 20:19:39 +13:00
Tom Wheeler
36606225e5 feat(background, theme, summary): adds background, theme, and summary to config form
background/wallpaper can now be added to the config form which will be uploaded to plex during sync,
alongside file theme (music) for collections, and text summary

fix #63
2025-12-04 13:22:43 +13:00