Fix ClassCastException. (#235)

This commit is contained in:
Kavin 2022-03-30 17:47:05 +01:00 committed by GitHub
parent 0cea0a50f5
commit 11845f26fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -142,7 +142,10 @@ public class ResponseHelper {
final List<StreamItem> relatedStreams = new ObjectArrayList<>();
info.getRelatedItems().forEach(o -> relatedStreams.add(collectRelatedStream(o)));
info.getRelatedItems().forEach(o -> {
if (o instanceof StreamInfoItem)
relatedStreams.add(collectRelatedStream(o));
});
long time = info.getUploadDate() != null ? info.getUploadDate().offsetDateTime().toInstant().toEpochMilli()
: System.currentTimeMillis();