mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Fix NPE.
This commit is contained in:
parent
8b0c7d1eba
commit
9fe9770714
1 changed files with 2 additions and 1 deletions
|
@ -165,7 +165,8 @@ public class ResponseHelper {
|
|||
info.getStreamSegments().forEach(
|
||||
segment -> segments.add(new ChapterSegment(segment.getTitle(), segment.getStartTimeSeconds())));
|
||||
|
||||
long time = info.getUploadDate().offsetDateTime().toInstant().toEpochMilli();
|
||||
long time = info.getUploadDate() != null ? info.getUploadDate().offsetDateTime().toInstant().toEpochMilli()
|
||||
: System.currentTimeMillis();
|
||||
|
||||
if (info.getUploadDate() != null && System.currentTimeMillis() - time < TimeUnit.DAYS.toMillis(10))
|
||||
updateViews(info.getId(), info.getViewCount(), time, false);
|
||||
|
|
Loading…
Reference in a new issue