Beispiel #1
0
 @Override
 public String toString() {
   if (deleteFiles) {
     return String.format("Delete TV Show %s, deleting files", series.getName());
   } else {
     return String.format("Delete TV Show %s", series.getName());
   }
 }
Beispiel #2
0
  public int evaluateResultForSeries(ManagedSeries series, SearchResult searchResult) {

    int score = 0;

    score =
        adjustVideoScoreForLanguage(
            score, searchResult, series.getAudioLanguage(), series.getSubtitleLanguage());

    VideoQuality resultQuality = VideoNameParser.getQuality(searchResult.getTitle());
    for (VideoQuality quality : series.getQualities()) {
      if (quality.equals(resultQuality)) {
        score += 5; // requested quality
      }
    }

    if (StringUtils.containsIgnoreCase(searchResult.getTitle(), "PROPER")) {
      score += 1;
    }

    return score;
  }