mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-13 22:00:29 +05:30
Implement uploaded date in search.
This commit is contained in:
parent
6386a4d133
commit
d9a84215d7
@ -309,7 +309,8 @@ public class ResponseHelper {
|
||||
case STREAM:
|
||||
StreamInfoItem stream = (StreamInfoItem) item;
|
||||
items.add(new SearchStream(item.getName(), rewriteURL(item.getThumbnailUrl()),
|
||||
item.getUrl().substring(23), stream.getViewCount(), stream.getDuration()));
|
||||
item.getUrl().substring(23), stream.getTextualUploadDate(), stream.getViewCount(),
|
||||
stream.getDuration()));
|
||||
break;
|
||||
case CHANNEL:
|
||||
items.add(new SearchItem(item.getName(), rewriteURL(item.getThumbnailUrl()),
|
||||
@ -341,7 +342,8 @@ public class ResponseHelper {
|
||||
case STREAM:
|
||||
StreamInfoItem stream = (StreamInfoItem) item;
|
||||
items.add(new SearchStream(item.getName(), rewriteURL(item.getThumbnailUrl()),
|
||||
item.getUrl().substring(23), stream.getViewCount(), stream.getDuration()));
|
||||
item.getUrl().substring(23), stream.getTextualUploadDate(), stream.getViewCount(),
|
||||
stream.getDuration()));
|
||||
break;
|
||||
case CHANNEL:
|
||||
items.add(new SearchItem(item.getName(), rewriteURL(item.getThumbnailUrl()),
|
||||
|
@ -2,14 +2,20 @@ package me.kavin.piped.utils.obj.search;
|
||||
|
||||
public class SearchStream extends SearchItem {
|
||||
|
||||
private String uploadDate;
|
||||
private long views, duration;
|
||||
|
||||
public SearchStream(String name, String thumbnail, String url, long views, long duration) {
|
||||
public SearchStream(String name, String thumbnail, String url, String uploadDate, long views, long duration) {
|
||||
super(name, thumbnail, url);
|
||||
this.uploadDate = uploadDate;
|
||||
this.views = views;
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
public String getUploadDate() {
|
||||
return uploadDate;
|
||||
}
|
||||
|
||||
public long getViews() {
|
||||
return views;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user