@@ -22,6 +22,7 @@ import com.lagradost.cloudstream3.syncproviders.SyncAPI
2222import com.lagradost.cloudstream3.ui.settings.Globals.TV
2323import com.lagradost.cloudstream3.ui.settings.Globals.isLayout
2424import com.lagradost.cloudstream3.utils.AppContextUtils.getNameFull
25+ import com.lagradost.cloudstream3.utils.AppContextUtils.getShortSeasonText
2526import com.lagradost.cloudstream3.utils.DataStoreHelper
2627import com.lagradost.cloudstream3.utils.DataStoreHelper.fixVisual
2728import com.lagradost.cloudstream3.utils.ImageLoader.loadImage
@@ -66,6 +67,7 @@ object SearchResultBuilder {
6667
6768 val bar: ProgressBar ? = itemView.findViewById(R .id.watchProgress)
6869 val playImg: ImageView ? = itemView.findViewById(R .id.search_item_download_play)
70+ val episodeText: TextView ? = itemView.findViewById(R .id.episode_text)
6971
7072 // Do logic
7173
@@ -75,10 +77,12 @@ object SearchResultBuilder {
7577 textIsSub?.isVisible = false
7678 textFlag?.isVisible = false
7779 rating?.isVisible = false
80+ episodeText?.isVisible = false
7881
7982 val showSub = showCache[textIsDub?.context?.getString(R .string.show_sub_key)] ? : false
8083 val showDub = showCache[textIsDub?.context?.getString(R .string.show_dub_key)] ? : false
8184 val showTitle = showCache[cardText?.context?.getString(R .string.show_title_key)] ? : false
85+ val showEpisodeText = showCache[cardText?.context?.getString(R .string.show_episode_text_key)] ? : false
8286 val showHd = showCache[textQuality?.context?.getString(R .string.show_hd_key)] ? : false
8387 val showRatingView =
8488 showCache[textQuality?.context?.getString(R .string.show_rating_key)] ? : false
@@ -254,12 +258,12 @@ object SearchResultBuilder {
254258 bar?.progress = (pos.position / 1000 ).toInt()
255259 bar?.visibility = View .VISIBLE
256260 }
257-
258261 playImg?.visibility = View .VISIBLE
259-
260- if (card.type?.isMovieType() == false ) {
261- cardText?.text =
262- cardText.context?.getNameFull(card.name, card.episode, card.season)
262+ if (card.type?.isMovieType() == false && showEpisodeText) {
263+ episodeText?.context?.getShortSeasonText(card.episode, card.season)?.let {text->
264+ episodeText.text = text
265+ episodeText.isVisible = true
266+ }
263267 }
264268 }
265269
0 commit comments