Merge pull request #7067 from Bnyro/master

fix: negative count of videos in a playlist
This commit is contained in:
Bnyro 2025-02-03 18:16:18 +01:00 committed by GitHub
commit a1cb16b07a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -151,7 +151,7 @@ class SearchChannelAdapter : ListAdapter<ContentItem, SearchViewHolder>(
private fun bindPlaylist(item: ContentItem, binding: PlaylistsRowBinding) {
binding.apply {
ImageHelper.loadImage(item.thumbnail, playlistThumbnail)
if (item.videos != -1L) videoCount.text = item.videos.toString()
if (item.videos >= 0) videoCount.text = item.videos.toString()
playlistTitle.text = item.name
playlistDescription.text = item.uploaderName
root.setOnClickListener {

View File

@ -176,7 +176,7 @@ class SearchResultsAdapter(
private fun bindPlaylist(item: ContentItem, binding: PlaylistsRowBinding) {
binding.apply {
ImageHelper.loadImage(item.thumbnail, playlistThumbnail)
if (item.videos != -1L) videoCount.text = item.videos.toString()
if (item.videos >= 0) videoCount.text = item.videos.toString()
playlistTitle.text = item.name
playlistDescription.text = item.uploaderName
root.setOnClickListener {