Skip to content

fix(server): restore Sonarr episode fallback handling#2653

Merged
enoch85 merged 5 commits into
developmentfrom
fix/2491-sonarr-airdate-fallback
Apr 10, 2026
Merged

fix(server): restore Sonarr episode fallback handling#2653
enoch85 merged 5 commits into
developmentfrom
fix/2491-sonarr-airdate-fallback

Conversation

@enoch85

@enoch85 enoch85 commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

Fixes #2491.

Supersedes the stale implementation approach from #2492 by porting only the still-valid Sonarr fixes onto current development.

Summary

  • preserve the current metadata-based Sonarr lookup flow
  • fall back to episode air date matching when no numeric episode index is available
  • keep Sonarr episode matching and cleanup aligned with episode numbers and episode file IDs
  • add focused regression coverage for episode fallback and helper matching

Testing

  • yarn workspace @maintainerr/server test --runInBand --runTestsByPath src/modules/actions/sonarr-action-handler.spec.ts src/modules/api/servarr-api/helpers/sonarr.helper.spec.ts src/modules/collections/collection-handler.spec.ts src/modules/collections/collection-worker.server.spec.ts

@enoch85 enoch85 merged commit db89edd into development Apr 10, 2026
13 checks passed
@enoch85 enoch85 deleted the fix/2491-sonarr-airdate-fallback branch April 10, 2026 18:35
maintainerr-automation Bot added a commit that referenced this pull request Apr 10, 2026
* build(deps-dev): bump knip from 6.1.1 to 6.3.1 (#2650)

Bumps [knip](https://github.com/webpro-nl/knip/tree/HEAD/packages/knip) from 6.1.1 to 6.3.1.
- [Release notes](https://github.com/webpro-nl/knip/releases)
- [Commits](https://github.com/webpro-nl/knip/commits/knip@6.3.1/packages/knip)

---
updated-dependencies:
- dependency-name: knip
  dependency-version: 6.3.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump @tanstack/react-query from 5.96.2 to 5.97.0 (#2652)

Bumps [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) from 5.96.2 to 5.97.0.
- [Release notes](https://github.com/TanStack/query/releases)
- [Changelog](https://github.com/TanStack/query/blob/main/packages/react-query/CHANGELOG.md)
- [Commits](https://github.com/TanStack/query/commits/@tanstack/react-query@5.97.0/packages/react-query)

---
updated-dependencies:
- dependency-name: "@tanstack/react-query"
  dependency-version: 5.97.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps-dev): bump @tanstack/eslint-plugin-query (#2651)

Bumps [@tanstack/eslint-plugin-query](https://github.com/TanStack/query/tree/HEAD/packages/eslint-plugin-query) from 5.96.2 to 5.97.0.
- [Release notes](https://github.com/TanStack/query/releases)
- [Changelog](https://github.com/TanStack/query/blob/main/packages/eslint-plugin-query/CHANGELOG.md)
- [Commits](https://github.com/TanStack/query/commits/@tanstack/eslint-plugin-query@5.97.0/packages/eslint-plugin-query)

---
updated-dependencies:
- dependency-name: "@tanstack/eslint-plugin-query"
  dependency-version: 5.97.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: log plex native watch fallback details

* fix(metadata): resolve parent show IDs for season/episode image lookups

Seasons and episodes in media servers carry their own provider IDs which
differ from the parent show. Image endpoints were using these
season-level IDs directly against TMDB/TVDB show endpoints, causing
wrong or missing images.

Pass the media server item ID through to the metadata service. When the
item is a season or episode, follow the parent relationship to the show
and use its provider IDs for image resolution. Falls back to the
original IDs on failure.

Closes #2649

* fix(jellyfin): include partial watchers in sw_watchers (#2559) (#2646)

* fix(server): restore Sonarr episode fallback handling (#2653)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: maintainerr-automation[bot] <261505141+maintainerr-automation[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: enoch85 <mailto@danielhansson.nu>
@enoch85 enoch85 added this to the 3.6.0 milestone Apr 11, 2026 — with GitHub Codespaces
@maintainerr-automation

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

Episodes with undefined index (e.g. daily shows) are silently not deleted/unmonitored in Sonarr

1 participant