Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ export const YOUTUBE_TRACK_FILTER_RULES: FilterRule[] = [
{ source: /\(.*lyrics?\s*(video)?\)/i, target: '' },
// ((Official)? (Track)? Stream)
{ source: /\((of+icial\s*)?(track\s*)?stream\)/i, target: '' },
// ((Official)? (Track)? Visuali[sz]er)
{ source: /\((of+icial\s*)?(track\s*)?visuali[sz]er\)/i, target: '' },
// ((Official)? (Music|HD)? Video|Audio)
{ source: /\((of+icial\s*)?((music|hd)\s*)?(video|audio)\)/i, target: '' },
// - (Official)? (Music)? Video|Audio
Expand Down
25 changes: 25 additions & 0 deletions test/fixtures/functions/youtube.json
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,31 @@
"funcParameter": "Track Title (Stream)",
"expectedValue": "Track Title"
},
{
"description": "should remove '(Official Track Visualiser)' string",
"funcParameter": "Track Title (Official Track Visualiser)",
"expectedValue": "Track Title"
},
{
"description": "should remove '(Official Visualiser)' string",
"funcParameter": "Track Title (Official Visualiser)",
"expectedValue": "Track Title"
},
{
"description": "should remove '(Official Visualizer)' string",
"funcParameter": "Track Title (Official Visualiser)",
"expectedValue": "Track Title"
},
{
"description": "should remove '(Visualiser)' string",
"funcParameter": "Track Title (Visualiser)",
"expectedValue": "Track Title"
},
{
"description": "should remove '(Visualizer)' string",
"funcParameter": "Track Title (Visualizer)",
"expectedValue": "Track Title"
},
{
"description": "should remove (live) suffix",
"funcParameter": "Track Title (Live)",
Expand Down