Skip to content

Commit 2f02ace

Browse files
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 36c3d09 commit 2f02ace

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

src/plugins/skip-live-songs/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { t } from '@/i18n';
22
import { createPlugin } from '@/utils';
33

44
import type { SongInfo } from '@/providers/song-info';
5+
56
import { nonStudioPatterns } from './patterns';
67
import type { SongInfo } from '@/providers/song-info';
78

src/plugins/skip-live-songs/patterns.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,12 @@ export const nonStudioPatterns = [
1111
/live\s+(at|from|in|on|with|@)/i, // "Live at", "Live from", "Live in", etc.
1212
/live\s+with\b/i, // "Live with" (e.g. "Live with the SFSO")
1313
/-\s*live\s*$/i, // "- Live" at the end of title
14-
/:\s*live\s*$/i, // ": Live" at the end of title
15-
14+
/:\s*live\s*$/i, // ": Live" at the end of title
1615
// Concert/Performance indicators
17-
/\b(concert|festival|tour)\b/i, // Concert, Festival, Tour
16+
/\b(concert|festival|tour)\b/i, // Concert, Festival, Tour
1817
/\(.*?(concert|live performance|live recording).*?(19|20)\d{2}\)/i, // (Live 1985), (Concert 2024)
19-
2018
// Recording types
21-
/\b(acoustic|unplugged|rehearsal|demo)\b/i, // Acoustic, Unplugged, Rehearsal, Demo
22-
19+
/\b(acoustic|unplugged|rehearsal|demo)\b/i, // Acoustic, Unplugged, Rehearsal, Demo
2320
// Venues
2421
/\b(arena|stadium|center|centre|hall)\b/i, // Arena, Stadium, Center, Hall
2522
/\bmadison\s+square\s+garden\b/i, // Madison Square Garden
@@ -29,9 +26,9 @@ export const nonStudioPatterns = [
2926
// Dates and locations
3027
/\b(january|february|march|april|may|june|july|august|september|october|november|december)\s+\d+/i, // "September 22", "August 31"
3128
/\b\d{1,2}[/-]\d{1,2}[/-]\d{2,4}\b/, // Date formats: 09/22/2024, 9-22-24
32-
/\b[A-Z][a-z]+,\s*[A-Z]{2}\b/, // Locations: "Oakland, CA", "London, UK"
33-
/\b[A-Z][a-z]+\s+City\b/i, // Cities: "Mexico City", "New York City"
34-
/\b(tokyo|paris|berlin|sydney)\b/i, // More cities
35-
/\b(bbc|radio|session)\b/i, // Radio sessions
29+
/\b[A-Z][a-z]+,\s*[A-Z]{2}\b/, // Locations: "Oakland, CA", "London, UK"
30+
/\b[A-Z][a-z]+\s+City\b/i, // Cities: "Mexico City", "New York City"
31+
/\b(tokyo|paris|berlin|sydney)\b/i, // More cities
32+
/\b(bbc|radio|session)\b/i, // Radio sessions
3633
];
3734

0 commit comments

Comments
 (0)