mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-07-26 14:38:39 +02:00
Compare commits
251
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00ee7b662e | ||
|
|
b222b2a5e5 | ||
|
|
15b212734e | ||
|
|
631ba52ffb | ||
|
|
a4b58a893d | ||
|
|
47a3fd9462 | ||
|
|
abcd56f0c5 | ||
|
|
b498b5eafa | ||
|
|
be114e7789 | ||
|
|
8c44142e70 | ||
|
|
5a655f77d2 | ||
|
|
c825f791d0 | ||
|
|
83a9d8a162 | ||
|
|
acfa2e2183 | ||
|
|
591933f3d8 | ||
|
|
982f94d955 | ||
|
|
95bf28d7c6 | ||
|
|
48a299de45 | ||
|
|
719e517dda | ||
|
|
361c55c5ac | ||
|
|
b157fff229 | ||
|
|
e23e6417ee | ||
|
|
ad77209832 | ||
|
|
4ceb427d9c | ||
|
|
16a26130f2 | ||
|
|
e7773c9e88 | ||
|
|
1b38b92177 | ||
|
|
ef180f08b0 | ||
|
|
6de45a3b88 | ||
|
|
ceb9537b73 | ||
|
|
976bf73388 | ||
|
|
6c7f2d96f3 | ||
|
|
ae2fc1fcfb | ||
|
|
3aad7e9e07 | ||
|
|
e43f1e75c8 | ||
|
|
bc5505e12d | ||
|
|
19a2703ea4 | ||
|
|
8a8f7d4f27 | ||
|
|
e350b4970f | ||
|
|
4be28bc579 | ||
|
|
13855a8682 | ||
|
|
4be1598eca | ||
|
|
7aebcd92c3 | ||
|
|
bd8668f0bf | ||
|
|
c6a7c6fec2 | ||
|
|
e367fa8a86 | ||
|
|
ecdbabfa17 | ||
|
|
796189ad48 | ||
|
|
76d1f2b29b | ||
|
|
73599815ba | ||
|
|
66372e9743 | ||
|
|
0d7f92129b | ||
|
|
9da49d6116 | ||
|
|
7eeb9095e8 | ||
|
|
58281bb5ce | ||
|
|
f24dd3b289 | ||
|
|
51f2e5e7ec | ||
|
|
a937800ef0 | ||
|
|
c34d14edb5 | ||
|
|
8722e91c0f | ||
|
|
8038a8ac66 | ||
|
|
69a54c5fa9 | ||
|
|
aa508887f3 | ||
|
|
a53a96ecf5 | ||
|
|
82cddde15f | ||
|
|
def47fd5e2 | ||
|
|
04c70f54aa | ||
|
|
03e2feddb3 | ||
|
|
fc69909dd0 | ||
|
|
15fa42986a | ||
|
|
d8b4cf98dd | ||
|
|
ce62f3b273 | ||
|
|
8be2e3af0c | ||
|
|
e44c574068 | ||
|
|
c31aa17ce2 | ||
|
|
decac596d0 | ||
|
|
2d9604aa07 | ||
|
|
79c4ffa6c5 | ||
|
|
571b3a2c86 | ||
|
|
fa31fba586 | ||
|
|
2f3b261392 | ||
|
|
afd3cd6716 | ||
|
|
be99ef87ad | ||
|
|
572fc8545f | ||
|
|
239a943172 | ||
|
|
87614bc78a | ||
|
|
224d75fac5 | ||
|
|
f4e0a6121f | ||
|
|
80ee88b488 | ||
|
|
beb654825f | ||
|
|
79d8ccbf52 | ||
|
|
b48c74eca0 | ||
|
|
19e3dee706 | ||
|
|
e1be86c3ce | ||
|
|
11f7eddd7b | ||
|
|
7f28d2ea70 | ||
|
|
4607a8e274 | ||
|
|
26c559104a | ||
|
|
e15e884e65 | ||
|
|
b29401909f | ||
|
|
beb5e1a56c | ||
|
|
be08efeca3 | ||
|
|
4534ffaead | ||
|
|
d35dd2df1a | ||
|
|
2f3a9a5d96 | ||
|
|
fab94cd363 | ||
|
|
b06274866d | ||
|
|
5766c49f61 | ||
|
|
bc927d4c35 | ||
|
|
5804c54656 | ||
|
|
52f86cbce9 | ||
|
|
f6e2e4010f | ||
|
|
44613e12f1 | ||
|
|
b99e0b112b | ||
|
|
80b565c23f | ||
|
|
bee88c43e5 | ||
|
|
467fedbfe7 | ||
|
|
ba4e9ab7e3 | ||
|
|
1b4fa5e44a | ||
|
|
e92c9b2990 | ||
|
|
f23f8e9ade | ||
|
|
dc00aeece4 | ||
|
|
d8cdb7073e | ||
|
|
4fdea9b0ec | ||
|
|
3ded7687f7 | ||
|
|
42119425af | ||
|
|
93c7e1c44a | ||
|
|
381fd84839 | ||
|
|
67bab72783 | ||
|
|
b9c084a442 | ||
|
|
a77f345596 | ||
|
|
6a2f487ed5 | ||
|
|
616cf9029d | ||
|
|
3f21b4172b | ||
|
|
62f6a11522 | ||
|
|
ae1dce455d | ||
|
|
7b5dc52620 | ||
|
|
0bf50de54d | ||
|
|
1eec470902 | ||
|
|
867dc69479 | ||
|
|
9792f4ebc1 | ||
|
|
a44fc41caa | ||
|
|
1927dbf0ad | ||
|
|
7052674f32 | ||
|
|
9a487f3bb6 | ||
|
|
d6242c350d | ||
|
|
4cc4aceb41 | ||
|
|
dd8f4d6201 | ||
|
|
f44dcdf124 | ||
|
|
65e8f2317e | ||
|
|
1c4f43db7c | ||
|
|
24b9df6fbd | ||
|
|
c46891ecb0 | ||
|
|
e723601f6b | ||
|
|
77545df174 | ||
|
|
7e136b17a5 | ||
|
|
a970a06f57 | ||
|
|
95dd78d4aa | ||
|
|
eeaf33be20 | ||
|
|
7ed0cd26fe | ||
|
|
d26403c800 | ||
|
|
5ed6e3a6a3 | ||
|
|
7e83405370 | ||
|
|
a5de31da2b | ||
|
|
39c06005ed | ||
|
|
9479160044 | ||
|
|
46ec7369e5 | ||
|
|
424e7d742b | ||
|
|
44036399b9 | ||
|
|
e4394da467 | ||
|
|
b837ada3f8 | ||
|
|
a623de89aa | ||
|
|
2768407907 | ||
|
|
64ed35d2b1 | ||
|
|
b92f4dfa02 | ||
|
|
e4f02b7a51 | ||
|
|
24c3f45018 | ||
|
|
fcf55eb581 | ||
|
|
9ade7add32 | ||
|
|
d16dfcb4b4 | ||
|
|
37c58a5d32 | ||
|
|
e6cdde4f70 | ||
|
|
93c0adecbd | ||
|
|
33d44a5181 | ||
|
|
80e6fa7e7a | ||
|
|
b8eed48112 | ||
|
|
8d563dcfed | ||
|
|
1cf36e5549 | ||
|
|
1357a0628f | ||
|
|
c4fe0680f3 | ||
|
|
16694aa932 | ||
|
|
ea59ad2953 | ||
|
|
cf2f684e80 | ||
|
|
01522eda43 | ||
|
|
a200ee1310 | ||
|
|
579a07baa2 | ||
|
|
a82dd88b1f | ||
|
|
36ba98920a | ||
|
|
47cc0c34eb | ||
|
|
53eaca8724 | ||
|
|
8a2814b391 | ||
|
|
345c8ab217 | ||
|
|
7c010895e0 | ||
|
|
e716cfd19b | ||
|
|
461a6c8be5 | ||
|
|
3360f1a3f6 | ||
|
|
8b939e8a02 | ||
|
|
3a8998081c | ||
|
|
9b986a7b15 | ||
|
|
69ab395798 | ||
|
|
7aa3c33348 | ||
|
|
734328dd1f | ||
|
|
7d6c30e733 | ||
|
|
3e682dfe50 | ||
|
|
50efda3858 | ||
|
|
ca1b9e2bdb | ||
|
|
aa3a91b9d9 | ||
|
|
7117608445 | ||
|
|
6de640f53f | ||
|
|
75627ea40f | ||
|
|
0fa04d7d9a | ||
|
|
1e76ebe075 | ||
|
|
965da2fee3 | ||
|
|
b03f59ace3 | ||
|
|
79c7244b24 | ||
|
|
0843be3f4e | ||
|
|
6911f368e5 | ||
|
|
42167ea738 | ||
|
|
1c57d3506a | ||
|
|
8adc6fae4c | ||
|
|
e9746577ba | ||
|
|
9f68730622 | ||
|
|
f019b67b0c | ||
|
|
0f650c0572 | ||
|
|
dfc77ea0d0 | ||
|
|
67f514524f | ||
|
|
d97c6a0872 | ||
|
|
e7ad62760f | ||
|
|
fd34ea8124 | ||
|
|
5db94bf5b8 | ||
|
|
796d6d79d4 | ||
|
|
03aafafe1c | ||
|
|
3f303abc19 | ||
|
|
85d6958025 | ||
|
|
669bd7827b | ||
|
|
2b48f0c6a9 | ||
|
|
2c44d38906 | ||
|
|
750726ff6a | ||
|
|
dafab492fe | ||
|
|
6419c8dc3a | ||
|
|
3bb5ce5924 |
@@ -72,10 +72,10 @@ body:
|
||||
description: Please ensure your app is up to date. *If you are using a 3rd-party app, please reach out to them directly.*
|
||||
multiple: true
|
||||
options:
|
||||
- 'Android App - 0.9.79'
|
||||
- 'iOS App - 0.9.79'
|
||||
- 'Android App - 0.9.78'
|
||||
- 'iOS App - 0.9.78'
|
||||
- 'Android App - 0.10.0'
|
||||
- 'iOS App - 0.10.0'
|
||||
- 'Android App - 0.9.81'
|
||||
- 'iOS App - 0.9.81'
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
|
||||
@@ -43,10 +43,10 @@ body:
|
||||
description: Please ensure your app is up to date. *If you are using a 3rd-party app, please reach out to them directly.*
|
||||
multiple: true
|
||||
options:
|
||||
- Android App - 0.9.79
|
||||
- iOS App - 0.9.79
|
||||
- Android App - 0.9.78
|
||||
- iOS App - 0.9.78
|
||||
- 'Android App - 0.10.0'
|
||||
- 'iOS App - 0.10.0'
|
||||
- 'Android App - 0.9.81'
|
||||
- 'iOS App - 0.9.81'
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<!--
|
||||
For Work In Progress Pull Requests, please use the Draft PR feature,
|
||||
see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details.
|
||||
|
||||
If you do not follow this template, the PR may be closed without review.
|
||||
|
||||
Please ensure all checks pass.
|
||||
If you are a new contributor, the workflows will need to be manually approved before they run.
|
||||
-->
|
||||
|
||||
## Brief summary
|
||||
|
||||
<!-- Please provide a brief summary of what your PR attempts to achieve. -->
|
||||
|
||||
## Which issue is fixed?
|
||||
|
||||
<!-- Which issue number does this PR fix? Ex: "Fixes #1234" -->
|
||||
|
||||
## Pull Request Type
|
||||
|
||||
<!--
|
||||
Does this affect only Android, only iOS, or both?
|
||||
Does this change the frontend or the backend of the apps?
|
||||
-->
|
||||
|
||||
## In-depth Description
|
||||
|
||||
<!--
|
||||
Describe your solution in more depth.
|
||||
How does it work? Why is this the best solution?
|
||||
Does it solve a problem that affects multiple users or is this an edge case for your setup?
|
||||
-->
|
||||
|
||||
## How have you tested this?
|
||||
|
||||
<!-- Please describe in detail with reproducible steps how you tested your changes. -->
|
||||
|
||||
## Screenshots
|
||||
|
||||
<!-- If your PR includes any changes to the front-end, please include screenshots or a
|
||||
short video from before and after your changes. -->
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
java-version: 21
|
||||
|
||||
- name: install dependencies
|
||||
run: npm ci
|
||||
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"java.project.root": "android",
|
||||
"java.import.gradle.enabled": true,
|
||||
"java.import.gradle.wrapper.enabled": true,
|
||||
"java.import.gradle.user.home": "${workspaceFolder}/.gradle"
|
||||
}
|
||||
@@ -36,8 +36,8 @@ android {
|
||||
applicationId "com.audiobookshelf.app"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 110
|
||||
versionName "0.9.79-beta"
|
||||
versionCode 114
|
||||
versionName "0.10.1-beta"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
manifestPlaceholders = [
|
||||
"appAuthRedirectScheme": "com.audiobookshelf.app"
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
"plugins": {
|
||||
"CapacitorHttp": {
|
||||
"enabled": false
|
||||
},
|
||||
"StatusBar": {
|
||||
"backgroundColor": "#232323",
|
||||
"style": "DARK"
|
||||
}
|
||||
},
|
||||
"server": {
|
||||
|
||||
@@ -6,10 +6,15 @@ import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.ServiceConnection
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.os.IBinder
|
||||
import android.util.Log
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowInsets
|
||||
import android.webkit.WebView
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.view.updateLayoutParams
|
||||
import com.anggrayudi.storage.SimpleStorage
|
||||
import com.anggrayudi.storage.SimpleStorageHelper
|
||||
import com.audiobookshelf.app.managers.DbManager
|
||||
@@ -40,18 +45,6 @@ class MainActivity : BridgeActivity() {
|
||||
)
|
||||
|
||||
public override fun onCreate(savedInstanceState: Bundle?) {
|
||||
// TODO: Optimize using strict mode logs
|
||||
// StrictMode.setThreadPolicy(StrictMode.ThreadPolicy.Builder()
|
||||
// .detectDiskReads()
|
||||
// .detectDiskWrites().detectAll()
|
||||
// .detectNetwork() // or .detectAll() for all detectable problems
|
||||
// .penaltyLog()
|
||||
// .build())
|
||||
// StrictMode.setVmPolicy(VmPolicy.Builder()
|
||||
// .detectLeakedSqlLiteObjects()
|
||||
// .detectLeakedClosableObjects()
|
||||
// .penaltyLog()
|
||||
// .build())
|
||||
DbManager.initialize(applicationContext)
|
||||
|
||||
registerPlugin(AbsAudioPlayer::class.java)
|
||||
@@ -63,7 +56,47 @@ class MainActivity : BridgeActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
Log.d(tag, "onCreate")
|
||||
|
||||
// Update the margins to handle edge-to-edge enforced in SDK 35
|
||||
// See: https://developer.android.com/develop/ui/views/layout/edge-to-edge
|
||||
val webView: WebView = findViewById(R.id.webview)
|
||||
webView.setOnApplyWindowInsetsListener { v, insets ->
|
||||
val (left, top, right, bottom) = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
val sysInsets = insets.getInsets(WindowInsets.Type.systemBars())
|
||||
Log.d(tag, "safe sysInsets: $sysInsets")
|
||||
arrayOf(sysInsets.left, sysInsets.top, sysInsets.right, sysInsets.bottom)
|
||||
} else {
|
||||
arrayOf(
|
||||
insets.systemWindowInsetLeft,
|
||||
insets.systemWindowInsetTop,
|
||||
insets.systemWindowInsetRight,
|
||||
insets.systemWindowInsetBottom
|
||||
)
|
||||
}
|
||||
|
||||
// Inject as CSS variables
|
||||
// NOTE: Possibly able to use in the future to support edge-to-edge better.
|
||||
val js = """
|
||||
document.documentElement.style.setProperty('--safe-area-inset-top', '${top}px');
|
||||
document.documentElement.style.setProperty('--safe-area-inset-bottom', '${bottom}px');
|
||||
document.documentElement.style.setProperty('--safe-area-inset-left', '${left}px');
|
||||
document.documentElement.style.setProperty('--safe-area-inset-right', '${right}px');
|
||||
""".trimIndent()
|
||||
webView.evaluateJavascript(js, null)
|
||||
|
||||
// Set margins
|
||||
v.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||
leftMargin = left
|
||||
bottomMargin = bottom
|
||||
rightMargin = right
|
||||
topMargin = top
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
WindowInsets.CONSUMED
|
||||
} else {
|
||||
insets
|
||||
}
|
||||
}
|
||||
|
||||
val permission = ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)
|
||||
if (permission != PackageManager.PERMISSION_GRANTED) {
|
||||
|
||||
@@ -14,6 +14,7 @@ data class AudioTrack(
|
||||
var metadata: FileMetadata?,
|
||||
var isLocal: Boolean,
|
||||
var localFileId: String?,
|
||||
// TODO: This should no longer be necessary
|
||||
var serverIndex: Int? // Need to know if server track index is different
|
||||
) {
|
||||
|
||||
|
||||
@@ -32,11 +32,14 @@ enum class AndroidAutoBrowseSeriesSequenceOrderSetting {
|
||||
ASC, DESC
|
||||
}
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
data class ServerConnectionConfig(
|
||||
var id:String,
|
||||
var index:Int,
|
||||
var name:String,
|
||||
var address:String,
|
||||
// version added after 0.9.81-beta
|
||||
var version:String?,
|
||||
var userId:String,
|
||||
var username:String,
|
||||
var token:String,
|
||||
@@ -135,6 +138,7 @@ data class DeviceSettings(
|
||||
var sleepTimerLength: Long, // Time in milliseconds
|
||||
var disableSleepTimerFadeOut: Boolean,
|
||||
var disableSleepTimerResetFeedback: Boolean,
|
||||
var enableSleepTimerAlmostDoneChime: Boolean,
|
||||
var languageCode: String,
|
||||
var downloadUsingCellular: DownloadUsingCellularSetting,
|
||||
var streamingUsingCellular: StreamingUsingCellularSetting,
|
||||
@@ -163,6 +167,7 @@ data class DeviceSettings(
|
||||
autoSleepTimerAutoRewindTime = 300000L, // 5 minutes
|
||||
disableSleepTimerFadeOut = false,
|
||||
disableSleepTimerResetFeedback = false,
|
||||
enableSleepTimerAlmostDoneChime = false,
|
||||
languageCode = "en-us",
|
||||
downloadUsingCellular = DownloadUsingCellularSetting.ALWAYS,
|
||||
streamingUsingCellular = StreamingUsingCellularSetting.ALWAYS,
|
||||
@@ -188,9 +193,9 @@ data class DeviceSettings(
|
||||
|
||||
@JsonIgnore
|
||||
fun getShakeThresholdGravity() : Float { // Used in ShakeDetector
|
||||
return if (shakeSensitivity == ShakeSensitivitySetting.VERY_HIGH) 1.2f
|
||||
else if (shakeSensitivity == ShakeSensitivitySetting.HIGH) 1.4f
|
||||
else if (shakeSensitivity == ShakeSensitivitySetting.MEDIUM) 1.6f
|
||||
return if (shakeSensitivity == ShakeSensitivitySetting.VERY_HIGH) 1.1f
|
||||
else if (shakeSensitivity == ShakeSensitivitySetting.HIGH) 1.3f
|
||||
else if (shakeSensitivity == ShakeSensitivitySetting.MEDIUM) 1.5f
|
||||
else if (shakeSensitivity == ShakeSensitivitySetting.LOW) 2f
|
||||
else if (shakeSensitivity == ShakeSensitivitySetting.VERY_LOW) 2.7f
|
||||
else {
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
package com.audiobookshelf.app.data
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
|
||||
import com.fasterxml.jackson.core.json.JsonReadFeature
|
||||
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import com.fasterxml.jackson.module.kotlin.readValue
|
||||
import org.json.JSONObject
|
||||
|
||||
@@ -18,8 +17,7 @@ data class ItemInProgress(
|
||||
val isLocal: Boolean
|
||||
) {
|
||||
companion object {
|
||||
fun makeFromServerObject(serverItem: JSONObject):ItemInProgress {
|
||||
val jacksonMapper = jacksonObjectMapper().enable(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature())
|
||||
fun makeFromServerObject(serverItem: JSONObject, jacksonMapper: ObjectMapper):ItemInProgress {
|
||||
val libraryItem = jacksonMapper.readValue<LibraryItem>(serverItem.toString())
|
||||
|
||||
var episode:PodcastEpisode? = null
|
||||
|
||||
@@ -53,6 +53,11 @@ class LibraryItem(
|
||||
return Uri.parse("android.resource://${BuildConfig.APPLICATION_ID}/" + R.drawable.icon)
|
||||
}
|
||||
|
||||
// As of v2.17.0 token is not needed with cover image requests
|
||||
if (DeviceManager.isServerVersionGreaterThanOrEqualTo("2.17.0")) {
|
||||
return Uri.parse("${DeviceManager.serverAddress}/api/items/$id/cover")
|
||||
}
|
||||
|
||||
return Uri.parse("${DeviceManager.serverAddress}/api/items/$id/cover?token=${DeviceManager.token}")
|
||||
}
|
||||
|
||||
|
||||
@@ -149,6 +149,16 @@ class PlaybackSession(
|
||||
return total
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
fun checkIsServerVersionGte(compareVersion: String): Boolean {
|
||||
// Safety check this playback session is the same one currently connected (should always be)
|
||||
if (DeviceManager.serverConnectionConfigId != serverConnectionConfigId) {
|
||||
return false
|
||||
}
|
||||
|
||||
return DeviceManager.isServerVersionGreaterThanOrEqualTo(compareVersion)
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
fun getCoverUri(ctx: Context): Uri {
|
||||
if (localLibraryItem?.coverContentUrl != null) {
|
||||
@@ -168,12 +178,27 @@ class PlaybackSession(
|
||||
|
||||
if (coverPath == null)
|
||||
return Uri.parse("android.resource://${BuildConfig.APPLICATION_ID}/" + R.drawable.icon)
|
||||
|
||||
// As of v2.17.0 token is not needed with cover image requests
|
||||
if (checkIsServerVersionGte("2.17.0")) {
|
||||
return Uri.parse("$serverAddress/api/items/$libraryItemId/cover")
|
||||
}
|
||||
return Uri.parse("$serverAddress/api/items/$libraryItemId/cover?token=${DeviceManager.token}")
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
fun getContentUri(audioTrack: AudioTrack): Uri {
|
||||
if (isLocal) return Uri.parse(audioTrack.contentUrl) // Local content url
|
||||
// As of v2.22.0 tracks use a different endpoint
|
||||
// See: https://github.com/advplyr/audiobookshelf/pull/4263
|
||||
if (checkIsServerVersionGte("2.22.0")) {
|
||||
return if (isDirectPlay) {
|
||||
Uri.parse("$serverAddress/public/session/$id/track/${audioTrack.index}")
|
||||
} else {
|
||||
// Transcode uses HlsRouter on server
|
||||
Uri.parse("$serverAddress${audioTrack.contentUrl}")
|
||||
}
|
||||
}
|
||||
return Uri.parse("$serverAddress${audioTrack.contentUrl}?token=${DeviceManager.token}")
|
||||
}
|
||||
|
||||
@@ -264,14 +289,16 @@ class PlaybackSession(
|
||||
com.google.android.gms.cast.MediaMetadata.MEDIA_TYPE_AUDIOBOOK_CHAPTER
|
||||
)
|
||||
|
||||
// As of v2.17.0 token is not needed with cover image requests
|
||||
val coverUri = if (checkIsServerVersionGte("2.17.0")) {
|
||||
Uri.parse("$serverAddress/api/items/$libraryItemId/cover")
|
||||
} else {
|
||||
Uri.parse("$serverAddress/api/items/$libraryItemId/cover?token=${DeviceManager.token}")
|
||||
}
|
||||
|
||||
// Cast always uses server cover uri
|
||||
coverPath?.let {
|
||||
castMetadata.addImage(
|
||||
WebImage(
|
||||
Uri.parse(
|
||||
"$serverAddress/api/items/$libraryItemId/cover?token=${DeviceManager.token}"
|
||||
)
|
||||
)
|
||||
)
|
||||
castMetadata.addImage(WebImage(coverUri))
|
||||
}
|
||||
|
||||
castMetadata.putString(com.google.android.gms.cast.MediaMetadata.KEY_TITLE, displayTitle ?: "")
|
||||
|
||||
@@ -34,12 +34,14 @@ object DeviceManager {
|
||||
|
||||
val serverConnectionConfigId get() = serverConnectionConfig?.id ?: ""
|
||||
val serverConnectionConfigName get() = serverConnectionConfig?.name ?: ""
|
||||
val serverConnectionConfigString get() = serverConnectionConfig?.name ?: "No server connection"
|
||||
val serverAddress
|
||||
get() = serverConnectionConfig?.address ?: ""
|
||||
val serverUserId
|
||||
get() = serverConnectionConfig?.userId ?: ""
|
||||
val token
|
||||
get() = serverConnectionConfig?.token ?: ""
|
||||
val serverVersion get() = serverConnectionConfig?.version ?: ""
|
||||
val isConnectedToServer
|
||||
get() = serverConnectionConfig != null
|
||||
|
||||
@@ -63,6 +65,10 @@ object DeviceManager {
|
||||
if (deviceData.deviceSettings?.autoSleepTimerAutoRewindTime == null) {
|
||||
deviceData.deviceSettings?.autoSleepTimerAutoRewindTime = 300000L // 5 minutes
|
||||
}
|
||||
// Initialize sleep timer almost done chime added in v0.9.81
|
||||
if (deviceData.deviceSettings?.enableSleepTimerAlmostDoneChime == null) {
|
||||
deviceData.deviceSettings?.enableSleepTimerAlmostDoneChime = false
|
||||
}
|
||||
|
||||
// Language added in v0.9.69
|
||||
if (deviceData.deviceSettings?.languageCode == null) {
|
||||
@@ -106,6 +112,41 @@ object DeviceManager {
|
||||
return id?.let { deviceData.serverConnectionConfigs.find { it.id == id } }
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the currently connected server version is >= compareVersion
|
||||
* Abs server only uses major.minor.patch
|
||||
* Note: Version is returned in Abs auth payloads starting v2.6.0
|
||||
* Note: Version is saved with the server connection config starting after v0.9.81
|
||||
*
|
||||
* @example
|
||||
* serverVersion=2.25.1
|
||||
* isServerVersionGreaterThanOrEqualTo("2.26.0") = false
|
||||
*
|
||||
* serverVersion=2.26.1
|
||||
* isServerVersionGreaterThanOrEqualTo("2.26.0") = true
|
||||
*/
|
||||
fun isServerVersionGreaterThanOrEqualTo(compareVersion:String):Boolean {
|
||||
if (serverVersion == "") return false
|
||||
if (compareVersion == "") return true
|
||||
|
||||
val serverVersionParts = serverVersion.split(".").map { it.toIntOrNull() ?: 0 }
|
||||
val compareVersionParts = compareVersion.split(".").map { it.toIntOrNull() ?: 0 }
|
||||
|
||||
// Compare major, minor, and patch components
|
||||
for (i in 0 until maxOf(serverVersionParts.size, compareVersionParts.size)) {
|
||||
val serverVersionComponent = serverVersionParts.getOrElse(i) { 0 }
|
||||
val compareVersionComponent = compareVersionParts.getOrElse(i) { 0 }
|
||||
|
||||
if (serverVersionComponent < compareVersionComponent) {
|
||||
return false // Server version is less than compareVersion
|
||||
} else if (serverVersionComponent > compareVersionComponent) {
|
||||
return true // Server version is greater than compareVersion
|
||||
}
|
||||
}
|
||||
|
||||
return true // versions are equal in major, minor, and patch
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks the network connectivity status.
|
||||
* @param ctx The context to use for checking connectivity.
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ class InternalDownloadManager(
|
||||
*/
|
||||
@Throws(IOException::class)
|
||||
fun download(url: String) {
|
||||
val request: Request = Request.Builder().url(url).build()
|
||||
val request: Request = Request.Builder().url(url).addHeader("Accept-Encoding", "identity").build()
|
||||
client.newCall(request)
|
||||
.enqueue(
|
||||
object : Callback {
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.audiobookshelf.app.managers
|
||||
|
||||
import android.content.Context
|
||||
import android.security.keystore.KeyGenParameterSpec
|
||||
import android.security.keystore.KeyProperties
|
||||
import android.util.Base64
|
||||
import android.util.Log
|
||||
import java.security.KeyStore
|
||||
import javax.crypto.Cipher
|
||||
import javax.crypto.KeyGenerator
|
||||
import javax.crypto.SecretKey
|
||||
import javax.crypto.spec.GCMParameterSpec
|
||||
|
||||
class SecureStorage(private val context: Context) {
|
||||
companion object {
|
||||
private const val TAG = "SecureStorage"
|
||||
private const val KEYSTORE_PROVIDER = "AndroidKeyStore"
|
||||
private const val KEY_ALIAS = "AudiobookshelfRefreshTokens"
|
||||
private const val TRANSFORMATION = "AES/GCM/NoPadding"
|
||||
private const val IV_LENGTH = 12
|
||||
private const val TAG_LENGTH = 128
|
||||
}
|
||||
|
||||
private val keyStore = KeyStore.getInstance(KEYSTORE_PROVIDER).apply {
|
||||
load(null)
|
||||
}
|
||||
|
||||
/**
|
||||
* Encrypts and stores a refresh token for a specific server connection
|
||||
*/
|
||||
fun storeRefreshToken(serverConnectionId: String, refreshToken: String): Boolean {
|
||||
return try {
|
||||
val key = getOrCreateKey()
|
||||
val cipher = Cipher.getInstance(TRANSFORMATION)
|
||||
cipher.init(Cipher.ENCRYPT_MODE, key)
|
||||
|
||||
val encryptedBytes = cipher.doFinal(refreshToken.toByteArray(Charsets.UTF_8))
|
||||
val combined = cipher.iv + encryptedBytes
|
||||
|
||||
val encoded = Base64.encodeToString(combined, Base64.DEFAULT)
|
||||
|
||||
val sharedPrefs = context.getSharedPreferences("SecureStorage", Context.MODE_PRIVATE)
|
||||
sharedPrefs.edit().putString("refresh_token_$serverConnectionId", encoded).apply()
|
||||
|
||||
Log.d(TAG, "Successfully stored encrypted refresh token for server: $serverConnectionId")
|
||||
true
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to store refresh token for server: $serverConnectionId", e)
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves and decrypts a refresh token for a specific server connection
|
||||
*/
|
||||
fun getRefreshToken(serverConnectionId: String): String? {
|
||||
return try {
|
||||
val sharedPrefs = context.getSharedPreferences("SecureStorage", Context.MODE_PRIVATE)
|
||||
val encoded = sharedPrefs.getString("refresh_token_$serverConnectionId", null) ?: return null
|
||||
|
||||
val combined = Base64.decode(encoded, Base64.DEFAULT)
|
||||
val iv = combined.copyOfRange(0, IV_LENGTH)
|
||||
val encryptedBytes = combined.copyOfRange(IV_LENGTH, combined.size)
|
||||
|
||||
val key = getOrCreateKey()
|
||||
val cipher = Cipher.getInstance(TRANSFORMATION)
|
||||
val spec = GCMParameterSpec(TAG_LENGTH, iv)
|
||||
cipher.init(Cipher.DECRYPT_MODE, key, spec)
|
||||
|
||||
val decryptedBytes = cipher.doFinal(encryptedBytes)
|
||||
String(decryptedBytes, Charsets.UTF_8)
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to retrieve refresh token for server: $serverConnectionId", e)
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a refresh token for a specific server connection
|
||||
*/
|
||||
fun removeRefreshToken(serverConnectionId: String): Boolean {
|
||||
return try {
|
||||
val sharedPrefs = context.getSharedPreferences("SecureStorage", Context.MODE_PRIVATE)
|
||||
sharedPrefs.edit().remove("refresh_token_$serverConnectionId").apply()
|
||||
Log.d(TAG, "Successfully removed refresh token for server: $serverConnectionId")
|
||||
true
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Failed to remove refresh token for server: $serverConnectionId", e)
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a refresh token exists for a specific server connection
|
||||
*/
|
||||
fun hasRefreshToken(serverConnectionId: String): Boolean {
|
||||
val sharedPrefs = context.getSharedPreferences("SecureStorage", Context.MODE_PRIVATE)
|
||||
return sharedPrefs.contains("refresh_token_$serverConnectionId")
|
||||
}
|
||||
|
||||
private fun getOrCreateKey(): SecretKey {
|
||||
return if (keyStore.containsAlias(KEY_ALIAS)) {
|
||||
keyStore.getKey(KEY_ALIAS, null) as SecretKey
|
||||
} else {
|
||||
createKey()
|
||||
}
|
||||
}
|
||||
|
||||
private fun createKey(): SecretKey {
|
||||
val keyGenerator = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES, KEYSTORE_PROVIDER)
|
||||
val keyGenSpec = KeyGenParameterSpec.Builder(
|
||||
KEY_ALIAS,
|
||||
KeyProperties.PURPOSE_ENCRYPT or KeyProperties.PURPOSE_DECRYPT
|
||||
)
|
||||
.setBlockModes(KeyProperties.BLOCK_MODE_GCM)
|
||||
.setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE)
|
||||
.setUserAuthenticationRequired(false)
|
||||
.setRandomizedEncryptionRequired(true)
|
||||
.build()
|
||||
|
||||
keyGenerator.init(keyGenSpec)
|
||||
return keyGenerator.generateKey()
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,20 @@
|
||||
package com.audiobookshelf.app.managers
|
||||
|
||||
import android.content.Context
|
||||
import android.media.MediaPlayer
|
||||
import android.os.*
|
||||
import android.util.Log
|
||||
import com.audiobookshelf.app.R
|
||||
import com.audiobookshelf.app.device.DeviceManager
|
||||
import com.audiobookshelf.app.player.PlayerNotificationService
|
||||
import com.audiobookshelf.app.player.SLEEP_TIMER_WAKE_UP_EXPIRATION
|
||||
import com.audiobookshelf.app.plugins.AbsLogger
|
||||
import java.util.*
|
||||
import kotlin.concurrent.schedule
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
const val SLEEP_TIMER_CHIME_SOUND_VOLUME = 0.7f
|
||||
|
||||
class SleepTimerManager
|
||||
constructor(private val playerNotificationService: PlayerNotificationService) {
|
||||
private val tag = "SleepTimerManager"
|
||||
@@ -156,6 +161,10 @@ constructor(private val playerNotificationService: PlayerNotificationService) {
|
||||
)
|
||||
}
|
||||
|
||||
if (sleepTimeSecondsRemaining == 30 && sleepTimerElapsed > 1 && DeviceManager.deviceData.deviceSettings?.enableSleepTimerAlmostDoneChime == true) {
|
||||
playChimeSound()
|
||||
}
|
||||
|
||||
if (sleepTimeSecondsRemaining <= 0) {
|
||||
Log.d(tag, "Sleep Timer Pausing Player on Chapter")
|
||||
pause()
|
||||
@@ -263,6 +272,18 @@ constructor(private val playerNotificationService: PlayerNotificationService) {
|
||||
}
|
||||
}
|
||||
|
||||
/** Plays chime sound */
|
||||
private fun playChimeSound() {
|
||||
AbsLogger.info(tag, "playChimeSound: Playing sleep timer chime sound")
|
||||
val ctx = playerNotificationService.getContext()
|
||||
val mediaPlayer = MediaPlayer.create(ctx, R.raw.bell)
|
||||
mediaPlayer.setVolume(SLEEP_TIMER_CHIME_SOUND_VOLUME, SLEEP_TIMER_CHIME_SOUND_VOLUME)
|
||||
mediaPlayer.start()
|
||||
mediaPlayer.setOnCompletionListener {
|
||||
mediaPlayer.release()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the chapter end time for use in End of Chapter timers. If less than 10 seconds remain in
|
||||
* the chapter, then use the next chapter.
|
||||
|
||||
@@ -15,6 +15,7 @@ import org.json.JSONException
|
||||
import org.json.JSONObject
|
||||
import kotlin.coroutines.resume
|
||||
import kotlin.coroutines.suspendCoroutine
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
class MediaManager(private var apiHandler: ApiHandler, var ctx: Context) {
|
||||
val tag = "MediaManager"
|
||||
@@ -136,7 +137,6 @@ class MediaManager(private var apiHandler: ApiHandler, var ctx: Context) {
|
||||
val serverConnConfig = if (DeviceManager.isConnectedToServer) DeviceManager.serverConnectionConfig else DeviceManager.deviceData.getLastServerConnectionConfig()
|
||||
|
||||
if (!DeviceManager.isConnectedToServer || !DeviceManager.checkConnectivity(ctx) || serverConnConfig == null || serverConnConfig.id !== serverConfigIdUsed) {
|
||||
Log.d(tag, "Reset caches")
|
||||
podcastEpisodeLibraryItemMap = mutableMapOf()
|
||||
serverLibraries = listOf()
|
||||
serverLibraryItems = mutableListOf()
|
||||
@@ -176,21 +176,20 @@ class MediaManager(private var apiHandler: ApiHandler, var ctx: Context) {
|
||||
* Load personalized shelves from server for all libraries.
|
||||
* [cb] resolves when all libraries are processed
|
||||
*/
|
||||
fun populatePersonalizedDataForAllLibraries(cb: () -> Unit ) {
|
||||
serverLibraries.forEach {
|
||||
libraryPersonalizationsDone++
|
||||
Log.d(tag, "Loading personalization for library ${it.name} - ${it.id} - ${it.mediaType}")
|
||||
populatePersonalizedDataForLibrary(it.id) {
|
||||
Log.d(tag, "Loaded personalization for library ${it.name} - ${it.id} - ${it.mediaType}")
|
||||
libraryPersonalizationsDone--
|
||||
fun populatePersonalizedDataForAllLibraries(cb: () -> Unit) {
|
||||
val remaining = AtomicInteger(serverLibraries.size)
|
||||
|
||||
serverLibraries.forEach { lib ->
|
||||
Log.d(tag, "Loading personalization for library ${lib.name}")
|
||||
populatePersonalizedDataForLibrary(lib.id) {
|
||||
Log.d(tag, "Loaded personalization for library ${lib.name}")
|
||||
if (remaining.decrementAndGet() == 0) {
|
||||
Log.d(tag, "Finished loading all library personalization data")
|
||||
allLibraryPersonalizationsDone = true
|
||||
cb()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (libraryPersonalizationsDone > 0) { }
|
||||
|
||||
Log.d(tag, "Finished loading all library personalization data")
|
||||
allLibraryPersonalizationsDone = true
|
||||
cb()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+7
-4
@@ -7,7 +7,6 @@ import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.provider.MediaStore
|
||||
import android.support.v4.media.session.MediaControllerCompat
|
||||
import android.util.Log
|
||||
import com.audiobookshelf.app.BuildConfig
|
||||
import com.audiobookshelf.app.R
|
||||
import com.bumptech.glide.Glide
|
||||
@@ -15,7 +14,7 @@ import com.google.android.exoplayer2.Player
|
||||
import com.google.android.exoplayer2.ui.PlayerNotificationManager
|
||||
import kotlinx.coroutines.*
|
||||
|
||||
class AbMediaDescriptionAdapter constructor(private val controller: MediaControllerCompat, private val playerNotificationService: PlayerNotificationService) : PlayerNotificationManager.MediaDescriptionAdapter {
|
||||
class AbMediaDescriptionAdapter (private val controller: MediaControllerCompat, private val playerNotificationService: PlayerNotificationService) : PlayerNotificationManager.MediaDescriptionAdapter {
|
||||
private val tag = "MediaDescriptionAdapter"
|
||||
|
||||
private var currentIconUri: Uri? = null
|
||||
@@ -36,12 +35,17 @@ class AbMediaDescriptionAdapter constructor(private val controller: MediaControl
|
||||
callback: PlayerNotificationManager.BitmapCallback
|
||||
): Bitmap? {
|
||||
val albumArtUri = controller.metadata.description.iconUri
|
||||
val albumBitmap = controller.metadata.description.iconBitmap
|
||||
|
||||
// For local cover images, bitmap is set in PlayerNotificationService TimelineQueueNavigator.getMediaDescription
|
||||
if (albumBitmap != null) {
|
||||
return albumBitmap
|
||||
}
|
||||
|
||||
return if (currentIconUri != albumArtUri || currentBitmap == null) {
|
||||
// Cache the bitmap for the current audiobook so that successive calls to
|
||||
// `getCurrentLargeIcon` don't cause the bitmap to be recreated.
|
||||
currentIconUri = albumArtUri
|
||||
Log.d(tag, "ART $currentIconUri")
|
||||
|
||||
if (currentIconUri.toString().startsWith("content://")) {
|
||||
currentBitmap = if (Build.VERSION.SDK_INT < 28) {
|
||||
@@ -61,7 +65,6 @@ class AbMediaDescriptionAdapter constructor(private val controller: MediaControl
|
||||
}
|
||||
null
|
||||
}
|
||||
|
||||
} else {
|
||||
currentBitmap
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import android.util.Log
|
||||
import android.view.KeyEvent
|
||||
import com.audiobookshelf.app.data.LibraryItemWrapper
|
||||
import com.audiobookshelf.app.data.PodcastEpisode
|
||||
import com.audiobookshelf.app.device.DeviceManager
|
||||
import java.util.*
|
||||
import kotlin.concurrent.schedule
|
||||
|
||||
|
||||
+83
-31
@@ -311,17 +311,20 @@ class PlayerNotificationService : MediaBrowserServiceCompat() {
|
||||
|
||||
val coverUri = currentPlaybackSession!!.getCoverUri(ctx)
|
||||
|
||||
|
||||
var bitmap: Bitmap? = null
|
||||
// Local covers get bitmap
|
||||
// Local covers get bitmap
|
||||
// Note: In Android Auto for local cover images, setting the icon uri to a local path does not work (cover is blank)
|
||||
// so we create and set the bitmap here instead of AbMediaDescriptionAdapter
|
||||
if (currentPlaybackSession!!.localLibraryItem?.coverContentUrl != null) {
|
||||
bitmap =
|
||||
if (Build.VERSION.SDK_INT < 28) {
|
||||
MediaStore.Images.Media.getBitmap(ctx.contentResolver, coverUri)
|
||||
} else {
|
||||
val source: ImageDecoder.Source =
|
||||
ImageDecoder.createSource(ctx.contentResolver, coverUri)
|
||||
ImageDecoder.decodeBitmap(source)
|
||||
}
|
||||
if (Build.VERSION.SDK_INT < 28) {
|
||||
MediaStore.Images.Media.getBitmap(ctx.contentResolver, coverUri)
|
||||
} else {
|
||||
val source: ImageDecoder.Source =
|
||||
ImageDecoder.createSource(ctx.contentResolver, coverUri)
|
||||
ImageDecoder.decodeBitmap(source)
|
||||
}
|
||||
}
|
||||
|
||||
// Fix for local images crashing on Android 11 for specific devices
|
||||
@@ -348,7 +351,7 @@ class PlayerNotificationService : MediaBrowserServiceCompat() {
|
||||
.setTitle(currentPlaybackSession!!.displayTitle)
|
||||
|
||||
bitmap?.let { mediaDescriptionBuilder.setIconBitmap(it) }
|
||||
?: mediaDescriptionBuilder.setIconUri(coverUri)
|
||||
?: mediaDescriptionBuilder.setIconUri(coverUri)
|
||||
|
||||
return mediaDescriptionBuilder.build()
|
||||
}
|
||||
@@ -1084,6 +1087,26 @@ class PlayerNotificationService : MediaBrowserServiceCompat() {
|
||||
private val DOWNLOADS_ROOT = "__DOWNLOADS__"
|
||||
private val CONTINUE_ROOT = "__CONTINUE__"
|
||||
private lateinit var browseTree: BrowseTree
|
||||
private val browseTreeInitListeners = mutableListOf<() -> Unit>()
|
||||
|
||||
private fun waitForBrowseTree(cb: () -> Unit)
|
||||
{
|
||||
if (this::browseTree.isInitialized)
|
||||
{
|
||||
cb()
|
||||
}
|
||||
else
|
||||
{
|
||||
browseTreeInitListeners += cb
|
||||
}
|
||||
}
|
||||
|
||||
private fun onBrowseTreeInitialized()
|
||||
{
|
||||
// Called after browseTree is assigned for the first time
|
||||
browseTreeInitListeners.forEach { it.invoke() }
|
||||
browseTreeInitListeners.clear()
|
||||
}
|
||||
|
||||
// Only allowing android auto or similar to access media browser service
|
||||
// normal loading of audiobooks is handled in webview (not natively)
|
||||
@@ -1106,11 +1129,12 @@ class PlayerNotificationService : MediaBrowserServiceCompat() {
|
||||
// No further calls will be made to other media browsing methods.
|
||||
null
|
||||
} else {
|
||||
Log.d(tag, "Android Auto starting $clientPackageName $clientUid")
|
||||
AbsLogger.info(tag, "onGetRoot: clientPackageName: $clientPackageName, clientUid: $clientUid")
|
||||
isStarted = true
|
||||
|
||||
// Reset cache if no longer connected to server or server changed
|
||||
if (mediaManager.checkResetServerItems()) {
|
||||
AbsLogger.info(tag, "onGetRoot: Reset Android Auto server items cache (${DeviceManager.serverConnectionConfigString})")
|
||||
forceReloadingAndroidAuto = true
|
||||
}
|
||||
|
||||
@@ -1135,7 +1159,7 @@ class PlayerNotificationService : MediaBrowserServiceCompat() {
|
||||
parentMediaId: String,
|
||||
result: Result<MutableList<MediaBrowserCompat.MediaItem>>
|
||||
) {
|
||||
Log.d(tag, "ON LOAD CHILDREN $parentMediaId")
|
||||
AbsLogger.info(tag, "onLoadChildren: parentMediaId: $parentMediaId (${DeviceManager.serverConnectionConfigString})")
|
||||
|
||||
result.detach()
|
||||
|
||||
@@ -1146,7 +1170,6 @@ class PlayerNotificationService : MediaBrowserServiceCompat() {
|
||||
}
|
||||
|
||||
if (parentMediaId == DOWNLOADS_ROOT) { // Load downloads
|
||||
|
||||
val localBooks = DeviceManager.dbManager.getLocalLibraryItems("book")
|
||||
val localPodcasts = DeviceManager.dbManager.getLocalLibraryItems("podcast")
|
||||
val localBrowseItems: MutableList<MediaBrowserCompat.MediaItem> = mutableListOf()
|
||||
@@ -1243,8 +1266,10 @@ class PlayerNotificationService : MediaBrowserServiceCompat() {
|
||||
Log.d(tag, "Trying to initialize browseTree.")
|
||||
if (!this::browseTree.isInitialized || forceReloadingAndroidAuto) {
|
||||
forceReloadingAndroidAuto = false
|
||||
AbsLogger.info(tag, "onLoadChildren: Loading Android Auto items")
|
||||
mediaManager.loadAndroidAutoItems {
|
||||
Log.d(tag, "android auto loaded. Starting browseTree initialize")
|
||||
AbsLogger.info(tag, "onLoadChildren: Loaded Android Auto data, initializing browseTree")
|
||||
|
||||
browseTree =
|
||||
BrowseTree(
|
||||
this,
|
||||
@@ -1252,6 +1277,7 @@ class PlayerNotificationService : MediaBrowserServiceCompat() {
|
||||
mediaManager.serverLibraries,
|
||||
mediaManager.allLibraryPersonalizationsDone
|
||||
)
|
||||
onBrowseTreeInitialized()
|
||||
val children =
|
||||
browseTree[parentMediaId]?.map { item ->
|
||||
Log.d(tag, "Found top menu item: ${item.description.title}")
|
||||
@@ -1260,15 +1286,21 @@ class PlayerNotificationService : MediaBrowserServiceCompat() {
|
||||
MediaBrowserCompat.MediaItem.FLAG_BROWSABLE
|
||||
)
|
||||
}
|
||||
Log.d(tag, "browseTree initialize and android auto loaded")
|
||||
|
||||
result.sendResult(children as MutableList<MediaBrowserCompat.MediaItem>?)
|
||||
firstLoadDone = true
|
||||
if (mediaManager.serverLibraries.isNotEmpty()) {
|
||||
Log.d(tag, "Starting personalization fetch")
|
||||
mediaManager.populatePersonalizedDataForAllLibraries { notifyChildrenChanged("/") }
|
||||
AbsLogger.info(tag, "onLoadChildren: Android Auto fetching personalized data for all libraries")
|
||||
mediaManager.populatePersonalizedDataForAllLibraries {
|
||||
AbsLogger.info(tag, "onLoadChildren: Android Auto loaded personalized data for all libraries")
|
||||
notifyChildrenChanged("/")
|
||||
}
|
||||
|
||||
Log.d(tag, "Initialize inprogress items")
|
||||
mediaManager.initializeInProgressItems { notifyChildrenChanged("/") }
|
||||
AbsLogger.info(tag, "onLoadChildren: Android Auto fetching in progress items")
|
||||
mediaManager.initializeInProgressItems {
|
||||
AbsLogger.info(tag, "onLoadChildren: Android Auto loaded in progress items")
|
||||
notifyChildrenChanged("/")
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1280,6 +1312,7 @@ class PlayerNotificationService : MediaBrowserServiceCompat() {
|
||||
mediaManager.serverLibraries,
|
||||
mediaManager.allLibraryPersonalizationsDone
|
||||
)
|
||||
onBrowseTreeInitialized()
|
||||
val children =
|
||||
browseTree[parentMediaId]?.map { item ->
|
||||
Log.d(tag, "Found top menu item: ${item.description.title}")
|
||||
@@ -1288,25 +1321,44 @@ class PlayerNotificationService : MediaBrowserServiceCompat() {
|
||||
MediaBrowserCompat.MediaItem.FLAG_BROWSABLE
|
||||
)
|
||||
}
|
||||
Log.d(tag, "browseTree initialize and android auto loaded")
|
||||
|
||||
AbsLogger.info(tag, "onLoadChildren: Android auto data loaded")
|
||||
result.sendResult(children as MutableList<MediaBrowserCompat.MediaItem>?)
|
||||
}
|
||||
} else if (parentMediaId == LIBRARIES_ROOT || parentMediaId == RECENTLY_ROOT) {
|
||||
} else if (parentMediaId == LIBRARIES_ROOT || parentMediaId == RECENTLY_ROOT)
|
||||
{
|
||||
Log.d(tag, "First load done: $firstLoadDone")
|
||||
if (!firstLoadDone) {
|
||||
if (!firstLoadDone)
|
||||
{
|
||||
result.sendResult(null)
|
||||
return
|
||||
}
|
||||
// Wait until top-menu is initialized
|
||||
while (!this::browseTree.isInitialized) {}
|
||||
val children =
|
||||
browseTree[parentMediaId]?.map { item ->
|
||||
Log.d(tag, "[MENU: $parentMediaId] Showing list item ${item.description.title}")
|
||||
MediaBrowserCompat.MediaItem(
|
||||
item.description,
|
||||
MediaBrowserCompat.MediaItem.FLAG_BROWSABLE
|
||||
)
|
||||
}
|
||||
|
||||
if (!this::browseTree.isInitialized)
|
||||
{
|
||||
// ✅ good: detach and wait for init
|
||||
result.detach()
|
||||
waitForBrowseTree {
|
||||
val children = browseTree[parentMediaId]?.map { item ->
|
||||
Log.d(tag, "[MENU: $parentMediaId] Showing list item ${item.description.title}")
|
||||
MediaBrowserCompat.MediaItem(
|
||||
item.description,
|
||||
MediaBrowserCompat.MediaItem.FLAG_BROWSABLE
|
||||
)
|
||||
}
|
||||
result.sendResult(children as MutableList<MediaBrowserCompat.MediaItem>?)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Already initialized: just return
|
||||
val children = browseTree[parentMediaId]?.map { item ->
|
||||
Log.d(tag, "[MENU: $parentMediaId] Showing list item ${item.description.title}")
|
||||
MediaBrowserCompat.MediaItem(
|
||||
item.description,
|
||||
MediaBrowserCompat.MediaItem.FLAG_BROWSABLE
|
||||
)
|
||||
}
|
||||
result.sendResult(children as MutableList<MediaBrowserCompat.MediaItem>?)
|
||||
} else if (mediaManager.getIsLibrary(parentMediaId)) { // Load library items for library
|
||||
Log.d(tag, "Loading items for library $parentMediaId")
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.hardware.SensorEvent
|
||||
import android.hardware.SensorEventListener
|
||||
import android.hardware.SensorManager
|
||||
import com.audiobookshelf.app.device.DeviceManager
|
||||
import com.audiobookshelf.app.plugins.AbsLogger
|
||||
import kotlin.math.sqrt
|
||||
|
||||
class ShakeDetector : SensorEventListener {
|
||||
@@ -46,6 +47,7 @@ class ShakeDetector : SensorEventListener {
|
||||
if (mShakeTimestamp + SHAKE_COUNT_RESET_TIME_MS < now) {
|
||||
mShakeCount = 0
|
||||
}
|
||||
AbsLogger.info("ShakeDetector", "Device shake above threshold ($gForce > $shakeThreshold)")
|
||||
mShakeTimestamp = now
|
||||
mShakeCount++
|
||||
mListener!!.onShake(mShakeCount)
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.audiobookshelf.app.data.*
|
||||
import com.audiobookshelf.app.device.DeviceManager
|
||||
import com.audiobookshelf.app.media.MediaEventManager
|
||||
import com.audiobookshelf.app.server.ApiHandler
|
||||
import com.audiobookshelf.app.managers.SecureStorage
|
||||
import com.fasterxml.jackson.core.json.JsonReadFeature
|
||||
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
||||
import com.fasterxml.jackson.module.kotlin.readValue
|
||||
@@ -22,17 +23,21 @@ class AbsDatabase : Plugin() {
|
||||
val tag = "AbsDatabase"
|
||||
private var jacksonMapper = jacksonObjectMapper().enable(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature())
|
||||
|
||||
lateinit var mainActivity: MainActivity
|
||||
lateinit var apiHandler: ApiHandler
|
||||
private lateinit var mainActivity: MainActivity
|
||||
private lateinit var apiHandler: ApiHandler
|
||||
private lateinit var secureStorage: SecureStorage
|
||||
|
||||
data class LocalMediaProgressPayload(val value:List<LocalMediaProgress>)
|
||||
data class LocalLibraryItemsPayload(val value:List<LocalLibraryItem>)
|
||||
data class LocalFoldersPayload(val value:List<LocalFolder>)
|
||||
data class ServerConnConfigPayload(val id:String?, val index:Int, val name:String?, val userId:String, val username:String, val token:String, val address:String?, val customHeaders:Map<String,String>?)
|
||||
data class ServerConnConfigPayload(val id:String?, val index:Int, val name:String?, val userId:String, val username:String, var version:String, val token:String, val refreshToken:String?, val address:String?, val customHeaders:Map<String,String>?)
|
||||
|
||||
override fun load() {
|
||||
mainActivity = (activity as MainActivity)
|
||||
apiHandler = ApiHandler(mainActivity)
|
||||
ApiHandler.absDatabaseNotifyListeners = ::notifyListeners
|
||||
|
||||
secureStorage = SecureStorage(mainActivity)
|
||||
|
||||
DeviceManager.dbManager.cleanLocalMediaProgress()
|
||||
DeviceManager.dbManager.cleanLocalLibraryItems()
|
||||
@@ -120,7 +125,9 @@ class AbsDatabase : Plugin() {
|
||||
|
||||
val userId = serverConfigPayload.userId
|
||||
val username = serverConfigPayload.username
|
||||
val token = serverConfigPayload.token
|
||||
val serverVersion = serverConfigPayload.version
|
||||
val accessToken = serverConfigPayload.token
|
||||
val refreshToken = serverConfigPayload.refreshToken // Refresh only sent after login or refresh
|
||||
|
||||
GlobalScope.launch(Dispatchers.IO) {
|
||||
if (serverConnectionConfig == null) { // New Server Connection
|
||||
@@ -129,7 +136,16 @@ class AbsDatabase : Plugin() {
|
||||
// Create new server connection config
|
||||
val sscId = DeviceManager.getBase64Id("$serverAddress@$username")
|
||||
val sscIndex = DeviceManager.deviceData.serverConnectionConfigs.size
|
||||
serverConnectionConfig = ServerConnectionConfig(sscId, sscIndex, "$serverAddress ($username)", serverAddress, userId, username, token, serverConfigPayload.customHeaders)
|
||||
|
||||
// Store refresh token securely if provided
|
||||
val hasRefreshToken = if (!refreshToken.isNullOrEmpty()) {
|
||||
secureStorage.storeRefreshToken(sscId, refreshToken)
|
||||
} else {
|
||||
false
|
||||
}
|
||||
Log.d(tag, "Refresh token secured = $hasRefreshToken")
|
||||
|
||||
serverConnectionConfig = ServerConnectionConfig(sscId, sscIndex, "$serverAddress ($username)", serverAddress, serverVersion, userId, username, accessToken, serverConfigPayload.customHeaders)
|
||||
|
||||
// Add and save
|
||||
DeviceManager.deviceData.serverConnectionConfigs.add(serverConnectionConfig!!)
|
||||
@@ -137,14 +153,21 @@ class AbsDatabase : Plugin() {
|
||||
DeviceManager.dbManager.saveDeviceData(DeviceManager.deviceData)
|
||||
} else {
|
||||
var shouldSave = false
|
||||
if (serverConnectionConfig?.username != username || serverConnectionConfig?.token != token) {
|
||||
if (serverConnectionConfig?.username != username || serverConnectionConfig?.token != accessToken || serverConnectionConfig?.version != serverVersion) {
|
||||
serverConnectionConfig?.userId = userId
|
||||
serverConnectionConfig?.username = username
|
||||
serverConnectionConfig?.name = "${serverConnectionConfig?.address} (${serverConnectionConfig?.username})"
|
||||
serverConnectionConfig?.token = token
|
||||
serverConnectionConfig?.version = serverVersion
|
||||
serverConnectionConfig?.token = accessToken
|
||||
shouldSave = true
|
||||
}
|
||||
|
||||
// Update refresh token if provided
|
||||
if (!refreshToken.isNullOrEmpty()) {
|
||||
val stored = secureStorage.storeRefreshToken(serverConnectionConfig!!.id, refreshToken)
|
||||
Log.d(tag, "Refresh token secured = $stored")
|
||||
}
|
||||
|
||||
// Set last connection config
|
||||
if (DeviceManager.deviceData.lastServerConnectionConfigId != serverConfigPayload.id) {
|
||||
DeviceManager.deviceData.lastServerConnectionConfigId = serverConfigPayload.id
|
||||
@@ -163,6 +186,10 @@ class AbsDatabase : Plugin() {
|
||||
fun removeServerConnectionConfig(call:PluginCall) {
|
||||
GlobalScope.launch(Dispatchers.IO) {
|
||||
val serverConnectionConfigId = call.getString("serverConnectionConfigId", "").toString()
|
||||
|
||||
// Remove refresh token if it exists
|
||||
secureStorage.removeRefreshToken(serverConnectionConfigId)
|
||||
|
||||
DeviceManager.deviceData.serverConnectionConfigs = DeviceManager.deviceData.serverConnectionConfigs.filter { it.id != serverConnectionConfigId } as MutableList<ServerConnectionConfig>
|
||||
if (DeviceManager.deviceData.lastServerConnectionConfigId == serverConnectionConfigId) {
|
||||
DeviceManager.deviceData.lastServerConnectionConfigId = null
|
||||
@@ -175,6 +202,42 @@ class AbsDatabase : Plugin() {
|
||||
}
|
||||
}
|
||||
|
||||
@PluginMethod
|
||||
fun getRefreshToken(call:PluginCall) {
|
||||
val serverConnectionConfigId = call.getString("serverConnectionConfigId", "").toString()
|
||||
|
||||
GlobalScope.launch(Dispatchers.IO) {
|
||||
val refreshToken = secureStorage.getRefreshToken(serverConnectionConfigId)
|
||||
if (refreshToken != null) {
|
||||
val result = JSObject()
|
||||
result.put("refreshToken", refreshToken)
|
||||
call.resolve(result)
|
||||
} else {
|
||||
call.resolve()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@PluginMethod
|
||||
fun clearRefreshToken(call:PluginCall) {
|
||||
val serverConnectionConfigId = call.getString("serverConnectionConfigId", "").toString()
|
||||
|
||||
val refreshToken = secureStorage.removeRefreshToken(serverConnectionConfigId)
|
||||
val result = JSObject()
|
||||
result.put("success", refreshToken)
|
||||
call.resolve(result)
|
||||
}
|
||||
|
||||
@PluginMethod
|
||||
fun getAccessToken(call:PluginCall) {
|
||||
val serverConnectionConfigId = call.getString("serverConnectionConfigId", "").toString()
|
||||
val serverConnectionConfig = DeviceManager.deviceData.serverConnectionConfigs.find { it.id == serverConnectionConfigId }
|
||||
val token = serverConnectionConfig?.token ?: ""
|
||||
val ret = JSObject()
|
||||
ret.put("token", token)
|
||||
call.resolve(ret)
|
||||
}
|
||||
|
||||
@PluginMethod
|
||||
fun logout(call:PluginCall) {
|
||||
GlobalScope.launch(Dispatchers.IO) {
|
||||
|
||||
@@ -29,16 +29,16 @@ class AbsLogger : Plugin() {
|
||||
onLogEmitter = { log:AbsLog ->
|
||||
notifyListeners("onLog", JSObject(jacksonMapper.writeValueAsString(log)))
|
||||
}
|
||||
Log.i("AbsLogger", "Initialize AbsLogger plugin")
|
||||
info("AbsLogger", "load: AbsLogger plugin initialized")
|
||||
}
|
||||
|
||||
companion object {
|
||||
lateinit var onLogEmitter:(log:AbsLog) -> Unit
|
||||
var onLogEmitter:((log:AbsLog) -> Unit)? = null
|
||||
|
||||
fun log(level:String, tag:String, message:String) {
|
||||
val absLog = AbsLog(id = UUID.randomUUID().toString(), tag, level, message, timestamp = System.currentTimeMillis())
|
||||
DeviceManager.dbManager.saveLog(absLog)
|
||||
onLogEmitter(absLog)
|
||||
onLogEmitter?.let { it(absLog) }
|
||||
}
|
||||
fun info(tag:String, message:String) {
|
||||
Log.i("AbsLogger", message)
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.audiobookshelf.app.media.SyncResult
|
||||
import com.audiobookshelf.app.models.User
|
||||
import com.audiobookshelf.app.BuildConfig
|
||||
import com.audiobookshelf.app.plugins.AbsLogger
|
||||
import com.audiobookshelf.app.managers.SecureStorage
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
|
||||
import com.fasterxml.jackson.core.json.JsonReadFeature
|
||||
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
||||
@@ -33,9 +34,19 @@ import java.util.concurrent.TimeUnit
|
||||
class ApiHandler(var ctx:Context) {
|
||||
val tag = "ApiHandler"
|
||||
|
||||
companion object {
|
||||
// For sending data back to the Webview frontend
|
||||
lateinit var absDatabaseNotifyListeners:(String, JSObject) -> Unit
|
||||
|
||||
fun checkAbsDatabaseNotifyListenersInitted():Boolean {
|
||||
return ::absDatabaseNotifyListeners.isInitialized
|
||||
}
|
||||
}
|
||||
|
||||
private var defaultClient = OkHttpClient()
|
||||
private var pingClient = OkHttpClient.Builder().callTimeout(3, TimeUnit.SECONDS).build()
|
||||
private var jacksonMapper = jacksonObjectMapper().enable(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature())
|
||||
private var secureStorage = SecureStorage(ctx)
|
||||
|
||||
data class LocalSessionsSyncRequestPayload(val sessions:List<PlaybackSession>, val deviceInfo:DeviceInfo)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@@ -110,6 +121,13 @@ class ApiHandler(var ctx:Context) {
|
||||
|
||||
override fun onResponse(call: Call, response: Response) {
|
||||
response.use {
|
||||
if (it.code == 401) {
|
||||
// Handle 401 Unauthorized by attempting token refresh
|
||||
AbsLogger.info(tag, "makeRequest: 401 Unauthorized for request to \"${request.url}\" - attempt token refresh")
|
||||
handleTokenRefresh(request, httpClient, cb)
|
||||
return
|
||||
}
|
||||
|
||||
if (!it.isSuccessful) {
|
||||
val jsobj = JSObject()
|
||||
jsobj.put("error", "Unexpected code $response")
|
||||
@@ -142,6 +160,269 @@ class ApiHandler(var ctx:Context) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles token refresh when a 401 Unauthorized response is received
|
||||
* This function will:
|
||||
* 1. Get the refresh token from secure storage for the current server connection
|
||||
* 2. Make a request to /auth/refresh endpoint with the refresh token
|
||||
* 3. Update the stored tokens with the new access token
|
||||
* 4. Retry the original request with the new access token
|
||||
* 5. If refresh fails, handle logout
|
||||
*
|
||||
* @param originalRequest The original request that failed with 401
|
||||
* @param httpClient The HTTP client to use for the request
|
||||
* @param callback The callback to return the response
|
||||
*/
|
||||
private fun handleTokenRefresh(originalRequest: Request, httpClient: OkHttpClient?, callback: (JSObject) -> Unit) {
|
||||
try {
|
||||
AbsLogger.info(tag, "handleTokenRefresh: Attempting to refresh auth tokens for server ${DeviceManager.serverConnectionConfigString}")
|
||||
|
||||
// Get current server connection config ID
|
||||
val serverConnectionConfigId = DeviceManager.serverConnectionConfigId
|
||||
if (serverConnectionConfigId.isEmpty()) {
|
||||
AbsLogger.error(tag, "handleTokenRefresh: Unable to refresh auth tokens. No server connection config ID")
|
||||
val errorObj = JSObject()
|
||||
errorObj.put("error", "No server connection available")
|
||||
callback(errorObj)
|
||||
return
|
||||
}
|
||||
|
||||
// Get refresh token from secure storage
|
||||
val refreshToken = secureStorage.getRefreshToken(serverConnectionConfigId)
|
||||
if (refreshToken.isNullOrEmpty()) {
|
||||
AbsLogger.error(tag, "handleTokenRefresh: Unable to refresh auth tokens. No refresh token available for server ${DeviceManager.serverConnectionConfigString}")
|
||||
val errorObj = JSObject()
|
||||
errorObj.put("error", "No refresh token available")
|
||||
callback(errorObj)
|
||||
return
|
||||
}
|
||||
|
||||
Log.d(tag, "handleTokenRefresh: Retrieved refresh token, attempting to refresh access token")
|
||||
|
||||
// Create refresh token request
|
||||
val refreshEndpoint = "${DeviceManager.serverAddress}/auth/refresh"
|
||||
val refreshRequest = Request.Builder()
|
||||
.url(refreshEndpoint)
|
||||
.addHeader("x-refresh-token", refreshToken)
|
||||
.addHeader("Content-Type", "application/json")
|
||||
.post(EMPTY_REQUEST)
|
||||
.build()
|
||||
|
||||
// Make the refresh request
|
||||
val client = httpClient ?: defaultClient
|
||||
client.newCall(refreshRequest).enqueue(object : Callback {
|
||||
override fun onFailure(call: Call, e: IOException) {
|
||||
Log.e(tag, "handleTokenRefresh: Failed to connect to refresh endpoint", e)
|
||||
AbsLogger.error(tag, "handleTokenRefresh: Failed to connect to refresh endpoint for server ${DeviceManager.serverConnectionConfigString} (error: ${e.message})")
|
||||
handleRefreshFailure(callback)
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call, response: Response) {
|
||||
response.use {
|
||||
if (!it.isSuccessful) {
|
||||
AbsLogger.error(tag, "handleTokenRefresh: Refresh request failed with status ${it.code} for server ${DeviceManager.serverConnectionConfigString}")
|
||||
handleRefreshFailure(callback)
|
||||
return
|
||||
}
|
||||
|
||||
val bodyString = it.body!!.string()
|
||||
try {
|
||||
val responseJson = JSONObject(bodyString)
|
||||
val userObj = responseJson.optJSONObject("user")
|
||||
|
||||
if (userObj == null) {
|
||||
AbsLogger.error(tag, "handleTokenRefresh: No user object in refresh response for server ${DeviceManager.serverConnectionConfigString}")
|
||||
handleRefreshFailure(callback)
|
||||
return
|
||||
}
|
||||
|
||||
val newAccessToken = userObj.optString("accessToken")
|
||||
val newRefreshToken = userObj.optString("refreshToken")
|
||||
|
||||
if (newAccessToken.isEmpty()) {
|
||||
AbsLogger.error(tag, "handleTokenRefresh: No access token in refresh response for server ${DeviceManager.serverConnectionConfigString}")
|
||||
handleRefreshFailure(callback)
|
||||
return
|
||||
}
|
||||
|
||||
Log.d(tag, "handleTokenRefresh: Successfully obtained new access token")
|
||||
|
||||
// Update tokens in secure storage and device manager
|
||||
updateTokens(newAccessToken, newRefreshToken.ifEmpty { refreshToken }, serverConnectionConfigId)
|
||||
|
||||
// Retry the original request with the new access token
|
||||
Log.d(tag, "handleTokenRefresh: Retrying original request with new token")
|
||||
retryOriginalRequest(originalRequest, newAccessToken, httpClient, callback)
|
||||
|
||||
} catch (e: Exception) {
|
||||
Log.e(tag, "handleTokenRefresh: Failed to parse refresh response", e)
|
||||
AbsLogger.error(tag, "handleTokenRefresh: Failed to parse refresh response for server ${DeviceManager.serverConnectionConfigString} (error: ${e.message})")
|
||||
handleRefreshFailure(callback)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
} catch (e: Exception) {
|
||||
Log.e(tag, "handleTokenRefresh: Unexpected error during token refresh", e)
|
||||
handleRefreshFailure(callback)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the stored tokens with new access and refresh tokens
|
||||
*
|
||||
* @param newAccessToken The new access token
|
||||
* @param newRefreshToken The new refresh token (or existing one if not provided)
|
||||
*/
|
||||
private fun updateTokens(newAccessToken: String, newRefreshToken: String, serverConnectionConfigId: String) {
|
||||
try {
|
||||
// Update the refresh token in secure storage if it's new
|
||||
if (newRefreshToken != secureStorage.getRefreshToken(serverConnectionConfigId)) {
|
||||
secureStorage.storeRefreshToken(serverConnectionConfigId, newRefreshToken)
|
||||
Log.d(tag, "updateTokens: Updated refresh token in secure storage")
|
||||
}
|
||||
|
||||
// Update the access token in the current server connection config
|
||||
DeviceManager.serverConnectionConfig?.let { config ->
|
||||
config.token = newAccessToken
|
||||
DeviceManager.dbManager.saveDeviceData(DeviceManager.deviceData)
|
||||
Log.d(tag, "updateTokens: Updated access token in server connection config")
|
||||
}
|
||||
|
||||
// Send access token to Webview frontend
|
||||
if (checkAbsDatabaseNotifyListenersInitted()) {
|
||||
val tokenJsObject = JSObject()
|
||||
tokenJsObject.put("accessToken", newAccessToken)
|
||||
absDatabaseNotifyListeners("onTokenRefresh", tokenJsObject)
|
||||
} else {
|
||||
// Can happen if Webview is never run
|
||||
Log.i(tag, "AbsDatabaseNotifyListeners is not initialized so cannot send new access token")
|
||||
}
|
||||
AbsLogger.info(tag, "updateTokens: Successfully refreshed auth tokens for server ${DeviceManager.serverConnectionConfigString}")
|
||||
} catch (e: Exception) {
|
||||
Log.e(tag, "updateTokens: Failed to update tokens", e)
|
||||
AbsLogger.error(tag, "updateTokens: Failed to refresh auth tokens for server ${DeviceManager.serverConnectionConfigString} (error: ${e.message})")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retries the original request with the new access token
|
||||
*
|
||||
* @param originalRequest The original request to retry
|
||||
* @param newAccessToken The new access token to use
|
||||
* @param httpClient The HTTP client to use
|
||||
* @param callback The callback to return the response
|
||||
*/
|
||||
private fun retryOriginalRequest(originalRequest: Request, newAccessToken: String, httpClient: OkHttpClient?, callback: (JSObject) -> Unit) {
|
||||
try {
|
||||
// Create a new request with the updated authorization header
|
||||
val newRequest = originalRequest.newBuilder()
|
||||
.removeHeader("Authorization")
|
||||
.addHeader("Authorization", "Bearer $newAccessToken")
|
||||
.build()
|
||||
|
||||
Log.d(tag, "retryOriginalRequest: Retrying request to ${newRequest.url}")
|
||||
|
||||
// Make the retry request
|
||||
val client = httpClient ?: defaultClient
|
||||
client.newCall(newRequest).enqueue(object : Callback {
|
||||
override fun onFailure(call: Call, e: IOException) {
|
||||
Log.e(tag, "retryOriginalRequest: Failed to retry request", e)
|
||||
AbsLogger.error(tag, "retryOriginalRequest: Failed to retry request after token refresh for server ${DeviceManager.serverConnectionConfigString} (error: ${e.message})")
|
||||
val errorObj = JSObject()
|
||||
errorObj.put("error", "Failed to retry request after token refresh")
|
||||
callback(errorObj)
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call, response: Response) {
|
||||
response.use {
|
||||
if (!it.isSuccessful) {
|
||||
Log.e(tag, "retryOriginalRequest: Retry request failed with status ${it.code}")
|
||||
AbsLogger.error(tag, "retryOriginalRequest: Retry request failed with status ${it.code} for server ${DeviceManager.serverConnectionConfigString}")
|
||||
val errorObj = JSObject()
|
||||
errorObj.put("error", "Retry request failed with status ${it.code}")
|
||||
callback(errorObj)
|
||||
return
|
||||
}
|
||||
|
||||
val bodyString = it.body!!.string()
|
||||
if (bodyString == "OK") {
|
||||
callback(JSObject())
|
||||
} else {
|
||||
try {
|
||||
var jsonObj = JSObject()
|
||||
if (bodyString.startsWith("[")) {
|
||||
val array = JSArray(bodyString)
|
||||
jsonObj.put("value", array)
|
||||
} else {
|
||||
jsonObj = JSObject(bodyString)
|
||||
}
|
||||
callback(jsonObj)
|
||||
} catch(je:JSONException) {
|
||||
Log.e(tag, "retryOriginalRequest: Invalid JSON response ${je.localizedMessage} from body $bodyString")
|
||||
val errorObj = JSObject()
|
||||
errorObj.put("error", "Invalid response body")
|
||||
callback(errorObj)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
} catch (e: Exception) {
|
||||
Log.e(tag, "retryOriginalRequest: Unexpected error during retry", e)
|
||||
AbsLogger.error(tag, "retryOriginalRequest: Unexpected error during retry for server ${DeviceManager.serverConnectionConfigString}")
|
||||
val errorObj = JSObject()
|
||||
errorObj.put("error", "Failed to retry request")
|
||||
callback(errorObj)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the case when token refresh fails
|
||||
* This will clear the current session and notify the callback
|
||||
*
|
||||
* @param callback The callback to return the error
|
||||
*/
|
||||
private fun handleRefreshFailure(callback: (JSObject) -> Unit) {
|
||||
try {
|
||||
Log.d(tag, "handleRefreshFailure: Token refresh failed, clearing session")
|
||||
|
||||
// Clear the current server connection
|
||||
DeviceManager.serverConnectionConfig = null
|
||||
DeviceManager.deviceData.lastServerConnectionConfigId = null
|
||||
DeviceManager.dbManager.saveDeviceData(DeviceManager.deviceData)
|
||||
|
||||
// Remove refresh token from secure storage
|
||||
val serverConnectionConfigId = DeviceManager.serverConnectionConfigId
|
||||
if (serverConnectionConfigId.isNotEmpty()) {
|
||||
secureStorage.removeRefreshToken(serverConnectionConfigId)
|
||||
}
|
||||
|
||||
val errorObj = JSObject()
|
||||
errorObj.put("error", "Authentication failed - please login again")
|
||||
callback(errorObj)
|
||||
|
||||
if (checkAbsDatabaseNotifyListenersInitted()) {
|
||||
val tokenJsObject = JSObject()
|
||||
tokenJsObject.put("error", "Token refresh failed")
|
||||
if (serverConnectionConfigId.isNotEmpty()) {
|
||||
tokenJsObject.put("serverConnectionConfigId", serverConnectionConfigId)
|
||||
}
|
||||
absDatabaseNotifyListeners("onTokenRefreshFailure", tokenJsObject)
|
||||
} else {
|
||||
// Can happen if Webview is never run
|
||||
Log.i(tag, "AbsDatabaseNotifyListeners is not initialized so cannot send token refresh failure notification")
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e(tag, "handleRefreshFailure: Error during failure handling", e)
|
||||
val errorObj = JSObject()
|
||||
errorObj.put("error", "Authentication failed")
|
||||
callback(errorObj)
|
||||
}
|
||||
}
|
||||
|
||||
fun getCurrentUser(cb: (User?) -> Unit) {
|
||||
getRequest("/api/me", null, null) {
|
||||
if (it.has("error")) {
|
||||
@@ -334,8 +615,7 @@ class ApiHandler(var ctx:Context) {
|
||||
val array = it.getJSONArray("libraryItems")
|
||||
for (i in 0 until array.length()) {
|
||||
val jsobj = array.get(i) as JSONObject
|
||||
|
||||
val itemInProgress = ItemInProgress.makeFromServerObject(jsobj)
|
||||
val itemInProgress = ItemInProgress.makeFromServerObject(jsobj, jacksonMapper)
|
||||
items.add(itemInProgress)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<WebView
|
||||
android:id="@+id/webview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
Binary file not shown.
@@ -10,7 +10,7 @@
|
||||
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="android:background">@null</item>
|
||||
<item name="android:background">@color/background_dark</item>
|
||||
<item name="android:statusBarColor">@color/background_dark</item>
|
||||
<item name="android:navigationBarColor">@color/background_dark</item>
|
||||
</style>
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
<color name="light_blue_200">#FF81D4FA</color>
|
||||
<color name="light_blue_600">#FF039BE5</color>
|
||||
<color name="light_blue_900">#FF01579B</color>
|
||||
<color name="background_dark">#262626</color>
|
||||
</resources>
|
||||
<color name="background_dark">#232323</color>
|
||||
</resources>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="android:background">@null</item>
|
||||
<item name="android:background">@color/background_dark</item>
|
||||
<item name="android:statusBarColor">@color/background_dark</item>
|
||||
<item name="android:navigationBarColor">@color/background_dark</item>
|
||||
</style>
|
||||
|
||||
@@ -14,7 +14,7 @@ ext {
|
||||
androidx_core_ktx_version = '1.16.0'
|
||||
androidx_media_version = '1.7.0'
|
||||
exoplayer_version = '2.18.7'
|
||||
glide_version = '4.11.0'
|
||||
glide_version = '4.16.0'
|
||||
junit_version = '4.13.2'
|
||||
kotlin_version = '2.1.0'
|
||||
kotlin_coroutines_version = '1.10.1'
|
||||
|
||||
+7
-3
@@ -1,5 +1,5 @@
|
||||
@import "./tailwind.css";
|
||||
@import "./fonts.css";
|
||||
@import './tailwind.css';
|
||||
@import './fonts.css';
|
||||
@import './defaultStyles.css';
|
||||
@import './absicons.css';
|
||||
@import './transitions.css';
|
||||
@@ -61,6 +61,10 @@ textarea {
|
||||
box-shadow: 4px 1px 8px #11111166, -4px 1px 8px #11111166, 1px -4px 8px #11111166;
|
||||
}
|
||||
|
||||
.box-shadow-progressbar {
|
||||
box-shadow: 0px -1px 4px rgb(62, 50, 2, 0.5);
|
||||
}
|
||||
|
||||
.shadow-height {
|
||||
height: calc(100% - 4px);
|
||||
}
|
||||
@@ -164,4 +168,4 @@ Bookshelf Label
|
||||
.tracksTable th {
|
||||
padding: 4px 8px;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,25 @@
|
||||
--gradient-minimized-audio-player: linear-gradient(145deg, rgba(38, 38, 38, 0.5) 0%, rgba(38, 38, 38, 0.9) 20%, rgb(38, 38, 38) 60%);
|
||||
}
|
||||
|
||||
html[data-theme='black'] {
|
||||
color: white;
|
||||
--color-bg: 0 0 0;
|
||||
--color-bg-hover: 0 0 0;
|
||||
--color-fg: 230 237 243;
|
||||
--color-fg-muted: 120 126 132;
|
||||
--color-primary: 0 0 0;
|
||||
--color-secondary: 0 0 0;
|
||||
--color-border: 55 62 65;
|
||||
--color-bg-toggle: 0 0 0;
|
||||
--color-bg-toggle-selected: 35 35 35;
|
||||
--color-track-cursor: 229 231 235;
|
||||
--color-track: 107 114 128;
|
||||
--color-track-buffered: 75 85 99;
|
||||
--gradient-item-page: rgb(0, 0, 0);
|
||||
--gradient-audio-player: rgb(0, 0, 0);
|
||||
--gradient-minimized-audio-player: rgb(0, 0, 0);
|
||||
}
|
||||
|
||||
html[data-theme='light'] {
|
||||
color: black;
|
||||
--color-bg: 255 255 255;
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
"plugins": {
|
||||
"CapacitorHttp": {
|
||||
"enabled": false
|
||||
},
|
||||
"StatusBar": {
|
||||
"backgroundColor": "#232323",
|
||||
"style": "DARK"
|
||||
}
|
||||
},
|
||||
"server": {
|
||||
|
||||
+13
-16
@@ -4,14 +4,14 @@
|
||||
<nuxt-link v-show="!showBack" to="/" class="mr-3">
|
||||
<img src="/Logo.png" class="h-10 w-10" />
|
||||
</nuxt-link>
|
||||
<a v-if="showBack" @click="back" class="rounded-full h-10 w-10 flex items-center justify-center mr-2 cursor-pointer">
|
||||
<a v-if="showBack" @click="back" aria-label="Back" class="rounded-full h-10 w-10 flex items-center justify-center mr-2 cursor-pointer">
|
||||
<span class="material-symbols text-3xl text-fg">arrow_back</span>
|
||||
</a>
|
||||
<div v-if="user && currentLibrary && socketConnected">
|
||||
<div class="pl-1.5 pr-2.5 py-2 bg-bg bg-opacity-30 rounded-md flex items-center" @click="clickShowLibraryModal">
|
||||
<div v-if="user && currentLibrary">
|
||||
<button type="button" aria-label="Show library modal" class="pl-1.5 pr-2.5 py-2 bg-bg bg-opacity-30 rounded-md flex items-center" @click="clickShowLibraryModal">
|
||||
<ui-library-icon :icon="currentLibraryIcon" :size="4" font-size="base" />
|
||||
<p class="text-sm leading-4 ml-2 mt-0.5 max-w-24 truncate">{{ currentLibraryName }}</p>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<widgets-connection-indicator />
|
||||
@@ -21,19 +21,19 @@
|
||||
<widgets-download-progress-indicator />
|
||||
|
||||
<!-- Must be connected to a server to cast, only supports media items on server -->
|
||||
<div v-show="isCastAvailable && user" class="mx-2 cursor-pointer flex items-center" @click="castClick">
|
||||
<button type="button" aria-label="Cast" v-show="isCastAvailable && user" class="mx-2 cursor-pointer flex items-center" @click="castClick">
|
||||
<span class="material-symbols text-2xl leading-none">
|
||||
{{ isCasting ? 'cast_connected' : 'cast' }}
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<nuxt-link v-if="user" class="mx-1.5 flex items-center h-10" to="/search">
|
||||
<nuxt-link v-if="user" class="mx-1.5 flex items-center h-10" to="/search" aria-label="Search">
|
||||
<span class="material-symbols text-2xl leading-none">search</span>
|
||||
</nuxt-link>
|
||||
|
||||
<div class="h-7 mx-1.5">
|
||||
<span class="material-symbols" style="font-size: 1.75rem" @click="clickShowSideDrawer">menu</span>
|
||||
</div>
|
||||
<button type="button" aria-label="Toggle side drawer" class="h-7 mx-1.5" @click="clickShowSideDrawer">
|
||||
<span class="material-symbols" style="font-size: 1.75rem">menu</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -56,9 +56,6 @@ export default {
|
||||
this.$store.commit('setCastAvailable', val)
|
||||
}
|
||||
},
|
||||
socketConnected() {
|
||||
return this.$store.state.socketConnected
|
||||
},
|
||||
currentLibrary() {
|
||||
return this.$store.getters['libraries/getCurrentLibrary']
|
||||
},
|
||||
@@ -103,14 +100,14 @@ export default {
|
||||
this.isCastAvailable = data && data.value
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
async mounted() {
|
||||
AbsAudioPlayer.getIsCastAvailable().then((data) => {
|
||||
this.isCastAvailable = data && data.value
|
||||
})
|
||||
this.onCastAvailableUpdateListener = AbsAudioPlayer.addListener('onCastAvailableUpdate', this.onCastAvailableUpdate)
|
||||
this.onCastAvailableUpdateListener = await AbsAudioPlayer.addListener('onCastAvailableUpdate', this.onCastAvailableUpdate)
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.onCastAvailableUpdateListener) this.onCastAvailableUpdateListener.remove()
|
||||
this.onCastAvailableUpdateListener?.remove()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
<div class="w-full h-full absolute top-0 left-0 pointer-events-none" style="background: var(--gradient-audio-player)" />
|
||||
|
||||
<div class="top-4 left-4 absolute cursor-pointer">
|
||||
<span class="material-symbols text-5xl" :class="{ 'text-black text-opacity-75': coverBgIsLight }" @click="collapseFullscreen">keyboard_arrow_down</span>
|
||||
<span class="material-symbols text-5xl" :class="{ 'text-black text-opacity-75': coverBgIsLight && theme !== 'black' }" @click="collapseFullscreen">keyboard_arrow_down</span>
|
||||
</div>
|
||||
<div v-show="showCastBtn" class="top-6 right-16 absolute cursor-pointer">
|
||||
<span class="material-symbols text-3xl" :class="coverBgIsLight ? 'text-black' : ''" @click="castClick">{{ isCasting ? 'cast_connected' : 'cast' }}</span>
|
||||
<span class="material-symbols text-3xl" :class="coverBgIsLight && theme !== 'black' ? 'text-black' : ''" @click="castClick">{{ isCasting ? 'cast_connected' : 'cast' }}</span>
|
||||
</div>
|
||||
<div class="top-6 right-4 absolute cursor-pointer">
|
||||
<span class="material-symbols text-3xl" :class="{ 'text-black text-opacity-75': coverBgIsLight }" @click="showMoreMenuDialog = true">more_vert</span>
|
||||
<span class="material-symbols text-3xl" :class="{ 'text-black text-opacity-75': coverBgIsLight && theme !== 'black' }" @click="showMoreMenuDialog = true">more_vert</span>
|
||||
</div>
|
||||
<p class="top-4 absolute left-0 right-0 mx-auto text-center uppercase tracking-widest text-opacity-75" :class="{ 'text-black text-opacity-75': coverBgIsLight }" style="font-size: 10px">{{ isDirectPlayMethod ? $strings.LabelPlaybackDirect : isLocalPlayMethod ? $strings.LabelPlaybackLocal : $strings.LabelPlaybackTranscode }}</p>
|
||||
<p class="top-4 absolute left-0 right-0 mx-auto text-center uppercase tracking-widest text-opacity-75" :class="{ 'text-black text-opacity-75': coverBgIsLight && theme !== 'black' }" style="font-size: 10px">{{ isDirectPlayMethod ? $strings.LabelPlaybackDirect : isLocalPlayMethod ? $strings.LabelPlaybackLocal : $strings.LabelPlaybackTranscode }}</p>
|
||||
</div>
|
||||
|
||||
<div v-if="playerSettings.useChapterTrack && playerSettings.useTotalTrack && showFullscreen" class="absolute total-track w-full z-30 px-6">
|
||||
@@ -140,13 +140,6 @@ export default {
|
||||
readyTrackWidth: 0,
|
||||
seekedTime: 0,
|
||||
seekLoading: false,
|
||||
onPlaybackSessionListener: null,
|
||||
onPlaybackClosedListener: null,
|
||||
onPlayingUpdateListener: null,
|
||||
onMetadataListener: null,
|
||||
onProgressSyncFailing: null,
|
||||
onProgressSyncSuccess: null,
|
||||
onPlaybackSpeedChangedListener: null,
|
||||
touchStartY: 0,
|
||||
touchStartTime: 0,
|
||||
playerSettings: {
|
||||
@@ -182,6 +175,9 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return document.documentElement.dataset.theme || 'dark'
|
||||
},
|
||||
menuItems() {
|
||||
const items = []
|
||||
// TODO: Implement on iOS
|
||||
@@ -880,14 +876,14 @@ export default {
|
||||
async init() {
|
||||
await this.loadPlayerSettings()
|
||||
|
||||
this.onPlaybackSessionListener = AbsAudioPlayer.addListener('onPlaybackSession', this.onPlaybackSession)
|
||||
this.onPlaybackClosedListener = AbsAudioPlayer.addListener('onPlaybackClosed', this.onPlaybackClosed)
|
||||
this.onPlaybackFailedListener = AbsAudioPlayer.addListener('onPlaybackFailed', this.onPlaybackFailed)
|
||||
this.onPlayingUpdateListener = AbsAudioPlayer.addListener('onPlayingUpdate', this.onPlayingUpdate)
|
||||
this.onMetadataListener = AbsAudioPlayer.addListener('onMetadata', this.onMetadata)
|
||||
this.onProgressSyncFailing = AbsAudioPlayer.addListener('onProgressSyncFailing', this.showProgressSyncIsFailing)
|
||||
this.onProgressSyncSuccess = AbsAudioPlayer.addListener('onProgressSyncSuccess', this.showProgressSyncSuccess)
|
||||
this.onPlaybackSpeedChangedListener = AbsAudioPlayer.addListener('onPlaybackSpeedChanged', this.onPlaybackSpeedChanged)
|
||||
AbsAudioPlayer.addListener('onPlaybackSession', this.onPlaybackSession)
|
||||
AbsAudioPlayer.addListener('onPlaybackClosed', this.onPlaybackClosed)
|
||||
AbsAudioPlayer.addListener('onPlaybackFailed', this.onPlaybackFailed)
|
||||
AbsAudioPlayer.addListener('onPlayingUpdate', this.onPlayingUpdate)
|
||||
AbsAudioPlayer.addListener('onMetadata', this.onMetadata)
|
||||
AbsAudioPlayer.addListener('onProgressSyncFailing', this.showProgressSyncIsFailing)
|
||||
AbsAudioPlayer.addListener('onProgressSyncSuccess', this.showProgressSyncSuccess)
|
||||
AbsAudioPlayer.addListener('onPlaybackSpeedChanged', this.onPlaybackSpeedChanged)
|
||||
},
|
||||
async screenOrientationChange() {
|
||||
if (this.isRefreshingUI) return
|
||||
@@ -981,14 +977,9 @@ export default {
|
||||
document.body.removeEventListener('touchend', this.touchend)
|
||||
document.body.removeEventListener('touchmove', this.touchmove)
|
||||
|
||||
if (this.onPlayingUpdateListener) this.onPlayingUpdateListener.remove()
|
||||
if (this.onMetadataListener) this.onMetadataListener.remove()
|
||||
if (this.onPlaybackSessionListener) this.onPlaybackSessionListener.remove()
|
||||
if (this.onPlaybackClosedListener) this.onPlaybackClosedListener.remove()
|
||||
if (this.onPlaybackFailedListener) this.onPlaybackFailedListener.remove()
|
||||
if (this.onProgressSyncFailing) this.onProgressSyncFailing.remove()
|
||||
if (this.onProgressSyncSuccess) this.onProgressSyncSuccess.remove()
|
||||
if (this.onPlaybackSpeedChangedListener) this.onPlaybackSpeedChangedListener.remove()
|
||||
if (AbsAudioPlayer.removeAllListeners) {
|
||||
AbsAudioPlayer.removeAllListeners()
|
||||
}
|
||||
clearInterval(this.playInterval)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,11 +351,11 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.onLocalMediaProgressUpdateListener = AbsAudioPlayer.addListener('onLocalMediaProgressUpdate', this.onLocalMediaProgressUpdate)
|
||||
this.onSleepTimerEndedListener = AbsAudioPlayer.addListener('onSleepTimerEnded', this.onSleepTimerEnded)
|
||||
this.onSleepTimerSetListener = AbsAudioPlayer.addListener('onSleepTimerSet', this.onSleepTimerSet)
|
||||
this.onMediaPlayerChangedListener = AbsAudioPlayer.addListener('onMediaPlayerChanged', this.onMediaPlayerChanged)
|
||||
async mounted() {
|
||||
this.onLocalMediaProgressUpdateListener = await AbsAudioPlayer.addListener('onLocalMediaProgressUpdate', this.onLocalMediaProgressUpdate)
|
||||
this.onSleepTimerEndedListener = await AbsAudioPlayer.addListener('onSleepTimerEnded', this.onSleepTimerEnded)
|
||||
this.onSleepTimerSetListener = await AbsAudioPlayer.addListener('onSleepTimerSet', this.onSleepTimerSet)
|
||||
this.onMediaPlayerChangedListener = await AbsAudioPlayer.addListener('onMediaPlayerChanged', this.onMediaPlayerChanged)
|
||||
|
||||
this.playbackSpeed = this.$store.getters['user/getUserSetting']('playbackRate')
|
||||
console.log(`[AudioPlayerContainer] Init Playback Speed: ${this.playbackSpeed}`)
|
||||
@@ -370,10 +370,10 @@ export default {
|
||||
this.$eventBus.$on('device-focus-update', this.deviceFocused)
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.onLocalMediaProgressUpdateListener) this.onLocalMediaProgressUpdateListener.remove()
|
||||
if (this.onSleepTimerEndedListener) this.onSleepTimerEndedListener.remove()
|
||||
if (this.onSleepTimerSetListener) this.onSleepTimerSetListener.remove()
|
||||
if (this.onMediaPlayerChangedListener) this.onMediaPlayerChangedListener.remove()
|
||||
this.onLocalMediaProgressUpdateListener?.remove()
|
||||
this.onSleepTimerEndedListener?.remove()
|
||||
this.onSleepTimerSetListener?.remove()
|
||||
this.onMediaPlayerChangedListener?.remove()
|
||||
|
||||
this.$eventBus.$off('abs-ui-ready', this.onReady)
|
||||
this.$eventBus.$off('play-item', this.playLibraryItem)
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
|
||||
<div class="w-full overflow-y-auto">
|
||||
<template v-for="item in navItems">
|
||||
<button v-if="item.action" :key="item.text" class="w-full hover:bg-bg/60 flex items-center py-3 px-6 text-fg-muted" @click="clickAction(item.action)">
|
||||
<button v-if="item.action" :key="item.text" :tabindex="show ? 0 : -1" class="w-full hover:bg-bg/60 flex items-center py-3 px-6 text-fg-muted" @click="clickAction(item.action)">
|
||||
<span class="material-symbols fill text-lg">{{ item.icon }}</span>
|
||||
<p class="pl-4">{{ item.text }}</p>
|
||||
</button>
|
||||
<nuxt-link v-else :to="item.to" :key="item.text" class="w-full hover:bg-bg/60 flex items-center py-3 px-6 text-fg" :class="currentRoutePath.startsWith(item.to) ? 'bg-bg-hover/50' : 'text-fg-muted'">
|
||||
<nuxt-link v-else :to="item.to" :key="item.text" :tabindex="show ? 0 : -1" class="w-full hover:bg-bg/60 flex items-center py-3 px-6 text-fg" :class="currentRoutePath.startsWith(item.to) ? 'bg-bg-hover/50' : 'text-fg-muted'">
|
||||
<span class="material-symbols fill text-lg">{{ item.icon }}</span>
|
||||
<p class="pl-4">{{ item.text }}</p>
|
||||
</nuxt-link>
|
||||
@@ -179,21 +179,7 @@ export default {
|
||||
this.show = false
|
||||
},
|
||||
async logout() {
|
||||
if (this.user) {
|
||||
if (this.$store.getters['getIsPlayerOpen']) {
|
||||
this.$eventBus.$emit('close-stream')
|
||||
}
|
||||
|
||||
await this.$nativeHttp.post('/logout').catch((error) => {
|
||||
console.error('Failed to logout', error)
|
||||
})
|
||||
}
|
||||
|
||||
this.$socket.logout()
|
||||
await this.$db.logout()
|
||||
this.$localStore.removeLastLibraryId()
|
||||
this.$store.commit('user/logout')
|
||||
this.$store.commit('libraries/setCurrentLibrary', null)
|
||||
await this.$store.dispatch('user/logout')
|
||||
},
|
||||
async disconnect() {
|
||||
await this.$hapticsImpact()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div ref="card" :id="`book-card-${index}`" :style="{ minWidth: width + 'px', maxWidth: width + 'px', height: height + 'px' }" class="rounded-sm z-10 bg-primary cursor-pointer box-shadow-book" @click="clickCard">
|
||||
<div ref="card" tabindex="0" :id="`book-card-${index}`" :style="{ minWidth: width + 'px', maxWidth: width + 'px', height: height + 'px' }" class="rounded-sm z-10 bg-primary cursor-pointer box-shadow-book" @click="clickCard">
|
||||
<!-- When cover image does not fill -->
|
||||
<div v-show="showCoverBg" class="absolute top-0 left-0 w-full h-full overflow-hidden rounded-sm bg-primary">
|
||||
<div class="absolute cover-bg" ref="coverBg" />
|
||||
@@ -59,7 +59,7 @@
|
||||
</div>
|
||||
|
||||
<!-- No progress shown for collapsed series in library -->
|
||||
<div v-if="!collapsedSeries && (!isPodcast || recentEpisode)" class="absolute bottom-0 left-0 h-1 shadow-sm max-w-full z-10 rounded-b" :class="itemIsFinished ? 'bg-success' : 'bg-yellow-400'" :style="{ width: width * userProgressPercent + 'px' }"></div>
|
||||
<div v-if="!collapsedSeries && (!isPodcast || recentEpisode)" class="absolute bottom-0 left-0 h-1 max-w-full z-10 rounded-b box-shadow-progressbar" :class="itemIsFinished ? 'bg-success' : 'bg-yellow-400'" :style="{ width: width * userProgressPercent + 'px' }"></div>
|
||||
|
||||
<!-- Downloaded icon -->
|
||||
<div v-if="showHasLocalDownload" class="absolute right-0 top-0 z-20" :style="{ top: (isPodcast || (seriesSequence && showSequence) ? 1.75 : 0.375) * sizeMultiplier + 'rem', right: 0.375 * sizeMultiplier + 'rem', padding: `${0.1 * sizeMultiplier}rem ${0.25 * sizeMultiplier}rem` }">
|
||||
@@ -77,12 +77,12 @@
|
||||
</div>
|
||||
|
||||
<!-- Series sequence -->
|
||||
<div v-if="seriesSequence && showSequence && !isSelectionMode" class="absolute rounded-lg bg-black bg-opacity-90 box-shadow-md z-10" :style="{ top: 0.375 * sizeMultiplier + 'rem', right: 0.375 * sizeMultiplier + 'rem', padding: `${0.1 * sizeMultiplier}rem ${0.25 * sizeMultiplier}rem` }">
|
||||
<div v-if="seriesSequence && showSequence && !isSelectionMode" class="absolute rounded-lg bg-black/90 text-white box-shadow-md z-10" :style="{ top: 0.375 * sizeMultiplier + 'rem', right: 0.375 * sizeMultiplier + 'rem', padding: `${0.1 * sizeMultiplier}rem ${0.25 * sizeMultiplier}rem` }">
|
||||
<p :style="{ fontSize: sizeMultiplier * 0.8 + 'rem' }">#{{ seriesSequence }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Podcast Episode # -->
|
||||
<div v-if="recentEpisodeNumber !== null && !isSelectionMode" class="absolute rounded-lg bg-black bg-opacity-90 box-shadow-md z-10" :style="{ top: 0.375 * sizeMultiplier + 'rem', right: 0.375 * sizeMultiplier + 'rem', padding: `${0.1 * sizeMultiplier}rem ${0.25 * sizeMultiplier}rem` }">
|
||||
<div v-if="recentEpisodeNumber !== null && !isSelectionMode" class="absolute rounded-lg bg-black/90 box-shadow-md z-10" :style="{ top: 0.375 * sizeMultiplier + 'rem', right: 0.375 * sizeMultiplier + 'rem', padding: `${0.1 * sizeMultiplier}rem ${0.25 * sizeMultiplier}rem` }">
|
||||
<p class="text-white" :style="{ fontSize: sizeMultiplier * 0.8 + 'rem' }">
|
||||
Episode<span v-if="recentEpisodeNumber"> #{{ recentEpisodeNumber }}</span>
|
||||
</p>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<!-- No progress shown for collapsed series or podcasts in library -->
|
||||
<div v-if="!isPodcast && !collapsedSeries" class="absolute bottom-0 left-0 h-1 shadow-sm max-w-full z-10 rounded-b" :class="itemIsFinished ? 'bg-success' : 'bg-yellow-400'" :style="{ width: coverWidth * userProgressPercent + 'px' }"></div>
|
||||
</div>
|
||||
<div class="flex-grow px-2">
|
||||
<div class="flex-grow pl-2" :class="showPlayButton ? 'pr-12' : 'pr-2'">
|
||||
<p class="whitespace-normal line-clamp-2" :style="{ fontSize: 0.8 * sizeMultiplier + 'rem' }">
|
||||
<span v-if="seriesSequence">#{{ seriesSequence }} </span>{{ displayTitle }}
|
||||
</p>
|
||||
@@ -29,6 +29,16 @@
|
||||
{{ $getString('LabelNumEpisodes', [numEpisodes]) }}
|
||||
</p>
|
||||
</div>
|
||||
<div v-if="showPlayButton" class="absolute top-0 bottom-0 right-0 h-full flex items-center justify-center z-20 pr-1">
|
||||
<button type="button" class="relative rounded-full bg-fg-muted/50" :class="{ 'p-2': !playerIsStartingForThisMedia }" @click.stop.prevent="play">
|
||||
<span v-if="!playerIsStartingForThisMedia" class="material-symbols text-2xl fill text-white">{{ playerIsPlaying ? 'pause' : 'play_arrow' }}</span>
|
||||
<div v-else class="p-2 text-fg w-10 h-10 flex items-center justify-center bg-fg-muted/80 rounded-full overflow-hidden">
|
||||
<svg class="animate-spin" style="width: 24px; height: 24px" viewBox="0 0 24 24">
|
||||
<path fill="currentColor" d="M12,4V2A10,10 0 0,0 2,12H4A8,8 0 0,1 12,4Z" />
|
||||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div v-if="localLibraryItem || isLocal" class="absolute top-0 right-0 z-20" :style="{ top: 0.375 * sizeMultiplier + 'rem', right: 0.375 * sizeMultiplier + 'rem', padding: `${0.1 * sizeMultiplier}rem ${0.25 * sizeMultiplier}rem` }">
|
||||
<span class="material-symbols text-2xl text-success">download_done</span>
|
||||
@@ -129,6 +139,9 @@ export default {
|
||||
libraryItemId() {
|
||||
return this._libraryItem.id
|
||||
},
|
||||
localLibraryItemId() {
|
||||
return this.localLibraryItem?.id
|
||||
},
|
||||
series() {
|
||||
return this.mediaMetadata.series
|
||||
},
|
||||
@@ -217,13 +230,31 @@ export default {
|
||||
return this.isMissing || this.isInvalid
|
||||
},
|
||||
isStreaming() {
|
||||
return this.store.getters['getlibraryItemIdStreaming'] === this.libraryItemId
|
||||
return this.isPlaying && !this.store.getters['getIsCurrentSessionLocal']
|
||||
},
|
||||
isPlaying() {
|
||||
if (this.localLibraryItemId && this.store.getters['getIsMediaStreaming'](this.localLibraryItemId)) return true
|
||||
return this.store.getters['getIsMediaStreaming'](this.libraryItemId)
|
||||
},
|
||||
playerIsPlaying() {
|
||||
return this.store.state.playerIsPlaying && (this.isStreaming || this.isPlaying)
|
||||
},
|
||||
playerIsStartingPlayback() {
|
||||
// Play has been pressed and waiting for native play response
|
||||
return this.store.state.playerIsStartingPlayback
|
||||
},
|
||||
playerIsStartingForThisMedia() {
|
||||
const mediaId = this.store.state.playerStartingPlaybackMediaId
|
||||
return mediaId === this.libraryItemId
|
||||
},
|
||||
isCasting() {
|
||||
return this.store.state.isCasting
|
||||
},
|
||||
showReadButton() {
|
||||
return !this.isSelectionMode && !this.showPlayButton && this.hasEbook
|
||||
},
|
||||
showPlayButton() {
|
||||
return !this.isSelectionMode && !this.isMissing && !this.isInvalid && this.numTracks && !this.isStreaming
|
||||
return !this.isSelectionMode && !this.isMissing && !this.isInvalid && this.numTracks && !this.isPodcast
|
||||
},
|
||||
showSmallEBookIcon() {
|
||||
return !this.isSelectionMode && this.hasEbook
|
||||
@@ -293,9 +324,32 @@ export default {
|
||||
this.selected = !this.selected
|
||||
this.$emit('select', this.libraryItem)
|
||||
},
|
||||
play() {
|
||||
var eventBus = this.$eventBus || this.$nuxt.$eventBus
|
||||
eventBus.$emit('play-item', { libraryItemId: this.libraryItemId })
|
||||
async play() {
|
||||
if (this.playerIsStartingPlayback) return
|
||||
|
||||
const hapticsImpact = this.$hapticsImpact || this.$nuxt.$hapticsImpact
|
||||
if (hapticsImpact) {
|
||||
await hapticsImpact()
|
||||
}
|
||||
|
||||
const eventBus = this.$eventBus || this.$nuxt.$eventBus
|
||||
|
||||
if (this.playerIsPlaying) {
|
||||
eventBus.$emit('pause-item')
|
||||
} else {
|
||||
// Audiobook
|
||||
let libraryItemId = this.libraryItemId
|
||||
|
||||
// When casting use server library item
|
||||
if (this.localLibraryItem && !this.isCasting) {
|
||||
libraryItemId = this.localLibraryItem.id
|
||||
} else if (this.hasLocal) {
|
||||
libraryItemId = this.localLibraryItem.id
|
||||
}
|
||||
|
||||
this.store.commit('setPlayerIsStartingPlayback', this.libraryItemId)
|
||||
eventBus.$emit('play-item', { libraryItemId, serverLibraryItemId: this.libraryItemId })
|
||||
}
|
||||
},
|
||||
destroy() {
|
||||
// destroy the vue listeners, etc
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<covers-group-cover v-if="series" ref="cover" :id="seriesId" :name="title" :book-items="books" :width="width" :height="height" :book-cover-aspect-ratio="bookCoverAspectRatio" />
|
||||
</div>
|
||||
|
||||
<div v-if="seriesPercentInProgress > 0" class="absolute bottom-0 left-0 h-1 shadow-sm max-w-full z-10 rounded-b w-full" :class="isSeriesFinished ? 'bg-success' : 'bg-yellow-400'" :style="{ width: seriesPercentInProgress * 100 + '%' }" />
|
||||
<div v-if="seriesPercentInProgress > 0" class="absolute bottom-0 left-0 h-1 max-w-full z-10 rounded-b w-full box-shadow-progressbar" :class="isSeriesFinished ? 'bg-success' : 'bg-yellow-400'" :style="{ width: seriesPercentInProgress * 100 + '%' }" />
|
||||
|
||||
<div v-if="isAltViewEnabled && isCategorized" class="absolute z-30 left-0 right-0 mx-auto -bottom-8 h-8 py-1 rounded-md text-center">
|
||||
<p class="truncate" :style="{ fontSize: labelFontSize + 'rem' }">{{ title }}</p>
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
<p class="text-xs text-warning">{{ $strings.MessageOldServerConnectionWarning }}</p>
|
||||
<ui-btn class="text-xs whitespace-nowrap" :padding-x="2" :padding-y="1" @click="showOldUserIdWarningDialog">{{ $strings.LabelMoreInfo }}</ui-btn>
|
||||
</div>
|
||||
<!-- warning message if server connection config is using an old auth method -->
|
||||
<div v-if="config.version && checkIsUsingOldAuth(config)" class="flex flex-nowrap justify-between items-center space-x-4 pt-4">
|
||||
<p class="text-xs text-warning">{{ $strings.MessageOldServerAuthWarning }}</p>
|
||||
<ui-btn class="text-xs whitespace-nowrap" :padding-x="2" :padding-y="1" @click="showOldAuthWarningDialog">{{ $strings.LabelMoreInfo }}</ui-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div class="my-1 py-4 w-full">
|
||||
<ui-btn class="w-full" @click="newServerConfigClick">{{ $strings.ButtonAddNewServer }}</ui-btn>
|
||||
@@ -25,7 +30,7 @@
|
||||
<!-- form to add a new server connection config -->
|
||||
<div v-else class="w-full">
|
||||
<!-- server address input -->
|
||||
<form v-if="!showAuth" @submit.prevent="submit" novalidate class="w-full">
|
||||
<form v-if="!showAuth" @submit.prevent="submit(false)" novalidate class="w-full">
|
||||
<div v-if="serverConnectionConfigs.length" class="flex items-center mb-4" @click="showServerList">
|
||||
<span class="material-symbols text-fg-muted">arrow_back</span>
|
||||
</div>
|
||||
@@ -155,9 +160,23 @@ export default {
|
||||
cancelText: this.$strings.ButtonOk
|
||||
})
|
||||
},
|
||||
async showOldAuthWarningDialog() {
|
||||
const confirmResult = await Dialog.confirm({
|
||||
title: 'Old Server Auth Warning',
|
||||
message: this.$strings.MessageOldServerAuthWarningHelp,
|
||||
cancelButtonTitle: this.$strings.ButtonReadMore
|
||||
})
|
||||
if (!confirmResult.value) {
|
||||
window.open('https://github.com/advplyr/audiobookshelf/discussions/4460', '_blank')
|
||||
}
|
||||
},
|
||||
checkIdUuid(userId) {
|
||||
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(userId)
|
||||
},
|
||||
checkIsUsingOldAuth(config) {
|
||||
if (!config.version) return true
|
||||
return !this.$isValidVersion(config.version, '2.26.0')
|
||||
},
|
||||
/**
|
||||
* Initiates the login process using OpenID via OAuth2.0.
|
||||
* 1. Verifying the server's address
|
||||
@@ -374,26 +393,36 @@ export default {
|
||||
} catch (error) {} // No Error handling needed
|
||||
|
||||
try {
|
||||
// Returns the same user response payload as /login
|
||||
const response = await CapacitorHttp.get({
|
||||
url: backendEndpoint
|
||||
})
|
||||
|
||||
if (!response.data || !response.data.user || !response.data.user.token) {
|
||||
throw new Error('Token data is missing in the response.')
|
||||
// v2.26.0+ returns accessToken and refreshToken on user object
|
||||
if (!response.data?.user?.token && !response.data?.user?.accessToken) {
|
||||
throw new Error('Token is missing in response.')
|
||||
}
|
||||
|
||||
this.serverConfig.token = response.data.user.token
|
||||
const user = response.data.user
|
||||
this.serverConfig.token = user.accessToken || user.token
|
||||
|
||||
// TODO: Is it necessary to authenticate again?
|
||||
const payload = await this.authenticateToken()
|
||||
|
||||
if (!payload) {
|
||||
throw new Error('Authentication failed with the provided token.')
|
||||
}
|
||||
|
||||
const duplicateConfig = this.serverConnectionConfigs.find((scc) => scc.address === this.serverConfig.address && scc.username === payload.user.username)
|
||||
const duplicateConfig = this.serverConnectionConfigs.find((scc) => scc.address === this.serverConfig.address && scc.username === payload.user.username && scc.id !== this.serverConfig.id)
|
||||
if (duplicateConfig) {
|
||||
throw new Error('Config already exists for this address and username.')
|
||||
}
|
||||
|
||||
// For v2.26.0+ re-attach accessToken and refreshToken to user object because /authorize does not return them
|
||||
if (user.accessToken) {
|
||||
payload.user.accessToken = user.accessToken
|
||||
payload.user.refreshToken = user.refreshToken
|
||||
}
|
||||
|
||||
this.setUserAndConnection(payload)
|
||||
} catch (error) {
|
||||
console.error('[SSO] Error in exchangeCodeForToken: ', error)
|
||||
@@ -436,12 +465,17 @@ export default {
|
||||
}
|
||||
|
||||
this.error = null
|
||||
var payload = await this.authenticateToken()
|
||||
const payload = await this.authenticateToken()
|
||||
|
||||
if (payload) {
|
||||
// Will NOT include access token and refresh token
|
||||
this.setUserAndConnection(payload)
|
||||
} else {
|
||||
this.showAuth = true
|
||||
let error = this.error
|
||||
if (await this.submit(true)) {
|
||||
this.showForm = true
|
||||
this.error = error
|
||||
}
|
||||
}
|
||||
},
|
||||
async removeServerConfigClick() {
|
||||
@@ -470,12 +504,14 @@ export default {
|
||||
this.showForm = !this.serverConnectionConfigs.length
|
||||
}
|
||||
},
|
||||
editServerConfig(serverConfig) {
|
||||
async editServerConfig(serverConfig) {
|
||||
this.serverConfig = {
|
||||
...serverConfig
|
||||
}
|
||||
this.showForm = true
|
||||
this.showAuth = true
|
||||
|
||||
if (await this.submit(true)) {
|
||||
this.showForm = true
|
||||
}
|
||||
},
|
||||
async newServerConfigClick() {
|
||||
await this.$hapticsImpact()
|
||||
@@ -504,7 +540,7 @@ export default {
|
||||
try {
|
||||
var urlObject = new URL(url)
|
||||
if (protocolOverride) urlObject.protocol = protocolOverride
|
||||
return urlObject.href
|
||||
return urlObject.href.replace(/\/$/, '') // Remove trailing slash
|
||||
} catch (error) {
|
||||
console.error('Invalid URL', error)
|
||||
return null
|
||||
@@ -597,7 +633,12 @@ export default {
|
||||
})
|
||||
},
|
||||
requestServerLogin() {
|
||||
return this.postRequest(`${this.serverConfig.address}/login`, { username: this.serverConfig.username, password: this.password || '' }, this.serverConfig.customHeaders, 20000)
|
||||
const headers = {
|
||||
// Tells the Abs server to return the refresh token
|
||||
'x-return-tokens': 'true',
|
||||
...(this.serverConfig.customHeaders || {})
|
||||
}
|
||||
return this.postRequest(`${this.serverConfig.address}/login`, { username: this.serverConfig.username, password: this.password || '' }, headers, 20000)
|
||||
.then((data) => {
|
||||
if (!data.user) {
|
||||
console.error(data.error)
|
||||
@@ -616,9 +657,8 @@ export default {
|
||||
return false
|
||||
})
|
||||
},
|
||||
async submit() {
|
||||
if (!this.networkConnected) return
|
||||
if (!this.serverConfig.address) return
|
||||
async submit(preventAutoLogin = false) {
|
||||
if (!this.networkConnected || !this.serverConfig.address) return false
|
||||
|
||||
const initialAddress = this.serverConfig.address
|
||||
// Did the user specify a protocol?
|
||||
@@ -631,6 +671,7 @@ export default {
|
||||
this.authMethods = []
|
||||
|
||||
try {
|
||||
console.log('[ServerConnectForm] submit tryServerUrl: ' + this.serverConfig.address)
|
||||
// Try the server URL. If it fails and the protocol was not provided, try with http instead of https
|
||||
const statusData = await this.tryServerUrl(this.serverConfig.address, !protocolProvided)
|
||||
if (this.validateLoginFormResponse(statusData, this.serverConfig.address, protocolProvided)) {
|
||||
@@ -639,12 +680,17 @@ export default {
|
||||
this.oauth.buttonText = statusData.data.authFormData?.authOpenIDButtonText || 'Login with OpenID'
|
||||
this.serverConfig.version = statusData.data.serverVersion
|
||||
|
||||
if (statusData.data.authFormData?.authOpenIDAutoLaunch) {
|
||||
if (statusData.data.authFormData?.authOpenIDAutoLaunch && !preventAutoLogin) {
|
||||
this.clickLoginWithOpenId()
|
||||
}
|
||||
return true
|
||||
} else {
|
||||
console.log('[ServerConnectForm] submit validateLoginFormResponse failed: ' + this.serverConfig.address)
|
||||
return false
|
||||
}
|
||||
} catch (error) {
|
||||
this.handleLoginFormError(error)
|
||||
return false
|
||||
} finally {
|
||||
this.processing = false
|
||||
}
|
||||
@@ -770,26 +816,6 @@ export default {
|
||||
prependProtocolIfNeeded(address) {
|
||||
return address.startsWith('http://') || address.startsWith('https://') ? address : `https://${address}`
|
||||
},
|
||||
/**
|
||||
* Compares two semantic versioning strings to determine if the current version meets
|
||||
* or exceeds the minimum version requirement.
|
||||
*
|
||||
* @param {string} currentVersion - The current version string to compare, e.g., "1.2.3".
|
||||
* @param {string} minVersion - The minimum version string required, e.g., "1.0.0".
|
||||
* @returns {boolean} - Returns true if the current version is greater than or equal
|
||||
* to the minimum version, false otherwise.
|
||||
*/
|
||||
isValidVersion(currentVersion, minVersion) {
|
||||
const currentParts = currentVersion.split('.').map(Number)
|
||||
const minParts = minVersion.split('.').map(Number)
|
||||
|
||||
for (let i = 0; i < minParts.length; i++) {
|
||||
if (currentParts[i] > minParts[i]) return true
|
||||
if (currentParts[i] < minParts[i]) return false
|
||||
}
|
||||
|
||||
return true
|
||||
},
|
||||
async submitAuth() {
|
||||
if (!this.networkConnected) return
|
||||
if (!this.serverConfig.username) {
|
||||
@@ -806,9 +832,10 @@ export default {
|
||||
this.error = null
|
||||
this.processing = true
|
||||
|
||||
var payload = await this.requestServerLogin()
|
||||
const payload = await this.requestServerLogin()
|
||||
this.processing = false
|
||||
if (payload) {
|
||||
// Will include access token and refresh token
|
||||
this.setUserAndConnection(payload)
|
||||
}
|
||||
},
|
||||
@@ -821,18 +848,30 @@ export default {
|
||||
this.$store.commit('libraries/setEReaderDevices', ereaderDevices)
|
||||
this.$setServerLanguageCode(serverSettings.language)
|
||||
|
||||
// Set library - Use last library if set and available fallback to default user library
|
||||
var lastLibraryId = await this.$localStore.getLastLibraryId()
|
||||
if (lastLibraryId && (!user.librariesAccessible.length || user.librariesAccessible.includes(lastLibraryId))) {
|
||||
this.$store.commit('libraries/setCurrentLibrary', lastLibraryId)
|
||||
} else if (userDefaultLibraryId) {
|
||||
this.$store.commit('libraries/setCurrentLibrary', userDefaultLibraryId)
|
||||
this.serverConfig.userId = user.id
|
||||
this.serverConfig.username = user.username
|
||||
|
||||
if (this.$isValidVersion(serverSettings.version, '2.26.0')) {
|
||||
// Tokens only returned from /login endpoint
|
||||
if (user.accessToken) {
|
||||
this.serverConfig.token = user.accessToken
|
||||
this.serverConfig.refreshToken = user.refreshToken
|
||||
} else {
|
||||
// Detect if the connection config is using the old token. If so, force re-login
|
||||
if (this.serverConfig.token === user.token || user.isOldToken) {
|
||||
this.setForceRelogin('oldAuthToken')
|
||||
return
|
||||
}
|
||||
|
||||
// If the token was updated during a refresh (in nativeHttp.js) it gets updated in the store, so refetch
|
||||
this.serverConfig.token = this.$store.getters['user/getToken'] || this.serverConfig.token
|
||||
}
|
||||
} else {
|
||||
// Server version before new JWT auth, use old user.token
|
||||
this.serverConfig.token = user.token
|
||||
}
|
||||
|
||||
this.serverConfig.userId = user.id
|
||||
this.serverConfig.token = user.token
|
||||
this.serverConfig.username = user.username
|
||||
delete this.serverConfig.version
|
||||
this.serverConfig.version = serverSettings.version
|
||||
|
||||
var serverConnectionConfig = await this.$db.setServerConnectionConfig(this.serverConfig)
|
||||
|
||||
@@ -849,7 +888,16 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
// Set library - Use last library if set and available fallback to default user library
|
||||
const lastLibraryId = await this.$localStore.getLastLibraryId()
|
||||
if (lastLibraryId && (!user.librariesAccessible.length || user.librariesAccessible.includes(lastLibraryId))) {
|
||||
this.$store.commit('libraries/setCurrentLibrary', lastLibraryId)
|
||||
} else if (userDefaultLibraryId) {
|
||||
this.$store.commit('libraries/setCurrentLibrary', userDefaultLibraryId)
|
||||
}
|
||||
|
||||
this.$store.commit('user/setUser', user)
|
||||
this.$store.commit('user/setAccessToken', serverConnectionConfig.token)
|
||||
this.$store.commit('user/setServerConnectionConfig', serverConnectionConfig)
|
||||
|
||||
this.$socket.connect(this.serverConfig.address, this.serverConfig.token)
|
||||
@@ -865,7 +913,13 @@ export default {
|
||||
this.error = null
|
||||
this.processing = true
|
||||
|
||||
const authRes = await this.postRequest(`${this.serverConfig.address}/api/authorize`, null, { Authorization: `Bearer ${this.serverConfig.token}` }).catch((error) => {
|
||||
const nativeHttpOptions = {
|
||||
headers: {
|
||||
Authorization: `Bearer ${this.serverConfig.token}`
|
||||
},
|
||||
serverConnectionConfig: this.serverConfig
|
||||
}
|
||||
const authRes = await this.$nativeHttp.post(`${this.serverConfig.address}/api/authorize`, null, nativeHttpOptions).catch((error) => {
|
||||
console.error('[ServerConnectForm] Server auth failed', error)
|
||||
const errorMsg = error.message || error
|
||||
this.error = 'Failed to authorize'
|
||||
@@ -874,14 +928,39 @@ export default {
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
console.log('[ServerConnectForm] authRes=', authRes)
|
||||
|
||||
this.processing = false
|
||||
return authRes
|
||||
},
|
||||
async setForceRelogin(error) {
|
||||
console.log('[ServerConnectForm] setForceRelogin', error, this.serverConfig.address)
|
||||
// This calls /status on the server and sets the auth methods
|
||||
const result = await this.submit(true)
|
||||
if (result) {
|
||||
this.showForm = true
|
||||
|
||||
if (error === 'oldAuthToken') {
|
||||
this.error = this.$strings.MessageOldServerAuthReLoginRequired
|
||||
} else if (error === 'refreshTokenFailed') {
|
||||
this.error = this.$strings.MessageFailedToRefreshToken
|
||||
}
|
||||
}
|
||||
},
|
||||
init() {
|
||||
if (this.$route.query.serverConnectionConfigId) {
|
||||
// Handle force re-login for servers using new JWT auth but still using an old token OR refresh token failed
|
||||
this.serverConfig = this.serverConnectionConfigs.find((scc) => scc.id === this.$route.query.serverConnectionConfigId)
|
||||
if (this.serverConfig) {
|
||||
this.setForceRelogin(this.$route.query.error)
|
||||
return
|
||||
} else {
|
||||
console.error('[ServerConnectForm] init with serverConnectionConfigId but no serverConfig found', this.$route.query.serverConnectionConfigId)
|
||||
}
|
||||
}
|
||||
|
||||
if (this.lastServerConnectionConfig) {
|
||||
console.log('[ServerConnectForm] init with lastServerConnectionConfig', this.lastServerConnectionConfig)
|
||||
this.connectToServer(this.lastServerConnectionConfig)
|
||||
} else {
|
||||
this.showForm = !this.serverConnectionConfigs.length
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<p class="text-xl font-mono">{{ this.$secondsToTimestamp(currentTime / _playbackRate) }}</p>
|
||||
</div>
|
||||
|
||||
<ui-text-input-with-label v-model="newBookmarkTitle" ref="noteInput" label="Note" />
|
||||
<ui-text-input-with-label v-model="newBookmarkTitle" :placeholder="bookmarkPlaceholder()" :autofocus="false" ref="noteInput" label="Note" />
|
||||
<div class="flex justify-end mt-6">
|
||||
<ui-btn color="success" class="w-full" @click.stop="submitBookmark">{{ selectedBookmark ? 'Update' : 'Create' }}</ui-btn>
|
||||
</div>
|
||||
@@ -93,6 +93,10 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bookmarkPlaceholder() {
|
||||
// using a method prevents caching the date
|
||||
return this.$formatDate(Date.now(), 'MMM dd, yyyy HH:mm')
|
||||
},
|
||||
editBookmark(bm) {
|
||||
this.selectedBookmark = bm
|
||||
this.newBookmarkTitle = bm.title
|
||||
@@ -157,18 +161,8 @@ export default {
|
||||
},
|
||||
createBookmark() {
|
||||
this.selectedBookmark = null
|
||||
this.newBookmarkTitle = this.$formatDate(Date.now(), 'MMM dd, yyyy HH:mm')
|
||||
this.newBookmarkTitle = ''
|
||||
this.showBookmarkTitleInput = true
|
||||
|
||||
// Auto focus the input and select the text
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.noteInput?.$refs.input?.$refs.input) {
|
||||
this.$refs.noteInput.$refs.input.$refs.input.focus()
|
||||
setTimeout(() => {
|
||||
this.$refs.noteInput?.$refs.input?.$refs.input?.select()
|
||||
}, 10)
|
||||
}
|
||||
})
|
||||
},
|
||||
async submitBookmark() {
|
||||
await this.$hapticsImpact()
|
||||
|
||||
@@ -54,8 +54,39 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sublist: null,
|
||||
bookItems: [
|
||||
sublist: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
show(newVal) {
|
||||
if (!newVal) {
|
||||
if (this.sublist && !this.selectedItemSublist) this.sublist = null
|
||||
if (!this.sublist && this.selectedItemSublist) this.sublist = this.selectedItemSublist
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show: {
|
||||
get() {
|
||||
return this.value
|
||||
},
|
||||
set(val) {
|
||||
this.$emit('input', val)
|
||||
}
|
||||
},
|
||||
selected: {
|
||||
get() {
|
||||
return this.filterBy
|
||||
},
|
||||
set(val) {
|
||||
this.$emit('update:filterBy', val)
|
||||
}
|
||||
},
|
||||
userCanAccessExplicitContent() {
|
||||
return this.$store.getters['user/getUserCanAccessExplicitContent']
|
||||
},
|
||||
bookItems() {
|
||||
const items = [
|
||||
{
|
||||
text: this.$strings.LabelAll,
|
||||
value: 'all'
|
||||
@@ -104,9 +135,26 @@ export default {
|
||||
text: this.$strings.ButtonIssues,
|
||||
value: 'issues',
|
||||
sublist: false
|
||||
},
|
||||
{
|
||||
text: this.$strings.LabelRSSFeedOpen,
|
||||
value: 'feed-open',
|
||||
sublist: false
|
||||
}
|
||||
],
|
||||
podcastItems: [
|
||||
]
|
||||
|
||||
if (this.userCanAccessExplicitContent) {
|
||||
items.push({
|
||||
text: this.$strings.LabelExplicit,
|
||||
value: 'explicit',
|
||||
sublist: false
|
||||
})
|
||||
}
|
||||
|
||||
return items
|
||||
},
|
||||
podcastItems() {
|
||||
const items = [
|
||||
{
|
||||
text: this.$strings.LabelAll,
|
||||
value: 'all'
|
||||
@@ -120,34 +168,23 @@ export default {
|
||||
text: this.$strings.LabelTag,
|
||||
value: 'tags',
|
||||
sublist: true
|
||||
},
|
||||
{
|
||||
text: this.$strings.LabelRSSFeedOpen,
|
||||
value: 'feed-open',
|
||||
sublist: false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
show(newVal) {
|
||||
if (!newVal) {
|
||||
if (this.sublist && !this.selectedItemSublist) this.sublist = null
|
||||
if (!this.sublist && this.selectedItemSublist) this.sublist = this.selectedItemSublist
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show: {
|
||||
get() {
|
||||
return this.value
|
||||
},
|
||||
set(val) {
|
||||
this.$emit('input', val)
|
||||
}
|
||||
},
|
||||
selected: {
|
||||
get() {
|
||||
return this.filterBy
|
||||
},
|
||||
set(val) {
|
||||
this.$emit('update:filterBy', val)
|
||||
|
||||
if (this.userCanAccessExplicitContent) {
|
||||
items.push({
|
||||
text: this.$strings.LabelExplicit,
|
||||
value: 'explicit',
|
||||
sublist: false
|
||||
})
|
||||
}
|
||||
|
||||
return items
|
||||
},
|
||||
isPodcast() {
|
||||
return this.$store.getters['libraries/getCurrentLibraryMediaType'] === 'podcast'
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
<div class="w-full relative">
|
||||
<h1 class="text-lg mb-4">{{ $strings.HeaderRSSFeedIsOpen }}</h1>
|
||||
|
||||
<ui-text-input v-model="currentFeed.feedUrl" class="text-sm" readonly />
|
||||
<ui-text-input v-model="fullFeedUrl" class="text-sm" readonly />
|
||||
|
||||
<span class="material-symbols absolute right-2 bottom-2 p-0.5 text-base" :class="linkCopied ? 'text-success' : 'text-fg-muted'" @click="copyToClipboard(currentFeed.feedUrl)">{{ linkCopied ? 'check' : 'content_copy' }}</span>
|
||||
<span class="material-symbols absolute right-2 bottom-2 p-0.5 text-base" :class="linkCopied ? 'text-success' : 'text-fg-muted'" @click="copyToClipboard(fullFeedUrl)">{{ linkCopied ? 'check' : 'content_copy' }}</span>
|
||||
</div>
|
||||
|
||||
<div v-if="currentFeed.meta" class="mt-5">
|
||||
@@ -119,6 +119,10 @@ export default {
|
||||
demoFeedUrl() {
|
||||
return `${this.serverAddress}/feed/${this.newFeedSlug}`
|
||||
},
|
||||
fullFeedUrl() {
|
||||
if (!this.currentFeed) return ''
|
||||
return `${this.serverAddress}${this.currentFeed.feedUrl}`
|
||||
},
|
||||
isHttp() {
|
||||
return !!this.serverAddress?.startsWith('http://')
|
||||
}
|
||||
|
||||
@@ -77,9 +77,6 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
userToken() {
|
||||
return this.$store.getters['user/getToken']
|
||||
},
|
||||
libraryItemId() {
|
||||
return this.libraryItem?.id
|
||||
},
|
||||
@@ -245,11 +242,9 @@ export default {
|
||||
async extract() {
|
||||
this.loading = true
|
||||
|
||||
// TODO: Handle JWT auth refresh
|
||||
const buff = await this.$axios.$get(this.url, {
|
||||
responseType: 'blob',
|
||||
headers: {
|
||||
Authorization: `Bearer ${this.userToken}`
|
||||
}
|
||||
responseType: 'blob'
|
||||
})
|
||||
|
||||
const archive = await Archive.open(buff)
|
||||
|
||||
@@ -49,9 +49,6 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
userToken() {
|
||||
return this.$store.getters['user/getToken']
|
||||
},
|
||||
/** @returns {string} */
|
||||
libraryItemId() {
|
||||
return this.libraryItem?.id
|
||||
@@ -298,15 +295,26 @@ export default {
|
||||
|
||||
/** @type {EpubReader} */
|
||||
const reader = this
|
||||
|
||||
// Use axios to make request because we have token refresh logic in interceptor
|
||||
const customRequest = async (url) => {
|
||||
try {
|
||||
return this.$axios.$get(url, {
|
||||
responseType: 'arraybuffer'
|
||||
})
|
||||
} catch (error) {
|
||||
console.error('EpubReader.initEpub customRequest failed:', error)
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
console.log('[EpubReader] initEpub', reader.url)
|
||||
/** @type {ePub.Book} */
|
||||
reader.book = new ePub(reader.url, {
|
||||
width: window.innerWidth,
|
||||
height: window.innerHeight - this.readerHeightOffset,
|
||||
openAs: 'epub',
|
||||
requestHeaders: {
|
||||
Authorization: `Bearer ${this.userToken}`
|
||||
}
|
||||
requestMethod: this.isLocal ? null : customRequest
|
||||
})
|
||||
|
||||
/** @type {ePub.Rendition} */
|
||||
|
||||
@@ -22,11 +22,7 @@ export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
computed: {
|
||||
userToken() {
|
||||
return this.$store.getters['user/getToken']
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
addHtmlCss() {
|
||||
let iframe = document.getElementsByTagName('iframe')[0]
|
||||
@@ -84,11 +80,9 @@ export default {
|
||||
},
|
||||
async initMobi() {
|
||||
// Fetch mobi file as blob
|
||||
// TODO: Handle JWT auth refresh
|
||||
var buff = await this.$axios.$get(this.url, {
|
||||
responseType: 'blob',
|
||||
headers: {
|
||||
Authorization: `Bearer ${this.userToken}`
|
||||
}
|
||||
responseType: 'blob'
|
||||
})
|
||||
var reader = new FileReader()
|
||||
reader.onload = async (event) => {
|
||||
@@ -133,4 +127,4 @@ export default {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -49,7 +49,8 @@ export default {
|
||||
numPages: 0,
|
||||
windowWidth: 0,
|
||||
windowHeight: 0,
|
||||
pdfDocInitParams: null
|
||||
pdfDocInitParams: null,
|
||||
isRefreshing: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -109,6 +110,10 @@ export default {
|
||||
},
|
||||
isPlayerOpen() {
|
||||
return this.$store.getters['getIsPlayerOpen']
|
||||
},
|
||||
ebookUrl() {
|
||||
const serverAddress = this.$store.getters['user/getServerAddress']
|
||||
return this.isLocal ? this.url : `${serverAddress}${this.url}`
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -164,7 +169,56 @@ export default {
|
||||
this.page++
|
||||
this.updateProgress()
|
||||
},
|
||||
error(err) {
|
||||
async handleRefreshFailure() {
|
||||
try {
|
||||
console.log('[PdfReader] Handling refresh failure - logging out user')
|
||||
|
||||
const serverConnectionConfigId = this.$store.getters['user/getServerConnectionConfigId']
|
||||
|
||||
// Clear store
|
||||
await this.$store.dispatch('user/logout')
|
||||
|
||||
if (serverConnectionConfigId) {
|
||||
// Clear refresh token for server connection config
|
||||
await this.$db.clearRefreshToken(serverConnectionConfigId)
|
||||
}
|
||||
|
||||
if (window.location.pathname !== '/connect') {
|
||||
window.location.href = '/connect?error=refreshTokenFailed&serverConnectionConfigId=' + serverConnectionConfigId
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('[PdfReader] Failed to handle refresh failure:', error)
|
||||
}
|
||||
},
|
||||
async refreshToken() {
|
||||
if (this.isRefreshing) return
|
||||
this.isRefreshing = true
|
||||
// Cannot use axios with this pdf reader so we need to handle the refresh separately
|
||||
// Should work on migrating to a different pdf reader in the future
|
||||
const newAccessToken = await this.$store.dispatch('user/refreshToken').catch((error) => {
|
||||
console.error('Failed to refresh token', error)
|
||||
return null
|
||||
})
|
||||
if (!newAccessToken) {
|
||||
this.handleRefreshFailure()
|
||||
return
|
||||
}
|
||||
|
||||
// Force Vue to re-render the PDF component by creating a new object
|
||||
this.pdfDocInitParams = {
|
||||
url: this.ebookUrl,
|
||||
httpHeaders: {
|
||||
Authorization: `Bearer ${newAccessToken}`
|
||||
}
|
||||
}
|
||||
this.isRefreshing = false
|
||||
},
|
||||
async error(err) {
|
||||
if (err && err.status === 401) {
|
||||
console.log('Received 401 error, refreshing token')
|
||||
await this.refreshToken()
|
||||
return
|
||||
}
|
||||
console.error(err)
|
||||
},
|
||||
screenOrientationChange() {
|
||||
@@ -173,7 +227,7 @@ export default {
|
||||
},
|
||||
init() {
|
||||
this.pdfDocInitParams = {
|
||||
url: this.url,
|
||||
url: this.ebookUrl,
|
||||
httpHeaders: {
|
||||
Authorization: `Bearer ${this.userToken}`
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<span class="material-symbols text-2xl text-fg">settings</span>
|
||||
</button>
|
||||
<button v-if="comicHasMetadata" type="button" class="inline-flex mx-2" @click.stop="clickMetadataBtn">
|
||||
<span class="material-symbols text-2xl text-fg">more-vert</span>
|
||||
<span class="material-symbols text-2xl text-fg">more</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -260,6 +260,7 @@ export default {
|
||||
return null
|
||||
},
|
||||
ebookFile() {
|
||||
if (!this.media) return null
|
||||
// ebook file id is passed when reading a supplementary ebook
|
||||
if (this.ebookFileId) {
|
||||
return this.selectedLibraryItem.libraryFiles.find((lf) => lf.ino === this.ebookFileId)
|
||||
@@ -304,11 +305,11 @@ export default {
|
||||
if (this.localContentUrl) {
|
||||
return Capacitor.convertFileSrc(this.localContentUrl)
|
||||
}
|
||||
const serverAddress = this.$store.getters['user/getServerAddress']
|
||||
|
||||
if (this.ebookFileId) {
|
||||
return `${serverAddress}/api/items/${this.selectedLibraryItem.id}/ebook/${this.ebookFileId}`
|
||||
return `/api/items/${this.selectedLibraryItem.id}/ebook/${this.ebookFileId}`
|
||||
}
|
||||
return `${serverAddress}/api/items/${this.selectedLibraryItem.id}/ebook`
|
||||
return `/api/items/${this.selectedLibraryItem.id}/ebook`
|
||||
},
|
||||
isPlayerOpen() {
|
||||
return this.$store.getters['getIsPlayerOpen']
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="relative">
|
||||
<input v-model="input" ref="input" autofocus :type="type" :disabled="disabled" :readonly="readonly" autocorrect="off" autocapitalize="none" autocomplete="off" :placeholder="placeholder" class="py-2 w-full outline-none bg-primary disabled:text-fg-muted" :class="inputClass" @keyup="keyup" />
|
||||
<input v-model="input" ref="input" :autofocus="autofocus" :type="type" :disabled="disabled" :readonly="readonly" autocorrect="off" autocapitalize="none" autocomplete="off" :placeholder="placeholder" class="py-2 w-full outline-none bg-primary disabled:text-fg-muted" :class="inputClass" @keyup="keyup" />
|
||||
<div v-if="prependIcon" class="absolute top-0 left-0 h-full px-2 flex items-center justify-center">
|
||||
<span class="material-symbols text-lg">{{ prependIcon }}</span>
|
||||
</div>
|
||||
@@ -22,6 +22,10 @@ export default {
|
||||
disabled: Boolean,
|
||||
readonly: Boolean,
|
||||
borderless: Boolean,
|
||||
autofocus: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
bg: {
|
||||
type: String,
|
||||
default: 'bg'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="w-full">
|
||||
<p class="pb-0.5 text-sm font-semibold">{{ label }}</p>
|
||||
<ui-text-input v-model="inputValue" ref="input" :disabled="disabled" :type="type" text-size="base" class="w-full" />
|
||||
<ui-text-input v-model="inputValue" ref="input" :disabled="disabled" :type="type" :placeholder="placeholder" :autofocus="autofocus" text-size="base" class="w-full" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -14,7 +14,12 @@ export default {
|
||||
type: String,
|
||||
default: 'text'
|
||||
},
|
||||
disabled: Boolean
|
||||
disabled: Boolean,
|
||||
placeholder: String,
|
||||
autofocus: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="12px" height="12px" viewBox="0 0 512 512" class="ml-1">
|
||||
<path
|
||||
fill="white"
|
||||
d="M 89.00,40.12
|
||||
C 89.00,40.12 127.00,40.12 127.00,40.12
|
||||
127.00,40.12 198.00,40.12 198.00,40.12
|
||||
198.00,40.12 416.00,40.12 416.00,40.12
|
||||
446.58,40.05 472.95,66.42 473.00,97.00
|
||||
473.00,97.00 473.00,303.00 473.00,303.00
|
||||
473.00,303.00 473.00,418.00 473.00,418.00
|
||||
472.65,447.55 445.06,472.95 416.00,473.00
|
||||
416.00,473.00 210.00,473.00 210.00,473.00
|
||||
210.00,473.00 95.00,473.00 95.00,473.00
|
||||
65.45,472.65 40.05,445.06 40.00,416.00
|
||||
40.00,416.00 40.00,136.00 40.00,136.00
|
||||
40.00,136.00 40.00,109.00 40.00,109.00
|
||||
40.00,109.00 40.00,96.00 40.00,96.00
|
||||
40.07,81.58 46.89,67.14 57.01,57.01
|
||||
61.17,52.86 64.86,50.13 70.00,47.31
|
||||
77.25,43.33 81.02,42.18 89.00,40.12 Z
|
||||
M 372.00,392.00
|
||||
C 372.00,392.00 364.02,364.00 364.02,364.00
|
||||
364.02,364.00 350.72,319.00 350.72,319.00
|
||||
350.72,319.00 310.42,183.00 310.42,183.00
|
||||
310.42,183.00 296.86,137.00 296.86,137.00
|
||||
296.86,137.00 291.30,121.99 291.30,121.99
|
||||
291.30,121.99 284.00,121.00 284.00,121.00
|
||||
284.00,121.00 230.00,121.00 230.00,121.00
|
||||
230.00,121.00 222.51,122.02 222.51,122.02
|
||||
222.51,122.02 216.86,137.00 216.86,137.00
|
||||
216.86,137.00 203.28,183.00 203.28,183.00
|
||||
203.28,183.00 163.28,318.00 163.28,318.00
|
||||
163.28,318.00 148.71,367.00 148.71,367.00
|
||||
148.71,367.00 142.00,392.00 142.00,392.00
|
||||
142.00,392.00 183.00,392.00 183.00,392.00
|
||||
183.00,392.00 190.86,390.43 190.86,390.43
|
||||
190.86,390.43 195.86,375.00 195.86,375.00
|
||||
195.86,375.00 206.00,338.00 206.00,338.00
|
||||
206.00,338.00 293.00,338.00 293.00,338.00
|
||||
295.64,338.01 299.26,337.65 301.30,339.60
|
||||
303.23,341.43 304.80,348.22 305.58,351.00
|
||||
305.58,351.00 313.00,378.00 313.00,378.00
|
||||
316.91,391.63 315.20,391.98 325.00,392.00
|
||||
325.00,392.00 372.00,392.00 372.00,392.00 Z
|
||||
M 254.00,170.00
|
||||
C 254.00,170.00 256.00,170.00 256.00,170.00
|
||||
256.00,170.00 263.12,197.00 263.12,197.00
|
||||
263.12,197.00 282.88,268.00 282.88,268.00
|
||||
282.88,268.00 290.00,296.00 290.00,296.00
|
||||
290.00,296.00 219.00,296.00 219.00,296.00
|
||||
219.00,296.00 230.58,253.00 230.58,253.00
|
||||
230.58,253.00 254.00,170.00 254.00,170.00 Z"
|
||||
/>
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
computed: {},
|
||||
methods: {},
|
||||
mounted() {}
|
||||
}
|
||||
</script>
|
||||
@@ -78,15 +78,15 @@ export default {
|
||||
this.$store.commit('globals/updateDownloadItemPart', itemPart)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.downloadItemListener = AbsDownloader.addListener('onDownloadItem', (data) => this.onDownloadItem(data))
|
||||
this.itemPartUpdateListener = AbsDownloader.addListener('onDownloadItemPartUpdate', (data) => this.onDownloadItemPartUpdate(data))
|
||||
this.completeListener = AbsDownloader.addListener('onItemDownloadComplete', (data) => this.onItemDownloadComplete(data))
|
||||
async mounted() {
|
||||
this.downloadItemListener = await AbsDownloader.addListener('onDownloadItem', (data) => this.onDownloadItem(data))
|
||||
this.itemPartUpdateListener = await AbsDownloader.addListener('onDownloadItemPartUpdate', (data) => this.onDownloadItemPartUpdate(data))
|
||||
this.completeListener = await AbsDownloader.addListener('onItemDownloadComplete', (data) => this.onItemDownloadComplete(data))
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.downloadItemListener) this.downloadItemListener.remove()
|
||||
if (this.completeListener) this.completeListener.remove()
|
||||
if (this.itemPartUpdateListener) this.itemPartUpdateListener.remove()
|
||||
this.downloadItemListener?.remove()
|
||||
this.completeListener?.remove()
|
||||
this.itemPartUpdateListener?.remove()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -25,6 +25,7 @@
|
||||
4D66B958282EEA14008272D4 /* AbsFileSystem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D66B957282EEA14008272D4 /* AbsFileSystem.swift */; };
|
||||
4D91EEC62A40F28D004807ED /* EBookFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D91EEC52A40F28D004807ED /* EBookFile.swift */; };
|
||||
4DABC04F2B0139CA000F6264 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DABC04E2B0139CA000F6264 /* User.swift */; };
|
||||
4DB441E12E19B8BF0056C8F1 /* SecureStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DB441E02E19B8BF0056C8F1 /* SecureStorage.swift */; };
|
||||
4DF6C7172DB58ABF004059F1 /* AbsLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF6C7162DB58ABF004059F1 /* AbsLogger.swift */; };
|
||||
4DF74912287105C600AC7814 /* DeviceSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF74911287105C600AC7814 /* DeviceSettings.swift */; };
|
||||
4DFE2DA32D345C390000B204 /* MyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DFE2DA22D345C390000B204 /* MyViewController.swift */; };
|
||||
@@ -98,6 +99,7 @@
|
||||
4D8D412C26E187E400BA5F0D /* App-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "App-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
4D91EEC52A40F28D004807ED /* EBookFile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EBookFile.swift; sourceTree = "<group>"; };
|
||||
4DABC04E2B0139CA000F6264 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
|
||||
4DB441E02E19B8BF0056C8F1 /* SecureStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureStorage.swift; sourceTree = "<group>"; };
|
||||
4DF6C7162DB58ABF004059F1 /* AbsLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AbsLogger.swift; sourceTree = "<group>"; };
|
||||
4DF74911287105C600AC7814 /* DeviceSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceSettings.swift; sourceTree = "<group>"; };
|
||||
4DFE2DA22D345C390000B204 /* MyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyViewController.swift; sourceTree = "<group>"; };
|
||||
@@ -239,6 +241,7 @@
|
||||
3AFCB5E627EA23F700ECCC05 /* util */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4DB441E02E19B8BF0056C8F1 /* SecureStorage.swift */,
|
||||
E9FA07E228C82848005520B0 /* Logger.swift */,
|
||||
3AFCB5E727EA240D00ECCC05 /* NowPlayingInfo.swift */,
|
||||
3AD4FCEA280443DD006DB301 /* Database.swift */,
|
||||
@@ -550,6 +553,7 @@
|
||||
E9D5505828AC1C1A00C746DD /* Library.swift in Sources */,
|
||||
3AD4FCEB280443DD006DB301 /* Database.swift in Sources */,
|
||||
3AD4FCE528043E50006DB301 /* AbsDatabase.swift in Sources */,
|
||||
4DB441E12E19B8BF0056C8F1 /* SecureStorage.swift in Sources */,
|
||||
4DABC04F2B0139CA000F6264 /* User.swift in Sources */,
|
||||
E9D5506828AC1DC300C746DD /* LocalPodcastEpisode.swift in Sources */,
|
||||
EACB38162BCCA1500060DA4A /* DefaultedAudioPlayerRateManager.swift in Sources */,
|
||||
@@ -732,12 +736,12 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = Icons;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 36;
|
||||
CURRENT_PROJECT_VERSION = 40;
|
||||
DEVELOPMENT_TEAM = 7UFJ7D8V6A;
|
||||
INFOPLIST_FILE = App/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MARKETING_VERSION = 0.9.79;
|
||||
MARKETING_VERSION = 0.10.1;
|
||||
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.audiobookshelf.app.dev;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@@ -756,12 +760,12 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = Icons;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 36;
|
||||
CURRENT_PROJECT_VERSION = 40;
|
||||
DEVELOPMENT_TEAM = 7UFJ7D8V6A;
|
||||
INFOPLIST_FILE = App/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
MARKETING_VERSION = 0.9.79;
|
||||
MARKETING_VERSION = 0.10.1;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.audiobookshelf.app;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
|
||||
|
||||
@@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
// Override point for customization after application launch.
|
||||
|
||||
let configuration = Realm.Configuration(
|
||||
schemaVersion: 19,
|
||||
schemaVersion: 20,
|
||||
migrationBlock: { [weak self] migration, oldSchemaVersion in
|
||||
if (oldSchemaVersion < 1) {
|
||||
self?.logger.log("Realm schema version was \(oldSchemaVersion)")
|
||||
@@ -65,9 +65,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
self?.logger.log("Realm schema version was \(oldSchemaVersion)... Adding disableSleepTimerFadeOut settings")
|
||||
migration.enumerateObjects(ofType: PlayerSettings.className()) { oldObject, newObject in
|
||||
newObject?["disableSleepTimerFadeOut"] = false
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (oldSchemaVersion < 20) {
|
||||
self?.logger.log("Realm schema version was \(oldSchemaVersion)... Adding version to ServerConnectionConfigs")
|
||||
migration.enumerateObjects(ofType: ServerConnectionConfig.className()) { oldObject, newObject in
|
||||
newObject?["version"] = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
Realm.Configuration.defaultConfiguration = configuration
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
"plugins": {
|
||||
"CapacitorHttp": {
|
||||
"enabled": false
|
||||
},
|
||||
"StatusBar": {
|
||||
"backgroundColor": "#232323",
|
||||
"style": "DARK"
|
||||
}
|
||||
},
|
||||
"server": {
|
||||
|
||||
@@ -33,6 +33,8 @@ public class AbsDatabase: CAPPlugin, CAPBridgedPlugin {
|
||||
public let pluginMethods: [CAPPluginMethod] = [
|
||||
CAPPluginMethod(name: "setCurrentServerConnectionConfig", returnType: CAPPluginReturnPromise),
|
||||
CAPPluginMethod(name: "removeServerConnectionConfig", returnType: CAPPluginReturnPromise),
|
||||
CAPPluginMethod(name: "getRefreshToken", returnType: CAPPluginReturnPromise),
|
||||
CAPPluginMethod(name: "clearRefreshToken", returnType: CAPPluginReturnPromise),
|
||||
CAPPluginMethod(name: "logout", returnType: CAPPluginReturnPromise),
|
||||
CAPPluginMethod(name: "getDeviceData", returnType: CAPPluginReturnPromise),
|
||||
CAPPluginMethod(name: "getLocalLibraryItems", returnType: CAPPluginReturnPromise),
|
||||
@@ -49,25 +51,44 @@ public class AbsDatabase: CAPPlugin, CAPBridgedPlugin {
|
||||
]
|
||||
|
||||
private let logger = AppLogger(category: "AbsDatabase")
|
||||
private let secureStorage = SecureStorage()
|
||||
|
||||
// Used to notify the webview frontend that the token has been refreshed
|
||||
static var tokenRefreshCallback: ((String, [String: Any]) -> Void)?
|
||||
|
||||
override public func load() {
|
||||
AbsDatabase.tokenRefreshCallback = { [weak self] eventName, data in
|
||||
self?.notifyListeners(eventName, data: data)
|
||||
}
|
||||
}
|
||||
|
||||
@objc func setCurrentServerConnectionConfig(_ call: CAPPluginCall) {
|
||||
var id = call.getString("id")
|
||||
let address = call.getString("address", "")
|
||||
let version = call.getString("version", "")
|
||||
let userId = call.getString("userId", "")
|
||||
let username = call.getString("username", "")
|
||||
let token = call.getString("token", "")
|
||||
let refreshToken = call.getString("refreshToken", "") // Refresh only sent after login or refresh
|
||||
|
||||
let name = "\(address) (\(username))"
|
||||
|
||||
|
||||
if id == nil {
|
||||
id = "\(address)@\(username)".toBase64()
|
||||
}
|
||||
|
||||
if (refreshToken != "") {
|
||||
// Store refresh token securely if provided
|
||||
let hasRefreshToken = secureStorage.storeRefreshToken(serverConnectionConfigId: id ?? "", refreshToken: refreshToken)
|
||||
logger.log("Refresh token secured = \(hasRefreshToken)")
|
||||
}
|
||||
|
||||
let config = ServerConnectionConfig()
|
||||
config.id = id ?? ""
|
||||
config.index = 0
|
||||
config.name = name
|
||||
config.address = address
|
||||
config.version = version
|
||||
config.userId = userId
|
||||
config.username = username
|
||||
config.token = token
|
||||
@@ -76,12 +97,35 @@ public class AbsDatabase: CAPPlugin, CAPBridgedPlugin {
|
||||
let savedConfig = Store.serverConfig // Fetch the latest value
|
||||
call.resolve(convertServerConnectionConfigToJSON(config: savedConfig!))
|
||||
}
|
||||
|
||||
@objc func removeServerConnectionConfig(_ call: CAPPluginCall) {
|
||||
let id = call.getString("serverConnectionConfigId", "")
|
||||
|
||||
// Remove refresh token if it exists
|
||||
_ = secureStorage.removeRefreshToken(serverConnectionConfigId: id)
|
||||
|
||||
Database.shared.deleteServerConnectionConfig(id: id)
|
||||
|
||||
call.resolve()
|
||||
}
|
||||
|
||||
@objc func getRefreshToken(_ call: CAPPluginCall) {
|
||||
let serverConnectionConfigId = call.getString("serverConnectionConfigId", "")
|
||||
|
||||
let refreshToken = secureStorage.getRefreshToken(serverConnectionConfigId: serverConnectionConfigId)
|
||||
if let refreshToken = refreshToken {
|
||||
call.resolve(["refreshToken": refreshToken])
|
||||
} else {
|
||||
call.resolve()
|
||||
}
|
||||
}
|
||||
|
||||
@objc func clearRefreshToken(_ call: CAPPluginCall) {
|
||||
let serverConnectionConfigId = call.getString("serverConnectionConfigId", "")
|
||||
|
||||
let success = secureStorage.removeRefreshToken(serverConnectionConfigId: serverConnectionConfigId)
|
||||
call.resolve(["success": success])
|
||||
}
|
||||
|
||||
@objc func logout(_ call: CAPPluginCall) {
|
||||
Store.serverConfig = nil
|
||||
call.resolve()
|
||||
|
||||
+10
-10
@@ -1,5 +1,5 @@
|
||||
PODS:
|
||||
- Alamofire (5.8.1)
|
||||
- Alamofire (5.10.2)
|
||||
- Capacitor (7.2.0):
|
||||
- CapacitorCordova
|
||||
- CapacitorApp (7.0.1):
|
||||
@@ -25,11 +25,11 @@ PODS:
|
||||
- Capacitor
|
||||
- CordovaPlugins (6.2.1):
|
||||
- CapacitorCordova
|
||||
- Realm (10.47.0):
|
||||
- Realm/Headers (= 10.47.0)
|
||||
- Realm/Headers (10.47.0)
|
||||
- RealmSwift (10.47.0):
|
||||
- Realm (= 10.47.0)
|
||||
- Realm (10.54.4):
|
||||
- Realm/Headers (= 10.54.4)
|
||||
- Realm/Headers (10.54.4)
|
||||
- RealmSwift (10.54.4):
|
||||
- Realm (= 10.54.4)
|
||||
- WebnativellcCapacitorFilesharer (7.0.4):
|
||||
- Capacitor
|
||||
|
||||
@@ -88,7 +88,7 @@ EXTERNAL SOURCES:
|
||||
:path: "../../node_modules/@webnativellc/capacitor-filesharer"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: 3ca42e259043ee0dc5c0cdd76c4bc568b8e42af7
|
||||
Alamofire: 7193b3b92c74a07f85569e1a6c4f4237291e7496
|
||||
Capacitor: 106e7a4205f4618d582b886a975657c61179138d
|
||||
CapacitorApp: d63334c052278caf5d81585d80b21905c6f93f39
|
||||
CapacitorBrowser: 081852cf532acf77b9d2953f3a88fe5b9711fb06
|
||||
@@ -102,10 +102,10 @@ SPEC CHECKSUMS:
|
||||
CapacitorPreferences: cbf154e5e5519b7f5ab33817a334dda1e98387f9
|
||||
CapacitorStatusBar: 275cbf2f4dfc00388f519ef80c7ec22edda342c9
|
||||
CordovaPlugins: 5a72a85b45469e68556bb172409f1b6d57b27236
|
||||
Realm: e43fb540ae947497e3ea8a662443256920602060
|
||||
RealmSwift: 8b06ed06b5d16749ae0c4d91c0cba414a9e28189
|
||||
Realm: 8b5cda39a41f17a1734da2f39c6004eb8745587a
|
||||
RealmSwift: 0b4f808fed6898f1f6c26f501f740efd80dff0b4
|
||||
WebnativellcCapacitorFilesharer: 10b111373d4dc49608935600dcbcc14605258c73
|
||||
|
||||
PODFILE CHECKSUM: 498821c0cfa2508609567fa95d7244c01cbef538
|
||||
|
||||
COCOAPODS: 1.12.1
|
||||
COCOAPODS: 1.16.2
|
||||
|
||||
@@ -13,6 +13,7 @@ class ServerConnectionConfig: Object {
|
||||
@Persisted(indexed: true) var index: Int = 1
|
||||
@Persisted var name: String = ""
|
||||
@Persisted var address: String = ""
|
||||
@Persisted var version: String = ""
|
||||
@Persisted var userId: String = ""
|
||||
@Persisted var username: String = ""
|
||||
@Persisted var token: String = ""
|
||||
@@ -29,6 +30,7 @@ func convertServerConnectionConfigToJSON(config: ServerConnectionConfig) -> Dict
|
||||
"name": config.name,
|
||||
"index": config.index,
|
||||
"address": config.address,
|
||||
"version": config.version,
|
||||
"userId": config.userId,
|
||||
"username": config.username,
|
||||
"token": config.token,
|
||||
|
||||
@@ -561,8 +561,15 @@ class AudioPlayer: NSObject {
|
||||
guard let playbackSession = self.getPlaybackSession() else { return nil }
|
||||
|
||||
if (playbackSession.playMethod == PlayMethod.directplay.rawValue) {
|
||||
let urlstr = "\(Store.serverConfig!.address)/api/items/\(itemId)/file/\(ino)?token=\(Store.serverConfig!.token)"
|
||||
let url = URL(string: urlstr)!
|
||||
// As of v2.22.0 tracks use a different endpoint
|
||||
// See: https://github.com/advplyr/audiobookshelf/pull/4263
|
||||
let contentUrl: String
|
||||
if Store.isServerVersionGreaterThanOrEqualTo("2.22.0") {
|
||||
contentUrl = "\(Store.serverConfig!.address)/public/session/\(playbackSession.id)/track/\(track.index ?? 1)"
|
||||
} else {
|
||||
contentUrl = "\(Store.serverConfig!.address)/api/items/\(itemId)/file/\(ino)?token=\(Store.serverConfig!.token)"
|
||||
}
|
||||
let url = URL(string: contentUrl)!
|
||||
return AVURLAsset(url: url)
|
||||
} else if (playbackSession.playMethod == PlayMethod.local.rawValue) {
|
||||
guard let localFile = track.getLocalFile() else {
|
||||
@@ -577,7 +584,9 @@ class AudioPlayer: NSObject {
|
||||
let headers: [String: String] = [
|
||||
"Authorization": "Bearer \(Store.serverConfig!.token)"
|
||||
]
|
||||
return AVURLAsset(url: URL(string: "\(Store.serverConfig!.address)\(track.contentUrl ?? "")")!, options: ["AVURLAssetHTTPHeaderFieldsKey": headers])
|
||||
|
||||
let contentUrl = "\(Store.serverConfig!.address)\(track.contentUrl ?? "")"
|
||||
return AVURLAsset(url: URL(string: contentUrl)!, options: ["AVURLAssetHTTPHeaderFieldsKey": headers])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import Alamofire
|
||||
|
||||
class ApiClient {
|
||||
private static let logger = AppLogger(category: "ApiClient")
|
||||
private static let secureStorage = SecureStorage()
|
||||
|
||||
public static func getData(from url: URL, completion: @escaping (UIImage?) -> Void) {
|
||||
URLSession.shared.dataTask(with: url, completionHandler: {(data, response, error) in
|
||||
@@ -146,6 +147,318 @@ class ApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Token Refresh Handling
|
||||
|
||||
/**
|
||||
* Handles token refresh when a 401 Unauthorized response is received
|
||||
* This function will:
|
||||
* 1. Get the refresh token from secure storage for the current server connection
|
||||
* 2. Make a request to /auth/refresh endpoint with the refresh token
|
||||
* 3. Update the connection config with the new accessToken and put the refreshToken in secure storage
|
||||
* 4. Retry the original request with the new access token
|
||||
* 5. If refresh fails, handle logout
|
||||
*/
|
||||
private static func handleTokenRefresh<T: Decodable>(originalRequest: DataRequest, endpoint: String, method: HTTPMethod, parameters: Any?, decodable: T.Type, callback: ((_ param: T?) -> Void)?) {
|
||||
guard let serverConfig = Store.serverConfig else {
|
||||
logger.error("handleTokenRefresh: No server config available")
|
||||
callback?(nil)
|
||||
return
|
||||
}
|
||||
|
||||
logger.log("handleTokenRefresh: Attempting to refresh auth tokens for server \(serverConfig.name)")
|
||||
|
||||
// Get refresh token from secure storage
|
||||
guard let refreshToken = secureStorage.getRefreshToken(serverConnectionConfigId: serverConfig.id) else {
|
||||
logger.error("handleTokenRefresh: No refresh token available for server \(serverConfig.name)")
|
||||
handleRefreshFailure()
|
||||
callback?(nil)
|
||||
return
|
||||
}
|
||||
|
||||
logger.log("handleTokenRefresh: Retrieved refresh token, attempting to refresh access token")
|
||||
|
||||
// Create refresh token request
|
||||
let refreshHeaders: HTTPHeaders = [
|
||||
"x-refresh-token": refreshToken,
|
||||
"Content-Type": "application/json"
|
||||
]
|
||||
|
||||
let refreshRequest = AF.request("\(serverConfig.address)/auth/refresh", method: .post, headers: refreshHeaders)
|
||||
|
||||
refreshRequest.responseDecodable(of: RefreshResponse.self) { response in
|
||||
switch response.result {
|
||||
case .success(let refreshResponse):
|
||||
guard let user = refreshResponse.user,
|
||||
!user.accessToken.isEmpty else {
|
||||
logger.error("handleTokenRefresh: No access token in refresh response for server \(serverConfig.name)")
|
||||
handleRefreshFailure()
|
||||
callback?(nil)
|
||||
return
|
||||
}
|
||||
|
||||
logger.log("handleTokenRefresh: Successfully obtained new access token")
|
||||
|
||||
// Update tokens in secure storage and store
|
||||
updateTokens(newAccessToken: user.accessToken, newRefreshToken: user.refreshToken ?? refreshToken, serverConnectionConfigId: serverConfig.id)
|
||||
|
||||
// Retry the original request with the new access token
|
||||
logger.log("handleTokenRefresh: Retrying original request with new token")
|
||||
retryOriginalRequest(endpoint: endpoint, method: method, parameters: parameters, decodable: decodable, newAccessToken: user.accessToken, callback: callback)
|
||||
|
||||
case .failure(let error):
|
||||
logger.error("handleTokenRefresh: Refresh request failed for server \(serverConfig.name): \(error)")
|
||||
handleRefreshFailure()
|
||||
callback?(nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the stored tokens with new access and refresh tokens
|
||||
*/
|
||||
private static func updateTokens(newAccessToken: String, newRefreshToken: String, serverConnectionConfigId: String) {
|
||||
// Update the refresh token in secure storage if it's new
|
||||
if newRefreshToken != secureStorage.getRefreshToken(serverConnectionConfigId: serverConnectionConfigId) {
|
||||
let hasStored = secureStorage.storeRefreshToken(serverConnectionConfigId: serverConnectionConfigId, refreshToken: newRefreshToken)
|
||||
logger.log("updateTokens: Updated refresh token in secure storage. Stored=\(hasStored)")
|
||||
}
|
||||
|
||||
// Update access token on server connection config
|
||||
Database.shared.updateServerConnectionConfigToken(newToken: newAccessToken)
|
||||
logger.log("updateTokens: Updated access token in server connection config")
|
||||
|
||||
logger.log("updateTokens: Successfully refreshed auth tokens for server \(Store.serverConfig?.name ?? "unknown")")
|
||||
|
||||
// Notify webview frontend about token refresh
|
||||
if let callback = AbsDatabase.tokenRefreshCallback {
|
||||
let tokenData: [String: Any] = ["accessToken": newAccessToken]
|
||||
callback("onTokenRefresh", tokenData)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retries the original request with the new access token
|
||||
*/
|
||||
private static func retryOriginalRequest<T: Decodable>(endpoint: String, method: HTTPMethod, parameters: Any?, decodable: T.Type, newAccessToken: String, callback: ((_ param: T?) -> Void)?) {
|
||||
guard let serverConfig = Store.serverConfig else {
|
||||
logger.error("retryOriginalRequest: No server config available")
|
||||
callback?(nil)
|
||||
return
|
||||
}
|
||||
|
||||
let headers: HTTPHeaders = [
|
||||
"Authorization": "Bearer \(newAccessToken)"
|
||||
]
|
||||
|
||||
let retryRequest: DataRequest
|
||||
|
||||
switch method {
|
||||
case .get:
|
||||
retryRequest = AF.request("\(serverConfig.address)/\(endpoint)", method: .get, headers: headers)
|
||||
case .post:
|
||||
if let parameters = parameters as? [String: Any] {
|
||||
retryRequest = AF.request("\(serverConfig.address)/\(endpoint)", method: .post, parameters: parameters, encoding: JSONEncoding.default, headers: headers)
|
||||
} else if let encodableParams = parameters as? Encodable {
|
||||
retryRequest = AF.request("\(serverConfig.address)/\(endpoint)", method: .post, parameters: encodableParams, encoder: JSONParameterEncoder.default, headers: headers)
|
||||
} else {
|
||||
retryRequest = AF.request("\(serverConfig.address)/\(endpoint)", method: .post, headers: headers)
|
||||
}
|
||||
case .patch:
|
||||
if let encodableParams = parameters as? Encodable {
|
||||
retryRequest = AF.request("\(serverConfig.address)/\(endpoint)", method: .patch, parameters: encodableParams, encoder: JSONParameterEncoder.default, headers: headers)
|
||||
} else {
|
||||
retryRequest = AF.request("\(serverConfig.address)/\(endpoint)", method: .patch, headers: headers)
|
||||
}
|
||||
default:
|
||||
logger.error("retryOriginalRequest: Unsupported method \(method)")
|
||||
callback?(nil)
|
||||
return
|
||||
}
|
||||
|
||||
// Handle the response
|
||||
retryRequest.response { response in
|
||||
if let statusCode = response.response?.statusCode, (200...299).contains(statusCode) {
|
||||
// Check if response has data
|
||||
if let data = response.data, !data.isEmpty {
|
||||
// If it is a string return nil (e.g. express returns OK for 200 status codes)
|
||||
if let responseString = String(data: data, encoding: .utf8) {
|
||||
logger.log("retryOriginalRequest: Got string response '\(responseString)'")
|
||||
callback?(nil)
|
||||
return
|
||||
}
|
||||
|
||||
// If not a string, try JSON
|
||||
do {
|
||||
let decodedObject = try JSONDecoder().decode(decodable, from: data)
|
||||
callback?(decodedObject)
|
||||
} catch {
|
||||
logger.error("retryOriginalRequest: JSON decode failed: \(error)")
|
||||
callback?(nil)
|
||||
}
|
||||
} else {
|
||||
// Empty response
|
||||
logger.log("retryOriginalRequest: Empty response with success status \(statusCode)")
|
||||
callback?(nil)
|
||||
}
|
||||
} else {
|
||||
logger.error("retryOriginalRequest: Request failed with status \(response.response?.statusCode ?? 0)")
|
||||
callback?(nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the case when token refresh fails
|
||||
* This will clear the current server connection and notify webview
|
||||
*/
|
||||
private static func handleRefreshFailure() {
|
||||
logger.log("handleRefreshFailure: Token refresh failed, clearing session")
|
||||
|
||||
// Clear the current server connection
|
||||
Store.serverConfig = nil
|
||||
|
||||
// Remove refresh token from secure storage
|
||||
if let serverConfig = Store.serverConfig {
|
||||
_ = secureStorage.removeRefreshToken(serverConnectionConfigId: serverConfig.id)
|
||||
}
|
||||
|
||||
// Notify webview frontend about token refresh failure
|
||||
if let callback = AbsDatabase.tokenRefreshCallback {
|
||||
callback("onTokenRefreshFailure", ["error": "Token refresh failed"])
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Enhanced API Methods with Token Refresh
|
||||
|
||||
public static func getResourceWithTokenRefresh<T: Decodable>(endpoint: String, decodable: T.Type = T.self, callback: ((_ param: T?) -> Void)?) {
|
||||
if (Store.serverConfig == nil) {
|
||||
logger.error("Server config not set")
|
||||
callback?(nil)
|
||||
return
|
||||
}
|
||||
|
||||
let headers: HTTPHeaders = [
|
||||
"Authorization": "Bearer \(Store.serverConfig!.token)"
|
||||
]
|
||||
|
||||
let request = AF.request("\(Store.serverConfig!.address)/\(endpoint)", method: .get, headers: headers)
|
||||
|
||||
request.responseDecodable(of: decodable) { response in
|
||||
if let statusCode = response.response?.statusCode, statusCode == 401 {
|
||||
logger.log("getResourceWithTokenRefresh: 401 Unauthorized for request to \(endpoint) - attempting token refresh")
|
||||
handleTokenRefresh(originalRequest: request, endpoint: endpoint, method: .get, parameters: nil, decodable: decodable, callback: callback)
|
||||
} else {
|
||||
switch response.result {
|
||||
case .success(let obj):
|
||||
callback?(obj)
|
||||
case .failure(let error):
|
||||
logger.error("api request to \(endpoint) failed")
|
||||
print(error)
|
||||
callback?(nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static func postResourceWithTokenRefresh<T: Encodable, U: Decodable>(endpoint: String, parameters: T, decodable: U.Type = U.self, callback: ((_ param: U?) -> Void)?) {
|
||||
if (Store.serverConfig == nil) {
|
||||
logger.error("Server config not set")
|
||||
callback?(nil)
|
||||
return
|
||||
}
|
||||
|
||||
let headers: HTTPHeaders = [
|
||||
"Authorization": "Bearer \(Store.serverConfig!.token)"
|
||||
]
|
||||
|
||||
let request = AF.request("\(Store.serverConfig!.address)/\(endpoint)", method: .post, parameters: parameters, encoder: JSONParameterEncoder.default, headers: headers)
|
||||
|
||||
request.responseDecodable(of: decodable) { response in
|
||||
if let statusCode = response.response?.statusCode, statusCode == 401 {
|
||||
logger.log("postResourceWithTokenRefresh: 401 Unauthorized for request to \(endpoint) - attempting token refresh")
|
||||
handleTokenRefresh(originalRequest: request, endpoint: endpoint, method: .post, parameters: parameters, decodable: decodable, callback: callback)
|
||||
} else {
|
||||
switch response.result {
|
||||
case .success(let obj):
|
||||
callback?(obj)
|
||||
case .failure(let error):
|
||||
logger.error("api request to \(endpoint) failed")
|
||||
print(error)
|
||||
callback?(nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* POST request for endpoints that only return success/failure
|
||||
*/
|
||||
public static func postResourceWithTokenRefresh<T: Encodable>(endpoint: String, parameters: T, callback: ((_ success: Bool) -> Void)?) {
|
||||
if (Store.serverConfig == nil) {
|
||||
logger.error("Server config not set")
|
||||
callback?(false)
|
||||
return
|
||||
}
|
||||
|
||||
let headers: HTTPHeaders = [
|
||||
"Authorization": "Bearer \(Store.serverConfig!.token)"
|
||||
]
|
||||
|
||||
let request = AF.request("\(Store.serverConfig!.address)/\(endpoint)", method: .post, parameters: parameters, encoder: JSONParameterEncoder.default, headers: headers)
|
||||
|
||||
request.response { response in
|
||||
if let statusCode = response.response?.statusCode, statusCode == 401 {
|
||||
logger.log("postResourceWithTokenRefresh: 401 Unauthorized for request to \(endpoint) - attempting token refresh")
|
||||
handleTokenRefresh(originalRequest: request, endpoint: endpoint, method: .post, parameters: parameters, decodable: EmptyResponse.self) { result in
|
||||
callback?(result != nil)
|
||||
}
|
||||
} else {
|
||||
switch response.result {
|
||||
case .success(_):
|
||||
callback?(true)
|
||||
case .failure(let error):
|
||||
logger.error("api request to \(endpoint) failed")
|
||||
print(error)
|
||||
callback?(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static func patchResourceWithTokenRefresh<T: Encodable>(endpoint: String, parameters: T, callback: ((_ success: Bool) -> Void)?) {
|
||||
if (Store.serverConfig == nil) {
|
||||
logger.error("Server config not set")
|
||||
callback?(false)
|
||||
return
|
||||
}
|
||||
|
||||
let headers: HTTPHeaders = [
|
||||
"Authorization": "Bearer \(Store.serverConfig!.token)"
|
||||
]
|
||||
|
||||
let request = AF.request("\(Store.serverConfig!.address)/\(endpoint)", method: .patch, parameters: parameters, encoder: JSONParameterEncoder.default, headers: headers)
|
||||
|
||||
request.response { response in
|
||||
if let statusCode = response.response?.statusCode, statusCode == 401 {
|
||||
logger.log("patchResourceWithTokenRefresh: 401 Unauthorized for request to \(endpoint) - attempting token refresh")
|
||||
handleTokenRefresh(originalRequest: request, endpoint: endpoint, method: .patch, parameters: parameters, decodable: EmptyResponse.self) { result in
|
||||
callback?(result != nil)
|
||||
}
|
||||
} else {
|
||||
switch response.result {
|
||||
case .success(_):
|
||||
callback?(true)
|
||||
case .failure(let error):
|
||||
logger.error("api request to \(endpoint) failed")
|
||||
print(error)
|
||||
callback?(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - API Functions
|
||||
|
||||
public static func startPlaybackSession(libraryItemId: String, episodeId: String?, forceTranscode:Bool, callback: @escaping (_ param: PlaybackSession) -> Void) {
|
||||
var endpoint = "api/items/\(libraryItemId)/play"
|
||||
if episodeId != nil {
|
||||
@@ -160,20 +473,28 @@ class ApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
let parameters: [String: Any] = [
|
||||
"forceDirectPlay": !forceTranscode ? "1" : "",
|
||||
"forceTranscode": forceTranscode ? "1" : "",
|
||||
"mediaPlayer": "AVPlayer",
|
||||
"deviceInfo": [
|
||||
"deviceId": UIDevice.current.identifierForVendor?.uuidString,
|
||||
"manufacturer": "Apple",
|
||||
"model": modelCode,
|
||||
"clientVersion": Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
|
||||
]
|
||||
]
|
||||
ApiClient.postResource(endpoint: endpoint, parameters: parameters, decodable: PlaybackSession.self) { obj in
|
||||
let session = obj
|
||||
// Create an Encodable struct for the parameters
|
||||
let parameters = PlaybackSessionRequest(
|
||||
forceDirectPlay: !forceTranscode ? "1" : "",
|
||||
forceTranscode: forceTranscode ? "1" : "",
|
||||
mediaPlayer: "AVPlayer",
|
||||
deviceInfo: DeviceInfo(
|
||||
deviceId: UIDevice.current.identifierForVendor?.uuidString,
|
||||
manufacturer: "Apple",
|
||||
model: modelCode,
|
||||
clientVersion: Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
|
||||
)
|
||||
)
|
||||
|
||||
// Use the new token refresh-enabled method
|
||||
postResourceWithTokenRefresh(endpoint: endpoint, parameters: parameters, decodable: PlaybackSession.self) { session in
|
||||
guard let session = session else {
|
||||
logger.error("startPlaybackSession: Failed to create playback session")
|
||||
callback(PlaybackSession()) // Return empty session on failure
|
||||
return
|
||||
}
|
||||
|
||||
// Set server connection info on the session
|
||||
session.serverConnectionConfigId = Store.serverConfig!.id
|
||||
session.serverAddress = Store.serverConfig!.address
|
||||
|
||||
@@ -182,15 +503,28 @@ class ApiClient {
|
||||
}
|
||||
|
||||
public static func reportPlaybackProgress(report: PlaybackReport, sessionId: String) async -> Bool {
|
||||
return await postResource(endpoint: "api/session/\(sessionId)/sync", parameters: report)
|
||||
return await withCheckedContinuation { continuation in
|
||||
postResourceWithTokenRefresh(endpoint: "api/session/\(sessionId)/sync", parameters: report) { success in
|
||||
continuation.resume(returning: success)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static func reportLocalPlaybackProgress(_ session: PlaybackSession) async -> Bool {
|
||||
return await postResource(endpoint: "api/session/local", parameters: session)
|
||||
return await withCheckedContinuation { continuation in
|
||||
postResourceWithTokenRefresh(endpoint: "api/session/local", parameters: session) { success in
|
||||
continuation.resume(returning: success)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static func reportAllLocalPlaybackSessions(_ sessions: [PlaybackSession]) async -> Bool {
|
||||
return await postResource(endpoint: "api/session/local-all", parameters: LocalPlaybackSessionSyncAllPayload(sessions: sessions, deviceInfo: sessions.first?.deviceInfo))
|
||||
return await withCheckedContinuation { continuation in
|
||||
let payload = LocalPlaybackSessionSyncAllPayload(sessions: sessions, deviceInfo: sessions.first?.deviceInfo)
|
||||
postResourceWithTokenRefresh(endpoint: "api/session/local-all", parameters: payload) { success in
|
||||
continuation.resume(returning: success)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static func syncLocalSessionsWithServer(isFirstSync: Bool) async {
|
||||
@@ -257,7 +591,7 @@ class ApiClient {
|
||||
public static func updateMediaProgress<T:Encodable>(libraryItemId: String, episodeId: String?, payload: T, callback: @escaping () -> Void) {
|
||||
logger.log("updateMediaProgress \(libraryItemId) \(episodeId ?? "NIL") \(payload)")
|
||||
let endpoint = episodeId?.isEmpty ?? true ? "api/me/progress/\(libraryItemId)" : "api/me/progress/\(libraryItemId)/\(episodeId ?? "")"
|
||||
patchResource(endpoint: endpoint, parameters: payload) { success in
|
||||
patchResourceWithTokenRefresh(endpoint: endpoint, parameters: payload) { _ in
|
||||
callback()
|
||||
}
|
||||
}
|
||||
@@ -265,21 +599,29 @@ class ApiClient {
|
||||
public static func getMediaProgress(libraryItemId: String, episodeId: String?) async -> MediaProgress? {
|
||||
logger.log("getMediaProgress \(libraryItemId) \(episodeId ?? "NIL")")
|
||||
let endpoint = episodeId?.isEmpty ?? true ? "api/me/progress/\(libraryItemId)" : "api/me/progress/\(libraryItemId)/\(episodeId ?? "")"
|
||||
return await getResource(endpoint: endpoint, decodable: MediaProgress.self)
|
||||
return await withCheckedContinuation { continuation in
|
||||
getResourceWithTokenRefresh(endpoint: endpoint, decodable: MediaProgress.self) { result in
|
||||
continuation.resume(returning: result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static func getCurrentUser() async -> User? {
|
||||
logger.log("getCurrentUser")
|
||||
return await getResource(endpoint: "api/me", decodable: User.self)
|
||||
return await withCheckedContinuation { continuation in
|
||||
getResourceWithTokenRefresh(endpoint: "api/me", decodable: User.self) { result in
|
||||
continuation.resume(returning: result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static func getLibraryItemWithProgress(libraryItemId:String, episodeId:String?, callback: @escaping (_ param: LibraryItem?) -> Void) {
|
||||
public static func getLibraryItemWithProgress(libraryItemId: String, episodeId: String?, callback: @escaping (_ param: LibraryItem?) -> Void) {
|
||||
var endpoint = "api/items/\(libraryItemId)?expanded=1&include=progress"
|
||||
if episodeId != nil {
|
||||
endpoint += "&episodeId=\(episodeId!)"
|
||||
}
|
||||
|
||||
ApiClient.getResource(endpoint: endpoint, decodable: LibraryItem.self) { obj in
|
||||
|
||||
getResourceWithTokenRefresh(endpoint: endpoint, decodable: LibraryItem.self) { obj in
|
||||
callback(obj)
|
||||
}
|
||||
}
|
||||
@@ -338,3 +680,30 @@ struct Connectivity {
|
||||
return self.sharedInstance.isReachable
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Response Models
|
||||
|
||||
struct RefreshResponse: Decodable {
|
||||
let user: RefreshUser?
|
||||
}
|
||||
|
||||
struct RefreshUser: Decodable {
|
||||
let accessToken: String
|
||||
let refreshToken: String?
|
||||
}
|
||||
|
||||
struct EmptyResponse: Decodable {}
|
||||
|
||||
struct PlaybackSessionRequest: Encodable {
|
||||
let forceDirectPlay: String
|
||||
let forceTranscode: String
|
||||
let mediaPlayer: String
|
||||
let deviceInfo: DeviceInfo
|
||||
}
|
||||
|
||||
struct DeviceInfo: Encodable {
|
||||
let deviceId: String?
|
||||
let manufacturer: String
|
||||
let model: String?
|
||||
let clientVersion: String?
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ class Database {
|
||||
try existing.update {
|
||||
existing.name = config.name
|
||||
existing.address = config.address
|
||||
existing.version = config.version
|
||||
existing.userId = config.userId
|
||||
existing.username = config.username
|
||||
existing.token = config.token
|
||||
@@ -60,6 +61,19 @@ class Database {
|
||||
setLastActiveConfigIndex(index: config.index)
|
||||
}
|
||||
}
|
||||
|
||||
public func updateServerConnectionConfigToken(newToken: String) {
|
||||
do {
|
||||
let realm = try Realm()
|
||||
if let config = realm.objects(ServerConnectionConfig.self).first(where: { $0.index == getLastActiveConfigIndex() }) {
|
||||
try realm.write {
|
||||
config.token = newToken
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
debugPrint("Failed to update server connection config token: \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
public func deleteServerConnectionConfig(id: String) {
|
||||
let realm = try! Realm()
|
||||
|
||||
@@ -22,8 +22,16 @@ struct NowPlayingMetadata {
|
||||
return item.coverUrl
|
||||
} else {
|
||||
guard let config = Store.serverConfig else { return nil }
|
||||
guard let url = URL(string: "\(config.address)/api/items/\(itemId)/cover?token=\(config.token)") else { return nil }
|
||||
return url
|
||||
|
||||
// As of v2.17.0 token is not needed with cover image requests
|
||||
let coverUrlString: String
|
||||
if Store.isServerVersionGreaterThanOrEqualTo("2.17.0") {
|
||||
coverUrlString = "\(config.address)/api/items/\(itemId)/cover"
|
||||
} else {
|
||||
coverUrlString = "\(config.address)/api/items/\(itemId)/cover?token=\(config.token)"
|
||||
}
|
||||
|
||||
return URL(string: coverUrlString)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
//
|
||||
// SecureStorage.swift
|
||||
// App
|
||||
//
|
||||
// Created by advplyr on 2025-07-05
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import Security
|
||||
|
||||
class SecureStorage {
|
||||
private static let tag = "SecureStorage"
|
||||
private static let serviceName = "AudiobookshelfRefreshTokens"
|
||||
|
||||
/**
|
||||
* Encrypts and stores a refresh token for a specific server connection
|
||||
*/
|
||||
func storeRefreshToken(serverConnectionConfigId: String, refreshToken: String) -> Bool {
|
||||
let key = "refresh_token_\(serverConnectionConfigId)"
|
||||
|
||||
guard let data = refreshToken.data(using: .utf8) else {
|
||||
print("\(Self.tag): Failed to convert refresh token to data")
|
||||
return false
|
||||
}
|
||||
|
||||
let query: [String: Any] = [
|
||||
kSecClass as String: kSecClassGenericPassword,
|
||||
kSecAttrService as String: Self.serviceName,
|
||||
kSecAttrAccount as String: key,
|
||||
kSecValueData as String: data,
|
||||
kSecAttrAccessible as String: kSecAttrAccessibleAfterFirstUnlock
|
||||
]
|
||||
|
||||
// First, try to delete any existing item
|
||||
SecItemDelete(query as CFDictionary)
|
||||
|
||||
// Then add the new item
|
||||
let status = SecItemAdd(query as CFDictionary, nil)
|
||||
|
||||
if status == errSecSuccess {
|
||||
print("\(Self.tag): Successfully stored encrypted refresh token for server: \(serverConnectionConfigId)")
|
||||
return true
|
||||
} else {
|
||||
print("\(Self.tag): Failed to store refresh token for server: \(serverConnectionConfigId), status: \(status)")
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves and decrypts a refresh token for a specific server connection
|
||||
*/
|
||||
func getRefreshToken(serverConnectionConfigId: String) -> String? {
|
||||
let key = "refresh_token_\(serverConnectionConfigId)"
|
||||
|
||||
let query: [String: Any] = [
|
||||
kSecClass as String: kSecClassGenericPassword,
|
||||
kSecAttrService as String: Self.serviceName,
|
||||
kSecAttrAccount as String: key,
|
||||
kSecReturnData as String: true,
|
||||
kSecMatchLimit as String: kSecMatchLimitOne
|
||||
]
|
||||
|
||||
var result: AnyObject?
|
||||
let status = SecItemCopyMatching(query as CFDictionary, &result)
|
||||
|
||||
if status == errSecSuccess,
|
||||
let data = result as? Data,
|
||||
let refreshToken = String(data: data, encoding: .utf8) {
|
||||
return refreshToken
|
||||
} else {
|
||||
print("\(Self.tag): Failed to retrieve refresh token for server: \(serverConnectionConfigId), status: \(status)")
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a refresh token for a specific server connection
|
||||
*/
|
||||
func removeRefreshToken(serverConnectionConfigId: String) -> Bool {
|
||||
let key = "refresh_token_\(serverConnectionConfigId)"
|
||||
|
||||
let query: [String: Any] = [
|
||||
kSecClass as String: kSecClassGenericPassword,
|
||||
kSecAttrService as String: Self.serviceName,
|
||||
kSecAttrAccount as String: key
|
||||
]
|
||||
|
||||
let status = SecItemDelete(query as CFDictionary)
|
||||
|
||||
if status == errSecSuccess || status == errSecItemNotFound {
|
||||
print("\(Self.tag): Successfully removed refresh token for server: \(serverConnectionConfigId)")
|
||||
return true
|
||||
} else {
|
||||
print("\(Self.tag): Failed to remove refresh token for server: \(serverConnectionConfigId), status: \(status)")
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a refresh token exists for a specific server connection
|
||||
*/
|
||||
func hasRefreshToken(serverConnectionConfigId: String) -> Bool {
|
||||
let key = "refresh_token_\(serverConnectionConfigId)"
|
||||
|
||||
let query: [String: Any] = [
|
||||
kSecClass as String: kSecClassGenericPassword,
|
||||
kSecAttrService as String: Self.serviceName,
|
||||
kSecAttrAccount as String: key,
|
||||
kSecReturnData as String: false,
|
||||
kSecMatchLimit as String: kSecMatchLimitOne
|
||||
]
|
||||
|
||||
let status = SecItemCopyMatching(query as CFDictionary, nil)
|
||||
return status == errSecSuccess
|
||||
}
|
||||
}
|
||||
@@ -29,4 +29,46 @@ class Store {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the currently connected server version is >= compareVersion
|
||||
* Abs server only uses major.minor.patch
|
||||
* Note: Version is returned in Abs auth payloads starting v2.6.0
|
||||
* Note: Version is saved with the server connection config starting after v0.9.81
|
||||
*
|
||||
* @example
|
||||
* serverVersion=2.25.1
|
||||
* isServerVersionGreaterThanOrEqualTo("2.26.0") = false
|
||||
*
|
||||
* serverVersion=2.26.1
|
||||
* isServerVersionGreaterThanOrEqualTo("2.26.0") = true
|
||||
*/
|
||||
public static func isServerVersionGreaterThanOrEqualTo(_ compareVersion: String) -> Bool {
|
||||
guard let serverConfig = serverConfig, !serverConfig.version.isEmpty else {
|
||||
return false
|
||||
}
|
||||
|
||||
if compareVersion.isEmpty {
|
||||
return true
|
||||
}
|
||||
|
||||
let serverVersionParts = serverConfig.version.split(separator: ".").compactMap { Int($0) }
|
||||
let compareVersionParts = compareVersion.split(separator: ".").compactMap { Int($0) }
|
||||
|
||||
// Compare major, minor, and patch components
|
||||
let maxLength = max(serverVersionParts.count, compareVersionParts.count)
|
||||
|
||||
for i in 0..<maxLength {
|
||||
let serverVersionComponent = i < serverVersionParts.count ? serverVersionParts[i] : 0
|
||||
let compareVersionComponent = i < compareVersionParts.count ? compareVersionParts[i] : 0
|
||||
|
||||
if serverVersionComponent < compareVersionComponent {
|
||||
return false // Server version is less than compareVersion
|
||||
} else if serverVersionComponent > compareVersionComponent {
|
||||
return true // Server version is greater than compareVersion
|
||||
}
|
||||
}
|
||||
|
||||
return true // versions are equal in major, minor, and patch
|
||||
}
|
||||
}
|
||||
|
||||
+27
-16
@@ -99,21 +99,6 @@ export default {
|
||||
|
||||
await this.$store.dispatch('user/loadUserSettings')
|
||||
},
|
||||
async postRequest(url, data, headers, connectTimeout = 30000) {
|
||||
const options = {
|
||||
url,
|
||||
headers,
|
||||
data,
|
||||
connectTimeout
|
||||
}
|
||||
const response = await CapacitorHttp.post(options)
|
||||
console.log('[default] POST request response', response)
|
||||
if (response.status >= 400) {
|
||||
throw new Error(response.data)
|
||||
} else {
|
||||
return response.data
|
||||
}
|
||||
},
|
||||
async attemptConnection() {
|
||||
console.warn('[default] attemptConnection')
|
||||
if (!this.networkConnected) {
|
||||
@@ -145,10 +130,18 @@ export default {
|
||||
|
||||
AbsLogger.info({ tag: 'default', message: `attemptConnection: Got server config, attempt authorize (${serverConfig.name})` })
|
||||
|
||||
const authRes = await this.postRequest(`${serverConfig.address}/api/authorize`, null, { Authorization: `Bearer ${serverConfig.token}` }, 6000).catch((error) => {
|
||||
const nativeHttpOptions = {
|
||||
headers: {
|
||||
Authorization: `Bearer ${serverConfig.token}`
|
||||
},
|
||||
connectTimeout: 6000,
|
||||
serverConnectionConfig: serverConfig
|
||||
}
|
||||
const authRes = await this.$nativeHttp.post(`${serverConfig.address}/api/authorize`, null, nativeHttpOptions).catch((error) => {
|
||||
AbsLogger.error({ tag: 'default', message: `attemptConnection: Server auth failed (${serverConfig.name})` })
|
||||
return false
|
||||
})
|
||||
|
||||
if (!authRes) {
|
||||
this.attemptingConnection = false
|
||||
return
|
||||
@@ -158,6 +151,22 @@ export default {
|
||||
this.$store.commit('setServerSettings', serverSettings)
|
||||
this.$store.commit('libraries/setEReaderDevices', ereaderDevices)
|
||||
|
||||
if (this.$isValidVersion(serverSettings.version, '2.26.0')) {
|
||||
// Check if the server is using the new JWT auth and is still using an old token in the server config
|
||||
// If so, redirect to /connect and request to re-login
|
||||
if (serverConfig.token === user.token || user.isOldToken) {
|
||||
this.attemptingConnection = false
|
||||
AbsLogger.info({ tag: 'default', message: `attemptConnection: Server is using new JWT auth but config is still using an old token (server version: ${serverSettings.version}) (${serverConfig.name})` })
|
||||
// Clear last server config
|
||||
await this.$store.dispatch('user/logout')
|
||||
this.$router.push(`/connect?error=oldAuthToken&serverConnectionConfigId=${serverConfig.id}`)
|
||||
return
|
||||
}
|
||||
|
||||
// Token may have been refreshed during the authorize call so refetch from store
|
||||
serverConfig.token = this.$store.getters['user/getToken'] || serverConfig.token
|
||||
}
|
||||
|
||||
// Set library - Use last library if set and available fallback to default user library
|
||||
const lastLibraryId = await this.$localStore.getLastLibraryId()
|
||||
if (lastLibraryId && (!user.librariesAccessible.length || user.librariesAccessible.includes(lastLibraryId))) {
|
||||
@@ -165,9 +174,11 @@ export default {
|
||||
} else if (userDefaultLibraryId) {
|
||||
this.$store.commit('libraries/setCurrentLibrary', userDefaultLibraryId)
|
||||
}
|
||||
serverConfig.version = serverSettings.version
|
||||
const serverConnectionConfig = await this.$db.setServerConnectionConfig(serverConfig)
|
||||
|
||||
this.$store.commit('user/setUser', user)
|
||||
this.$store.commit('user/setAccessToken', serverConnectionConfig.token)
|
||||
this.$store.commit('user/setServerConnectionConfig', serverConnectionConfig)
|
||||
|
||||
this.$socket.connect(serverConnectionConfig.address, serverConnectionConfig.token)
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ export default {
|
||||
|
||||
css: ['@/assets/tailwind.css', '@/assets/app.css'],
|
||||
|
||||
plugins: ['@/plugins/server.js', '@/plugins/db.js', '@/plugins/localStore.js', '@/plugins/init.client.js', '@/plugins/axios.js', '@/plugins/nativeHttp.js', '@/plugins/capacitor/index.js', '@/plugins/capacitor/AbsAudioPlayer.js', '@/plugins/toast.js', '@/plugins/constants.js', '@/plugins/haptics.js', '@/plugins/i18n.js'],
|
||||
plugins: ['@/plugins/server.js', '@/plugins/db.js', '@/plugins/localStore.js', '@/plugins/init.client.js', '@/plugins/axios.js', '@/plugins/capacitor/index.js', '@/plugins/capacitor/AbsAudioPlayer.js', '@/plugins/nativeHttp.js', '@/plugins/toast.js', '@/plugins/constants.js', '@/plugins/haptics.js', '@/plugins/i18n.js'],
|
||||
|
||||
components: true,
|
||||
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "audiobookshelf-app",
|
||||
"version": "0.9.79-beta",
|
||||
"version": "0.10.1-beta",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "audiobookshelf-app",
|
||||
"version": "0.9.79-beta",
|
||||
"version": "0.10.1-beta",
|
||||
"dependencies": {
|
||||
"@capacitor-community/keep-awake": "^7.0.0",
|
||||
"@capacitor-community/volume-buttons": "^7.0.0",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "audiobookshelf-app",
|
||||
"version": "0.9.79-beta",
|
||||
"version": "0.10.1-beta",
|
||||
"author": "advplyr",
|
||||
"scripts": {
|
||||
"dev": "nuxt --hostname 0.0.0.0 --port 1337",
|
||||
|
||||
+9
-11
@@ -4,6 +4,10 @@
|
||||
|
||||
<ui-text-input-with-label :value="username" :label="$strings.LabelUsername" disabled class="my-2" />
|
||||
|
||||
<div v-if="serverVersion" class="text-sm text-fg">
|
||||
<p>Server version: v{{ serverVersion }}</p>
|
||||
</div>
|
||||
|
||||
<ui-btn color="primary flex items-center justify-between gap-2 ml-auto text-base mt-8" @click="logout">{{ $strings.ButtonSwitchServerUser }}<span class="material-symbols" style="font-size: 1.1rem">logout</span></ui-btn>
|
||||
|
||||
<div class="flex justify-center items-center my-4 left-0 right-0 bottom-0 absolute">
|
||||
@@ -43,22 +47,16 @@ export default {
|
||||
},
|
||||
serverAddress() {
|
||||
return this.serverConnectionConfig.address
|
||||
},
|
||||
serverVersion() {
|
||||
// Saved in server connection config after 0.9.81
|
||||
return this.serverConnectionConfig.version
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async logout() {
|
||||
await this.$hapticsImpact()
|
||||
if (this.user) {
|
||||
await this.$nativeHttp.post('/logout').catch((error) => {
|
||||
console.error(error)
|
||||
})
|
||||
}
|
||||
|
||||
this.$socket.logout()
|
||||
await this.$db.logout()
|
||||
this.$localStore.removeLastLibraryId()
|
||||
this.$store.commit('user/logout')
|
||||
this.$store.commit('libraries/setCurrentLibrary', null)
|
||||
await this.$store.dispatch('user/logout')
|
||||
this.$router.push('/connect')
|
||||
}
|
||||
},
|
||||
|
||||
@@ -62,7 +62,7 @@ export default {
|
||||
async loadRecentEpisodes(page = 0) {
|
||||
this.loadedLibraryId = this.currentLibraryId
|
||||
this.processing = true
|
||||
const episodePayload = await this.$nativeHttp.get(`/api/libraries/${this.currentLibraryId}/recent-episodes?limit=25&page=${page}`).catch((error) => {
|
||||
const episodePayload = await this.$nativeHttp.get(`/api/libraries/${this.currentLibraryId}/recent-episodes?limit=50&page=${page}`).catch((error) => {
|
||||
console.error('Failed to get recent episodes', error)
|
||||
this.$toast.error('Failed to get recent episodes')
|
||||
return null
|
||||
|
||||
+1
-1
@@ -37,9 +37,9 @@ export default {
|
||||
computed: {},
|
||||
methods: {
|
||||
async init() {
|
||||
await this.$store.dispatch('setupNetworkListener')
|
||||
this.deviceData = await this.$db.getDeviceData()
|
||||
this.$store.commit('setDeviceData', this.deviceData)
|
||||
await this.$store.dispatch('setupNetworkListener')
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class="relative" @click="showFullscreenCover = true">
|
||||
<covers-book-cover :library-item="libraryItem" :width="coverWidth" :book-cover-aspect-ratio="bookCoverAspectRatio" no-bg raw @imageLoaded="coverImageLoaded" />
|
||||
<div v-if="!isPodcast" class="absolute bottom-0 left-0 h-1 shadow-sm z-10" :class="userIsFinished ? 'bg-success' : 'bg-yellow-400'" :style="{ width: coverWidth * progressPercent + 'px' }"></div>
|
||||
<div v-if="!isPodcast" class="absolute bottom-0 left-0 h-1 z-10 box-shadow-progressbar" :class="userIsFinished ? 'bg-success' : 'bg-yellow-400'" :style="{ width: coverWidth * progressPercent + 'px' }"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<div class="flex items-center justify-center">
|
||||
<h1 class="text-xl font-semibold">{{ title }}</h1>
|
||||
<widgets-explicit-indicator v-if="isExplicit" />
|
||||
<widgets-abridged-indicator v-if="isAbridged" />
|
||||
</div>
|
||||
<p v-if="subtitle" class="text-fg text-base">{{ subtitle }}</p>
|
||||
</div>
|
||||
@@ -438,6 +439,9 @@ export default {
|
||||
isExplicit() {
|
||||
return !!this.mediaMetadata.explicit
|
||||
},
|
||||
isAbridged() {
|
||||
return !!this.mediaMetadata.abridged
|
||||
},
|
||||
showPlay() {
|
||||
return !this.isMissing && !this.isInvalid && (this.numTracks || this.episodes.length)
|
||||
},
|
||||
|
||||
@@ -200,7 +200,7 @@ export default {
|
||||
this.onMediaItemHistoryUpdatedListener = await AbsAudioPlayer.addListener('onMediaItemHistoryUpdated', this.onMediaItemHistoryUpdated)
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.onMediaItemHistoryUpdatedListener) this.onMediaItemHistoryUpdatedListener.remove()
|
||||
this.onMediaItemHistoryUpdatedListener?.remove()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -100,6 +100,13 @@
|
||||
<p class="pl-4">{{ $strings.LabelDisableVibrateOnReset }}</p>
|
||||
<span class="material-symbols text-xl ml-2" @click.stop="showInfo('disableSleepTimerResetFeedback')">info</span>
|
||||
</div>
|
||||
<div class="flex items-center py-3">
|
||||
<div class="w-10 flex justify-center" @click="toggleSleepTimerAlmostDoneChime">
|
||||
<ui-toggle-switch v-model="settings.enableSleepTimerAlmostDoneChime" @input="saveSettings" />
|
||||
</div>
|
||||
<p class="pl-4">{{ $strings.LabelSleepTimerAlmostDoneChime }}</p>
|
||||
<span class="material-symbols text-xl ml-2" @click.stop="showInfo('enableSleepTimerAlmostDoneChime')">info</span>
|
||||
</div>
|
||||
<div class="flex items-center py-3">
|
||||
<div class="w-10 flex justify-center" @click="toggleAutoSleepTimer">
|
||||
<ui-toggle-switch v-model="settings.autoSleepTimer" @input="saveSettings" />
|
||||
@@ -207,6 +214,7 @@ export default {
|
||||
sleepTimerLength: 900000, // 15 minutes
|
||||
disableSleepTimerFadeOut: false,
|
||||
disableSleepTimerResetFeedback: false,
|
||||
enableSleepTimerAlmostDoneChime: false,
|
||||
autoSleepTimerAutoRewind: false,
|
||||
autoSleepTimerAutoRewindTime: 300000, // 5 minutes
|
||||
languageCode: 'en-us',
|
||||
@@ -234,6 +242,10 @@ export default {
|
||||
name: this.$strings.LabelDisableVibrateOnReset,
|
||||
message: this.$strings.LabelDisableVibrateOnResetHelp
|
||||
},
|
||||
enableSleepTimerAlmostDoneChime: {
|
||||
name: this.$strings.LabelSleepTimerAlmostDoneChime,
|
||||
message: this.$strings.LabelSleepTimerAlmostDoneChimeHelp
|
||||
},
|
||||
autoSleepTimerAutoRewind: {
|
||||
name: this.$strings.LabelAutoSleepTimerAutoRewind,
|
||||
message: this.$strings.LabelAutoSleepTimerAutoRewindHelp
|
||||
@@ -351,6 +363,10 @@ export default {
|
||||
},
|
||||
themeOptionItems() {
|
||||
return [
|
||||
{
|
||||
text: this.$strings.LabelThemeBlack,
|
||||
value: 'black'
|
||||
},
|
||||
{
|
||||
text: this.$strings.LabelThemeDark,
|
||||
value: 'dark'
|
||||
@@ -549,6 +565,10 @@ export default {
|
||||
this.settings.disableSleepTimerResetFeedback = !this.settings.disableSleepTimerResetFeedback
|
||||
this.saveSettings()
|
||||
},
|
||||
toggleSleepTimerAlmostDoneChime() {
|
||||
this.settings.enableSleepTimerAlmostDoneChime = !this.settings.enableSleepTimerAlmostDoneChime
|
||||
this.saveSettings()
|
||||
},
|
||||
toggleDisableAutoRewind() {
|
||||
this.settings.disableAutoRewind = !this.settings.disableAutoRewind
|
||||
this.saveSettings()
|
||||
@@ -620,6 +640,7 @@ export default {
|
||||
this.settings.sleepTimerLength = !isNaN(deviceSettings.sleepTimerLength) ? deviceSettings.sleepTimerLength : 900000 // 15 minutes
|
||||
this.settings.disableSleepTimerFadeOut = !!deviceSettings.disableSleepTimerFadeOut
|
||||
this.settings.disableSleepTimerResetFeedback = !!deviceSettings.disableSleepTimerResetFeedback
|
||||
this.settings.enableSleepTimerAlmostDoneChime = !!deviceSettings.enableSleepTimerAlmostDoneChime
|
||||
|
||||
this.settings.autoSleepTimerAutoRewind = !!deviceSettings.autoSleepTimerAutoRewind
|
||||
this.settings.autoSleepTimerAutoRewindTime = !isNaN(deviceSettings.autoSleepTimerAutoRewindTime) ? deviceSettings.autoSleepTimerAutoRewindTime : 300000 // 5 minutes
|
||||
|
||||
+113
-12
@@ -1,17 +1,50 @@
|
||||
export default function ({ $axios, store }) {
|
||||
$axios.onRequest(config => {
|
||||
export default function ({ $axios, store, $db }) {
|
||||
// Track if we're currently refreshing to prevent multiple refresh attempts
|
||||
let isRefreshing = false
|
||||
let failedQueue = []
|
||||
|
||||
const processQueue = (error, token = null) => {
|
||||
failedQueue.forEach(({ resolve, reject }) => {
|
||||
if (error) {
|
||||
reject(error)
|
||||
} else {
|
||||
resolve(token)
|
||||
}
|
||||
})
|
||||
failedQueue = []
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the case when token refresh fails
|
||||
* @param {string} [serverConnectionConfigId]
|
||||
* @returns {Promise} - Promise that resolves when logout is complete
|
||||
*/
|
||||
const handleRefreshFailure = async (serverConnectionConfigId) => {
|
||||
try {
|
||||
console.log('[axios] Handling refresh failure - logging out user')
|
||||
|
||||
// Clear store
|
||||
await store.dispatch('user/logout')
|
||||
|
||||
if (serverConnectionConfigId) {
|
||||
// Clear refresh token for server connection config
|
||||
await $db.clearRefreshToken(serverConnectionConfigId)
|
||||
}
|
||||
|
||||
if (window.location.pathname !== '/connect') {
|
||||
window.location.href = '/connect?error=refreshTokenFailed&serverConnectionConfigId=' + serverConnectionConfigId
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('[axios] Failed to handle refresh failure:', error)
|
||||
}
|
||||
}
|
||||
|
||||
$axios.onRequest((config) => {
|
||||
console.log('[Axios] Making request to ' + config.url)
|
||||
if (config.url.startsWith('http:') || config.url.startsWith('https:') || config.url.startsWith('capacitor:')) {
|
||||
return
|
||||
}
|
||||
|
||||
const customHeaders = store.getters['user/getCustomHeaders']
|
||||
if (customHeaders) {
|
||||
for (const key in customHeaders) {
|
||||
config.headers.common[key] = customHeaders[key]
|
||||
}
|
||||
}
|
||||
|
||||
const bearerToken = store.getters['user/getToken']
|
||||
if (bearerToken) {
|
||||
config.headers.common['Authorization'] = `Bearer ${bearerToken}`
|
||||
@@ -26,7 +59,75 @@ export default function ({ $axios, store }) {
|
||||
console.log('[Axios] Request out', config.url)
|
||||
})
|
||||
|
||||
$axios.onError(error => {
|
||||
console.error('Axios error code', error)
|
||||
$axios.onError(async (error) => {
|
||||
const originalRequest = error.config
|
||||
const code = parseInt(error.response && error.response.status)
|
||||
const message = error.response ? error.response.data || 'Unknown Error' : 'Unknown Error'
|
||||
|
||||
console.error('Axios error', code, message)
|
||||
|
||||
// Handle 401 Unauthorized (token expired)
|
||||
if (code === 401 && !originalRequest._retry) {
|
||||
// Skip refresh for auth endpoints to prevent infinite loops
|
||||
if (originalRequest.url.endsWith('/auth/refresh') || originalRequest.url.endsWith('/login')) {
|
||||
await handleRefreshFailure(store.getters['user/getServerConnectionConfigId'])
|
||||
return Promise.reject(error)
|
||||
}
|
||||
|
||||
if (isRefreshing) {
|
||||
// If already refreshing, queue this request
|
||||
return new Promise((resolve, reject) => {
|
||||
failedQueue.push({ resolve, reject })
|
||||
})
|
||||
.then((token) => {
|
||||
if (!originalRequest.headers) {
|
||||
originalRequest.headers = {}
|
||||
}
|
||||
originalRequest.headers['Authorization'] = `Bearer ${token}`
|
||||
return $axios(originalRequest)
|
||||
})
|
||||
.catch((err) => {
|
||||
return Promise.reject(err)
|
||||
})
|
||||
}
|
||||
|
||||
originalRequest._retry = true
|
||||
isRefreshing = true
|
||||
|
||||
try {
|
||||
// Attempt to refresh the token
|
||||
// Updates store if successful, otherwise clears store and throw error
|
||||
const newAccessToken = await store.dispatch('user/refreshToken')
|
||||
if (!newAccessToken) {
|
||||
console.error('No new access token received')
|
||||
return Promise.reject(error)
|
||||
}
|
||||
|
||||
// Update the original request with new token
|
||||
if (!originalRequest.headers) {
|
||||
originalRequest.headers = {}
|
||||
}
|
||||
originalRequest.headers['Authorization'] = `Bearer ${newAccessToken}`
|
||||
|
||||
// Process any queued requests
|
||||
processQueue(null, newAccessToken)
|
||||
|
||||
// Retry the original request
|
||||
return $axios(originalRequest)
|
||||
} catch (refreshError) {
|
||||
console.error('Token refresh failed:', refreshError)
|
||||
|
||||
// Process queued requests with error
|
||||
processQueue(refreshError, null)
|
||||
|
||||
await handleRefreshFailure(store.getters['user/getServerConnectionConfigId'])
|
||||
|
||||
return Promise.reject(refreshError)
|
||||
} finally {
|
||||
isRefreshing = false
|
||||
}
|
||||
}
|
||||
|
||||
return Promise.reject(error)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,12 @@ class AbsAudioPlayerWeb extends WebPlugin {
|
||||
const deviceInfo = {
|
||||
deviceId: this.getDeviceId()
|
||||
}
|
||||
const playbackSession = await $axios.$post(route, { deviceInfo, mediaPlayer: 'html5-mobile', forceDirectPlay: true })
|
||||
const reqBody = {
|
||||
deviceInfo,
|
||||
mediaPlayer: 'html5-mobile',
|
||||
forceDirectPlay: true
|
||||
}
|
||||
const playbackSession = await $axios.$post(route, reqBody)
|
||||
if (playbackSession) {
|
||||
if (startTime !== undefined && startTime !== null) playbackSession.currentTime = startTime
|
||||
this.setAudioPlayer(playbackSession, playWhenReady)
|
||||
@@ -245,7 +250,15 @@ class AbsAudioPlayerWeb extends WebPlugin {
|
||||
this.trackStartTime = Math.max(0, this.startTime - (this.currentTrack.startOffset || 0))
|
||||
const serverAddressUrl = new URL(vuexStore.getters['user/getServerAddress'])
|
||||
const serverHost = `${serverAddressUrl.protocol}//${serverAddressUrl.host}`
|
||||
this.player.src = `${serverHost}${this.currentTrack.contentUrl}?token=${vuexStore.getters['user/getToken']}`
|
||||
|
||||
let sessionTrackUrl = null
|
||||
if (this.currentTrack.contentUrl?.startsWith('/hls')) {
|
||||
sessionTrackUrl = this.currentTrack.contentUrl
|
||||
} else {
|
||||
sessionTrackUrl = `/public/session/${this.playbackSession.id}/track/${this.currentTrack.index || 1}`
|
||||
}
|
||||
|
||||
this.player.src = `${serverHost}${sessionTrackUrl}`
|
||||
console.log(`[AbsAudioPlayer] Loading track src ${this.player.src}`)
|
||||
this.player.load()
|
||||
this.player.playbackRate = this.playbackRate
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
import { registerPlugin, Capacitor, WebPlugin } from '@capacitor/core';
|
||||
import { registerPlugin, Capacitor, WebPlugin } from '@capacitor/core'
|
||||
|
||||
/**
|
||||
* @typedef {Object} ServerConnectionConfig
|
||||
* @property {string} id
|
||||
* @property {number} index
|
||||
* @property {string} name
|
||||
* @property {string} address
|
||||
* @property {string} version
|
||||
* @property {string} userId
|
||||
* @property {string} username
|
||||
* @property {string} token
|
||||
* @property {string} [refreshToken] - Only passed in when setting config, then stored in secure storage
|
||||
*/
|
||||
|
||||
class AbsDatabaseWeb extends WebPlugin {
|
||||
constructor() {
|
||||
@@ -19,17 +32,30 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
return deviceData
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {ServerConnectionConfig} serverConnectionConfig
|
||||
* @returns {Promise<ServerConnectionConfig>}
|
||||
*/
|
||||
async setCurrentServerConnectionConfig(serverConnectionConfig) {
|
||||
var deviceData = await this.getDeviceData()
|
||||
|
||||
var ssc = deviceData.serverConnectionConfigs.find(_ssc => _ssc.id == serverConnectionConfig.id)
|
||||
var ssc = deviceData.serverConnectionConfigs.find((_ssc) => _ssc.id == serverConnectionConfig.id)
|
||||
if (ssc) {
|
||||
deviceData.lastServerConnectionConfigId = ssc.id
|
||||
ssc.name = `${ssc.address} (${serverConnectionConfig.username})`
|
||||
ssc.token = serverConnectionConfig.token
|
||||
ssc.userId = serverConnectionConfig.userId
|
||||
ssc.username = serverConnectionConfig.username
|
||||
ssc.version = serverConnectionConfig.version
|
||||
ssc.customHeaders = serverConnectionConfig.customHeaders || {}
|
||||
|
||||
if (serverConnectionConfig.refreshToken) {
|
||||
console.log('[AbsDatabase] Updating refresh token...', serverConnectionConfig.refreshToken)
|
||||
// Only using local storage for web version that is only used for testing
|
||||
localStorage.setItem(`refresh_token_${ssc.id}`, serverConnectionConfig.refreshToken)
|
||||
}
|
||||
|
||||
localStorage.setItem('device', JSON.stringify(deviceData))
|
||||
} else {
|
||||
ssc = {
|
||||
@@ -40,8 +66,16 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
username: serverConnectionConfig.username,
|
||||
address: serverConnectionConfig.address,
|
||||
token: serverConnectionConfig.token,
|
||||
version: serverConnectionConfig.version,
|
||||
customHeaders: serverConnectionConfig.customHeaders || {}
|
||||
}
|
||||
|
||||
if (serverConnectionConfig.refreshToken) {
|
||||
console.log('[AbsDatabase] Setting refresh token...', serverConnectionConfig.refreshToken)
|
||||
// Only using local storage for web version that is only used for testing
|
||||
localStorage.setItem(`refresh_token_${ssc.id}`, serverConnectionConfig.refreshToken)
|
||||
}
|
||||
|
||||
deviceData.serverConnectionConfigs.push(ssc)
|
||||
deviceData.lastServerConnectionConfigId = ssc.id
|
||||
localStorage.setItem('device', JSON.stringify(deviceData))
|
||||
@@ -49,14 +83,26 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
return ssc
|
||||
}
|
||||
|
||||
async getRefreshToken({ serverConnectionConfigId }) {
|
||||
console.log('[AbsDatabase] Getting refresh token...', serverConnectionConfigId)
|
||||
const refreshToken = localStorage.getItem(`refresh_token_${serverConnectionConfigId}`)
|
||||
return refreshToken ? { refreshToken } : null
|
||||
}
|
||||
|
||||
async clearRefreshToken({ serverConnectionConfigId }) {
|
||||
console.log('[AbsDatabase] Clearing refresh token...', serverConnectionConfigId)
|
||||
localStorage.removeItem(`refresh_token_${serverConnectionConfigId}`)
|
||||
}
|
||||
|
||||
async removeServerConnectionConfig(serverConnectionConfigCallObject) {
|
||||
var serverConnectionConfigId = serverConnectionConfigCallObject.serverConnectionConfigId
|
||||
var deviceData = await this.getDeviceData()
|
||||
deviceData.serverConnectionConfigs = deviceData.serverConnectionConfigs.filter(ssc => ssc.id != serverConnectionConfigId)
|
||||
deviceData.serverConnectionConfigs = deviceData.serverConnectionConfigs.filter((ssc) => ssc.id != serverConnectionConfigId)
|
||||
localStorage.setItem('device', JSON.stringify(deviceData))
|
||||
}
|
||||
|
||||
async logout() {
|
||||
console.log('[AbsDatabase] Logging out...')
|
||||
var deviceData = await this.getDeviceData()
|
||||
deviceData.lastServerConnectionConfigId = null
|
||||
localStorage.setItem('device', JSON.stringify(deviceData))
|
||||
@@ -85,79 +131,81 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
}
|
||||
async getLocalLibraryItems(payload) {
|
||||
return {
|
||||
value: [{
|
||||
id: 'local_test',
|
||||
libraryItemId: 'test34',
|
||||
serverAddress: 'https://abs.test.com',
|
||||
serverUserId: 'test56',
|
||||
folderId: 'test1',
|
||||
absolutePath: 'a',
|
||||
contentUrl: 'c',
|
||||
isInvalid: false,
|
||||
mediaType: 'book',
|
||||
media: {
|
||||
metadata: {
|
||||
title: 'Test Book',
|
||||
authorName: 'Test Author Name'
|
||||
value: [
|
||||
{
|
||||
id: 'local_test',
|
||||
libraryItemId: 'test34',
|
||||
serverAddress: 'https://abs.test.com',
|
||||
serverUserId: 'test56',
|
||||
folderId: 'test1',
|
||||
absolutePath: 'a',
|
||||
contentUrl: 'c',
|
||||
isInvalid: false,
|
||||
mediaType: 'book',
|
||||
media: {
|
||||
metadata: {
|
||||
title: 'Test Book',
|
||||
authorName: 'Test Author Name'
|
||||
},
|
||||
coverPath: null,
|
||||
tags: [],
|
||||
audioFiles: [],
|
||||
chapters: [],
|
||||
tracks: [
|
||||
{
|
||||
index: 1,
|
||||
startOffset: 0,
|
||||
duration: 10000,
|
||||
title: 'Track Title 1',
|
||||
contentUrl: 'test',
|
||||
mimeType: 'audio/mpeg',
|
||||
metadata: null,
|
||||
isLocal: true,
|
||||
localFileId: 'lf1',
|
||||
audioProbeResult: {}
|
||||
},
|
||||
{
|
||||
index: 2,
|
||||
startOffset: 0,
|
||||
duration: 15000,
|
||||
title: 'Track Title 2',
|
||||
contentUrl: 'test2',
|
||||
mimeType: 'audio/mpeg',
|
||||
metadata: null,
|
||||
isLocal: true,
|
||||
localFileId: 'lf2',
|
||||
audioProbeResult: {}
|
||||
},
|
||||
{
|
||||
index: 3,
|
||||
startOffset: 0,
|
||||
duration: 20000,
|
||||
title: 'Track Title 3',
|
||||
contentUrl: 'test3',
|
||||
mimeType: 'audio/mpeg',
|
||||
metadata: null,
|
||||
isLocal: true,
|
||||
localFileId: 'lf3',
|
||||
audioProbeResult: {}
|
||||
}
|
||||
]
|
||||
},
|
||||
coverPath: null,
|
||||
tags: [],
|
||||
audioFiles: [],
|
||||
chapters: [],
|
||||
tracks: [
|
||||
localFiles: [
|
||||
{
|
||||
index: 1,
|
||||
startOffset: 0,
|
||||
duration: 10000,
|
||||
title: 'Track Title 1',
|
||||
id: 'lf1',
|
||||
filename: 'lf1.mp3',
|
||||
contentUrl: 'test',
|
||||
absolutePath: 'test',
|
||||
simplePath: 'test',
|
||||
mimeType: 'audio/mpeg',
|
||||
metadata: null,
|
||||
isLocal: true,
|
||||
localFileId: 'lf1',
|
||||
audioProbeResult: {}
|
||||
},
|
||||
{
|
||||
index: 2,
|
||||
startOffset: 0,
|
||||
duration: 15000,
|
||||
title: 'Track Title 2',
|
||||
contentUrl: 'test2',
|
||||
mimeType: 'audio/mpeg',
|
||||
metadata: null,
|
||||
isLocal: true,
|
||||
localFileId: 'lf2',
|
||||
audioProbeResult: {}
|
||||
},
|
||||
{
|
||||
index: 3,
|
||||
startOffset: 0,
|
||||
duration: 20000,
|
||||
title: 'Track Title 3',
|
||||
contentUrl: 'test3',
|
||||
mimeType: 'audio/mpeg',
|
||||
metadata: null,
|
||||
isLocal: true,
|
||||
localFileId: 'lf3',
|
||||
audioProbeResult: {}
|
||||
size: 39048290
|
||||
}
|
||||
]
|
||||
},
|
||||
localFiles: [
|
||||
{
|
||||
id: 'lf1',
|
||||
filename: 'lf1.mp3',
|
||||
contentUrl: 'test',
|
||||
absolutePath: 'test',
|
||||
simplePath: 'test',
|
||||
mimeType: 'audio/mpeg',
|
||||
size: 39048290
|
||||
}
|
||||
],
|
||||
coverContentUrl: null,
|
||||
coverAbsolutePath: null,
|
||||
isLocal: true
|
||||
}]
|
||||
],
|
||||
coverContentUrl: null,
|
||||
coverAbsolutePath: null,
|
||||
isLocal: true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
async getLocalLibraryItemsInFolder({ folderId }) {
|
||||
@@ -167,7 +215,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
return this.getLocalLibraryItems().then((data) => data.value[0])
|
||||
}
|
||||
async getLocalLibraryItemByLId({ libraryItemId }) {
|
||||
return this.getLocalLibraryItems().then((data) => data.value.find(lli => lli.libraryItemId == libraryItemId))
|
||||
return this.getLocalLibraryItems().then((data) => data.value.find((lli) => lli.libraryItemId == libraryItemId))
|
||||
}
|
||||
async getAllLocalMediaProgress() {
|
||||
return {
|
||||
@@ -182,7 +230,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
isFinished: false,
|
||||
lastUpdate: 394089090,
|
||||
startedAt: 239048209,
|
||||
finishedAt: null,
|
||||
finishedAt: null
|
||||
// For local lib items from server to support server sync
|
||||
// var serverConnectionConfigId:String?,
|
||||
// var serverAddress:String?,
|
||||
@@ -240,7 +288,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
serverSyncAttempted: true,
|
||||
serverSyncSuccess: true,
|
||||
serverSyncMessage: null,
|
||||
timestamp: Date.now() - (1000 * 60 * 22) + 13000 // 22 mins ago + 13s
|
||||
timestamp: Date.now() - 1000 * 60 * 22 + 13000 // 22 mins ago + 13s
|
||||
},
|
||||
{
|
||||
name: 'Play',
|
||||
@@ -250,7 +298,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
serverSyncAttempted: false,
|
||||
serverSyncSuccess: null,
|
||||
serverSyncMessage: null,
|
||||
timestamp: Date.now() - (1000 * 60 * 22) // 22 mins ago
|
||||
timestamp: Date.now() - 1000 * 60 * 22 // 22 mins ago
|
||||
},
|
||||
{
|
||||
name: 'Pause',
|
||||
@@ -260,7 +308,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
serverSyncAttempted: true,
|
||||
serverSyncSuccess: false,
|
||||
serverSyncMessage: null,
|
||||
timestamp: Date.now() - (1000 * 60 * 60) + (58000) // 1 hour ago + 58s
|
||||
timestamp: Date.now() - 1000 * 60 * 60 + 58000 // 1 hour ago + 58s
|
||||
},
|
||||
{
|
||||
name: 'Save',
|
||||
@@ -270,7 +318,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
serverSyncAttempted: true,
|
||||
serverSyncSuccess: true,
|
||||
serverSyncMessage: null,
|
||||
timestamp: Date.now() - (1000 * 60 * 60) + (45000) // 1 hour ago + 45s
|
||||
timestamp: Date.now() - 1000 * 60 * 60 + 45000 // 1 hour ago + 45s
|
||||
},
|
||||
{
|
||||
name: 'Save',
|
||||
@@ -280,7 +328,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
serverSyncAttempted: true,
|
||||
serverSyncSuccess: true,
|
||||
serverSyncMessage: null,
|
||||
timestamp: Date.now() - (1000 * 60 * 60) + (30000) // 1 hour ago + 30s
|
||||
timestamp: Date.now() - 1000 * 60 * 60 + 30000 // 1 hour ago + 30s
|
||||
},
|
||||
{
|
||||
name: 'Save',
|
||||
@@ -290,7 +338,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
serverSyncAttempted: true,
|
||||
serverSyncSuccess: true,
|
||||
serverSyncMessage: null,
|
||||
timestamp: Date.now() - (1000 * 60 * 60) + (15000) // 1 hour ago + 15s
|
||||
timestamp: Date.now() - 1000 * 60 * 60 + 15000 // 1 hour ago + 15s
|
||||
},
|
||||
{
|
||||
name: 'Play',
|
||||
@@ -300,7 +348,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
serverSyncAttempted: false,
|
||||
serverSyncSuccess: null,
|
||||
serverSyncMessage: null,
|
||||
timestamp: Date.now() - (1000 * 60 * 60) // 1 hour ago
|
||||
timestamp: Date.now() - 1000 * 60 * 60 // 1 hour ago
|
||||
},
|
||||
{
|
||||
name: 'Stop',
|
||||
@@ -310,7 +358,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
serverSyncAttempted: true,
|
||||
serverSyncSuccess: true,
|
||||
serverSyncMessage: null,
|
||||
timestamp: Date.now() - (1000 * 60 * 60 * 25) + 10000 // 25 hours ago + 10s
|
||||
timestamp: Date.now() - 1000 * 60 * 60 * 25 + 10000 // 25 hours ago + 10s
|
||||
},
|
||||
{
|
||||
name: 'Seek',
|
||||
@@ -320,7 +368,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
serverSyncAttempted: true,
|
||||
serverSyncSuccess: true,
|
||||
serverSyncMessage: null,
|
||||
timestamp: Date.now() - (1000 * 60 * 60 * 25) + 2000 // 25 hours ago + 2s
|
||||
timestamp: Date.now() - 1000 * 60 * 60 * 25 + 2000 // 25 hours ago + 2s
|
||||
},
|
||||
{
|
||||
name: 'Play',
|
||||
@@ -330,7 +378,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
serverSyncAttempted: false,
|
||||
serverSyncSuccess: null,
|
||||
serverSyncMessage: null,
|
||||
timestamp: Date.now() - (1000 * 60 * 60 * 25) // 25 hours ago
|
||||
timestamp: Date.now() - 1000 * 60 * 60 * 25 // 25 hours ago
|
||||
},
|
||||
{
|
||||
name: 'Play',
|
||||
@@ -340,7 +388,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
||||
serverSyncAttempted: false,
|
||||
serverSyncSuccess: null,
|
||||
serverSyncMessage: null,
|
||||
timestamp: Date.now() - (1000 * 60 * 60 * 50) // 50 hours ago
|
||||
timestamp: Date.now() - 1000 * 60 * 60 * 50 // 50 hours ago
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -351,4 +399,4 @@ const AbsDatabase = registerPlugin('AbsDatabase', {
|
||||
web: () => new AbsDatabaseWeb()
|
||||
})
|
||||
|
||||
export { AbsDatabase }
|
||||
export { AbsDatabase }
|
||||
|
||||
@@ -2,9 +2,10 @@ import Vue from 'vue'
|
||||
import { AbsAudioPlayer } from './AbsAudioPlayer'
|
||||
import { AbsDownloader } from './AbsDownloader'
|
||||
import { AbsFileSystem } from './AbsFileSystem'
|
||||
import { AbsDatabase } from './AbsDatabase'
|
||||
import { AbsLogger } from './AbsLogger'
|
||||
import { Capacitor } from '@capacitor/core'
|
||||
|
||||
Vue.prototype.$platform = Capacitor.getPlatform()
|
||||
|
||||
export { AbsAudioPlayer, AbsDownloader, AbsFileSystem, AbsLogger }
|
||||
export { AbsAudioPlayer, AbsDownloader, AbsFileSystem, AbsLogger, AbsDatabase }
|
||||
|
||||
+44
-6
@@ -1,7 +1,7 @@
|
||||
import { AbsDatabase } from './capacitor/AbsDatabase'
|
||||
|
||||
class DbService {
|
||||
constructor() { }
|
||||
constructor() {}
|
||||
|
||||
getDeviceData() {
|
||||
return AbsDatabase.getDeviceData().then((data) => {
|
||||
@@ -10,6 +10,26 @@ class DbService {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves refresh token from secure storage
|
||||
* @param {string} serverConnectionConfigId
|
||||
* @return {Promise<string|null>}
|
||||
*/
|
||||
async getRefreshToken(serverConnectionConfigId) {
|
||||
const refreshTokenData = await AbsDatabase.getRefreshToken({ serverConnectionConfigId })
|
||||
return refreshTokenData?.refreshToken
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears refresh token from secure storage
|
||||
* @param {string} serverConnectionConfigId
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
async clearRefreshToken(serverConnectionConfigId) {
|
||||
const result = await AbsDatabase.clearRefreshToken({ serverConnectionConfigId })
|
||||
return !!result?.success
|
||||
}
|
||||
|
||||
setServerConnectionConfig(serverConnectionConfig) {
|
||||
return AbsDatabase.setCurrentServerConnectionConfig(serverConnectionConfig).then((data) => {
|
||||
console.log('Set server connection config', JSON.stringify(data))
|
||||
@@ -29,10 +49,12 @@ class DbService {
|
||||
}
|
||||
|
||||
getLocalFolders() {
|
||||
return AbsDatabase.getLocalFolders().then((data) => data.value).catch((error) => {
|
||||
console.error('Failed to load', error)
|
||||
return null
|
||||
})
|
||||
return AbsDatabase.getLocalFolders()
|
||||
.then((data) => data.value)
|
||||
.catch((error) => {
|
||||
console.error('Failed to load', error)
|
||||
return null
|
||||
})
|
||||
}
|
||||
|
||||
getLocalFolder(folderId) {
|
||||
@@ -103,4 +125,20 @@ class DbService {
|
||||
|
||||
export default ({ app, store }, inject) => {
|
||||
inject('db', new DbService())
|
||||
}
|
||||
|
||||
// Listen for token refresh events from native app
|
||||
AbsDatabase.addListener('onTokenRefresh', (data) => {
|
||||
console.log('[db] onTokenRefresh', data)
|
||||
store.commit('user/setAccessToken', data.accessToken)
|
||||
})
|
||||
|
||||
// Listen for token refresh failure events from native app
|
||||
AbsDatabase.addListener('onTokenRefreshFailure', async (data) => {
|
||||
console.log('[db] onTokenRefreshFailure', data)
|
||||
// Clear store and redirect to login page
|
||||
await store.dispatch('user/logout')
|
||||
if (window.location.pathname !== '/connect') {
|
||||
window.location.href = '/connect?error=refreshTokenFailed&serverConnectionConfigId=' + data.serverConnectionConfigId || ''
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
+25
-6
@@ -16,12 +16,6 @@ if (Capacitor.getPlatform() != 'web') {
|
||||
await StatusBar.setStyle({ style: Style.Dark })
|
||||
}
|
||||
setStatusBarStyleDark()
|
||||
|
||||
const setStatusBarOverlays = async () => {
|
||||
// Defaults to true in capacitor v7
|
||||
await StatusBar.setOverlaysWebView({ overlay: false })
|
||||
}
|
||||
setStatusBarOverlays()
|
||||
}
|
||||
|
||||
Vue.prototype.$showHideStatusBar = async (show) => {
|
||||
@@ -251,10 +245,35 @@ Vue.prototype.$sanitizeSlug = (str) => {
|
||||
return str
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares two semantic versioning strings to determine if the current version meets
|
||||
* or exceeds the minimum version requirement.
|
||||
* Only supports 3 part versions, e.g. "1.2.3"
|
||||
*
|
||||
* @param {string} currentVersion - The current version string to compare, e.g., "1.2.3".
|
||||
* @param {string} minVersion - The minimum version string required, e.g., "1.0.0".
|
||||
* @returns {boolean} - Returns true if the current version is greater than or equal
|
||||
* to the minimum version, false otherwise.
|
||||
*/
|
||||
function isValidVersion(currentVersion, minVersion) {
|
||||
if (!currentVersion || !minVersion) return false
|
||||
const currentParts = currentVersion.split('.').map(Number)
|
||||
const minParts = minVersion.split('.').map(Number)
|
||||
|
||||
for (let i = 0; i < minParts.length; i++) {
|
||||
if (currentParts[i] > minParts[i]) return true
|
||||
if (currentParts[i] < minParts[i]) return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
export default ({ store, app }, inject) => {
|
||||
const eventBus = new Vue()
|
||||
inject('eventBus', eventBus)
|
||||
|
||||
inject('isValidVersion', isValidVersion)
|
||||
|
||||
// Set theme
|
||||
app.$localStore?.getTheme()?.then((theme) => {
|
||||
if (theme) {
|
||||
|
||||
+201
-8
@@ -1,10 +1,14 @@
|
||||
import { CapacitorHttp } from '@capacitor/core'
|
||||
|
||||
export default function ({ store }, inject) {
|
||||
export default function ({ store, $db, $socket }, inject) {
|
||||
const nativeHttp = {
|
||||
request(method, _url, data, options = {}) {
|
||||
async request(method, _url, data, options = {}) {
|
||||
// When authorizing before a config is set, server config gets passed in as an option
|
||||
let serverConnectionConfig = options.serverConnectionConfig || store.state.user.serverConnectionConfig
|
||||
delete options.serverConnectionConfig
|
||||
|
||||
let url = _url
|
||||
const headers = {}
|
||||
let headers = {}
|
||||
if (!url.startsWith('http') && !url.startsWith('capacitor')) {
|
||||
const bearerToken = store.getters['user/getToken']
|
||||
if (bearerToken) {
|
||||
@@ -12,22 +16,31 @@ export default function ({ store }, inject) {
|
||||
} else {
|
||||
console.warn('[nativeHttp] No Bearer Token for request')
|
||||
}
|
||||
const serverUrl = store.getters['user/getServerAddress']
|
||||
if (serverUrl) {
|
||||
url = `${serverUrl}${url}`
|
||||
if (serverConnectionConfig?.address) {
|
||||
url = `${serverConnectionConfig.address}${url}`
|
||||
}
|
||||
}
|
||||
if (data) {
|
||||
headers['Content-Type'] = 'application/json'
|
||||
}
|
||||
if (options.headers) {
|
||||
headers = { ...headers, ...options.headers }
|
||||
delete options.headers
|
||||
}
|
||||
console.log(`[nativeHttp] Making ${method} request to ${url}`)
|
||||
|
||||
return CapacitorHttp.request({
|
||||
method,
|
||||
url,
|
||||
data,
|
||||
headers,
|
||||
...options
|
||||
}).then(res => {
|
||||
}).then((res) => {
|
||||
if (res.status === 401) {
|
||||
console.error(`[nativeHttp] 401 status for url "${url}"`)
|
||||
// Handle refresh token automatically
|
||||
return this.handleTokenRefresh(method, url, data, headers, options, serverConnectionConfig)
|
||||
}
|
||||
if (res.status >= 400) {
|
||||
console.error(`[nativeHttp] ${res.status} status for url "${url}"`)
|
||||
throw new Error(res.data)
|
||||
@@ -35,6 +48,186 @@ export default function ({ store }, inject) {
|
||||
return res.data
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles token refresh when a 401 Unauthorized response is received
|
||||
* @param {string} method - HTTP method
|
||||
* @param {string} url - Full URL
|
||||
* @param {*} data - Request data
|
||||
* @param {Object} headers - Request headers
|
||||
* @param {Object} options - Additional options
|
||||
* @param {{ id: string, address: string, version: string }} serverConnectionConfig
|
||||
* @returns {Promise} - Promise that resolves with the response data
|
||||
*/
|
||||
async handleTokenRefresh(method, url, data, headers, options, serverConnectionConfig) {
|
||||
try {
|
||||
console.log('[nativeHttp] Attempting to refresh token...')
|
||||
|
||||
if (!serverConnectionConfig?.id) {
|
||||
console.error('[nativeHttp] No server connection config ID available for token refresh')
|
||||
throw new Error('No server connection available')
|
||||
}
|
||||
|
||||
// Get refresh token from secure storage
|
||||
const refreshToken = await $db.getRefreshToken(serverConnectionConfig.id)
|
||||
if (!refreshToken) {
|
||||
console.error('[nativeHttp] No refresh token available')
|
||||
throw new Error('No refresh token available')
|
||||
}
|
||||
|
||||
// Attempt to refresh the token
|
||||
const newTokens = await this.refreshAccessToken(refreshToken, serverConnectionConfig.address)
|
||||
if (!newTokens?.accessToken) {
|
||||
console.error('[nativeHttp] Failed to refresh access token')
|
||||
throw new Error('Failed to refresh access token')
|
||||
}
|
||||
|
||||
// Update the store with new tokens
|
||||
await this.updateTokens(newTokens, serverConnectionConfig)
|
||||
|
||||
// Retry the original request with the new token
|
||||
console.log('[nativeHttp] Retrying original request with new token...')
|
||||
const retryResponse = await CapacitorHttp.request({
|
||||
method,
|
||||
url,
|
||||
data,
|
||||
headers: {
|
||||
...headers,
|
||||
Authorization: `Bearer ${newTokens.accessToken}`
|
||||
},
|
||||
...options
|
||||
})
|
||||
|
||||
if (retryResponse.status >= 400) {
|
||||
console.error(`[nativeHttp] Retry request failed with status ${retryResponse.status}`)
|
||||
throw new Error(retryResponse.data)
|
||||
}
|
||||
|
||||
return retryResponse.data
|
||||
} catch (error) {
|
||||
console.error('[nativeHttp] Token refresh failed:', error)
|
||||
|
||||
// If refresh fails, redirect to login
|
||||
await this.handleRefreshFailure(serverConnectionConfig?.id)
|
||||
throw error
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Refreshes the access token using the refresh token
|
||||
* @param {string} refreshToken - The refresh token
|
||||
* @param {string} serverAddress - The server address
|
||||
* @returns {Promise<Object|null>} - Promise that resolves with new tokens or null
|
||||
*/
|
||||
async refreshAccessToken(refreshToken, serverAddress) {
|
||||
try {
|
||||
if (!serverAddress) {
|
||||
throw new Error('No server address available')
|
||||
}
|
||||
|
||||
console.log('[nativeHttp] Refreshing access token...')
|
||||
|
||||
const response = await CapacitorHttp.post({
|
||||
url: `${serverAddress}/auth/refresh`,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'x-refresh-token': refreshToken
|
||||
},
|
||||
data: {}
|
||||
})
|
||||
|
||||
if (response.status !== 200) {
|
||||
console.error('[nativeHttp] Token refresh request failed:', response.status)
|
||||
return null
|
||||
}
|
||||
|
||||
const userResponseData = response.data
|
||||
if (!userResponseData.user?.accessToken) {
|
||||
console.error('[nativeHttp] No access token in refresh response')
|
||||
return null
|
||||
}
|
||||
|
||||
console.log('[nativeHttp] Successfully refreshed access token')
|
||||
return {
|
||||
accessToken: userResponseData.user.accessToken,
|
||||
// Refresh token gets returned when refresh token is sent in x-refresh-token header
|
||||
refreshToken: userResponseData.user.refreshToken
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('[nativeHttp] Failed to refresh access token:', error)
|
||||
return null
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the store and secure storage with new tokens
|
||||
* @param {Object} tokens - Object containing accessToken and refreshToken
|
||||
* @param {{ id: string, address: string, version: string }} serverConnectionConfig
|
||||
* @returns {Promise} - Promise that resolves when tokens are updated
|
||||
*/
|
||||
async updateTokens(tokens, serverConnectionConfig) {
|
||||
try {
|
||||
if (!serverConnectionConfig?.id) {
|
||||
throw new Error('No server connection config ID available')
|
||||
}
|
||||
|
||||
// Update the config with new tokens
|
||||
const updatedConfig = {
|
||||
...serverConnectionConfig,
|
||||
token: tokens.accessToken,
|
||||
refreshToken: tokens.refreshToken
|
||||
}
|
||||
|
||||
// Save updated config to secure storage, persists refresh token in secure storage
|
||||
const savedConfig = await $db.setServerConnectionConfig(updatedConfig)
|
||||
|
||||
// Update the store
|
||||
store.commit('user/setAccessToken', tokens.accessToken)
|
||||
|
||||
// Re-authenticate socket if necessary
|
||||
if ($socket?.connected && !$socket.isAuthenticated) {
|
||||
$socket.sendAuthenticate()
|
||||
} else if (!$socket) {
|
||||
console.warn('[nativeHttp] Socket not available, cannot re-authenticate')
|
||||
}
|
||||
|
||||
if (savedConfig) {
|
||||
store.commit('user/setServerConnectionConfig', savedConfig)
|
||||
}
|
||||
|
||||
console.log('[nativeHttp] Successfully updated tokens in store and secure storage')
|
||||
} catch (error) {
|
||||
console.error('[nativeHttp] Failed to update tokens:', error)
|
||||
throw error
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles the case when token refresh fails
|
||||
* @param {string} [serverConnectionConfigId]
|
||||
* @returns {Promise} - Promise that resolves when logout is complete
|
||||
*/
|
||||
async handleRefreshFailure(serverConnectionConfigId) {
|
||||
try {
|
||||
console.log('[nativeHttp] Handling refresh failure - logging out user')
|
||||
|
||||
// Clear store
|
||||
await store.dispatch('user/logout')
|
||||
|
||||
if (serverConnectionConfigId) {
|
||||
// Clear refresh token for server connection config
|
||||
await $db.clearRefreshToken(serverConnectionConfigId)
|
||||
}
|
||||
|
||||
// Redirect to login page
|
||||
if (window.location.pathname !== '/connect') {
|
||||
window.location.href = '/connect?error=refreshTokenFailed&serverConnectionConfigId=' + serverConnectionConfigId
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('[nativeHttp] Failed to handle refresh failure:', error)
|
||||
}
|
||||
},
|
||||
|
||||
get(url, options = {}) {
|
||||
return this.request('GET', url, undefined, options)
|
||||
},
|
||||
@@ -49,4 +242,4 @@ export default function ({ store }, inject) {
|
||||
}
|
||||
}
|
||||
inject('nativeHttp', nativeHttp)
|
||||
}
|
||||
}
|
||||
|
||||
+14
-3
@@ -9,7 +9,7 @@ class ServerSocket extends EventEmitter {
|
||||
this.socket = null
|
||||
this.connected = false
|
||||
this.serverAddress = null
|
||||
this.token = null
|
||||
this.isAuthenticated = false
|
||||
|
||||
this.lastReconnectAttemptTime = 0
|
||||
}
|
||||
@@ -26,7 +26,6 @@ class ServerSocket extends EventEmitter {
|
||||
|
||||
connect(serverAddress, token) {
|
||||
this.serverAddress = serverAddress
|
||||
this.token = token
|
||||
|
||||
const serverUrl = new URL(serverAddress)
|
||||
const serverHost = `${serverUrl.protocol}//${serverUrl.host}`
|
||||
@@ -53,6 +52,7 @@ class ServerSocket extends EventEmitter {
|
||||
this.socket.on('connect', this.onConnect.bind(this))
|
||||
this.socket.on('disconnect', this.onDisconnect.bind(this))
|
||||
this.socket.on('init', this.onInit.bind(this))
|
||||
this.socket.on('auth_failed', this.onAuthFailed.bind(this))
|
||||
this.socket.on('user_updated', this.onUserUpdated.bind(this))
|
||||
this.socket.on('user_item_progress_updated', this.onUserItemProgressUpdated.bind(this))
|
||||
this.socket.on('playlist_added', this.onPlaylistAdded.bind(this))
|
||||
@@ -61,6 +61,11 @@ class ServerSocket extends EventEmitter {
|
||||
this.socket.io.on('reconnect_failed', this.onReconnectFailed.bind(this))
|
||||
}
|
||||
|
||||
sendAuthenticate() {
|
||||
// Required to connect a socket to a user
|
||||
this.socket.emit('auth', this.$store.getters['user/getToken'])
|
||||
}
|
||||
|
||||
removeListeners() {
|
||||
if (!this.socket) return
|
||||
this.socket.removeAllListeners()
|
||||
@@ -74,7 +79,7 @@ class ServerSocket extends EventEmitter {
|
||||
this.connected = true
|
||||
this.$store.commit('setSocketConnected', true)
|
||||
this.emit('connection-update', true)
|
||||
this.socket.emit('auth', this.token) // Required to connect a user with their socket
|
||||
this.sendAuthenticate()
|
||||
}
|
||||
|
||||
onReconnectAttempt(attemptNumber) {
|
||||
@@ -101,6 +106,12 @@ class ServerSocket extends EventEmitter {
|
||||
onInit(data) {
|
||||
console.log('[SOCKET] Initial socket data received', data)
|
||||
this.emit('initialized', true)
|
||||
this.isAuthenticated = true
|
||||
}
|
||||
|
||||
onAuthFailed(data) {
|
||||
console.log('[SOCKET] Auth failed', data)
|
||||
this.isAuthenticated = false
|
||||
}
|
||||
|
||||
onUserUpdated(data) {
|
||||
|
||||
+107
-16
@@ -1,7 +1,10 @@
|
||||
import { Browser } from '@capacitor/browser'
|
||||
import { AbsLogger } from '@/plugins/capacitor'
|
||||
import { CapacitorHttp } from '@capacitor/core'
|
||||
|
||||
export const state = () => ({
|
||||
user: null,
|
||||
accessToken: null,
|
||||
serverConnectionConfig: null,
|
||||
settings: {
|
||||
mobileOrderBy: 'addedAt',
|
||||
@@ -17,7 +20,7 @@ export const getters = {
|
||||
getIsRoot: (state) => state.user && state.user.type === 'root',
|
||||
getIsAdminOrUp: (state) => state.user && (state.user.type === 'admin' || state.user.type === 'root'),
|
||||
getToken: (state) => {
|
||||
return state.user?.token || null
|
||||
return state.accessToken || null
|
||||
},
|
||||
getServerConnectionConfigId: (state) => {
|
||||
return state.serverConnectionConfig?.id || null
|
||||
@@ -28,19 +31,18 @@ export const getters = {
|
||||
getServerConfigName: (state) => {
|
||||
return state.serverConnectionConfig?.name || null
|
||||
},
|
||||
getCustomHeaders: (state) => {
|
||||
return state.serverConnectionConfig?.customHeaders || null
|
||||
},
|
||||
getUserMediaProgress: (state) => (libraryItemId, episodeId = null) => {
|
||||
if (!state.user?.mediaProgress) return null
|
||||
return state.user.mediaProgress.find(li => {
|
||||
if (episodeId && li.episodeId !== episodeId) return false
|
||||
return li.libraryItemId == libraryItemId
|
||||
})
|
||||
},
|
||||
getUserMediaProgress:
|
||||
(state) =>
|
||||
(libraryItemId, episodeId = null) => {
|
||||
if (!state.user?.mediaProgress) return null
|
||||
return state.user.mediaProgress.find((li) => {
|
||||
if (episodeId && li.episodeId !== episodeId) return false
|
||||
return li.libraryItemId == libraryItemId
|
||||
})
|
||||
},
|
||||
getUserBookmarksForItem: (state) => (libraryItemId) => {
|
||||
if (!state?.user?.bookmarks) return []
|
||||
return state.user.bookmarks.filter(bm => bm.libraryItemId === libraryItemId)
|
||||
return state.user.bookmarks.filter((bm) => bm.libraryItemId === libraryItemId)
|
||||
},
|
||||
getUserSetting: (state) => (key) => {
|
||||
return state.settings?.[key] || null
|
||||
@@ -53,6 +55,9 @@ export const getters = {
|
||||
},
|
||||
getUserCanDownload: (state) => {
|
||||
return !!state.user?.permissions?.download
|
||||
},
|
||||
getUserCanAccessExplicitContent: (state) => {
|
||||
return !!state.user?.permissions?.accessExplicitContent
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,24 +137,110 @@ export const actions = {
|
||||
} catch (error) {
|
||||
console.error('Error opening browser', error)
|
||||
}
|
||||
},
|
||||
async logout({ state, commit }, logoutFromServer = false) {
|
||||
// Logging out from server deletes the session so the refresh token is no longer valid
|
||||
// Currently this is not being used to support switching servers without logging back in (assuming refresh token is still valid)
|
||||
// We may want to make this change in the future
|
||||
if (state.serverConnectionConfig && logoutFromServer) {
|
||||
const refreshToken = await this.$db.getRefreshToken(state.serverConnectionConfig.id)
|
||||
const options = {}
|
||||
if (refreshToken) {
|
||||
// Refresh token is used to delete the session on the server
|
||||
options.headers = {
|
||||
'x-refresh-token': refreshToken
|
||||
}
|
||||
}
|
||||
// Logout from server
|
||||
await this.$nativeHttp.post('/logout', null, options).catch((error) => {
|
||||
console.error('Failed to logout', error)
|
||||
})
|
||||
}
|
||||
|
||||
await this.$db.logout()
|
||||
this.$socket.logout()
|
||||
this.$localStore.removeLastLibraryId()
|
||||
commit('logout')
|
||||
commit('libraries/setCurrentLibrary', null, { root: true })
|
||||
await AbsLogger.info({ tag: 'user', message: `Logged out from server ${state.serverConnectionConfig?.name || 'Not connected'}` })
|
||||
},
|
||||
async refreshToken({ getters, commit, state }) {
|
||||
const refreshToken = await this.$db.getRefreshToken(getters.getServerConnectionConfigId)
|
||||
if (!refreshToken) {
|
||||
console.error('No refresh token found')
|
||||
return null
|
||||
}
|
||||
|
||||
const serverAddress = getters.getServerAddress
|
||||
|
||||
const response = await CapacitorHttp.post({
|
||||
url: `${serverAddress}/auth/refresh`,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'x-refresh-token': refreshToken
|
||||
},
|
||||
data: {}
|
||||
})
|
||||
|
||||
if (response.status !== 200) {
|
||||
console.error('[user] Token refresh request failed:', response.status)
|
||||
return null
|
||||
}
|
||||
|
||||
const userResponseData = response.data
|
||||
if (!userResponseData.user?.accessToken) {
|
||||
console.error('[user] No access token in refresh response')
|
||||
return null
|
||||
}
|
||||
|
||||
// Update the config with new tokens
|
||||
const updatedConfig = {
|
||||
...state.serverConnectionConfig,
|
||||
token: userResponseData.user.accessToken,
|
||||
refreshToken: userResponseData.user.refreshToken
|
||||
}
|
||||
|
||||
// Save updated config to secure storage, persists refresh token in secure storage
|
||||
const savedConfig = await this.$db.setServerConnectionConfig(updatedConfig)
|
||||
|
||||
// Update the store
|
||||
commit('setAccessToken', userResponseData.user.accessToken)
|
||||
|
||||
// Re-authenticate socket if necessary
|
||||
if (this.$socket?.connected && !this.$socket.isAuthenticated) {
|
||||
this.$socket.sendAuthenticate()
|
||||
} else if (!this.$socket) {
|
||||
console.warn('[user] Socket not available, cannot re-authenticate')
|
||||
}
|
||||
|
||||
if (savedConfig) {
|
||||
commit('setServerConnectionConfig', savedConfig)
|
||||
}
|
||||
|
||||
return userResponseData.user.accessToken
|
||||
}
|
||||
}
|
||||
|
||||
export const mutations = {
|
||||
logout(state) {
|
||||
state.user = null
|
||||
state.accessToken = null
|
||||
state.serverConnectionConfig = null
|
||||
},
|
||||
setUser(state, user) {
|
||||
state.user = user
|
||||
},
|
||||
setAccessToken(state, accessToken) {
|
||||
console.log('[user] setAccessToken', accessToken)
|
||||
state.accessToken = accessToken
|
||||
},
|
||||
removeMediaProgress(state, id) {
|
||||
if (!state.user) return
|
||||
state.user.mediaProgress = state.user.mediaProgress.filter(mp => mp.id != id)
|
||||
state.user.mediaProgress = state.user.mediaProgress.filter((mp) => mp.id != id)
|
||||
},
|
||||
updateUserMediaProgress(state, data) {
|
||||
if (!data || !state.user) return
|
||||
const mediaProgressIndex = state.user.mediaProgress.findIndex(mp => mp.id === data.id)
|
||||
const mediaProgressIndex = state.user.mediaProgress.findIndex((mp) => mp.id === data.id)
|
||||
if (mediaProgressIndex >= 0) {
|
||||
state.user.mediaProgress.splice(mediaProgressIndex, 1, data)
|
||||
} else {
|
||||
@@ -174,9 +265,9 @@ export const mutations = {
|
||||
},
|
||||
deleteBookmark(state, { libraryItemId, time }) {
|
||||
if (!state.user?.bookmarks) return
|
||||
state.user.bookmarks = state.user.bookmarks.filter(bm => {
|
||||
state.user.bookmarks = state.user.bookmarks.filter((bm) => {
|
||||
if (bm.libraryItemId === libraryItemId && bm.time === time) return false
|
||||
return true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+298
-11
@@ -6,12 +6,13 @@
|
||||
"ButtonCancel": "إلغاء",
|
||||
"ButtonCancelTimer": "إلغاء المؤقت",
|
||||
"ButtonClearFilter": "تصفية الفرز",
|
||||
"ButtonClearLogs": "مسح السجل",
|
||||
"ButtonCloseFeed": "إغلاق",
|
||||
"ButtonCollections": "المجموعات",
|
||||
"ButtonConnect": "اتصل",
|
||||
"ButtonConnectToServer": "اتصال بالخادم",
|
||||
"ButtonCreate": "إنشاء",
|
||||
"ButtonCreateBookmark": "إنشاء إشارة مرجعية",
|
||||
"ButtonCreateBookmark": "إنشاء علامة مرجعية",
|
||||
"ButtonCreateNewPlaylist": "إنشاء قائمة تشغيل جديدة",
|
||||
"ButtonDelete": "حذف",
|
||||
"ButtonDeleteLocalEpisode": "احذف الحلقة المحلية",
|
||||
@@ -20,24 +21,27 @@
|
||||
"ButtonDisableAutoTimer": "تعطيل المؤقت التلقائي",
|
||||
"ButtonDisconnect": "فصل",
|
||||
"ButtonGoToWebClient": "اذهب إلى عميل الويب",
|
||||
"ButtonHistory": "تاريخ",
|
||||
"ButtonHistory": "السجل التاريخي",
|
||||
"ButtonHome": "الرئيسية",
|
||||
"ButtonIssues": "مشاكل",
|
||||
"ButtonLatest": "أحدث",
|
||||
"ButtonLatest": "الأحدث",
|
||||
"ButtonLibrary": "المكتبة",
|
||||
"ButtonLocalMedia": "ملفات الوسائط المحلية",
|
||||
"ButtonLocalMedia": "الوسائط المحلية",
|
||||
"ButtonLogs": "سجلات",
|
||||
"ButtonManageLocalFiles": "إدارة الملفات المحلية",
|
||||
"ButtonMaskServerAddress": "إخفاء عنوان الخادم",
|
||||
"ButtonNewFolder": "مجلد جديد",
|
||||
"ButtonNextEpisode": "الحلقة التالية",
|
||||
"ButtonOk": "موافق",
|
||||
"ButtonOpenFeed": "فتح التغذية",
|
||||
"ButtonOverride": "تجاوز",
|
||||
"ButtonPause": "تَوَقَّف",
|
||||
"ButtonPause": "إيقاف مؤقت",
|
||||
"ButtonPlay": "تشغيل",
|
||||
"ButtonPlayEpisode": "شغل الحلقة",
|
||||
"ButtonPlayEpisode": "تشغيل الحلقة",
|
||||
"ButtonPlaylists": "قوائم التشغيل",
|
||||
"ButtonRead": "اقرأ",
|
||||
"ButtonReadLess": "قلص",
|
||||
"ButtonReadMore": "المزيد",
|
||||
"ButtonReadLess": "اقرأ أقل",
|
||||
"ButtonReadMore": "اقرأ أكثر",
|
||||
"ButtonRemove": "إزالة",
|
||||
"ButtonRemoveFromServer": "إزالة من الخادم",
|
||||
"ButtonSave": "حفظ",
|
||||
@@ -47,21 +51,304 @@
|
||||
"ButtonSeries": "سلسلة",
|
||||
"ButtonSetTimer": "اضبط مؤقت",
|
||||
"ButtonStream": "بث",
|
||||
"ButtonSubmit": "تقديم",
|
||||
"ButtonSubmit": "إرسال",
|
||||
"ButtonSwitchServerUser": "تبديل الخادم/المستخدم",
|
||||
"ButtonUnmaskServerAddress": "إظهار عنوان الخادم",
|
||||
"ButtonUserStats": "إحصائيات المستخدم",
|
||||
"ButtonYes": "نعم",
|
||||
"HeaderAccount": "الحساب",
|
||||
"HeaderAdvanced": "متقدم",
|
||||
"HeaderAudioTracks": "المسارات الصوتية",
|
||||
"HeaderAndroidAutoSettings": "إعدادات أندرويد للسيارة",
|
||||
"HeaderAudioTracks": "المقاطع الصوتية",
|
||||
"HeaderChapters": "الفصول",
|
||||
"HeaderCollection": "مجموعة",
|
||||
"HeaderCollectionItems": "عناصر المجموعة",
|
||||
"HeaderConnectionStatus": "حالة الاتصال",
|
||||
"HeaderDataSettings": "إعدادات البيانات",
|
||||
"HeaderDetails": "التفاصيل",
|
||||
"HeaderDownloads": "التنزيلات",
|
||||
"HeaderEbookFiles": "ملفات الكتب الإلكترونية",
|
||||
"HeaderEpisodes": "الحلقات",
|
||||
"HeaderEreaderSettings": "إعدادات القارئ الإلكتروني",
|
||||
"HeaderLatestEpisodes": "أحدث الحلقات",
|
||||
"HeaderLibraries": "المكتبات"
|
||||
"HeaderLibraries": "المكتبات",
|
||||
"HeaderLocalFolders": "المجلدات المحلية",
|
||||
"HeaderLocalLibraryItems": "عناصر المكتبة المحلية",
|
||||
"HeaderNewPlaylist": "قائمة تشغيل جديدة",
|
||||
"HeaderOpenRSSFeed": "عرض تغذية RSS",
|
||||
"HeaderPlaybackSettings": "إعدادات التشغيل",
|
||||
"HeaderPlaylist": "قائمة تشغيل",
|
||||
"HeaderPlaylistItems": "عناصر قائمة التشغيل",
|
||||
"HeaderProgressSyncFailed": "فشلت المزامنة",
|
||||
"HeaderRSSFeed": "تغذية RSS",
|
||||
"HeaderRSSFeedGeneral": "تفاصيل RSS",
|
||||
"HeaderRSSFeedIsOpen": "مغذي RSS مفتوح",
|
||||
"HeaderSelectDownloadLocation": "حدد موقع التنزيل",
|
||||
"HeaderSettings": "إعدادات",
|
||||
"HeaderSleepTimer": "مؤقت النوم",
|
||||
"HeaderSleepTimerSettings": "إعدادات مؤقت النوم",
|
||||
"HeaderStatsMinutesListeningChart": "الدقائق المسموعة (آخر 7 أيام)",
|
||||
"HeaderStatsRecentSessions": "الجلسات الأخيرة",
|
||||
"HeaderTableOfContents": "جدول المحتويات",
|
||||
"HeaderUserInterfaceSettings": "إعدادات واجهة المستخدم",
|
||||
"HeaderYourStats": "إحصائياتك",
|
||||
"LabelAddToPlaylist": "أضف إلى قائمة التشغيل",
|
||||
"LabelAddedAt": "أضيفت على",
|
||||
"LabelAddedDate": "تمت الإضافة",
|
||||
"LabelAll": "الكل",
|
||||
"LabelAllowSeekingOnMediaControls": "السماح بالبحث عن الموضع في التحكم بإشعارات الوسائط",
|
||||
"LabelAlways": "دائماً",
|
||||
"LabelAndroidAutoBrowseLimitForGrouping": "حد السحب الأبجدي",
|
||||
"LabelAndroidAutoBrowseLimitForGroupingHelp": "لا تستخدم السحب الأبجدي عندما يكون عدد العناصر المراد عرضها أقل من هذا العدد",
|
||||
"LabelAndroidAutoBrowseSeriesSequenceOrder": "ترتيب كتب السلسلة",
|
||||
"LabelAskConfirmation": "اطلب التأكيد",
|
||||
"LabelAuthor": "المؤلف",
|
||||
"LabelAuthorFirstLast": "المؤلف (الاسم الأول الأخير)",
|
||||
"LabelAuthorLastFirst": "المؤلف (الاسم الأخير، الأول)",
|
||||
"LabelAuthors": "المؤلفون",
|
||||
"LabelAutoDownloadEpisodes": "تنزيل الحلقات تلقائيًا",
|
||||
"LabelAutoRewindTime": "إعادة الوقت تلقائياَ",
|
||||
"LabelAutoSleepTimer": "مؤقت النوم التلقائي",
|
||||
"LabelAutoSleepTimerAutoRewind": "مؤقتا النوم والإرجاع التلقائيين",
|
||||
"LabelAutoSleepTimerAutoRewindHelp": "عندما ينتهي مؤقت النوم التلقائي، فإن تشغيل العنصر مرة أخرى سيؤدي إلى الإرجاع التلقائي.",
|
||||
"LabelAutoSleepTimerHelp": "عند تشغيل الوسائط بين أوقات البداية والنهاية المحددة، سيبدأ مؤقت النوم تلقائيًا.",
|
||||
"LabelBooks": "الكتب",
|
||||
"LabelChapterTrack": "مسار الفصل",
|
||||
"LabelChapters": "الفصول",
|
||||
"LabelClosePlayer": "إغلاق المشغل",
|
||||
"LabelCollapseSeries": "إخفاء المسلسلات",
|
||||
"LabelComplete": "مكتمل",
|
||||
"LabelContinueBooks": "استمرار الكتب",
|
||||
"LabelContinueEpisodes": "استمرار الحلقات",
|
||||
"LabelContinueListening": "استمرار الاستماع",
|
||||
"LabelContinueReading": "استمرار القراءة",
|
||||
"LabelContinueSeries": "استمرار المسلسلات",
|
||||
"LabelCustomTime": "الوقت المخصص",
|
||||
"LabelDescription": "الوصف",
|
||||
"LabelDisableAudioFadeOut": "تعطيل التلاشي الصوتي",
|
||||
"LabelDisableAudioFadeOutHelp": "سيبدأ مستوى الصوت بالانخفاض عندما يتبقى أقل من دقيقة واحدة على مؤقت النوم. فعّل هذا الإعداد لعدم التلاشي.",
|
||||
"LabelDisableAutoRewind": "تعطيل الإعادة التلقائية",
|
||||
"LabelDisableShakeToReset": "تعطيل الرج لإعادة الضبط",
|
||||
"LabelDisableShakeToResetHelp": "سيؤدي هزّ جهازك أثناء تشغيل المؤقت أو خلال دقيقتين من انتهاءه إلى إعادة ضبط مؤقت النوم. فعّل هذا الإعداد لتعطيل الرج لإعادة الضبط.",
|
||||
"LabelDisableVibrateOnReset": "تعطيل الاهتزاز عند إعادة الضبط",
|
||||
"LabelDisableVibrateOnResetHelp": "عند إعادة ضبط مؤقت النوم، سيهتز جهازك. فعّل هذا الإعداد لعدم الاهتزاز عند إعادة ضبط مؤقت النوم.",
|
||||
"LabelDiscover": "استكشف",
|
||||
"LabelDownload": "تنزيل",
|
||||
"LabelDownloadUsingCellular": "التنزيل عبر بيانات الهاتف",
|
||||
"LabelDownloaded": "تم تنزيلها",
|
||||
"LabelDuration": "المدة",
|
||||
"LabelEbook": "الكتاب الإلكتروني",
|
||||
"LabelEbooks": "الكتب الإلكترونية",
|
||||
"LabelEnable": "تمكين",
|
||||
"LabelEnableMp3IndexSeeking": "تمكين البحث عن فهرس mp3",
|
||||
"LabelEnableMp3IndexSeekingHelp": "يجب تفعيل هذا الإعداد فقط إذا كانت ملفات MP3 لديك لا تعمل بشكل صحيح. غالبًا ما يكون البحث غير الدقيق ناتجًا عن ملفات MP3 ذات معدل البت المتغير (VBR). سيفرض هذا الإعداد البحث عن الفهرس، حيث يتم إنشاء تعيين زمني للبايت أثناء قراءة الملف. في بعض الحالات، مع ملفات MP3 كبيرة الحجم، قد يكون هناك تأخير عند البحث قرب نهاية الملف.",
|
||||
"LabelEnd": "انهاء",
|
||||
"LabelEndOfChapter": "نهاية الفصل",
|
||||
"LabelEndTime": "وقت النهاية",
|
||||
"LabelEpisode": "الحلقة",
|
||||
"LabelFeedURL": "عنوان التغذية",
|
||||
"LabelFile": "الملف",
|
||||
"LabelFileBirthtime": "وقت انشاء الملف",
|
||||
"LabelFileModified": "تم تعديل الملف",
|
||||
"LabelFilename": "اسم الملف",
|
||||
"LabelFinished": "المنجزة",
|
||||
"LabelFolder": "المجلد",
|
||||
"LabelFontBoldness": "تعريض الخط",
|
||||
"LabelFontScale": "نطاق الخط",
|
||||
"LabelGenre": "التصنيف",
|
||||
"LabelGenres": "التصانيف",
|
||||
"LabelHapticFeedback": "ردود الفعل اللمسية",
|
||||
"LabelHasEbook": "يحتوي كتاب إلكتروني",
|
||||
"LabelHasSupplementaryEbook": "يحتوي كتاب إلكتروني تكميلي",
|
||||
"LabelHeavy": "ثقيل",
|
||||
"LabelHigh": "مرتفع",
|
||||
"LabelHost": "المضيف",
|
||||
"LabelInProgress": "تحت التنفيذ",
|
||||
"LabelIncomplete": "غير مكتمل",
|
||||
"LabelInternalAppStorage": "وحدة تخزين التطبيق الداخلي",
|
||||
"LabelJumpBackwardsTime": "وقت القفز للخلف",
|
||||
"LabelJumpForwardsTime": "وقت القفز للأمام",
|
||||
"LabelKeepScreenAwake": "إبقاء الشاشة يقظة",
|
||||
"LabelLanguage": "اللغة",
|
||||
"LabelLayout": "التنسيق",
|
||||
"LabelLayoutAuto": "تلقائي",
|
||||
"LabelLayoutSinglePage": "صفحة واحدة",
|
||||
"LabelLight": "فاتح",
|
||||
"LabelLineSpacing": "تباعد الأسطر",
|
||||
"LabelListenAgain": "الاستماع مجدداً",
|
||||
"LabelLocalBooks": "الكتب المحلية",
|
||||
"LabelLocalPodcasts": "المدونات الصوتية المحلية",
|
||||
"LabelLockOrientation": "قفل الاتجاه",
|
||||
"LabelLockPlayer": "قفل المشغل",
|
||||
"LabelLow": "منخفض",
|
||||
"LabelMediaType": "نوع الوسائط",
|
||||
"LabelMedium": "متوسط",
|
||||
"LabelMissing": "مفقود",
|
||||
"LabelMore": "أكثر",
|
||||
"LabelMoreInfo": "معلومات أكثر",
|
||||
"LabelName": "الاسم",
|
||||
"LabelNarrator": "الراوي",
|
||||
"LabelNarrators": "الرواة",
|
||||
"LabelNavigateWithVolume": "التنقل بمفاتيح التحكم بالصوت",
|
||||
"LabelNavigateWithVolumeMirrored": "معكوس",
|
||||
"LabelNavigateWithVolumeWhilePlaying": "السماح لمفاتيح التحكم بالصوت بالتنقل أثناء التشغيل",
|
||||
"LabelNavigateWithVolumeWhilePlayingDisabled": "إيقاف",
|
||||
"LabelNavigateWithVolumeWhilePlayingEnabled": "مُفعَّل",
|
||||
"LabelNever": "أبداً",
|
||||
"LabelNewestAuthors": "أجدد المؤلفين",
|
||||
"LabelNewestEpisodes": "أجدد الحلقات",
|
||||
"LabelNo": "لا",
|
||||
"LabelNotFinished": "لم يتم الانتهاء",
|
||||
"LabelNotStarted": "لم يتم البدء",
|
||||
"LabelNumEpisodes": "{0} حلقات",
|
||||
"LabelNumEpisodesIncomplete": "{0} حلقات، {1} غير مكتمل",
|
||||
"LabelNumberOfEpisodes": "# من الحلقات",
|
||||
"LabelOff": "ايقاف",
|
||||
"LabelOn": "مُفعَّل",
|
||||
"LabelPassword": "كلمة المرور",
|
||||
"LabelPath": "مسار",
|
||||
"LabelPlaybackDirect": "مباشر",
|
||||
"LabelPlaybackLocal": "محلي",
|
||||
"LabelPlaybackSpeed": "سرعة التشغيل",
|
||||
"LabelPlaybackTranscode": "تحويل الترميز",
|
||||
"LabelPodcast": "مدونة صوتية",
|
||||
"LabelPodcasts": "بودكاست",
|
||||
"LabelPreventIndexing": "منع فهرسة تغذيتك بواسطة دليل آيتونز وقوقل بودكاست",
|
||||
"LabelProgress": "تقدم",
|
||||
"LabelPubDate": "تاريخ النشر",
|
||||
"LabelPublishYear": "سنة النشر",
|
||||
"LabelPublishedDate": "منشور {0}",
|
||||
"LabelRSSFeedCustomOwnerEmail": "البريد الالكتروني المخصص للمالك",
|
||||
"LabelRSSFeedCustomOwnerName": "الاسم المخصص للمالك",
|
||||
"LabelRSSFeedOpen": "موجز RSS مفتوح",
|
||||
"LabelRSSFeedPreventIndexing": "منع الفهرسة",
|
||||
"LabelRSSFeedSlug": "اسم تعريف تغذية RSS",
|
||||
"LabelRandomly": "عشوائياً",
|
||||
"LabelRead": "اقرأ",
|
||||
"LabelReadAgain": "اقرأ مرة أخرى",
|
||||
"LabelRecentSeries": "المسلسلات الحديثة",
|
||||
"LabelRecentlyAdded": "المضافة حديثاً",
|
||||
"LabelRemoveFromPlaylist": "إزالة من قائمة التشغيل",
|
||||
"LabelScaleElapsedTimeBySpeed": "تعديل الوقت المنصرم حسب السرعة",
|
||||
"LabelSeason": "الموسم",
|
||||
"LabelSelectADevice": "اختيار جهاز",
|
||||
"LabelSequenceAscending": "تسلسل تصاعدي",
|
||||
"LabelSequenceDescending": "تسلسل تنازلي",
|
||||
"LabelSeries": "المسلسلات",
|
||||
"LabelServerAddress": "عنوان الخادم",
|
||||
"LabelSetEbookAsPrimary": "تعيين كرئيسي",
|
||||
"LabelSetEbookAsSupplementary": "تعيين كتكميلي",
|
||||
"LabelShakeSensitivity": "حساسية الرج",
|
||||
"LabelShowAll": "إظهار الكل",
|
||||
"LabelSize": "الحجم",
|
||||
"LabelSleepTimer": "مؤقت النوم",
|
||||
"LabelSleepTimerAlmostDoneChime": "تشغيل نغمة عند اقتراب النهاية",
|
||||
"LabelSleepTimerAlmostDoneChimeHelp": "تشغيل نغمة عندما يتبقى 30 ثانية على مؤقت النوم",
|
||||
"LabelStart": "ابدأ",
|
||||
"LabelStartTime": "وقت البدء",
|
||||
"LabelStatsBestDay": "أفضل يوم",
|
||||
"LabelStatsDailyAverage": "المتوسط اليومي",
|
||||
"LabelStatsDays": "أيام",
|
||||
"LabelStatsDaysListened": "أيام الاستماع",
|
||||
"LabelStatsInARow": "على التوالي",
|
||||
"LabelStatsItemsFinished": "العناصر المنتهية",
|
||||
"LabelStatsMinutes": "دقائق",
|
||||
"LabelStatsMinutesListening": "دقائق الاستماع",
|
||||
"LabelStatsWeekListening": "استماع هذا الأسبوع",
|
||||
"LabelStreamingUsingCellular": "البث عبر شبكة الجوال",
|
||||
"LabelTag": "علامة",
|
||||
"LabelTags": "علامات",
|
||||
"LabelTheme": "النمط",
|
||||
"LabelThemeBlack": "أسود",
|
||||
"LabelThemeDark": "غامق",
|
||||
"LabelThemeLight": "فاتح",
|
||||
"LabelTimeRemaining": "{0} متبقية",
|
||||
"LabelTitle": "عنوان",
|
||||
"LabelTotalSize": "الحجم الكلي",
|
||||
"LabelTotalTrack": "إجمالي المسارات",
|
||||
"LabelTracks": "المسارات",
|
||||
"LabelType": "نوع",
|
||||
"LabelUnknown": "مجهول",
|
||||
"LabelUnlockPlayer": "تفعيل المشغل",
|
||||
"LabelUseBookshelfView": "تفعيل عرض الرف",
|
||||
"LabelUser": "مستخدم",
|
||||
"LabelUsername": "اسم المستخدم",
|
||||
"LabelVeryHigh": "عالي جدًا",
|
||||
"LabelVeryLow": "منخفض جدًا",
|
||||
"LabelYearReviewHide": "إخفاء ملخص العام",
|
||||
"LabelYearReviewShow": "عرض ملخص العام",
|
||||
"LabelYourBookmarks": "علاماتك المرجعية",
|
||||
"LabelYourProgress": "تقدمك",
|
||||
"MessageAndroid10Downloads": "سيستخدم نظام أندرويد 10 والإصدارات الأقدم وحدة التخزين الداخلية.",
|
||||
"MessageAttemptingServerConnection": "جاري محاولة الاتصال بالخادم...",
|
||||
"MessageAudiobookshelfServerNotConnected": "خادم Audiobookshelf غير متصل",
|
||||
"MessageAudiobookshelfServerRequired": "<strong>مهم!</strong> هذا التطبيق مصمم للعمل مع خادم Audiobookshelf تستضيفه أنت أو شخص تعرفه. هذا التطبيق لا يقدم أي محتوى.",
|
||||
"MessageBookshelfEmpty": "الرف فارغ",
|
||||
"MessageConfirmDeleteLocalEpisode": "هل تريد بالتأكيد إزالة الحلقة المحلية \"{0}\" من جهازك؟ لن يتأثر الملف الموجود على الخادم.",
|
||||
"MessageConfirmDeleteLocalFiles": "هل تريد بالتأكيد إزالة الملفات المحلية لهذا العنصر من جهازك؟ الملفات الموجودة على الخادم وتقدمك لن يتأثرا.",
|
||||
"MessageConfirmDisableAutoTimer": "هل أنت متأكد أنك تريد تعطيل المؤقت التلقائي لبقية اليوم؟ سيتم إعادة تفعيل المؤقت في نهاية فترة مؤقت النوم التلقائي هذه، أو إذا قمت بإعادة تشغيل التطبيق.",
|
||||
"MessageConfirmDiscardProgress": "هل أنت متأكد أنك تريد إعادة تعيين تقدمك؟",
|
||||
"MessageConfirmDownloadUsingCellular": "أنت على وشك التنزيل باستخدام بيانات الجوال. قد يشمل ذلك رسوم استخدام بيانات من شركة الاتصالات. هل ترغب في المتابعة؟",
|
||||
"MessageConfirmMarkAsFinished": "هل أنت متأكد أنك تريد وضع علامة \"مكتمل\" على هذا العنصر؟",
|
||||
"MessageConfirmRemoveBookmark": "هل أنت متأكد أنك تريد إزالة العلامة المرجعية؟",
|
||||
"MessageConfirmStreamingUsingCellular": "أنت على وشك البث باستخدام بيانات الجوال. قد يشمل ذلك رسوم استخدام بيانات من شركة الاتصالات. هل ترغب في المتابعة؟",
|
||||
"MessageDiscardProgress": "إلغاء التقدم",
|
||||
"MessageDownloadCompleteProcessing": "اكتمل التنزيل. جاري المعالجة...",
|
||||
"MessageDownloading": "جاري التنزيل...",
|
||||
"MessageDownloadingEpisode": "جاري تنزيل الحلقة",
|
||||
"MessageEpisodesQueuedForDownload": "تمت إضافة {0} حلقة (حلقات) إلى قائمة انتظار التنزيل",
|
||||
"MessageFeedURLWillBe": "سيكون رابط التغذية هو {0}",
|
||||
"MessageFetching": "جاري الجلب...",
|
||||
"MessageFollowTheProjectOnGithub": "تابع المشروع على Github",
|
||||
"MessageItemDownloadCompleteFailedToCreate": "اكتمل تنزيل العنصر ولكن فشل إنشاء عنصر المكتبة",
|
||||
"MessageItemMissing": "العنصر مفقود ويجب إصلاحه على الخادم. عادةً ما يتم وضع علامة \"مفقود\" على العنصر لأن مسارات الملفات غير قابلة للوصول.",
|
||||
"MessageLoading": "جاري التحميل...",
|
||||
"MessageLoadingServerData": "جاري تحميل بيانات الخادم...",
|
||||
"MessageLocalFolderDescription": "\"وحدة تخزين التطبيق الداخلية\" لا يمكن الوصول إليها إلا بواسطة هذا التطبيق. هذا التطبيق يدعم فقط الوسائط التي تم تنزيلها مباشرةً من خلال التطبيق. يمكن استخدام مجلدات التخزين المشتركة للسماح لتطبيقات أخرى بالوصول إلى الوسائط التي تم تنزيلها بواسطة هذا التطبيق.",
|
||||
"MessageMarkAsFinished": "وضع علامة \"تم الإنتهاء\"",
|
||||
"MessageMediaLinkedToADifferentServer": "الوسائط مرتبطة بخادم Audiobookshelf على عنوان مختلف ({0}). ستتم مزامنة التقدم عند الاتصال بعنوان هذا الخادم.",
|
||||
"MessageMediaLinkedToADifferentUser": "الوسائط مرتبطة بهذا الخادم ولكن تم تنزيلها بواسطة مستخدم مختلف. ستتم مزامنة التقدم فقط مع المستخدم الذي قام بتنزيلها.",
|
||||
"MessageMediaLinkedToServer": "مرتبط بالخادم {0}",
|
||||
"MessageMediaLinkedToThisServer": "الوسائط التي تم تنزيلها مرتبطة بهذا الخادم",
|
||||
"MessageMediaNotLinkedToServer": "الوسائط غير مرتبطة بخادم Audiobookshelf. لن تتم مزامنة أي تقدم.",
|
||||
"MessageNoBookmarks": "لا توجد علامات مرجعية",
|
||||
"MessageNoChapters": "لا توجد فصول",
|
||||
"MessageNoCollections": "لا توجد مجموعات",
|
||||
"MessageNoItems": "لا توجد عناصر",
|
||||
"MessageNoItemsFound": "لم يتم العثور على عناصر",
|
||||
"MessageNoListeningSessions": "لا توجد جلسات استماع",
|
||||
"MessageNoLogs": "لا توجد سجلات",
|
||||
"MessageNoMediaFolders": "لا توجد مجلدات وسائط",
|
||||
"MessageNoNetworkConnection": "لا يوجد اتصال بالشبكة",
|
||||
"MessageNoPodcastsFound": "لم يتم العثور على أي بودكاست",
|
||||
"MessageNoSeries": "لا توجد سلاسل",
|
||||
"MessageNoUpdatesWereNecessary": "لا حاجة لأي تحديثات",
|
||||
"MessageNoUserPlaylists": "ليس لديك أي قوائم تشغيل",
|
||||
"MessageOldServerConnectionWarning": "تكوين اتصال الخادم يستخدم معرّف مستخدم قديم. يرجى حذف اتصال الخادم هذا وإعادة إضافته.",
|
||||
"MessageOldServerConnectionWarningHelp": "لقد قمتَ بإعداد الاتصال بهذا الخادم قبل ترحيل قاعدة البيانات في الإصدار 2.3.0، الصادر في يونيو 2023. سيؤدي تحديث الخادم المستقبلي إلى إلغاء إمكانية تسجيل الدخول باستخدام هذا الاتصال القديم. يُرجى حذف اتصال الخادم الحالي والاتصال مرة أخرى (باستخدام نفس عنوان الخادم وبيانات الاعتماد). إذا كانت لديك أي وسائط مُنزّلة على هذا الجهاز، فيجب تنزيلها مرة أخرى لمزامنتها مع الخادم.",
|
||||
"MessagePodcastSearchField": "أدخل مصطلح البحث أو عنوان URL الخاص بتغذية RSS",
|
||||
"MessageProgressSyncFailed": "فشلت آخر محاولة لإرسال تقدم استماعك إلى الخادم. ستستمر محاولات مزامنة التقدم كل 15 ثانية إلى دقيقة واحدة أثناء تشغيل الوسائط.",
|
||||
"MessageReportBugsAndContribute": "أبلغ عن الأخطاء، واطلب الميزات، وساهم في",
|
||||
"MessageSeriesAlreadyDownloaded": "لقد قمت بالفعل بتنزيل جميع الكتب في هذه السلسلة.",
|
||||
"MessageSeriesDownloadConfirm": "هل تريد تنزيل {0} كتابًا (كتب) مفقودًا (مفقودة) مع {1} ملفًا (ملفات)، بإجمالي {2} إلى المجلد {3}؟",
|
||||
"MessageSeriesDownloadConfirmIos": "هل تريد تنزيل {0} كتابًا (كتب) مفقودًا (مفقودة) مع {1} ملفًا (ملفات)، بإجمالي {2}؟",
|
||||
"MessageSocketConnectedOverMeteredCellular": "تم توصيل المقبس عبر شبكة الجوال ذات الاستهلاك المحدود",
|
||||
"MessageSocketConnectedOverMeteredWifi": "تم توصيل المقبس عبر شبكة الواي فاي ذات الاستهلاك المحدود",
|
||||
"MessageSocketConnectedOverUnmeteredCellular": "تم توصيل المقبس عبر شبكة الجوال غير ذات الاستهلاك المحدود",
|
||||
"MessageSocketConnectedOverUnmeteredWifi": "المقبس متصل عبر شبكة واي فاي غير محدودة",
|
||||
"MessageSocketNotConnected": "المقبس غير متصل",
|
||||
"NoteRSSFeedPodcastAppsHttps": "تحذير: تتطلب معظم تطبيقات البث الصوتي أن يكون عنوان URL الخاص بتغذية RSS يستخدم HTTPS",
|
||||
"NoteRSSFeedPodcastAppsPubDate": "تحذير: حلقة واحدة أو أكثر من حلقاتك ليس لها تاريخ نشر. بعض تطبيقات البودكاست تتطلب هذا.",
|
||||
"ToastBookmarkCreateFailed": "فشل في إنشاء الإشارة المرجعية",
|
||||
"ToastBookmarkRemoveFailed": "فشل في إزالة الإشارة المرجعية",
|
||||
"ToastBookmarkUpdateFailed": "فشل في تحديث الإشارة المرجعية",
|
||||
"ToastDownloadNotAllowedOnCellular": "لا يسمح بالتنزيل على البيانات الخلوية",
|
||||
"ToastItemMarkedAsFinishedFailed": "فشل وضع علامة \"مكتمل\"",
|
||||
"ToastItemMarkedAsNotFinishedFailed": "فشل وضع علامة \"غير مكتمل\"",
|
||||
"ToastPlaylistCreateFailed": "فشل إنشاء قائمة التشغيل",
|
||||
"ToastPodcastCreateFailed": "فشل إنشاء البودكاست",
|
||||
"ToastPodcastCreateSuccess": "تم إنشاء البودكاست بنجاح",
|
||||
"ToastRSSFeedCloseFailed": "فشل إغلاق مغذّي RSS",
|
||||
"ToastRSSFeedCloseSuccess": "تم إغلاق مغذّي RSS",
|
||||
"ToastStreamingNotAllowedOnCellular": "لا يُسمح بالبث عبر البيانات الخلوية"
|
||||
}
|
||||
|
||||
+14
-1
@@ -6,6 +6,7 @@
|
||||
"ButtonCancel": "Скасаваць",
|
||||
"ButtonCancelTimer": "Скасаваць таймер",
|
||||
"ButtonClearFilter": "Ачысціць фільтр",
|
||||
"ButtonClearLogs": "Ачысціць журналы",
|
||||
"ButtonCloseFeed": "Закрыць стужку",
|
||||
"ButtonCollections": "Калекцыі",
|
||||
"ButtonConnect": "Падлучыцца",
|
||||
@@ -26,7 +27,9 @@
|
||||
"ButtonLatest": "Апошняе",
|
||||
"ButtonLibrary": "Бібліятэка",
|
||||
"ButtonLocalMedia": "Лакальныя медыя",
|
||||
"ButtonLogs": "Журналы",
|
||||
"ButtonManageLocalFiles": "Кіраванне лакальнымі файламі",
|
||||
"ButtonMaskServerAddress": "Схаваць адрас сервера",
|
||||
"ButtonNewFolder": "Новая тэчка",
|
||||
"ButtonNextEpisode": "Наступны эпізод",
|
||||
"ButtonOk": "Добра",
|
||||
@@ -50,6 +53,7 @@
|
||||
"ButtonStream": "Трансляцыя",
|
||||
"ButtonSubmit": "Адправіць",
|
||||
"ButtonSwitchServerUser": "Змяніць Сервер/Карыстальніка",
|
||||
"ButtonUnmaskServerAddress": "Паказаць адрас сервера",
|
||||
"ButtonUserStats": "Статыстыка карыстальніка",
|
||||
"ButtonYes": "Так",
|
||||
"HeaderAccount": "Уліковы запіс",
|
||||
@@ -78,7 +82,7 @@
|
||||
"HeaderProgressSyncFailed": "Не ўдалося сінхранізаваць прагрэс",
|
||||
"HeaderRSSFeed": "RSS-стужка",
|
||||
"HeaderRSSFeedGeneral": "Падрабязнасці RSS",
|
||||
"HeaderRSSFeedIsOpen": "RSS-стужка адкрыта",
|
||||
"HeaderRSSFeedIsOpen": "RSS-стужка адкрытая",
|
||||
"HeaderSelectDownloadLocation": "Абраць месцазнаходжання для спампоўкі",
|
||||
"HeaderSettings": "Налады",
|
||||
"HeaderSleepTimer": "Таймер сну",
|
||||
@@ -142,6 +146,7 @@
|
||||
"LabelEndOfChapter": "Канец раздзела",
|
||||
"LabelEndTime": "Час заканчэння",
|
||||
"LabelEpisode": "Эпізод",
|
||||
"LabelExplicit": "Відверты",
|
||||
"LabelFeedURL": "URL стужкі",
|
||||
"LabelFile": "Файл",
|
||||
"LabelFileBirthtime": "Час стварэння файла",
|
||||
@@ -216,6 +221,7 @@
|
||||
"LabelPublishedDate": "Апублікавана {0}",
|
||||
"LabelRSSFeedCustomOwnerEmail": "Карыстальніцкая электронная пошта ўладальніка",
|
||||
"LabelRSSFeedCustomOwnerName": "Карыстальніцкае імя ўладальніка",
|
||||
"LabelRSSFeedOpen": "RSS-стужка адкрыта",
|
||||
"LabelRSSFeedPreventIndexing": "Прадухіліць індэксацыю",
|
||||
"LabelRSSFeedSlug": "Ідэнтыфікатар RSS-стужкі",
|
||||
"LabelRandomly": "Выпадкова",
|
||||
@@ -237,6 +243,8 @@
|
||||
"LabelShowAll": "Паказаць усё",
|
||||
"LabelSize": "Памер",
|
||||
"LabelSleepTimer": "Таймер сну",
|
||||
"LabelSleepTimerAlmostDoneChime": "Праіграйце звонак, калі амаль скончана",
|
||||
"LabelSleepTimerAlmostDoneChimeHelp": "Памякчыць звонак, калі на таймеры сну застанецца 30 секунд",
|
||||
"LabelStart": "Пачаць",
|
||||
"LabelStartTime": "Час пачатку",
|
||||
"LabelStatsBestDay": "Лепшы дзень",
|
||||
@@ -252,6 +260,7 @@
|
||||
"LabelTag": "Метка",
|
||||
"LabelTags": "Меткі",
|
||||
"LabelTheme": "Тэма",
|
||||
"LabelThemeBlack": "Чорны",
|
||||
"LabelThemeDark": "Цёмная",
|
||||
"LabelThemeLight": "Светлая",
|
||||
"LabelTimeRemaining": "Засталося {0}",
|
||||
@@ -309,12 +318,16 @@
|
||||
"MessageNoItems": "Няма элементаў",
|
||||
"MessageNoItemsFound": "Элементы не знойдзены",
|
||||
"MessageNoListeningSessions": "Няма сеансаў праслухоўвання",
|
||||
"MessageNoLogs": "Няма журналаў",
|
||||
"MessageNoMediaFolders": "Няма тэчак з медыя",
|
||||
"MessageNoNetworkConnection": "Няма падлучэння да сеткі",
|
||||
"MessageNoPodcastsFound": "Падкасты не знойдзены",
|
||||
"MessageNoSeries": "Няма серый",
|
||||
"MessageNoUpdatesWereNecessary": "Абнаўленні не патрабаваліся",
|
||||
"MessageNoUserPlaylists": "У вас няма спісаў прайгравання",
|
||||
"MessageOldServerAuthReLoginRequired": "Аўтэнтыфікацыя была палепшана для бяспекі ў серверы v2.26.0. Усім карыстальнікам патрабуецца паўторна ўвайсці ў сістэму.",
|
||||
"MessageOldServerAuthWarning": "Сервер выкарыстоўвае састарэлую аўтэнтыфікацыю",
|
||||
"MessageOldServerAuthWarningHelp": "Гэты сервер працуе пад версіяй, старэйшай за 2.26.0. У версіі 2.26.0 была дададзена больш бяспечная сістэма аўтэнтыфікацыі. Настойліва рэкамендуецца абнавіць сервер да апошняй версіі. Калі вы ўжо абнавілі сервер, увайдзіце зноў, каб выкарыстоўваць новую аўтэнтыфікацыю.",
|
||||
"MessageOldServerConnectionWarning": "Канфігурацыя падлучэння да сервера выкарыстоўвае стары ідэнтыфікатар карыстальніка. Калі ласка, выдаліце і зноў дадайце гэта падлучэнне да сервера.",
|
||||
"MessageOldServerConnectionWarningHelp": "Вы першапачаткова наладзілі падключэнне да гэтага сервера да міграцыі базы даных у версіі 2.3.0, якая выйшла ў чэрвені 2023 года. У будучым абнаўленні сервера магчымасць уваходу праз гэтае старое падключэнне будзе выдалена. Калі ласка, выдаліце існуючае падключэнне да сервера і падключыцеся зноў (выкарыстоўваючы той жа адрас сервера і ўліковыя даныя). Калі на гэтай прыладзе ёсць спампаваныя медыяфайлы, іх трэба будзе спампаваць зноў для сінхранізацыі з серверам.",
|
||||
"MessagePodcastSearchField": "Увядзіце пошукавы запыт або URL RSS-стужкі",
|
||||
|
||||
+16
-1
@@ -6,6 +6,7 @@
|
||||
"ButtonCancel": "Отказ",
|
||||
"ButtonCancelTimer": "Отмени Таймер",
|
||||
"ButtonClearFilter": "Изчисти филтър",
|
||||
"ButtonClearLogs": "Изчисти логове",
|
||||
"ButtonCloseFeed": "Затвори стената",
|
||||
"ButtonCollections": "Колекции",
|
||||
"ButtonConnect": "Свържи се",
|
||||
@@ -26,7 +27,9 @@
|
||||
"ButtonLatest": "Последни",
|
||||
"ButtonLibrary": "Библиотека",
|
||||
"ButtonLocalMedia": "Локална медия",
|
||||
"ButtonLogs": "Логове",
|
||||
"ButtonManageLocalFiles": "Управление на локални файлове",
|
||||
"ButtonMaskServerAddress": "Маскирай адреса на сървърът",
|
||||
"ButtonNewFolder": "Създай нова папка",
|
||||
"ButtonNextEpisode": "Следващ епизод",
|
||||
"ButtonOk": "Приемам",
|
||||
@@ -50,6 +53,7 @@
|
||||
"ButtonStream": "Стрийм",
|
||||
"ButtonSubmit": "Изпрати",
|
||||
"ButtonSwitchServerUser": "Смени сървър/потребител",
|
||||
"ButtonUnmaskServerAddress": "Демаскирай адреса на съвърът",
|
||||
"ButtonUserStats": "Потребителски статистики",
|
||||
"ButtonYes": "Да",
|
||||
"HeaderAccount": "Профил",
|
||||
@@ -111,7 +115,7 @@
|
||||
"LabelBooks": "Книги",
|
||||
"LabelChapterTrack": "Трак на глава",
|
||||
"LabelChapters": "Глави",
|
||||
"LabelClosePlayer": "Затвори",
|
||||
"LabelClosePlayer": "Затвори плейъра",
|
||||
"LabelCollapseSeries": "Скрий сериите",
|
||||
"LabelComplete": "Приключено",
|
||||
"LabelContinueBooks": "Продължи книги",
|
||||
@@ -142,6 +146,7 @@
|
||||
"LabelEndOfChapter": "Край на глава",
|
||||
"LabelEndTime": "Оставащо време",
|
||||
"LabelEpisode": "Епизод",
|
||||
"LabelExplicit": "Експлицитно",
|
||||
"LabelFeedURL": "URL на емисия",
|
||||
"LabelFile": "Файл",
|
||||
"LabelFileBirthtime": "Дата на създаване на файла",
|
||||
@@ -216,6 +221,7 @@
|
||||
"LabelPublishedDate": "Публикувани {0}",
|
||||
"LabelRSSFeedCustomOwnerEmail": "Персонализиран имейл на собственика",
|
||||
"LabelRSSFeedCustomOwnerName": "Персонализирано име на собственика",
|
||||
"LabelRSSFeedOpen": "RSS Feed е отворен",
|
||||
"LabelRSSFeedPreventIndexing": "Предотвратете индексиране",
|
||||
"LabelRSSFeedSlug": "идентификатор на RSS емисия",
|
||||
"LabelRandomly": "Случайно",
|
||||
@@ -237,6 +243,8 @@
|
||||
"LabelShowAll": "Покажи всички",
|
||||
"LabelSize": "Размер",
|
||||
"LabelSleepTimer": "Таймер за изключване",
|
||||
"LabelSleepTimerAlmostDoneChime": "Възпроизведи звуков сигнал малко преди да приключи",
|
||||
"LabelSleepTimerAlmostDoneChimeHelp": "Възпроизведи звуков сигнал, 30 секунди преди изтичане на таймера за заспиване",
|
||||
"LabelStart": "Старт",
|
||||
"LabelStartTime": "Време на стартиране",
|
||||
"LabelStatsBestDay": "Най-добър ден",
|
||||
@@ -252,6 +260,7 @@
|
||||
"LabelTag": "Таг",
|
||||
"LabelTags": "Тагове",
|
||||
"LabelTheme": "Тема",
|
||||
"LabelThemeBlack": "Черен",
|
||||
"LabelThemeDark": "Тъмна",
|
||||
"LabelThemeLight": "Светла",
|
||||
"LabelTimeRemaining": "{0} оставащи",
|
||||
@@ -289,6 +298,7 @@
|
||||
"MessageDownloading": "Сваляне...",
|
||||
"MessageDownloadingEpisode": "Сваля епизод",
|
||||
"MessageEpisodesQueuedForDownload": "{0} Епизод(и) са сложени за сваляне",
|
||||
"MessageFailedToRefreshToken": "Неуспешно опресняване на токена, налага се да се впишете отново",
|
||||
"MessageFeedURLWillBe": "Адресът на емисията ще бъде {0}",
|
||||
"MessageFetching": "Извличане...",
|
||||
"MessageFollowTheProjectOnGithub": "Последвайте проекта в Github",
|
||||
@@ -296,6 +306,7 @@
|
||||
"MessageItemMissing": "Елементът липсва и трябва да бъде поправен на сървъра. Обикновено един елемент се маркира като липсващ, защото пътищата към файловете не са достъпни.",
|
||||
"MessageLoading": "Зарежда...",
|
||||
"MessageLoadingServerData": "Зарежда данни от сървъра...",
|
||||
"MessageLocalFolderDescription": "'Вътрешното хранилище на приложението' е достъпно само през това приложение. Това приложение поддържа само медийни файлове, изтеглени директно през него. Споделените папки за съхранение могат да се използват, за да се позволи на други приложения да имат достъп до медийните файлове, изтеглени чрез това приложение.",
|
||||
"MessageMarkAsFinished": "Маркирай като завършено",
|
||||
"MessageMediaLinkedToADifferentServer": "Медията е свързана със сървър на Audiobookshelf на различен адрес ({0}). Напредъкът ще бъде синхронизиран, когато се свържете с този сървърен адрес.",
|
||||
"MessageMediaLinkedToADifferentUser": "Медията е свързана с този сървър, но е изтеглена от друг потребител. Напредъкът ще бъде синхронизиран само с потребителя, който я е изтеглил.",
|
||||
@@ -308,12 +319,16 @@
|
||||
"MessageNoItems": "Няма елементи",
|
||||
"MessageNoItemsFound": "Няма намерени елементи",
|
||||
"MessageNoListeningSessions": "Няма сесии за слушане",
|
||||
"MessageNoLogs": "Няма логове",
|
||||
"MessageNoMediaFolders": "Няма медии папки",
|
||||
"MessageNoNetworkConnection": "Няма връзка с интернет",
|
||||
"MessageNoPodcastsFound": "Няма намерени подкасти",
|
||||
"MessageNoSeries": "Няма серии",
|
||||
"MessageNoUpdatesWereNecessary": "Няма нужда от обновяване",
|
||||
"MessageNoUserPlaylists": "Нямате създадени плейлисти",
|
||||
"MessageOldServerAuthReLoginRequired": "За осигуряването на по-добра сигурност, автентикация беше подобрена във v.2.26.0. Всеки потребител ще трябва да се автентикира наново.",
|
||||
"MessageOldServerAuthWarning": "Сървърът използва остаряла форма на автентикация",
|
||||
"MessageOldServerAuthWarningHelp": "Този сървър е на версия, която е по-стара от v2.26.0. Във версия v2.26.0 беше добавена по-сигурна автентикация. Силно е препоръчително да обновите сървъра до последната версия. Аковече сте обновили сървъра, влезде наново, за да ползвате новата автентикация.",
|
||||
"MessageOldServerConnectionWarning": "Конфигурацията за връзка със сървъра използва старо потребителско ID. Моля, изтрийте и добавете отново тази връзка със сървъра.",
|
||||
"MessageOldServerConnectionWarningHelp": "Първоначално сте настроили връзката към този сървър преди миграцията на базата данни във версия 2.3.0, пусната през юни 2023 г. Бъдеща актуализация на сървъра ще премахне възможността за влизане с тази стара връзка. Моля, изтрийте съществуващата връзка със сървъра и се свържете отново (използвайки същия сървърен адрес и идентификационни данни). Ако имате изтеглена медия на това устройство, тя ще трябва да бъде изтеглена отново, за да се синхронизира със сървъра.",
|
||||
"MessagePodcastSearchField": "Въведи какво да търся или RSS емисия адрес",
|
||||
|
||||
+28
-13
@@ -1,19 +1,20 @@
|
||||
{
|
||||
"ButtonAdd": "Afegir",
|
||||
"ButtonAddNewServer": "Afegir un nou servidor",
|
||||
"ButtonAdd": "Afegeix",
|
||||
"ButtonAddNewServer": "Afegeix un servidor nou",
|
||||
"ButtonAuthors": "Autors",
|
||||
"ButtonBack": "Enrere",
|
||||
"ButtonCancel": "Cancel·lar",
|
||||
"ButtonCancelTimer": "Cancel·lar el temporitzador",
|
||||
"ButtonClearFilter": "Eliminar filtres",
|
||||
"ButtonCloseFeed": "Tancar font",
|
||||
"ButtonCancel": "Cancel·la",
|
||||
"ButtonCancelTimer": "Cancel·la el temporitzador",
|
||||
"ButtonClearFilter": "Neteja el filtre",
|
||||
"ButtonClearLogs": "Neteja els registres",
|
||||
"ButtonCloseFeed": "Tanca el canal",
|
||||
"ButtonCollections": "Col·leccions",
|
||||
"ButtonConnect": "Connectar",
|
||||
"ButtonConnectToServer": "Connectar al servidor",
|
||||
"ButtonCreate": "Crear",
|
||||
"ButtonConnect": "Connecta",
|
||||
"ButtonConnectToServer": "Connecta al servidor",
|
||||
"ButtonCreate": "Crea",
|
||||
"ButtonCreateBookmark": "Crear marcador",
|
||||
"ButtonCreateNewPlaylist": "Crear una nova llista de reproducció",
|
||||
"ButtonDelete": "Eliminar",
|
||||
"ButtonDelete": "Suprimeix",
|
||||
"ButtonDeleteLocalEpisode": "Esborrar episodi local",
|
||||
"ButtonDeleteLocalFile": "Esborrar fitxer local",
|
||||
"ButtonDeleteLocalItem": "Esborrar element local",
|
||||
@@ -26,7 +27,9 @@
|
||||
"ButtonLatest": "Últims",
|
||||
"ButtonLibrary": "Biblioteca",
|
||||
"ButtonLocalMedia": "Mitjans locals",
|
||||
"ButtonLogs": "Registres",
|
||||
"ButtonManageLocalFiles": "Gestionar fitxers locals",
|
||||
"ButtonMaskServerAddress": "Emmascara l'adreça del servidor",
|
||||
"ButtonNewFolder": "Nova carpeta",
|
||||
"ButtonNextEpisode": "Pròxim episodi",
|
||||
"ButtonOk": "D’acord",
|
||||
@@ -50,6 +53,7 @@
|
||||
"ButtonStream": "En directe",
|
||||
"ButtonSubmit": "Enviar",
|
||||
"ButtonSwitchServerUser": "Canviar servidor/usuari",
|
||||
"ButtonUnmaskServerAddress": "Desemmascara l'adreça del servidor",
|
||||
"ButtonUserStats": "Estadístiques de l'usuari",
|
||||
"ButtonYes": "Sí",
|
||||
"HeaderAccount": "Compte",
|
||||
@@ -88,7 +92,7 @@
|
||||
"HeaderTableOfContents": "Sumari",
|
||||
"HeaderUserInterfaceSettings": "Paràmetres de la interfície d'usuari",
|
||||
"HeaderYourStats": "Les vostres estadístiques",
|
||||
"LabelAddToPlaylist": "Afegit a la llista de reproducció",
|
||||
"LabelAddToPlaylist": "Afegeix a la llista de reproducció",
|
||||
"LabelAddedAt": "Afegit a",
|
||||
"LabelAddedDate": "Afegits {0}",
|
||||
"LabelAll": "Tots",
|
||||
@@ -142,6 +146,7 @@
|
||||
"LabelEpisode": "Episodi",
|
||||
"LabelFeedURL": "Font URL",
|
||||
"LabelFile": "Fitxer",
|
||||
"LabelFileBirthtime": "Fitxer creat a",
|
||||
"LabelFileModified": "Fitxer modificat",
|
||||
"LabelFilename": "Nom del fitxer",
|
||||
"LabelFinished": "Acabat",
|
||||
@@ -194,9 +199,12 @@
|
||||
"LabelPlaybackSpeed": "Velocitat de reproducció",
|
||||
"LabelPodcast": "Pòdcast",
|
||||
"LabelPodcasts": "Pòdcasts",
|
||||
"LabelPreventIndexing": "Evita que el vostre canal l'indexin els directoris de pòdcasts de l'iTunes i Google",
|
||||
"LabelProgress": "Progrés",
|
||||
"LabelPubDate": "Data de publicació",
|
||||
"LabelPublishYear": "Any de publicació",
|
||||
"LabelRSSFeedPreventIndexing": "Evita la indexació",
|
||||
"LabelRSSFeedSlug": "URL semàntic del canal RSS",
|
||||
"LabelRandomly": "A l'atzar",
|
||||
"LabelRead": "Llegit",
|
||||
"LabelReadAgain": "Tornar a llegir",
|
||||
@@ -204,7 +212,7 @@
|
||||
"LabelRecentlyAdded": "Addicions recents",
|
||||
"LabelRemoveFromPlaylist": "Eliminar de la llista de reproducció",
|
||||
"LabelSelectADevice": "Seleccioneu un dispositiu",
|
||||
"LabelSeries": "Sèries",
|
||||
"LabelSeries": "Sèrie",
|
||||
"LabelServerAddress": "Adreça del servidor",
|
||||
"LabelShowAll": "Mostra-ho tot",
|
||||
"LabelSize": "Mida",
|
||||
@@ -242,6 +250,7 @@
|
||||
"MessageDownloadCompleteProcessing": "S'ha completat la baixada. S'està processant...",
|
||||
"MessageDownloading": "S'està baixant...",
|
||||
"MessageDownloadingEpisode": "S'està baixant l'episodi",
|
||||
"MessageFeedURLWillBe": "L'URL del canal serà {0}",
|
||||
"MessageFetching": "S'està recuperant...",
|
||||
"MessageFollowTheProjectOnGithub": "Seguiu el projecte al GitHub",
|
||||
"MessageLoading": "S'està carregant...",
|
||||
@@ -254,15 +263,21 @@
|
||||
"MessageNoItems": "Cap element",
|
||||
"MessageNoItemsFound": "Cap element trobat",
|
||||
"MessageNoListeningSessions": "Cap sessió d'escolta",
|
||||
"MessageNoLogs": "Cap registre",
|
||||
"MessageNoMediaFolders": "Cap carpeta multimèdia",
|
||||
"MessageNoNetworkConnection": "Cap connexió de xarxa",
|
||||
"MessageNoPodcastsFound": "No s'ha trobat cap pòdcast",
|
||||
"MessageNoSeries": "Cap sèrie",
|
||||
"MessageNoUpdatesWereNecessary": "No calia cap actualització",
|
||||
"MessageNoUserPlaylists": "No teniu cap llista de reproducció",
|
||||
"MessagePodcastSearchField": "Introduïu el terme de cerca o l'URL del canal RSS",
|
||||
"NoteRSSFeedPodcastAppsHttps": "Avís: la majoria d'aplicacions de pòdcast requereixen que l'URL del canal RSS utilitzi HTTPS",
|
||||
"NoteRSSFeedPodcastAppsPubDate": "Avís: un o més dels vostres episodis no tenen data de publicació. Algunes aplicacions de pòdcast ho requereixen.",
|
||||
"ToastItemMarkedAsFinishedFailed": "No s'ha pogut marcar com a finalitzat",
|
||||
"ToastItemMarkedAsNotFinishedFailed": "No s'ha pogut marcar com a no finalitzat",
|
||||
"ToastPlaylistCreateFailed": "No s'ha pogut crear la llista de reproducció",
|
||||
"ToastPodcastCreateFailed": "No s'ha pogut crear el pòdcast",
|
||||
"ToastPodcastCreateSuccess": "S'ha creat el pòdcast correctament"
|
||||
"ToastPodcastCreateSuccess": "S'ha creat el pòdcast correctament",
|
||||
"ToastRSSFeedCloseFailed": "No s'ha pogut tancar el canal RSS",
|
||||
"ToastRSSFeedCloseSuccess": "Canal RSS tancat"
|
||||
}
|
||||
|
||||
+33
-4
@@ -6,6 +6,7 @@
|
||||
"ButtonCancel": "Zrušit",
|
||||
"ButtonCancelTimer": "Zrušit časovač",
|
||||
"ButtonClearFilter": "Vymazat filtr",
|
||||
"ButtonClearLogs": "Vyčistit logy",
|
||||
"ButtonCloseFeed": "Zavřít kanál",
|
||||
"ButtonCollections": "Kolekce",
|
||||
"ButtonConnect": "Připojit",
|
||||
@@ -26,7 +27,9 @@
|
||||
"ButtonLatest": "Nejnovější",
|
||||
"ButtonLibrary": "Knihovna",
|
||||
"ButtonLocalMedia": "Místní média",
|
||||
"ButtonLogs": "Logy",
|
||||
"ButtonManageLocalFiles": "Spravovat místní soubory",
|
||||
"ButtonMaskServerAddress": "Skrýt adresu serveru",
|
||||
"ButtonNewFolder": "Nová složka",
|
||||
"ButtonNextEpisode": "Další epizoda",
|
||||
"ButtonOk": "Ok",
|
||||
@@ -50,6 +53,7 @@
|
||||
"ButtonStream": "Streamovat",
|
||||
"ButtonSubmit": "Odeslat",
|
||||
"ButtonSwitchServerUser": "Přepnout server/uživatele",
|
||||
"ButtonUnmaskServerAddress": "Odkrýt adresu serveru",
|
||||
"ButtonUserStats": "Statistiky uživatele",
|
||||
"ButtonYes": "Ano",
|
||||
"HeaderAccount": "Účet",
|
||||
@@ -66,7 +70,7 @@
|
||||
"HeaderEbookFiles": "Soubory e-knih",
|
||||
"HeaderEpisodes": "Epizody",
|
||||
"HeaderEreaderSettings": "Nastavení čtečky e-knih",
|
||||
"HeaderLatestEpisodes": "Nejnovější epizody",
|
||||
"HeaderLatestEpisodes": "Nové epizody",
|
||||
"HeaderLibraries": "Knihovny",
|
||||
"HeaderLocalFolders": "Místní složky",
|
||||
"HeaderLocalLibraryItems": "Místní položky knihovny",
|
||||
@@ -75,7 +79,7 @@
|
||||
"HeaderPlaybackSettings": "Nastavení přehrávání",
|
||||
"HeaderPlaylist": "Seznam skladeb",
|
||||
"HeaderPlaylistItems": "Položky seznamu přehrávání",
|
||||
"HeaderProgressSyncFailed": "Chyba při synchronizaci",
|
||||
"HeaderProgressSyncFailed": "Chyba při synchronizaci pokroku",
|
||||
"HeaderRSSFeed": "RSS kanál",
|
||||
"HeaderRSSFeedGeneral": "Detaily RSS",
|
||||
"HeaderRSSFeedIsOpen": "Kanál RSS je otevřen",
|
||||
@@ -94,6 +98,9 @@
|
||||
"LabelAll": "Vše",
|
||||
"LabelAllowSeekingOnMediaControls": "Povolit vyhledávání polohy v ovládacích prvcích oznámení médií",
|
||||
"LabelAlways": "Vždy",
|
||||
"LabelAndroidAutoBrowseLimitForGrouping": "Omezení abecedního rozbalovacího seznamu",
|
||||
"LabelAndroidAutoBrowseLimitForGroupingHelp": "Nepoužívejte abecední řazení, pokud je k zobrazení méně než tento počet položek",
|
||||
"LabelAndroidAutoBrowseSeriesSequenceOrder": "Řazení sérií knih",
|
||||
"LabelAskConfirmation": "Požádat o potvrzení",
|
||||
"LabelAuthor": "Autor",
|
||||
"LabelAuthorFirstLast": "Autor (jméno a příjmení)",
|
||||
@@ -134,11 +141,12 @@
|
||||
"LabelEbooks": "E-knihy",
|
||||
"LabelEnable": "Povolit",
|
||||
"LabelEnableMp3IndexSeeking": "Povolit indexové vyhledávání mp3",
|
||||
"LabelEnableMp3IndexSeekingHelp": "Toto nastavení by mělo být povoleno pouze v případě, že soubory MP3 nejsou správně vyhledávány. Nepřesné vyhledávání je s největší pravděpodobností způsobeno soubory MP3 s proměnlivým datovým tokem (VBR). Toto nastavení vynutí indexové vyhledávání, při kterém se při čtení souboru vytváří mapování času na bajty. V některých případech u velkých souborů MP3 dochází ke zpoždění při vyhledávání ke konci souboru.",
|
||||
"LabelEnableMp3IndexSeekingHelp": "Toto nastavení by mělo být povoleno pouze v případě, že v souborech MP3 nelze přeskakovat. Nepřesné přeskakování je s největší pravděpodobností způsobeno soubory MP3 s proměnlivým datovým tokem (VBR). Toto nastavení vynutí indexové vyhledávání, při kterém se při čtení souboru vytváří mapování času na bajty. V některých případech u velkých souborů MP3 dochází ke zpoždění při vyhledávání ke konci souboru.",
|
||||
"LabelEnd": "Konec",
|
||||
"LabelEndOfChapter": "Konec kapitoly",
|
||||
"LabelEndTime": "Do",
|
||||
"LabelEpisode": "Epizoda",
|
||||
"LabelExplicit": "Explicitně",
|
||||
"LabelFeedURL": "URL kanálu",
|
||||
"LabelFile": "Soubor",
|
||||
"LabelFileBirthtime": "Čas vytvoření souboru",
|
||||
@@ -161,6 +169,7 @@
|
||||
"LabelInternalAppStorage": "Interní úložiště aplikace",
|
||||
"LabelJumpBackwardsTime": "Délka skoku zpět v čase",
|
||||
"LabelJumpForwardsTime": "Délka skoku vpřed v čase",
|
||||
"LabelKeepScreenAwake": "Nezhasínat obrazovku",
|
||||
"LabelLanguage": "Jazyk",
|
||||
"LabelLayout": "Rozvržení",
|
||||
"LabelLayoutAuto": "Automatické",
|
||||
@@ -175,6 +184,7 @@
|
||||
"LabelLow": "Nízké",
|
||||
"LabelMediaType": "Typ média",
|
||||
"LabelMedium": "Střední",
|
||||
"LabelMissing": "Chybějící",
|
||||
"LabelMore": "Více",
|
||||
"LabelMoreInfo": "Více informací",
|
||||
"LabelName": "Jméno",
|
||||
@@ -192,6 +202,8 @@
|
||||
"LabelNotFinished": "Nedokončeno",
|
||||
"LabelNotStarted": "Nezahájeno",
|
||||
"LabelNumEpisodes": "{0} epizod",
|
||||
"LabelNumEpisodesIncomplete": "{0} epizod, {1} nekompletní",
|
||||
"LabelNumberOfEpisodes": "Počet epizod",
|
||||
"LabelOff": "Vypnout",
|
||||
"LabelOn": "Zapnuto",
|
||||
"LabelPassword": "Heslo",
|
||||
@@ -209,6 +221,7 @@
|
||||
"LabelPublishedDate": "Vydáno {0}",
|
||||
"LabelRSSFeedCustomOwnerEmail": "Vlastní e-mail vlastníka",
|
||||
"LabelRSSFeedCustomOwnerName": "Vlastní jméno vlastníka",
|
||||
"LabelRSSFeedOpen": "RSS kanál otevřen",
|
||||
"LabelRSSFeedPreventIndexing": "Zabránit indexování",
|
||||
"LabelRSSFeedSlug": "Klíčové slovo kanálu RSS",
|
||||
"LabelRandomly": "Náhodně",
|
||||
@@ -220,6 +233,8 @@
|
||||
"LabelScaleElapsedTimeBySpeed": "Škálovat uplynulý čas podle rychlosti",
|
||||
"LabelSeason": "Sezóna",
|
||||
"LabelSelectADevice": "Vyberte zařízení",
|
||||
"LabelSequenceAscending": "Řadit vzestupně",
|
||||
"LabelSequenceDescending": "Řadit sestupně",
|
||||
"LabelSeries": "Série",
|
||||
"LabelServerAddress": "Adresa serveru",
|
||||
"LabelSetEbookAsPrimary": "Nastavit jako primární",
|
||||
@@ -228,6 +243,8 @@
|
||||
"LabelShowAll": "Zobrazit vše",
|
||||
"LabelSize": "Velikost",
|
||||
"LabelSleepTimer": "Spánek po",
|
||||
"LabelSleepTimerAlmostDoneChime": "Přehrát zvukové upozornění téměř před dokončením",
|
||||
"LabelSleepTimerAlmostDoneChimeHelp": "Přehrát zvukové upozornění 30 sekund před uplynutím časovače spánku",
|
||||
"LabelStart": "Spustit",
|
||||
"LabelStartTime": "Od",
|
||||
"LabelStatsBestDay": "Nejlepší den",
|
||||
@@ -243,6 +260,7 @@
|
||||
"LabelTag": "Štítek",
|
||||
"LabelTags": "Štítky",
|
||||
"LabelTheme": "Téma",
|
||||
"LabelThemeBlack": "Černé",
|
||||
"LabelThemeDark": "Tmavé",
|
||||
"LabelThemeLight": "Světlé",
|
||||
"LabelTimeRemaining": "{0} zbývá",
|
||||
@@ -269,6 +287,7 @@
|
||||
"MessageBookshelfEmpty": "Knihovna je prázdná",
|
||||
"MessageConfirmDeleteLocalEpisode": "Odebrat místní epizodu „{0}“ ze zařízení? Soubor na serveru zůstane nezměněný.",
|
||||
"MessageConfirmDeleteLocalFiles": "Odebrat místní soubory této položky ze zařízení? Soubory na serveru a váš pokrok nebudou ovlivněny.",
|
||||
"MessageConfirmDisableAutoTimer": "Určitě chcete vypnout automatický časovač pro zbytek dnešního dne? Časovač bude opět aktivován po uběhnutí doby automatického spánku nebo po restartování aplikace.",
|
||||
"MessageConfirmDiscardProgress": "Opravdu chcete zahodit svůj pokrok?",
|
||||
"MessageConfirmDownloadUsingCellular": "Chystáte se stahovat přes mobilní data. Toto může zahrnovat poplatky za mobilní data. Chcete pokračovat?",
|
||||
"MessageConfirmMarkAsFinished": "Opravdu chcete tuto položku označit jako dokončenou?",
|
||||
@@ -279,12 +298,15 @@
|
||||
"MessageDownloading": "Stahuje se...",
|
||||
"MessageDownloadingEpisode": "Stahuji epizodu",
|
||||
"MessageEpisodesQueuedForDownload": "{0} Epizody zařazené do fronty ke stažení",
|
||||
"MessageFailedToRefreshToken": "Nepovedlo se obnovit token, je nutné se znovu přihlásit",
|
||||
"MessageFeedURLWillBe": "URL zdroje bude {0}",
|
||||
"MessageFetching": "Načítání...",
|
||||
"MessageFollowTheProjectOnGithub": "Sledujte projekt na GitHubu",
|
||||
"MessageItemDownloadCompleteFailedToCreate": "Stahování položky bylo dokončeno, ale nepodařilo se vytvořit položku v knihovně",
|
||||
"MessageItemMissing": "Položka chybí a musí být opravena na serveru. Typicky je položka označena jako chybějící, protože cesty k souborům nejsou přístupné.",
|
||||
"MessageLoading": "Načítá se...",
|
||||
"MessageLoadingServerData": "Načítání dat ze serveru...",
|
||||
"MessageLocalFolderDescription": "„Interní úložiště aplikace“ je přístupné pouze této aplikaci. Tato aplikace podporuje pouze média stažená přímo prostřednictvím aplikace. Složky sdíleného úložiště lze použít k tomu, aby ostatní aplikace měly přístup k médiím staženým touto aplikací.",
|
||||
"MessageMarkAsFinished": "Označit jako dokončené",
|
||||
"MessageMediaLinkedToADifferentServer": "Média jsou propojena se serverem Audiobookshelf na jiné adrese ({0}). Pokrok bude synchronizován, když budete připojeni k této adrese serveru.",
|
||||
"MessageMediaLinkedToADifferentUser": "Média jsou propojena se serverem, ale byla stažena jiným uživatelem. Pokrok bude synchronizován pouze s uživatelem, který je stáhl.",
|
||||
@@ -297,16 +319,23 @@
|
||||
"MessageNoItems": "Žádné položky",
|
||||
"MessageNoItemsFound": "Nebyly nalezeny žádné položky",
|
||||
"MessageNoListeningSessions": "Žádné poslechové relace",
|
||||
"MessageNoLogs": "Žádné záznamy událostí",
|
||||
"MessageNoMediaFolders": "Žádné složky médií",
|
||||
"MessageNoNetworkConnection": "Žádné připojení k síti",
|
||||
"MessageNoPodcastsFound": "Nebyly nalezeny žádné podcasty",
|
||||
"MessageNoSeries": "Žádné série",
|
||||
"MessageNoUpdatesWereNecessary": "Nebyly nutné žádné aktualizace",
|
||||
"MessageNoUserPlaylists": "Nemáte žádné seznamy skladeb",
|
||||
"MessageOldServerAuthReLoginRequired": "V rámci aktualizace serveru v2.26.0 bylo vylepšeno zabezpečení autentizace. Všichni uživatelé se musí znovu přihlásit.",
|
||||
"MessageOldServerAuthWarning": "Server používá zastaralou autentizaci",
|
||||
"MessageOldServerAuthWarningHelp": "Server běží na verzi starší než v2.26.0. Bezpečnější způsob autentizace byl přidán ve verzi v2.26.0. Důrazně se doporučuje aktualizovat server na nejnovější verzi. Pokud jste již server aktualizovali, znovu se přihlašte pro použití nové autentizace.",
|
||||
"MessageOldServerConnectionWarning": "Konfigurace připojení k serveru používá staré ID uživatele. Odstraňte a znovu přidejte toto připojení k serveru.",
|
||||
"MessageOldServerConnectionWarningHelp": "Připojení k tomuto serveru jste původně nastavili před migrací databáze ve verzi 2.3.0 vydané v červnu 2023. Budoucí aktualizace serveru odstraní možnost přihlášení pomocí tohoto starého připojení. Odstraňte prosím stávající připojení k serveru a připojte se znovu (pomocí stejné adresy serveru a přihlašovacích údajů). Pokud máte v tomto zařízení stažená média, bude nutné je pro synchronizaci se serverem stáhnout znovu.",
|
||||
"MessagePodcastSearchField": "Zadejte hledaný pojem pro RSS feed URL",
|
||||
"MessageProgressSyncFailed": "Poslední pokus o nahlášení průběhu poslechu na server se nezdařil. Během přehrávání médií se budou požadavky na synchronizaci pokroku nadále pokoušet každých 15 až 60 sekund.",
|
||||
"MessageReportBugsAndContribute": "Nahlašte chyby, vyžádejte si funkce a přispěte na",
|
||||
"MessageSeriesAlreadyDownloaded": "Všechny knihy v této sérii jste již stáhli.",
|
||||
"MessageSeriesDownloadConfirm": "Stáhnout chybějící {0} knihu(y) s {1} souborem(y), celkem {2} do složky {3}?",
|
||||
"MessageSeriesDownloadConfirm": "Stáhnout {0} chybějících knih s {1} souborem/soubory, celkem {2}, do složky {3}?",
|
||||
"MessageSeriesDownloadConfirmIos": "Stáhnout chybějící {0} knihu(y) s {1} souborem(y), celkem {2}?",
|
||||
"MessageSocketConnectedOverMeteredCellular": "Socket připojen přes měřenou mobilní síť",
|
||||
"MessageSocketConnectedOverMeteredWifi": "Socket připojen přes měřenou Wi-Fi",
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"ButtonCancel": "Annuller",
|
||||
"ButtonCancelTimer": "Stop timer",
|
||||
"ButtonClearFilter": "Ryd filter",
|
||||
"ButtonClearLogs": "Rens Logfiler",
|
||||
"ButtonCloseFeed": "Luk feed",
|
||||
"ButtonCollections": "Samlinger",
|
||||
"ButtonConnect": "Forbind",
|
||||
@@ -26,7 +27,9 @@
|
||||
"ButtonLatest": "Seneste",
|
||||
"ButtonLibrary": "Bibliotek",
|
||||
"ButtonLocalMedia": "Lokalt medie",
|
||||
"ButtonLogs": "Logfiler",
|
||||
"ButtonManageLocalFiles": "Administrér Lokale Filer",
|
||||
"ButtonMaskServerAddress": "Maskér server adresse",
|
||||
"ButtonNewFolder": "Ny Folder",
|
||||
"ButtonNextEpisode": "Næste Afsnit",
|
||||
"ButtonOk": "Ok",
|
||||
@@ -50,6 +53,7 @@
|
||||
"ButtonStream": "Stream",
|
||||
"ButtonSubmit": "Send",
|
||||
"ButtonSwitchServerUser": "Skift Server/Bruger",
|
||||
"ButtonUnmaskServerAddress": "Afmaskér server adresse",
|
||||
"ButtonUserStats": "Bruger statitstik",
|
||||
"ButtonYes": "Ja",
|
||||
"HeaderAccount": "Konto",
|
||||
@@ -142,6 +146,7 @@
|
||||
"LabelEndOfChapter": "Slutningen af kapitel",
|
||||
"LabelEndTime": "Sluttidspunkt",
|
||||
"LabelEpisode": "Afsnit",
|
||||
"LabelExplicit": "Eksplisit",
|
||||
"LabelFeedURL": "Feed URL",
|
||||
"LabelFile": "Fil",
|
||||
"LabelFileBirthtime": "Oprettelsestidspunkt for fil",
|
||||
@@ -216,6 +221,7 @@
|
||||
"LabelPublishedDate": "Publiceret {0}",
|
||||
"LabelRSSFeedCustomOwnerEmail": "Brugerdefineret ejerens e-mail",
|
||||
"LabelRSSFeedCustomOwnerName": "Brugerdefineret ejerens navn",
|
||||
"LabelRSSFeedOpen": "RSS-feed åbent",
|
||||
"LabelRSSFeedPreventIndexing": "Forhindrer indeksering",
|
||||
"LabelRSSFeedSlug": "RSS-feed-slug",
|
||||
"LabelRandomly": "Tilfældigt",
|
||||
@@ -237,6 +243,8 @@
|
||||
"LabelShowAll": "Vis alle",
|
||||
"LabelSize": "Størrelse",
|
||||
"LabelSleepTimer": "Søvntimer",
|
||||
"LabelSleepTimerAlmostDoneChime": "Afspil lyd når snart færdig",
|
||||
"LabelSleepTimerAlmostDoneChimeHelp": "Afspil lyd når sove timeren har 30 sekunder tilbage",
|
||||
"LabelStart": "Start",
|
||||
"LabelStartTime": "Starttid",
|
||||
"LabelStatsBestDay": "Bedste dag",
|
||||
@@ -310,12 +318,16 @@
|
||||
"MessageNoItems": "Ingen elementer",
|
||||
"MessageNoItemsFound": "Ingen elementer fundet",
|
||||
"MessageNoListeningSessions": "Ingen lyttesessioner",
|
||||
"MessageNoLogs": "Ingen logfiler",
|
||||
"MessageNoMediaFolders": "Ingen Mediemapper",
|
||||
"MessageNoNetworkConnection": "Ingen Internetforbindelse",
|
||||
"MessageNoPodcastsFound": "Ingen podcasts fundet",
|
||||
"MessageNoSeries": "Ingen serier",
|
||||
"MessageNoUpdatesWereNecessary": "Ingen opdateringer var nødvendige",
|
||||
"MessageNoUserPlaylists": "Du har ingen afspilningslister",
|
||||
"MessageOldServerAuthReLoginRequired": "Autentificering er blevet forbedret af sikkerhedsmæssige årsager i server v2.26.0. Alle brugere skal logge ind igen.",
|
||||
"MessageOldServerAuthWarning": "Serveren bruger forældet autentificering",
|
||||
"MessageOldServerAuthWarningHelp": "Denne server kører en version ældre end v2.26.0. Et mere sikkert autentificeringssystem blev tilføjet i v2.26.0. Det anbefales kraftigt at opdatere serveren til den nyeste version. Hvis du allerede har opdateret serveren, skal du logge ind igen for at bruge den nye autentificering.",
|
||||
"MessageOldServerConnectionWarning": "Server forbindelseskonfiguration anvender et gammelt bruger ID. Fjern venligst og gentilføj denne server forbindelse.",
|
||||
"MessageOldServerConnectionWarningHelp": "Du har oprindeligt sat forbindelsen til denne server op før databasemigreringen i 2.3.0, udgivet i juni 2023. En senere serveropdatering vil fjerne muligheden for at logge ind med genne gamle metode. Sørg venligst for at slette den eksisterende serverforbindelse og opret forbindelse igen (ved anvendelse af den samme server adresse og login oplysninger). Hvis du har downloaded noget medie på denne enhed vil dette være nødsaget til at bive downloaded igen efter serversynkronisering.",
|
||||
"MessagePodcastSearchField": "Indtast søgeterm eller RSS URL",
|
||||
|
||||
+25
-12
@@ -6,30 +6,33 @@
|
||||
"ButtonCancel": "Abbrechen",
|
||||
"ButtonCancelTimer": "Timer abbrechen",
|
||||
"ButtonClearFilter": "Filter löschen",
|
||||
"ButtonClearLogs": "Protokolle löschen",
|
||||
"ButtonCloseFeed": "Feed schließen",
|
||||
"ButtonCollections": "Sammlungen",
|
||||
"ButtonConnect": "Verbinden",
|
||||
"ButtonConnectToServer": "Mit Server verbinden",
|
||||
"ButtonCreate": "Erstellen",
|
||||
"ButtonCreateBookmark": "Erstelle Lesezeichen",
|
||||
"ButtonCreateNewPlaylist": "Erstelle neue Wiedergabeliste",
|
||||
"ButtonCreateBookmark": "Lesezeichen erstellen",
|
||||
"ButtonCreateNewPlaylist": "Neue Wiedergabeliste erstellen",
|
||||
"ButtonDelete": "Löschen",
|
||||
"ButtonDeleteLocalEpisode": "Lösche lokale Episode",
|
||||
"ButtonDeleteLocalFile": "Lösche lokale Datei",
|
||||
"ButtonDeleteLocalItem": "Lösche lokales Element",
|
||||
"ButtonDisableAutoTimer": "Deaktiviere automatischen Timer",
|
||||
"ButtonDeleteLocalEpisode": "Lokale Episode löschen",
|
||||
"ButtonDeleteLocalFile": "Lokale Datei löschen",
|
||||
"ButtonDeleteLocalItem": "Lokales Element löschen",
|
||||
"ButtonDisableAutoTimer": "Automatischen Timer deaktivieren",
|
||||
"ButtonDisconnect": "Trennen",
|
||||
"ButtonGoToWebClient": "Gehe zum Web Client",
|
||||
"ButtonHistory": "Historie",
|
||||
"ButtonGoToWebClient": "Gehe zum Webclient",
|
||||
"ButtonHistory": "Verlauf",
|
||||
"ButtonHome": "Startseite",
|
||||
"ButtonIssues": "Probleme",
|
||||
"ButtonLatest": "Neueste",
|
||||
"ButtonLibrary": "Bibliothek",
|
||||
"ButtonLocalMedia": "Lokale Medien",
|
||||
"ButtonManageLocalFiles": "Verwalte lokale Dateien",
|
||||
"ButtonLogs": "Protokolle",
|
||||
"ButtonManageLocalFiles": "Lokale Dateien verwalten",
|
||||
"ButtonMaskServerAddress": "Server Adresse verstecken",
|
||||
"ButtonNewFolder": "Neuer Ordner",
|
||||
"ButtonNextEpisode": "Nächste Episode",
|
||||
"ButtonOk": "Einverstanden",
|
||||
"ButtonOk": "Ok",
|
||||
"ButtonOpenFeed": "Feed öffnen",
|
||||
"ButtonOverride": "Überschreiben",
|
||||
"ButtonPause": "Pausieren",
|
||||
@@ -49,7 +52,8 @@
|
||||
"ButtonSetTimer": "Setze Timer",
|
||||
"ButtonStream": "Streamen",
|
||||
"ButtonSubmit": "Ok",
|
||||
"ButtonSwitchServerUser": "Wechsle Server/Benutzer",
|
||||
"ButtonSwitchServerUser": "Server/Benutzer wechseln",
|
||||
"ButtonUnmaskServerAddress": "Server Adresse anzeigen",
|
||||
"ButtonUserStats": "Nutzerstatistiken",
|
||||
"ButtonYes": "Ja",
|
||||
"HeaderAccount": "Konto",
|
||||
@@ -142,6 +146,7 @@
|
||||
"LabelEndOfChapter": "Ende des Kapitels",
|
||||
"LabelEndTime": "Endzeit",
|
||||
"LabelEpisode": "Episode",
|
||||
"LabelExplicit": "Explizit",
|
||||
"LabelFeedURL": "Feed-URL",
|
||||
"LabelFile": "Datei",
|
||||
"LabelFileBirthtime": "Datei erstellt",
|
||||
@@ -216,6 +221,7 @@
|
||||
"LabelPublishedDate": "Veröffentlicht {0}",
|
||||
"LabelRSSFeedCustomOwnerEmail": "Benutzerdefinierte Eigentümer-E-Mail",
|
||||
"LabelRSSFeedCustomOwnerName": "Benutzerdefinierter Name des Eigentümers",
|
||||
"LabelRSSFeedOpen": "RSS-Feed offen",
|
||||
"LabelRSSFeedPreventIndexing": "Indizierung verhindern",
|
||||
"LabelRSSFeedSlug": "RSS-Feed-Schlagwort",
|
||||
"LabelRandomly": "Zufällig",
|
||||
@@ -237,6 +243,8 @@
|
||||
"LabelShowAll": "Alles anzeigen",
|
||||
"LabelSize": "Größe",
|
||||
"LabelSleepTimer": "Schlummerfunktion",
|
||||
"LabelSleepTimerAlmostDoneChime": "Spiel ein Ton kurz vor dem Ende",
|
||||
"LabelSleepTimerAlmostDoneChimeHelp": "Spiel ein Ton wenn 30 Sekunden auf dem Timer verbleiben",
|
||||
"LabelStart": "Start",
|
||||
"LabelStartTime": "Startzeit",
|
||||
"LabelStatsBestDay": "Bester Tag",
|
||||
@@ -290,6 +298,7 @@
|
||||
"MessageDownloading": "Wird heruntergeladen …",
|
||||
"MessageDownloadingEpisode": "Episode herunterladen",
|
||||
"MessageEpisodesQueuedForDownload": "{0} Episode(n) in der Warteschlange zum Herunterladen",
|
||||
"MessageFailedToRefreshToken": "Aktualisierung des Tokens fehlgeschlagen, erneute Anmeldung erforderlich",
|
||||
"MessageFeedURLWillBe": "Feed-URL wird {0} sein",
|
||||
"MessageFetching": "Wird abgerufen …",
|
||||
"MessageFollowTheProjectOnGithub": "Folge dem Projekt auf GitHub",
|
||||
@@ -310,12 +319,16 @@
|
||||
"MessageNoItems": "Keine Medien",
|
||||
"MessageNoItemsFound": "Keine Medien gefunden",
|
||||
"MessageNoListeningSessions": "Keine Hörsitzungen",
|
||||
"MessageNoMediaFolders": "Keine Medien Ordner",
|
||||
"MessageNoLogs": "Keine Protokolle",
|
||||
"MessageNoMediaFolders": "Keine Medien-Ordner",
|
||||
"MessageNoNetworkConnection": "Keine Netzwerkverbindung",
|
||||
"MessageNoPodcastsFound": "Keine Podcasts gefunden",
|
||||
"MessageNoSeries": "Keine Serie",
|
||||
"MessageNoUpdatesWereNecessary": "Keine Aktualisierungen waren notwendig",
|
||||
"MessageNoUserPlaylists": "Keine Wiedergabelisten vorhanden",
|
||||
"MessageOldServerAuthReLoginRequired": "Für die verbesserung der Sicherheit wurde die Authentifizierung in der Version v2.26.0 verbessert. Alle Nutzer müssen sich neu einloggen.",
|
||||
"MessageOldServerAuthWarning": "Der Server nutzt eine nicht mehr aktuelle Authentifizierung",
|
||||
"MessageOldServerAuthWarningHelp": "Die Version dieses Servers ist älter als v2.26.0. Ein sichereres Authentifizierungssystem wurde in v2.26.0 hinzugefügt. Es wird dringend empfohlen, den Server auf die neuste Version zu aktualisieren. Solltest du den Server bereits aktualisiert haben, melde dich neu an, um das neue Authentifizierungssystem zu verwenden.",
|
||||
"MessageOldServerConnectionWarning": "Diese Serververbindung nutzt eine alte Nutzer-ID (user ID). Bitte entferne diese Serververbindung und füge sie wieder neu hinzu.",
|
||||
"MessageOldServerConnectionWarningHelp": "Du hast diese Serververbindung vor der Datenbankmigration in 2.3.0, veröffentlicht im Juni 2023, eingerichtet. Ein zukünftiges Serverupdate wird die Möglichkeit entfernen, sich mit dieser Verbindung anzumelden. Bitte lösche die existierende Serververbindung und melde dich neu an (mit der gleichen Serveradresse und Zugangsdaten). Wenn du irgendwelche Medien auf dieses Gerät heruntergeladen hast, musst du sie anschließend erneut herunterladen, um den Status zu synchronisieren.",
|
||||
"MessagePodcastSearchField": "Suchbegriff oder RSS-Feed URL eingeben",
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
"LabelEndOfChapter": "End of Chapter",
|
||||
"LabelEndTime": "End time",
|
||||
"LabelEpisode": "Episode",
|
||||
"LabelExplicit": "Explicit",
|
||||
"LabelFeedURL": "Feed URL",
|
||||
"LabelFile": "File",
|
||||
"LabelFileBirthtime": "File Birthtime",
|
||||
@@ -220,6 +221,7 @@
|
||||
"LabelPublishedDate": "Published {0}",
|
||||
"LabelRSSFeedCustomOwnerEmail": "Custom owner Email",
|
||||
"LabelRSSFeedCustomOwnerName": "Custom owner Name",
|
||||
"LabelRSSFeedOpen": "RSS Feed Open",
|
||||
"LabelRSSFeedPreventIndexing": "Prevent Indexing",
|
||||
"LabelRSSFeedSlug": "RSS Feed Slug",
|
||||
"LabelRandomly": "Randomly",
|
||||
@@ -241,6 +243,8 @@
|
||||
"LabelShowAll": "Show All",
|
||||
"LabelSize": "Size",
|
||||
"LabelSleepTimer": "Sleep timer",
|
||||
"LabelSleepTimerAlmostDoneChime": "Play a chime when almost finished",
|
||||
"LabelSleepTimerAlmostDoneChimeHelp": "Play a chime when the sleep timer has 30 seconds remaining",
|
||||
"LabelStart": "Start",
|
||||
"LabelStartTime": "Start time",
|
||||
"LabelStatsBestDay": "Best Day",
|
||||
@@ -294,6 +298,7 @@
|
||||
"MessageDownloading": "Downloading...",
|
||||
"MessageDownloadingEpisode": "Downloading episode",
|
||||
"MessageEpisodesQueuedForDownload": "{0} Episode(s) queued for download",
|
||||
"MessageFailedToRefreshToken": "Failed to refresh token, re-login required",
|
||||
"MessageFeedURLWillBe": "Feed URL will be {0}",
|
||||
"MessageFetching": "Fetching...",
|
||||
"MessageFollowTheProjectOnGithub": "Follow the project on Github",
|
||||
@@ -321,6 +326,9 @@
|
||||
"MessageNoSeries": "No series",
|
||||
"MessageNoUpdatesWereNecessary": "No updates were necessary",
|
||||
"MessageNoUserPlaylists": "You have no playlists",
|
||||
"MessageOldServerAuthReLoginRequired": "Authentication has been improved for security in server v2.26.0. All users are required to re-login.",
|
||||
"MessageOldServerAuthWarning": "Server is using out-dated authentication",
|
||||
"MessageOldServerAuthWarningHelp": "This server is running a version older than v2.26.0. A more secure authentication system was added in v2.26.0. It is strongly recommended to update the server to the latest version. If you have already updated the server, log in again to use the new authentication.",
|
||||
"MessageOldServerConnectionWarning": "Server connection config is using an old user ID. Please delete and re-add this server connection.",
|
||||
"MessageOldServerConnectionWarningHelp": "You originally set up the connection to this server prior to the database migration in 2.3.0, released June 2023. A future server update will remove the ability to sign in with this old connection. Please delete the existing server connection and connect again (using the same server address and credentials). If you have any downloaded media on this device, the media will need to be downloaded again to sync with the server.",
|
||||
"MessagePodcastSearchField": "Enter search term or RSS feed URL",
|
||||
|
||||
+45
-34
@@ -6,6 +6,7 @@
|
||||
"ButtonCancel": "Cancelar",
|
||||
"ButtonCancelTimer": "Cancelar temporizador",
|
||||
"ButtonClearFilter": "Quitar filtros",
|
||||
"ButtonClearLogs": "Vaciar registros",
|
||||
"ButtonCloseFeed": "Cerrar suministro",
|
||||
"ButtonCollections": "Colecciones",
|
||||
"ButtonConnect": "Conectar",
|
||||
@@ -26,7 +27,9 @@
|
||||
"ButtonLatest": "Más recientes",
|
||||
"ButtonLibrary": "Biblioteca",
|
||||
"ButtonLocalMedia": "Medios locales",
|
||||
"ButtonLogs": "Registros",
|
||||
"ButtonManageLocalFiles": "Gestionar archivos locales",
|
||||
"ButtonMaskServerAddress": "Enmascarar dirección de servidor",
|
||||
"ButtonNewFolder": "Carpeta nueva",
|
||||
"ButtonNextEpisode": "Próximo episodio",
|
||||
"ButtonOk": "Aceptar",
|
||||
@@ -50,6 +53,7 @@
|
||||
"ButtonStream": "En directo",
|
||||
"ButtonSubmit": "Enviar",
|
||||
"ButtonSwitchServerUser": "Cambiar servidor/usuario",
|
||||
"ButtonUnmaskServerAddress": "Desenmascarar dirección de servidor",
|
||||
"ButtonUserStats": "Estadísticas de usuario",
|
||||
"ButtonYes": "Sí",
|
||||
"HeaderAccount": "Cuenta",
|
||||
@@ -137,11 +141,12 @@
|
||||
"LabelEbooks": "Libros electrónicos",
|
||||
"LabelEnable": "Activar",
|
||||
"LabelEnableMp3IndexSeeking": "Activar la búsqueda de índices mp3",
|
||||
"LabelEnableMp3IndexSeekingHelp": "Esta configuración solo debe habilitarse si tienes archivos mp3 que no se están buscando correctamente. La búsqueda inexacta probablemente se deba a archivos MP3 de tasa de bits variable (VBR). Esta configuración forzará la búsqueda de índice, en la que se construye un mapeo de tiempo a bytes mientras se lee el archivo. En algunos casos, con archivos MP3 grandes, puede haber un retraso al buscar hacia el final del archivo.",
|
||||
"LabelEnableMp3IndexSeekingHelp": "Esta configuración solo debe activarse si tiene archivos MP3 en los que no se puede buscar correctamente. La búsqueda inexacta probablemente se deba a archivos MP3 con tasas de bits variables (VBR). Esta configuración forzará la búsqueda de índice, en la que se construye una asignación de tiempo a bytes mientras se lee el archivo. En algunos casos, con archivos MP3 grandes, puede haber un retraso al buscar hacia el final del archivo.",
|
||||
"LabelEnd": "Fin",
|
||||
"LabelEndOfChapter": "Fin del capítulo",
|
||||
"LabelEndTime": "Hora de finalización",
|
||||
"LabelEpisode": "Episodio",
|
||||
"LabelExplicit": "Explícito",
|
||||
"LabelFeedURL": "URL del suministro",
|
||||
"LabelFile": "Archivo",
|
||||
"LabelFileBirthtime": "Archivo creado en",
|
||||
@@ -216,38 +221,40 @@
|
||||
"LabelPublishedDate": "Publicado {0}",
|
||||
"LabelRSSFeedCustomOwnerEmail": "Correo electrónico de dueño personalizado",
|
||||
"LabelRSSFeedCustomOwnerName": "Nombre de dueño personalizado",
|
||||
"LabelRSSFeedPreventIndexing": "Prevenir indexado",
|
||||
"LabelRSSFeedPreventIndexing": "Evitar indización",
|
||||
"LabelRSSFeedSlug": "«Slug» de suministro RSS",
|
||||
"LabelRandomly": "Aleatorio",
|
||||
"LabelRead": "Leído",
|
||||
"LabelReadAgain": "Volver a leer",
|
||||
"LabelRecentSeries": "Series recientes",
|
||||
"LabelRecentlyAdded": "Añadidos recientemente",
|
||||
"LabelRemoveFromPlaylist": "Eliminar de la Lista de Reproducción",
|
||||
"LabelRemoveFromPlaylist": "Quitar de la lista de reproducción",
|
||||
"LabelScaleElapsedTimeBySpeed": "Escala el tiempo transcurrido según la velocidad",
|
||||
"LabelSeason": "Temporada",
|
||||
"LabelSelectADevice": "Selecciona un dispositivo",
|
||||
"LabelSequenceAscending": "Secuencia Ascendente",
|
||||
"LabelSequenceDescending": "Secuencia Descendente",
|
||||
"LabelSelectADevice": "Seleccione un dispositivo",
|
||||
"LabelSequenceAscending": "Secuencia ascendente",
|
||||
"LabelSequenceDescending": "Secuencia descendente",
|
||||
"LabelSeries": "Serie",
|
||||
"LabelServerAddress": "Dirección del servidor",
|
||||
"LabelSetEbookAsPrimary": "Establecer como primario",
|
||||
"LabelSetEbookAsSupplementary": "Establecer como suplementario",
|
||||
"LabelShakeSensitivity": "Sensibilidad a la sacudida",
|
||||
"LabelShowAll": "Mostrar Todos",
|
||||
"LabelShowAll": "Mostrar todo",
|
||||
"LabelSize": "Tamaño",
|
||||
"LabelSleepTimer": "Temporizador de apagado",
|
||||
"LabelSleepTimerAlmostDoneChime": "Timbrar casi al terminar",
|
||||
"LabelSleepTimerAlmostDoneChimeHelp": "Reproducir una señal acústica cuando queden 30 segundos en el temporizador",
|
||||
"LabelStart": "Iniciar",
|
||||
"LabelStartTime": "Tiempo de Inicio",
|
||||
"LabelStatsBestDay": "Mejor Día",
|
||||
"LabelStatsDailyAverage": "Promedio Diario",
|
||||
"LabelStartTime": "Tiempo de inicio",
|
||||
"LabelStatsBestDay": "Mejor día",
|
||||
"LabelStatsDailyAverage": "Promedio diario",
|
||||
"LabelStatsDays": "Días",
|
||||
"LabelStatsDaysListened": "Días Escuchando",
|
||||
"LabelStatsDaysListened": "Días escuchando",
|
||||
"LabelStatsInARow": "seguidos",
|
||||
"LabelStatsItemsFinished": "Elementos Terminados",
|
||||
"LabelStatsItemsFinished": "Elementos terminados",
|
||||
"LabelStatsMinutes": "minutos",
|
||||
"LabelStatsMinutesListening": "Minutos Escuchando",
|
||||
"LabelStatsWeekListening": "Tiempo escuchando en la Semana",
|
||||
"LabelStatsMinutesListening": "Minutos escuchando",
|
||||
"LabelStatsWeekListening": "Tiempo escuchando en la semana",
|
||||
"LabelStreamingUsingCellular": "Streaming por móvil",
|
||||
"LabelTag": "Etiqueta",
|
||||
"LabelTags": "Etiquetas",
|
||||
@@ -263,14 +270,14 @@
|
||||
"LabelType": "Tipo",
|
||||
"LabelUnknown": "Desconocido",
|
||||
"LabelUnlockPlayer": "Desbloquear reproductor",
|
||||
"LabelUseBookshelfView": "Usar la Vista de Estantería",
|
||||
"LabelUseBookshelfView": "Usar vista de estantería",
|
||||
"LabelUser": "Usuario",
|
||||
"LabelUsername": "Nombre de Usuario",
|
||||
"LabelVeryHigh": "Muy Alto",
|
||||
"LabelVeryLow": "Muy Bajo",
|
||||
"LabelYearReviewHide": "Ocultar Resumen del año",
|
||||
"LabelYearReviewShow": "Resumen del año",
|
||||
"LabelYourBookmarks": "Tus Marcadores",
|
||||
"LabelUsername": "Nombre de usuario",
|
||||
"LabelVeryHigh": "Muy alto",
|
||||
"LabelVeryLow": "Muy bajo",
|
||||
"LabelYearReviewHide": "Ocultar resumen del año",
|
||||
"LabelYearReviewShow": "Ver resumen del año",
|
||||
"LabelYourBookmarks": "Sus marcadores",
|
||||
"LabelYourProgress": "Su progreso",
|
||||
"MessageAndroid10Downloads": "Android 10 e inferiores utilizarán el almacenamiento interno de aplicaciones para las descargas.",
|
||||
"MessageAttemptingServerConnection": "Intentando conectar con el servidor...",
|
||||
@@ -279,46 +286,50 @@
|
||||
"MessageBookshelfEmpty": "Estantería vacía",
|
||||
"MessageConfirmDeleteLocalEpisode": "¿Quiere eliminar el episodio local «{0}» del dispositivo? El archivo en el servidor no se verá afectado.",
|
||||
"MessageConfirmDeleteLocalFiles": "¿Quiere quitar los archivos locales de este elemento del dispositivo? Los archivos del servidor y su progreso no se verán afectados.",
|
||||
"MessageConfirmDisableAutoTimer": "¿Confirma que quiere desactivar el temporizador automático por el resto del día? El temporizador volverá a activarse al final de este periodo de temporizador de apagado automático, o si reinicia la aplicación.",
|
||||
"MessageConfirmDiscardProgress": "¿Confirma que quiere restablecer su progreso?",
|
||||
"MessageConfirmDownloadUsingCellular": "Estas a punto de realizar una descarga utilizando datos móviles. Esto puede incluir cargos de datos del operador. ¿Deseas continuar?",
|
||||
"MessageConfirmDownloadUsingCellular": "Está a punto de efectuar una descarga con datos móviles. Esto puede conllevar tarifas de datos de la operadora. ¿Quiere continuar?",
|
||||
"MessageConfirmMarkAsFinished": "¿Confirma que quiere marcar este elemento como terminado?",
|
||||
"MessageConfirmRemoveBookmark": "¿Confirma que quiere quitar el marcador?",
|
||||
"MessageConfirmStreamingUsingCellular": "Estás a punto de hacer streaming utilizando datos móviles. Esto puede incluir cargos de datos del operador. ¿Deseas continuar?",
|
||||
"MessageConfirmStreamingUsingCellular": "Está a punto de hacer una transmisión con datos móviles. Esto puede conllevar tarifas de datos de la operadora. ¿Quiere continuar?",
|
||||
"MessageDiscardProgress": "Descartar progreso",
|
||||
"MessageDownloadCompleteProcessing": "Descarga Completada. Procesando...",
|
||||
"MessageDownloadCompleteProcessing": "Descarga completada. Procesando...",
|
||||
"MessageDownloading": "Descargando...",
|
||||
"MessageDownloadingEpisode": "Descargando episodio",
|
||||
"MessageEpisodesQueuedForDownload": "{0} Episodio(s) en cola para descargar",
|
||||
"MessageEpisodesQueuedForDownload": "{0} episodio(s) en cola para descargar",
|
||||
"MessageFeedURLWillBe": "El URL del suministro será {0}",
|
||||
"MessageFetching": "Buscando...",
|
||||
"MessageFollowTheProjectOnGithub": "Sigue el proyecto en GitHub",
|
||||
"MessageFetching": "Recuperando...",
|
||||
"MessageFollowTheProjectOnGithub": "Siga el proyecto en GitHub",
|
||||
"MessageItemDownloadCompleteFailedToCreate": "Se ha completado la descarga del elemento, pero no se ha podido crear el elemento de la biblioteca",
|
||||
"MessageItemMissing": "Falta un elemento y debe corregirse en el servidor. Normalmente, un elemento se marca como faltante porque no se puede acceder a las rutas de los archivos.",
|
||||
"MessageLoading": "Cargando...",
|
||||
"MessageLoadingServerData": "Cargando datos del servidor...",
|
||||
"MessageLocalFolderDescription": "Solo se puede acceder al «Almacenamiento interno de la aplicación» a través de esta aplicación. Esta aplicación solo admite multimedia descargada directamente a través de ella. Las carpetas de almacenamiento compartido se pueden utilizar para permitir que otras aplicaciones accedan a los archivos descargados por esta aplicación.",
|
||||
"MessageMarkAsFinished": "Marcar como terminado",
|
||||
"MessageMediaLinkedToADifferentServer": "El contenido está vinculado a un servidor de Audiobookshelf en una dirección diferente ({0}). El progreso se sincronizará cuando se conecte a esta dirección de servidor.",
|
||||
"MessageMediaLinkedToADifferentUser": "El contenido está vinculado a este servidor pero fue descargado por otro usuario. El progreso solo se sincronizará con el usuario que lo descargó.",
|
||||
"MessageMediaLinkedToServer": "Vinculado al servidor {0}",
|
||||
"MessageMediaLinkedToServer": "Enlazado al servidor {0}",
|
||||
"MessageMediaLinkedToThisServer": "El contenido descargado está vinculado a este servidor",
|
||||
"MessageMediaNotLinkedToServer": "El contenido multimedia no está vinculado a un servidor de Audiobookshelf. No se sincronizará ningún progreso.",
|
||||
"MessageNoBookmarks": "Sin marcadores",
|
||||
"MessageNoChapters": "Sin capítulos",
|
||||
"MessageNoCollections": "Sin colecciones",
|
||||
"MessageNoItems": "Sin elementos",
|
||||
"MessageNoItems": "Ningún elemento",
|
||||
"MessageNoItemsFound": "Ningún elemento encontrado",
|
||||
"MessageNoListeningSessions": "Ninguna sesión escuchada",
|
||||
"MessageNoListeningSessions": "Ninguna sesión de escucha",
|
||||
"MessageNoLogs": "Ningún registro",
|
||||
"MessageNoMediaFolders": "Sin carpetas multimedia",
|
||||
"MessageNoNetworkConnection": "Sin conexión de red",
|
||||
"MessageNoPodcastsFound": "No se encontró ningún pódcast",
|
||||
"MessageNoSeries": "Ninguna serie",
|
||||
"MessageNoUpdatesWereNecessary": "No fue necesario actualizar",
|
||||
"MessageNoUserPlaylists": "No tiene ninguna lista de reproducción",
|
||||
"MessageOldServerConnectionWarning": "La configuración de la conexión al servidor está utilizando un ID de usuario antiguo. Por favor, elimine y vuelva a añadir esta conexión al servidor.",
|
||||
"MessageOldServerConnectionWarning": "La configuración de la conexión al servidor utiliza un identificador de usuario antiguo. Elimine y vuelva a añadir esta conexión al servidor.",
|
||||
"MessageOldServerConnectionWarningHelp": "Usted configuró originalmente la conexión a este servidor antes de la migración de la base de datos en la versión 2.3.0, publicada en junio de 2023. Una futura actualización del servidor eliminará la posibilidad de iniciar sesión con esta conexión antigua. Por favor, elimine la conexión existente al servidor y conéctese de nuevo (utilizando la misma dirección del servidor y las mismas credenciales). Si tiene algún medio descargado en este dispositivo, será necesario descargarlo de nuevo para sincronizarlo con el servidor.",
|
||||
"MessagePodcastSearchField": "Introduzca el término de búsqueda o el URL del suministro RSS",
|
||||
"MessageProgressSyncFailed": "El último intento de informar al servidor sobre el progreso de la escucha ha fallado. Las solicitudes de sincronización de progreso seguirán intentándose cada 15 segundos a 1 minuto mientras se reproduce el contenido multimedia.",
|
||||
"MessageReportBugsAndContribute": "Reporte erres, solicite funciones y contribuya en",
|
||||
"MessageSeriesAlreadyDownloaded": "Ya has descargado todos los libros de esta serie.",
|
||||
"MessageReportBugsAndContribute": "Informe de defectos, solicite funciones y contribuya en",
|
||||
"MessageSeriesAlreadyDownloaded": "Ya ha descargado todos los libros de esta serie.",
|
||||
"MessageSeriesDownloadConfirm": "¿Descargar {0} libro(s) faltante(s) con {1} archivo(s), totalizando {2} a la carpeta {3}?",
|
||||
"MessageSeriesDownloadConfirmIos": "¿Descargar {0} libro(s) faltantes con {1} archivo(s), con un total de {2}?",
|
||||
"MessageSocketConnectedOverMeteredCellular": "Conexión de socket a través de red celular de tarifa por consumo",
|
||||
@@ -328,7 +339,7 @@
|
||||
"MessageSocketNotConnected": "Socket no conectado",
|
||||
"NoteRSSFeedPodcastAppsHttps": "Atención: la mayoría de las aplicaciones de pódcast requieren que el URL del suministro RSS use HTTPS",
|
||||
"NoteRSSFeedPodcastAppsPubDate": "Advertencia: 1 o más de sus episodios no tienen fecha de publicación. Algunas aplicaciones de podcast lo requieren.",
|
||||
"ToastBookmarkCreateFailed": "Error al crear marcador",
|
||||
"ToastBookmarkCreateFailed": "No se pudo crear el marcador",
|
||||
"ToastBookmarkRemoveFailed": "Error al eliminar marcador",
|
||||
"ToastBookmarkUpdateFailed": "Error al actualizar el marcador",
|
||||
"ToastDownloadNotAllowedOnCellular": "Las descargas no están permitidas con datos móviles",
|
||||
|
||||
+177
-1
@@ -1 +1,177 @@
|
||||
{}
|
||||
{
|
||||
"ButtonAdd": "Lisa",
|
||||
"ButtonAddNewServer": "Lisa uus server",
|
||||
"ButtonAuthors": "Autorid",
|
||||
"ButtonBack": "Tagasi",
|
||||
"ButtonCancel": "Katkesta",
|
||||
"ButtonCancelTimer": "Katkesta taimer",
|
||||
"ButtonClearFilter": "Tühista filter",
|
||||
"ButtonCollections": "Kollektsioonid",
|
||||
"ButtonConnect": "Ühenda",
|
||||
"ButtonConnectToServer": "Ühenda serveriga",
|
||||
"ButtonCreate": "Loo uus",
|
||||
"ButtonCreateBookmark": "Loo uus järjehoidja",
|
||||
"ButtonCreateNewPlaylist": "Loo uus playlist",
|
||||
"ButtonDelete": "Kustuta",
|
||||
"ButtonDeleteLocalEpisode": "Kustuta lokaalne episood",
|
||||
"ButtonDeleteLocalFile": "Kustuta lokaalne fail",
|
||||
"ButtonDisableAutoTimer": "Lülita välja auto-taimer",
|
||||
"ButtonDisconnect": "Ühenda lahti",
|
||||
"ButtonHistory": "Ajalugu",
|
||||
"ButtonIssues": "Probleemid",
|
||||
"ButtonLatest": "Viimased",
|
||||
"ButtonLibrary": "Raamatukogu",
|
||||
"ButtonLocalMedia": "Lokaalne meedia",
|
||||
"ButtonNewFolder": "Uus kaust",
|
||||
"ButtonNextEpisode": "Järgmine episood",
|
||||
"ButtonOk": "Ok",
|
||||
"ButtonPause": "Paus",
|
||||
"ButtonPlay": "Play",
|
||||
"ButtonPlaylists": "Playlist",
|
||||
"ButtonRead": "Loe",
|
||||
"ButtonReadLess": "Loe vähem",
|
||||
"ButtonReadMore": "Loe rohkem",
|
||||
"ButtonRemove": "Kustuta",
|
||||
"ButtonRemoveFromServer": "Kustuta serverist",
|
||||
"ButtonSave": "Salvesta",
|
||||
"ButtonSaveOrder": "Salvesta järjekord",
|
||||
"ButtonSearch": "Otsi",
|
||||
"ButtonSendEbookToDevice": "Saada e-raamat seadmele",
|
||||
"ButtonSetTimer": "Säti taimer",
|
||||
"ButtonSubmit": "Esita",
|
||||
"ButtonUserStats": "Kasutaja statistika",
|
||||
"ButtonYes": "Jah",
|
||||
"HeaderAccount": "Konto",
|
||||
"HeaderAndroidAutoSettings": "Android Auto sätted",
|
||||
"HeaderChapters": "Peatükid",
|
||||
"HeaderConnectionStatus": "Ühenduse staatus",
|
||||
"HeaderDataSettings": "Andmete sätted",
|
||||
"HeaderDetails": "Detailid",
|
||||
"HeaderDownloads": "Allatõmmatud",
|
||||
"HeaderEbookFiles": "E-raamatu failid",
|
||||
"HeaderEpisodes": "Episoodid",
|
||||
"HeaderEreaderSettings": "E-lugeja sätted",
|
||||
"HeaderLatestEpisodes": "Viimased episoodid",
|
||||
"HeaderLibraries": "Raamatukogud",
|
||||
"HeaderLocalFolders": "Lokaalsed failid",
|
||||
"HeaderLocalLibraryItems": "Lokaalse raamatukogu esemed",
|
||||
"HeaderNewPlaylist": "Uus playlist",
|
||||
"HeaderPlaylist": "Playlist",
|
||||
"HeaderPlaylistItems": "Playlisti esemed",
|
||||
"HeaderProgressSyncFailed": "Progressi sühnkronisatsioon ebaõnnestus",
|
||||
"HeaderSelectDownloadLocation": "Vali allalaadimise kaust",
|
||||
"HeaderSettings": "Seaded",
|
||||
"HeaderSleepTimer": "Unetaimer",
|
||||
"HeaderSleepTimerSettings": "Unetaimeri seaded",
|
||||
"HeaderStatsRecentSessions": "Hiljutised sessioonid",
|
||||
"HeaderTableOfContents": "Sisukord",
|
||||
"HeaderUserInterfaceSettings": "Kasutajaliidese seaded",
|
||||
"HeaderYourStats": "Sinu statistika",
|
||||
"LabelAddToPlaylist": "Lisa playlisti",
|
||||
"LabelAddedAt": "Lisatud",
|
||||
"LabelAddedDate": "Lisatud {0}",
|
||||
"LabelAll": "Kõik",
|
||||
"LabelAllowSeekingOnMediaControls": "Luba positsiooniotsing meediateavituste juhtelementidel",
|
||||
"LabelAlways": "Alati",
|
||||
"LabelAndroidAutoBrowseLimitForGrouping": "Tähestikuline väljavõtmise limiit",
|
||||
"LabelAndroidAutoBrowseLimitForGroupingHelp": "Ära kasuta tähestikulises järjekorras järjestamist juhul kui kuvatavaid esemeid on vähem kui see arv",
|
||||
"LabelAskConfirmation": "Küsi kinnitust",
|
||||
"LabelAuthor": "Autor",
|
||||
"LabelAuthorFirstLast": "Autor (eesnimi perekonnanimi)",
|
||||
"LabelAuthorLastFirst": "Autor (perekonnanimi, eesnimi)",
|
||||
"LabelAuthors": "Autorid",
|
||||
"LabelAutoDownloadEpisodes": "Episoodide automaatne allalaadimine",
|
||||
"LabelAutoRewindTime": "Keri aeg automaatselt tagasi",
|
||||
"LabelAutoSleepTimer": "Automaatne unetaimer",
|
||||
"LabelBooks": "Raamatud",
|
||||
"LabelChapterTrack": "Peatüki heliriba",
|
||||
"LabelChapters": "Peatükid",
|
||||
"LabelComplete": "Valmis",
|
||||
"LabelContinueBooks": "Jätka raamatuid",
|
||||
"LabelContinueEpisodes": "Jätka episoode",
|
||||
"LabelContinueListening": "Jätka kuulamist",
|
||||
"LabelContinueReading": "Jätka lugemist",
|
||||
"LabelDescription": "Kirjeldus",
|
||||
"LabelDownload": "Lae alla",
|
||||
"LabelDownloadUsingCellular": "Lae alla kasutades andmesidet",
|
||||
"LabelDownloaded": "Allalaaditud",
|
||||
"LabelDuration": "Kestvus",
|
||||
"LabelEbook": "E-raamat",
|
||||
"LabelEbooks": "E-raamatud",
|
||||
"LabelEnable": "Luba",
|
||||
"LabelEnd": "Lõpp",
|
||||
"LabelEndOfChapter": "Peatükki lõpp",
|
||||
"LabelEpisode": "Episood",
|
||||
"LabelFile": "Fail",
|
||||
"LabelFilename": "Faili nimi",
|
||||
"LabelFinished": "Lõpetatud",
|
||||
"LabelFolder": "Kaust",
|
||||
"LabelFontBoldness": "Fondi paksus",
|
||||
"LabelFontScale": "Fondi suurus",
|
||||
"LabelGenre": "Žanr",
|
||||
"LabelGenres": "Žanrid",
|
||||
"LabelHapticFeedback": "Haptiline tagasiside",
|
||||
"LabelHasEbook": "E-raamat olemas",
|
||||
"LabelIncomplete": "Lõpetamata",
|
||||
"LabelKeepScreenAwake": "Hoia ekraan ärkvel",
|
||||
"LabelLanguage": "Keel",
|
||||
"LabelLayoutAuto": "Auto",
|
||||
"LabelLight": "Hele",
|
||||
"LabelListenAgain": "Kuula uuesti",
|
||||
"LabelLocalBooks": "Lokaalsed raamatud",
|
||||
"LabelLocalPodcasts": "Lokaalsed podcastid",
|
||||
"LabelLow": "Madal",
|
||||
"LabelMediaType": "Meedia tüüp",
|
||||
"LabelMedium": "Keskmine",
|
||||
"LabelMissing": "Puudub",
|
||||
"LabelMore": "Rohkem",
|
||||
"LabelMoreInfo": "Rohkem infot",
|
||||
"LabelName": "Nimi",
|
||||
"LabelNavigateWithVolumeMirrored": "Peegeldatud",
|
||||
"LabelNavigateWithVolumeWhilePlayingDisabled": "Väljalülitatud",
|
||||
"LabelNavigateWithVolumeWhilePlayingEnabled": "Sisselülitatud",
|
||||
"LabelNever": "Mitte kunagi",
|
||||
"LabelNewestAuthors": "Uuemad autorid",
|
||||
"LabelNewestEpisodes": "Uuemad episoodid",
|
||||
"LabelNo": "Ei",
|
||||
"LabelNotFinished": "Lõpetamata",
|
||||
"LabelNotStarted": "Pole alustatud",
|
||||
"LabelNumEpisodes": "{0} episoode",
|
||||
"LabelNumEpisodesIncomplete": "{0} episoodi, {1} lõpetamata",
|
||||
"LabelNumberOfEpisodes": "# episoode",
|
||||
"LabelOff": "Väljalülitatud",
|
||||
"LabelOn": "Sisselülitatud",
|
||||
"LabelPassword": "Parool",
|
||||
"LabelPlaybackDirect": "Otse",
|
||||
"LabelPlaybackLocal": "Lokaalne",
|
||||
"LabelPlaybackTranscode": "Transkodeeri",
|
||||
"LabelPodcast": "Podcast",
|
||||
"LabelPodcasts": "Podcastid",
|
||||
"LabelProgress": "Progress",
|
||||
"LabelPubDate": "Publitseerimise kuupäev",
|
||||
"LabelPublishYear": "Publitseerimise aasta",
|
||||
"LabelPublishedDate": "Publitseeritud {0}",
|
||||
"LabelRandomly": "Juhuslikus järjekorras",
|
||||
"LabelRead": "Loetud läbi",
|
||||
"LabelReadAgain": "Loe uuesti",
|
||||
"LabelRecentlyAdded": "Hiljuti lisatud",
|
||||
"LabelRemoveFromPlaylist": "Eemalda playlistist",
|
||||
"LabelSeason": "Hooaeg",
|
||||
"LabelSelectADevice": "Vali seade",
|
||||
"LabelServerAddress": "Serveri aadres",
|
||||
"LabelShowAll": "Näita kõik",
|
||||
"LabelSize": "Suurus",
|
||||
"LabelSleepTimer": "Unetaimer",
|
||||
"LabelStart": "Alusta",
|
||||
"LabelStatsBestDay": "Parim päev",
|
||||
"LabelStatsDays": "Päevi",
|
||||
"LabelStatsInARow": "järjest",
|
||||
"LabelStatsMinutes": "minuteid",
|
||||
"LabelThemeBlack": "Must",
|
||||
"LabelThemeDark": "Pime",
|
||||
"LabelThemeLight": "Hele",
|
||||
"LabelTitle": "Pealkiri",
|
||||
"LabelTotalSize": "Kogusuurus",
|
||||
"LabelType": "Tüüp",
|
||||
"LabelUnknown": "Teadmata"
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"ButtonCancel": "Peruuta",
|
||||
"ButtonCancelTimer": "Peruuta ajastin",
|
||||
"ButtonClearFilter": "Poista suodatus",
|
||||
"ButtonClearLogs": "Tyhjennä lokit",
|
||||
"ButtonCloseFeed": "Sulje syöte",
|
||||
"ButtonCollections": "Kokoelmat",
|
||||
"ButtonConnect": "Yhdistä",
|
||||
|
||||
+15
-2
@@ -6,6 +6,7 @@
|
||||
"ButtonCancel": "Annuler",
|
||||
"ButtonCancelTimer": "Annuler la minuterie",
|
||||
"ButtonClearFilter": "Effacer le filtre",
|
||||
"ButtonClearLogs": "Effacer les registres",
|
||||
"ButtonCloseFeed": "Fermer le flux",
|
||||
"ButtonCollections": "Collections",
|
||||
"ButtonConnect": "Connecter",
|
||||
@@ -26,7 +27,9 @@
|
||||
"ButtonLatest": "Dernière version",
|
||||
"ButtonLibrary": "Bibliothèque",
|
||||
"ButtonLocalMedia": "Médias locaux",
|
||||
"ButtonLogs": "Registres",
|
||||
"ButtonManageLocalFiles": "Gérer les fichiers locaux",
|
||||
"ButtonMaskServerAddress": "Masquer l'adresse du serveur",
|
||||
"ButtonNewFolder": "Nouveau dossier",
|
||||
"ButtonNextEpisode": "Prochain épisode",
|
||||
"ButtonOk": "D'accord",
|
||||
@@ -50,6 +53,7 @@
|
||||
"ButtonStream": "Flux",
|
||||
"ButtonSubmit": "Soumettre",
|
||||
"ButtonSwitchServerUser": "Changer de serveur / utilisateur",
|
||||
"ButtonUnmaskServerAddress": "Afficher l'adresse du serveur",
|
||||
"ButtonUserStats": "Statistiques utilisateur",
|
||||
"ButtonYes": "Oui",
|
||||
"HeaderAccount": "Compte",
|
||||
@@ -116,7 +120,7 @@
|
||||
"LabelComplete": "Complet",
|
||||
"LabelContinueBooks": "Continuer les Livres",
|
||||
"LabelContinueEpisodes": "Continuer les épisodes",
|
||||
"LabelContinueListening": "Continuer la lecture",
|
||||
"LabelContinueListening": "Continuer l'écoute",
|
||||
"LabelContinueReading": "Continuer la lecture",
|
||||
"LabelContinueSeries": "Continuer les séries",
|
||||
"LabelCustomTime": "Temps personalisé",
|
||||
@@ -129,7 +133,7 @@
|
||||
"LabelDisableVibrateOnReset": "Désactiver la vibration au redémarrage",
|
||||
"LabelDisableVibrateOnResetHelp": "Lorsque le minuteur est redémarré, l'appareil vibre. Sélectionner pour désactiver les vibrations.",
|
||||
"LabelDiscover": "Découvrir",
|
||||
"LabelDownload": "Téléchargement",
|
||||
"LabelDownload": "Télécharger",
|
||||
"LabelDownloadUsingCellular": "Télécharger via les données mobiles",
|
||||
"LabelDownloaded": "Téléchargé",
|
||||
"LabelDuration": "Durée",
|
||||
@@ -142,6 +146,7 @@
|
||||
"LabelEndOfChapter": "Fin du chapitre",
|
||||
"LabelEndTime": "Heure de fin",
|
||||
"LabelEpisode": "Épisode",
|
||||
"LabelExplicit": "Contenu explicite",
|
||||
"LabelFeedURL": "URL du flux",
|
||||
"LabelFile": "Fichier",
|
||||
"LabelFileBirthtime": "Création du fichier",
|
||||
@@ -216,6 +221,7 @@
|
||||
"LabelPublishedDate": "Publié le {0}",
|
||||
"LabelRSSFeedCustomOwnerEmail": "Courriel personnalisée du propriétaire",
|
||||
"LabelRSSFeedCustomOwnerName": "Nom propriétaire personnalisé",
|
||||
"LabelRSSFeedOpen": "Flux RSS ouvert",
|
||||
"LabelRSSFeedPreventIndexing": "Empêcher l’indexation",
|
||||
"LabelRSSFeedSlug": "Identifiant d’URL du flux RSS",
|
||||
"LabelRandomly": "Au hasard",
|
||||
@@ -237,6 +243,8 @@
|
||||
"LabelShowAll": "Tout afficher",
|
||||
"LabelSize": "Taille",
|
||||
"LabelSleepTimer": "Minuterie",
|
||||
"LabelSleepTimerAlmostDoneChime": "Jouer un son quand c'est presque fini",
|
||||
"LabelSleepTimerAlmostDoneChimeHelp": "Jouer un son quand il reste 30 s au minuteur de veille",
|
||||
"LabelStart": "Démarrer",
|
||||
"LabelStartTime": "Heure de démarrage",
|
||||
"LabelStatsBestDay": "Meilleur jour",
|
||||
@@ -290,6 +298,7 @@
|
||||
"MessageDownloading": "Téléchargement…",
|
||||
"MessageDownloadingEpisode": "Téléchargement de l’épisode",
|
||||
"MessageEpisodesQueuedForDownload": "{0} épisode(s) mis en file pour téléchargement",
|
||||
"MessageFailedToRefreshToken": "Échec de l'actualisation du jeton, reconnexion requise",
|
||||
"MessageFeedURLWillBe": "l’URL du flux sera {0}",
|
||||
"MessageFetching": "Récupération…",
|
||||
"MessageFollowTheProjectOnGithub": "Suivre le projet sur GitHub",
|
||||
@@ -310,12 +319,16 @@
|
||||
"MessageNoItems": "Aucun élément",
|
||||
"MessageNoItemsFound": "Aucun élément trouvé",
|
||||
"MessageNoListeningSessions": "Aucune session d’écoute en cours",
|
||||
"MessageNoLogs": "Aucun registre",
|
||||
"MessageNoMediaFolders": "Aucun dossier multimédia",
|
||||
"MessageNoNetworkConnection": "Pas de connexion réseau",
|
||||
"MessageNoPodcastsFound": "Aucun podcast trouvé",
|
||||
"MessageNoSeries": "Aucune série",
|
||||
"MessageNoUpdatesWereNecessary": "Aucune mise à jour n’était nécessaire",
|
||||
"MessageNoUserPlaylists": "Vous n’avez aucune liste de lecture",
|
||||
"MessageOldServerAuthReLoginRequired": "L’authentification a été renforcée pour des raisons de sécurité dans la version 2.26.0 du serveur. Tous les utilisateurs doivent se reconnecter.",
|
||||
"MessageOldServerAuthWarning": "Le serveur utilise un système d’authentification obsolète",
|
||||
"MessageOldServerAuthWarningHelp": "Ce serveur utilise une version antérieure à la v2.26.0. Un système d’authentification plus sécurisé a été ajouté dans la version 2.26.0. Il est fortement recommandé de mettre à jour le serveur vers la dernière version. Si vous avez déjà effectué la mise à jour, reconnectez-vous pour utiliser le nouveau système d’authentification.",
|
||||
"MessageOldServerConnectionWarning": "La configuration de connexion du serveur utilise un ancien identifiant utilisateur. Veuillez supprimer et ajouter cette connexion serveur.",
|
||||
"MessageOldServerConnectionWarningHelp": "Vous avez initialement créé la connexion à ce serveur avant la migration de la base de données dans 2.3.0, publié en juin 2023. Une mise à jour future du serveur supprimera la possibilité de signer avec cette ancienne connexion. Veuillez supprimer la connexion existante du serveur et se connecter à nouveau (en utilisant la même adresse de serveur et les mêmes identifiants). Si vous avez des médias téléchargés sur cet appareil, les médias devront être téléchargés à nouveau pour synchroniser avec le serveur.",
|
||||
"MessagePodcastSearchField": "Saisir un terme de recherche ou l'URL d'un flux RSS",
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
{
|
||||
"ButtonAdd": "ઉમેરો",
|
||||
"ButtonAddNewServer": "નવી સર્વર ઉમેરો",
|
||||
"ButtonAuthors": "લેખકો",
|
||||
"ButtonBack": "પાછા",
|
||||
"ButtonCancel": "રદ કરો",
|
||||
"ButtonCancelTimer": "ટાઈમર રદ કરો",
|
||||
"ButtonClearFilter": "ફિલ્ટર જતુ કરો",
|
||||
"ButtonClearLogs": "લોગ્સ સાફ કરો",
|
||||
"ButtonCloseFeed": "ફીડ બંધ કરો",
|
||||
"ButtonCollections": "સંગ્રહ",
|
||||
"ButtonCreate": "બનાવો",
|
||||
@@ -12,9 +16,12 @@
|
||||
"ButtonLatest": "નવીનતમ",
|
||||
"ButtonLibrary": "પુસ્તકાલય",
|
||||
"ButtonOpenFeed": "ફીડ ખોલો",
|
||||
"ButtonPause": "વિરામ",
|
||||
"ButtonPlay": "ચલાવો",
|
||||
"ButtonPlaylists": "પ્લેલિસ્ટ",
|
||||
"ButtonRead": "વાંચો",
|
||||
"ButtonReadLess": "ઓછું વાંચો",
|
||||
"ButtonReadMore": "વધારે વાંચો",
|
||||
"ButtonRemove": "કાઢી નાખો",
|
||||
"ButtonSave": "સાચવો",
|
||||
"ButtonSearch": "શોધો",
|
||||
|
||||
+322
-2
@@ -6,6 +6,7 @@
|
||||
"ButtonCancel": "ביטול",
|
||||
"ButtonCancelTimer": "בטל טיימר",
|
||||
"ButtonClearFilter": "נקה סינון",
|
||||
"ButtonClearLogs": "נקה לוגים",
|
||||
"ButtonCloseFeed": "סגור ערוץ",
|
||||
"ButtonCollections": "אוספים",
|
||||
"ButtonConnect": "התחבר",
|
||||
@@ -25,9 +26,328 @@
|
||||
"ButtonIssues": "בעיות",
|
||||
"ButtonLatest": "אחרון",
|
||||
"ButtonLibrary": "ספרייה",
|
||||
"ButtonLocalMedia": "מדיה מקומית",
|
||||
"ButtonLogs": "לוגים",
|
||||
"ButtonManageLocalFiles": "נהל קבצים מקומיים",
|
||||
"ButtonMaskServerAddress": "הסתר כתובת שרת",
|
||||
"ButtonNewFolder": "תיקייה חדשה",
|
||||
"ButtonNextEpisode": "הפרק הבא",
|
||||
"ButtonOk": "אישור",
|
||||
"ButtonOpenFeed": "פתח פיד",
|
||||
"ButtonOverride": "עקוף",
|
||||
"ButtonPause": "השהה",
|
||||
"ButtonPlay": "נגן",
|
||||
"ButtonPlayEpisode": "נגן פרק",
|
||||
"ButtonPlaylists": "רשימת השמעה",
|
||||
"ButtonPlaylists": "רשימות השמעה",
|
||||
"ButtonRead": "קרא",
|
||||
"ButtonReadLess": "קרא פחות",
|
||||
"ButtonReadMore": "קרא עוד",
|
||||
"ButtonRemove": "הסר",
|
||||
"ButtonRemoveFromServer": "הסר מהשרת",
|
||||
"ButtonSave": "שמור",
|
||||
"ButtonSaveOrder": "שמור פקודה",
|
||||
"ButtonSearch": "חיפוש",
|
||||
"ButtonSendEbookToDevice": "שלח ספר אלקטרוני למכשיר",
|
||||
"ButtonSeries": "סדרה",
|
||||
"ButtonSetTimer": "הפעל טיימר",
|
||||
"ButtonStream": "הזרם",
|
||||
"ButtonSubmit": "שליחה",
|
||||
"ButtonSwitchServerUser": "החלף שרת/משתמש",
|
||||
"ButtonUnmaskServerAddress": "גלה כתובת שרת",
|
||||
"ButtonUserStats": "נתוני משתמש",
|
||||
"ButtonYes": "כן",
|
||||
"HeaderAccount": "חשבון",
|
||||
"HeaderAdvanced": "מתקדם",
|
||||
"HeaderAndroidAutoSettings": "הגדרות Android Auto",
|
||||
"HeaderAudioTracks": "רצועות קול",
|
||||
"HeaderChapters": "פרקים",
|
||||
"HeaderCollection": "אוסף",
|
||||
"HeaderCollectionItems": "פרטי אוסף",
|
||||
"HeaderConnectionStatus": "מצב החיבור",
|
||||
"HeaderDataSettings": "הגדרות נתונים",
|
||||
"HeaderDetails": "פרטים",
|
||||
"HeaderDownloads": "הורדות",
|
||||
"HeaderEbookFiles": "קבצי Ebook",
|
||||
"HeaderEpisodes": "פרקים",
|
||||
"HeaderEreaderSettings": "הגדרות קורא אלקטרוני",
|
||||
"HeaderLatestEpisodes": "פרקים אחרונים",
|
||||
"HeaderLibraries": "ספריות",
|
||||
"HeaderLocalFolders": "תיקיות מקומיות",
|
||||
"HeaderLocalLibraryItems": "פריטי ספרייה מקומית",
|
||||
"HeaderNewPlaylist": "רשימת השמעה חדשה",
|
||||
"HeaderOpenRSSFeed": "פתח ערוץ RSS",
|
||||
"LabelAddedDate": "נוסף ב-{0}"
|
||||
"HeaderPlaybackSettings": "הגדרות ניגון",
|
||||
"HeaderPlaylist": "רשימת השמעה",
|
||||
"HeaderPlaylistItems": "פריטי רשימת השמעה",
|
||||
"HeaderProgressSyncFailed": "סנכרון ההתקדמות נכשל",
|
||||
"HeaderRSSFeed": "ערוץ RSS",
|
||||
"HeaderRSSFeedGeneral": "פרטי RSS",
|
||||
"HeaderRSSFeedIsOpen": "ערוץ RSS פתוח",
|
||||
"HeaderSelectDownloadLocation": "בחר מיקום להורדה",
|
||||
"HeaderSettings": "הגדרות",
|
||||
"HeaderSleepTimer": "טיימר שינה",
|
||||
"HeaderSleepTimerSettings": "הגדרות טיימר שינה",
|
||||
"HeaderStatsMinutesListeningChart": "דקות האזנה (7 ימים אחרונים)",
|
||||
"HeaderStatsRecentSessions": "האזנות אחרונות",
|
||||
"HeaderTableOfContents": "תוכן עניינים",
|
||||
"HeaderUserInterfaceSettings": "הגדרות ממשק משתמש",
|
||||
"HeaderYourStats": "הסטטיסטיקות שלך",
|
||||
"LabelAddToPlaylist": "הוסף לרשימת השמעה",
|
||||
"LabelAddedAt": "נוסף ב-",
|
||||
"LabelAddedDate": "נוסף ב-{0}",
|
||||
"LabelAll": "הכל",
|
||||
"LabelAllowSeekingOnMediaControls": "אפשר לשנות מיקום בבקר התראות מדיה",
|
||||
"LabelAlways": "תמיד",
|
||||
"LabelAndroidAutoBrowseLimitForGrouping": "מגבלת משיכה אלפביתית",
|
||||
"LabelAndroidAutoBrowseLimitForGroupingHelp": "אל תשתמש במשיכה אלפביתית כאשר יש פחות מכמות פריטים זו להציג",
|
||||
"LabelAndroidAutoBrowseSeriesSequenceOrder": "סדר הספרים בסדרה",
|
||||
"LabelAskConfirmation": "בקש אישור",
|
||||
"LabelAuthor": "סופר",
|
||||
"LabelAuthorFirstLast": "סופר (שם, משפחה)",
|
||||
"LabelAuthorLastFirst": "סופר (משפחה, שם)",
|
||||
"LabelAuthors": "סופרים",
|
||||
"LabelAutoDownloadEpisodes": "הורד פרקים באופן אוטומטי",
|
||||
"LabelAutoRewindTime": "החזרה לאחור באופן אוטומטי",
|
||||
"LabelAutoSleepTimer": "טיימר שינה אוטומטי",
|
||||
"LabelAutoSleepTimerAutoRewind": "החזרת זמן אוטומטית לאחור בטיימר שינה",
|
||||
"LabelAutoSleepTimerAutoRewindHelp": "כאשר טיימר השינה האוטומטי מסתיים, הפעלה נוספת של הפריט תגרום אוטומטית להריץ את מיקומך אחורה.",
|
||||
"LabelAutoSleepTimerHelp": "בעת הפעלת מדיה בין שעות ההתחלה והסיום שצוינו, טיימר שינה יופעל אוטומטית.",
|
||||
"LabelBooks": "ספרים",
|
||||
"LabelChapterTrack": "רצועת פרק",
|
||||
"LabelChapters": "פרקים",
|
||||
"LabelClosePlayer": "סגור נגן",
|
||||
"LabelCollapseSeries": "הסתר סדרה",
|
||||
"LabelComplete": "הושלם",
|
||||
"LabelContinueBooks": "המשך ספרים",
|
||||
"LabelContinueEpisodes": "המשך פרקים",
|
||||
"LabelContinueListening": "המשך האזנה",
|
||||
"LabelContinueReading": "המשך קריאה",
|
||||
"LabelContinueSeries": "המשך סדרה",
|
||||
"LabelCustomTime": "זמן מותאם אישית",
|
||||
"LabelDescription": "תיאור",
|
||||
"LabelDisableAudioFadeOut": "השבתת דהיית שמע",
|
||||
"LabelDisableAudioFadeOutHelp": "עוצמת השמע תתחיל לרדת כאשר נותרה פחות מדקה אחת בטיימר השינה. הפעל הגדרה זו כדי לא לדעוך.",
|
||||
"LabelDisableAutoRewind": "השבתת הרצה אוטומטית אחורה",
|
||||
"LabelDisableShakeToReset": "השבתת ניעור לאיפוס",
|
||||
"LabelDisableShakeToResetHelp": "ניעור המכשיר בזמן שהטיימר פועל או תוך 2 דקות ממועד סופו יאפס את טיימר השינה. הפעל הגדרה זו כדי להשבית את הניעור לצורך איפוס.",
|
||||
"LabelDisableVibrateOnReset": "השבתת רטט באיפוס",
|
||||
"LabelDisableVibrateOnResetHelp": "כאשר טיימר השינה מתאפס, המכשיר ירטוט. הפעל הגדרה זו כדי לא לרטוט כאשר טיימר השינה מתאפס.",
|
||||
"LabelDiscover": "גלה",
|
||||
"LabelDownload": "הורדה",
|
||||
"LabelDownloadUsingCellular": "הורדה באמצעות נתונים סלולריים",
|
||||
"LabelDownloaded": "הורד",
|
||||
"LabelDuration": "משך",
|
||||
"LabelEbook": "ספר אלקטרוני",
|
||||
"LabelEbooks": "ספרים אלקטרוניים",
|
||||
"LabelEnable": "אפשר",
|
||||
"LabelEnableMp3IndexSeeking": "אפשר חיפוש באינדקס mp3",
|
||||
"LabelEnableMp3IndexSeekingHelp": "יש להפעיל הגדרה זו רק אם יש לכם קבצי mp3 שאינם מחפשים כראוי. חיפוש לא מדויק נובע ככל הנראה מקבצי MP3 בעלי קצב סיביות משתנה (VBR). הגדרה זו תכריח חיפוש אינדקס, שבו נבנה מיפוי זמן-לבייט בעת קריאת הקובץ. במקרים מסוימים, עם קבצי MP3 גדולים, יהיה עיכוב בחיפוש לקראת סוף הקובץ.",
|
||||
"LabelEnd": "סוף",
|
||||
"LabelEndOfChapter": "סוף הפרק",
|
||||
"LabelEndTime": "זמן סיום",
|
||||
"LabelEpisode": "פרק",
|
||||
"LabelFeedURL": "כתובת ערוץ",
|
||||
"LabelFile": "קובץ",
|
||||
"LabelFileBirthtime": "זמן יצירת הקובץ",
|
||||
"LabelFileModified": "קובץ נערך",
|
||||
"LabelFilename": "שם קובץ",
|
||||
"LabelFinished": "הושלם",
|
||||
"LabelFolder": "תיקייה",
|
||||
"LabelFontBoldness": "עובי פונט",
|
||||
"LabelFontScale": "גודל פונט",
|
||||
"LabelGenre": "סגנון",
|
||||
"LabelGenres": "סגנונות",
|
||||
"LabelHapticFeedback": "משוב מגע",
|
||||
"LabelHasEbook": "קיים ספר אלקטרוני",
|
||||
"LabelHasSupplementaryEbook": "קיים ספר אלקטרוני משלים",
|
||||
"LabelHeavy": "כבד",
|
||||
"LabelHigh": "גבוה",
|
||||
"LabelHost": "מארח",
|
||||
"LabelInProgress": "בתהליך",
|
||||
"LabelIncomplete": "לא הושלם",
|
||||
"LabelInternalAppStorage": "אחסון אפליקציה פנימי",
|
||||
"LabelJumpBackwardsTime": "הרץ לאחור",
|
||||
"LabelJumpForwardsTime": "הרץ קדימה",
|
||||
"LabelKeepScreenAwake": "השאר מסך דלוק",
|
||||
"LabelLanguage": "שפה",
|
||||
"LabelLayout": "Layout",
|
||||
"LabelLayoutAuto": "אוטומטי",
|
||||
"LabelLayoutSinglePage": "עמוד יחיד",
|
||||
"LabelLight": "בהיר",
|
||||
"LabelLineSpacing": "מרווח שורה",
|
||||
"LabelListenAgain": "האזן שוב",
|
||||
"LabelLocalBooks": "ספרים מקומיים",
|
||||
"LabelLocalPodcasts": "פודקאסטים מקומיים",
|
||||
"LabelLockOrientation": "נעילת כיוון",
|
||||
"LabelLockPlayer": "נעילת נגן",
|
||||
"LabelLow": "נמוך",
|
||||
"LabelMediaType": "סוג מדיה",
|
||||
"LabelMedium": "בינוני",
|
||||
"LabelMissing": "חסר",
|
||||
"LabelMore": "עוד",
|
||||
"LabelMoreInfo": "מידע נוסף",
|
||||
"LabelName": "שם",
|
||||
"LabelNarrator": "מספר",
|
||||
"LabelNarrators": "מספרים",
|
||||
"LabelNavigateWithVolume": "ניווט באמצעות כפתורי ווליום",
|
||||
"LabelNavigateWithVolumeMirrored": "מראה",
|
||||
"LabelNavigateWithVolumeWhilePlaying": "אפשר למקשי ווליום לנווט בזמן ניגון",
|
||||
"LabelNavigateWithVolumeWhilePlayingDisabled": "כיבוי",
|
||||
"LabelNavigateWithVolumeWhilePlayingEnabled": "הדלקה",
|
||||
"LabelNever": "אף פעם",
|
||||
"LabelNewestAuthors": "הסופרים האחרונים",
|
||||
"LabelNewestEpisodes": "הפרקים החדשים ביותר",
|
||||
"LabelNo": "לא",
|
||||
"LabelNotFinished": "לא הושלם",
|
||||
"LabelNotStarted": "לא התחיל",
|
||||
"LabelNumEpisodes": "{0} פרקים",
|
||||
"LabelNumEpisodesIncomplete": "{0} פרקים, {1} לא הושלם",
|
||||
"LabelNumberOfEpisodes": "# פרקים",
|
||||
"LabelOff": "כיבוי",
|
||||
"LabelOn": "הדלקה",
|
||||
"LabelPassword": "סיסמה",
|
||||
"LabelPath": "נתיב",
|
||||
"LabelPlaybackDirect": "ישיר",
|
||||
"LabelPlaybackLocal": "מקומי",
|
||||
"LabelPlaybackSpeed": "מהירות השמעה",
|
||||
"LabelPlaybackTranscode": "קידוד מחדש",
|
||||
"LabelPodcast": "פודקאסט",
|
||||
"LabelPodcasts": "פודקאסטים",
|
||||
"LabelPreventIndexing": "מנע רישום של הערוץ שלך על ידי ספריות אייטונס וגוגל פודקאסט",
|
||||
"LabelProgress": "התקדמות",
|
||||
"LabelPubDate": "תאריך פרסום",
|
||||
"LabelPublishYear": "שנת הפרסום",
|
||||
"LabelPublishedDate": "פורסם {0}",
|
||||
"LabelRSSFeedCustomOwnerEmail": "אימייל בעלים מותאם אישית",
|
||||
"LabelRSSFeedCustomOwnerName": "שם בעלים מותאם אישית",
|
||||
"LabelRSSFeedPreventIndexing": "מנע רישום",
|
||||
"LabelRSSFeedSlug": "Slug של ערוץ ה-RSS",
|
||||
"LabelRandomly": "באופן אקראי",
|
||||
"LabelRead": "קריאה",
|
||||
"LabelReadAgain": "קרא שוב",
|
||||
"LabelRecentSeries": "סדרות אחרונות",
|
||||
"LabelRecentlyAdded": "נוסף לאחרונה",
|
||||
"LabelRemoveFromPlaylist": "הסרה מרשימת השמעה",
|
||||
"LabelScaleElapsedTimeBySpeed": "שנה קנה מידה של זמן שחלף לפי מהירות ההשמעה",
|
||||
"LabelSeason": "עונה",
|
||||
"LabelSelectADevice": "בחר מכשיר",
|
||||
"LabelSequenceAscending": "רצף עולה",
|
||||
"LabelSequenceDescending": "רצף יורד",
|
||||
"LabelSeries": "סדרה",
|
||||
"LabelServerAddress": "כתובת שרת",
|
||||
"LabelSetEbookAsPrimary": "קבע כראשי",
|
||||
"LabelSetEbookAsSupplementary": "קבע כמשלים",
|
||||
"LabelShakeSensitivity": "רגישות ניעור",
|
||||
"LabelShowAll": "הצג הכל",
|
||||
"LabelSize": "גודל",
|
||||
"LabelSleepTimer": "טיימר שינה",
|
||||
"LabelSleepTimerAlmostDoneChime": "השמע פעמון כאשר כמעט הסתיים",
|
||||
"LabelSleepTimerAlmostDoneChimeHelp": "השמע פעמון כאשר נשארו 30 שניות לסיום טיימר השינה",
|
||||
"LabelStart": "התחל",
|
||||
"LabelStartTime": "זמן התחלה",
|
||||
"LabelStatsBestDay": "היום הטוב ביותר",
|
||||
"LabelStatsDailyAverage": "ממוצע יומי",
|
||||
"LabelStatsDays": "ימים",
|
||||
"LabelStatsDaysListened": "מספר ימים בהם נשמע ספר",
|
||||
"LabelStatsInARow": "ברצף",
|
||||
"LabelStatsItemsFinished": "פריטים שסיימת",
|
||||
"LabelStatsMinutes": "דקות",
|
||||
"LabelStatsMinutesListening": "דקות האזנה",
|
||||
"LabelStatsWeekListening": "האזנה שבועית",
|
||||
"LabelStreamingUsingCellular": "הזרמת באמצעות נתונים סלולריים",
|
||||
"LabelTag": "תג",
|
||||
"LabelTags": "תגיות",
|
||||
"LabelTheme": "ערכת נושא",
|
||||
"LabelThemeBlack": "שחור",
|
||||
"LabelThemeDark": "כהה",
|
||||
"LabelThemeLight": "בהיר",
|
||||
"LabelTimeRemaining": "{0} נותרו",
|
||||
"LabelTitle": "כותרת",
|
||||
"LabelTotalSize": "סה״כ גודל",
|
||||
"LabelTotalTrack": "סה״כ רצועות",
|
||||
"LabelTracks": "רצועות",
|
||||
"LabelType": "סוג",
|
||||
"LabelUnknown": "לא ידוע",
|
||||
"LabelUnlockPlayer": "בטל נעילת נגן",
|
||||
"LabelUseBookshelfView": "שימוש בתצוגת מדף ספרים",
|
||||
"LabelUser": "משתמש",
|
||||
"LabelUsername": "שם משתמש",
|
||||
"LabelVeryHigh": "גבוה מאוד",
|
||||
"LabelVeryLow": "נמוך מאוד",
|
||||
"LabelYearReviewHide": "הסתר סקירת שנה",
|
||||
"LabelYearReviewShow": "הצג סקירת שנה",
|
||||
"LabelYourBookmarks": "הסימניות שלך",
|
||||
"LabelYourProgress": "ההתקדמות שלך",
|
||||
"MessageAndroid10Downloads": "מכשירי אנדרואיד 10 או נמוך יותר ישתמשו באחסון היישום הפנימי להורדות.",
|
||||
"MessageAttemptingServerConnection": "מנסה להתחבר לשרת...",
|
||||
"MessageAudiobookshelfServerNotConnected": "לא מחובר לשרת Audiobookshelf",
|
||||
"MessageAudiobookshelfServerRequired": "<strong>חשוב!</strong> אפליקציה זו מתוכננת לעבוד עם שרת Audiobookshelf שאת/ה או מישהו שאת/ה מכיר/ה מארח/ת. האפליקציה בפני עצמה לא מספקת שום תוכן.",
|
||||
"MessageBookshelfEmpty": "ספריה ריקה",
|
||||
"MessageConfirmDeleteLocalEpisode": "להסיר את הפרק המקומי \"{0}\" מהמכשיר שלך? הקובץ בשרת לא יושפע.",
|
||||
"MessageConfirmDeleteLocalFiles": "להסיר קבצים מקומיים של פריט זה מהמכשיר שלך? הקבצים בשרת והתקדמותך לא יושפעו.",
|
||||
"MessageConfirmDisableAutoTimer": "האם אתה בטוח שאתה רוצה להשבית את הטיימר האוטומי עד סוף היום? הטיימר יופעל מחדש לאחר הטיימר השינה הנוכחי יסתיים, או לאחר הפעלה מחדש של האפליקציה.",
|
||||
"MessageConfirmDiscardProgress": "אתה בטוח שאתה רוצה לאפס את ההתקדמות שלך?",
|
||||
"MessageConfirmDownloadUsingCellular": "אתה עומד להוריד באמצעות נתונים סלולריים. ספק הסלולר עשוי לחייב על שימוש בנתונים סלולריים, האם להמשיך?",
|
||||
"MessageConfirmMarkAsFinished": "אתה בטוח שאתה רוצה לסמן את הפריט הזה כהושלם?",
|
||||
"MessageConfirmRemoveBookmark": "האם להסיר את הסימניה?",
|
||||
"MessageConfirmStreamingUsingCellular": "אתה עומד להזרים באמצעות נתונים סלולריים. ספק הסלולר עשוי לחייב על שימוש בנתונים סלולריים, האם להמשיך?",
|
||||
"MessageDiscardProgress": "איפוס התקדמות",
|
||||
"MessageDownloadCompleteProcessing": "ההורדה הושלמה. מעבד...",
|
||||
"MessageDownloading": "מוריד...",
|
||||
"MessageDownloadingEpisode": "מוריד פרק",
|
||||
"MessageEpisodesQueuedForDownload": "{0} פרק/ים בתור להורדה",
|
||||
"MessageFeedURLWillBe": "כתובת ה- URL של הערוץ תהיה {0}",
|
||||
"MessageFetching": "מושך...",
|
||||
"MessageFollowTheProjectOnGithub": "עקבו אחרי הפרוייקט ב-Github",
|
||||
"MessageItemDownloadCompleteFailedToCreate": "הורדת הפריט הושלמה אך יצירת פריט בספריה נכשלה",
|
||||
"MessageItemMissing": "הפריט חסר ונדרש תיקונו בשרת. בדרך כלל פריט מסומן כחסר כי נתיבי הקובץ הקיימים לא נגישים.",
|
||||
"MessageLoading": "טוען...",
|
||||
"MessageLoadingServerData": "טוען נתוני שרת...",
|
||||
"MessageLocalFolderDescription": "\"אחסון אפליקציה פנימי\" זמין רק על ידי אפליקציה זו. אפליקציה זו תומכת רק במדיה שהורדה ישירות ע״י האפליקציה עצמה. ניתן להשתמש בתיקיות אחסון משותפות בכדי לאפשר ליישומים אחרים לגשת מדיה שהורדה ע״י אפליקציה זו.",
|
||||
"MessageMarkAsFinished": "סמן כהושלם",
|
||||
"MessageMediaLinkedToADifferentServer": "מדיה מקושרת לשרת Audiobookshelf בכתובת אחרת ({0}). ההתקדמות תהיה מסונכרנת כאשר היא האפליקציה תהיה מחוברת לכתובת שרת זו.",
|
||||
"MessageMediaLinkedToADifferentUser": "מדיה מקושרת לשרת זה אבל הורדה ע״י משתמש אחר. התקדמות תסונכרן רק למשתמש שהוריד אותה.",
|
||||
"MessageMediaLinkedToServer": "מקושר לשרת {0}",
|
||||
"MessageMediaLinkedToThisServer": "המדיה שהורדה מקושרת לשרת זה",
|
||||
"MessageMediaNotLinkedToServer": "מדיה לא מקושרת לשרת Audiobookshelf. התקדמות לא תהיה מסונכרנת.",
|
||||
"MessageNoBookmarks": "אין סימניות",
|
||||
"MessageNoChapters": "אין פרקים",
|
||||
"MessageNoCollections": "אין אוספים",
|
||||
"MessageNoItems": "אין פריטים",
|
||||
"MessageNoItemsFound": "לא נמצאו פריטים",
|
||||
"MessageNoListeningSessions": "אין הפעלות האזנה",
|
||||
"MessageNoLogs": "אין לוגים",
|
||||
"MessageNoMediaFolders": "אין תיקיות מדיה",
|
||||
"MessageNoNetworkConnection": "אין חיבור לרשת",
|
||||
"MessageNoPodcastsFound": "לא נמצאו פודקאסטים",
|
||||
"MessageNoSeries": "אין סדרות",
|
||||
"MessageNoUpdatesWereNecessary": "לא נדרש עדכון",
|
||||
"MessageNoUserPlaylists": "אין לך רשימות השמעה",
|
||||
"MessageOldServerConnectionWarning": "תצורת חיבור שרת משתמשת במזהה משתמש ישן. נא למחוק ולהתחבר מחדש לשרת זה.",
|
||||
"MessageOldServerConnectionWarningHelp": "הגדרת במקור את החיבור לשרת זה לפני העברת מסד הנתונים בגרסה 2.3.0, שיצאה ביוני 2023. עדכון שרת עתידי יסיר את היכולת להתחבר באמצעות חיבור ישן זה. אנא מחק את חיבור השרת הקיים והתחבר שוב (תוך שימוש באותה כתובת שרת ופרטי גישה). אם הורדת מדיה כלשהי במכשיר זה, יהיה צורך להוריד אותה שוב כדי שתסתנכרן עם השרת.",
|
||||
"MessagePodcastSearchField": "הזן מונח חיפוש או כתובת URL של ערוץ RSS",
|
||||
"MessageProgressSyncFailed": "הניסיון האחרון לדווח על התקדמות ההאזנה שלך לשרת נכשל. בקשות סנכרון התקדמות ימשיכו להתבצע כל 15 שניות עד דקה בזמן שהמדיה מופעלת.",
|
||||
"MessageReportBugsAndContribute": "דווח על באגים, בקש תכונות חדשות, ותרום ב-",
|
||||
"MessageSeriesAlreadyDownloaded": "כבר הורדת את כל הספרים בסדרה זו.",
|
||||
"MessageSeriesDownloadConfirm": "להוריד את הספר החסר {0} עם {1} קבצים ,סה״כ {2} לתיקיה {3}?",
|
||||
"MessageSeriesDownloadConfirmIos": "להוריד את הספר החסר {0} עם {1} קבצים ,סה״כ {2}?",
|
||||
"MessageSocketConnectedOverMeteredCellular": "מחובר באמצעות רשת סלולרית",
|
||||
"MessageSocketConnectedOverMeteredWifi": "מחוברת באמצעות רשת WiFi מדודה",
|
||||
"MessageSocketConnectedOverUnmeteredCellular": "מחובר באמצעות רשת סלולרית לא מדודה",
|
||||
"MessageSocketConnectedOverUnmeteredWifi": "מחוברת באמצעות רשת WiFi לא מדודה",
|
||||
"MessageSocketNotConnected": "לא מחובר",
|
||||
"NoteRSSFeedPodcastAppsHttps": "אזהרה: רוב אפליקציות הפודקאסטים ידרשו שכתובת האתר של ערוץ ה-RSS תשתמש ב-HTTPS",
|
||||
"NoteRSSFeedPodcastAppsPubDate": "אזהרה: פרק אחד או יותר לא מכילים תאריך פרסום. חלק מיישומי הפודקאסט דורשים זאת.",
|
||||
"ToastBookmarkCreateFailed": "יצירת סימניה נכשלה",
|
||||
"ToastBookmarkRemoveFailed": "הסרת הסימניה נכשלה",
|
||||
"ToastBookmarkUpdateFailed": "עדכון הסימניה נכשל",
|
||||
"ToastDownloadNotAllowedOnCellular": "הורדה אינה מותרת באמצעות נתונים סלולריים",
|
||||
"ToastItemMarkedAsFinishedFailed": "סימון כפריט שהושלם נכשל",
|
||||
"ToastItemMarkedAsNotFinishedFailed": "סימון כפריט שלא הושלם נכשל",
|
||||
"ToastPlaylistCreateFailed": "יצירת רשימת השמעה נכשלה",
|
||||
"ToastPodcastCreateFailed": "יצירת הפודקאסט נכשלה",
|
||||
"ToastPodcastCreateSuccess": "הפודקאסט נוצר בהצלחה",
|
||||
"ToastRSSFeedCloseFailed": "סגירת ערוץ ה-RSS נכשלה",
|
||||
"ToastRSSFeedCloseSuccess": "ערוץ ה-RSS נסגר בהצלחה",
|
||||
"ToastStreamingNotAllowedOnCellular": "הזרמה אינה מותרת באמצעות נתונים סלולריים"
|
||||
}
|
||||
|
||||
@@ -6,16 +6,34 @@
|
||||
"ButtonCancel": "रद्द करें",
|
||||
"ButtonCancelTimer": "टाइमर रद्द करें",
|
||||
"ButtonClearFilter": "लागू फ़िल्टर साफ़ करें",
|
||||
"ButtonClearLogs": "अभिलेख साफ़ करें",
|
||||
"ButtonCloseFeed": "फ़ीड बंद करें",
|
||||
"ButtonCollections": "संग्रह",
|
||||
"ButtonConnect": "जोड़ना",
|
||||
"ButtonConnectToServer": "सर्वर से संबद्ध स्थापित करें",
|
||||
"ButtonCreate": "बनाएं",
|
||||
"ButtonCreateBookmark": "बुकमार्क बनाएं",
|
||||
"ButtonCreateNewPlaylist": "प्लेलिस्ट बनाएं",
|
||||
"ButtonDelete": "हटाएं",
|
||||
"ButtonDeleteLocalEpisode": "स्थानीय प्रकरण हटाएँ",
|
||||
"ButtonDeleteLocalFile": "स्थानीय फ़ाइल हटाएँ",
|
||||
"ButtonDeleteLocalItem": "स्थानीय वस्तु हटाएँ",
|
||||
"ButtonDisableAutoTimer": "स्वचालित घड़ी अक्षम करें",
|
||||
"ButtonDisconnect": "सर्वर संबद्ध तोड़े",
|
||||
"ButtonGoToWebClient": "वेब क्लाइंट पर जाएँ",
|
||||
"ButtonHistory": "इतिहास",
|
||||
"ButtonHome": "घर",
|
||||
"ButtonIssues": "समस्याएं",
|
||||
"ButtonLatest": "नवीनतम",
|
||||
"ButtonLibrary": "पुस्तकालय",
|
||||
"ButtonLogs": "अभिलेख",
|
||||
"ButtonManageLocalFiles": "स्थानीय फ़ाइल प्रबंधित करें",
|
||||
"ButtonMaskServerAddress": "सर्वर पता नकाबपोश करें",
|
||||
"ButtonNewFolder": "नया फ़ोल्डर",
|
||||
"ButtonNextEpisode": "अगला एपिसोड",
|
||||
"ButtonOk": "ठीक है",
|
||||
"ButtonOpenFeed": "फ़ीड खोलें",
|
||||
"ButtonOverride": "अवहेलना करें",
|
||||
"ButtonPlay": "चलाएँ",
|
||||
"ButtonPlaylists": "प्लेलिस्ट्स",
|
||||
"ButtonRead": "पढ़ लिया",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user