Add verified info in more places.

This commit is contained in:
FireMasterK 2021-08-18 01:37:49 +05:30
parent 90d04f9e4f
commit f9f4dd8e74
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD
3 changed files with 16 additions and 12 deletions

View file

@ -175,7 +175,7 @@ public class ResponseHelper {
StreamInfoItem item = (StreamInfoItem) o;
relatedStreams.add(new StreamItem(item.getUrl().substring(23), item.getName(),
rewriteURL(item.getThumbnailUrl()), item.getUploaderName(), item.getUploaderUrl().substring(23),
item.getTextualUploadDate(), item.getDuration(), item.getViewCount()));
item.getTextualUploadDate(), item.getDuration(), item.getViewCount(), item.isUploaderVerified()));
});
List<ChapterSegment> segments = new ObjectArrayList<>();
@ -209,7 +209,7 @@ public class ResponseHelper {
StreamInfoItem item = o;
relatedStreams.add(new StreamItem(item.getUrl().substring(23), item.getName(),
rewriteURL(item.getThumbnailUrl()), item.getUploaderName(), item.getUploaderUrl().substring(23),
item.getTextualUploadDate(), item.getDuration(), item.getViewCount()));
item.getTextualUploadDate(), item.getDuration(), item.getViewCount(), item.isUploaderVerified()));
});
Multithreading.runAsync(() -> {
@ -245,8 +245,8 @@ public class ResponseHelper {
}
final Channel channel = new Channel(info.getId(), info.getName(), rewriteURL(info.getAvatarUrl()),
rewriteURL(info.getBannerUrl()), info.getDescription(), nextpage, info.getSubscriberCount(),
relatedStreams);
rewriteURL(info.getBannerUrl()), info.getDescription(), info.getSubscriberCount(), info.isVerified(),
nextpage, relatedStreams);
IPFS.publishData(channel);
@ -268,7 +268,7 @@ public class ResponseHelper {
StreamInfoItem item = o;
relatedStreams.add(new StreamItem(item.getUrl().substring(23), item.getName(),
rewriteURL(item.getThumbnailUrl()), item.getUploaderName(), item.getUploaderUrl().substring(23),
item.getTextualUploadDate(), item.getDuration(), item.getViewCount()));
item.getTextualUploadDate(), item.getDuration(), item.getViewCount(), item.isUploaderVerified()));
});
String nextpage = null;
@ -301,7 +301,7 @@ public class ResponseHelper {
StreamInfoItem item = o;
relatedStreams.add(new StreamItem(item.getUrl().substring(23), item.getName(),
rewriteURL(item.getThumbnailUrl()), item.getUploaderName(), item.getUploaderUrl().substring(23),
item.getTextualUploadDate(), item.getDuration(), item.getViewCount()));
item.getTextualUploadDate(), item.getDuration(), item.getViewCount(), item.isUploaderVerified()));
});
return Constants.mapper.writeValueAsBytes(relatedStreams);
@ -318,7 +318,7 @@ public class ResponseHelper {
StreamInfoItem item = o;
relatedStreams.add(new StreamItem(item.getUrl().substring(23), item.getName(),
rewriteURL(item.getThumbnailUrl()), item.getUploaderName(), item.getUploaderUrl().substring(23),
item.getTextualUploadDate(), item.getDuration(), item.getViewCount()));
item.getTextualUploadDate(), item.getDuration(), item.getViewCount(), item.isUploaderVerified()));
});
String nextpage = null;
@ -351,7 +351,7 @@ public class ResponseHelper {
StreamInfoItem item = o;
relatedStreams.add(new StreamItem(item.getUrl().substring(23), item.getName(),
rewriteURL(item.getThumbnailUrl()), item.getUploaderName(), item.getUploaderUrl().substring(23),
item.getTextualUploadDate(), item.getDuration(), item.getViewCount()));
item.getTextualUploadDate(), item.getDuration(), item.getViewCount(), item.isUploaderVerified()));
});
String nextpage = null;

View file

@ -6,17 +6,19 @@ public class Channel {
public String id, name, avatarUrl, bannerUrl, description, nextpage;
public long subscriberCount;
public boolean verified;
public List<StreamItem> relatedStreams;
public Channel(String id, String name, String avatarUrl, String bannerUrl, String description, String nextpage,
long subscriberCount, List<StreamItem> relatedStreams) {
public Channel(String id, String name, String avatarUrl, String bannerUrl, String description, long subscriberCount,
boolean verified, String nextpage, List<StreamItem> relatedStreams) {
this.id = id;
this.name = name;
this.avatarUrl = avatarUrl;
this.bannerUrl = bannerUrl;
this.description = description;
this.nextpage = nextpage;
this.subscriberCount = subscriberCount;
this.verified = verified;
this.nextpage = nextpage;
this.relatedStreams = relatedStreams;
}
}

View file

@ -4,9 +4,10 @@ public class StreamItem {
public String url, title, thumbnail, uploaderName, uploaderUrl, uploadedDate;
public long duration, views;
public boolean uploaderVerified;
public StreamItem(String url, String title, String thumbnail, String uploaderName, String uploaderUrl,
String uploadedDate, long duration, long views) {
String uploadedDate, long duration, long views, boolean uploaderVerified) {
this.url = url;
this.title = title;
this.thumbnail = thumbnail;
@ -15,5 +16,6 @@ public class StreamItem {
this.uploadedDate = uploadedDate;
this.duration = duration;
this.views = views;
this.uploaderVerified = uploaderVerified;
}
}