mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-11-05 18:30:59 +01:00
Show runtime on different versions dialog (#1607)
## Description Small PR to add the runtime for different versions of media to the choose version dialog. This can be helpful to further distinguish versions such as theatrical vs extended editions. ### Related issues Suggested https://github.com/damontecres/Wholphin/pull/1522#issuecomment-4766811832 ### Testing Emulator ## Screenshots <img width="560" height="337" alt="image" src="https://github.com/user-attachments/assets/47b0c1be-d1d7-4845-b097-a67358f584f9" /> ## AI or LLM usage None
This commit is contained in:
parent
6a18e30314
commit
d85f188236
1 changed files with 12 additions and 0 deletions
|
|
@ -70,6 +70,7 @@ import com.github.damontecres.wholphin.ui.isNotNullOrBlank
|
|||
import com.github.damontecres.wholphin.ui.playback.SimpleMediaStream
|
||||
import com.github.damontecres.wholphin.ui.playback.isDown
|
||||
import com.github.damontecres.wholphin.ui.playback.isUp
|
||||
import com.github.damontecres.wholphin.ui.roundMinutes
|
||||
import com.github.damontecres.wholphin.ui.tryRequestFocus
|
||||
import com.github.damontecres.wholphin.util.ExceptionHandler
|
||||
import kotlinx.coroutines.delay
|
||||
|
|
@ -77,6 +78,7 @@ import kotlinx.coroutines.launch
|
|||
import org.jellyfin.sdk.model.api.MediaSourceInfo
|
||||
import org.jellyfin.sdk.model.api.MediaStream
|
||||
import org.jellyfin.sdk.model.api.MediaStreamType
|
||||
import org.jellyfin.sdk.model.extensions.ticks
|
||||
import org.jellyfin.sdk.model.serializer.toUUIDOrNull
|
||||
import java.util.UUID
|
||||
|
||||
|
|
@ -640,6 +642,16 @@ fun chooseVersionParams(
|
|||
}
|
||||
Text(text)
|
||||
},
|
||||
trailingContent = {
|
||||
val runtime =
|
||||
remember {
|
||||
source.runTimeTicks
|
||||
?.ticks
|
||||
?.roundMinutes
|
||||
.toString()
|
||||
}
|
||||
Text(runtime)
|
||||
},
|
||||
onClick = { onClick.invoke(index) },
|
||||
)
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue