Media recognition 1.0 preview
pt-tools parses torrent titles and finds the matching movie or TV show on TMDB. Media library organising names files from the results, and subscriptions will use them later; in Media → Media recognition (媒体 → 媒体识别) you can preview and correct them, and keep recognition words.
Movie and TV data comes from TMDB. This product uses the TMDB API but is not endorsed or certified by TMDB.
Enter a TMDB API key
- Sign in to TMDB and request a key on the API page of your account settings (free for personal use). Both a v3 API key and a v4 API read access token work.
- Enter the key in TMDB settings (TMDB 设置), choose a language, save, and click Test connection (测试连接).
Without an API key, the explore, subscriptions and media library pages show a notice at the top with a link to this page.
| Setting | Meaning |
|---|---|
| API key | Stored encrypted; the page only shows whether one is set. Enter a new one to replace it, or click Clear (清除) |
| Language | Simplified Chinese (default), Traditional Chinese, English or Japanese; English overviews fill in missing ones |
| Proxy address (optional) | Proxy for TMDB requests: http, https or socks5. Left empty, the proxy from the environment is used, as for sites |
| TMDB API address (optional) | Replaces the official https://api.themoviedb.org/3, for example with api.tmdb.org or your own relay; a bare domain gets https:// and /3 added |
| TMDB image address (optional) | Replaces the official https://image.tmdb.org/t/p/, for example with an image mirror; a bare domain gets https:// and /t/p/ added |
The proxy address may include a user name and password. The whole address is stored encrypted, and the page shows the password as ***. TMDB usually needs a proxy from mainland China; when the official addresses are unreachable or slow you can also replace the API and image addresses, with or without the proxy.
Images downloaded for scraping, the poster links in organizing and subscription notifications, and the posters shown in the web UI and the mobile app all use the image address. pt-tools fetches scraping images and the app's posters itself, through the proxy above; the browser loads the web UI's posters straight from the image address, and the device that receives a notification opens its poster. If you point the image address at a relay on your LAN, make sure the browser and those devices can reach it too. When you open the web UI over https, the image address must use https as well: browsers don't load http images on an https page (the settings page warns about this).
Recognition preview
In Recognition preview (识别预览), enter a title (the subtitle and IMDb ID are optional) and click Recognize (识别).
The result lists the Chinese and English names, year, type, season and episode, resolution, source, codec, HDR, audio, release group, and flags such as Chinese subtitles, Mandarin or Cantonese. Chinese names and markers such as 第 1-10 集 or 全 30 集 in the subtitle are read too.
pt-tools looks for the TMDB entry in this order:
- A corrected name uses the entry it was corrected to.
- With an IMDb ID, it looks the ID up.
- It searches by the Chinese and the English name and accepts a result only when the name matches and the year fits (later seasons of a show may be later than its first air year). When the name matches only partly, sequel numbers must agree (Inside Out is not taken for Inside Out 2) and the result must clearly beat the next candidate. A title with a year but no season or episode marker is searched as a movie first, then as a show when no movie matches. When the torrent uses an English or romanised name (Your Name, Sousou no Frieren) that the Chinese search results do not show, the English titles and aliases of the top candidates on TMDB are compared too; a candidate is accepted only when the name is the same and the year fits.
When nothing is accepted, the page lists candidates. Click Pick this (选这个), or correct it by TMDB ID. The ID is in the TMDB page address, such as 278 in themoviedb.org/movie/278.
Search results are cached for a day and entry details for a week. Without an API key, only the title is parsed.
Corrections
A correction applies to the parsed name (plus the year for movies, not for shows): other titles with the same name, such as a different resolution or release group, are recognized as the corrected entry. It is keyed by the English name when there is one, with the Chinese name as an alias, so it applies whether or not the subtitle has the Chinese name. Delete it under Corrections (手动纠正) to search by name again.
Recognition words
Recognition words are applied in order before a title is parsed, to handle the naming habits of a site or release group.
| Kind | Effect |
|---|---|
| Block | Removes the matching text from the title and subtitle, such as [禁转] |
| Replace | Replaces it with other text, such as the short form TSR with The.Shawshank.Redemption |
| Episode offset | When the title or subtitle matches, adds the offset (may be negative) to the episode numbers. Use -12 when season 2 starts at episode 13 |
Plain text matches ignore case; with regex matching (按正则匹配) the pattern uses Go (RE2) syntax.
IMDb and Douban IDs
pt-tools records the IMDb and Douban IDs a site provides: from the M-Team API, and from the IMDb and Douban links on NexusPHP detail pages. RSS downloads and brush pushes store them with the torrent: library organising looks the ID up first, and subscriptions will use it later. An IMDb ID entered in the recognition preview is also looked up first.
Douban IDs are used for Douban wishlist (想看) subscriptions, and, when a library's plot and rating come from Douban, scraping uses them to fetch Douban's plot and rating (see scraping).