Apply review

Co-Authored-By:  Audric V <74829229+AudricV@users.noreply.github.com>
This commit is contained in:
TobiGr 2023-09-18 15:01:17 +02:00 committed by Stypox
parent 109d06b4bb
commit 57eaa1bbe1
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23
12 changed files with 58 additions and 36 deletions

View file

@ -29,9 +29,12 @@ abstract class AbstractInfoPlayQueue<T extends ListInfo<? extends InfoItem>>
protected AbstractInfoPlayQueue(final T info) {
this(info.getServiceId(), info.getUrl(), info.getNextPage(),
info.getRelatedItems().stream().filter(StreamInfoItem.class::isInstance)
.map(StreamInfoItem.class::cast).collect(
Collectors.toList()), 0);
info.getRelatedItems()
.stream()
.filter(StreamInfoItem.class::isInstance)
.map(StreamInfoItem.class::cast)
.collect(Collectors.toList()),
0);
}
protected AbstractInfoPlayQueue(final int serviceId,
@ -76,10 +79,11 @@ abstract class AbstractInfoPlayQueue<T extends ListInfo<? extends InfoItem>>
}
nextPage = result.getNextPage();
append(extractListItems(result.getRelatedItems().stream()
append(extractListItems(result.getRelatedItems()
.stream()
.filter(StreamInfoItem.class::isInstance)
.map(StreamInfoItem.class::cast).collect(
Collectors.toList())));
.map(StreamInfoItem.class::cast)
.collect(Collectors.toList())));
fetchReactor.dispose();
fetchReactor = null;
@ -114,10 +118,11 @@ abstract class AbstractInfoPlayQueue<T extends ListInfo<? extends InfoItem>>
}
nextPage = result.getNextPage();
append(extractListItems(result.getItems().stream()
append(extractListItems(result.getItems()
.stream()
.filter(StreamInfoItem.class::isInstance)
.map(StreamInfoItem.class::cast).collect(
Collectors.toList())));
.map(StreamInfoItem.class::cast)
.collect(Collectors.toList())));
fetchReactor.dispose();
fetchReactor = null;