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

import java.util.ArrayList;
import java.util.List;

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 ReleasegroupFilter extends Filter {

  @Override
  public List<Subtitle> doFilter(Release release, List<Subtitle> Subtitles) {
    List<Subtitle> filteredList = new ArrayList<Subtitle>();

    for (Subtitle subtitle : Subtitles) {
      if (subtitle.getReleasegroup().toLowerCase().contains(release.getReleasegroup().toLowerCase())) {
        Logger.instance.debug("getSubtitlesFiltered: found KEYWORD based TEAM match: "
            + subtitle.getFilename());
        
        subtitle.setQuality(ReleaseParser.getQualityKeyword(subtitle.getFilename()));
        subtitle.setSubtitleMatchType(SubtitleMatchType.TEAM);
        
        filteredList.add(subtitle);
      }
    }

    return filteredList;
  }

}

@@ -189,62 +189,8 @@
 er;%0A
-import org.lodder.subtools.sublibrary.logging.Logger;%0A
 impo
@@ -359,57 +359,205 @@
 pe;%0A
-%0Apublic class ReleasegroupFilter extends Filter %7B
+import org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Apublic class ReleasegroupFilter extends Filter %7B%0A%0A  private static final Logger LOGGER = LoggerFactory.getLogger(ReleasegroupFilter.class);
 %0A%0A  
@@ -798,16 +798,27 @@
 erCase()
+%0A          
 .contain
@@ -876,22 +876,13 @@
    L
-ogger.instance
+OGGER
 .deb
@@ -941,11 +941,16 @@
 atch
-:
+ %5B%7B%7D%5D
  %22
+,
 %0A   
@@ -961,10 +961,8 @@
     
- +
  sub
@@ -983,24 +983,16 @@
 ame());%0A
-        
 %0A       
@@ -1133,24 +1133,16 @@
 .TEAM);%0A
-        
 %0A       

Convert ReleasegroupFilter from old logger to new LOGGER slf4j