parent
2045179dfb
commit
a0297357d5
6 changed files with 15 additions and 9 deletions
|
@ -288,8 +288,10 @@ class EpisodeBottomSheetFragment : BottomSheetDialogFragment() {
|
|||
binding.overview.text = episode.overview
|
||||
binding.year.text = formatDateTime(episode.premiereDate)
|
||||
binding.playtime.text = getString(CoreR.string.runtime_minutes, episode.runtimeTicks.div(600000000))
|
||||
binding.communityRating.isVisible = episode.communityRating != null
|
||||
binding.communityRating.text = episode.communityRating.toString()
|
||||
episode.communityRating?.also {
|
||||
binding.communityRating.text = episode.communityRating.toString()
|
||||
binding.communityRating.isVisible = true
|
||||
}
|
||||
binding.missingIcon.isVisible = false
|
||||
|
||||
if (appPreferences.displayExtraInfo) {
|
||||
|
|
|
@ -276,7 +276,6 @@ class MovieFragment : Fragment() {
|
|||
if (item.trailer != null) {
|
||||
binding.itemActions.trailerButton.isVisible = true
|
||||
}
|
||||
binding.communityRating.isVisible = item.communityRating != null
|
||||
binding.actors.isVisible = actors.isNotEmpty()
|
||||
|
||||
binding.itemActions.playButton.isEnabled = item.canPlay && item.sources.isNotEmpty()
|
||||
|
@ -309,7 +308,10 @@ class MovieFragment : Fragment() {
|
|||
binding.playtime.text = runTime
|
||||
}
|
||||
binding.officialRating.text = item.officialRating
|
||||
binding.communityRating.text = item.communityRating.toString()
|
||||
item.communityRating?.also {
|
||||
binding.communityRating.text = it.toString()
|
||||
binding.communityRating.isVisible = true
|
||||
}
|
||||
|
||||
videoMetadata.let {
|
||||
with(binding) {
|
||||
|
|
|
@ -170,7 +170,6 @@ class ShowFragment : Fragment() {
|
|||
if (item.trailer != null) {
|
||||
binding.itemActions.trailerButton.isVisible = true
|
||||
}
|
||||
binding.communityRating.isVisible = item.communityRating != null
|
||||
binding.actors.isVisible = actors.isNotEmpty()
|
||||
|
||||
// TODO currently the sources of a show is always empty, we need a way to check if sources are available
|
||||
|
@ -212,7 +211,10 @@ class ShowFragment : Fragment() {
|
|||
binding.playtime.text = runTime
|
||||
}
|
||||
binding.officialRating.text = item.officialRating
|
||||
binding.communityRating.text = item.communityRating.toString()
|
||||
item.communityRating?.also {
|
||||
binding.communityRating.text = item.communityRating.toString()
|
||||
binding.communityRating.isVisible = true
|
||||
}
|
||||
|
||||
binding.info.description.text = item.overview
|
||||
binding.info.genres.text = genresString
|
||||
|
|
|
@ -63,7 +63,7 @@ suspend fun BaseItemDto.toFindroidEpisode(
|
|||
seriesName = seriesName.orEmpty(),
|
||||
seriesId = seriesId!!,
|
||||
seasonId = seasonId!!,
|
||||
communityRating = communityRating,
|
||||
communityRating = communityRating?.let { Math.round(it * 10).div(10F) },
|
||||
missing = locationType == LocationType.VIRTUAL,
|
||||
images = toFindroidImages(jellyfinRepository),
|
||||
chapters = toFindroidChapters(),
|
||||
|
|
|
@ -56,7 +56,7 @@ suspend fun BaseItemDto.toFindroidMovie(
|
|||
runtimeTicks = runTimeTicks ?: 0,
|
||||
playbackPositionTicks = userData?.playbackPositionTicks ?: 0,
|
||||
premiereDate = premiereDate,
|
||||
communityRating = communityRating,
|
||||
communityRating = communityRating?.let { Math.round(it * 10).div(10F) },
|
||||
genres = genres ?: emptyList(),
|
||||
people = people ?: emptyList(),
|
||||
officialRating = officialRating,
|
||||
|
|
|
@ -52,7 +52,7 @@ fun BaseItemDto.toFindroidShow(
|
|||
genres = genres ?: emptyList(),
|
||||
people = people ?: emptyList(),
|
||||
runtimeTicks = runTimeTicks ?: 0,
|
||||
communityRating = communityRating,
|
||||
communityRating = communityRating?.let { Math.round(it * 10).div(10F) },
|
||||
officialRating = officialRating,
|
||||
status = status ?: "Ended",
|
||||
productionYear = productionYear,
|
||||
|
|
Loading…
Reference in a new issue