mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2025-04-29 08:20:30 +05:30
Add uploader info search.
This commit is contained in:
parent
a2cd2baf2a
commit
0e07295265
@ -315,8 +315,8 @@ public class ResponseHelper {
|
|||||||
case STREAM:
|
case STREAM:
|
||||||
StreamInfoItem stream = (StreamInfoItem) item;
|
StreamInfoItem stream = (StreamInfoItem) item;
|
||||||
items.add(new SearchStream(item.getName(), rewriteURL(item.getThumbnailUrl()),
|
items.add(new SearchStream(item.getName(), rewriteURL(item.getThumbnailUrl()),
|
||||||
item.getUrl().substring(23), stream.getTextualUploadDate(), stream.getViewCount(),
|
item.getUrl().substring(23), stream.getTextualUploadDate(), stream.getUploaderName(),
|
||||||
stream.getDuration()));
|
stream.getUploaderUrl().substring(23), stream.getViewCount(), stream.getDuration()));
|
||||||
break;
|
break;
|
||||||
case CHANNEL:
|
case CHANNEL:
|
||||||
items.add(new SearchItem(item.getName(), rewriteURL(item.getThumbnailUrl()),
|
items.add(new SearchItem(item.getName(), rewriteURL(item.getThumbnailUrl()),
|
||||||
@ -348,8 +348,8 @@ public class ResponseHelper {
|
|||||||
case STREAM:
|
case STREAM:
|
||||||
StreamInfoItem stream = (StreamInfoItem) item;
|
StreamInfoItem stream = (StreamInfoItem) item;
|
||||||
items.add(new SearchStream(item.getName(), rewriteURL(item.getThumbnailUrl()),
|
items.add(new SearchStream(item.getName(), rewriteURL(item.getThumbnailUrl()),
|
||||||
item.getUrl().substring(23), stream.getTextualUploadDate(), stream.getViewCount(),
|
item.getUrl().substring(23), stream.getTextualUploadDate(), stream.getUploaderName(),
|
||||||
stream.getDuration()));
|
stream.getUploaderUrl().substring(23), stream.getViewCount(), stream.getDuration()));
|
||||||
break;
|
break;
|
||||||
case CHANNEL:
|
case CHANNEL:
|
||||||
items.add(new SearchItem(item.getName(), rewriteURL(item.getThumbnailUrl()),
|
items.add(new SearchItem(item.getName(), rewriteURL(item.getThumbnailUrl()),
|
||||||
|
@ -2,12 +2,15 @@ package me.kavin.piped.utils.obj.search;
|
|||||||
|
|
||||||
public class SearchStream extends SearchItem {
|
public class SearchStream extends SearchItem {
|
||||||
|
|
||||||
private String uploadDate;
|
private String uploadDate, uploader, uploaderUrl;
|
||||||
private long views, duration;
|
private long views, duration;
|
||||||
|
|
||||||
public SearchStream(String name, String thumbnail, String url, String uploadDate, long views, long duration) {
|
public SearchStream(String name, String thumbnail, String url, String uploadDate, String uploader,
|
||||||
|
String uploaderUrl, long views, long duration) {
|
||||||
super(name, thumbnail, url);
|
super(name, thumbnail, url);
|
||||||
this.uploadDate = uploadDate;
|
this.uploadDate = uploadDate;
|
||||||
|
this.uploader = uploader;
|
||||||
|
this.uploaderUrl = uploaderUrl;
|
||||||
this.views = views;
|
this.views = views;
|
||||||
this.duration = duration;
|
this.duration = duration;
|
||||||
}
|
}
|
||||||
@ -16,6 +19,14 @@ public class SearchStream extends SearchItem {
|
|||||||
return uploadDate;
|
return uploadDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUploader() {
|
||||||
|
return uploader;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUploaderUrl() {
|
||||||
|
return uploaderUrl;
|
||||||
|
}
|
||||||
|
|
||||||
public long getViews() {
|
public long getViews() {
|
||||||
return views;
|
return views;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user