Skip to content

Commit

Permalink
Merge pull request #704 from Whiteyingshan/dev
Browse files Browse the repository at this point in the history
Fix #703 - Fix error when providers are null
  • Loading branch information
Enet4 authored Nov 1, 2024
2 parents 43f67a4 + 672d98d commit 15c65f5
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,16 @@ public void onReceive(Task<Iterable<SearchResult>> e) {}
if (providers == null) {
// use only DIM sources
providers = ServerSettingsManager.getSettings().getArchiveSettings().getDIMProviders();
// exclude unknown query providers
providers.removeIf(pName -> pc.getQueryProviderByName(pName, true) == null);
if (providers.isEmpty()) {
if (providers == null) {
// fallback to all query providers
providers = pc.getQueryProvidersName(true);
} else {
// exclude unknown query providers
providers.removeIf(pName -> pc.getQueryProviderByName(pName, true) == null);
if (providers.isEmpty()) {
// fallback to all query providers
providers = pc.getQueryProvidersName(true);
}
}
}
Iterator<SearchResult> it = pc
Expand Down

0 comments on commit 15c65f5

Please sign in to comment.