From f5b480e1958e600189b6f52f948201bf92a91669 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Thu, 26 Oct 2023 16:14:36 -0700 Subject: [PATCH] chore: now playing skip conditions --- netlify/edge-functions/now-playing.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/netlify/edge-functions/now-playing.js b/netlify/edge-functions/now-playing.js index 26739bbd..022b0fdf 100644 --- a/netlify/edge-functions/now-playing.js +++ b/netlify/edge-functions/now-playing.js @@ -35,6 +35,15 @@ const aliasArtist = (artist) => { const sanitizeTrack = (track) => { let sanitizedTrack = track + if ( + !track.includes('Deluxe') || + !track.includes('Special') || + !track.includes('Remastered') || + !track.includes('Full Dynamic') || + !track.includes('Expanded') || + !track.includes('Bonus Track') + ) + return sanitizedTrack if (track.includes(' [')) sanitizedTrack = track.split(' [')[0] if (track.includes(' (')) sanitizedTrack = track.split(' (')[0] return sanitizedTrack