mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
remove duration localization
This commit is contained in:
parent
8a66765c4b
commit
4b57297b6b
3 changed files with 3 additions and 15 deletions
|
@ -1,10 +1,8 @@
|
|||
package com.lagradost.cloudstream3.syncproviders
|
||||
|
||||
import com.lagradost.cloudstream3.AcraApplication.Companion.context
|
||||
import com.lagradost.cloudstream3.AcraApplication.Companion.getKey
|
||||
import com.lagradost.cloudstream3.AcraApplication.Companion.removeKeys
|
||||
import com.lagradost.cloudstream3.AcraApplication.Companion.setKey
|
||||
import com.lagradost.cloudstream3.R
|
||||
import com.lagradost.cloudstream3.syncproviders.providers.SubScene
|
||||
import com.lagradost.cloudstream3.syncproviders.providers.*
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
@ -83,9 +81,7 @@ abstract class AccountManager(private val defIndex: Int) : AuthAPI {
|
|||
return completedValue
|
||||
}
|
||||
//println("$days $hours $minutes")
|
||||
return "${if (days != 0L) "$days" + "${context?.getString(R.string.days_short)} " else ""}${if (hours != 0L) "$hours" +
|
||||
"${context?.getString(R.string.hours_short)} " else ""}${minutes}${context?.getString(R.string.mins_short)}"
|
||||
|
||||
return "${if (days != 0L) "$days" + "d " else ""}${if (hours != 0L) "$hours" + "h " else ""}${minutes}m"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -263,8 +263,7 @@ fun LoadResponse.toResultData(repo: APIRepository): ResultData {
|
|||
metaText =
|
||||
if (repo.providerType == ProviderType.MetaProvider) txt(R.string.provider_info_meta) else null,
|
||||
durationText = if (dur == null || dur <= 0) null else txt(
|
||||
//R.string.duration_format,
|
||||
secondsToReadable(dur * 60, "0 ${context?.getString(R.string.mins_long)}")
|
||||
secondsToReadable(dur * 60, "0 mins")
|
||||
),
|
||||
onGoingText = if (this is EpisodeResponse) {
|
||||
txt(
|
||||
|
@ -2466,8 +2465,7 @@ class ResultViewModel2 : ViewModel() {
|
|||
ResumeProgress(
|
||||
progress = (viewPos.position / 1000).toInt(),
|
||||
maxProgress = (viewPos.duration / 1000).toInt(),
|
||||
//txt(R.string.resume_time_left, (viewPos.duration - viewPos.position) / (60_000))
|
||||
txt(R.string.resume_remaining, secondsToReadable(((viewPos.duration - viewPos.position) / 1_000).toInt(), "0 ${context?.getString(R.string.mins_short)}"))
|
||||
txt(R.string.resume_remaining, secondsToReadable(((viewPos.duration - viewPos.position) / 1_000).toInt(), "0 mins"))
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -308,12 +308,6 @@
|
|||
<string name="resume_time_left" formatted="true">%dm\nremaining</string>
|
||||
<string name="resume_remaining" formatted="true">%s\nremaining</string>
|
||||
<string name="status_ongoing">Ongoing</string>
|
||||
<string name="days_short">d</string>
|
||||
<string name="hours_short">h</string>
|
||||
<string name="mins_short">m</string>
|
||||
<string name="days_long">days</string>
|
||||
<string name="hours_long">hours</string>
|
||||
<string name="mins_long">mins</string>
|
||||
<string name="status_completed">Completed</string>
|
||||
<string name="status">Status</string>
|
||||
<string name="year">Year</string>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue