From dd6fdd6788a0da99f8f0a2cba84f763c0aebf24d Mon Sep 17 00:00:00 2001 From: alistairjcbrown <635903+alistairjcbrown@users.noreply.github.com> Date: Mon, 29 Jun 2026 04:31:57 +0000 Subject: [PATCH] Update title normalization test --- cinemas/coldharbourblue.com/transform.js | 3 +- common/known-removable-phrases.js | 4 ++ common/normalize-title.js | 1 + common/tests/test-titles.json | 56 ++++++++++++++++++++---- 4 files changed, 55 insertions(+), 9 deletions(-) diff --git a/cinemas/coldharbourblue.com/transform.js b/cinemas/coldharbourblue.com/transform.js index 2d75b575..6e74b7eb 100644 --- a/cinemas/coldharbourblue.com/transform.js +++ b/cinemas/coldharbourblue.com/transform.js @@ -8,6 +8,7 @@ const { createAccessibility, } = require("../../common/utils"); const { extractJsonLdEvents } = require("../../common/tribe-events/transform"); +const { isNotSportShowing } = require("../../common/is-sport-showing"); const attributes = require("./attributes"); const { decode } = require("html-entities"); @@ -83,7 +84,7 @@ async function transform(retrievedData, sourcedEvents) { const listOfSourcedEvents = Object.values(sourcedEvents).flatMap( (events) => events, ); - return movies.concat(listOfSourcedEvents); + return movies.filter(isNotSportShowing).concat(listOfSourcedEvents); } module.exports = transform; diff --git a/common/known-removable-phrases.js b/common/known-removable-phrases.js index a98c5165..9d63b4b0 100644 --- a/common/known-removable-phrases.js +++ b/common/known-removable-phrases.js @@ -547,6 +547,10 @@ const knownRemovablePhrases = [ "by Renátó Olasz", "by Fassbinder", "by Joe Harvey-Whyte", + "by Mos Hannan and Usayd Younis", + "by Leesa Gazi", + "by Rahemur Rahman and Lily Vetch", + "by Seemab Gul", "C.O.F.F.I.N '", "COLD ISLANDERS:", "Cold War Visions:", diff --git a/common/normalize-title.js b/common/normalize-title.js index f792c86a..a122504a 100644 --- a/common/normalize-title.js +++ b/common/normalize-title.js @@ -846,6 +846,7 @@ function normalizeTitle(title, options) { "What’s Up Daiquiris, bag switcheroos + ", "What's Up Daiquiris, bag switcheroos: ", ], + ["One Day in Whitechapel + ", "One Day in Whitechapel & "], ]; corrections.forEach(([phrase, replacement]) => { diff --git a/common/tests/test-titles.json b/common/tests/test-titles.json index 131888d5..4a98f2a5 100644 --- a/common/tests/test-titles.json +++ b/common/tests/test-titles.json @@ -23391,10 +23391,6 @@ "input": "Jaws 50th Anniversary Re-Release", "output": "jaws" }, - { - "input": "UEFA Women's Euros Final 2025- England vs Spain", - "output": "uefa womens euros final 2025- england vs spain" - }, { "input": "8", "output": "8" @@ -23759,10 +23755,6 @@ "input": "This is Spinal Tap", "output": "this is spinal tap" }, - { - "input": "Womens Euro Finals 2025: England vs Spain", - "output": "womens euro finals 2025 england vs spain" - }, { "input": "Amadeus (4K Restoration)", "output": "amadeus" @@ -78546,5 +78538,53 @@ { "input": "LAFF 2026: Ten Canoes", "output": "ten canoes" + }, + { + "input": "FREE Screening - Lumumba : Death of a Prophet", + "output": "lumumba death of a prophet" + }, + { + "input": "Patrice Lumumba: Still Alive at 101: The Vision, The Legacy", + "output": "patrice lumumba still alive at 101 the vision the legacy" + }, + { + "input": "Fundraising event for Harold Hill Deer Aid Wildlife Rescue", + "output": "fundraising event for harold hill deer aid wildlife rescue" + }, + { + "input": "Film Screening Satyajit Ray Short Films- Competition Part 2 London Indian F", + "output": "satyajit ray short films- competition 2 london indian f" + }, + { + "input": "BAR TRASH presents Dawson City: Frozen Time", + "output": "dawson city frozen time" + }, + { + "input": "BAR TRASH presents Rollercoaster", + "output": "rollercoaster" + }, + { + "input": "BAR TRASH presents The Robe", + "output": "the robe" + }, + { + "input": "FILM: After Eight: The Story of Satpal Ram by Mos Hannan and Usayd Younis", + "output": "after eight the story of satpal ram" + }, + { + "input": "FILM: Barir Naam Shahana (A House Named Shahana) by Leesa Gazi", + "output": "barir naam shahana" + }, + { + "input": "FILM: Body of Our Own by Rahemur Rahman and Lily Vetch", + "output": "body of our own" + }, + { + "input": "FILM: July Women + Panel Discussion", + "output": "july women" + }, + { + "input": "FILM: One Day in Whitechapel + Sandstorm by Seemab Gul", + "output": "one day in whitechapel sandstorm" } ]