public static boolean isRecommended(String seasonPattern,String filePattern){
  int epCnt=count(filePattern,episodeNumbers);
  int titleCnt=count(filePattern,episodeTitles);
  int seCnt=count(filePattern,seasonNumbers);
  int seFolderCnt=count(seasonPattern,seasonNumbers);
  if (epCnt != 1 || titleCnt != 1 || seCnt > 1 || seFolderCnt > 1 || (seCnt + seFolderCnt) == 0) {
    LOGGER.debug("Too many/less episode/season/title replacer patterns");
    return false;
  }
  int epPos=getPatternPos(filePattern,episodeNumbers);
  int sePos=getPatternPos(filePattern,seasonNumbers);
  int titlePos=getPatternPos(filePattern,episodeTitles);
  if (sePos > epPos) {
    LOGGER.debug("Season pattern should be before episode pattern!");
    return false;
  }
  if (titleCnt == 1 && seCnt == 1) {
    if (titlePos < epPos && titlePos > sePos) {
      LOGGER.debug("Title should not be between season/episode pattern");
      return false;
    }
  }
  return true;
}

public static boolean isRecommended ( String seasonPattern , String filePattern ) { int epCnt = count ( filePattern , episodeNumbers ) ; int titleCnt = count ( filePattern , episodeTitles ) ; int seCnt = count ( filePattern , seasonNumbers ) ; int seFolderCnt = count ( seasonPattern , seasonNumbers ) ; if ( epCnt != 1 || titleCnt != 1 || seCnt > 1 || seFolderCnt > 1 || ( seCnt + seFolderCnt ) == 0 ) { LOGGER . debug ( "Too many/less episode/season/title replacer patterns" ) ; return false ; } int epPos = getPatternPos ( filePattern , episodeNumbers ) ; int sePos = getPatternPos ( filePattern , seasonNumbers ) ; int titlePos = getPatternPos ( filePattern , episodeTitles ) ; if ( sePos > epPos ) { LOGGER . debug ( "Season pattern should be before episode pattern!" ) ; return false ; } if ( titleCnt == 1 && seCnt == 1 ) { if ( titlePos < epPos && titlePos > sePos ) { LOGGER . debug ( "Title should not be between season/episode pattern" ) ; return false ; } } return true ; }
checks , if the pattern has a recommended structure ( s / e numbers , title filled ) < br > when false , it might lead to some unpredictable renamings . . .
