Skip to content

spots: the spot's kind as a hint for its release's category - #277

Merged
xbmc4lyfe merged 3 commits into
mainfrom
spot-category-hint
Nov 7, 2026
Merged

xbmc4lyfe merged 3 commits into
mainfrom
spot-category-hint

Conversation

@xbmc4lyfe

Copy link
Copy Markdown
Collaborator

What

Spot releases now use the spot's kind as a category hint. The spotter says whether a post is a movie or a series, but the release name often doesn't. Hard labeur (1985) names no episode, and a Moto3 qualifying session reads like a movie.

New spotnet::category::hint(kind, subcats, name, picked). When the category step's pick isn't under the spot's root (Movies 2000, TV 5000), the spot wins:

  • Root: from the spot's kind.
  • Leaf: from the resolution in the release name (2160p/4k/uhd, 1080p/1080i/720p, 480p/576p/xvid/divx/dvdrip). Without one, from the spot's format (a): UHD, 3D, Blu-ray, the HD formats, DVD, or the SD ones.
    • Movies: 2045 UHD, 2050 3D, 2060 BluRay, 2040 HD, 2070 DVD, 2030 SD.
    • TV: 5045 UHD, 5040 HD (Blu-ray and 3D too), 5030 SD (DVD too).
  • Sport: a series of the Sport genre (d18) is 5060.
  • Nothing to go on: 2999 or 5999 (Other).

A pick already under the right root is kept, so Toy.Story.5.2026.DUTCH... stays Movies/Foreign.

The category step reads the release's spots row in its shard (spot_of) and applies the hint with rule spot_kind.

The spot row is written after the release's save, so the step usually ran before the row existed. Two changes cover that:

  • store::put now queues the release for the category step again (postprocess::rerun_on) whenever it writes a spot row.
  • When the spot task starts, store::recategorize_all queues every existing spot release once per shard, guarded by the shard meta key spot_category_hint.

Why: prod today (read-only)

Of about 410 spot releases:

  • 90 have no category at all: 49 movies and 41 series.
  • About 22 sit under the wrong root. Some examples:
    • a 2160p MCU movie under Audio (3020);
    • a Dutch movie under Other (6090);
    • a TVrip movie under TV/HD;
    • Flemish and Moto3 series under Movies;
    • a series under Misc.

The tests use these real titles and subcategories.

Limits

Tests

  • spotnet::category covers keeping a pick under the right root, root overrides with the prod examples, sport, and each leaf.
  • category::step::tests::reads_a_releases_spot covers reading the spot row.
  • store tests cover the rerun on tagging and the one-time queueing.
  • cargo test --lib passes (1470), and cargo clippy --all-targets -D warnings is clean.

No UI change. Releases just get a category.

🤖 Generated with Claude Code

xbmc4lyfe and others added 2 commits November 7, 2026 14:24
When the category step's pick isn't under the spot's root (movies 2000,
TV 5000), the spot wins: its kind gives the root, the name's resolution
or the spot's format the leaf, and a series of the Sport genre is 5060.
Tagging a release with a spot queues it for the category step again,
and once per shard every release saved from a spot is queued.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@xbmc4lyfe

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T20:33:52.602778Z f938dce Manual request
🔒 Security Review ❌ Failed 2026-11-07T20:32:07.649271Z
We couldn’t complete this review. Comment @codex security review to try again.
f938dce Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: f938dce896

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@xbmc4lyfe

Copy link
Copy Markdown
Collaborator Author

Codex code review is clean on f938dce (the security review couldn't run: usage limit). Since then the branch has only taken a merge of main (#275, which doesn't touch the spot or category code). Merging.

@xbmc4lyfe
xbmc4lyfe marked this pull request as ready for review November 7, 2026 20:36
@xbmc4lyfe
xbmc4lyfe merged commit 21c945b into main Nov 7, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

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