Null season in series

This commit is contained in:
KingLucius 2024-03-08 11:26:34 +02:00
parent 8168971847
commit 79d222f93e

View file

@ -783,8 +783,12 @@ class ResultFragmentTv : Fragment() {
if (episodes is Resource.Success) { if (episodes is Resource.Success) {
val first = episodes.value.firstOrNull() val first = episodes.value.firstOrNull()
if (first != null) { 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 { resultPlaySeriesButton.setOnClickListener {
viewModel.handleAction( viewModel.handleAction(
EpisodeClickEvent( EpisodeClickEvent(
@ -903,7 +907,7 @@ class ResultFragmentTv : Fragment() {
resultPlayMovie.isGone = d.comingSoon resultPlayMovie.isGone = d.comingSoon
resultPlaySeries.isGone = d.comingSoon resultPlaySeries.isGone = d.comingSoon
resultDataHolder.isGone = d.comingSoon resultDataHolder.isGone = d.comingSoon
UIHelper.populateChips(resultTag, d.tags) UIHelper.populateChips(resultTag, d.tags)
resultCastItems.isGone = d.actors.isNullOrEmpty() resultCastItems.isGone = d.actors.isNullOrEmpty()
(resultCastItems.adapter as? ActorAdaptor)?.updateList( (resultCastItems.adapter as? ActorAdaptor)?.updateList(