Use setters in SearchInfo
This commit is contained in:
parent
29b639b454
commit
5d1c3b3fa2
|
@ -43,12 +43,12 @@ public class SearchInfo extends ListInfo<InfoItem> {
|
|||
info.addError(e);
|
||||
}
|
||||
try {
|
||||
info.searchSuggestion = extractor.getSearchSuggestion();
|
||||
info.setSearchSuggestion(extractor.getSearchSuggestion());
|
||||
} catch (Exception e) {
|
||||
info.addError(e);
|
||||
}
|
||||
try {
|
||||
info.isCorrectedSearch = extractor.isCorrectedSearch();
|
||||
info.setCorrectedSearch(extractor.isCorrectedSearch());
|
||||
} catch (Exception e) {
|
||||
info.addError(e);
|
||||
}
|
||||
|
@ -80,4 +80,12 @@ public class SearchInfo extends ListInfo<InfoItem> {
|
|||
public boolean isCorrectedSearch() {
|
||||
return this.isCorrectedSearch;
|
||||
}
|
||||
|
||||
public void setCorrectedSearch(boolean correctedSearch) {
|
||||
isCorrectedSearch = correctedSearch;
|
||||
}
|
||||
|
||||
public void setSearchSuggestion(String searchSuggestion) {
|
||||
this.searchSuggestion = searchSuggestion;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ public class YoutubeMusicSearchExtractor extends SearchExtractor {
|
|||
return false;
|
||||
}
|
||||
|
||||
JsonObject showingResultsForRenderer = itemSectionRenderer.getArray("contents").getObject(0)
|
||||
final JsonObject showingResultsForRenderer = itemSectionRenderer.getArray("contents").getObject(0)
|
||||
.getObject("showingResultsForRenderer");
|
||||
return showingResultsForRenderer != null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue