mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-01-10 19:40:31 +05:30
feat(Playlist): display views and upload date
As the Piped API now provides the number of views/upload date for a playlist item, we can display them in the playlist view. Ref: https://github.com/libre-tube/LibreTube/issues/4401
This commit is contained in:
parent
5cc221c927
commit
d0d9debc29
@ -80,12 +80,14 @@ class PlaylistAdapter(
|
|||||||
|
|
||||||
holder.binding.apply {
|
holder.binding.apply {
|
||||||
videoTitle.text = streamItem.title
|
videoTitle.text = streamItem.title
|
||||||
videoInfo.text = streamItem.uploaderName
|
videoInfo.text = TextUtils.formatViewsString(root.context, streamItem.views ?: -1, streamItem.uploaded, streamItem.uploaderName)
|
||||||
channelImageContainer.isGone = true
|
videoInfo.maxLines = 2
|
||||||
|
|
||||||
thumbnailDuration.setFormattedDuration(streamItem.duration ?: -1, streamItem.isShort, streamItem.uploaded)
|
// piped does not load channel avatars for playlist views
|
||||||
|
channelContainer.isGone = true
|
||||||
|
|
||||||
ImageHelper.loadImage(streamItem.thumbnail, thumbnail)
|
ImageHelper.loadImage(streamItem.thumbnail, thumbnail)
|
||||||
|
thumbnailDuration.setFormattedDuration(streamItem.duration ?: -1, streamItem.isShort, streamItem.uploaded)
|
||||||
|
|
||||||
root.setOnClickListener {
|
root.setOnClickListener {
|
||||||
NavigationHelper.navigateVideo(root.context, streamItem.url, playlistId)
|
NavigationHelper.navigateVideo(root.context, streamItem.url, playlistId)
|
||||||
|
Loading…
Reference in New Issue
Block a user