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.overview.text = episode.overview
|
||||||
binding.year.text = formatDateTime(episode.premiereDate)
|
binding.year.text = formatDateTime(episode.premiereDate)
|
||||||
binding.playtime.text = getString(CoreR.string.runtime_minutes, episode.runtimeTicks.div(600000000))
|
binding.playtime.text = getString(CoreR.string.runtime_minutes, episode.runtimeTicks.div(600000000))
|
||||||
binding.communityRating.isVisible = episode.communityRating != null
|
episode.communityRating?.also {
|
||||||
binding.communityRating.text = episode.communityRating.toString()
|
binding.communityRating.text = episode.communityRating.toString()
|
||||||
|
binding.communityRating.isVisible = true
|
||||||
|
}
|
||||||
binding.missingIcon.isVisible = false
|
binding.missingIcon.isVisible = false
|
||||||
|
|
||||||
if (appPreferences.displayExtraInfo) {
|
if (appPreferences.displayExtraInfo) {
|
||||||
|
|
|
@ -276,7 +276,6 @@ class MovieFragment : Fragment() {
|
||||||
if (item.trailer != null) {
|
if (item.trailer != null) {
|
||||||
binding.itemActions.trailerButton.isVisible = true
|
binding.itemActions.trailerButton.isVisible = true
|
||||||
}
|
}
|
||||||
binding.communityRating.isVisible = item.communityRating != null
|
|
||||||
binding.actors.isVisible = actors.isNotEmpty()
|
binding.actors.isVisible = actors.isNotEmpty()
|
||||||
|
|
||||||
binding.itemActions.playButton.isEnabled = item.canPlay && item.sources.isNotEmpty()
|
binding.itemActions.playButton.isEnabled = item.canPlay && item.sources.isNotEmpty()
|
||||||
|
@ -309,7 +308,10 @@ class MovieFragment : Fragment() {
|
||||||
binding.playtime.text = runTime
|
binding.playtime.text = runTime
|
||||||
}
|
}
|
||||||
binding.officialRating.text = item.officialRating
|
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 {
|
videoMetadata.let {
|
||||||
with(binding) {
|
with(binding) {
|
||||||
|
|
|
@ -170,7 +170,6 @@ class ShowFragment : Fragment() {
|
||||||
if (item.trailer != null) {
|
if (item.trailer != null) {
|
||||||
binding.itemActions.trailerButton.isVisible = true
|
binding.itemActions.trailerButton.isVisible = true
|
||||||
}
|
}
|
||||||
binding.communityRating.isVisible = item.communityRating != null
|
|
||||||
binding.actors.isVisible = actors.isNotEmpty()
|
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
|
// 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.playtime.text = runTime
|
||||||
}
|
}
|
||||||
binding.officialRating.text = item.officialRating
|
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.description.text = item.overview
|
||||||
binding.info.genres.text = genresString
|
binding.info.genres.text = genresString
|
||||||
|
|
|
@ -63,7 +63,7 @@ suspend fun BaseItemDto.toFindroidEpisode(
|
||||||
seriesName = seriesName.orEmpty(),
|
seriesName = seriesName.orEmpty(),
|
||||||
seriesId = seriesId!!,
|
seriesId = seriesId!!,
|
||||||
seasonId = seasonId!!,
|
seasonId = seasonId!!,
|
||||||
communityRating = communityRating,
|
communityRating = communityRating?.let { Math.round(it * 10).div(10F) },
|
||||||
missing = locationType == LocationType.VIRTUAL,
|
missing = locationType == LocationType.VIRTUAL,
|
||||||
images = toFindroidImages(jellyfinRepository),
|
images = toFindroidImages(jellyfinRepository),
|
||||||
chapters = toFindroidChapters(),
|
chapters = toFindroidChapters(),
|
||||||
|
|
|
@ -56,7 +56,7 @@ suspend fun BaseItemDto.toFindroidMovie(
|
||||||
runtimeTicks = runTimeTicks ?: 0,
|
runtimeTicks = runTimeTicks ?: 0,
|
||||||
playbackPositionTicks = userData?.playbackPositionTicks ?: 0,
|
playbackPositionTicks = userData?.playbackPositionTicks ?: 0,
|
||||||
premiereDate = premiereDate,
|
premiereDate = premiereDate,
|
||||||
communityRating = communityRating,
|
communityRating = communityRating?.let { Math.round(it * 10).div(10F) },
|
||||||
genres = genres ?: emptyList(),
|
genres = genres ?: emptyList(),
|
||||||
people = people ?: emptyList(),
|
people = people ?: emptyList(),
|
||||||
officialRating = officialRating,
|
officialRating = officialRating,
|
||||||
|
|
|
@ -52,7 +52,7 @@ fun BaseItemDto.toFindroidShow(
|
||||||
genres = genres ?: emptyList(),
|
genres = genres ?: emptyList(),
|
||||||
people = people ?: emptyList(),
|
people = people ?: emptyList(),
|
||||||
runtimeTicks = runTimeTicks ?: 0,
|
runtimeTicks = runTimeTicks ?: 0,
|
||||||
communityRating = communityRating,
|
communityRating = communityRating?.let { Math.round(it * 10).div(10F) },
|
||||||
officialRating = officialRating,
|
officialRating = officialRating,
|
||||||
status = status ?: "Ended",
|
status = status ?: "Ended",
|
||||||
productionYear = productionYear,
|
productionYear = productionYear,
|
||||||
|
|
Loading…
Reference in a new issue