package org.lodder.subtools.multisubdownloader.lib.control.subtitles.filters;

import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.lodder.subtools.sublibrary.control.ReleaseParser;
import org.lodder.subtools.sublibrary.logging.Logger;
import org.lodder.subtools.sublibrary.model.Release;
import org.lodder.subtools.sublibrary.model.Subtitle;
import org.lodder.subtools.sublibrary.model.SubtitleMatchType;

public class ExactNameFilter extends Filter {

  @Override
  public List<Subtitle> doFilter(Release release, List<Subtitle> Subtitles) {
    List<Subtitle> filteredList = new ArrayList<Subtitle>();
    Pattern p = Pattern.compile(getReleasename(release).replaceAll(" ", "[. ]"), Pattern.CASE_INSENSITIVE);

    for (Subtitle subtitle : Subtitles) {
      Matcher m = p.matcher(subtitle.getFilename().toLowerCase().replace(".srt", ""));
      if (m.matches()) {
        Logger.instance.debug("getSubtitlesFiltered: found EXACT match: " + subtitle.getFilename());
        
        subtitle.setSubtitleMatchType(SubtitleMatchType.EXACT);
        subtitle.setQuality(ReleaseParser.getQualityKeyword(subtitle.getFilename()));
        
        filteredList.add(subtitle);
      }
    }
    
    return filteredList;
  }
}

@@ -253,62 +253,8 @@
 er;%0A
-import org.lodder.subtools.sublibrary.logging.Logger;%0A
 impo
@@ -423,54 +423,201 @@
 pe;%0A
-%0Apublic class ExactNameFilter extends Filter %7B
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Apublic class ExactNameFilter extends Filter %7B%0A  %0A  private static final Logger LOGGER = LoggerFactory.getLogger(ExactNameFilter.class);
 %0A%0A  
@@ -1041,22 +1041,13 @@
    L
-ogger.instance
+OGGER
 .deb
@@ -1093,13 +1093,16 @@
 atch
-: %22 +
+ %5B%7B%7D%5D %22,
  sub

Convert ExactNameFilter from old logger to new LOGGER slf4j