Skip to content

feat(torrents): external media ids, custom name and announce url in upload - #52

Merged
florianjs merged 1 commit into
fix/issue-49-announcefrom
feat/issues-42-47
Oct 8, 2026
Merged

florianjs merged 1 commit into
fix/issue-49-announcefrom
feat/issues-42-47

Conversation

@florianjs

Copy link
Copy Markdown
Owner

Stacked on #51. This PR targets fix/issue-49-announce; GitHub will retarget it to main once #51 is merged.

Summary

#47: IMDb / TMDb / TheTVDB IDs

  • Schema: new imdb_id, tmdb_id and tvdb_id columns on torrents, each indexed. They are applied by the usual drizzle-kit push at startup, and 0011_media_ids.sql is provided for reference.

  • Upload and edit: three optional fields. Users can paste either the ID or the page URL:

    • tt0133093 or https://www.imdb.com/title/tt0133093/
    • 603 or https://www.themoviedb.org/movie/603-the-matrix
    • 81189 or https://thetvdb.com/?tab=series&id=81189

    The value is normalized, and an invalid one returns a 400.

  • Torrent page: external IMDb / TMDb / TheTVDB links. The TMDb link uses /tv/ for TV categories (newznab 5xxx).

  • Torznab:

    • t=movie and t=tvsearch filter on imdbid, tmdbid and tvdbid. Season and episode terms still apply to TV searches.
    • Results include the imdbid, tmdbid and tvdbid attributes.
    • Caps advertise tv-search: q,season,ep,tvdbid,imdbid,tmdbid and movie-search: q,imdbid,tmdbid.
    • Before this, tvdbid was ignored and imdbid was only appended to the text query.
  • Out of scope: fetching metadata (poster, overview), which needs a TMDb API key.

#42: Upload modal

  • Announce URL: your personal announce URL, with a copy button. The passkey is fetched from /api/auth/passkey when the modal opens.
  • Display name: an optional field that replaces the name embedded in the .torrent. The name is also editable afterwards in the edit modal.
  • Markdown editor: the toolbar and preview were already there, and BBCode ([FEATURE] Use BBCode instead of MD #46) was declined.

Notes

  • Older torrents have no IDs. Sonarr and Radarr search by ID first, then fall back to a title search, so they can still be found. Uploaders can add the IDs from the edit modal.
  • Who can edit: the uploader, moderators and admins can edit the name and IDs, the same rules as for the description and category.

Test plan

  • npx vitest run: 128 passing, including new parser tests in tests/media-ids.test.ts
  • npm run build
  • Upload a torrent with an IMDb URL, a TMDb ID and a custom name, then check the stored values and the links on the torrent page
  • Edit the name and IDs, and confirm an invalid ID shows an error
  • Prowlarr: test the indexer, then search a movie by IMDb and a show by TVDB + season/episode
  • Copy the announce URL from the upload modal

Closes #47
Closes #42

🤖 Generated with Claude Code

…pload

- store IMDb, TMDb and TheTVDB ids on torrents (paste an id or the page url)
- show external database links on the torrent page
- Torznab: search by imdbid/tmdbid/tvdbid, return them as attrs, advertise in caps
- upload modal shows the personal announce url with a copy button
- optional display name at upload, name and ids editable afterwards

Closes #47
Closes #42

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

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e4ece9eb-0cf2-452a-8512-8aabd1b39ec6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

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