Skip to content

Commit

Permalink
improve album title parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
StigNygaard committed Oct 19, 2024
1 parent cbc4406 commit 9b76481
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions widgets/lastfm.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,22 +650,30 @@ class Tracks extends HTMLElement {
/^([^$]*[^-\s])(\s-\s)(\w[\w\s]+\sVersion[\w\s]*)$/iu,
/^([^$]*[^-\s])(\s-\s)(\w[\w\s]+\sDeluxe[\w\s]*)$/iu,
/^([^$]*[^-\s])(\s-\s)(\w[\w\s]+\sRemaster[\w\s]*)$/iu,
/^([^$]*[^-\s])(\s-\s)(\w[\w\s]+\sDisc[\w\s]*)$/iu,
/^([^$]*[^-\s])(\s-\s)(\w[\w\s]+\sCD[\w\s]*)$/iu,
/^([^$]*[^-\s])(\s-\s)(Deluxe[\w\s]*)$/iu,
/^([^$]*[^-\s])(\s-\s)(Remaster[\w\s]*)$/iu,
/^([^$]*[^-\s])(\s-\s)(Music from[\w\s]*)$/iu,
/^([^$]*[^-\s])(\s-\s)(EP[\w\s]*)$/iu,
/^([^$]*[^-\s])(\s-\s)(single[\w\s]*)$/iu,
/^([^$]*[^-\s])(\s-\s)(Explicit[\w\s]*)$/iu,
/^([^$]*[^-\s])(\s-\s)(Disc\s[\w\s]+)$/iu,
/^([^$]*[^-\s])(\s-\s)(CD\s[\w\s]+)$/iu,
/^([^$]*[^-\s])(\s)([(\[][\w\s]+\sEdition[\w\s]*[)\]])$/iu,
/^([^$]*[^-\s])(\s)([(\[][\w\s]+\sVersion[\w\s]*[)\]])$/iu,
/^([^$]*[^-\s])(\s)([(\[][\w\s]+\sDeluxe[\w\s]*[)\]])$/iu,
/^([^$]*[^-\s])(\s)([(\[][\w\s]+\sRemaster[\w\s]*[)\]])$/iu,
/^([^$]*[^-\s])(\s)([(\[][\w\s]+\sDisc[\w\s]*[)\]])$/iu,
/^([^$]*[^-\s])(\s)([(\[][\w\s]+\sCD[\w\s]*[)\]])$/iu,
/^([^$]*[^-\s])(\s)([(\[]Deluxe[\w\s]*[)\]])$/iu,
/^([^$]*[^-\s])(\s)([(\[]Remaster[\w\s]*[)\]])$/iu,
/^([^$]*[^-\s])(\s)([(\[]Music from[\w\s]*[)\]])$/iu,
/^([^$]*[^-\s])(\s)([(\[]EP[)\]])$/iu,
/^([^$]*[^-\s])(\s)([(\[]single[)\]])$/iu,
/^([^$]*[^-\s])(\s)([(\[]Explicit[)\]])$/iu,
/^([^$]*[^-\s])(\s)([(\[]Disc\s[\w\s]+[)\]])$/iu,
/^([^$]*[^-\s])(\s)([(\[]CD\s[\w\s]+[)\]])$/iu,
/^([^$]*[^-\s])(\s)(EP[\d\s]*)$/iu
]; // ( ... bonus CD), (single),... ?
for (const reg of regs) {
Expand Down

0 comments on commit 9b76481

Please sign in to comment.