Просмотр исходного кода

Strip [brackets] from chart titles

Christoph Berg 20 лет назад
Родитель
Сommit
03d04097f5
2 измененных файлов с 2 добавлено и 0 удалено
  1. 1 0
      docs/Changelog
  2. 1 0
      modules/Pisg/Parser/Logfile.pm

+ 1 - 0
docs/Changelog

@@ -7,6 +7,7 @@ pisg (0.68) - ??
      + More smileys (SF #1264834).
      + Suppress output when not writing to a terminal.
      + Print full path when config file comes from the search path.
+     + Strip [brackets] from chart titles.
    * Parsers:
      + Strip nick modes in xchat format (SF #1304262).
      + Add pointer to "compatibility" theme for XChat to FORMATS.

+ 1 - 0
modules/Pisg/Parser/Logfile.pm

@@ -662,6 +662,7 @@ sub _charts
     $Song =~ s/_/ /g;
     $Song =~ s/\d+ ?- ?//;
     $Song =~ s/\.(mp3|ogg|wma)//ig;
+    $Song =~ s/\[[^\] ]*\]/ /g; # strip stuff in brackets [44kbps]
     $Song =~ s/^ *[^\w]* *| *[^\w]* *$//g;
     my $song = lc $Song;
     $stats->{word_upcase}{$song} = $Song;