Skip to content

fix(scrobble): name an episode's series by a single ID - #9

Merged
Quick104 merged 1 commit into
mainfrom
fix/issue-6-scrobble-series-id
Oct 1, 2026
Merged

Quick104 merged 1 commit into
mainfrom
fix/issue-6-scrobble-series-id

Conversation

@Quick104

@Quick104 Quick104 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Closes #6
Related issue: N/A
Validation tasks: none

Watches that Silo sends to Floppy can land under a different show and episode. In the report, marking Attack on Titan S1E13–24 watched created a single Strong Medicine S5E2 row, and a Gold Rush scrobble created Burke's Law. Silo held the right IDs, and every request reported success.

For an episode, the plugin sends the series' TMDB, TVDB, and IMDb IDs. Floppy's scrobble handler looks the show up by the TVDB ID first, then the IMDb ID, through TMDB's find API, and falls back to the TMDB ID only after those lookups fail. When find returns an episode, Floppy records that episode's show, season, and episode number instead of the ones in the request. TVDB numbers series and episodes separately, so a series ID can equal an unrelated episode's ID. TheTVDB confirms this for all three shows in the report:

Series (TVDB series ID) TVDB episode with the same ID
Attack on Titan (267440) Strong Medicine S5E2
Silo (403245) Life (2007) S2E8 "Black Friday"
Gold Rush (208111) Burke's Law S1E21

Floppy's current latest branch still resolves in this order.

Approach

An episode scrobble now names its series by one ID: TMDB when Silo has it, which Floppy uses as the show directly; otherwise IMDb, where series and episode IDs never collide; otherwise TVDB. Floppy's progress and live-playback lookups already prefer the TMDB ID, so all three now resolve the same show. Movie scrobbles, and episodes that carry only episode-level IDs, are unchanged.

Validation

  • GOWORK=off go test -race ./..., go vet ./..., go build ./..., go run . manifest, gofmt -l ., and golangci-lint run --new-from-rev=origin/main pass.
  • A new test checks the IDs in the scrobble body. On main, an episode whose series has TMDB, TVDB, and IMDb IDs sends all three; with this change it sends only the TMDB ID. It also covers the IMDb and TVDB fallbacks, a movie, and an episode with only episode-level IDs.
  • End to end on a Silo dev sandbox built from main, with stock Floppy 26.8.27 and 26.9.24 containers. Plugin 0.3.0 from the catalog was compared with this branch and fix(history): import episode plays and every entry of a busy day #8, uploaded as a local build.
    • Floppy's own TMDB lookup inside the container maps TVDB 267440 (Attack on Titan) to Strong Medicine S5E2, as in the report.
    • Marking The Queen's Gambit S1E1–3 watched on 0.3.0 recorded one Wipeout S1E9 row. With this branch Floppy recorded The Queen's Gambit S1E1–3.
    • A live playback scrobble of The Queen's Gambit S1E4 on 0.3.0 also recorded Wipeout S1E9. S1E5 on this branch recorded The Queen's Gambit S1E5.
    • The Moon Knight control landed correctly on both.

Evidence: https://evidence.siloserver.org/r/silo-plugin-watchprovider-floppy/issue-6/

Risks

  • Floppy no longer receives Silo's TVDB or IMDb ID for the show. If loading the show from TMDB fails, it has no other ID to retry with and goes straight to its title search, and it can't record a TVDB override when Silo's TVDB ID differs from TMDB's.
  • A series that Silo knows only by its TVDB ID still sends that ID and can still hit a collision.
  • This doesn't repair shows and episodes that earlier syncs created in Floppy under the wrong title.

AI disclosure

  • Harness: Claude Code
  • Tool(s): Claude Code CLI, GitHub CLI
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated; human verification pending
  • Adversarial review: A separate Claude Code review agent (claude-opus-5-5) read the diff against Floppy's scrobble, progress, live-playback, and anime-routing code, and the plugin's completed-watch lookup and empty-ID check. It found no bugs. It noted that Floppy loses the TVDB override and the TVDB or IMDb retry for these scrobbles; that is listed under Risks.

🤖 Generated with Claude Code

Floppy's scrobble endpoint looks a show up by its TVDB ID first, then
IMDb, then TMDB, and takes a TMDB find() episode match as the show and
episode played. TVDB numbers series and episodes separately, so a series
ID can equal an unrelated episode's ID: Attack on Titan's TVDB series ID
267440 is also Strong Medicine S5E2. The plugin sent every series ID, so
marking Attack on Titan episodes recorded Strong Medicine S5E2 instead,
twelve episodes collapsing into one row.

An episode scrobble now names its series by one ID: TMDB, which Floppy
uses as the show directly, or else IMDb, then TVDB. Movies and episodes
that only carry episode-level IDs are unchanged.

Closes #6

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: b37559d2-19d5-4417-b9c2-4570a5240109

📥 Commits

Reviewing files that changed from the base of the PR and between 305ec21 and e5d22e4.

📒 Files selected for processing (2)
  • provider/provider.go
  • provider/scrobble_ids_test.go
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kody-ai

kody-ai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the `@kody start-review` command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Providing Context (Files & MCPs)

Add these hints in your PR description (or a comment) to unlock deeper checks:

  • Ticket / Acceptance Criteria: `Refs: ABC-123` (Linear/Jira/Asana/ClickUp/Trello) or a direct ticket link.
  • Bugfix Validation: a Sentry/Datadog/Bugsnag event link (or paste the stack trace/error message).
  • Endpoint Risk: mention the route (e.g., `POST /api/payments`) or controller/action name.
  • Attach a repo file as context: use an explicit marker like `@file:docs/guide.mdx#L10-L50` (replace with your real path).
  • API Contract Docs: include `@file:openapi.yaml` or `@file:swagger.json` when changing routes/schemas.
  • Definition of Done / Standards: include `@file:DOD.md` or `@file:CONTRIBUTING.md` if your repo has them.
  • Design System Source of Truth: include `@file:ui/index.ts` (replace with your DS entrypoint path).
  • Feature Flags: include the flag key/name and `@file:flags.ts` / `@file:config.json` (and optionally the PostHog flag name).
  • Edge/CDN Rules: link the Cloudflare rule/zone or describe the intended redirect/header behavior.
  • Attach an MCP tool output: use `@mcp<provider|tool>` (replace with an installed MCP provider + tool, e.g., `@mcp<sentry|events.search>`).
Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Access your configuration settings here.

@Quick104
Quick104 marked this pull request as ready for review October 1, 2026 15:34
@Quick104

Quick104 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Quick104
Quick104 merged commit 63bd266 into main Oct 1, 2026
3 checks passed
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.

Outbound sync writes watches under the wrong show

1 participant