Finishes exact sound questions
This commit is contained in:
@@ -92,7 +92,7 @@ public class PracticeQuestionGeneratorImpl implements PracticeQuestionGenerator
|
||||
p.enabledFetchers().stream().flatMap(f -> {
|
||||
try {
|
||||
final var fetcher = fetcherProvider.getObject(f);
|
||||
return fetcher.fetch(p.bird()).sounds().stream();
|
||||
return fetcher.fetch(p.bird()).sounds().stream().filter(i -> p.enabledSoundTypes().contains(i.type()));
|
||||
} catch (final ProvisionException | FetchException e) {
|
||||
logger.error("Failed to fetch sounds for bird {}", p.bird(), e);
|
||||
return Stream.empty();
|
||||
@@ -106,7 +106,7 @@ public class PracticeQuestionGeneratorImpl implements PracticeQuestionGenerator
|
||||
p.enabledFetchers().stream().flatMap(f -> {
|
||||
try {
|
||||
final var fetcher = fetcherProvider.getObject(f);
|
||||
return fetcher.fetch(p.bird()).pictures().stream();
|
||||
return fetcher.fetch(p.bird()).pictures().stream().filter(i -> p.enabledPictureTypes().contains(i.type()));
|
||||
} catch (final ProvisionException | FetchException e) {
|
||||
logger.error("Failed to fetch images for bird {}", p.bird(), e);
|
||||
return Stream.empty();
|
||||
|
||||
Reference in New Issue
Block a user