Skip to content

feat(metadata): send movies' earliest digital and physical release dates - #35

Merged
Quick104 merged 3 commits into
Silo-Server:mainfrom
Rhainland:feat/digital-release-date
Nov 2, 2026
Merged

Quick104 merged 3 commits into
Silo-Server:mainfrom
Rhainland:feat/digital-release-date

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: Silo-Server/silo-apple#944

Silo's calendar lists each movie on its primary release date, which is usually the theatrical one. A theatrical release can't reach a media server, so users see movies on days when nothing becomes available to them. Silo is moving the calendar to a movie's first home release, digital or disc. To do that it needs those dates from this plugin.

Approach

The plugin already asks TMDB for release_dates with every movie, but it only used them to pick the content rating. Now it also picks the earliest digital release (TMDB type 4) and the earliest physical release (type 5) in any country. It sends them as digital_release_date and physical_release_date (YYYY-MM-DD) in the movie's metadata Struct, the same way it already sends keywords. No SDK or protocol change is needed. Hosts that don't read the keys ignore them.

TMDB reports each release as a midnight-UTC timestamp, so the date part is the release day. Entries with a date that doesn't parse are skipped.

The server side is Silo-Server/silo-server#3240.

Validation

  • go test ./... and go vet ./... pass.
  • The GetMetadata wire test now feeds release dates from several countries and types, including an unparseable one, and checks that both keys carry the earliest date of their type.

Risks

None identified. The plugin requests nothing new from TMDB, and the new keys are additive. A host needs the matching silo-server change before the calendar uses them.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.

AI Disclosure

  • Harness: Claude Code (in T3 Code)
  • Tool(s): Claude Code; Codex CLI for an independent review
  • Model(s): claude-opus-5-5; gpt-6.1-sol (review)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: two independent reviews of this change together with the silo-server change, by claude-opus-5-5 and gpt-6.1-sol, each covering correctness, standards and spec. They found no issues in this plugin's diff.

Note

Add earliest digital and physical movie release dates to MetadataResult

  • Adds digital and physical release-date string fields to MetadataResult in types.go, using TMDB release types in YYYY-MM-DD format
  • New earliestRelease helper in provider.go scans release dates across all countries, skips entries with the wrong type or unparseable dates, and returns the earliest valid date (empty string if none)
  • The metadata converter in main.go includes both fields in the output when nonempty; tests in main_test.go cover multi-country fixtures with theatrical and invalid dates
  • Behavioral Change: metadata API responses now include two new keys when the dates exist

Macroscope summarized badf695.

Silo lists a movie on its calendar on the earlier of its primary and digital
release dates. TMDB already returns per-country release dates with the movie;
pick the earliest digital one (release type 4) in any country and send it as
the digital_release_date metadata key. Hosts that do not read the key ignore it.
Silo's calendar lists a movie on its first home release, digital or disc.
Send the earliest physical release (TMDB type 5) in any country as the
physical_release_date metadata key, beside digital_release_date.
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Walkthrough

The provider now extracts the earliest valid digital and physical movie release dates across countries. Metadata output includes these fields only when dates are available.

Changes: Movie Release Dates

Layer / File(s) Summary
Release date extraction
metadata/types.go, provider/provider.go
MetadataResult adds digital and physical release date fields. The provider selects the earliest valid date for TMDB release types 4 and 5.
Metadata output and validation
main.go, main_test.go
The metadata map includes each date only when non-empty. The test fixture and expectations cover dates across countries, including an invalid digital date.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant TMDBReleaseDates
  participant Provider
  participant MetadataResult
  participant MetadataOutput
  TMDBReleaseDates->>Provider: Release entries by country
  Provider->>MetadataResult: Earliest valid digital and physical dates
  MetadataResult->>MetadataOutput: Non-empty date fields
Loading

Suggested labels: impact: usability

Suggested reviewers: quick104

Merge Risk: Minimal · up to badf6

The new release-date metadata is ready to merge; no actionable correctness or availability risk remains.

Security architecture risk: Low · up to badf6

The change adds date metadata without a demonstrated increase in permissions or attacker reachability. Compatibility with the separately updated calendar remains unverified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — Within the inspected plugin path, malicious upstream release-date records could influence two date strings for the requested movie. The added processing does not grant those records control over credentials, tenant ownership, permissions, or additional remote requests. Downstream calendar effects remain outside the inspected source.

Trust Boundaries and Controls

  • observed — External release-date data crosses into the host response through type filtering and date-prefix parsing. Too-short strings and invalid date prefixes are skipped. Trailing timestamp text is not validated, so this control establishes a parseable date prefix rather than a valid complete timestamp.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-triage silo-triage Bot added the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Oct 29, 2026
@silo-kody

silo-kody Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Claude Code (claude-opus-5-5)

The change does what it says: the test fails on main and passes here. I found one gap in the test, noted inline. The summary comment covers everything else.

Comment thread main_test.go Resolved
The fixture's "not a date" sorted after every real date, so the test
passed even with the parse guard in earliestRelease removed. A month-13
date sorts before the expected digital date and fails without the guard.

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

silo-kody Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@Quick104

Quick104 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🤖 Claude Code (claude-opus-5-5)

Review summary

Reviewed head: badf695 (the author's 013de5b plus one test commit from this review).

Fit: 8/10 · Readiness: 9/10 — conditional (assuming CI is green)

Addressed

  • Test gap (low): the unparseable fixture entry sorted after every real date, so the test passed even without the parse guard. Fixed in badf695 with a month-13 date that sorts first. The test now fails when the guard is removed.

What I checked

  • TestMetadataServerGetMetadata_IncludesReleaseDate fails on main with metadata digital_release_date = "", want 2024-02-26 and passes on this branch. go test ./... and go vet ./... pass.
  • Both keys and their YYYY-MM-DD format match what feat(calendar): list movies on their first digital or disc release silo-server#3240 reads. Movie metadata is built in one place (getMovieMetadata), TMDB already returns release_dates with every movie request, and nothing caches results. The change adds no TMDB requests and needs no SDK, manifest, or catalog change.
  • TMDB data, read from the live API for 18 movies (2,338 release entries): every timestamp is midnight UTC, so taking the date part is safe. For recent wide releases, the earliest digital or disc date in any country was the same as the US date or a day earlier. Older films pick their original VHS or DVD dates, not a recent 4K reissue.
  • An independent review by a second model (gpt-6.1-sol) found no defects beyond the test gap above.

Left for the maintainers

  • Earliest in any country. A festival's virtual screening tagged as a digital release can pull a date forward. For CODA it moves the date from 2021-08-12 (Apple TV+) to 2021-08-05 (a virtual festival screening). Filtering by region or by the theatrical date would also drop valid releases, and the library language doesn't say which country a user is in. I'd keep the rule as it is. It matches what silo-server#3240 and the docs issue describe.
  • Clearing a wrong date. The plugin omits a key when TMDB lists no date, and silo-server#3240 keeps a stored date when the key is absent. As a result, a date that TMDB later deletes never clears. Fixing that needs an explicit "no date" signal on both sides, which belongs with the server PR, not this one.

Validated features

No passed validation case changes with this PR alone: hosts that don't read the new keys ignore them. The calendar cases change once silo-server#3240 merges, and that PR already lists them. Validation tasks: none.

User manual

Silo-Server/siloserver.org#314 and its draft docs PR Silo-Server/siloserver.org#317 already cover the calendar change and mention this PR. This PR on its own changes nothing users can see.

Apple and Android

Not applicable to a metadata plugin. The app follow-ups for the new badges are tracked from silo-server#3240.

Scores

  • Fit 8: closes a requested gap (Digital Movie Releases Missing from Calendar silo-apple#944) with two additive keys, no new setting, and no extra TMDB request. It adds new contract surface that matters only alongside silo-server#3240, so its value depends on that PR landing.
  • Readiness 9: the behavior is covered by a test that fails on main, and nothing substantive remains.

@coderabbitai coderabbitai Bot added the impact: usability Core flow broken or severely blocked label Nov 2, 2026
@Quick104
Quick104 merged commit 52d0744 into Silo-Server:main Nov 2, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update go code impact: usability Core flow broken or severely blocked priority: P2 Limited scope, workaround exists, or polish size/M 50–199 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants