diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-08-29 15:12:32 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-08-29 15:12:32 +0200 |
| commit | 5a88f8d7a0a35b0c75b0a56d0f6fce1d0a495c12 (patch) | |
| tree | cbc0a8207885476cd0d331db399536c259ca4f80 /packages/meshbay-node/src/meshbay_node/indexer/title_parse.py | |
| parent | be57cf9c3b499c8e59a94d13059f16f1456fcae1 (diff) | |
| parent | 71b7a310ce938f072fe20f27eeeadd40685f1ad1 (diff) | |
| download | meshbay-5a88f8d7a0a35b0c75b0a56d0f6fce1d0a495c12.tar.gz | |
Merge branch 'fix/videos-tmdb-matching'
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/indexer/title_parse.py')
| -rw-r--r-- | packages/meshbay-node/src/meshbay_node/indexer/title_parse.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/indexer/title_parse.py b/packages/meshbay-node/src/meshbay_node/indexer/title_parse.py index 24b423e..24c23bc 100644 --- a/packages/meshbay-node/src/meshbay_node/indexer/title_parse.py +++ b/packages/meshbay-node/src/meshbay_node/indexer/title_parse.py @@ -146,6 +146,16 @@ def parse_movie_filename(filename: str) -> ParsedName: title = str(title).strip() if title else None if title: title = _strip_editions(title) + # guessit peels a "Volume 2"/"Part 2" token off the title into its + # own field, so both parts of a two-part film parse to the same bare + # title. That collapsed the two on one TMDB search (the more popular + # first part won for both), and — since "Fix match" groups every + # entry sharing a display_title — left no way to correct one without + # the other. Fold the number back on so the two stay distinct in the + # query, the card and the override. + part = g.get("part") or g.get("volume") + if isinstance(part, int) and not isinstance(part, bool): + title = f"{title} {part}" alt = g.get("alternative_title") alt = _strip_editions(str(alt).strip()) if alt else None year = g.get("year") |