Skip to content

Commit

Permalink
Fix mismatches
Browse files Browse the repository at this point in the history
  • Loading branch information
alistairjcbrown committed Jan 15, 2025
1 parent bd70f1c commit aac79c6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
6 changes: 6 additions & 0 deletions common/cineworld.co.uk/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ async function transform(venue, data, sourcedEvents) {
overview.certificate = certificate;
}

// Ignore placeholders for private screenings
if (film.name.toUpperCase() === "THEATRE LET") return;

movies[film.id] = {
title: film.name,
url: film.link,
Expand All @@ -56,6 +59,9 @@ async function transform(venue, data, sourcedEvents) {
events.forEach((event) => {
const movie = movies[event.filmId];

// If the movie isn't available, then we've omitted it previously
if (!movie) return;

let notes = "";
if (event.soldOut) notes += "\nSold out";
event.attributeIds.forEach((attributeId) => {
Expand Down
8 changes: 4 additions & 4 deletions common/get-movie-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const matchesExpectedCastCrew = async (match, show) => {
normalizeName(name.split(" ").reverse().join(" ")),
]);

// If there's no crew information to check against, let's assume it's a match
if (crew.length === 0) return true;
// If there's no crew information to check against, don't match
if (crew.length === 0) return false;

const directors = show.overview.directors.map((name) => normalizeName(name));
// Don't bother checking the Opera listings, they're usualy wrong
Expand All @@ -46,8 +46,8 @@ const matchesExpectedCastCrew = async (match, show) => {
normalizeName(name.split(" ").reverse().join(" ")),
]);

// If there's no cast information to check against, let's assume it's a match
if (cast.length === 0) return true;
// If there's no cast information to check against, don't match
if (cast.length === 0) return false;

const actors = show.overview.actors.map((name) => normalizeName(name));
const actorMatches = cast.filter((member) =>
Expand Down
4 changes: 3 additions & 1 deletion common/known-removable-phrases.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"Staff Selects Halloween Special:",
"Carers & Babies:",
"Carers & Babies Club:",
": Parents & Baby Screening",
"DOC'N ROLL:",
"Doc'N Roll FF 24:",
"Doc'n Roll Film Festival Presents:",
Expand Down Expand Up @@ -137,7 +138,7 @@
"Unlimited Screening",
"(IMAX) ",
"(4DX) ",
"lotr: ",
"LOTR:",
"EOS: ",
"Exhibition On Screen: ",
"Paris, 1874",
Expand All @@ -154,5 +155,6 @@
"David Tennant & Cush Jumbo",
"Making theatre amid Lebanon's collapse",
"Tezuka’s",
"Praavinkoodu ",
" and "
]
1 change: 1 addition & 0 deletions common/normalize-title.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function normalizeTitle(title, options) {
"carers & babies club:",
"Valentine’s Day Preview:",
"Sky Original -",
"- Part ",
];

removablePrefixes.forEach((phrase) => {
Expand Down

0 comments on commit aac79c6

Please sign in to comment.