Ejemplo n.º 1
0
  @Test
  public void testFindDownloadsForEpisode() throws Exception {

    List<SearchResult> results =
        finder.findDownloadsForEpisode("Game of Thrones", Language.EN, 3, 4);
    for (SearchResult searchResult : results) {
      finder.download(searchResult.getUrl(), searchResult.getReferer());
      System.out.println(searchResult);
    }
  }
Ejemplo n.º 2
0
  protected void selectResult(SearchResult selectedResult) {
    searchResultDAO.save(
        selectedResult.getUrl(),
        selectedResult.getProviderName(),
        selectedResult.getProviderClass(),
        selectedResult.getReferer(),
        selectedResult.getSizeInMegs(),
        selectedResult.getTitle(),
        selectedResult.getType(),
        getDownloadable().getId(),
        selectedResult.getClientId());

    BackLogProcessor.getInstance()
        .schedule(new DownloadSearchResultTask(selectedResult, getDownloadable()), false);
  }