guessit-js 4.7.0 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,6 +6,7 @@ Extract metadata (title, year, season, episode, codec, language, etc.) from medi
6
6
  [![Tests](https://github.com/opensubtitles/guessit-js/actions/workflows/ci.yml/badge.svg)](https://github.com/opensubtitles/guessit-js/actions/workflows/ci.yml)
7
7
  [![License: LGPL-3.0](https://img.shields.io/badge/License-LGPL--3.0-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)
8
8
  [![Python guessit compat](https://img.shields.io/badge/guessit_compat-100%25_(1342%2F1342)-brightgreen)](https://github.com/guessit-io/guessit)
9
+ [![Coverage](https://img.shields.io/badge/coverage-97%25-brightgreen)](https://github.com/opensubtitles/guessit-js/actions/workflows/ci.yml)
9
10
 
10
11
  **[Live Demo](https://opensubtitles.github.io/guessit-js)** · **[API Docs](https://opensubtitles.github.io/guessit-js/docs)** · **[npm](https://www.npmjs.com/package/guessit-js)**
11
12
 
@@ -143,7 +144,25 @@ Regenerate the schema (after parsing changes) with `npm run schema`. A test (`te
143
144
 
144
145
  ## REST API
145
146
 
146
- No install needed beyond the package itself:
147
+ **Hosted demo (testing only):**
148
+
149
+ ```bash
150
+ curl "https://guessit.opensubtitles.com/api/guessit?filename=Movie.2024.1080p.mkv"
151
+ curl -X POST https://guessit.opensubtitles.com/api/guessit \
152
+ -H 'Content-Type: application/json' \
153
+ -d '{"filenames": ["A.2020.mkv", "B.S01E02.mkv"]}'
154
+ ```
155
+
156
+ > ⚠️ **For testing and evaluation only — never use in production.** It runs on
157
+ > a free Cloudflare Workers tier with a hard daily request cap and no uptime
158
+ > guarantee; it can be throttled, rate-limited, or removed at any time. For
159
+ > production, self-host (`npx guessit-js --serve`, one command) or better,
160
+ > call the library in-process (~1.5 ms per parse, no HTTP at all).
161
+
162
+ Runs on Cloudflare Workers at the edge, CORS enabled, batch up to 500
163
+ filenames per POST, redeployed automatically with every release.
164
+
165
+ **Self-hosted** — no install needed beyond the package itself:
147
166
 
148
167
  ```bash
149
168
  npx guessit-js --serve # port 3847 (or --serve 8080 / PORT env)
@@ -175,17 +194,27 @@ guessit-js is a faithful port (1342/1342 fixtures, tracking Python 4.4.0), but i
175
194
  **not bug-for-bug identical** — where Python has a genuine parsing bug, guessit-js
176
195
  is corrected. Highlights:
177
196
 
178
- - **32 upstream guessit bugs fixed** that Python still gets wrong — e.g. `Us.2019`
179
- (title vs country `US`), `The.Collector` (title vs edition), `X2.2003…` (short
180
- title), `grown-ish…[eztv]` (hyphenated title split), `cd`-matching mid-hash, and
181
- source/codec/extension tokens leaking into `release_group`/`title`. Full ledger:
197
+ - **Cases the released Python 4.4.0 still gets wrong** (each verified against the
198
+ real Python CLI; the [demo](https://opensubtitles.github.io/guessit-js) shows
199
+ live side-by-sides): `X2.2003…` (Python: `bonus: 2`, no title), Python's
200
+ still-open [#875](https://github.com/guessit-io/guessit/issues/875) and
201
+ [#877](https://github.com/guessit-io/guessit/issues/877) (`Season 3 - 11`,
202
+ anchored weak episodes, `0x539` ids), Python's dead
203
+ `RemoveLessSpecificSeasonEpisode("episode")` pass
204
+ ([#961](https://github.com/guessit-io/guessit/issues/961), our fix submitted as
205
+ [#962](https://github.com/guessit-io/guessit/pull/962)), and **112 of the 276
206
+ cross-parser cases Python's own test data admits failing** — fullwidth CJK
207
+ bracket groups, UFC event numbers, anime compound dash titles, fully-bracketed
208
+ titles, and more.
209
+ - **32 historical upstream bugs** were fixed here ahead of upstream during the
210
+ 4.x catch-up (many since adopted by Python 4.4 — e.g. `Us.2019`,
211
+ `The.Collector`, `grown-ish`, `imdb_id`/`tmdb_id`, `volume`, artwork and
212
+ month-date detection are now correct in both). Full ledger with dispositions:
182
213
  [`docs/upstream-issues.md`](docs/upstream-issues.md).
183
- - **More properties / better detection:** `imdb_id`/`tmdb_id`/`tvdb_id`, `volume`,
184
- archive & image **containers** (`.rar`/`.7z`/`.jpg`…), artwork classification
185
- (`poster`/`fanart` → `other`), VR / Opening-Ending credits, month-name dates,
186
- CJK season/episode markers, and detection of Telugu/Spanish that Python misses.
187
- - **Typed, schema-described output:** a precise `GuessItResult` interface, a
188
- complete `properties()` (Python's is partial), and a JSON Schema.
214
+ - **Typed, schema-described output:** a precise `GuessItResult` interface with
215
+ enum'd value fields, `properties()` mirroring Python's API, and a JSON Schema
216
+ (draft-07) of the output — none of which Python provides as machine-readable
217
+ artifacts.
189
218
  - **No Python runtime:** zero runtime dependencies, ESM + CJS + WASM, ~3.5x faster.
190
219
  - **Intentional divergences** (cases where guessit-js is *more* correct than
191
220
  Python) are catalogued per-example in [`docs/python-parity.md`](docs/python-parity.md).