use of de.danoeh.antennapod.discovery.CombinedSearcher in project AntennaPod by AntennaPod.
the class OnlineFeedViewActivity method searchFeedUrlByTrackName.
private String searchFeedUrlByTrackName(String trackName, String artistName) {
CombinedSearcher searcher = new CombinedSearcher();
String query = trackName + " " + artistName;
List<PodcastSearchResult> results = searcher.search(query).blockingGet();
for (PodcastSearchResult result : results) {
if (result.feedUrl != null && result.author != null && result.author.equalsIgnoreCase(artistName) && result.title.equalsIgnoreCase(trackName)) {
return result.feedUrl;
}
}
return null;
}
Aggregations