mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
nullable secondsToReadable
This commit is contained in:
parent
8cff45ddd1
commit
7d56aad305
2 changed files with 5 additions and 2 deletions
app/src/main/java/com/lagradost/cloudstream3
|
@ -73,7 +73,10 @@ abstract class AccountManager(private val defIndex: Int) : AuthAPI {
|
|||
|
||||
const val maxStale = 60 * 10
|
||||
|
||||
fun secondsToReadable(seconds: Int, completedValue: String): String {
|
||||
fun secondsToReadable(seconds: Int?, completedValue: String?): String? {
|
||||
|
||||
seconds ?: return null
|
||||
|
||||
var secondsLong = seconds.toLong()
|
||||
val days = TimeUnit.SECONDS
|
||||
.toDays(secondsLong)
|
||||
|
|
|
@ -299,7 +299,7 @@ class EpisodeAdapter(
|
|||
|
||||
episodeRuntime.setText(
|
||||
txt(
|
||||
card.runTime?.times(60L)?.let { secondsToReadable(it.toInt(), "0 mins") }
|
||||
secondsToReadable(card.runTime?.times(60L)?.toInt(), null)
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue