From 79d222f93e91763d53060d8579f0daed78c51313 Mon Sep 17 00:00:00 2001 From: KingLucius Date: Fri, 8 Mar 2024 11:26:34 +0200 Subject: [PATCH] Null season in series --- .../cloudstream3/ui/result/ResultFragmentTv.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragmentTv.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragmentTv.kt index feae71ac..3697e2b8 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragmentTv.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultFragmentTv.kt @@ -783,8 +783,12 @@ class ResultFragmentTv : Fragment() { if (episodes is Resource.Success) { val first = episodes.value.firstOrNull() if (first != null) { - resultPlaySeriesText.text = "${getString(R.string.season_short)}${first.season}:${getString(R.string.episode_short)}${first.episode}" - + resultPlaySeriesText.text = //"${getString(R.string.season_short)}${first.season}:${getString(R.string.episode_short)}${first.episode}" + when { + first.season != null -> + "${getString(R.string.season_short)}${first.season}:${getString(R.string.episode_short)}${first.episode}" + else -> "${getString(R.string.episode)} ${first.episode}" + } resultPlaySeriesButton.setOnClickListener { viewModel.handleAction( EpisodeClickEvent( @@ -903,7 +907,7 @@ class ResultFragmentTv : Fragment() { resultPlayMovie.isGone = d.comingSoon resultPlaySeries.isGone = d.comingSoon resultDataHolder.isGone = d.comingSoon - + UIHelper.populateChips(resultTag, d.tags) resultCastItems.isGone = d.actors.isNullOrEmpty() (resultCastItems.adapter as? ActorAdaptor)?.updateList(