mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-14 06:10:29 +05:30
Limit RSS feed size to 100 entries (#263)
This commit is contained in:
parent
ae9bd3b7be
commit
ce70bd037b
@ -837,8 +837,6 @@ public class ResponseHelper {
|
|||||||
video.getUploaded(), channel.isVerified()));
|
video.getUploaded(), channel.isVerified()));
|
||||||
}
|
}
|
||||||
|
|
||||||
feedItems.sort(Comparator.<StreamItem>comparingLong(o -> o.uploaded).reversed());
|
|
||||||
|
|
||||||
return Constants.mapper.writeValueAsBytes(feedItems);
|
return Constants.mapper.writeValueAsBytes(feedItems);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -877,7 +875,7 @@ public class ResponseHelper {
|
|||||||
))
|
))
|
||||||
.orderBy(cb.desc(root.get("uploaded")));
|
.orderBy(cb.desc(root.get("uploaded")));
|
||||||
|
|
||||||
List<Video> videos = s.createQuery(criteria).list();
|
List<Video> videos = s.createQuery(criteria).setMaxResults(100).list();
|
||||||
|
|
||||||
final List<SyndEntry> entries = new ObjectArrayList<>();
|
final List<SyndEntry> entries = new ObjectArrayList<>();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user