Skip to content

Commit e7a28c1

Browse files
Toilalclaude
andcommitted
feat(type): type a yearless complete run as an episode
`other: Complete` is emitted for two unrelated things — a complete run of a series and a complete disc of a film — and auto-detection read neither, so every complete series pack came back as `type: movie`. The signal that separates them is already in the guess: a film carries its own release year, a run spanning several of them carries none. A yearless `Complete` now weighs towards `episode`, in the same shape as the existing `date and not year` / `bonus and not year` branches. On the sample of #953 that takes 6/16 to 16/16. `MINISERIES` was also left in the title next to the marker (`Chernobyl COMPLETE MINISERIES`) where `SERIES` was consumed, giving consumers a phantom second key for the same show; it joins the configured season words. Neither half of the year signal is a proof, and the trade-off is deliberate: a film whose filename omits its year, and a box set of films, are now typed `episode`. Both are pinned in the corpus and recorded in the known-limitations page. closes #953 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent dcd7cf0 commit e7a28c1

6 files changed

Lines changed: 103 additions & 15 deletions

File tree

docs/known-limitations.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,24 @@ downstream lookup against a real title database.
313313
The show *19-2* produces `19-2.2014`, which is a valid `DD-M.YYYY` date. A title that is itself a
314314
date-like number is structurally indistinguishable from an actual date; date detection wins.
315315

316+
## A yearless `COMPLETE` film typed as a series
317+
318+
```text
319+
The.Matrix.COMPLETE.BLURAY-GRP
320+
type: episode (#953)
321+
wanted -> type: movie
322+
323+
Lord.of.the.Rings.Trilogy.COMPLETE.BLURAY-GRP
324+
type: episode (#953)
325+
wanted -> type: movie
326+
```
327+
328+
`other: Complete` marks two unrelated things: a complete **run** of a series, and a complete
329+
**disc** of a film. The only local signal separating them is the year — a run spanning several
330+
years carries none, a film carries its own — so a yearless `COMPLETE` is read as a series. A film
331+
whose filename omits its release year, and a box set of films, therefore fall on the wrong side.
332+
Adding the year (`The.Matrix.1999.COMPLETE.BLURAY-GRP`) or `type=movie` settles it.
333+
316334
## How these could be revisited
317335

318336
Most of the cases above share one root: they need to know whether an ambiguous token is *content*

guessit/config/options.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@
597597
"Proof": {"string": "Proof", "tags": ["at-end", "not-a-release-group"]},
598598
"Obfuscated": {"string": ["Obfuscated", "Scrambled"], "tags": ["at-end", "not-a-release-group"]},
599599
"Repost": {"string": ["xpost", "postbot", "asrequested"], "tags": "not-a-release-group"},
600-
"_complete_words": {"callable": "import:guessit.rules.properties.other:complete_words", "complete_marker_words": ["Complete", "Int[ée]grale"], "season_words": ["seasons?", "series?"], "complete_article_words": ["The"], "complete_prefix_words": ["L['’]?", "Coffret"], "season_number_separators": ["&", "and"]}
600+
"_complete_words": {"callable": "import:guessit.rules.properties.other:complete_words", "complete_marker_words": ["Complete", "Int[ée]grale"], "season_words": ["seasons?", "mini-?series?", "series?"], "complete_article_words": ["The"], "complete_prefix_words": ["L['’]?", "Coffret"], "season_number_separators": ["&", "and"]}
601601
},
602602
"art": {
603603
"poster": "Poster",

guessit/rules/properties/type.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ def when(self, matches: Matches, context: dict[str, Any] | None) -> Any:
7979
if bonus and not year:
8080
return "episode"
8181

82+
# A complete run of a series spans several years and so carries none of its own, whereas a
83+
# film on a complete disc carries its release year. The year is the only signal that tells
84+
# the two apart, and neither half is a proof: a film whose name omits its year, or a box
85+
# set of films, still lands on the episode side (#953).
86+
complete = matches.named("other", lambda match: match.value == "Complete")
87+
if complete and not year:
88+
return "episode"
89+
8290
crc32 = matches.named("crc32")
8391
anime_release_group = matches.named("release_group", lambda match: "anime" in match.tags)
8492
if crc32 and anime_release_group:

guessit/test/cross_parser/baseline.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,6 @@
299299
"thomas.and.friends.s19e09_s20e14.convert.hdtv.x264-w4f[eztv].mkv": [
300300
"season",
301301
"episode"
302-
],
303-
"2012 2009 x264 720p Esub BluRay 6.0 Dual Audio English Hindi GOPISAHI": [
304-
"title",
305-
"year",
306-
"video_codec"
307302
]
308303
},
309304
"ptn": {
@@ -430,6 +425,12 @@
430425
"[Anime Time] Naruto - 116 - 360 Degrees of Vision The Byakugan's Blind Spot.mkv": [
431426
"episode"
432427
],
428+
"[JySzE] Naruto [v2] [R2J] [VFR] [Dual Audio] [Complete] [Extras] [x264]": [
429+
"type"
430+
],
431+
"[JySzE] Naruto [v3] [R2J] [VFR] [Dual Audio] [Complete] [Extras] [x264]": [
432+
"type"
433+
],
433434
"Naruto Collection [DB 1080p][ Dual Audio ][ English & Arabic Sub ]": [
434435
"title"
435436
],
@@ -468,6 +469,9 @@
468469
"xXx.2002.15th.Anniversary.Edition.1080p.BluRay.Remux.AVC.DTS-HD.MA.5.1-FraMeSToR": [
469470
"title"
470471
],
472+
"Dragon Ball Z (Complete Series) [1080p] [MP4] [English Audio]": [
473+
"type"
474+
],
471475
"[GM-Team][国漫][太乙仙魔录 灵飞纪 第3季][Magical Legend of Rise to immortality Ⅲ][01-26][AVC][GB][1080P]": [
472476
"title"
473477
],

guessit/test/episodes.yml

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,13 +2021,46 @@
20212021
type: episode
20222022
video_codec: H.264
20232023

2024+
? Breaking.Bad.COMPLETE.1080p.BluRay.x264-GRP
2025+
: title: Breaking Bad
2026+
other: Complete
2027+
screen_size: 1080p
2028+
source: Blu-ray
2029+
video_codec: H.264
2030+
release_group: GRP
2031+
type: episode
2032+
2033+
? The.Wire.COMPLETE.SERIES.720p.BluRay-GRP
2034+
: title: The Wire
2035+
other: Complete
2036+
screen_size: 720p
2037+
source: Blu-ray
2038+
release_group: GRP
2039+
type: episode
2040+
2041+
? Chernobyl.COMPLETE.MINISERIES.1080p.WEB-GRP
2042+
: title: Chernobyl
2043+
other: Complete
2044+
screen_size: 1080p
2045+
source: Web
2046+
release_group: GRP
2047+
type: episode
2048+
2049+
? Kampen Om Tungtvannet aka The Heavy Water War COMPLETE 720p x265 HEVC-Lund
2050+
: title: Kampen Om Tungtvannet aka The Heavy Water War
2051+
other: Complete
2052+
screen_size: 720p
2053+
video_codec: H.265
2054+
release_group: Lund
2055+
type: episode
2056+
20242057
? How.I.Met.Your.Mother.COMPLETE.SERIES.DVDRip.XviD-AR
20252058
: options: -L en -C us
20262059
source: DVD
20272060
other: [Complete, Rip]
20282061
release_group: AR
20292062
title: How I Met Your Mother
2030-
type: movie # Should be episode
2063+
type: episode
20312064
video_codec: Xvid
20322065

20332066
? Friends.INTEGRALE.MULTi.1080p.BluRay-GRP
@@ -2038,7 +2071,7 @@
20382071
screen_size: 1080p
20392072
source: Blu-ray
20402073
release_group: GRP
2041-
type: movie # Should be episode, see #953
2074+
type: episode
20422075

20432076
? Malcolm.LIntegrale.FRENCH.DVDRip-GRP
20442077
? Malcolm.L'Integrale.FRENCH.DVDRip-GRP
@@ -2047,15 +2080,15 @@
20472080
language: French
20482081
source: DVD
20492082
release_group: GRP
2050-
type: movie # Should be episode, see #953
2083+
type: episode
20512084

20522085
? Engrenages.Coffret.Integrale.FRENCH.1080p-GRP
20532086
: title: Engrenages
20542087
other: Complete
20552088
language: French
20562089
screen_size: 1080p
20572090
release_group: GRP
2058-
type: movie # Should be episode, see #953
2091+
type: episode
20592092

20602093
? Breaking.Bad.INTEGRALE.Saison.1.FRENCH.1080p-GRP
20612094
: title: Breaking Bad

guessit/test/movies.yml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,14 +1116,39 @@
11161116
video_codec: H.264
11171117
type: movie
11181118

1119-
? Kampen Om Tungtvannet aka The Heavy Water War COMPLETE 720p x265 HEVC-Lund
1120-
: title: Kampen Om Tungtvannet aka The Heavy Water War
1119+
? The.Matrix.1999.COMPLETE.BLURAY-GRP
1120+
: title: The Matrix
1121+
year: 1999
11211122
other: Complete
1122-
screen_size: 720p
1123-
video_codec: H.265
1124-
release_group: Lund
1123+
source: Blu-ray
1124+
release_group: GRP
1125+
type: movie
1126+
1127+
? Heat.1995.COMPLETE.BLURAY.REMUX-GRP
1128+
: title: Heat
1129+
year: 1995
1130+
other: [Complete, Remux]
1131+
source: Blu-ray
1132+
release_group: GRP
11251133
type: movie
11261134

1135+
# The year is the only thing separating a film on a complete disc from a complete run of a
1136+
# series. A film that does not carry its own year, and a box set of films, both fall on the
1137+
# wrong side of that line.
1138+
? The.Matrix.COMPLETE.BLURAY-GRP
1139+
: title: The Matrix
1140+
other: Complete
1141+
source: Blu-ray
1142+
release_group: GRP
1143+
type: episode # Should be movie, no year to tell it from a complete run
1144+
1145+
? Lord.of.the.Rings.Trilogy.COMPLETE.BLURAY-GRP
1146+
: title: Lord of the Rings Trilogy
1147+
other: Complete
1148+
source: Blu-ray
1149+
release_group: GRP
1150+
type: episode # Should be movie, no year to tell it from a complete run
1151+
11271152
? All.Fall.Down.x264.PROOFFIX-OUTLAWS
11281153
: title: All Fall Down
11291154
video_codec: H.264

0 commit comments

Comments
 (0)