Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ data class PlaylistStreamEntry(
item.uploaderName = streamEntity.uploader
item.uploaderUrl = streamEntity.uploaderUrl
item.thumbnailUrl = streamEntity.thumbnailUrl
item.setRequiresMembership(streamEntity.isPaid)

return item
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ public void updateFromItem(final LocalItem localItem,
.concatenateStrings(item.getStreamEntity().getUploader(),
NewPipe.getNameOfService(item.getStreamEntity().getServiceId())));

if (item.getStreamEntity().getDuration() > 0) {
if (item.getStreamEntity().isPaid()) {
itemDurationView.setText(R.string.paid_video);
itemDurationView.setBackgroundColor(ContextCompat.getColor(itemBuilder.getContext(),
R.color.paid_video_background_color));
itemDurationView.setVisibility(View.VISIBLE);
itemProgressView.setVisibility(View.GONE);
} else if (item.getStreamEntity().getDuration() > 0) {
itemDurationView.setText(Localization
.getDurationString(item.getStreamEntity().getDuration()));
itemDurationView.setBackgroundColor(ContextCompat.getColor(itemBuilder.getContext(),
Expand Down Expand Up @@ -114,7 +120,9 @@ public void updateState(final LocalItem localItem,
}
final PlaylistStreamEntry item = (PlaylistStreamEntry) localItem;

if (item.getProgressMillis() > 0 && item.getStreamEntity().getDuration() > 0) {
if (!item.getStreamEntity().isPaid()
&& item.getProgressMillis() > 0
&& item.getStreamEntity().getDuration() > 0) {
itemProgressView.setMax((int) item.getStreamEntity().getDuration());
if (itemProgressView.getVisibility() == View.VISIBLE) {
itemProgressView.setProgressAnimated((int) TimeUnit.MILLISECONDS
Expand Down