Skip to content

fix(tmdb): skip the animation genre requirement for restricted auto-match - #1391

Draft
Foowy wants to merge 1 commit into
ShokoAnime:masterfrom
Foowy:fix/tmdb-restricted-genre-filter
Draft

fix(tmdb): skip the animation genre requirement for restricted auto-match#1391
Foowy wants to merge 1 commit into
ShokoAnime:masterfrom
Foowy:fix/tmdb-restricted-genre-filter

Conversation

@Foowy

@Foowy Foowy commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • CollectCandidates/CollectMovieCandidates required every TMDB search hit to carry the "animation" genre tag before it was even considered a candidate. TMDB's genre metadata is sparse for R18/adult content, so a correct match was often discarded before scoring ran.
  • Threads the existing includeRestricted/restricted flag into both helpers and skips the genre check only when the anime is restricted — non-restricted search keeps the guard against unrelated live-action hits.

Draft — pending an update to TMDbLib.

Test plan

  • dotnet build Shoko.Server.sln
  • dotnet test Shoko.Tests/Shoko.Tests.csproj --filter "FullyQualifiedName~TmdbSearchServiceTests" (32/32 passing, including 4 new tests for the genre-bypass behavior)

Rebase history

  • 2026-08-23 16:23 UTC — rebased onto upstream/master @ b6fdba59b (1 commits), now at d830597e9
  • 2026-09-05 23:27 UTC — rebased onto upstream/master @ 33d8271e4 (1 commits), now at b026a2b77

@Foowy
Foowy force-pushed the fix/tmdb-restricted-genre-filter branch 3 times, most recently from 8f85c65 to 6843fd4 Compare July 29, 2026 14:53
@Foowy
Foowy force-pushed the fix/tmdb-restricted-genre-filter branch 4 times, most recently from dec0a84 to efcf05a Compare August 10, 2026 00:46
@Foowy
Foowy force-pushed the fix/tmdb-restricted-genre-filter branch from efcf05a to 1467c93 Compare August 13, 2026 17:18
@Foowy
Foowy marked this pull request as draft August 16, 2026 09:17
@Foowy

Foowy commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Placing into draft pending updated TMDBLib

@Foowy
Foowy force-pushed the fix/tmdb-restricted-genre-filter branch 2 times, most recently from 54d6c6d to d830597 Compare August 23, 2026 16:25
@Foowy
Foowy force-pushed the fix/tmdb-restricted-genre-filter branch from d830597 to fe47cf2 Compare August 25, 2026 13:08
…atch

`CollectCandidates`/`CollectMovieCandidates` required every TMDB search hit
to carry the "animation" genre tag before it was even considered a
candidate. TMDB's genre metadata is community-maintained and
disproportionately sparse for R18/adult content, so a correct match was
often discarded before scoring ever ran, making restricted auto-match
appear broken.

Threads the existing `includeRestricted`/`restricted` flag (already
available at every call site) into both helpers and skips the genre
check only when the anime is restricted — non-restricted search keeps
the same guard against unrelated live-action/non-anime hits. The
downstream title/date scoring (`IsAcceptableAutoMatch` rejecting
`FirstAvailable`) still prevents a genuinely unrelated candidate from
being accepted.
@Foowy
Foowy force-pushed the fix/tmdb-restricted-genre-filter branch from fe47cf2 to b026a2b Compare September 5, 2026 23:25
@sonarqubecloud

sonarqubecloud Bot commented Sep 5, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant