mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-22 16:34:10 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab05d7fb5f | ||
|
|
5de038dafd | ||
|
|
a5540d07c6 | ||
|
|
1e0921100b | ||
|
|
54f1f5c7a4 | ||
|
|
79b5fe0784 | ||
|
|
fc11bb4947 | ||
|
|
0776e8079e | ||
|
|
bf1c5688b9 | ||
|
|
1430c9fc64 | ||
|
|
84a7061cb4 | ||
|
|
9a7f331ab5 | ||
|
|
23eff31a2d | ||
|
|
3ebd8c0068 | ||
|
|
cefa357c87 | ||
|
|
f78811882b | ||
|
|
cc0675d27c | ||
|
|
9301910b2f | ||
|
|
8f04237659 | ||
|
|
26028a3619 | ||
|
|
c68798d66c | ||
|
|
125774083c | ||
|
|
6ee1618b8a | ||
|
|
0bff6c02cb | ||
|
|
870e3e313c | ||
|
|
38b6e6d92c | ||
|
|
c5c9e6c844 | ||
|
|
8f69ca0f78 | ||
|
|
2a14f96b53 | ||
|
|
25a82ae964 | ||
|
|
2b2a3f63a6 | ||
|
|
d875332b86 | ||
|
|
3c622c89e0 | ||
|
|
94f3035489 | ||
|
|
1eb5b9f1bc | ||
|
|
c6918b6828 | ||
|
|
c5e6e463e4 | ||
|
|
95aa00af90 | ||
|
|
1d89e3a58c | ||
|
|
75d85e971b | ||
|
|
41cbcf551d | ||
|
|
3e0333877b | ||
|
|
2dde0bf1c7 | ||
|
|
e9ff70e522 | ||
|
|
1e60d7af64 | ||
|
|
83dce682e8 | ||
|
|
f88fdf1321 | ||
|
|
20fd0cd700 | ||
|
|
9b055f80a6 | ||
|
|
04acd53667 | ||
|
|
8af3448ac0 | ||
|
|
cf1f162aba | ||
|
|
92bae242f1 | ||
|
|
49c0ef6c07 | ||
|
|
420c2b28ed | ||
|
|
f35f40929d | ||
|
|
34b037087b | ||
|
|
f57ca09f6e | ||
|
|
844b04c6ae | ||
|
|
149bae7d73 | ||
|
|
d6d0cf6b8f | ||
|
|
c38fe60360 | ||
|
|
087099faa3 | ||
|
|
8c87ae8bad | ||
|
|
ce41ce489c | ||
|
|
b31af26837 | ||
|
|
4072054e00 | ||
|
|
f1f57d6595 | ||
|
|
7aaa734d3e | ||
|
|
48d9309eb2 | ||
|
|
f85d03ce26 | ||
|
|
616c8ba152 | ||
|
|
edb1f7efc9 | ||
|
|
92517f473b | ||
|
|
9715c7a8f7 | ||
|
|
95cb5bad27 | ||
|
|
5cb461f9b5 | ||
|
|
16aa80ed5c | ||
|
|
743d915220 | ||
|
|
34715558df | ||
|
|
2a0507ffc6 | ||
|
|
cff295fdc9 | ||
|
|
6b60beff6e | ||
|
|
db433ce076 | ||
|
|
5edd20dfa3 | ||
|
|
3f9afe57bc | ||
|
|
ac63b0c7fc | ||
|
|
94400acdcd |
No files matched your search
@@ -1,40 +1,31 @@
|
|||||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||||
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
|
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
|
||||||
{
|
{
|
||||||
"name": "Audiobookshelf",
|
"name": "Audiobookshelf",
|
||||||
"build": {
|
"build": {
|
||||||
"dockerfile": "Dockerfile",
|
"dockerfile": "Dockerfile",
|
||||||
// Update 'VARIANT' to pick a Node version: 18, 16, 14.
|
// Update 'VARIANT' to pick a Node version: 18, 16, 14.
|
||||||
// Append -bullseye or -buster to pin to an OS version.
|
// Append -bullseye or -buster to pin to an OS version.
|
||||||
// Use -bullseye variants on local arm64/Apple Silicon.
|
// Use -bullseye variants on local arm64/Apple Silicon.
|
||||||
"args": {
|
"args": {
|
||||||
"VARIANT": "20"
|
"VARIANT": "24"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mounts": [
|
"mounts": ["source=abs-server-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume", "source=abs-client-node_modules,target=${containerWorkspaceFolder}/client/node_modules,type=volume"],
|
||||||
"source=abs-server-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume",
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
"source=abs-client-node_modules,target=${containerWorkspaceFolder}/client/node_modules,type=volume"
|
// "features": {},
|
||||||
],
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
"forwardPorts": [3000, 3333],
|
||||||
// "features": {},
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
"postCreateCommand": "sh .devcontainer/post-create.sh",
|
||||||
"forwardPorts": [
|
// Configure tool-specific properties.
|
||||||
3000,
|
"customizations": {
|
||||||
3333
|
// Configure properties specific to VS Code.
|
||||||
],
|
"vscode": {
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
// Add the IDs of extensions you want installed when the container is created.
|
||||||
"postCreateCommand": "sh .devcontainer/post-create.sh",
|
"extensions": ["dbaeumer.vscode-eslint", "octref.vetur"]
|
||||||
// Configure tool-specific properties.
|
}
|
||||||
"customizations": {
|
}
|
||||||
// Configure properties specific to VS Code.
|
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||||
"vscode": {
|
// "remoteUser": "root"
|
||||||
// Add the IDs of extensions you want installed when the container is created.
|
}
|
||||||
"extensions": [
|
|
||||||
"dbaeumer.vscode-eslint",
|
|
||||||
"octref.vetur"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
|
||||||
// "remoteUser": "root"
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
# Builds the v3 test image
|
||||||
|
#
|
||||||
|
# Moves the :v3 tag on Docker Hub and GHCR, the same way master
|
||||||
|
# moves :edge. Using the server's v3 branch and react-client master.
|
||||||
|
#
|
||||||
|
# repository_dispatch (build-v3) is for triggering a build on updates to react-client
|
||||||
|
|
||||||
|
name: Build and Push v3 Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [v3]
|
||||||
|
repository_dispatch:
|
||||||
|
types: [build-v3]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
if: ${{ github.repository == 'advplyr/audiobookshelf' && (github.event_name != 'push' || !contains(github.event.head_commit.message, 'skip ci')) }}
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out server
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event_name == 'repository_dispatch' && 'v3' || github.sha }}
|
||||||
|
|
||||||
|
- name: Check out React client
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: audiobookshelf/audiobookshelf-client-react
|
||||||
|
ref: master
|
||||||
|
path: client-react
|
||||||
|
|
||||||
|
- name: Server sha
|
||||||
|
id: server-sha
|
||||||
|
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Client sha
|
||||||
|
id: client-sha
|
||||||
|
working-directory: client-react
|
||||||
|
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: advplyr/audiobookshelf,ghcr.io/${{ github.repository_owner }}/audiobookshelf
|
||||||
|
flavor: |
|
||||||
|
latest=false
|
||||||
|
tags: |
|
||||||
|
type=raw,value=v3
|
||||||
|
labels: |
|
||||||
|
audiobookshelf.server.sha=${{ steps.server-sha.outputs.sha }}
|
||||||
|
audiobookshelf.client.sha=${{ steps.client-sha.outputs.sha }}
|
||||||
|
|
||||||
|
- name: Setup QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Cache Docker layers
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: /tmp/.buildx-cache
|
||||||
|
key: ${{ runner.os }}-buildx-v3-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-buildx-v3-
|
||||||
|
|
||||||
|
- name: Login to Dockerhub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Login to ghcr
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GHCR_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build image
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
file: client-react/Dockerfile
|
||||||
|
context: .
|
||||||
|
build-contexts: |
|
||||||
|
abs-client=client-react
|
||||||
|
abs-server=.
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
|
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
||||||
|
|
||||||
|
- name: Move cache
|
||||||
|
run: |
|
||||||
|
rm -rf /tmp/.buildx-cache
|
||||||
|
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# Security
|
||||||
|
|
||||||
|
Report security issues through GitHub private vulnerability reporting.
|
||||||
|
|
||||||
|
Failed logins (`POST /login`) share one server-wide limit. Failed password changes (`PATCH /api/me/password`) are limited per user. Neither limit uses the client IP. Set `RATE_LIMIT_AUTH_MAX=0` to disable both.
|
||||||
|
|
||||||
|
Anything beyond those two limits is the server operator's responsibility. Add a rate limiter in front of the server if you want one. A missing limiter on any other route is out of scope unless the report shows a guessable secret or a resource that grows without a bound.
|
||||||
+6
-1
@@ -35,7 +35,6 @@ echo "--------------------"
|
|||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
rm -rf dist/debian
|
rm -rf dist/debian
|
||||||
cp -R build/debian dist/debian
|
cp -R build/debian dist/debian
|
||||||
chmod -R 775 dist/debian
|
|
||||||
|
|
||||||
controlfile="Package: audiobookshelf
|
controlfile="Package: audiobookshelf
|
||||||
Version: $VERSION
|
Version: $VERSION
|
||||||
@@ -48,6 +47,12 @@ Description: $DESCRIPTION"
|
|||||||
|
|
||||||
echo "$controlfile" > dist/debian/DEBIAN/control;
|
echo "$controlfile" > dist/debian/DEBIAN/control;
|
||||||
|
|
||||||
|
# Package contents: directories 0755, files 0644 (including the systemd unit).
|
||||||
|
# Maintainer scripts must stay executable so dpkg can run them.
|
||||||
|
find dist/debian -type d -exec chmod 755 {} +
|
||||||
|
find dist/debian -type f -exec chmod 644 {} +
|
||||||
|
chmod 755 dist/debian/DEBIAN/preinst dist/debian/DEBIAN/postinst dist/debian/DEBIAN/prerm
|
||||||
|
|
||||||
# Package debian
|
# Package debian
|
||||||
pkg --config package.json -t node24-linux-x64 -o dist/debian/usr/share/audiobookshelf/audiobookshelf dist-server/index.js
|
pkg --config package.json -t node24-linux-x64 -o dist/debian/usr/share/audiobookshelf/audiobookshelf dist-server/index.js
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<div v-if="userCanUpdate" class="mx-1" :class="isHovering ? '' : 'ml-6'">
|
<div v-if="userCanUpdate" class="mx-1" :class="isHovering ? '' : 'ml-6'">
|
||||||
<ui-icon-btn icon="edit" borderless @click="clickEdit" />
|
<ui-icon-btn icon="edit" borderless @click="clickEdit" />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="userCanDelete" class="mx-1">
|
<div v-if="userCanUpdate" class="mx-1">
|
||||||
<ui-icon-btn icon="close" borderless @click="removeClick" />
|
<ui-icon-btn icon="close" borderless @click="removeClick" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -79,8 +79,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
translateDistance() {
|
translateDistance() {
|
||||||
if (!this.userCanUpdate && !this.userCanDelete) return 'translate-x-0'
|
if (!this.userCanUpdate) return 'translate-x-0'
|
||||||
else if (!this.userCanUpdate || !this.userCanDelete) return '-translate-x-12'
|
|
||||||
return '-translate-x-24'
|
return '-translate-x-24'
|
||||||
},
|
},
|
||||||
media() {
|
media() {
|
||||||
@@ -144,9 +143,6 @@ export default {
|
|||||||
},
|
},
|
||||||
userCanUpdate() {
|
userCanUpdate() {
|
||||||
return this.$store.getters['user/getUserCanUpdate']
|
return this.$store.getters['user/getUserCanUpdate']
|
||||||
},
|
|
||||||
userCanDelete() {
|
|
||||||
return this.$store.getters['user/getUserCanDelete']
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "audiobookshelf-client",
|
"name": "audiobookshelf-client",
|
||||||
"version": "2.37.1",
|
"version": "3.0.0-beta",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "audiobookshelf-client",
|
"name": "audiobookshelf-client",
|
||||||
"version": "2.37.1",
|
"version": "3.0.0-beta",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxtjs/axios": "^5.13.6",
|
"@nuxtjs/axios": "^5.13.6",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "audiobookshelf-client",
|
"name": "audiobookshelf-client",
|
||||||
"version": "2.37.1",
|
"version": "3.0.0-beta",
|
||||||
"buildNumber": 1,
|
"buildNumber": 1,
|
||||||
"description": "Self-hosted audiobook and podcast client",
|
"description": "Self-hosted audiobook and podcast client",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
|||||||
@@ -13,11 +13,6 @@
|
|||||||
<widgets-online-indicator :value="!!userOnline" />
|
<widgets-online-indicator :value="!!userOnline" />
|
||||||
<h1 class="text-xl pl-2">{{ username }}</h1>
|
<h1 class="text-xl pl-2">{{ username }}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="legacyToken" class="text-xs space-y-2 mt-4">
|
|
||||||
<ui-text-input-with-label label="Legacy API Token" :value="legacyToken" readonly show-copy />
|
|
||||||
|
|
||||||
<p class="text-warning" v-html="$strings.MessageAuthenticationLegacyTokenWarning" />
|
|
||||||
</div>
|
|
||||||
<div class="w-full h-px bg-white/10 my-2" />
|
<div class="w-full h-px bg-white/10 my-2" />
|
||||||
<div class="py-2">
|
<div class="py-2">
|
||||||
<h1 class="text-lg mb-2 text-white/90 px-2 sm:px-0">{{ $strings.HeaderListeningStats }}</h1>
|
<h1 class="text-lg mb-2 text-white/90 px-2 sm:px-0">{{ $strings.HeaderListeningStats }}</h1>
|
||||||
@@ -102,12 +97,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
legacyToken() {
|
|
||||||
return this.user.token
|
|
||||||
},
|
|
||||||
userToken() {
|
|
||||||
return this.user.accessToken
|
|
||||||
},
|
|
||||||
bookCoverAspectRatio() {
|
bookCoverAspectRatio() {
|
||||||
return this.$store.getters['libraries/getBookCoverAspectRatio']
|
return this.$store.getters['libraries/getBookCoverAspectRatio']
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-24
@@ -40,15 +40,6 @@
|
|||||||
|
|
||||||
<p v-if="error" class="text-error text-center py-2">{{ error }}</p>
|
<p v-if="error" class="text-error text-center py-2">{{ error }}</p>
|
||||||
|
|
||||||
<div v-if="showNewAuthSystemMessage" class="mb-4">
|
|
||||||
<widgets-alert type="warning">
|
|
||||||
<div>
|
|
||||||
<p>{{ $strings.MessageAuthenticationSecurityMessage }}</p>
|
|
||||||
<a v-if="showNewAuthSystemAdminMessage" href="https://github.com/advplyr/audiobookshelf/discussions/4460" target="_blank" class="underline">{{ $strings.LabelMoreInfo }}</a>
|
|
||||||
</div>
|
|
||||||
</widgets-alert>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form v-show="login_local" @submit.prevent="submitForm">
|
<form v-show="login_local" @submit.prevent="submitForm">
|
||||||
<label class="text-xs text-gray-300 uppercase">{{ $strings.LabelUsername }}</label>
|
<label class="text-xs text-gray-300 uppercase">{{ $strings.LabelUsername }}</label>
|
||||||
<ui-text-input v-model.trim="username" autocomplete="username" :disabled="processing" class="mb-3 w-full" inputName="username" />
|
<ui-text-input v-model.trim="username" autocomplete="username" :disabled="processing" class="mb-3 w-full" inputName="username" />
|
||||||
@@ -94,10 +85,7 @@ export default {
|
|||||||
MetadataPath: '',
|
MetadataPath: '',
|
||||||
login_local: true,
|
login_local: true,
|
||||||
login_openid: false,
|
login_openid: false,
|
||||||
authFormData: null,
|
authFormData: null
|
||||||
// New JWT auth system re-login flags
|
|
||||||
showNewAuthSystemMessage: false,
|
|
||||||
showNewAuthSystemAdminMessage: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -201,8 +189,6 @@ export default {
|
|||||||
},
|
},
|
||||||
async submitForm() {
|
async submitForm() {
|
||||||
this.error = null
|
this.error = null
|
||||||
this.showNewAuthSystemMessage = false
|
|
||||||
this.showNewAuthSystemAdminMessage = false
|
|
||||||
this.processing = true
|
this.processing = true
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
@@ -238,15 +224,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// Force re-login if user is using an old token with no expiration
|
|
||||||
if (res.user.isOldToken) {
|
|
||||||
this.username = res.user.username
|
|
||||||
this.showNewAuthSystemMessage = true
|
|
||||||
// Admin user sees link to github discussion
|
|
||||||
this.showNewAuthSystemAdminMessage = res.user.type === 'admin' || res.user.type === 'root'
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setUser(res)
|
this.setUser(res)
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1030,8 +1030,8 @@
|
|||||||
"ToastCollectionItemsAddFailed": "Přidávání položek do kolekce selhalo",
|
"ToastCollectionItemsAddFailed": "Přidávání položek do kolekce selhalo",
|
||||||
"ToastCollectionRemoveSuccess": "Kolekce odstraněna",
|
"ToastCollectionRemoveSuccess": "Kolekce odstraněna",
|
||||||
"ToastCollectionUpdateSuccess": "Kolekce aktualizována",
|
"ToastCollectionUpdateSuccess": "Kolekce aktualizována",
|
||||||
"ToastConnectionNotAvailable": "Připojení není k dispozici. Zkuste to prosím znovu později",
|
"ToastConnectionNotAvailable": "Připojení není k dispozici. Prosím zkuste to později.",
|
||||||
"ToastCoverSearchFailed": "Hledání obálky se nezdařilo",
|
"ToastCoverSearchFailed": "Vyhledání obalu selhalo",
|
||||||
"ToastCoverUpdateFailed": "Aktualizace obálky selhala",
|
"ToastCoverUpdateFailed": "Aktualizace obálky selhala",
|
||||||
"ToastDateTimeInvalidOrIncomplete": "Datum a čas jsou chybné nebo nekompletní",
|
"ToastDateTimeInvalidOrIncomplete": "Datum a čas jsou chybné nebo nekompletní",
|
||||||
"ToastDeleteFileFailed": "Nepodařilo se smazat soubor",
|
"ToastDeleteFileFailed": "Nepodařilo se smazat soubor",
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
"ButtonEditChapters": "Rediger kapitler",
|
"ButtonEditChapters": "Rediger kapitler",
|
||||||
"ButtonEditPodcast": "Rediger podcast",
|
"ButtonEditPodcast": "Rediger podcast",
|
||||||
"ButtonEnable": "Aktivér",
|
"ButtonEnable": "Aktivér",
|
||||||
"ButtonFireAndFail": "Affyring Og Fejl",
|
"ButtonFireAndFail": "Affyring og Fejl",
|
||||||
"ButtonFireOnTest": "Udløs onTest-hændelse",
|
"ButtonFireOnTest": "Udløs onTest-hændelse",
|
||||||
"ButtonForceReScan": "Tving genskanning",
|
"ButtonForceReScan": "Tving genskanning",
|
||||||
"ButtonFullPath": "Fuld sti",
|
"ButtonFullPath": "Fuld sti",
|
||||||
@@ -46,6 +46,7 @@
|
|||||||
"ButtonLatest": "Seneste",
|
"ButtonLatest": "Seneste",
|
||||||
"ButtonLibrary": "Bibliotek",
|
"ButtonLibrary": "Bibliotek",
|
||||||
"ButtonLogout": "Log ud",
|
"ButtonLogout": "Log ud",
|
||||||
|
"ButtonLogoutAllDevices": "Log ud af alle enheder",
|
||||||
"ButtonLookup": "Slå op",
|
"ButtonLookup": "Slå op",
|
||||||
"ButtonManageTracks": "Administrer spor",
|
"ButtonManageTracks": "Administrer spor",
|
||||||
"ButtonMapChapterTitles": "Kortlæg kapiteloverskrifter",
|
"ButtonMapChapterTitles": "Kortlæg kapiteloverskrifter",
|
||||||
@@ -194,6 +195,7 @@
|
|||||||
"HeaderScheduleEpisodeDownloads": "Planlæg automatisk hentning af afsnit",
|
"HeaderScheduleEpisodeDownloads": "Planlæg automatisk hentning af afsnit",
|
||||||
"HeaderScheduleLibraryScans": "Planlæg automatisk biblioteksskanning",
|
"HeaderScheduleLibraryScans": "Planlæg automatisk biblioteksskanning",
|
||||||
"HeaderSession": "Session",
|
"HeaderSession": "Session",
|
||||||
|
"HeaderSessions": "Sessioner",
|
||||||
"HeaderSetBackupSchedule": "Indstil tidsplan for sikkerhedskopiering",
|
"HeaderSetBackupSchedule": "Indstil tidsplan for sikkerhedskopiering",
|
||||||
"HeaderSettings": "Indstillinger",
|
"HeaderSettings": "Indstillinger",
|
||||||
"HeaderSettingsDisplay": "Visning",
|
"HeaderSettingsDisplay": "Visning",
|
||||||
@@ -415,6 +417,7 @@
|
|||||||
"LabelIntervalEveryHour": "Hver time",
|
"LabelIntervalEveryHour": "Hver time",
|
||||||
"LabelIntervalEveryMinute": "Hvert minut",
|
"LabelIntervalEveryMinute": "Hvert minut",
|
||||||
"LabelInvert": "Omvendt begrænsning",
|
"LabelInvert": "Omvendt begrænsning",
|
||||||
|
"LabelIpAddress": "IP Adresse",
|
||||||
"LabelItem": "Element",
|
"LabelItem": "Element",
|
||||||
"LabelJumpBackwardAmount": "Tilbagespolingstid",
|
"LabelJumpBackwardAmount": "Tilbagespolingstid",
|
||||||
"LabelJumpForwardAmount": "Fremadspolingstid",
|
"LabelJumpForwardAmount": "Fremadspolingstid",
|
||||||
@@ -774,6 +777,7 @@
|
|||||||
"MessageConfirmDeleteSession": "Er du sikker på, at du vil slette denne session?",
|
"MessageConfirmDeleteSession": "Er du sikker på, at du vil slette denne session?",
|
||||||
"MessageConfirmEmbedMetadataInAudioFiles": "Er du sikker på at du vil indlejre metadata i {0} lydbogsfiler?",
|
"MessageConfirmEmbedMetadataInAudioFiles": "Er du sikker på at du vil indlejre metadata i {0} lydbogsfiler?",
|
||||||
"MessageConfirmForceReScan": "Er du sikker på, at du vil tvinge en genindlæsning?",
|
"MessageConfirmForceReScan": "Er du sikker på, at du vil tvinge en genindlæsning?",
|
||||||
|
"MessageConfirmLogoutDevice": "Er du sikker på, at du vil logge ud af \"{0}\"?",
|
||||||
"MessageConfirmMarkAllEpisodesFinished": "Er du sikker på, at du vil markere alle episoder som afsluttet?",
|
"MessageConfirmMarkAllEpisodesFinished": "Er du sikker på, at du vil markere alle episoder som afsluttet?",
|
||||||
"MessageConfirmMarkAllEpisodesNotFinished": "Er du sikker på, at du vil markere alle episoder som ikke afsluttet?",
|
"MessageConfirmMarkAllEpisodesNotFinished": "Er du sikker på, at du vil markere alle episoder som ikke afsluttet?",
|
||||||
"MessageConfirmMarkItemFinished": "Er du sikker på at du vil markere \"{0}\" som færdig?",
|
"MessageConfirmMarkItemFinished": "Er du sikker på at du vil markere \"{0}\" som færdig?",
|
||||||
|
|||||||
@@ -403,7 +403,7 @@
|
|||||||
"LabelHours": "Stunden",
|
"LabelHours": "Stunden",
|
||||||
"LabelIcon": "Symbol",
|
"LabelIcon": "Symbol",
|
||||||
"LabelImageURLFromTheWeb": "Bild-URL vom Internet",
|
"LabelImageURLFromTheWeb": "Bild-URL vom Internet",
|
||||||
"LabelInProgress": "In Bearbeitung",
|
"LabelInProgress": "Begonnen",
|
||||||
"LabelIncludeInTracklist": "In die Titelliste aufnehmen",
|
"LabelIncludeInTracklist": "In die Titelliste aufnehmen",
|
||||||
"LabelIncomplete": "Unvollständig",
|
"LabelIncomplete": "Unvollständig",
|
||||||
"LabelInterval": "Intervall",
|
"LabelInterval": "Intervall",
|
||||||
|
|||||||
@@ -463,7 +463,7 @@
|
|||||||
"LabelSettingsHomePageBookshelfView": "Avalehel kasuta raamaturiiulivaadet",
|
"LabelSettingsHomePageBookshelfView": "Avalehel kasuta raamaturiiulivaadet",
|
||||||
"LabelSettingsLibraryBookshelfView": "Raamatukogus kasuta raamaturiiulivaadet",
|
"LabelSettingsLibraryBookshelfView": "Raamatukogus kasuta raamaturiiulivaadet",
|
||||||
"LabelSettingsParseSubtitles": "Lugege subtiitreid",
|
"LabelSettingsParseSubtitles": "Lugege subtiitreid",
|
||||||
"LabelSettingsParseSubtitlesHelp": "Eraldage subtiitrid heliraamatu kaustade nimedest.<br>Subtiitrid peavad olema eraldatud kasutades \" - \".<br>Näiteks: \"Raamatu pealkiri - Siin on alapealkiri\" alapealkiri on \"Siin on alapealkiri\"",
|
"LabelSettingsParseSubtitlesHelp": "Eraldage subtiitrid heliraamatu kaustade nimedest.<br>Subtiitrid peavad olema eraldatud kasutades \" - \".<br>Näiteks: \"Raamatu pealkiri - Siin on alapealkiri\" alapealkiri on \"Siin on alapealkiri\"",
|
||||||
"LabelSettingsPreferMatchedMetadata": "Eelista sobitatud metaandmeid",
|
"LabelSettingsPreferMatchedMetadata": "Eelista sobitatud metaandmeid",
|
||||||
"LabelSettingsPreferMatchedMetadataHelp": "Sobitatud andmed kirjutavad Kiir Sobitamise kasutamisel üle üksikasjad.",
|
"LabelSettingsPreferMatchedMetadataHelp": "Sobitatud andmed kirjutavad Kiir Sobitamise kasutamisel üle üksikasjad.",
|
||||||
"LabelSettingsSkipMatchingBooksWithASIN": "Jätke ASIN-iga sobituvad raamatud vahele",
|
"LabelSettingsSkipMatchingBooksWithASIN": "Jätke ASIN-iga sobituvad raamatud vahele",
|
||||||
|
|||||||
+41
-1
@@ -1 +1,41 @@
|
|||||||
{}
|
{
|
||||||
|
"ButtonAdd": "Gehitu",
|
||||||
|
"ButtonAddApiKey": "Gehitu API Gakoa",
|
||||||
|
"ButtonAddChapters": "Kapituluak gehitu",
|
||||||
|
"ButtonAddDevice": "Gailu gehitu",
|
||||||
|
"ButtonAddPodcasts": "Podcastak gehitu",
|
||||||
|
"ButtonAddUser": "Erabiltzailea gehitu",
|
||||||
|
"ButtonApply": "Aplikatu",
|
||||||
|
"ButtonApplyChapters": "Kapituluak aplikatu",
|
||||||
|
"ButtonAuthors": "Egileak",
|
||||||
|
"ButtonBack": "Atzera",
|
||||||
|
"ButtonCancel": "Utzi",
|
||||||
|
"ButtonCheckAndDownloadNewEpisodes": "Atal berriak aztertu eta deskargatu",
|
||||||
|
"ButtonChooseAFolder": "Karpeta bat aukeratu",
|
||||||
|
"ButtonChooseFiles": "Karpetak aukeratu",
|
||||||
|
"ButtonClearFilter": "Iragazkiak garbitu",
|
||||||
|
"ButtonClose": "Itxi",
|
||||||
|
"ButtonCloseFeed": "Feed itxi",
|
||||||
|
"ButtonCollections": "Bildumak",
|
||||||
|
"ButtonCreate": "Sortu",
|
||||||
|
"ButtonCreateBackup": "Babeskopia sortu",
|
||||||
|
"ButtonDelete": "Ezabatu",
|
||||||
|
"ButtonDownloadQueue": "Ilarra",
|
||||||
|
"ButtonEdit": "Editatu",
|
||||||
|
"ButtonEditChapters": "Kapituluak editatu",
|
||||||
|
"ButtonEditPodcast": "Podcasta editatu",
|
||||||
|
"ButtonEnable": "Aktibatu",
|
||||||
|
"ButtonHide": "Ezkutatu",
|
||||||
|
"ButtonHome": "Etxea",
|
||||||
|
"ButtonIssues": "Arazoak",
|
||||||
|
"ButtonLogout": "Saioa itxi",
|
||||||
|
"ButtonLogoutAllDevices": "Gailu guztietan saioa itxi",
|
||||||
|
"ButtonNevermind": "Ez du axola",
|
||||||
|
"ButtonNext": "Ondorengoa",
|
||||||
|
"ButtonNextChapter": "Hurrengo kapitulua",
|
||||||
|
"ButtonOk": "Ados",
|
||||||
|
"ButtonPause": "Pausa",
|
||||||
|
"ButtonPlaylists": "Erreprodukzio-zerrendak",
|
||||||
|
"ButtonQueueAddItem": "Ilarara gehitu",
|
||||||
|
"ButtonQueueRemoveItem": "Ilaratik kendu"
|
||||||
|
}
|
||||||
+11
-1
@@ -24,5 +24,15 @@
|
|||||||
"ButtonSave": "ذخیره",
|
"ButtonSave": "ذخیره",
|
||||||
"ButtonSearch": "جستجو",
|
"ButtonSearch": "جستجو",
|
||||||
"ButtonSeries": "مجموعه",
|
"ButtonSeries": "مجموعه",
|
||||||
"ButtonSubmit": "ثبت"
|
"ButtonSubmit": "ثبت",
|
||||||
|
"ButtonYes": "بله",
|
||||||
|
"HeaderAccount": "حساب کاربری",
|
||||||
|
"HeaderAdvanced": "پیشرفته",
|
||||||
|
"HeaderChapters": "قسمتها",
|
||||||
|
"HeaderCollection": "مجموعه",
|
||||||
|
"HeaderDetails": "جزئیات",
|
||||||
|
"HeaderEpisodes": "قسمتها",
|
||||||
|
"HeaderEreaderSettings": "تنظیمات Ereader",
|
||||||
|
"HeaderLatestEpisodes": "آخرین قسمتها",
|
||||||
|
"HeaderLibraries": "مجموعهها"
|
||||||
}
|
}
|
||||||
@@ -34,54 +34,78 @@
|
|||||||
"ButtonEditChapters": "अध्याय संपादित करें",
|
"ButtonEditChapters": "अध्याय संपादित करें",
|
||||||
"ButtonEditPodcast": "पॉडकास्ट संपादित करें",
|
"ButtonEditPodcast": "पॉडकास्ट संपादित करें",
|
||||||
"ButtonEnable": "सक्षम करें",
|
"ButtonEnable": "सक्षम करें",
|
||||||
|
"ButtonFireAndFail": "भेजें और विफल हों",
|
||||||
|
"ButtonFireOnTest": "फायर ऑनटेस्ट इवेंट",
|
||||||
"ButtonForceReScan": "बलपूर्वक पुन: स्कैन करें",
|
"ButtonForceReScan": "बलपूर्वक पुन: स्कैन करें",
|
||||||
"ButtonFullPath": "पूर्ण पथ",
|
"ButtonFullPath": "पूर्ण पथ",
|
||||||
"ButtonHide": "छुपाएं",
|
"ButtonHide": "छुपाएं",
|
||||||
"ButtonHome": "घर",
|
"ButtonHome": "घर",
|
||||||
"ButtonIssues": "समस्याएं",
|
"ButtonIssues": "समस्याएं",
|
||||||
|
"ButtonJumpBackward": "पीछे जाएं",
|
||||||
|
"ButtonJumpForward": "आगे जाएं",
|
||||||
"ButtonLatest": "नवीनतम",
|
"ButtonLatest": "नवीनतम",
|
||||||
"ButtonLibrary": "पुस्तकालय",
|
"ButtonLibrary": "पुस्तकालय",
|
||||||
"ButtonLogout": "लॉग आउट",
|
"ButtonLogout": "लॉग आउट",
|
||||||
|
"ButtonLogoutAllDevices": "सभी डिवाइस से लॉगआउट करें",
|
||||||
"ButtonLookup": "तलाश करें",
|
"ButtonLookup": "तलाश करें",
|
||||||
"ButtonManageTracks": "ट्रैक्स मैनेज करें",
|
"ButtonManageTracks": "ट्रैक्स मैनेज करें",
|
||||||
"ButtonMapChapterTitles": "अध्यायों का मिलान करें",
|
"ButtonMapChapterTitles": "अध्यायों का मिलान करें",
|
||||||
"ButtonMatchAllAuthors": "सभी लेखकों को तलाश करें",
|
"ButtonMatchAllAuthors": "सभी लेखकों को तलाश करें",
|
||||||
"ButtonMatchBooks": "संबंधित पुस्तकों का मिलान करें",
|
"ButtonMatchBooks": "संबंधित पुस्तकों का मिलान करें",
|
||||||
"ButtonNevermind": "कोई बात नहीं",
|
"ButtonNevermind": "कोई बात नहीं",
|
||||||
|
"ButtonNext": "अगला",
|
||||||
|
"ButtonNextChapter": "अगला चैप्टर",
|
||||||
|
"ButtonNextItemInQueue": "कतार में अगला आइटम",
|
||||||
"ButtonOk": "ठीक है",
|
"ButtonOk": "ठीक है",
|
||||||
"ButtonOpenFeed": "फ़ीड खोलें",
|
"ButtonOpenFeed": "फ़ीड खोलें",
|
||||||
"ButtonOpenManager": "मैनेजर खोलें",
|
"ButtonOpenManager": "मैनेजर खोलें",
|
||||||
|
"ButtonPause": "पॉज़ करें",
|
||||||
"ButtonPlay": "चलाएँ",
|
"ButtonPlay": "चलाएँ",
|
||||||
|
"ButtonPlayAll": "सभी प्ले करें",
|
||||||
"ButtonPlaying": "चल रही है",
|
"ButtonPlaying": "चल रही है",
|
||||||
"ButtonPlaylists": "प्लेलिस्ट्स",
|
"ButtonPlaylists": "प्लेलिस्ट्स",
|
||||||
|
"ButtonPrevious": "पिछला",
|
||||||
|
"ButtonPreviousChapter": "पिछला चैप्टर",
|
||||||
|
"ButtonProbeAudioFile": "ऑडियो फ़ाइल की जांच करें",
|
||||||
"ButtonPurgeAllCache": "सभी Cache मिटाएं",
|
"ButtonPurgeAllCache": "सभी Cache मिटाएं",
|
||||||
"ButtonPurgeItemsCache": "आइटम Cache मिटाएं",
|
"ButtonPurgeItemsCache": "आइटम Cache मिटाएं",
|
||||||
"ButtonQueueAddItem": "क़तार में जोड़ें",
|
"ButtonQueueAddItem": "क़तार में जोड़ें",
|
||||||
"ButtonQueueRemoveItem": "कतार से हटाएं",
|
"ButtonQueueRemoveItem": "कतार से हटाएं",
|
||||||
|
"ButtonQuickEmbed": "तुरंत एम्बेड करें",
|
||||||
|
"ButtonQuickEmbedMetadata": "मेटाडेटा तुरंत एम्बेड करें",
|
||||||
"ButtonQuickMatch": "जल्दी से समानता की तलाश करें",
|
"ButtonQuickMatch": "जल्दी से समानता की तलाश करें",
|
||||||
"ButtonReScan": "पुन: स्कैन करें",
|
"ButtonReScan": "पुन: स्कैन करें",
|
||||||
"ButtonRead": "पढ़ लिया",
|
"ButtonRead": "पढ़ लिया",
|
||||||
|
"ButtonReadLess": "कम पढ़ें",
|
||||||
|
"ButtonRefresh": "रिफ्रेश करें",
|
||||||
"ButtonRemove": "हटाएं",
|
"ButtonRemove": "हटाएं",
|
||||||
"ButtonRemoveAll": "सभी हटाएं",
|
"ButtonRemoveAll": "सभी हटाएं",
|
||||||
"ButtonRemoveAllLibraryItems": "पुस्तकालय की सभी आइटम हटाएं",
|
"ButtonRemoveAllLibraryItems": "पुस्तकालय की सभी आइटम हटाएं",
|
||||||
"ButtonRemoveFromContinueListening": "सुनना जारी रखें से हटाएं",
|
"ButtonRemoveFromContinueListening": "सुनना जारी रखें से हटाएं",
|
||||||
|
"ButtonRemoveFromContinueReading": "'पढ़ना जारी रखें' से हटाएं",
|
||||||
"ButtonRemoveSeriesFromContinueSeries": "इस सीरीज को कंटिन्यू सीरीज से हटा दें",
|
"ButtonRemoveSeriesFromContinueSeries": "इस सीरीज को कंटिन्यू सीरीज से हटा दें",
|
||||||
"ButtonReset": "रीसेट करें",
|
"ButtonReset": "रीसेट करें",
|
||||||
|
"ButtonResetToDefault": "डिफ़ॉल्ट पर रीसेट करें",
|
||||||
"ButtonRestore": "पुनर्स्थापित करें",
|
"ButtonRestore": "पुनर्स्थापित करें",
|
||||||
"ButtonSave": "सहेजें",
|
"ButtonSave": "सहेजें",
|
||||||
"ButtonSaveAndClose": "सहेजें और बंद करें",
|
"ButtonSaveAndClose": "सहेजें और बंद करें",
|
||||||
"ButtonSaveTracklist": "ट्रैक सूची सहेजें",
|
"ButtonSaveTracklist": "ट्रैक सूची सहेजें",
|
||||||
"ButtonScan": "स्कैन करें",
|
"ButtonScan": "स्कैन करें",
|
||||||
"ButtonScanLibrary": "पुस्तकालय स्कैन करें",
|
"ButtonScanLibrary": "पुस्तकालय स्कैन करें",
|
||||||
|
"ButtonScrollRight": "बाईं ओर स्क्रॉल करें",
|
||||||
"ButtonSearch": "खोजें",
|
"ButtonSearch": "खोजें",
|
||||||
"ButtonSelectFolderPath": "फ़ोल्डर का पथ चुनें",
|
"ButtonSelectFolderPath": "फ़ोल्डर का पथ चुनें",
|
||||||
"ButtonSeries": "सीरीज",
|
"ButtonSeries": "सीरीज",
|
||||||
"ButtonSetChaptersFromTracks": "ट्रैक्स से अध्याय बनाएं",
|
"ButtonSetChaptersFromTracks": "ट्रैक्स से अध्याय बनाएं",
|
||||||
|
"ButtonShare": "शेयर करें",
|
||||||
"ButtonShiftTimes": "समय खिसकाए",
|
"ButtonShiftTimes": "समय खिसकाए",
|
||||||
"ButtonShow": "दिखाएं",
|
"ButtonShow": "दिखाएं",
|
||||||
"ButtonStartM4BEncode": "M4B एन्कोडिंग शुरू करें",
|
"ButtonStartM4BEncode": "M4B एन्कोडिंग शुरू करें",
|
||||||
"ButtonStartMetadataEmbed": "मेटाडेटा एम्बेडिंग शुरू करें",
|
"ButtonStartMetadataEmbed": "मेटाडेटा एम्बेडिंग शुरू करें",
|
||||||
|
"ButtonStats": "आँकड़े",
|
||||||
"ButtonSubmit": "जमा करें",
|
"ButtonSubmit": "जमा करें",
|
||||||
|
"ButtonTest": "टेस्ट करें",
|
||||||
|
"ButtonUnlinkOpenId": "OpenID अनलिंक करें",
|
||||||
"ButtonUpload": "अपलोड करें",
|
"ButtonUpload": "अपलोड करें",
|
||||||
"ButtonUploadBackup": "बैकअप अपलोड करें",
|
"ButtonUploadBackup": "बैकअप अपलोड करें",
|
||||||
"ButtonUploadCover": "कवर अपलोड करें",
|
"ButtonUploadCover": "कवर अपलोड करें",
|
||||||
@@ -90,9 +114,37 @@
|
|||||||
"ButtonUserEdit": "उपयोगकर्ता {0} को संपादित करें",
|
"ButtonUserEdit": "उपयोगकर्ता {0} को संपादित करें",
|
||||||
"ButtonViewAll": "सभी को देखें",
|
"ButtonViewAll": "सभी को देखें",
|
||||||
"ButtonYes": "हाँ",
|
"ButtonYes": "हाँ",
|
||||||
|
"ErrorUploadFetchMetadataAPI": "मेटाडेटा लाने में त्रुटि हुई",
|
||||||
|
"ErrorUploadFetchMetadataNoResults": "मेटाडेटा लाने में असमर्थ - कृपया शीर्षक और/या लेखक का नाम अपडेट करके पुनः प्रयास करें",
|
||||||
|
"ErrorUploadLacksTitle": "शीर्षक होना अनिवार्य है",
|
||||||
"HeaderAccount": "खाता",
|
"HeaderAccount": "खाता",
|
||||||
|
"HeaderAddCustomMetadataProvider": "कस्टम मेटाडेटा प्रोवाइडर जोड़ें",
|
||||||
"HeaderAdvanced": "विकसित",
|
"HeaderAdvanced": "विकसित",
|
||||||
|
"HeaderApiKeys": "एपीआई कुंजियाँ (API Keys)",
|
||||||
"HeaderAppriseNotificationSettings": "Apprise अधिसूचना सेटिंग्स",
|
"HeaderAppriseNotificationSettings": "Apprise अधिसूचना सेटिंग्स",
|
||||||
|
"HeaderAudioTracks": "ऑडियो ट्रैक्स",
|
||||||
|
"HeaderAudiobookTools": "ऑडियोबुक फ़ाइल प्रबंधन उपकरण",
|
||||||
|
"HeaderAuthentication": "ऑथेंटिकेशन",
|
||||||
|
"HeaderBackups": "बैकअप",
|
||||||
|
"HeaderBulkChapterModal": "एक साथ कई चैप्टर जोड़ें",
|
||||||
|
"HeaderChangePassword": "पासवर्ड बदलें",
|
||||||
|
"HeaderChapters": "चैप्टर्स",
|
||||||
|
"HeaderChooseAFolder": "फ़ोल्डर चुनें",
|
||||||
|
"HeaderCollection": "कलेक्शन",
|
||||||
|
"HeaderCollectionItems": "कलेक्शन आइटम्स",
|
||||||
|
"HeaderCover": "कवर",
|
||||||
|
"HeaderCurrentDownloads": "मौजूदा डाउनलोड",
|
||||||
|
"HeaderCustomMessageOnLogin": "लॉगिन पर कस्टम संदेश",
|
||||||
|
"HeaderCustomMetadataProviders": "कस्टम मेटाडेटा प्रोवाइडर्स",
|
||||||
|
"HeaderDetails": "विवरण",
|
||||||
|
"HeaderDownloadQueue": "डाउनलोड कतार",
|
||||||
|
"HeaderEbookFiles": "ई-बुक फ़ाइलें",
|
||||||
|
"HeaderEmail": "ईमेल",
|
||||||
|
"HeaderEmailSettings": "ईमेल सेटिंग",
|
||||||
|
"HeaderEpisodes": "एपिसोड",
|
||||||
|
"HeaderEreaderDevices": "ई-रीडर डिवाइस",
|
||||||
|
"HeaderEreaderSettings": "ई-रीडर सेटिंग्स",
|
||||||
|
"HeaderFiles": "फ़ाइलें",
|
||||||
"LabelBackupsMaxBackupSize": "Maximum backup size (in GB)",
|
"LabelBackupsMaxBackupSize": "Maximum backup size (in GB)",
|
||||||
"LabelFontFamily": "फुहारा परिवार",
|
"LabelFontFamily": "फुहारा परिवार",
|
||||||
"LabelPodcastSearchRegion": "पॉडकास्ट खोज क्षेत्र",
|
"LabelPodcastSearchRegion": "पॉडकास्ट खोज क्षेत्र",
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
"HeaderEmailSettings": "E-mail beállítások",
|
"HeaderEmailSettings": "E-mail beállítások",
|
||||||
"HeaderEpisodes": "Epizódok",
|
"HeaderEpisodes": "Epizódok",
|
||||||
"HeaderEreaderDevices": "E-olvasó eszközök",
|
"HeaderEreaderDevices": "E-olvasó eszközök",
|
||||||
"HeaderEreaderSettings": "E-olvasó beállítások",
|
"HeaderEreaderSettings": "E-olvasó beállításai",
|
||||||
"HeaderFiles": "Fájlok",
|
"HeaderFiles": "Fájlok",
|
||||||
"HeaderFindChapters": "Fejezetek keresése",
|
"HeaderFindChapters": "Fejezetek keresése",
|
||||||
"HeaderIgnoredFiles": "Figyelmen kívül hagyott fájlok",
|
"HeaderIgnoredFiles": "Figyelmen kívül hagyott fájlok",
|
||||||
@@ -486,7 +486,7 @@
|
|||||||
"LabelNoCustomMetadataProviders": "Nincsenek egyedi metaadat szolgáltatók",
|
"LabelNoCustomMetadataProviders": "Nincsenek egyedi metaadat szolgáltatók",
|
||||||
"LabelNoEpisodesSelected": "Nincsenek kiválasztott epizódok",
|
"LabelNoEpisodesSelected": "Nincsenek kiválasztott epizódok",
|
||||||
"LabelNotFinished": "Nem befejezett",
|
"LabelNotFinished": "Nem befejezett",
|
||||||
"LabelNotStarted": "Nem indult el",
|
"LabelNotStarted": "Nem kezdődött el",
|
||||||
"LabelNotes": "Megjegyzések",
|
"LabelNotes": "Megjegyzések",
|
||||||
"LabelNotificationAppriseURL": "Apprise URL(ek)",
|
"LabelNotificationAppriseURL": "Apprise URL(ek)",
|
||||||
"LabelNotificationAvailableVariables": "Elérhető változók",
|
"LabelNotificationAvailableVariables": "Elérhető változók",
|
||||||
@@ -868,7 +868,7 @@
|
|||||||
"MessageNoSeries": "Nincsenek sorozatok",
|
"MessageNoSeries": "Nincsenek sorozatok",
|
||||||
"MessageNoTags": "Nincsenek címkék",
|
"MessageNoTags": "Nincsenek címkék",
|
||||||
"MessageNoTasksRunning": "Nincsenek futó feladatok",
|
"MessageNoTasksRunning": "Nincsenek futó feladatok",
|
||||||
"MessageNoUpdatesWereNecessary": "Nem volt szükség frissítésekre",
|
"MessageNoUpdatesWereNecessary": "Nincs szükség frissítésre",
|
||||||
"MessageNoUserPlaylists": "Nincsenek felhasználói lejátszási listák",
|
"MessageNoUserPlaylists": "Nincsenek felhasználói lejátszási listák",
|
||||||
"MessageNoUserPlaylistsHelp": "A lejátszási listák személyesek. Csak az a felhasználó láthatja őket, aki létrehozta őket.",
|
"MessageNoUserPlaylistsHelp": "A lejátszási listák személyesek. Csak az a felhasználó láthatja őket, aki létrehozta őket.",
|
||||||
"MessageNotYetImplemented": "Még nem implementált",
|
"MessageNotYetImplemented": "Még nem implementált",
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
"ButtonJumpBackward": "Salta indietro",
|
"ButtonJumpBackward": "Salta indietro",
|
||||||
"ButtonJumpForward": "Salta Avanti",
|
"ButtonJumpForward": "Salta Avanti",
|
||||||
"ButtonLatest": "Ultimi",
|
"ButtonLatest": "Ultimi",
|
||||||
"ButtonLibrary": "Biblioteca",
|
"ButtonLibrary": "Libreria",
|
||||||
"ButtonLogout": "Disconnetti",
|
"ButtonLogout": "Disconnetti",
|
||||||
"ButtonLogoutAllDevices": "Disconnetti su tutti i dispositivi",
|
"ButtonLogoutAllDevices": "Disconnetti su tutti i dispositivi",
|
||||||
"ButtonLookup": "Consulta",
|
"ButtonLookup": "Consulta",
|
||||||
@@ -311,7 +311,7 @@
|
|||||||
"LabelDeleteFromFileSystemCheckbox": "Elimina dal file system (despunta per rimuoverla solo dal database)",
|
"LabelDeleteFromFileSystemCheckbox": "Elimina dal file system (despunta per rimuoverla solo dal database)",
|
||||||
"LabelDescription": "Descrizione",
|
"LabelDescription": "Descrizione",
|
||||||
"LabelDeselectAll": "Deseleziona Tutto",
|
"LabelDeselectAll": "Deseleziona Tutto",
|
||||||
"LabelDetectedPattern": "Trovato pattern:",
|
"LabelDetectedPattern": "Pattern rilevato:",
|
||||||
"LabelDevice": "Dispositivo",
|
"LabelDevice": "Dispositivo",
|
||||||
"LabelDeviceInfo": "Info dispositivo",
|
"LabelDeviceInfo": "Info dispositivo",
|
||||||
"LabelDeviceIsAvailableTo": "Il dispositivo e disponibile su…",
|
"LabelDeviceIsAvailableTo": "Il dispositivo e disponibile su…",
|
||||||
@@ -439,8 +439,8 @@
|
|||||||
"LabelLibraryFilterSublistEmpty": "Nessuno {0}",
|
"LabelLibraryFilterSublistEmpty": "Nessuno {0}",
|
||||||
"LabelLibraryItem": "Elementi della biblioteca",
|
"LabelLibraryItem": "Elementi della biblioteca",
|
||||||
"LabelLibraryName": "Nome della biblioteca",
|
"LabelLibraryName": "Nome della biblioteca",
|
||||||
"LabelLibrarySortByProgress": "Progresso: ultimo aggiornamento",
|
"LabelLibrarySortByProgress": "Progresso: Ultimo Aggiornamento",
|
||||||
"LabelLibrarySortByProgressFinished": "Progresso: finito",
|
"LabelLibrarySortByProgressFinished": "Progresso: Finito",
|
||||||
"LabelLibrarySortByProgressStarted": "Progresso: iniziato",
|
"LabelLibrarySortByProgressStarted": "Progresso: iniziato",
|
||||||
"LabelLimit": "Limiti",
|
"LabelLimit": "Limiti",
|
||||||
"LabelLineSpacing": "Interlinea",
|
"LabelLineSpacing": "Interlinea",
|
||||||
@@ -641,7 +641,7 @@
|
|||||||
"LabelStartTime": "Tempo di inizio",
|
"LabelStartTime": "Tempo di inizio",
|
||||||
"LabelStarted": "Iniziato",
|
"LabelStarted": "Iniziato",
|
||||||
"LabelStartedAt": "Iniziato al",
|
"LabelStartedAt": "Iniziato al",
|
||||||
"LabelStartedDate": "Iniziati {0}",
|
"LabelStartedDate": "Iniziato {0}",
|
||||||
"LabelStatsAudioTracks": "Tracce Audio",
|
"LabelStatsAudioTracks": "Tracce Audio",
|
||||||
"LabelStatsAuthors": "Autori",
|
"LabelStatsAuthors": "Autori",
|
||||||
"LabelStatsBestDay": "Giorno migliore",
|
"LabelStatsBestDay": "Giorno migliore",
|
||||||
|
|||||||
@@ -275,7 +275,7 @@
|
|||||||
"LabelBonus": "ボーナス",
|
"LabelBonus": "ボーナス",
|
||||||
"LabelBooks": "本",
|
"LabelBooks": "本",
|
||||||
"LabelButtonText": "ボタンテキスト",
|
"LabelButtonText": "ボタンテキスト",
|
||||||
"LabelByAuthor": "by {0}",
|
"LabelByAuthor": "作者:{0}",
|
||||||
"LabelChangePassword": "パスワードを変更",
|
"LabelChangePassword": "パスワードを変更",
|
||||||
"LabelChannels": "チャンネル",
|
"LabelChannels": "チャンネル",
|
||||||
"LabelChapterCount": "{0}チャプター",
|
"LabelChapterCount": "{0}チャプター",
|
||||||
|
|||||||
+30
-1
@@ -1 +1,30 @@
|
|||||||
{}
|
{
|
||||||
|
"ButtonAdd": "Pievienot",
|
||||||
|
"ButtonAuthors": "Autori",
|
||||||
|
"ButtonBack": "Atpakaļ",
|
||||||
|
"ButtonCancel": "Atcelt",
|
||||||
|
"ButtonClearFilter": "Notīrīt filtru",
|
||||||
|
"ButtonCloseFeed": "Aizvērt plūsmu",
|
||||||
|
"ButtonCollections": "Kolekcijas",
|
||||||
|
"ButtonCreate": "Izveidot",
|
||||||
|
"ButtonDelete": "Dzēst",
|
||||||
|
"ButtonHome": "Mājas",
|
||||||
|
"ButtonIssues": "Problēmas",
|
||||||
|
"ButtonLatest": "Pēdējais",
|
||||||
|
"ButtonLibrary": "Bibliotēka",
|
||||||
|
"ButtonOk": "Labi",
|
||||||
|
"ButtonOpenFeed": "Atvērt barotni",
|
||||||
|
"ButtonPause": "Pauzēt",
|
||||||
|
"ButtonPlay": "Atskaņot",
|
||||||
|
"ButtonPlaylists": "Atskaņošanas saraksti",
|
||||||
|
"ButtonRead": "Lasīt",
|
||||||
|
"ButtonReadLess": "Lasīt mazāk",
|
||||||
|
"ButtonReadMore": "Lasīt vairāk",
|
||||||
|
"ButtonRemove": "Noņemt",
|
||||||
|
"ButtonSave": "Saglabāt",
|
||||||
|
"ButtonSearch": "Meklēt",
|
||||||
|
"ButtonSeries": "Sērijas",
|
||||||
|
"ButtonSubmit": "Iesniegt",
|
||||||
|
"ButtonYes": "Jā",
|
||||||
|
"HeaderAccount": "Konts"
|
||||||
|
}
|
||||||
@@ -333,7 +333,7 @@
|
|||||||
"LabelEmail": "Epost",
|
"LabelEmail": "Epost",
|
||||||
"LabelEmailSettingsFromAddress": "Fra Adresse",
|
"LabelEmailSettingsFromAddress": "Fra Adresse",
|
||||||
"LabelEmailSettingsRejectUnauthorized": "Avvis uautoriserte sertifikat",
|
"LabelEmailSettingsRejectUnauthorized": "Avvis uautoriserte sertifikat",
|
||||||
"LabelEmailSettingsRejectUnauthorizedHelp": "Ved å deaktivere sjekk av SSL sertifikat eksponerer man tilkoblingen for sikkerhetsrisiko, som for eksempel mann-i-midten-angrep. Slå av kun om du forstår implikasjonene og stoler på e-post-serveren du kobler til!",
|
"LabelEmailSettingsRejectUnauthorizedHelp": "Ved å deaktivere sjekk av SSL sertifikat eksponerer man tilkoblingen for sikkerhetsrisiko, som for eksempel mann-i-midten-angrep. Slå av kun om du forstår implikasjonene og stoler på e-post-serveren du kobler til.",
|
||||||
"LabelEmailSettingsSecure": "Sikker",
|
"LabelEmailSettingsSecure": "Sikker",
|
||||||
"LabelEmailSettingsSecureHelp": "Hvis aktivert, vil tilkoblingen bruke TLS under tilkobling til tjeneren. Ellers vil TLS bli brukt hvis tjeneren støtter STARTTLS utvidelsen. I de fleste tilfeller aktiver valget hvis du kobler til med port 465. Med port 587 eller 25 deaktiver valget. (fra nodemailer.com/smtp/#authentication)",
|
"LabelEmailSettingsSecureHelp": "Hvis aktivert, vil tilkoblingen bruke TLS under tilkobling til tjeneren. Ellers vil TLS bli brukt hvis tjeneren støtter STARTTLS utvidelsen. I de fleste tilfeller aktiver valget hvis du kobler til med port 465. Med port 587 eller 25 deaktiver valget. (fra nodemailer.com/smtp/#authentication)",
|
||||||
"LabelEmailSettingsTestAddress": "Test Adresse",
|
"LabelEmailSettingsTestAddress": "Test Adresse",
|
||||||
@@ -577,7 +577,7 @@
|
|||||||
"LabelSelectUsers": "Velg brukere",
|
"LabelSelectUsers": "Velg brukere",
|
||||||
"LabelSendEbookToDevice": "Send Ebok til...",
|
"LabelSendEbookToDevice": "Send Ebok til...",
|
||||||
"LabelSequence": "Sekvens",
|
"LabelSequence": "Sekvens",
|
||||||
"LabelSerial": "Serienr.",
|
"LabelSerial": "Seriell",
|
||||||
"LabelSeries": "Serier",
|
"LabelSeries": "Serier",
|
||||||
"LabelSeriesName": "Serier Navn",
|
"LabelSeriesName": "Serier Navn",
|
||||||
"LabelSeriesProgress": "Serier fremgang",
|
"LabelSeriesProgress": "Serier fremgang",
|
||||||
@@ -610,7 +610,7 @@
|
|||||||
"LabelSettingsOnlyShowLaterBooksInContinueSeries": "Hopp over tidligere bøker i \"Fortsett serien\"",
|
"LabelSettingsOnlyShowLaterBooksInContinueSeries": "Hopp over tidligere bøker i \"Fortsett serien\"",
|
||||||
"LabelSettingsOnlyShowLaterBooksInContinueSeriesHelp": "\"Fortsett serie\"-siden viser første bok som ikke er påbegynt i serier der en bok er lest og ingen bøker leses nå. Ved å slå på denne innstillingen så vil man fortsette på serien etter siste leste bok, fremfor første bok som ikke er startet på i en serie.",
|
"LabelSettingsOnlyShowLaterBooksInContinueSeriesHelp": "\"Fortsett serie\"-siden viser første bok som ikke er påbegynt i serier der en bok er lest og ingen bøker leses nå. Ved å slå på denne innstillingen så vil man fortsette på serien etter siste leste bok, fremfor første bok som ikke er startet på i en serie.",
|
||||||
"LabelSettingsParseSubtitles": "Analyser undertitler",
|
"LabelSettingsParseSubtitles": "Analyser undertitler",
|
||||||
"LabelSettingsParseSubtitlesHelp": "Hent undertittel fra lydbokens mappenavn.<br>Undertittel må være separert med \" - \"<br>f.eks. \"Boktittel - En lengre tittel\" har undertittel \"En lengre tittel\".",
|
"LabelSettingsParseSubtitlesHelp": "Hent undertittel fra lydbokens mappenavn.<br>Undertittel må være separert med \" - \"<br>f.eks. \"Boktittel - En lengre tittel\" har undertittel \"En lengre tittel\"",
|
||||||
"LabelSettingsPreferMatchedMetadata": "Foretrekk funnet metadata",
|
"LabelSettingsPreferMatchedMetadata": "Foretrekk funnet metadata",
|
||||||
"LabelSettingsPreferMatchedMetadataHelp": "Funnet data vil overskrive enhetens detaljene når man bruker Kjapt søk. Som standard vil Kjapt søk kun fylle inn manglende detaljer.",
|
"LabelSettingsPreferMatchedMetadataHelp": "Funnet data vil overskrive enhetens detaljene når man bruker Kjapt søk. Som standard vil Kjapt søk kun fylle inn manglende detaljer.",
|
||||||
"LabelSettingsSkipMatchingBooksWithASIN": "Hopp over bøker som allerede har ASIN",
|
"LabelSettingsSkipMatchingBooksWithASIN": "Hopp over bøker som allerede har ASIN",
|
||||||
@@ -744,7 +744,7 @@
|
|||||||
"MessageAuthenticationOIDCChangesRestart": "Etter å ha lagret, start serveren din på nytt for at OIDC-endringene skal tre i kraft.",
|
"MessageAuthenticationOIDCChangesRestart": "Etter å ha lagret, start serveren din på nytt for at OIDC-endringene skal tre i kraft.",
|
||||||
"MessageAuthenticationSecurityMessage": "Autentisering er forbedret av sikkerhetshensyn. Alle brukere må logge inn på nytt.",
|
"MessageAuthenticationSecurityMessage": "Autentisering er forbedret av sikkerhetshensyn. Alle brukere må logge inn på nytt.",
|
||||||
"MessageBackupsDescription": "Sikkerhetskopier inkluderer, brukerfremgang, detaljer om bibliotekgjenstander, tjener instillinger og bilder lagret under <code>/metadata/items</code> og <code>/metadata/authors</code>. Sikkerhetskopier <strong>vil ikke</strong> inkludere filer som er lagret i bibliotek mappene.",
|
"MessageBackupsDescription": "Sikkerhetskopier inkluderer, brukerfremgang, detaljer om bibliotekgjenstander, tjener instillinger og bilder lagret under <code>/metadata/items</code> og <code>/metadata/authors</code>. Sikkerhetskopier <strong>vil ikke</strong> inkludere filer som er lagret i bibliotek mappene.",
|
||||||
"MessageBackupsLocationEditNote": "Viktig: Endring av mappen for sikkerhetskopi hverken endrer eller flytter eksisterende sikkerhetskopier!",
|
"MessageBackupsLocationEditNote": "Viktig: Endring av mappen for sikkerhetskopi hverken endrer eller flytter eksisterende sikkerhetskopier",
|
||||||
"MessageBackupsLocationNoEditNote": "Viktig: Mappen for sikkerhetskopi satt i en miljøvariabel og kan ikke endres her.",
|
"MessageBackupsLocationNoEditNote": "Viktig: Mappen for sikkerhetskopi satt i en miljøvariabel og kan ikke endres her.",
|
||||||
"MessageBackupsLocationPathEmpty": "Mappen for sikkerhetskopiering må angis",
|
"MessageBackupsLocationPathEmpty": "Mappen for sikkerhetskopiering må angis",
|
||||||
"MessageBatchEditPopulateMapDetailsAllHelp": "Fyll aktiverte felt med data fra alle elementer. Felt med flere verdier blir slått sammen",
|
"MessageBatchEditPopulateMapDetailsAllHelp": "Fyll aktiverte felt med data fra alle elementer. Felt med flere verdier blir slått sammen",
|
||||||
|
|||||||
@@ -456,7 +456,7 @@
|
|||||||
"LabelMaxEpisodesToDownload": "Maksymalna liczba odcinków do pobrania. Użyj 0, aby uzyskać nieograniczoną liczbę.",
|
"LabelMaxEpisodesToDownload": "Maksymalna liczba odcinków do pobrania. Użyj 0, aby uzyskać nieograniczoną liczbę.",
|
||||||
"LabelMaxEpisodesToDownloadPerCheck": "Maksymalna liczba nowych odcinków do pobrania na jedno sprawdzenie",
|
"LabelMaxEpisodesToDownloadPerCheck": "Maksymalna liczba nowych odcinków do pobrania na jedno sprawdzenie",
|
||||||
"LabelMaxEpisodesToKeep": "Maksymalna liczba odcinków do zachowania",
|
"LabelMaxEpisodesToKeep": "Maksymalna liczba odcinków do zachowania",
|
||||||
"LabelMaxEpisodesToKeepHelp": "Wartość 0 wyłącza maksymalny limit. Po automatycznym pobraniu nowego odcinka, najstarszy odcinek zostanie usunięty, jeśli masz ich więcej niż X. Spowoduje to usunięcie tylko 1 odcinka na nowe pobieranie.",
|
"LabelMaxEpisodesToKeepHelp": "Wartość 0 nie ustawia maksymalnego limitu. Po automatycznym pobraniu nowego odcinka, najstarszy odcinek zostanie usunięty, jeśli masz ich więcej niż X. Spowoduje to usunięcie tylko 1 odcinka na nowe pobranie.",
|
||||||
"LabelMediaPlayer": "Odtwarzacz",
|
"LabelMediaPlayer": "Odtwarzacz",
|
||||||
"LabelMediaType": "Typ mediów",
|
"LabelMediaType": "Typ mediów",
|
||||||
"LabelMetaTag": "Tag",
|
"LabelMetaTag": "Tag",
|
||||||
@@ -633,7 +633,7 @@
|
|||||||
"LabelShowSubtitles": "Pokaż Napisy",
|
"LabelShowSubtitles": "Pokaż Napisy",
|
||||||
"LabelSize": "Rozmiar",
|
"LabelSize": "Rozmiar",
|
||||||
"LabelSleepTimer": "Wyłącznik czasowy",
|
"LabelSleepTimer": "Wyłącznik czasowy",
|
||||||
"LabelSlug": "slug (części URL która identyfikuje konkretny zasób)",
|
"LabelSlug": "Slug (części URL która identyfikuje konkretny zasób)",
|
||||||
"LabelSortAscending": "Rosnąco",
|
"LabelSortAscending": "Rosnąco",
|
||||||
"LabelSortDescending": "Malejąco",
|
"LabelSortDescending": "Malejąco",
|
||||||
"LabelSortPubDate": "Sortuj według daty publikacji",
|
"LabelSortPubDate": "Sortuj według daty publikacji",
|
||||||
@@ -1038,7 +1038,7 @@
|
|||||||
"ToastDeleteFileSuccess": "Plik został usunięty",
|
"ToastDeleteFileSuccess": "Plik został usunięty",
|
||||||
"ToastDeviceAddFailed": "Nieudana próba dodania urządzenia",
|
"ToastDeviceAddFailed": "Nieudana próba dodania urządzenia",
|
||||||
"ToastDeviceNameAlreadyExists": "Czytnik z taką nazwą już istnieje",
|
"ToastDeviceNameAlreadyExists": "Czytnik z taką nazwą już istnieje",
|
||||||
"ToastDeviceTestEmailFailed": "NIeudana próba wysłania testowego maila",
|
"ToastDeviceTestEmailFailed": "Nieudana próba wysłania testowego maila",
|
||||||
"ToastDeviceTestEmailSuccess": "Testowy email został wysłany",
|
"ToastDeviceTestEmailSuccess": "Testowy email został wysłany",
|
||||||
"ToastEmailSettingsUpdateSuccess": "Ustawienia email zaktualizowane",
|
"ToastEmailSettingsUpdateSuccess": "Ustawienia email zaktualizowane",
|
||||||
"ToastEncodeCancelFailed": "Nie udało się anulować kodowania",
|
"ToastEncodeCancelFailed": "Nie udało się anulować kodowania",
|
||||||
@@ -1046,7 +1046,7 @@
|
|||||||
"ToastEpisodeDownloadQueueClearFailed": "Nie udało się wyczyścić kolejki",
|
"ToastEpisodeDownloadQueueClearFailed": "Nie udało się wyczyścić kolejki",
|
||||||
"ToastEpisodeDownloadQueueClearSuccess": "Wyczyszczono kolejkę epizodów do ściągnięcia",
|
"ToastEpisodeDownloadQueueClearSuccess": "Wyczyszczono kolejkę epizodów do ściągnięcia",
|
||||||
"ToastEpisodeUpdateSuccess": "Zaktualizowano {0} odcinków",
|
"ToastEpisodeUpdateSuccess": "Zaktualizowano {0} odcinków",
|
||||||
"ToastErrorCannotShare": "Nie można udostępniać natywnie na tym urządzeniu.",
|
"ToastErrorCannotShare": "Nie można udostępniać natywnie na tym urządzeniu",
|
||||||
"ToastFailedToCreate": "Nie udało się utworzyć",
|
"ToastFailedToCreate": "Nie udało się utworzyć",
|
||||||
"ToastFailedToDelete": "Nie udało się usunąć",
|
"ToastFailedToDelete": "Nie udało się usunąć",
|
||||||
"ToastFailedToLoadData": "Nie udało się załadować danych",
|
"ToastFailedToLoadData": "Nie udało się załadować danych",
|
||||||
@@ -1143,7 +1143,7 @@
|
|||||||
"ToastSlugRequired": "Slug jest wymagany",
|
"ToastSlugRequired": "Slug jest wymagany",
|
||||||
"ToastSocketConnected": "Nawiązano połączenie z serwerem",
|
"ToastSocketConnected": "Nawiązano połączenie z serwerem",
|
||||||
"ToastSocketDisconnected": "Połączenie z serwerem zostało zamknięte",
|
"ToastSocketDisconnected": "Połączenie z serwerem zostało zamknięte",
|
||||||
"ToastSocketFailedToConnect": "Poączenie z serwerem nie powiodło się",
|
"ToastSocketFailedToConnect": "Połączenie z serwerem nie powiodło się",
|
||||||
"ToastSortingPrefixesEmptyError": "Musi mieć co najmniej 1 prefiks sortowania",
|
"ToastSortingPrefixesEmptyError": "Musi mieć co najmniej 1 prefiks sortowania",
|
||||||
"ToastSortingPrefixesUpdateSuccess": "Zaktualizowano prefiksy sortowania ({0} elementów)",
|
"ToastSortingPrefixesUpdateSuccess": "Zaktualizowano prefiksy sortowania ({0} elementów)",
|
||||||
"ToastTitleRequired": "Tytuł jest wymagany",
|
"ToastTitleRequired": "Tytuł jest wymagany",
|
||||||
|
|||||||
+122
-118
@@ -21,15 +21,15 @@
|
|||||||
"ButtonChooseAFolder": "Vyberte priečinok",
|
"ButtonChooseAFolder": "Vyberte priečinok",
|
||||||
"ButtonChooseFiles": "Vyberte súbory",
|
"ButtonChooseFiles": "Vyberte súbory",
|
||||||
"ButtonClearFilter": "Zrušiť filter",
|
"ButtonClearFilter": "Zrušiť filter",
|
||||||
"ButtonClose": "Uzavrieť",
|
"ButtonClose": "Zavrieť",
|
||||||
"ButtonCloseFeed": "Zatvoriť zdroj",
|
"ButtonCloseFeed": "Zatvoriť zdroj",
|
||||||
"ButtonCloseSession": "Ukončiť aktívne relácie",
|
"ButtonCloseSession": "Ukončiť aktívne relácie",
|
||||||
"ButtonCollections": "Kolekcie",
|
"ButtonCollections": "Zbierky",
|
||||||
"ButtonConfigureScanner": "Nastaviť skener",
|
"ButtonConfigureScanner": "Nastaviť skener",
|
||||||
"ButtonCreate": "Vytvoriť",
|
"ButtonCreate": "Vytvoriť",
|
||||||
"ButtonCreateBackup": "Vytvoriť zálohu",
|
"ButtonCreateBackup": "Vytvoriť zálohu",
|
||||||
"ButtonDelete": "Zmazať",
|
"ButtonDelete": "Zmazať",
|
||||||
"ButtonDownloadQueue": "Poradie",
|
"ButtonDownloadQueue": "Fronta",
|
||||||
"ButtonEdit": "Upraviť",
|
"ButtonEdit": "Upraviť",
|
||||||
"ButtonEditChapters": "Upraviť kapitoly",
|
"ButtonEditChapters": "Upraviť kapitoly",
|
||||||
"ButtonEditPodcast": "Upraviť podcast",
|
"ButtonEditPodcast": "Upraviť podcast",
|
||||||
@@ -46,6 +46,7 @@
|
|||||||
"ButtonLatest": "Najnovšie",
|
"ButtonLatest": "Najnovšie",
|
||||||
"ButtonLibrary": "Knižnica",
|
"ButtonLibrary": "Knižnica",
|
||||||
"ButtonLogout": "Odhlásenie",
|
"ButtonLogout": "Odhlásenie",
|
||||||
|
"ButtonLogoutAllDevices": "Odhlásiť zo všetkých zariadení",
|
||||||
"ButtonLookup": "Vyhľadať",
|
"ButtonLookup": "Vyhľadať",
|
||||||
"ButtonManageTracks": "Spravovať stopy",
|
"ButtonManageTracks": "Spravovať stopy",
|
||||||
"ButtonMapChapterTitles": "Mapovať názvy kapitol",
|
"ButtonMapChapterTitles": "Mapovať názvy kapitol",
|
||||||
@@ -54,7 +55,7 @@
|
|||||||
"ButtonNevermind": "Nevadí",
|
"ButtonNevermind": "Nevadí",
|
||||||
"ButtonNext": "Ďalšie",
|
"ButtonNext": "Ďalšie",
|
||||||
"ButtonNextChapter": "Ďalšia kapitola",
|
"ButtonNextChapter": "Ďalšia kapitola",
|
||||||
"ButtonNextItemInQueue": "Ďalšia položka v poradí",
|
"ButtonNextItemInQueue": "Ďalšia položka vo fronte",
|
||||||
"ButtonOk": "OK",
|
"ButtonOk": "OK",
|
||||||
"ButtonOpenFeed": "Otvoriť zdroj",
|
"ButtonOpenFeed": "Otvoriť zdroj",
|
||||||
"ButtonOpenManager": "Otvoriť správcu",
|
"ButtonOpenManager": "Otvoriť správcu",
|
||||||
@@ -65,27 +66,27 @@
|
|||||||
"ButtonPlaylists": "Playlisty",
|
"ButtonPlaylists": "Playlisty",
|
||||||
"ButtonPrevious": "Predchádzajúci",
|
"ButtonPrevious": "Predchádzajúci",
|
||||||
"ButtonPreviousChapter": "Predchádzajúca kapitola",
|
"ButtonPreviousChapter": "Predchádzajúca kapitola",
|
||||||
"ButtonProbeAudioFile": "Preskúmaj zvukový súbor",
|
"ButtonProbeAudioFile": "Preskúmať zvukový súbor",
|
||||||
"ButtonPurgeAllCache": "Vymaž celú medzipamäť",
|
"ButtonPurgeAllCache": "Vyčistiť celú vyrovnávaciu pamäť",
|
||||||
"ButtonPurgeItemsCache": "Vymaž medzipamäť položiek",
|
"ButtonPurgeItemsCache": "Vyčistiť vyrovnávaciu pamäť položiek",
|
||||||
"ButtonQueueAddItem": "Pridať do poradia",
|
"ButtonQueueAddItem": "Pridať do fronty",
|
||||||
"ButtonQueueRemoveItem": "Vymazať z poradia",
|
"ButtonQueueRemoveItem": "Odstrániť z fronty",
|
||||||
"ButtonQuickEmbed": "Rýchle vloženie",
|
"ButtonQuickEmbed": "Rýchle vloženie",
|
||||||
"ButtonQuickEmbedMetadata": "Rýchle vloženie metadát",
|
"ButtonQuickEmbedMetadata": "Rýchle vloženie metadát",
|
||||||
"ButtonQuickMatch": "Rýchle vyhľadanie",
|
"ButtonQuickMatch": "Rýchle vyhľadanie",
|
||||||
"ButtonReScan": "Preskenovať",
|
"ButtonReScan": "Preskenovať",
|
||||||
"ButtonRead": "Načítať",
|
"ButtonRead": "Čítať",
|
||||||
"ButtonReadLess": "Načítať menej",
|
"ButtonReadLess": "Čítať menej",
|
||||||
"ButtonReadMore": "Načítať viac",
|
"ButtonReadMore": "Čítať viac",
|
||||||
"ButtonRefresh": "Obnoviť",
|
"ButtonRefresh": "Obnoviť",
|
||||||
"ButtonRemove": "Odstrániť",
|
"ButtonRemove": "Odstrániť",
|
||||||
"ButtonRemoveAll": "Odstrániť všetko",
|
"ButtonRemoveAll": "Odstrániť všetko",
|
||||||
"ButtonRemoveAllLibraryItems": "Odstrániť všetky položky knižnice",
|
"ButtonRemoveAllLibraryItems": "Odstrániť všetky položky knižnice",
|
||||||
"ButtonRemoveFromContinueListening": "Odstrániť z nedokončených podcastov",
|
"ButtonRemoveFromContinueListening": "Odstrániť z nedokončených podcastov",
|
||||||
"ButtonRemoveFromContinueReading": "Odtrániť z nedokončených audiokníh",
|
"ButtonRemoveFromContinueReading": "Odstrániť z nedokončených audiokníh",
|
||||||
"ButtonRemoveSeriesFromContinueSeries": "Odstrániť z nedokončených sérií",
|
"ButtonRemoveSeriesFromContinueSeries": "Odstrániť z nedokončených sérií",
|
||||||
"ButtonReset": "Resetovať",
|
"ButtonReset": "Resetovať",
|
||||||
"ButtonResetToDefault": "Resetovať do predvolené",
|
"ButtonResetToDefault": "Resetovať na predvolené",
|
||||||
"ButtonRestore": "Obnoviť zo zálohy",
|
"ButtonRestore": "Obnoviť zo zálohy",
|
||||||
"ButtonSave": "Uložiť",
|
"ButtonSave": "Uložiť",
|
||||||
"ButtonSaveAndClose": "Uložiť a zavrieť",
|
"ButtonSaveAndClose": "Uložiť a zavrieť",
|
||||||
@@ -95,7 +96,7 @@
|
|||||||
"ButtonScrollLeft": "Doľava",
|
"ButtonScrollLeft": "Doľava",
|
||||||
"ButtonScrollRight": "Doprava",
|
"ButtonScrollRight": "Doprava",
|
||||||
"ButtonSearch": "Vyhľadať",
|
"ButtonSearch": "Vyhľadať",
|
||||||
"ButtonSelectFolderPath": "Vybrať umiestnenie priečinku",
|
"ButtonSelectFolderPath": "Vybrať umiestnenie priečinka",
|
||||||
"ButtonSeries": "Série",
|
"ButtonSeries": "Série",
|
||||||
"ButtonSetChaptersFromTracks": "Nastaviť kapitoly podľa stôp",
|
"ButtonSetChaptersFromTracks": "Nastaviť kapitoly podľa stôp",
|
||||||
"ButtonShare": "Zdieľať",
|
"ButtonShare": "Zdieľať",
|
||||||
@@ -119,7 +120,7 @@
|
|||||||
"ErrorUploadFetchMetadataNoResults": "Metadáta sa nenašli - skúste upraviť názov a/alebo autora",
|
"ErrorUploadFetchMetadataNoResults": "Metadáta sa nenašli - skúste upraviť názov a/alebo autora",
|
||||||
"ErrorUploadLacksTitle": "Musí mať názov",
|
"ErrorUploadLacksTitle": "Musí mať názov",
|
||||||
"HeaderAccount": "Účet",
|
"HeaderAccount": "Účet",
|
||||||
"HeaderAddCustomMetadataProvider": "Pridať vastný zdroj metadát",
|
"HeaderAddCustomMetadataProvider": "Pridať vlastný zdroj metadát",
|
||||||
"HeaderAdvanced": "Pokročilé",
|
"HeaderAdvanced": "Pokročilé",
|
||||||
"HeaderApiKeys": "Kľúče API",
|
"HeaderApiKeys": "Kľúče API",
|
||||||
"HeaderAppriseNotificationSettings": "Nastavenie Apprise notifikácií",
|
"HeaderAppriseNotificationSettings": "Nastavenie Apprise notifikácií",
|
||||||
@@ -131,14 +132,14 @@
|
|||||||
"HeaderChangePassword": "Zmeniť heslo",
|
"HeaderChangePassword": "Zmeniť heslo",
|
||||||
"HeaderChapters": "Kapitoly",
|
"HeaderChapters": "Kapitoly",
|
||||||
"HeaderChooseAFolder": "Vybrať priečinok",
|
"HeaderChooseAFolder": "Vybrať priečinok",
|
||||||
"HeaderCollection": "Zbierky",
|
"HeaderCollection": "Zbierka",
|
||||||
"HeaderCollectionItems": "Položky zbierky",
|
"HeaderCollectionItems": "Položky zbierky",
|
||||||
"HeaderCover": "Prebal",
|
"HeaderCover": "Prebal",
|
||||||
"HeaderCurrentDownloads": "Aktuálne sťahovanie",
|
"HeaderCurrentDownloads": "Aktuálne sťahovanie",
|
||||||
"HeaderCustomMessageOnLogin": "Vlastné privítanie pri prihlásení",
|
"HeaderCustomMessageOnLogin": "Vlastné privítanie pri prihlásení",
|
||||||
"HeaderCustomMetadataProviders": "Vlastné zdroje metadát",
|
"HeaderCustomMetadataProviders": "Vlastné zdroje metadát",
|
||||||
"HeaderDetails": "Podrobnosti",
|
"HeaderDetails": "Podrobnosti",
|
||||||
"HeaderDownloadQueue": "Poradie sťahovania",
|
"HeaderDownloadQueue": "Fronta sťahovania",
|
||||||
"HeaderEbookFiles": "Súbory e-kníh",
|
"HeaderEbookFiles": "Súbory e-kníh",
|
||||||
"HeaderEmail": "E-mail",
|
"HeaderEmail": "E-mail",
|
||||||
"HeaderEmailSettings": "Nastavenie e-mailu",
|
"HeaderEmailSettings": "Nastavenie e-mailu",
|
||||||
@@ -177,7 +178,7 @@
|
|||||||
"HeaderOtherFiles": "Ostatné súbory",
|
"HeaderOtherFiles": "Ostatné súbory",
|
||||||
"HeaderPasswordAuthentication": "Overenie heslom",
|
"HeaderPasswordAuthentication": "Overenie heslom",
|
||||||
"HeaderPermissions": "Povolenia",
|
"HeaderPermissions": "Povolenia",
|
||||||
"HeaderPlayerQueue": "Poradie prehrávania",
|
"HeaderPlayerQueue": "Fronta prehrávania",
|
||||||
"HeaderPlayerSettings": "Nastavenia prehrávania",
|
"HeaderPlayerSettings": "Nastavenia prehrávania",
|
||||||
"HeaderPlaylist": "Playlist",
|
"HeaderPlaylist": "Playlist",
|
||||||
"HeaderPlaylistItems": "Položky playlistu",
|
"HeaderPlaylistItems": "Položky playlistu",
|
||||||
@@ -192,8 +193,9 @@
|
|||||||
"HeaderSavedMediaProgress": "Stav uložených médií",
|
"HeaderSavedMediaProgress": "Stav uložených médií",
|
||||||
"HeaderSchedule": "Plán",
|
"HeaderSchedule": "Plán",
|
||||||
"HeaderScheduleEpisodeDownloads": "Naplánovať automatické sťahovanie epizód",
|
"HeaderScheduleEpisodeDownloads": "Naplánovať automatické sťahovanie epizód",
|
||||||
"HeaderScheduleLibraryScans": "Naplánovanovať automatické skenovanie knižnice",
|
"HeaderScheduleLibraryScans": "Naplánovať automatické skenovanie knižnice",
|
||||||
"HeaderSession": "Relácia",
|
"HeaderSession": "Relácia",
|
||||||
|
"HeaderSessions": "Relácie",
|
||||||
"HeaderSetBackupSchedule": "Naplánovať zálohovanie",
|
"HeaderSetBackupSchedule": "Naplánovať zálohovanie",
|
||||||
"HeaderSettings": "Nastavenia",
|
"HeaderSettings": "Nastavenia",
|
||||||
"HeaderSettingsDisplay": "Zobraziť",
|
"HeaderSettingsDisplay": "Zobraziť",
|
||||||
@@ -216,7 +218,7 @@
|
|||||||
"HeaderUpdateAuthor": "Aktualizovať autora",
|
"HeaderUpdateAuthor": "Aktualizovať autora",
|
||||||
"HeaderUpdateDetails": "Aktualizovať detaily",
|
"HeaderUpdateDetails": "Aktualizovať detaily",
|
||||||
"HeaderUpdateLibrary": "Aktualizovať knižnicu",
|
"HeaderUpdateLibrary": "Aktualizovať knižnicu",
|
||||||
"HeaderUsers": "Užívatelia",
|
"HeaderUsers": "Používatelia",
|
||||||
"HeaderYearReview": "Prehľad roka {0}",
|
"HeaderYearReview": "Prehľad roka {0}",
|
||||||
"HeaderYourStats": "Vaše štatistiky",
|
"HeaderYourStats": "Vaše štatistiky",
|
||||||
"LabelAbridged": "Skrátená verzia",
|
"LabelAbridged": "Skrátená verzia",
|
||||||
@@ -232,20 +234,20 @@
|
|||||||
"LabelAddToCollection": "Pridať do zbierky",
|
"LabelAddToCollection": "Pridať do zbierky",
|
||||||
"LabelAddToCollectionBatch": "Pridať {0} kníh do zbierky",
|
"LabelAddToCollectionBatch": "Pridať {0} kníh do zbierky",
|
||||||
"LabelAddToPlaylist": "Pridať do playlistu",
|
"LabelAddToPlaylist": "Pridať do playlistu",
|
||||||
"LabelAddToPlaylistBatch": "Pridať {0} položie do playlistu",
|
"LabelAddToPlaylistBatch": "Pridať {0} položiek do playlistu",
|
||||||
"LabelAddedAt": "Pridané",
|
"LabelAddedAt": "Pridané",
|
||||||
"LabelAddedDate": "Pridané {0}",
|
"LabelAddedDate": "Pridané {0}",
|
||||||
"LabelAdminUsersOnly": "Iba administrátory",
|
"LabelAdminUsersOnly": "Iba administrátori",
|
||||||
"LabelAll": "Všetko",
|
"LabelAll": "Všetko",
|
||||||
"LabelAllEpisodesDownloaded": "Všetky epizódy stiahnuté",
|
"LabelAllEpisodesDownloaded": "Všetky epizódy stiahnuté",
|
||||||
"LabelAllUsers": "Všetci užívatelia",
|
"LabelAllUsers": "Všetci používatelia",
|
||||||
"LabelAllUsersExcludingGuests": "Všetci užívatelia okrem hostí",
|
"LabelAllUsersExcludingGuests": "Všetci používatelia okrem hostí",
|
||||||
"LabelAllUsersIncludingGuests": "Všetci užívatelia vrátane hostí",
|
"LabelAllUsersIncludingGuests": "Všetci používatelia vrátane hostí",
|
||||||
"LabelAlreadyInYourLibrary": "Už v tvojej knižnici",
|
"LabelAlreadyInYourLibrary": "Už vo vašej knižnici",
|
||||||
"LabelApiKeyCreated": "Kľúč API \"{0}\" bol úspešne vytvorený.",
|
"LabelApiKeyCreated": "Kľúč API \"{0}\" bol úspešne vytvorený.",
|
||||||
"LabelApiKeyCreatedDescription": "Skopírujte si kľúč API teraz, neskôr ho už neuvidíte.",
|
"LabelApiKeyCreatedDescription": "Skopírujte si kľúč API teraz, neskôr ho už neuvidíte.",
|
||||||
"LabelApiKeyUser": "Vykonáva v mene používateľa",
|
"LabelApiKeyUser": "Vykonáva v mene používateľa",
|
||||||
"LabelApiKeyUserDescription": "Uvedená API bude mať rovnaké práva ako používateľ, v mene ktorého koná. Rovnako v záznamoch budú jednotlivé krky uvedené, ako keby ich vykonal samotný používateľ.",
|
"LabelApiKeyUserDescription": "Tento kľúč API bude mať rovnaké oprávnenia ako používateľ, v mene ktorého koná. V záznamoch sa bude zobrazovať rovnako, ako keby požiadavku vykonal samotný používateľ.",
|
||||||
"LabelApiToken": "API Token",
|
"LabelApiToken": "API Token",
|
||||||
"LabelAppend": "Pridať",
|
"LabelAppend": "Pridať",
|
||||||
"LabelAudioBitrate": "Bitrate audio stopy (napr. 128k)",
|
"LabelAudioBitrate": "Bitrate audio stopy (napr. 128k)",
|
||||||
@@ -257,20 +259,20 @@
|
|||||||
"LabelAuthors": "Autori",
|
"LabelAuthors": "Autori",
|
||||||
"LabelAutoDownloadEpisodes": "Automaticky sťahovať epizódy",
|
"LabelAutoDownloadEpisodes": "Automaticky sťahovať epizódy",
|
||||||
"LabelAutoFetchMetadata": "Automaticky načítať metadáta",
|
"LabelAutoFetchMetadata": "Automaticky načítať metadáta",
|
||||||
"LabelAutoFetchMetadataHelp": "Načíta metadáta pre názov, autra a sériu pre optimalizované nahranie. Dodatočné metadáta môžu byť priradené po nahraní.",
|
"LabelAutoFetchMetadataHelp": "Načíta metadáta pre názov, autora a sériu pre optimalizované nahranie. Dodatočné metadáta môžu byť priradené po nahraní.",
|
||||||
"LabelAutoLaunch": "Automaticky spustiť",
|
"LabelAutoLaunch": "Automaticky spustiť",
|
||||||
"LabelAutoLaunchDescription": "Presmerovať na poskytovateľa authentifikácie pri otvorení prihlasovacej stránky (manuálny prepis cesty <code>/login?autoLaunch=0</code>)",
|
"LabelAutoLaunchDescription": "Presmerovať na poskytovateľa autentifikácie pri otvorení prihlasovacej stránky (manuálny prepis cesty <code>/login?autoLaunch=0</code>)",
|
||||||
"LabelAutoRegister": "Automatická registrácia",
|
"LabelAutoRegister": "Automatická registrácia",
|
||||||
"LabelAutoRegisterDescription": "Automaticky vytvoriť nových užívateľov po prihlásení",
|
"LabelAutoRegisterDescription": "Automaticky vytvoriť nových užívateľov po prihlásení",
|
||||||
"LabelBackToUser": "Späť na užívateľa",
|
"LabelBackToUser": "Späť na užívateľa",
|
||||||
"LabelBackupAudioFiles": "Zálohovať audio súbory",
|
"LabelBackupAudioFiles": "Zálohovať audio súbory",
|
||||||
"LabelBackupLocation": "Zálohovať lokáciu",
|
"LabelBackupLocation": "Umiestnenie zálohy",
|
||||||
"LabelBackupsEnableAutomaticBackups": "Automatické zálohy",
|
"LabelBackupsEnableAutomaticBackups": "Automatické zálohy",
|
||||||
"LabelBackupsEnableAutomaticBackupsHelp": "Zálohy uložené v /metadata/backups",
|
"LabelBackupsEnableAutomaticBackupsHelp": "Zálohy uložené v /metadata/backups",
|
||||||
"LabelBackupsMaxBackupSize": "Maximálna veľkosť zálohy (v GB) (0 pre neobmedzenú)",
|
"LabelBackupsMaxBackupSize": "Maximálna veľkosť zálohy (v GB) (0 pre neobmedzenú)",
|
||||||
"LabelBackupsMaxBackupSizeHelp": "Ako poistka proti miskonfigurácii, zálohy zlyhajú ak prekročia konfigurovanú veľkosť.",
|
"LabelBackupsMaxBackupSizeHelp": "Ako poistka proti nesprávnej konfigurácii zálohy zlyhajú, ak prekročia nastavenú veľkosť.",
|
||||||
"LabelBackupsNumberToKeep": "Počet uložených záloh",
|
"LabelBackupsNumberToKeep": "Počet uložených záloh",
|
||||||
"LabelBackupsNumberToKeepHelp": "Týmto spôsobom odstránite vždy iba jednu zálohu. V prípade, ak chcete odtrániť viacero záloh, mali by ste ich odstrániť manuálne.",
|
"LabelBackupsNumberToKeepHelp": "Týmto spôsobom odstránite vždy iba jednu zálohu. V prípade, ak chcete odstrániť viacero záloh, mali by ste ich odstrániť manuálne.",
|
||||||
"LabelBitrate": "Bitrate",
|
"LabelBitrate": "Bitrate",
|
||||||
"LabelBonus": "Bonus",
|
"LabelBonus": "Bonus",
|
||||||
"LabelBooks": "Knihy",
|
"LabelBooks": "Knihy",
|
||||||
@@ -282,8 +284,8 @@
|
|||||||
"LabelChapterTitle": "Názov kapitoly",
|
"LabelChapterTitle": "Názov kapitoly",
|
||||||
"LabelChapters": "Kapitoly",
|
"LabelChapters": "Kapitoly",
|
||||||
"LabelChaptersFound": "nájdených kapitol",
|
"LabelChaptersFound": "nájdených kapitol",
|
||||||
"LabelClickForMoreInfo": "Klikni pre viac informácií",
|
"LabelClickForMoreInfo": "Kliknite pre viac informácií",
|
||||||
"LabelClickToUseCurrentValue": "Klikni pre použitie aktuálnej hodnoty",
|
"LabelClickToUseCurrentValue": "Kliknite pre použitie aktuálnej hodnoty",
|
||||||
"LabelClosePlayer": "Zavrieť prehrávač",
|
"LabelClosePlayer": "Zavrieť prehrávač",
|
||||||
"LabelCodec": "Kodek",
|
"LabelCodec": "Kodek",
|
||||||
"LabelCollapseSeries": "Zbaliť série",
|
"LabelCollapseSeries": "Zbaliť série",
|
||||||
@@ -306,7 +308,7 @@
|
|||||||
"LabelCustomCronExpression": "Vlastný Cron príkaz:",
|
"LabelCustomCronExpression": "Vlastný Cron príkaz:",
|
||||||
"LabelDatetime": "Dátum a čas",
|
"LabelDatetime": "Dátum a čas",
|
||||||
"LabelDays": "Dni",
|
"LabelDays": "Dni",
|
||||||
"LabelDeleteFromFileSystemCheckbox": "Zmazať zo systému (odškrtni len pre odstránenie z databázy)",
|
"LabelDeleteFromFileSystemCheckbox": "Zmazať zo súborového systému (odškrtnite pre odstránenie len z databázy)",
|
||||||
"LabelDescription": "Popis",
|
"LabelDescription": "Popis",
|
||||||
"LabelDeselectAll": "Odznačiť všetko",
|
"LabelDeselectAll": "Odznačiť všetko",
|
||||||
"LabelDetectedPattern": "Identifikovaný vzor:",
|
"LabelDetectedPattern": "Identifikovaný vzor:",
|
||||||
@@ -324,16 +326,16 @@
|
|||||||
"LabelDurationComparisonExactMatch": "(presná zhoda)",
|
"LabelDurationComparisonExactMatch": "(presná zhoda)",
|
||||||
"LabelDurationComparisonLonger": "({0} dlhšie)",
|
"LabelDurationComparisonLonger": "({0} dlhšie)",
|
||||||
"LabelDurationComparisonShorter": "({0} kratšie)",
|
"LabelDurationComparisonShorter": "({0} kratšie)",
|
||||||
"LabelDurationFound": "Nájdená dlžka:",
|
"LabelDurationFound": "Nájdená dĺžka:",
|
||||||
"LabelEbook": "E-kniha",
|
"LabelEbook": "E-kniha",
|
||||||
"LabelEbooks": "E-knihy",
|
"LabelEbooks": "E-knihy",
|
||||||
"LabelEdit": "Upraviť",
|
"LabelEdit": "Upraviť",
|
||||||
"LabelEmail": "E-mail",
|
"LabelEmail": "E-mail",
|
||||||
"LabelEmailSettingsFromAddress": "Z e-mailu",
|
"LabelEmailSettingsFromAddress": "Z e-mailu",
|
||||||
"LabelEmailSettingsRejectUnauthorized": "Odmietnuť neautorizované certifikáty",
|
"LabelEmailSettingsRejectUnauthorized": "Odmietnuť neautorizované certifikáty",
|
||||||
"LabelEmailSettingsRejectUnauthorizedHelp": "Vypnutie validácie SSL certifikátu môže tvoje pripojenie vystaviť bezpečnostným rizikám, ako napríklad MitM útokom. Vypni túto možnosť len v prípade, že rozumieš dôsledkom a dôveruješ e-mailovému serveru, ku ktorému sa pripájaš.",
|
"LabelEmailSettingsRejectUnauthorizedHelp": "Vypnutie validácie SSL certifikátu môže vaše pripojenie vystaviť bezpečnostným rizikám, ako napríklad MitM útokom. Túto možnosť vypnite len v prípade, že rozumiete dôsledkom a dôverujete e-mailovému serveru, ku ktorému sa pripájate.",
|
||||||
"LabelEmailSettingsSecure": "Bezpečné",
|
"LabelEmailSettingsSecure": "Bezpečné",
|
||||||
"LabelEmailSettingsSecureHelp": "Pri povolení bude na pripojenie k serveru použité TLS. V opačnom prípade je TLS použité iba v prípade, ak server podporuje rozšírenie STARTTLS. Vo väčšine prípadov povoľte túto možnosť, ak sa pripájate cez port 465. V prípadoch, ak používate port 587 alebo 25, túto voľbu nepovoľujte. (prevzaté z nodemailer.com/smtp/#authentification)",
|
"LabelEmailSettingsSecureHelp": "Pri povolení bude na pripojenie k serveru použité TLS. V opačnom prípade je TLS použité iba v prípade, ak server podporuje rozšírenie STARTTLS. Vo väčšine prípadov povoľte túto možnosť, ak sa pripájate cez port 465. V prípadoch, ak používate port 587 alebo 25, túto voľbu nepovoľujte. (prevzaté z nodemailer.com/smtp/#authentication)",
|
||||||
"LabelEmailSettingsTestAddress": "Testovacia adresa",
|
"LabelEmailSettingsTestAddress": "Testovacia adresa",
|
||||||
"LabelEmbeddedCover": "Vložený prebal",
|
"LabelEmbeddedCover": "Vložený prebal",
|
||||||
"LabelEnable": "Povoliť",
|
"LabelEnable": "Povoliť",
|
||||||
@@ -346,7 +348,7 @@
|
|||||||
"LabelEncodingTimeWarning": "Prekódovanie môže trvať aj 30 minút.",
|
"LabelEncodingTimeWarning": "Prekódovanie môže trvať aj 30 minút.",
|
||||||
"LabelEncodingWarningAdvancedSettings": "Pozor: Nemeňte uvedené nastavenia, pokiaľ nie ste dostatočne oboznámený s nastaveniami ffmpeg prekódovania.",
|
"LabelEncodingWarningAdvancedSettings": "Pozor: Nemeňte uvedené nastavenia, pokiaľ nie ste dostatočne oboznámený s nastaveniami ffmpeg prekódovania.",
|
||||||
"LabelEncodingWatcherDisabled": "V prípade, ak nemáte povolené automatické sledovanie zmien, bude na konci potrebné audioknihu opätovne preskenovať.",
|
"LabelEncodingWatcherDisabled": "V prípade, ak nemáte povolené automatické sledovanie zmien, bude na konci potrebné audioknihu opätovne preskenovať.",
|
||||||
"LabelEnd": "Ukončiť",
|
"LabelEnd": "Koniec",
|
||||||
"LabelEndOfChapter": "Koniec kapitoly",
|
"LabelEndOfChapter": "Koniec kapitoly",
|
||||||
"LabelEpisode": "Epizóda",
|
"LabelEpisode": "Epizóda",
|
||||||
"LabelEpisodeNotLinkedToRssFeed": "Epizóda bez RSS zdroja",
|
"LabelEpisodeNotLinkedToRssFeed": "Epizóda bez RSS zdroja",
|
||||||
@@ -365,7 +367,7 @@
|
|||||||
"LabelExpiresNever": "Nikdy",
|
"LabelExpiresNever": "Nikdy",
|
||||||
"LabelExplicit": "Explicitný obsah",
|
"LabelExplicit": "Explicitný obsah",
|
||||||
"LabelExplicitChecked": "Explicitné (zaškrtnuté)",
|
"LabelExplicitChecked": "Explicitné (zaškrtnuté)",
|
||||||
"LabelExplicitUnchecked": "Ne-explicitné (nezaškrtnuté)",
|
"LabelExplicitUnchecked": "Neexplicitné (nezaškrtnuté)",
|
||||||
"LabelExportOPML": "Exportovať OPML",
|
"LabelExportOPML": "Exportovať OPML",
|
||||||
"LabelFeedURL": "URL zdroja",
|
"LabelFeedURL": "URL zdroja",
|
||||||
"LabelFetchingMetadata": "Sťahovanie metadát",
|
"LabelFetchingMetadata": "Sťahovanie metadát",
|
||||||
@@ -383,7 +385,7 @@
|
|||||||
"LabelFolders": "Priečinky",
|
"LabelFolders": "Priečinky",
|
||||||
"LabelFontBold": "Tučné",
|
"LabelFontBold": "Tučné",
|
||||||
"LabelFontBoldness": "Hrúbka písma",
|
"LabelFontBoldness": "Hrúbka písma",
|
||||||
"LabelFontFamily": "písmo",
|
"LabelFontFamily": "Písmo",
|
||||||
"LabelFontItalic": "Kurzíva",
|
"LabelFontItalic": "Kurzíva",
|
||||||
"LabelFontScale": "Veľkosť písma",
|
"LabelFontScale": "Veľkosť písma",
|
||||||
"LabelFontStrikethrough": "Preškrtnuté",
|
"LabelFontStrikethrough": "Preškrtnuté",
|
||||||
@@ -394,7 +396,7 @@
|
|||||||
"LabelHardDeleteFile": "Nezvratné zmazanie súborov",
|
"LabelHardDeleteFile": "Nezvratné zmazanie súborov",
|
||||||
"LabelHasEbook": "Má e-knihu",
|
"LabelHasEbook": "Má e-knihu",
|
||||||
"LabelHasSupplementaryEbook": "Má doplnkovú e-knihu",
|
"LabelHasSupplementaryEbook": "Má doplnkovú e-knihu",
|
||||||
"LabelHideSubtitles": "Skryť titulky",
|
"LabelHideSubtitles": "Skryť podnázvy",
|
||||||
"LabelHighestPriority": "Najvyššia priorita",
|
"LabelHighestPriority": "Najvyššia priorita",
|
||||||
"LabelHost": "Host",
|
"LabelHost": "Host",
|
||||||
"LabelHour": "Hodina",
|
"LabelHour": "Hodina",
|
||||||
@@ -414,17 +416,18 @@
|
|||||||
"LabelIntervalEveryDay": "Denne",
|
"LabelIntervalEveryDay": "Denne",
|
||||||
"LabelIntervalEveryHour": "Každú hodinu",
|
"LabelIntervalEveryHour": "Každú hodinu",
|
||||||
"LabelIntervalEveryMinute": "Každú minútu",
|
"LabelIntervalEveryMinute": "Každú minútu",
|
||||||
"LabelInvert": "Invertne",
|
"LabelInvert": "Invertovať",
|
||||||
|
"LabelIpAddress": "IP adresa",
|
||||||
"LabelItem": "Položka",
|
"LabelItem": "Položka",
|
||||||
"LabelJumpBackwardAmount": "Posunúť vpred o",
|
"LabelJumpBackwardAmount": "Posunúť dozadu o",
|
||||||
"LabelJumpForwardAmount": "Posunúť dozadu o",
|
"LabelJumpForwardAmount": "Posunúť vpred o",
|
||||||
"LabelLanguage": "Jazyk",
|
"LabelLanguage": "Jazyk",
|
||||||
"LabelLanguageDefaultServer": "Prednastavený jazyk servera",
|
"LabelLanguageDefaultServer": "Prednastavený jazyk servera",
|
||||||
"LabelLanguages": "Jazyky",
|
"LabelLanguages": "Jazyky",
|
||||||
"LabelLastBookAdded": "Posledná pridaná kniha",
|
"LabelLastBookAdded": "Posledná pridaná kniha",
|
||||||
"LabelLastBookUpdated": "Posledná aktualizovaná kniha",
|
"LabelLastBookUpdated": "Posledná aktualizovaná kniha",
|
||||||
"LabelLastProgressDate": "Posledný pokrok: {0}",
|
"LabelLastProgressDate": "Posledný pokrok: {0}",
|
||||||
"LabelLastSeen": "Posledne videné",
|
"LabelLastSeen": "Naposledy videné",
|
||||||
"LabelLastTime": "Posledný čas",
|
"LabelLastTime": "Posledný čas",
|
||||||
"LabelLastUpdate": "Posledná aktualizácia",
|
"LabelLastUpdate": "Posledná aktualizácia",
|
||||||
"LabelLayout": "Rozloženie",
|
"LabelLayout": "Rozloženie",
|
||||||
@@ -448,8 +451,8 @@
|
|||||||
"LabelLookForNewEpisodesAfterDate": "Hľadať nové epizódy od uvedeného dátumu",
|
"LabelLookForNewEpisodesAfterDate": "Hľadať nové epizódy od uvedeného dátumu",
|
||||||
"LabelLowestPriority": "Najnižšia priorita",
|
"LabelLowestPriority": "Najnižšia priorita",
|
||||||
"LabelMatchConfidence": "Istota",
|
"LabelMatchConfidence": "Istota",
|
||||||
"LabelMatchExistingUsersBy": "Vyhľadaj vytvorených užívateľov podľa",
|
"LabelMatchExistingUsersBy": "Vyhľadať vytvorených používateľov podľa",
|
||||||
"LabelMatchExistingUsersByDescription": "Používané na pripájanie vytvorených užívateľov. Po pripojení budú užívatelia vyhľadaní na základe jedinečného id poskytnutého Vaším poskytovateľom SSO",
|
"LabelMatchExistingUsersByDescription": "Používané na pripájanie vytvorených užívateľov. Po pripojení budú používatelia vyhľadaní na základe jedinečného id poskytnutého Vaším poskytovateľom SSO",
|
||||||
"LabelMaxEpisodesToDownload": "Stiahnuť maximálne # epizód. Pre neobmedzené sťahovanie zadajte 0.",
|
"LabelMaxEpisodesToDownload": "Stiahnuť maximálne # epizód. Pre neobmedzené sťahovanie zadajte 0.",
|
||||||
"LabelMaxEpisodesToDownloadPerCheck": "Pri kontrole stiahnuť maximálne # epizód",
|
"LabelMaxEpisodesToDownloadPerCheck": "Pri kontrole stiahnuť maximálne # epizód",
|
||||||
"LabelMaxEpisodesToKeep": "Uchovávať maximálne # epizód",
|
"LabelMaxEpisodesToKeep": "Uchovávať maximálne # epizód",
|
||||||
@@ -488,19 +491,19 @@
|
|||||||
"LabelNotificationAppriseURL": "URL odkaz(-y) Apprise",
|
"LabelNotificationAppriseURL": "URL odkaz(-y) Apprise",
|
||||||
"LabelNotificationAvailableVariables": "Dostupné premenné",
|
"LabelNotificationAvailableVariables": "Dostupné premenné",
|
||||||
"LabelNotificationBodyTemplate": "Šablóna obsahu",
|
"LabelNotificationBodyTemplate": "Šablóna obsahu",
|
||||||
"LabelNotificationEvent": "Udalosť oznámení",
|
"LabelNotificationEvent": "Udalosť notifikácie",
|
||||||
"LabelNotificationTitleTemplate": "Šablóna názvu",
|
"LabelNotificationTitleTemplate": "Šablóna názvu",
|
||||||
"LabelNotificationsMaxFailedAttempts": "Maximálny počet neúspešných pokusov",
|
"LabelNotificationsMaxFailedAttempts": "Maximálny počet neúspešných pokusov",
|
||||||
"LabelNotificationsMaxFailedAttemptsHelp": "Notifikácie sa automaticky vypnú, ak ich odoslanie zlyhá nasledovný počet krát",
|
"LabelNotificationsMaxFailedAttemptsHelp": "Notifikácie sa automaticky vypnú, ak ich odoslanie zlyhá nasledovný počet krát",
|
||||||
"LabelNotificationsMaxQueueSize": "Maximálna dĺžka fronty oznámení",
|
"LabelNotificationsMaxQueueSize": "Maximálna dĺžka fronty notifikácií",
|
||||||
"LabelNotificationsMaxQueueSizeHelp": "Odosielanie udalostí je ohraničené na jedno oznámenie za sekundu. Novovzniknuté udalosti budú ignorované, ak bude fronta oznámení naplnená. Toto nastavenie zabraňuje nevyžiadanému zahlteniu oznámeniami.",
|
"LabelNotificationsMaxQueueSizeHelp": "Odosielanie udalostí je ohraničené na jednu notifikáciu za sekundu. Novovzniknuté udalosti budú ignorované, ak bude fronta notifikácií naplnená. Toto nastavenie zabraňuje nevyžiadanému zahlteniu notifikáciami.",
|
||||||
"LabelNumberOfBooks": "Počet kníh",
|
"LabelNumberOfBooks": "Počet kníh",
|
||||||
"LabelNumberOfChapters": "Počet kapitol:",
|
"LabelNumberOfChapters": "Počet kapitol:",
|
||||||
"LabelNumberOfEpisodes": "# z epizód",
|
"LabelNumberOfEpisodes": "Počet epizód",
|
||||||
"LabelOpenIDAdvancedPermsClaimDescription": "Názov OpenID predpokladá prítomnosť pokročilých povolení pre užívateľské akcie v rámci aplikácie, ktoré sú aplikovateľné na ne-administrátorské role (<b>ak sú nakonfigurované</b>). Ak potvrdenie takýchto pokročilých povolení nie je v odozve prítomné, prístup do ABS bude automaticky zamietnutý. Ak v odozve chýba len niektoré z očakávaných nastavení, tak bude jeho hodnota automaticky nastavená na <code>false</code>. Uistite sa prosím, že forma odozvy poskytovateľa identity má nasledovnú štruktúru:",
|
"LabelOpenIDAdvancedPermsClaimDescription": "Názov OpenID claimu, ktorý obsahuje rozšírené oprávnenia pre akcie používateľov v rámci aplikácie a ktorý sa uplatní na roly iné ako administrátorské (<b>ak je nakonfigurovaný</b>). Ak claim v odpovedi chýba, prístup do ABS bude zamietnutý. Ak chýba jedna z možností, bude sa považovať za <code>false</code>. Uistite sa, že claim od poskytovateľa identity zodpovedá očakávanej štruktúre:",
|
||||||
"LabelOpenIDClaims": "Ak ponecháte nasledujúce nastavenia prázdne, pokročilé nastavenia skupín a povolení nebudú aktivované a automaticky bude nastavená skupina 'Užívateľ'.",
|
"LabelOpenIDClaims": "Ak ponecháte nasledujúce nastavenia prázdne, pokročilé nastavenia skupín a povolení nebudú aktivované a automaticky bude nastavená skupina 'Užívateľ'.",
|
||||||
"LabelOpenIDGroupClaimDescription": "Pri názve požiadavky OpenID sa predpokladá, že obsahuje zoznam užívateľských skupín. Bežne označovaný ako <code>groups</code>. <b>Ak je správne nakonfigurovaný</b>, aplikácia automaticky pridelí role podľa príslušnosti k užívateľským skupinám pod podmienkou, že sú tieto skupiny v požiadavke nazvané (bez ohľadu na veľkosť písmen) ako 'admin', 'user' alebo 'guest'. Požiadavka musí obsahovať zoznam skupín a ak užívateľ patrí do viacerých skupín, aplikácia mu priradí rolu, ktorá zodpovedá skupine s najvyššími prístupovými právami. Ak sa žiadna z poskytnutých skupín nezhoduje, prístup bude zamietnutý.",
|
"LabelOpenIDGroupClaimDescription": "Názov OpenID claimu, ktorý obsahuje zoznam skupín používateľa. Bežne sa označuje ako <code>groups</code>. <b>Ak je nakonfigurovaný</b>, aplikácia automaticky pridelí roly podľa členstva používateľa v skupinách, pokiaľ sú tieto skupiny v claime pomenované (bez rozlišovania veľkosti písmen) 'admin', 'user' alebo 'guest'. Claim má obsahovať zoznam a ak používateľ patrí do viacerých skupín, aplikácia mu priradí rolu zodpovedajúcu najvyššej úrovni prístupu. Ak sa nezhoduje žiadna skupina, prístup bude zamietnutý.",
|
||||||
"LabelOpenRSSFeed": "Otvor RSS zdroj",
|
"LabelOpenRSSFeed": "Otvoriť RSS zdroj",
|
||||||
"LabelOverwrite": "Prepísať",
|
"LabelOverwrite": "Prepísať",
|
||||||
"LabelPaginationPageXOfY": "Stránka {0} z {1}",
|
"LabelPaginationPageXOfY": "Stránka {0} z {1}",
|
||||||
"LabelPassword": "Heslo",
|
"LabelPassword": "Heslo",
|
||||||
@@ -517,17 +520,17 @@
|
|||||||
"LabelPersonalYearReview": "Váš rok v prehľade ({0})",
|
"LabelPersonalYearReview": "Váš rok v prehľade ({0})",
|
||||||
"LabelPhotoPathURL": "Cesta/URL fotky",
|
"LabelPhotoPathURL": "Cesta/URL fotky",
|
||||||
"LabelPlayMethod": "Metóda prehrávania",
|
"LabelPlayMethod": "Metóda prehrávania",
|
||||||
"LabelPlaybackRateIncrementDecrement": "Veľkosť kroku zrýchlenia/spomalenia rýchlosti prehávania",
|
"LabelPlaybackRateIncrementDecrement": "Veľkosť kroku zrýchlenia/spomalenia rýchlosti prehrávania",
|
||||||
"LabelPlayerChapterNumberMarker": "{0} z {1}",
|
"LabelPlayerChapterNumberMarker": "{0} z {1}",
|
||||||
"LabelPlaylists": "Playlisty",
|
"LabelPlaylists": "Playlisty",
|
||||||
"LabelPodcast": "Podcast",
|
"LabelPodcast": "Podcast",
|
||||||
"LabelPodcastSearchRegion": "Región vyhľadávania podcastu",
|
"LabelPodcastSearchRegion": "Región vyhľadávania podcastu",
|
||||||
"LabelPodcastType": "Typ podcastu",
|
"LabelPodcastType": "Typ podcastu",
|
||||||
"LabelPodcasts": "Podcasty",
|
"LabelPodcasts": "Podcasty",
|
||||||
"LabelPort": "Prístav",
|
"LabelPort": "Port",
|
||||||
"LabelPrefixesToIgnore": "Ignorované predpony (bez ohľadu na veľkosť písmen)",
|
"LabelPrefixesToIgnore": "Ignorované predpony (bez ohľadu na veľkosť písmen)",
|
||||||
"LabelPreventIndexing": "Zabráni indexácii vašich zdrojov službami iTunes a Google podcast directories",
|
"LabelPreventIndexing": "Zabráni indexácii vašich zdrojov službami iTunes a Google podcast directories",
|
||||||
"LabelPrimaryEbook": "Primárny e-book",
|
"LabelPrimaryEbook": "Primárna e-kniha",
|
||||||
"LabelProgress": "Aktuálny stav",
|
"LabelProgress": "Aktuálny stav",
|
||||||
"LabelProvider": "Poskytovateľ",
|
"LabelProvider": "Poskytovateľ",
|
||||||
"LabelProviderAuthorizationValue": "Obsah hlavičky autorizácie",
|
"LabelProviderAuthorizationValue": "Obsah hlavičky autorizácie",
|
||||||
@@ -546,7 +549,7 @@
|
|||||||
"LabelRSSFeedURL": "URL RSS zdroja",
|
"LabelRSSFeedURL": "URL RSS zdroja",
|
||||||
"LabelRandomly": "Náhodne",
|
"LabelRandomly": "Náhodne",
|
||||||
"LabelReAddSeriesToContinueListening": "Znova pridať série do pokračujúceho počúvania",
|
"LabelReAddSeriesToContinueListening": "Znova pridať série do pokračujúceho počúvania",
|
||||||
"LabelRead": "Načítať",
|
"LabelRead": "Čítať",
|
||||||
"LabelReadAgain": "Čítať znova",
|
"LabelReadAgain": "Čítať znova",
|
||||||
"LabelReadEbookWithoutProgress": "Čítať e-knihu bez zmeny stavu",
|
"LabelReadEbookWithoutProgress": "Čítať e-knihu bez zmeny stavu",
|
||||||
"LabelRecentSeries": "Posledné série",
|
"LabelRecentSeries": "Posledné série",
|
||||||
@@ -562,9 +565,9 @@
|
|||||||
"LabelRemoveMetadataFile": "Odstrániť súbory metadát z priečinkov položiek v knižnici",
|
"LabelRemoveMetadataFile": "Odstrániť súbory metadát z priečinkov položiek v knižnici",
|
||||||
"LabelRemoveMetadataFileHelp": "Odstrániť všetky súbory metadata.json a metadata.abs vo Vašich {0} priečinkoch.",
|
"LabelRemoveMetadataFileHelp": "Odstrániť všetky súbory metadata.json a metadata.abs vo Vašich {0} priečinkoch.",
|
||||||
"LabelRowsPerPage": "Počet riadkov na stránku",
|
"LabelRowsPerPage": "Počet riadkov na stránku",
|
||||||
"LabelSearchTerm": "Hľadaj výraz",
|
"LabelSearchTerm": "Hľadať výraz",
|
||||||
"LabelSearchTitle": "Hľadaj názov",
|
"LabelSearchTitle": "Hľadať názov",
|
||||||
"LabelSearchTitleOrASIN": "Hľadaj názov alebo ASIN",
|
"LabelSearchTitleOrASIN": "Hľadať názov alebo ASIN",
|
||||||
"LabelSeason": "Sezóna",
|
"LabelSeason": "Sezóna",
|
||||||
"LabelSeasonNumber": "Sezóna #{0}",
|
"LabelSeasonNumber": "Sezóna #{0}",
|
||||||
"LabelSelectAll": "Vybrať všetko",
|
"LabelSelectAll": "Vybrať všetko",
|
||||||
@@ -595,7 +598,7 @@
|
|||||||
"LabelSettingsEpubsAllowScriptedContentHelp": "Povoliť e-knihám spúšťanie skriptov. Odporúča sa túto voľbu nepovolovať, pokiaľ plne nedôverujete zdrojom súborov e-kníh.",
|
"LabelSettingsEpubsAllowScriptedContentHelp": "Povoliť e-knihám spúšťanie skriptov. Odporúča sa túto voľbu nepovolovať, pokiaľ plne nedôverujete zdrojom súborov e-kníh.",
|
||||||
"LabelSettingsExperimentalFeatures": "Experimentálne funkcie",
|
"LabelSettingsExperimentalFeatures": "Experimentálne funkcie",
|
||||||
"LabelSettingsExperimentalFeaturesHelp": "Funkcie vo vývoji, ktoré ocenia Vašu spätnú väzbu a pomoc s testovaním. Kliknite pre otvorenie diskusie na GitHub-e.",
|
"LabelSettingsExperimentalFeaturesHelp": "Funkcie vo vývoji, ktoré ocenia Vašu spätnú väzbu a pomoc s testovaním. Kliknite pre otvorenie diskusie na GitHub-e.",
|
||||||
"LabelSettingsFindCovers": "Nájdi prebaly",
|
"LabelSettingsFindCovers": "Hľadať prebaly",
|
||||||
"LabelSettingsFindCoversHelp": "Ak Vaša audiokniha neobsahuje vložený prebal alebo jeho obrázok v priečinku audioknihy, skener sa ho pokúsi automaticky vyhľadať.<br>Poznámka: Táto voľba predĺži čas skenovania",
|
"LabelSettingsFindCoversHelp": "Ak Vaša audiokniha neobsahuje vložený prebal alebo jeho obrázok v priečinku audioknihy, skener sa ho pokúsi automaticky vyhľadať.<br>Poznámka: Táto voľba predĺži čas skenovania",
|
||||||
"LabelSettingsHideSingleBookSeries": "Skryť série obsahujúce len jednu knihu",
|
"LabelSettingsHideSingleBookSeries": "Skryť série obsahujúce len jednu knihu",
|
||||||
"LabelSettingsHideSingleBookSeriesHelp": "Série obsahujúce len jednu knihu budú skryté na stránke sérií a na poličkách domácej stránky.",
|
"LabelSettingsHideSingleBookSeriesHelp": "Série obsahujúce len jednu knihu budú skryté na stránke sérií a na poličkách domácej stránky.",
|
||||||
@@ -606,17 +609,17 @@
|
|||||||
"LabelSettingsLibraryMarkAsFinishedWhen": "Označiť položku média ako dokončenú",
|
"LabelSettingsLibraryMarkAsFinishedWhen": "Označiť položku média ako dokončenú",
|
||||||
"LabelSettingsOnlyShowLaterBooksInContinueSeries": "Preskočiť predchádzajúce knihy v pokračujúcej sérii",
|
"LabelSettingsOnlyShowLaterBooksInContinueSeries": "Preskočiť predchádzajúce knihy v pokračujúcej sérii",
|
||||||
"LabelSettingsOnlyShowLaterBooksInContinueSeriesHelp": "Polička pokračujúcich sérií na domácej stránke zobrazuje prvú nezačatú knihu série, ktorá má dokončenú aspoň jednu z kníh série a žiadne započaté knihy. Povolením tohto nastavenia bude pokračujúca séria začínať poslednou ukončenou knihou miesto prvej nepočúvanej.",
|
"LabelSettingsOnlyShowLaterBooksInContinueSeriesHelp": "Polička pokračujúcich sérií na domácej stránke zobrazuje prvú nezačatú knihu série, ktorá má dokončenú aspoň jednu z kníh série a žiadne započaté knihy. Povolením tohto nastavenia bude pokračujúca séria začínať poslednou ukončenou knihou miesto prvej nepočúvanej.",
|
||||||
"LabelSettingsParseSubtitles": "Parsovať podtituly",
|
"LabelSettingsParseSubtitles": "Rozpoznávať podnázvy",
|
||||||
"LabelSettingsParseSubtitlesHelp": "Extrahovať podtituly z názvov priečinkov audiokníh.<br>Podtitul musí byť oddelený \" - \"<br>tj. \"Názov knihy - Podtitul knihy\" má podtitul \"Podtitul knihy\"",
|
"LabelSettingsParseSubtitlesHelp": "Extrahovať podnázvy z názvov priečinkov audiokníh.<br>Podnázov musí byť oddelený \" - \"<br>t. j. \"Názov knihy - Podnázov knihy\" má podnázov \"Podnázov knihy\"",
|
||||||
"LabelSettingsPreferMatchedMetadata": "Preferovať vyhľadané metadáta",
|
"LabelSettingsPreferMatchedMetadata": "Preferovať vyhľadané metadáta",
|
||||||
"LabelSettingsPreferMatchedMetadataHelp": "Pri použití funkcie Rýchle vyhľadávanie, vyhľadané údaje prepíšu príslušné údaje položky. Defaultne funkcia Rýchle vyhľadávanie vyplní iba chýbajúce údaje.",
|
"LabelSettingsPreferMatchedMetadataHelp": "Pri použití funkcie Rýchle vyhľadávanie, vyhľadané údaje prepíšu príslušné údaje položky. Defaultne funkcia Rýchle vyhľadávanie vyplní iba chýbajúce údaje.",
|
||||||
"LabelSettingsSkipMatchingBooksWithASIN": "Preskočiť vyhľadané knihy, ktoré už majú vyplnené ASIN",
|
"LabelSettingsSkipMatchingBooksWithASIN": "Preskočiť vyhľadané knihy, ktoré už majú vyplnené ASIN",
|
||||||
"LabelSettingsSkipMatchingBooksWithISBN": "Preskočiť vyhľadané knihy, ktoré už majú vyplnené ISBN",
|
"LabelSettingsSkipMatchingBooksWithISBN": "Preskočiť vyhľadané knihy, ktoré už majú vyplnené ISBN",
|
||||||
"LabelSettingsSortingIgnorePrefixes": "Pri triedení ignorovať prefixy",
|
"LabelSettingsSortingIgnorePrefixes": "Pri triedení ignorovať predpony",
|
||||||
"LabelSettingsSortingIgnorePrefixesHelp": "tj. v prípade prefixu \"the\" bude názov knihy \"The Book Title\" usporiadaný podľa \"Book Title, The\"",
|
"LabelSettingsSortingIgnorePrefixesHelp": "t. j. v prípade predpony \"the\" bude názov knihy \"The Book Title\" usporiadaný podľa \"Book Title, The\"",
|
||||||
"LabelSettingsSquareBookCovers": "Použiť štvorcové prebaly kníh",
|
"LabelSettingsSquareBookCovers": "Použiť štvorcové prebaly kníh",
|
||||||
"LabelSettingsSquareBookCoversHelp": "Preferovať štvorcové prebaly pred štandardnými prebalmi kníh formátu 1.6:1",
|
"LabelSettingsSquareBookCoversHelp": "Preferovať štvorcové prebaly pred štandardnými prebalmi kníh formátu 1.6:1",
|
||||||
"LabelSettingsStoreCoversWithItem": "Okladať prebaly k položkám",
|
"LabelSettingsStoreCoversWithItem": "Ukladať prebaly k položkám",
|
||||||
"LabelSettingsStoreCoversWithItemHelp": "Defaultne sú prebaly uložené v priečinku /metadata/items, povolením tejto voľby budú prebaly umiestnené do priečinkov jednotlivých položiek Vašej knižnice, pričom bude vždy použitý len jeden súbor s názvom \"cover\"",
|
"LabelSettingsStoreCoversWithItemHelp": "Defaultne sú prebaly uložené v priečinku /metadata/items, povolením tejto voľby budú prebaly umiestnené do priečinkov jednotlivých položiek Vašej knižnice, pričom bude vždy použitý len jeden súbor s názvom \"cover\"",
|
||||||
"LabelSettingsStoreMetadataWithItem": "Uložiť metadáta spolu s položkou",
|
"LabelSettingsStoreMetadataWithItem": "Uložiť metadáta spolu s položkou",
|
||||||
"LabelSettingsStoreMetadataWithItemHelp": "Defaultne sú súbory metadát ukladané do priečinka /metadata/items, pri povolení tejto voľby budú súbory metadát uložené do priečinkov položiek Vašej knižnice",
|
"LabelSettingsStoreMetadataWithItemHelp": "Defaultne sú súbory metadát ukladané do priečinka /metadata/items, pri povolení tejto voľby budú súbory metadát uložené do priečinkov položiek Vašej knižnice",
|
||||||
@@ -674,14 +677,14 @@
|
|||||||
"LabelTimeDurationXMinutes": "{0} minút",
|
"LabelTimeDurationXMinutes": "{0} minút",
|
||||||
"LabelTimeDurationXSeconds": "{0} sekúnd",
|
"LabelTimeDurationXSeconds": "{0} sekúnd",
|
||||||
"LabelTimeInMinutes": "Čas v minútach",
|
"LabelTimeInMinutes": "Čas v minútach",
|
||||||
"LabelTimeLeft": "{0} ponechaných",
|
"LabelTimeLeft": "Zostáva {0}",
|
||||||
"LabelTimeListened": "Čas počúvania",
|
"LabelTimeListened": "Čas počúvania",
|
||||||
"LabelTimeListenedToday": "Dnešný čas počúvania",
|
"LabelTimeListenedToday": "Dnešný čas počúvania",
|
||||||
"LabelTimeRemaining": "Zostáva {0}",
|
"LabelTimeRemaining": "Zostáva {0}",
|
||||||
"LabelTimeToShift": "Čas posunutia v sekundách",
|
"LabelTimeToShift": "Čas posunutia v sekundách",
|
||||||
"LabelTitle": "Názov",
|
"LabelTitle": "Názov",
|
||||||
"LabelToolsEmbedMetadata": "Vlož metadáta",
|
"LabelToolsEmbedMetadata": "Vložiť metadáta",
|
||||||
"LabelToolsEmbedMetadataDescription": "Vloždo zvukových súborov metadáta obsahujúce obrázok prebalu a kapitoly.",
|
"LabelToolsEmbedMetadataDescription": "Vložiť do zvukových súborov metadáta obsahujúce obrázok prebalu a kapitoly.",
|
||||||
"LabelToolsM4bEncoder": "M4B Encoder",
|
"LabelToolsM4bEncoder": "M4B Encoder",
|
||||||
"LabelToolsMakeM4b": "Vytvoriť M4B súbor audioknihy",
|
"LabelToolsMakeM4b": "Vytvoriť M4B súbor audioknihy",
|
||||||
"LabelToolsMakeM4bDescription": "Generovať .M4B súbor audioknihy obsahujúci vložené metadáta, obrázok prebalu a kapitoly.",
|
"LabelToolsMakeM4bDescription": "Generovať .M4B súbor audioknihy obsahujúci vložené metadáta, obrázok prebalu a kapitoly.",
|
||||||
@@ -690,7 +693,7 @@
|
|||||||
"LabelTotalDuration": "Celkové trvanie",
|
"LabelTotalDuration": "Celkové trvanie",
|
||||||
"LabelTotalTimeListened": "Celkový čas počúvania",
|
"LabelTotalTimeListened": "Celkový čas počúvania",
|
||||||
"LabelTrackFromFilename": "Stopa podľa názvu súboru",
|
"LabelTrackFromFilename": "Stopa podľa názvu súboru",
|
||||||
"LabelTrackFromMetadata": "Stopa podľ metadát",
|
"LabelTrackFromMetadata": "Stopa podľa metadát",
|
||||||
"LabelTracks": "Stopy",
|
"LabelTracks": "Stopy",
|
||||||
"LabelTracksMultiTrack": "Viacstopová",
|
"LabelTracksMultiTrack": "Viacstopová",
|
||||||
"LabelTracksNone": "Žiadne stopy",
|
"LabelTracksNone": "Žiadne stopy",
|
||||||
@@ -706,14 +709,14 @@
|
|||||||
"LabelUpdateDetails": "Aktualizovať detaily",
|
"LabelUpdateDetails": "Aktualizovať detaily",
|
||||||
"LabelUpdateDetailsHelp": "Povoliť nahradenie existujúcich detailov pre vybrané knihy, ak bolo vyhľadanie úspešné",
|
"LabelUpdateDetailsHelp": "Povoliť nahradenie existujúcich detailov pre vybrané knihy, ak bolo vyhľadanie úspešné",
|
||||||
"LabelUpdatedAt": "Aktualizované",
|
"LabelUpdatedAt": "Aktualizované",
|
||||||
"LabelUploaderDragAndDrop": "Potiahni a vlož súbory alebo priečinky",
|
"LabelUploaderDragAndDrop": "Potiahnite a pustite súbory alebo priečinky",
|
||||||
"LabelUploaderDragAndDropFilesOnly": "Potiahni a vlož súbory",
|
"LabelUploaderDragAndDropFilesOnly": "Potiahnite a pustite súbory",
|
||||||
"LabelUploaderDropFiles": "Vlož súbory",
|
"LabelUploaderDropFiles": "Pustite súbory",
|
||||||
"LabelUploaderItemFetchMetadataHelp": "Automaticky vyhľadá názov, autora a sériu",
|
"LabelUploaderItemFetchMetadataHelp": "Automaticky vyhľadá názov, autora a sériu",
|
||||||
"LabelUseAdvancedOptions": "Použiť pokročilé nastavenia",
|
"LabelUseAdvancedOptions": "Použiť pokročilé nastavenia",
|
||||||
"LabelUseChapterTrack": "Použiť stopu kapitoly",
|
"LabelUseChapterTrack": "Použiť stopu kapitoly",
|
||||||
"LabelUseFullTrack": "Použiť celú stopu",
|
"LabelUseFullTrack": "Použiť celú stopu",
|
||||||
"LabelUseZeroForUnlimited": "Použito 0 pre neobmedzené",
|
"LabelUseZeroForUnlimited": "Použite 0 pre neobmedzené",
|
||||||
"LabelUser": "Používateľ",
|
"LabelUser": "Používateľ",
|
||||||
"LabelUsername": "Prihlasovacie meno",
|
"LabelUsername": "Prihlasovacie meno",
|
||||||
"LabelValue": "Hodnota",
|
"LabelValue": "Hodnota",
|
||||||
@@ -721,7 +724,7 @@
|
|||||||
"LabelViewBookmarks": "Zobraziť záložky",
|
"LabelViewBookmarks": "Zobraziť záložky",
|
||||||
"LabelViewChapters": "Zobraziť kapitoly",
|
"LabelViewChapters": "Zobraziť kapitoly",
|
||||||
"LabelViewPlayerSettings": "Zobraziť nastavenie prehrávania",
|
"LabelViewPlayerSettings": "Zobraziť nastavenie prehrávania",
|
||||||
"LabelViewQueue": "Zobraziť zoznam na prehratie",
|
"LabelViewQueue": "Zobraziť frontu prehrávania",
|
||||||
"LabelVolume": "Hlasitosť",
|
"LabelVolume": "Hlasitosť",
|
||||||
"LabelWebRedirectURLsDescription": "Autorizovať nasledovné URL linky pomocou Vášho OAuth poskytovateľa a povoliť presmerovanie späť na webovú aplikáciu po prihlásení:",
|
"LabelWebRedirectURLsDescription": "Autorizovať nasledovné URL linky pomocou Vášho OAuth poskytovateľa a povoliť presmerovanie späť na webovú aplikáciu po prihlásení:",
|
||||||
"LabelWebRedirectURLsSubfolder": "Podpriečinok pre presmerované URL",
|
"LabelWebRedirectURLsSubfolder": "Podpriečinok pre presmerované URL",
|
||||||
@@ -734,15 +737,15 @@
|
|||||||
"LabelYourBookmarks": "Vaše záložky",
|
"LabelYourBookmarks": "Vaše záložky",
|
||||||
"LabelYourPlaylists": "Vaše playlisty",
|
"LabelYourPlaylists": "Vaše playlisty",
|
||||||
"LabelYourProgress": "Váš aktuálny stav",
|
"LabelYourProgress": "Váš aktuálny stav",
|
||||||
"MessageAddToPlayerQueue": "Pridať do zoznamu prehrávania",
|
"MessageAddToPlayerQueue": "Pridať do fronty prehrávania",
|
||||||
"MessageAppriseDescription": "Aby ste mohli používať túto funkciumusíte mať k dispozícii inštanciu <a href=\"https://github.com/caronc/apprise-api\" target=\"_blank\">Apprise API</a> alebo inú, ktorá dokáže spracovávať rovnaké požiadavky/requesty.<br/>Apprise URL musí byť úplná URL určená na zasielanie notifikácií, tj. ak napr. vaša APi beží na <code>http://192.168.1.1:8337</code>, vložte do daného poľa <code>http://192.168.1.1:8337/notify</code>.",
|
"MessageAppriseDescription": "Aby ste mohli používať túto funkciu musíte mať k dispozícii inštanciu <a href=\"https://github.com/caronc/apprise-api\" target=\"_blank\">Apprise API</a> alebo inú, ktorá dokáže spracovávať rovnaké požiadavky/requesty.<br/>Apprise URL musí byť úplná URL určená na zasielanie notifikácií, t. j. ak napr. vaša API beží na <code>http://192.168.1.1:8337</code>, vložte do daného poľa <code>http://192.168.1.1:8337/notify</code>.",
|
||||||
"MessageAsinCheck": "Uistite sa, že používate ASIN zo správneho regiónu Audible, nie Amazonu.",
|
"MessageAsinCheck": "Uistite sa, že používate ASIN zo správneho regiónu Audible, nie Amazonu.",
|
||||||
"MessageAuthenticationLegacyTokenWarning": "Zastaralé API toleny budú v budúcnosti odstránené. Použite miesto nich <a href=\"/config/api-keys\">API kľúče</a>.",
|
"MessageAuthenticationLegacyTokenWarning": "Zastaralé API tokeny budú v budúcnosti odstránené. Použite namiesto nich <a href=\"/config/api-keys\">API kľúče</a>.",
|
||||||
"MessageAuthenticationOIDCChangesRestart": "Reštartujte svoj server po uložení, aby mohli byť použité zmeny OIDC.",
|
"MessageAuthenticationOIDCChangesRestart": "Reštartujte svoj server po uložení, aby mohli byť použité zmeny OIDC.",
|
||||||
"MessageAuthenticationSecurityMessage": "Overovanie bolo kvôli bezpečnosti vylepšené. Všetci používatelia sa musia znova prihlásiť.",
|
"MessageAuthenticationSecurityMessage": "Overovanie bolo kvôli bezpečnosti vylepšené. Všetci používatelia sa musia znova prihlásiť.",
|
||||||
"MessageBackupsDescription": "Zálohy pokrývajú používateľov, ich aktuálne stavy počúvania, detaily položiek knižnice, nastavenia servera a obrázky uložené v <code>/metadata/items</code> a <code>/metadata/authors</code>. Zálohy <strong>neobsahujú</strong> súbory v priečinkoch vašich knižníc.",
|
"MessageBackupsDescription": "Zálohy pokrývajú používateľov, ich aktuálne stavy počúvania, detaily položiek knižnice, nastavenia servera a obrázky uložené v <code>/metadata/items</code> a <code>/metadata/authors</code>. Zálohy <strong>neobsahujú</strong> súbory v priečinkoch vašich knižníc.",
|
||||||
"MessageBackupsLocationEditNote": "Poznámka: Zmena umiestnenia záloh nepresunie ani nezmení existujúce zálohy",
|
"MessageBackupsLocationEditNote": "Poznámka: Zmena umiestnenia záloh nepresunie ani nezmení existujúce zálohy",
|
||||||
"MessageBackupsLocationNoEditNote": "Poznámka: Umietnenie záloh je nastavené prostredníctvom premennej prostredia a nie je ho možné zmeniť z tohto miesta.",
|
"MessageBackupsLocationNoEditNote": "Poznámka: Umiestnenie záloh je nastavené prostredníctvom premennej prostredia a nie je ho možné zmeniť z tohto miesta.",
|
||||||
"MessageBackupsLocationPathEmpty": "Cesta umiestnenia záloh nemôže byť prázdna",
|
"MessageBackupsLocationPathEmpty": "Cesta umiestnenia záloh nemôže byť prázdna",
|
||||||
"MessageBatchEditPopulateMapDetailsAllHelp": "Vyplniť povolené polia dátami zo všetkých položiek. Viacpočetné hodnoty v poliach budú zlúčené",
|
"MessageBatchEditPopulateMapDetailsAllHelp": "Vyplniť povolené polia dátami zo všetkých položiek. Viacpočetné hodnoty v poliach budú zlúčené",
|
||||||
"MessageBatchEditPopulateMapDetailsItemHelp": "Vyplniť polia povolených detailov z údajov tejto položky",
|
"MessageBatchEditPopulateMapDetailsItemHelp": "Vyplniť polia povolených detailov z údajov tejto položky",
|
||||||
@@ -774,8 +777,9 @@
|
|||||||
"MessageConfirmDeleteSession": "Ste si istý, že chcete zmazať túto reláciu?",
|
"MessageConfirmDeleteSession": "Ste si istý, že chcete zmazať túto reláciu?",
|
||||||
"MessageConfirmEmbedMetadataInAudioFiles": "Ste si istý, že chcete vložiť metadáta do {0} zvukových súborov?",
|
"MessageConfirmEmbedMetadataInAudioFiles": "Ste si istý, že chcete vložiť metadáta do {0} zvukových súborov?",
|
||||||
"MessageConfirmForceReScan": "Ste si istý, že chcete spustiť vynútený re-sken?",
|
"MessageConfirmForceReScan": "Ste si istý, že chcete spustiť vynútený re-sken?",
|
||||||
|
"MessageConfirmLogoutDevice": "Ste si istý, že sa chcete odhlásiť zo zariadenia \"{0}\"?",
|
||||||
"MessageConfirmMarkAllEpisodesFinished": "Chcete označiť všetky epizódy ako dokončené?",
|
"MessageConfirmMarkAllEpisodesFinished": "Chcete označiť všetky epizódy ako dokončené?",
|
||||||
"MessageConfirmMarkAllEpisodesNotFinished": "Checte označiť všetky epizódy ako nedokončené?",
|
"MessageConfirmMarkAllEpisodesNotFinished": "Chcete označiť všetky epizódy ako nedokončené?",
|
||||||
"MessageConfirmMarkItemFinished": "Chcete označiť \"{0}\" ako dokončené?",
|
"MessageConfirmMarkItemFinished": "Chcete označiť \"{0}\" ako dokončené?",
|
||||||
"MessageConfirmMarkItemNotFinished": "Chcete označiť \"{0}\" ako nedokončené?",
|
"MessageConfirmMarkItemNotFinished": "Chcete označiť \"{0}\" ako nedokončené?",
|
||||||
"MessageConfirmMarkSeriesFinished": "Ste si istý, že chcete označiť všetky knihy v tejto sérii ako dokončené?",
|
"MessageConfirmMarkSeriesFinished": "Ste si istý, že chcete označiť všetky knihy v tejto sérii ako dokončené?",
|
||||||
@@ -796,7 +800,7 @@
|
|||||||
"MessageConfirmRemoveMetadataFiles": "Ste si istý, že chcete odstrániť všetky súbory metadata.{0} z priečinkov položiek vašej knižnice?",
|
"MessageConfirmRemoveMetadataFiles": "Ste si istý, že chcete odstrániť všetky súbory metadata.{0} z priečinkov položiek vašej knižnice?",
|
||||||
"MessageConfirmRemoveNarrator": "Ste si istý, že chcete odstrániť interpreta \"{0}\"?",
|
"MessageConfirmRemoveNarrator": "Ste si istý, že chcete odstrániť interpreta \"{0}\"?",
|
||||||
"MessageConfirmRemovePlaylist": "Ste si istý, že chcete odstrániť váš playlist \"{0}\"?",
|
"MessageConfirmRemovePlaylist": "Ste si istý, že chcete odstrániť váš playlist \"{0}\"?",
|
||||||
"MessageConfirmRenameGenre": "Ste si istý, že chcete nahradiť žáner \"{0}\" vo všetkých položkách žánrom \"{0}\"?",
|
"MessageConfirmRenameGenre": "Ste si istý, že chcete nahradiť žáner \"{0}\" žánrom \"{1}\" vo všetkých položkách?",
|
||||||
"MessageConfirmRenameGenreMergeNote": "Poznámka: Tento žáner už existuje a preto bude zlúčený.",
|
"MessageConfirmRenameGenreMergeNote": "Poznámka: Tento žáner už existuje a preto bude zlúčený.",
|
||||||
"MessageConfirmRenameGenreWarning": "Varovanie! Podobný žáner len s odlišným zápisom už existuje \"{0}\".",
|
"MessageConfirmRenameGenreWarning": "Varovanie! Podobný žáner len s odlišným zápisom už existuje \"{0}\".",
|
||||||
"MessageConfirmRenameTag": "Ste si istý, že chcete zmeniť štítok \"{0}\" za \"{1}\" vo všetkých položkách?",
|
"MessageConfirmRenameTag": "Ste si istý, že chcete zmeniť štítok \"{0}\" za \"{1}\" vo všetkých položkách?",
|
||||||
@@ -805,18 +809,18 @@
|
|||||||
"MessageConfirmResetProgress": "Ste si istý, že chcete resetnúť váš aktuálny stav počúvania?",
|
"MessageConfirmResetProgress": "Ste si istý, že chcete resetnúť váš aktuálny stav počúvania?",
|
||||||
"MessageConfirmSendEbookToDevice": "Ste si istý, že chcete poslať {0} e-knihu \"{1}\" do zariadenia \"{2}\"?",
|
"MessageConfirmSendEbookToDevice": "Ste si istý, že chcete poslať {0} e-knihu \"{1}\" do zariadenia \"{2}\"?",
|
||||||
"MessageConfirmUnlinkOpenId": "Ste si istý, že chcete odstrániť prepojenie tohto používateľa na OpenID?",
|
"MessageConfirmUnlinkOpenId": "Ste si istý, že chcete odstrániť prepojenie tohto používateľa na OpenID?",
|
||||||
"MessageDaysListenedInTheLastYear": "{0} dní počúvania počas posledného roku",
|
"MessageDaysListenedInTheLastYear": "{0} dní počúvania počas posledného roka",
|
||||||
"MessageDownloadingEpisode": "Sťahovanie epizódy",
|
"MessageDownloadingEpisode": "Sťahovanie epizódy",
|
||||||
"MessageDragFilesIntoTrackOrder": "Presuňte súbory do správneho poradia prehrávania",
|
"MessageDragFilesIntoTrackOrder": "Presuňte súbory do správneho poradia prehrávania",
|
||||||
"MessageEmbedFailed": "Vloženie zlyhalo!",
|
"MessageEmbedFailed": "Vloženie zlyhalo!",
|
||||||
"MessageEmbedFinished": "Vloženie skončené!",
|
"MessageEmbedFinished": "Vloženie skončené!",
|
||||||
"MessageEmbedQueue": "Zaradené do fronty na vloženie metadát ({0} v zozname)",
|
"MessageEmbedQueue": "Zaradené do fronty na vloženie metadát ({0} vo fronte)",
|
||||||
"MessageEpisodesQueuedForDownload": "{0} epizód(a) v zozname na sťahovanie",
|
"MessageEpisodesQueuedForDownload": "{0} epizód(a) vo fronte na sťahovanie",
|
||||||
"MessageEreaderDevices": "Na zaistenie dodania e-kníh môže byť nutné zadanie vyššie uvedenej e-mailovej adresy ako overeného odosielateľa v každom z nižšie vypísaných zariadení.",
|
"MessageEreaderDevices": "Na zaistenie dodania e-kníh môže byť nutné zadanie vyššie uvedenej e-mailovej adresy ako overeného odosielateľa v každom z nižšie vypísaných zariadení.",
|
||||||
"MessageFeedURLWillBe": "URL zdroja bude {0}",
|
"MessageFeedURLWillBe": "URL zdroja bude {0}",
|
||||||
"MessageFetching": "Získavam...",
|
"MessageFetching": "Získavam...",
|
||||||
"MessageForceReScanDescription": "preskenuje všetky súbory ako pri prvom skenovaní. ID3 štítky zvukových súborov, OPF súbory a textové súbory budú nanovo naskenované.",
|
"MessageForceReScanDescription": "preskenuje všetky súbory ako pri prvom skenovaní. ID3 štítky zvukových súborov, OPF súbory a textové súbory budú nanovo naskenované.",
|
||||||
"MessageHeatmapListeningTimeTooltip": "<strong>{0} počúvajúcich</strong> na {1}",
|
"MessageHeatmapListeningTimeTooltip": "<strong>{0} počúvania</strong> dňa {1}",
|
||||||
"MessageHeatmapNoListeningSessions": "Žiadne relácie počúvania na {0}",
|
"MessageHeatmapNoListeningSessions": "Žiadne relácie počúvania na {0}",
|
||||||
"MessageImportantNotice": "Dôležité upozornenie!",
|
"MessageImportantNotice": "Dôležité upozornenie!",
|
||||||
"MessageInsertChapterBelow": "Vložte kapitolu nižšie",
|
"MessageInsertChapterBelow": "Vložte kapitolu nižšie",
|
||||||
@@ -845,9 +849,9 @@
|
|||||||
"MessageNoDescription": "Žiadny popis",
|
"MessageNoDescription": "Žiadny popis",
|
||||||
"MessageNoDevices": "Žiadne zariadenia",
|
"MessageNoDevices": "Žiadne zariadenia",
|
||||||
"MessageNoDownloadsInProgress": "Aktuálne neprebieha žiadne sťahovanie",
|
"MessageNoDownloadsInProgress": "Aktuálne neprebieha žiadne sťahovanie",
|
||||||
"MessageNoDownloadsQueued": "Žiadne sťahovania v poradí",
|
"MessageNoDownloadsQueued": "Žiadne sťahovania vo fronte",
|
||||||
"MessageNoEpisodeMatchesFound": "Neboli spárované žiadne epizódy",
|
"MessageNoEpisodeMatchesFound": "Neboli spárované žiadne epizódy",
|
||||||
"MessageNoEpisodes": "Žiadne eizódy",
|
"MessageNoEpisodes": "Žiadne epizódy",
|
||||||
"MessageNoFoldersAvailable": "Žiadne priečinky nie sú dostupné",
|
"MessageNoFoldersAvailable": "Žiadne priečinky nie sú dostupné",
|
||||||
"MessageNoGenres": "Žiadne žánre",
|
"MessageNoGenres": "Žiadne žánre",
|
||||||
"MessageNoIssues": "Žiadne problémy",
|
"MessageNoIssues": "Žiadne problémy",
|
||||||
@@ -856,7 +860,7 @@
|
|||||||
"MessageNoListeningSessions": "Žiadne relácie",
|
"MessageNoListeningSessions": "Žiadne relácie",
|
||||||
"MessageNoLogs": "Žiadne záznamy udalostí",
|
"MessageNoLogs": "Žiadne záznamy udalostí",
|
||||||
"MessageNoMediaProgress": "Žiadny stav médií",
|
"MessageNoMediaProgress": "Žiadny stav médií",
|
||||||
"MessageNoNotifications": "Žiadne upozornenia",
|
"MessageNoNotifications": "Žiadne notifikácie",
|
||||||
"MessageNoPodcastFeed": "Chybný podcast: Žiadny zdroj",
|
"MessageNoPodcastFeed": "Chybný podcast: Žiadny zdroj",
|
||||||
"MessageNoPodcastsFound": "Žiadne podcasty neboli nájdené",
|
"MessageNoPodcastsFound": "Žiadne podcasty neboli nájdené",
|
||||||
"MessageNoResults": "Žiadne výsledky",
|
"MessageNoResults": "Žiadne výsledky",
|
||||||
@@ -877,19 +881,19 @@
|
|||||||
"MessagePodcastHasNoRSSFeedForMatching": "Podcast nemá žiadnu URL RSS zdroja na spárovanie",
|
"MessagePodcastHasNoRSSFeedForMatching": "Podcast nemá žiadnu URL RSS zdroja na spárovanie",
|
||||||
"MessagePodcastSearchField": "Zadajte hľadaný výraz alebo URL RSS zdroja",
|
"MessagePodcastSearchField": "Zadajte hľadaný výraz alebo URL RSS zdroja",
|
||||||
"MessageQuickEmbedInProgress": "Prebieha rýchle vkladanie",
|
"MessageQuickEmbedInProgress": "Prebieha rýchle vkladanie",
|
||||||
"MessageQuickEmbedQueue": "Zadané na rýchle vloženie ({0} v rade)",
|
"MessageQuickEmbedQueue": "Zaradené do fronty na rýchle vloženie ({0} vo fronte)",
|
||||||
"MessageQuickMatchAllEpisodes": "Rýchle vyhľadanie všetkých epizód",
|
"MessageQuickMatchAllEpisodes": "Rýchle vyhľadanie všetkých epizód",
|
||||||
"MessageQuickMatchDescription": "Doplní všetky nevyplnené údaje a chýbajúci prebal z prvého výsledku vyhľdávania '{0}'. Neprepíše už existujúce údaje, vykoná tak iba v prípade, ak je zaškrtnutá voľba 'Preferovať vyhľadané metadáta'.",
|
"MessageQuickMatchDescription": "Doplní všetky nevyplnené údaje a chýbajúci prebal z prvého výsledku vyhľadávania '{0}'. Neprepíše už existujúce údaje, vykoná tak iba v prípade, ak je zaškrtnutá voľba 'Preferovať vyhľadané metadáta'.",
|
||||||
"MessageRemoveChapter": "Odstrániť kapitolu",
|
"MessageRemoveChapter": "Odstrániť kapitolu",
|
||||||
"MessageRemoveEpisodes": "Odstrániť {0} epizódu(-y)",
|
"MessageRemoveEpisodes": "Odstrániť {0} epizódu(-y)",
|
||||||
"MessageRemoveFromPlayerQueue": "Odstrániť zo zoznamu prehrávania",
|
"MessageRemoveFromPlayerQueue": "Odstrániť z fronty prehrávania",
|
||||||
"MessageRemoveUserWarning": "Ste si istí, že chcete trvalo odstrániť užívateľa \"{0}\"?",
|
"MessageRemoveUserWarning": "Ste si istý, že chcete trvalo odstrániť užívateľa \"{0}\"?",
|
||||||
"MessageReportBugsAndContribute": "Nahlásiť chyby, požiadavky na funkcie, a prispievať na",
|
"MessageReportBugsAndContribute": "Nahlásiť chyby, požiadavky na funkcie, a prispievať na",
|
||||||
"MessageResetChaptersConfirm": "Ste si istý, že chcete resetnúť kapitoly a zahodiť zmeny, ktoré ste vykonali?",
|
"MessageResetChaptersConfirm": "Ste si istý, že chcete resetnúť kapitoly a zahodiť zmeny, ktoré ste vykonali?",
|
||||||
"MessageRestoreBackupConfirm": "Ste si istí, že chcete obnoviť zálohu vytvorenú",
|
"MessageRestoreBackupConfirm": "Ste si istý, že chcete obnoviť zálohu vytvorenú",
|
||||||
"MessageRestoreBackupWarning": "Obnovenie zálohy spôsobí kompletný prepis databázy umiestnenej v /config a obrázkov prebalov a autorov v /metadata/items a /metadata/authors.<br /><br />Zálohy nemenia žiadne súbory v priečinkoch vašej knižnice. Ak ste povolili v nastaveniach servera ukladanie obrázkov prebalov a metadát v priečinkoch knižnice, tieto nie sú zálohované a teda ani prepisované.<br /><br />Všetky klienti používajúci váš server budú automaticky obnovené.",
|
"MessageRestoreBackupWarning": "Obnovenie zálohy spôsobí kompletný prepis databázy umiestnenej v /config a obrázkov prebalov a autorov v /metadata/items a /metadata/authors.<br /><br />Zálohy nemenia žiadne súbory v priečinkoch vašej knižnice. Ak ste povolili v nastaveniach servera ukladanie obrázkov prebalov a metadát v priečinkoch knižnice, tieto nie sú zálohované a teda ani prepisované.<br /><br />Všetci klienti používajúci váš server budú automaticky obnovené.",
|
||||||
"MessageScheduleLibraryScanNote": "Pre väčšinu používateľov sa odporúča nechať túto funkciu vypnutú a ponechať zapnuté nastavenie „Automatické sledovanie zmien v knižnici“ – táto funkcia automaticky zistí zmeny vo vašich priečinkoch knižnice. Túto funkciu zapnite, ak „Automatické sledovanie zmien v knižnici“ nefunguje vo vašom súborovom systéme (napr. NFS).",
|
"MessageScheduleLibraryScanNote": "Pre väčšinu používateľov sa odporúča nechať túto funkciu vypnutú a ponechať zapnuté nastavenie „Automatické sledovanie zmien v knižnici“ – táto funkcia automaticky zistí zmeny vo vašich priečinkoch knižnice. Túto funkciu zapnite, ak „Automatické sledovanie zmien v knižnici“ nefunguje vo vašom súborovom systéme (napr. NFS).",
|
||||||
"MessageScheduleRunEveryWeekdayAtTime": "Spustiť každú {0} o {1}",
|
"MessageScheduleRunEveryWeekdayAtTime": "Spustiť každý týždeň: {0} o {1}",
|
||||||
"MessageSearchResultsFor": "Výsledky vyhľadávania pre",
|
"MessageSearchResultsFor": "Výsledky vyhľadávania pre",
|
||||||
"MessageSelected": "{0} vybrané",
|
"MessageSelected": "{0} vybrané",
|
||||||
"MessageSeriesSequenceCannotContainSpaces": "Poradie série nemôže obsahovať medzery",
|
"MessageSeriesSequenceCannotContainSpaces": "Poradie série nemôže obsahovať medzery",
|
||||||
@@ -897,25 +901,25 @@
|
|||||||
"MessageSetChaptersFromTracksDescription": "Nastaviť jednotlivé zvukové súbory ako kapitoly a názvy zvukových súborov ako názvy týchto kapitol",
|
"MessageSetChaptersFromTracksDescription": "Nastaviť jednotlivé zvukové súbory ako kapitoly a názvy zvukových súborov ako názvy týchto kapitol",
|
||||||
"MessageShareExpirationWillBe": "Expiruje <strong>{0}</strong>",
|
"MessageShareExpirationWillBe": "Expiruje <strong>{0}</strong>",
|
||||||
"MessageShareExpiresIn": "Uplynie za {0}",
|
"MessageShareExpiresIn": "Uplynie za {0}",
|
||||||
"MessageShareURLWillBe": "URL na zdielanie bude <strong>{0}</strong>",
|
"MessageShareURLWillBe": "URL na zdieľanie bude <strong>{0}</strong>",
|
||||||
"MessageStartPlaybackAtTime": "Spustiť prehrávanie \"{0}\" o {1}?",
|
"MessageStartPlaybackAtTime": "Spustiť prehrávanie \"{0}\" o {1}?",
|
||||||
"MessageTaskAudioFileNotWritable": "Do súboru \"{0}\" sa nedá zapisovať",
|
"MessageTaskAudioFileNotWritable": "Do súboru \"{0}\" sa nedá zapisovať",
|
||||||
"MessageTaskCanceledByUser": "Úloha zrušená používateľom",
|
"MessageTaskCanceledByUser": "Úloha zrušená používateľom",
|
||||||
"MessageTaskDownloadingEpisodeDescription": "Sťahuje sa diel \"{0}\"",
|
"MessageTaskDownloadingEpisodeDescription": "Sťahuje sa epizóda \"{0}\"",
|
||||||
"MessageTaskEmbeddingMetadata": "Vkladanie metadát",
|
"MessageTaskEmbeddingMetadata": "Vkladanie metadát",
|
||||||
"MessageTaskEmbeddingMetadataDescription": "Vkladanie metadát v audioknihe \"{0}\"",
|
"MessageTaskEmbeddingMetadataDescription": "Vkladanie metadát v audioknihe \"{0}\"",
|
||||||
"MessageTaskEncodingM4b": "Kódovanie M4B",
|
"MessageTaskEncodingM4b": "Kódovanie M4B",
|
||||||
"MessageTaskEncodingM4bDescription": "Konverzia audioknihy \"{0}\" do jedného m4b súboru",
|
"MessageTaskEncodingM4bDescription": "Konverzia audioknihy \"{0}\" do jedného m4b súboru",
|
||||||
"MessageTaskFailed": "Zlyhané",
|
"MessageTaskFailed": "Zlyhané",
|
||||||
"MessageTaskFailedToBackupAudioFile": "Nepodarilo sa zazálohovať audio súbor \"{0}\"",
|
"MessageTaskFailedToBackupAudioFile": "Nepodarilo sa zazálohovať audio súbor \"{0}\"",
|
||||||
"MessageTaskFailedToCreateCacheDirectory": "Nepodarilo sa vytvoriť adresár na cache",
|
"MessageTaskFailedToCreateCacheDirectory": "Nepodarilo sa vytvoriť priečinok vyrovnávacej pamäte",
|
||||||
"MessageTaskFailedToEmbedMetadataInFile": "Vloženie metadát do \"{0}\" zlyhalo",
|
"MessageTaskFailedToEmbedMetadataInFile": "Vloženie metadát do \"{0}\" zlyhalo",
|
||||||
"MessageTaskFailedToMergeAudioFiles": "Nepodarilo sa pospájať audio súbory",
|
"MessageTaskFailedToMergeAudioFiles": "Nepodarilo sa pospájať audio súbory",
|
||||||
"MessageTaskFailedToMoveM4bFile": "Nepodarilo sa presunúť m4b súbor",
|
"MessageTaskFailedToMoveM4bFile": "Nepodarilo sa presunúť m4b súbor",
|
||||||
"MessageTaskFailedToWriteMetadataFile": "Nepodarilo sa zapísať súbor s metadátami",
|
"MessageTaskFailedToWriteMetadataFile": "Nepodarilo sa zapísať súbor s metadátami",
|
||||||
"MessageTaskMatchingBooksInLibrary": "Spárované knihy v knižnici \"{0}\"",
|
"MessageTaskMatchingBooksInLibrary": "Spárované knihy v knižnici \"{0}\"",
|
||||||
"MessageTaskNoFilesToScan": "Žiadne súbory k skenu",
|
"MessageTaskNoFilesToScan": "Žiadne súbory k skenu",
|
||||||
"MessageTaskOpmlImport": "OMPL import",
|
"MessageTaskOpmlImport": "OPML import",
|
||||||
"MessageTaskOpmlImportDescription": "Vytvorenie podcastov z {0} RSS zdrojov",
|
"MessageTaskOpmlImportDescription": "Vytvorenie podcastov z {0} RSS zdrojov",
|
||||||
"MessageTaskOpmlImportFeed": "Importný zdroj OPML",
|
"MessageTaskOpmlImportFeed": "Importný zdroj OPML",
|
||||||
"MessageTaskOpmlImportFeedDescription": "Import RSS zdroja \"{0}\"",
|
"MessageTaskOpmlImportFeedDescription": "Import RSS zdroja \"{0}\"",
|
||||||
@@ -937,7 +941,7 @@
|
|||||||
"MessageThinking": "Premýšľam...",
|
"MessageThinking": "Premýšľam...",
|
||||||
"MessageUploaderItemFailed": "Nahratie zlyhalo",
|
"MessageUploaderItemFailed": "Nahratie zlyhalo",
|
||||||
"MessageUploaderItemSuccess": "Úspešne nahrané!",
|
"MessageUploaderItemSuccess": "Úspešne nahrané!",
|
||||||
"MessageUploading": "Nahrávanie zmien...",
|
"MessageUploading": "Nahrávanie...",
|
||||||
"MessageValidCronExpression": "Platný cron výraz",
|
"MessageValidCronExpression": "Platný cron výraz",
|
||||||
"MessageWatcherIsDisabledGlobally": "Funkcia sledovania zmien je globálne vypnutá v nastaveniach servera",
|
"MessageWatcherIsDisabledGlobally": "Funkcia sledovania zmien je globálne vypnutá v nastaveniach servera",
|
||||||
"MessageXLibraryIsEmpty": "Knižnica {0} je prázdna!",
|
"MessageXLibraryIsEmpty": "Knižnica {0} je prázdna!",
|
||||||
@@ -947,7 +951,7 @@
|
|||||||
"NoteChapterEditorTimes": "Poznámka: Prvá kapitola musí vždy začínať v 0:00 a začiatok poslednej kapitoly nemôže prekročiť trvanie tejto audioknihy.",
|
"NoteChapterEditorTimes": "Poznámka: Prvá kapitola musí vždy začínať v 0:00 a začiatok poslednej kapitoly nemôže prekročiť trvanie tejto audioknihy.",
|
||||||
"NoteFolderPicker": "Poznámka: Priečinky, ktoré už boli priradené, sa ďalej nezobrazujú",
|
"NoteFolderPicker": "Poznámka: Priečinky, ktoré už boli priradené, sa ďalej nezobrazujú",
|
||||||
"NoteRSSFeedPodcastAppsHttps": "Varovanie: Väčšina podcastových aplikácií požaduje URL RSS zdroja s HTTPS",
|
"NoteRSSFeedPodcastAppsHttps": "Varovanie: Väčšina podcastových aplikácií požaduje URL RSS zdroja s HTTPS",
|
||||||
"NoteRSSFeedPodcastAppsPubDate": "Varovanie: 1 alebo viac vašich epizód neobsahuje infomáciu o dátum vydania. Niektoré podcastové ju vyžadujú.",
|
"NoteRSSFeedPodcastAppsPubDate": "Varovanie: 1 alebo viac vašich epizód neobsahuje informáciu o dátume vydania. Niektoré podcastové aplikácie ju vyžadujú.",
|
||||||
"NoteUploaderFoldersWithMediaFiles": "Priečinky obsahujúce súbory médií budú považované za samostatné položky knižnice.",
|
"NoteUploaderFoldersWithMediaFiles": "Priečinky obsahujúce súbory médií budú považované za samostatné položky knižnice.",
|
||||||
"NoteUploaderOnlyAudioFiles": "Ak budú nahraté iba zvukové súbory, každý zvukový súbor bude považovaný za samostatnú audioknihu.",
|
"NoteUploaderOnlyAudioFiles": "Ak budú nahraté iba zvukové súbory, každý zvukový súbor bude považovaný za samostatnú audioknihu.",
|
||||||
"NoteUploaderUnsupportedFiles": "Nepodporované súbory budú ignorované. Pri výbere alebo prenesení priečinka, budú všetky súbory, ktoré nie sú v priečinku niektorej z položiek, ignorované.",
|
"NoteUploaderUnsupportedFiles": "Nepodporované súbory budú ignorované. Pri výbere alebo prenesení priečinka, budú všetky súbory, ktoré nie sú v priečinku niektorej z položiek, ignorované.",
|
||||||
@@ -963,13 +967,13 @@
|
|||||||
"PlaceholderNewPlaylist": "Názov nového playlistu",
|
"PlaceholderNewPlaylist": "Názov nového playlistu",
|
||||||
"PlaceholderSearch": "Vyhľadávanie..",
|
"PlaceholderSearch": "Vyhľadávanie..",
|
||||||
"PlaceholderSearchEpisode": "Vyhľadať epizódu..",
|
"PlaceholderSearchEpisode": "Vyhľadať epizódu..",
|
||||||
"StatsAuthorsAdded": "autorov pridaných",
|
"StatsAuthorsAdded": "pridaných autorov",
|
||||||
"StatsBooksAdded": "kníh pridaných",
|
"StatsBooksAdded": "pridaných kníh",
|
||||||
"StatsBooksAdditional": "Niektoré prílohy zahŕňajú…",
|
"StatsBooksAdditional": "Niektoré prílohy zahŕňajú…",
|
||||||
"StatsBooksFinished": "dokončených kníh",
|
"StatsBooksFinished": "dokončených kníh",
|
||||||
"StatsBooksFinishedThisYear": "Niektoré knihy dokončené tento rok…",
|
"StatsBooksFinishedThisYear": "Niektoré knihy dokončené tento rok…",
|
||||||
"StatsBooksListenedTo": "vypočutých kníh",
|
"StatsBooksListenedTo": "vypočutých kníh",
|
||||||
"StatsCollectionGrewTo": "Vaša knižná zbierka sa blíži k…",
|
"StatsCollectionGrewTo": "Vaša knižná zbierka narástla na…",
|
||||||
"StatsSessions": "relácie",
|
"StatsSessions": "relácie",
|
||||||
"StatsSpentListening": "strávených počúvaním",
|
"StatsSpentListening": "strávených počúvaním",
|
||||||
"StatsTopAuthor": "TOP AUTOR",
|
"StatsTopAuthor": "TOP AUTOR",
|
||||||
@@ -1001,7 +1005,7 @@
|
|||||||
"ToastBackupRestoreFailed": "Obnovenie zo zálohy zlyhalo",
|
"ToastBackupRestoreFailed": "Obnovenie zo zálohy zlyhalo",
|
||||||
"ToastBackupUploadFailed": "Nahratie zálohy zlyhalo",
|
"ToastBackupUploadFailed": "Nahratie zálohy zlyhalo",
|
||||||
"ToastBackupUploadSuccess": "Záloha bola nahratá",
|
"ToastBackupUploadSuccess": "Záloha bola nahratá",
|
||||||
"ToastBatchApplyDetailsToItemsSuccess": "Dotknuté údaje položiek",
|
"ToastBatchApplyDetailsToItemsSuccess": "Údaje boli použité na vybrané položky",
|
||||||
"ToastBatchDeleteFailed": "Hromadné odstránenie zlyhalo",
|
"ToastBatchDeleteFailed": "Hromadné odstránenie zlyhalo",
|
||||||
"ToastBatchDeleteSuccess": "Hromadné odstránenie bolo úspešné",
|
"ToastBatchDeleteSuccess": "Hromadné odstránenie bolo úspešné",
|
||||||
"ToastBatchQuickMatchFailed": "Hromadné rýchle vyhľadanie zlyhalo!",
|
"ToastBatchQuickMatchFailed": "Hromadné rýchle vyhľadanie zlyhalo!",
|
||||||
@@ -1037,12 +1041,12 @@
|
|||||||
"ToastDeviceTestEmailFailed": "Odoslanie testovacieho e-mailu zlyhalo",
|
"ToastDeviceTestEmailFailed": "Odoslanie testovacieho e-mailu zlyhalo",
|
||||||
"ToastDeviceTestEmailSuccess": "Testovací e-mail bol odoslaný",
|
"ToastDeviceTestEmailSuccess": "Testovací e-mail bol odoslaný",
|
||||||
"ToastEmailSettingsUpdateSuccess": "Nastavenia e-mailu boli aktualizované",
|
"ToastEmailSettingsUpdateSuccess": "Nastavenia e-mailu boli aktualizované",
|
||||||
"ToastEncodeCancelFailed": "Zrušenie znakového kódovania zlyhalo",
|
"ToastEncodeCancelFailed": "Zrušenie kódovania zlyhalo",
|
||||||
"ToastEncodeCancelSucces": "Znakové kódovanie bolo zrušené",
|
"ToastEncodeCancelSucces": "Kódovanie bolo zrušené",
|
||||||
"ToastEpisodeDownloadQueueClearFailed": "Vyčistenie poradia zlyhalo",
|
"ToastEpisodeDownloadQueueClearFailed": "Vyčistenie fronty zlyhalo",
|
||||||
"ToastEpisodeDownloadQueueClearSuccess": "Poradie sťahovania bolo vyčistené",
|
"ToastEpisodeDownloadQueueClearSuccess": "Fronta sťahovania bola vyčistená",
|
||||||
"ToastEpisodeUpdateSuccess": "{0} epizód bolo aktualizovaných",
|
"ToastEpisodeUpdateSuccess": "{0} epizód bolo aktualizovaných",
|
||||||
"ToastErrorCannotShare": "Na tomto zariadení nie je možné zdielať vybraným spôsobom",
|
"ToastErrorCannotShare": "Na tomto zariadení nie je možné zdieľať vybraným spôsobom",
|
||||||
"ToastFailedToCreate": "Vytvorenie zlyhalo",
|
"ToastFailedToCreate": "Vytvorenie zlyhalo",
|
||||||
"ToastFailedToDelete": "Zmazanie zlyhalo",
|
"ToastFailedToDelete": "Zmazanie zlyhalo",
|
||||||
"ToastFailedToLoadData": "Načítanie údajov zlyhalo",
|
"ToastFailedToLoadData": "Načítanie údajov zlyhalo",
|
||||||
@@ -1052,7 +1056,7 @@
|
|||||||
"ToastInvalidImageUrl": "Neplatná URL obrázku",
|
"ToastInvalidImageUrl": "Neplatná URL obrázku",
|
||||||
"ToastInvalidMaxEpisodesToDownload": "Neplatný maximálny počet epizód na stiahnutie",
|
"ToastInvalidMaxEpisodesToDownload": "Neplatný maximálny počet epizód na stiahnutie",
|
||||||
"ToastInvalidUrl": "Neplatná URL",
|
"ToastInvalidUrl": "Neplatná URL",
|
||||||
"ToastInvalidUrls": "Jedna alebo viac URL liniek sú neplatné",
|
"ToastInvalidUrls": "Jedna alebo viac URL adries je neplatných",
|
||||||
"ToastItemCoverUpdateSuccess": "Prebal položky bol aktualizovaný",
|
"ToastItemCoverUpdateSuccess": "Prebal položky bol aktualizovaný",
|
||||||
"ToastItemDeletedFailed": "Odstránenie položky zlyhalo",
|
"ToastItemDeletedFailed": "Odstránenie položky zlyhalo",
|
||||||
"ToastItemDeletedSuccess": "Položka bola odstránená",
|
"ToastItemDeletedSuccess": "Položka bola odstránená",
|
||||||
@@ -1087,11 +1091,11 @@
|
|||||||
"ToastNewUserUsernameError": "Zadajte používateľské meno",
|
"ToastNewUserUsernameError": "Zadajte používateľské meno",
|
||||||
"ToastNoNewEpisodesFound": "Žiadne nové epizódy neboli nájdené",
|
"ToastNoNewEpisodesFound": "Žiadne nové epizódy neboli nájdené",
|
||||||
"ToastNoRSSFeed": "Podcast nemá RSS zdroj",
|
"ToastNoRSSFeed": "Podcast nemá RSS zdroj",
|
||||||
"ToastNoUpdatesNecessary": "Žiadne aktualizácie nie nutné",
|
"ToastNoUpdatesNecessary": "Žiadne aktualizácie nie sú potrebné",
|
||||||
"ToastNotificationCreateFailed": "Vytvorenie notifikácie zlyhalo",
|
"ToastNotificationCreateFailed": "Vytvorenie notifikácie zlyhalo",
|
||||||
"ToastNotificationDeleteFailed": "Odstránenie notifikácie zlyhalo",
|
"ToastNotificationDeleteFailed": "Odstránenie notifikácie zlyhalo",
|
||||||
"ToastNotificationFailedMaximum": "Maximálny počet chybných pokusov musí byť >= 0",
|
"ToastNotificationFailedMaximum": "Maximálny počet chybných pokusov musí byť >= 0",
|
||||||
"ToastNotificationQueueMaximum": "Maximálny počet notifikácií v poradí musí byť >= 0",
|
"ToastNotificationQueueMaximum": "Maximálny počet notifikácií vo fronte musí byť >= 0",
|
||||||
"ToastNotificationSettingsUpdateSuccess": "Nastavenia notifikácií boli aktualizované",
|
"ToastNotificationSettingsUpdateSuccess": "Nastavenia notifikácií boli aktualizované",
|
||||||
"ToastNotificationTestTriggerFailed": "Spustenie testovacej notifikácie zlyhalo",
|
"ToastNotificationTestTriggerFailed": "Spustenie testovacej notifikácie zlyhalo",
|
||||||
"ToastNotificationTestTriggerSuccess": "Testovacia notifikácia bola spustená",
|
"ToastNotificationTestTriggerSuccess": "Testovacia notifikácia bola spustená",
|
||||||
@@ -1134,8 +1138,8 @@
|
|||||||
"ToastSessionCloseFailed": "Ukončenie relácie zlyhalo",
|
"ToastSessionCloseFailed": "Ukončenie relácie zlyhalo",
|
||||||
"ToastSessionDeleteFailed": "Odstránenie relácie zlyhalo",
|
"ToastSessionDeleteFailed": "Odstránenie relácie zlyhalo",
|
||||||
"ToastSessionDeleteSuccess": "Relácia odstránená",
|
"ToastSessionDeleteSuccess": "Relácia odstránená",
|
||||||
"ToastSleepTimerDone": "Časovač spánku bol spustený... zZzzZz",
|
"ToastSleepTimerDone": "Časovač spánku skončil... zZzzZz",
|
||||||
"ToastSlugMustChange": "Slug obsahuje naplatné znaky",
|
"ToastSlugMustChange": "Slug obsahuje neplatné znaky",
|
||||||
"ToastSlugRequired": "Slug je povinný",
|
"ToastSlugRequired": "Slug je povinný",
|
||||||
"ToastSocketConnected": "Socket je pripojený",
|
"ToastSocketConnected": "Socket je pripojený",
|
||||||
"ToastSocketDisconnected": "Socket je odpojený",
|
"ToastSocketDisconnected": "Socket je odpojený",
|
||||||
|
|||||||
@@ -951,7 +951,7 @@
|
|||||||
"NoteChapterEditorTimes": "OBS: Starttiden för första kapitlet måste vara 0:00 och starttiden för det sista kapitlet får inte överstiga ljudbokens totala längd.",
|
"NoteChapterEditorTimes": "OBS: Starttiden för första kapitlet måste vara 0:00 och starttiden för det sista kapitlet får inte överstiga ljudbokens totala längd.",
|
||||||
"NoteFolderPicker": "OBS: Mappar som redan är kopplade kommer inte att visas",
|
"NoteFolderPicker": "OBS: Mappar som redan är kopplade kommer inte att visas",
|
||||||
"NoteRSSFeedPodcastAppsHttps": "VARNING: De flesta poddappar kräver att RSS-flödets URL använder HTTPS",
|
"NoteRSSFeedPodcastAppsHttps": "VARNING: De flesta poddappar kräver att RSS-flödets URL använder HTTPS",
|
||||||
"NoteRSSFeedPodcastAppsPubDate": "VARNING: Ett eller flera avsnitt saknar publiceringsdatum. Vissa poddappar kräver ett sådant datum.",
|
"NoteRSSFeedPodcastAppsPubDate": "Varning: Ett eller flera avsnitt saknar publiceringsdatum. Vissa poddappar kräver ett sådant datum.",
|
||||||
"NoteUploaderFoldersWithMediaFiles": "Mappar som innehåller mediefiler hanteras som separata objekt i biblioteket.",
|
"NoteUploaderFoldersWithMediaFiles": "Mappar som innehåller mediefiler hanteras som separata objekt i biblioteket.",
|
||||||
"NoteUploaderOnlyAudioFiles": "Om du bara laddar upp ljudfiler kommer varje ljudfil att hanteras som en separat ljudbok.",
|
"NoteUploaderOnlyAudioFiles": "Om du bara laddar upp ljudfiler kommer varje ljudfil att hanteras som en separat ljudbok.",
|
||||||
"NoteUploaderUnsupportedFiles": "Filtyper som inte stöds ignoreras. När du väljer eller släpper en mapp ignoreras filer som inte tillhör ett biblioteksobjekt.",
|
"NoteUploaderUnsupportedFiles": "Filtyper som inte stöds ignoreras. När du väljer eller släpper en mapp ignoreras filer som inte tillhör ett biblioteksobjekt.",
|
||||||
|
|||||||
@@ -399,7 +399,7 @@
|
|||||||
"LabelPodcasts": "Podcasts",
|
"LabelPodcasts": "Podcasts",
|
||||||
"LabelPort": "Cổng",
|
"LabelPort": "Cổng",
|
||||||
"LabelPrefixesToIgnore": "Tiền tố để bỏ qua (không phân biệt chữ hoa/chữ thường)",
|
"LabelPrefixesToIgnore": "Tiền tố để bỏ qua (không phân biệt chữ hoa/chữ thường)",
|
||||||
"LabelPreventIndexing": "Ngăn Chặn Feed của bạn bị truy xuất bởi thư mục iTunes và Google podcast",
|
"LabelPreventIndexing": "Ngăn Chặn Feed của bạn bị truy xuất bởi thư mục iTunes và Google podcast",
|
||||||
"LabelPrimaryEbook": "Ebook chính",
|
"LabelPrimaryEbook": "Ebook chính",
|
||||||
"LabelProgress": "Tiến độ",
|
"LabelProgress": "Tiến độ",
|
||||||
"LabelProvider": "Nhà cung cấp",
|
"LabelProvider": "Nhà cung cấp",
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "audiobookshelf",
|
"name": "audiobookshelf",
|
||||||
"version": "2.37.1",
|
"version": "3.0.0-beta",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "audiobookshelf",
|
"name": "audiobookshelf",
|
||||||
"version": "2.37.1",
|
"version": "3.0.0-beta",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "audiobookshelf",
|
"name": "audiobookshelf",
|
||||||
"version": "2.37.1",
|
"version": "3.0.0-beta",
|
||||||
"buildNumber": 1,
|
"buildNumber": 1,
|
||||||
"description": "Self-hosted audiobook and podcast server",
|
"description": "Self-hosted audiobook and podcast server",
|
||||||
"main": "dist-server/index.js",
|
"main": "dist-server/index.js",
|
||||||
|
|||||||
+7
-21
@@ -22,6 +22,7 @@ class Auth {
|
|||||||
|
|
||||||
/** @type {import('express-rate-limit').RateLimitRequestHandler} */
|
/** @type {import('express-rate-limit').RateLimitRequestHandler} */
|
||||||
this.authRateLimiter = RateLimiterFactory.getAuthRateLimiter()
|
this.authRateLimiter = RateLimiterFactory.getAuthRateLimiter()
|
||||||
|
this.passwordChangeRateLimiter = RateLimiterFactory.getPasswordChangeRateLimiter()
|
||||||
|
|
||||||
this.tokenManager = new TokenManager()
|
this.tokenManager = new TokenManager()
|
||||||
this.localAuthStrategy = new LocalAuthStrategy()
|
this.localAuthStrategy = new LocalAuthStrategy()
|
||||||
@@ -62,18 +63,6 @@ class Auth {
|
|||||||
return passport.authenticate('jwt', { session: false })(req, res, next)
|
return passport.authenticate('jwt', { session: false })(req, res, next)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Function to generate a jwt token for a given user
|
|
||||||
* TODO: Old method with no expiration
|
|
||||||
* @deprecated
|
|
||||||
*
|
|
||||||
* @param {{ id:string, username:string }} user
|
|
||||||
* @returns {string}
|
|
||||||
*/
|
|
||||||
generateAccessToken(user) {
|
|
||||||
return this.tokenManager.generateAccessToken(user)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invalidate all JWT sessions for a given user
|
* Invalidate all JWT sessions for a given user
|
||||||
* If user is current user and refresh token is valid, rotate tokens for the current session
|
* If user is current user and refresh token is valid, rotate tokens for the current session
|
||||||
@@ -269,10 +258,8 @@ class Auth {
|
|||||||
} else {
|
} else {
|
||||||
// UI request -> check if we have a callback url
|
// UI request -> check if we have a callback url
|
||||||
if (req.cookies.auth_cb) {
|
if (req.cookies.auth_cb) {
|
||||||
let stateQuery = req.cookies.auth_state ? `&state=${req.cookies.auth_state}` : ''
|
const stateQuery = req.cookies.auth_state ? `&state=${req.cookies.auth_state}` : ''
|
||||||
// UI request -> redirect to auth_cb url and send the jwt token as parameter
|
res.redirect(302, `${req.cookies.auth_cb}?accessToken=${userResponse.user.accessToken}${stateQuery}`)
|
||||||
// TODO: Temporarily continue sending the old token as setToken
|
|
||||||
res.redirect(302, `${req.cookies.auth_cb}?setToken=${userResponse.user.token}&accessToken=${userResponse.user.accessToken}${stateQuery}`)
|
|
||||||
} else {
|
} else {
|
||||||
Logger.error('[Auth] No callback or already expired')
|
Logger.error('[Auth] No callback or already expired')
|
||||||
res.redirect(`/login?error=${encodeURIComponent('No callback or already expired')}&autoLaunch=0`)
|
res.redirect(`/login?error=${encodeURIComponent('No callback or already expired')}&autoLaunch=0`)
|
||||||
@@ -328,7 +315,7 @@ class Auth {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Refresh token route
|
// Refresh token route
|
||||||
router.post('/auth/refresh', this.authRateLimiter, async (req, res) => {
|
router.post('/auth/refresh', async (req, res) => {
|
||||||
let refreshToken = req.cookies.refresh_token
|
let refreshToken = req.cookies.refresh_token
|
||||||
|
|
||||||
// If x-refresh-token header is present, use it instead of the cookie
|
// If x-refresh-token header is present, use it instead of the cookie
|
||||||
@@ -359,7 +346,7 @@ class Auth {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// openid strategy login route (this redirects to the configured openid login provider)
|
// openid strategy login route (this redirects to the configured openid login provider)
|
||||||
router.get('/auth/openid', this.authRateLimiter, (req, res) => {
|
router.get('/auth/openid', (req, res) => {
|
||||||
const authorizationUrlResponse = this.oidcAuthStrategy.getAuthorizationUrl(req)
|
const authorizationUrlResponse = this.oidcAuthStrategy.getAuthorizationUrl(req)
|
||||||
|
|
||||||
if (authorizationUrlResponse.error) {
|
if (authorizationUrlResponse.error) {
|
||||||
@@ -377,12 +364,11 @@ class Auth {
|
|||||||
|
|
||||||
// This will be the oauth2 callback route for mobile clients
|
// This will be the oauth2 callback route for mobile clients
|
||||||
// It will redirect to an app-link like audiobookshelf://oauth
|
// It will redirect to an app-link like audiobookshelf://oauth
|
||||||
router.get('/auth/openid/mobile-redirect', this.authRateLimiter, (req, res) => this.oidcAuthStrategy.handleMobileRedirect(req, res))
|
router.get('/auth/openid/mobile-redirect', (req, res) => this.oidcAuthStrategy.handleMobileRedirect(req, res))
|
||||||
|
|
||||||
// openid strategy callback route (this receives the token from the configured openid login provider)
|
// openid strategy callback route (this receives the token from the configured openid login provider)
|
||||||
router.get(
|
router.get(
|
||||||
'/auth/openid/callback',
|
'/auth/openid/callback',
|
||||||
this.authRateLimiter,
|
|
||||||
(req, res, next) => {
|
(req, res, next) => {
|
||||||
const sessionKey = this.oidcAuthStrategy.getStrategy()._key
|
const sessionKey = this.oidcAuthStrategy.getStrategy()._key
|
||||||
|
|
||||||
@@ -461,7 +447,7 @@ class Auth {
|
|||||||
*
|
*
|
||||||
* @example /auth/openid/config?issuer=http://192.168.1.66:9000/application/o/audiobookshelf/
|
* @example /auth/openid/config?issuer=http://192.168.1.66:9000/application/o/audiobookshelf/
|
||||||
*/
|
*/
|
||||||
router.get('/auth/openid/config', this.authRateLimiter, this.isAuthenticated, async (req, res) => {
|
router.get('/auth/openid/config', this.isAuthenticated, async (req, res) => {
|
||||||
if (!req.user.isAdminOrUp) {
|
if (!req.user.isAdminOrUp) {
|
||||||
Logger.error(`[Auth] Non-admin user "${req.user.username}" attempted to get issuer config`)
|
Logger.error(`[Auth] Non-admin user "${req.user.username}" attempted to get issuer config`)
|
||||||
return res.sendStatus(403)
|
return res.sendStatus(403)
|
||||||
|
|||||||
+16
-5
@@ -415,14 +415,25 @@ class Database {
|
|||||||
* Create root user
|
* Create root user
|
||||||
* @param {string} username
|
* @param {string} username
|
||||||
* @param {string} pash
|
* @param {string} pash
|
||||||
* @param {Auth} auth
|
|
||||||
* @returns {Promise<boolean>} true if created
|
* @returns {Promise<boolean>} true if created
|
||||||
*/
|
*/
|
||||||
async createRootUser(username, pash, auth) {
|
async createRootUser(username, pash) {
|
||||||
if (!this.sequelize) return false
|
if (!this.sequelize) return false
|
||||||
await this.userModel.createRootUser(username, pash, auth)
|
const transaction = await this.sequelize.transaction()
|
||||||
this.hasRootUser = true
|
try {
|
||||||
return true
|
const rootCount = await this.userModel.count({ where: { type: 'root' }, transaction })
|
||||||
|
if (rootCount > 0) {
|
||||||
|
await transaction.rollback()
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
await this.userModel.createRootUser(username, pash, transaction)
|
||||||
|
await transaction.commit()
|
||||||
|
this.hasRootUser = true
|
||||||
|
return true
|
||||||
|
} catch (error) {
|
||||||
|
await transaction.rollback()
|
||||||
|
throw error
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateServerSettings() {
|
updateServerSettings() {
|
||||||
|
|||||||
+24
-13
@@ -4,7 +4,6 @@ const express = require('express')
|
|||||||
const http = require('http')
|
const http = require('http')
|
||||||
const util = require('util')
|
const util = require('util')
|
||||||
const fs = require('./libs/fsExtra')
|
const fs = require('./libs/fsExtra')
|
||||||
const fileUpload = require('./libs/expressFileupload')
|
|
||||||
const cookieParser = require('cookie-parser')
|
const cookieParser = require('cookie-parser')
|
||||||
const axios = require('axios')
|
const axios = require('axios')
|
||||||
|
|
||||||
@@ -13,6 +12,7 @@ const { version } = require('../package.json')
|
|||||||
// Utils
|
// Utils
|
||||||
const is = require('./libs/requestIp/isJs')
|
const is = require('./libs/requestIp/isJs')
|
||||||
const fileUtils = require('./utils/fileUtils')
|
const fileUtils = require('./utils/fileUtils')
|
||||||
|
const { sweepUploadTempFiles } = require('./utils/fileUploadMiddleware')
|
||||||
const { toNumber } = require('./utils/index')
|
const { toNumber } = require('./utils/index')
|
||||||
const { getRequestOrigin } = require('./utils/requestUtils')
|
const { getRequestOrigin } = require('./utils/requestUtils')
|
||||||
const Logger = require('./Logger')
|
const Logger = require('./Logger')
|
||||||
@@ -46,6 +46,22 @@ const passport = require('passport')
|
|||||||
const expressSession = require('express-session')
|
const expressSession = require('express-session')
|
||||||
const MemoryStore = require('./libs/memorystore')
|
const MemoryStore = require('./libs/memorystore')
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Normalize to '' (root) or '/segment' with no trailing slash.
|
||||||
|
* Matches audiobookshelf-client-react `src/lib/basePath.ts`.
|
||||||
|
* @param {string|null|undefined} basePath
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function normalizeBasePath(basePath) {
|
||||||
|
if (!basePath) return ''
|
||||||
|
|
||||||
|
const trimmed = basePath.trim()
|
||||||
|
if (!trimmed || trimmed === '/') return ''
|
||||||
|
|
||||||
|
const withLeadingSlash = trimmed.startsWith('/') ? trimmed : `/${trimmed}`
|
||||||
|
return withLeadingSlash.endsWith('/') ? withLeadingSlash.slice(0, -1) : withLeadingSlash
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* `next()` for a custom server is a NextCustomServer wrapper. After prepare(),
|
* `next()` for a custom server is a NextCustomServer wrapper. After prepare(),
|
||||||
* `.server` is another NextServer wrapper; the Node server with `nextConfig` is
|
* `.server` is another NextServer wrapper; the Node server with `nextConfig` is
|
||||||
@@ -66,7 +82,7 @@ class Server {
|
|||||||
global.isWin = process.platform === 'win32'
|
global.isWin = process.platform === 'win32'
|
||||||
global.ConfigPath = fileUtils.filePathToPOSIX(Path.normalize(CONFIG_PATH))
|
global.ConfigPath = fileUtils.filePathToPOSIX(Path.normalize(CONFIG_PATH))
|
||||||
global.MetadataPath = fileUtils.filePathToPOSIX(Path.normalize(METADATA_PATH))
|
global.MetadataPath = fileUtils.filePathToPOSIX(Path.normalize(METADATA_PATH))
|
||||||
global.RouterBasePath = ROUTER_BASE_PATH
|
global.RouterBasePath = normalizeBasePath(ROUTER_BASE_PATH)
|
||||||
global.XAccel = process.env.USE_X_ACCEL
|
global.XAccel = process.env.USE_X_ACCEL
|
||||||
global.AllowCors = process.env.ALLOW_CORS === '1'
|
global.AllowCors = process.env.ALLOW_CORS === '1'
|
||||||
|
|
||||||
@@ -183,6 +199,7 @@ class Server {
|
|||||||
|
|
||||||
await this.cleanUserData() // Remove invalid user item progress
|
await this.cleanUserData() // Remove invalid user item progress
|
||||||
await CacheManager.ensureCachePaths()
|
await CacheManager.ensureCachePaths()
|
||||||
|
await sweepUploadTempFiles()
|
||||||
|
|
||||||
await ShareManager.init()
|
await ShareManager.init()
|
||||||
await this.backupManager.init()
|
await this.backupManager.init()
|
||||||
@@ -320,16 +337,6 @@ class Server {
|
|||||||
|
|
||||||
this.server = http.createServer(app)
|
this.server = http.createServer(app)
|
||||||
|
|
||||||
// Skip file upload parsing for internal-api routes (Next.js proxies read multipart bodies).
|
|
||||||
router.use(
|
|
||||||
/^(?!\/internal-api).*/,
|
|
||||||
fileUpload({
|
|
||||||
defCharset: 'utf8',
|
|
||||||
defParamCharset: 'utf8',
|
|
||||||
useTempFiles: true,
|
|
||||||
tempFileDir: Path.join(global.MetadataPath, 'tmp')
|
|
||||||
})
|
|
||||||
)
|
|
||||||
router.use(express.urlencoded({ extended: true, limit: '5mb' }))
|
router.use(express.urlencoded({ extended: true, limit: '5mb' }))
|
||||||
|
|
||||||
// Skip JSON parsing for internal-api routes
|
// Skip JSON parsing for internal-api routes
|
||||||
@@ -472,7 +479,11 @@ class Server {
|
|||||||
const rootUsername = newRoot.username || 'root'
|
const rootUsername = newRoot.username || 'root'
|
||||||
const rootPash = newRoot.password ? await this.auth.localAuthStrategy.hashPassword(newRoot.password) : ''
|
const rootPash = newRoot.password ? await this.auth.localAuthStrategy.hashPassword(newRoot.password) : ''
|
||||||
if (!rootPash) Logger.warn(`[Server] Creating root user with no password`)
|
if (!rootPash) Logger.warn(`[Server] Creating root user with no password`)
|
||||||
await Database.createRootUser(rootUsername, rootPash, this.auth)
|
const created = await Database.createRootUser(rootUsername, rootPash)
|
||||||
|
if (!created) {
|
||||||
|
Logger.error(`[Server] attempt to init server when server already has a root user`)
|
||||||
|
return res.sendStatus(500)
|
||||||
|
}
|
||||||
|
|
||||||
res.sendStatus(200)
|
res.sendStatus(200)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,12 @@ class LocalAuthStrategy {
|
|||||||
* @param {Function} done - Passport callback
|
* @param {Function} done - Passport callback
|
||||||
*/
|
*/
|
||||||
async verifyCredentials(req, username, password, done) {
|
async verifyCredentials(req, username, password, done) {
|
||||||
|
if (typeof username !== 'string' || typeof password !== 'string') {
|
||||||
|
this.logFailedLoginAttempt(req, typeof username === 'string' ? username : '[non-string]', 'Invalid username or password')
|
||||||
|
done(null, null)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Load the user given it's username
|
// Load the user given it's username
|
||||||
const user = await Database.userModel.getUserByUsername(username.toLowerCase())
|
const user = await Database.userModel.getUserByUsername(username.toLowerCase())
|
||||||
|
|
||||||
|
|||||||
@@ -393,7 +393,15 @@ class OidcAuthStrategy {
|
|||||||
* @returns {string|null}
|
* @returns {string|null}
|
||||||
*/
|
*/
|
||||||
getEndSessionUrl(req, idToken, authMethod) {
|
getEndSessionUrl(req, idToken, authMethod) {
|
||||||
const client = this.getClient()
|
// Logout trusts the auth_method cookie. getClient() throws when OpenID is not
|
||||||
|
// configured, and that throw is outside the request promise, so it exits the process.
|
||||||
|
let client
|
||||||
|
try {
|
||||||
|
client = this.getClient()
|
||||||
|
} catch (error) {
|
||||||
|
Logger.error(`[OidcAuth] Cannot build end session URL - ${error.message}`)
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
if (client.issuer.end_session_endpoint && client.issuer.end_session_endpoint.length > 0) {
|
if (client.issuer.end_session_endpoint && client.issuer.end_session_endpoint.length > 0) {
|
||||||
let postLogoutRedirectUri = null
|
let postLogoutRedirectUri = null
|
||||||
|
|||||||
@@ -80,7 +80,9 @@ class TokenManager {
|
|||||||
*/
|
*/
|
||||||
static isBearerAccessTokenPayload(decoded) {
|
static isBearerAccessTokenPayload(decoded) {
|
||||||
if (!decoded?.userId) return false
|
if (!decoded?.userId) return false
|
||||||
if (decoded.type === 'refresh') return false
|
// Legacy API tokens were signed with only userId and username, and never expired.
|
||||||
|
if (decoded.type !== 'access') return false
|
||||||
|
if (!decoded.exp) return false
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,30 +102,6 @@ class TokenManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate a JWT token for a given user
|
|
||||||
* TODO: Old method with no expiration
|
|
||||||
* @deprecated
|
|
||||||
*
|
|
||||||
* @param {{ id:string, username:string }} user
|
|
||||||
* @returns {string}
|
|
||||||
*/
|
|
||||||
static generateAccessToken(user) {
|
|
||||||
return jwt.sign({ userId: user.id, username: user.username }, TokenManager.TokenSecret)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function to generate a jwt token for a given user
|
|
||||||
* TODO: Old method with no expiration
|
|
||||||
* @deprecated
|
|
||||||
*
|
|
||||||
* @param {{ id:string, username:string }} user
|
|
||||||
* @returns {string}
|
|
||||||
*/
|
|
||||||
generateAccessToken(user) {
|
|
||||||
return TokenManager.generateAccessToken(user)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate access token for a given user
|
* Generate access token for a given user
|
||||||
*
|
*
|
||||||
@@ -325,15 +303,6 @@ class TokenManager {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Temporary flag to report old tokens to users
|
|
||||||
// May be a better place for this but here means we dont have to decode the token again
|
|
||||||
if (!jwt_payload.exp && !user.isOldToken) {
|
|
||||||
Logger.debug(`[TokenManager] User ${user.username} is using an access token without an expiration`)
|
|
||||||
user.isOldToken = true
|
|
||||||
} else if (jwt_payload.exp && user.isOldToken !== undefined) {
|
|
||||||
delete user.isOldToken
|
|
||||||
}
|
|
||||||
|
|
||||||
// approve login
|
// approve login
|
||||||
done(null, user)
|
done(null, user)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,11 +11,24 @@ const CoverManager = require('../managers/CoverManager')
|
|||||||
const AuthorFinder = require('../finders/AuthorFinder')
|
const AuthorFinder = require('../finders/AuthorFinder')
|
||||||
|
|
||||||
const { reqSupportsWebp, isValidASIN, clampPositiveInt } = require('../utils/index')
|
const { reqSupportsWebp, isValidASIN, clampPositiveInt } = require('../utils/index')
|
||||||
|
const htmlSanitizer = require('../utils/htmlSanitizer')
|
||||||
|
|
||||||
const naturalSort = createNewSortInstance({
|
const naturalSort = createNewSortInstance({
|
||||||
comparer: new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' }).compare
|
comparer: new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' }).compare
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} description
|
||||||
|
* @returns {string|null}
|
||||||
|
*/
|
||||||
|
function sanitizeAuthorDescription(description) {
|
||||||
|
const sanitizedDescription = htmlSanitizer.sanitize(description)
|
||||||
|
if (sanitizedDescription !== description) {
|
||||||
|
Logger.debug(`[AuthorController] Sanitized description from "${description}" to "${sanitizedDescription}"`)
|
||||||
|
}
|
||||||
|
return sanitizedDescription || null
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef RequestUserObject
|
* @typedef RequestUserObject
|
||||||
* @property {import('../models/User')} user
|
* @property {import('../models/User')} user
|
||||||
@@ -101,6 +114,10 @@ class AuthorController {
|
|||||||
payload[key] = req.body[key]
|
payload[key] = req.body[key]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (payload.description) {
|
||||||
|
payload.description = sanitizeAuthorDescription(payload.description)
|
||||||
|
}
|
||||||
|
|
||||||
if (!Object.keys(payload).length) {
|
if (!Object.keys(payload).length) {
|
||||||
Logger.error(`[AuthorController] Invalid request payload. No valid keys found`, req.body)
|
Logger.error(`[AuthorController] Invalid request payload. No valid keys found`, req.body)
|
||||||
return res.status(400).send('Invalid request payload. No valid keys found')
|
return res.status(400).send('Invalid request payload. No valid keys found')
|
||||||
@@ -364,9 +381,12 @@ class AuthorController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (authorData.description && req.author.description !== authorData.description) {
|
if (authorData.description) {
|
||||||
req.author.description = authorData.description
|
const description = sanitizeAuthorDescription(authorData.description)
|
||||||
hasUpdates = true
|
if (req.author.description !== description) {
|
||||||
|
req.author.description = description
|
||||||
|
hasUpdates = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasUpdates) {
|
if (hasUpdates) {
|
||||||
|
|||||||
@@ -96,12 +96,8 @@ class CollectionController {
|
|||||||
return res.status(500).send('Failed to create collection')
|
return res.status(500).send('Failed to create collection')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load books expanded
|
const jsonExpanded = await newCollection.getOldJsonExpanded(req.user)
|
||||||
newCollection.books = await newCollection.getBooksExpandedWithLibraryItem()
|
if (jsonExpanded) SocketAuthority.clientEmitter(req.user.id, 'collection_added', jsonExpanded)
|
||||||
|
|
||||||
// Note: The old collection model stores expanded libraryItems in the books property
|
|
||||||
const jsonExpanded = newCollection.toOldJSONExpanded()
|
|
||||||
SocketAuthority.emitter('collection_added', jsonExpanded)
|
|
||||||
res.json(jsonExpanded)
|
res.json(jsonExpanded)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,9 +192,9 @@ class CollectionController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const jsonExpanded = await req.collection.getOldJsonExpanded()
|
const jsonExpanded = await req.collection.getOldJsonExpanded(req.user)
|
||||||
if (wasUpdated) {
|
if (wasUpdated && jsonExpanded) {
|
||||||
SocketAuthority.emitter('collection_updated', jsonExpanded)
|
SocketAuthority.clientEmitter(req.user.id, 'collection_updated', jsonExpanded)
|
||||||
}
|
}
|
||||||
res.json(jsonExpanded)
|
res.json(jsonExpanded)
|
||||||
}
|
}
|
||||||
@@ -212,14 +208,17 @@ class CollectionController {
|
|||||||
* @param {Response} res
|
* @param {Response} res
|
||||||
*/
|
*/
|
||||||
async delete(req, res) {
|
async delete(req, res) {
|
||||||
const jsonExpanded = await req.collection.getOldJsonExpanded()
|
const jsonExpanded = await req.collection.getOldJsonExpanded(req.user)
|
||||||
|
|
||||||
// Close rss feed - remove from db and emit socket event
|
// Close rss feed - remove from db and emit socket event
|
||||||
await RssFeedManager.closeFeedForEntityId(req.collection.id)
|
await RssFeedManager.closeFeedForEntityId(req.collection.id)
|
||||||
|
|
||||||
|
if (jsonExpanded) {
|
||||||
|
SocketAuthority.clientEmitter(req.user.id, 'collection_removed', jsonExpanded)
|
||||||
|
}
|
||||||
|
|
||||||
await req.collection.destroy()
|
await req.collection.destroy()
|
||||||
|
|
||||||
SocketAuthority.emitter('collection_removed', jsonExpanded)
|
|
||||||
res.sendStatus(200)
|
res.sendStatus(200)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,14 +247,19 @@ class CollectionController {
|
|||||||
return res.status(400).send('Book already in collection')
|
return res.status(400).send('Book already in collection')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create collectionBook record
|
// Create collectionBook record. A second add can pass the check above and hit the unique pair.
|
||||||
await Database.collectionBookModel.create({
|
try {
|
||||||
collectionId: req.collection.id,
|
await Database.collectionBookModel.create({
|
||||||
bookId: libraryItem.mediaId,
|
collectionId: req.collection.id,
|
||||||
order: collectionBooks.length + 1
|
bookId: libraryItem.mediaId,
|
||||||
})
|
order: collectionBooks.length + 1
|
||||||
const jsonExpanded = await req.collection.getOldJsonExpanded()
|
})
|
||||||
SocketAuthority.emitter('collection_updated', jsonExpanded)
|
} catch (error) {
|
||||||
|
if (error.name !== 'SequelizeUniqueConstraintError') throw error
|
||||||
|
return res.status(400).send('Book already in collection')
|
||||||
|
}
|
||||||
|
const jsonExpanded = await req.collection.getOldJsonExpanded(req.user)
|
||||||
|
if (jsonExpanded) SocketAuthority.clientEmitter(req.user.id, 'collection_updated', jsonExpanded)
|
||||||
res.json(jsonExpanded)
|
res.json(jsonExpanded)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -299,10 +303,10 @@ class CollectionController {
|
|||||||
order++
|
order++
|
||||||
}
|
}
|
||||||
|
|
||||||
jsonExpanded = await req.collection.getOldJsonExpanded()
|
jsonExpanded = await req.collection.getOldJsonExpanded(req.user)
|
||||||
SocketAuthority.emitter('collection_updated', jsonExpanded)
|
if (jsonExpanded) SocketAuthority.clientEmitter(req.user.id, 'collection_updated', jsonExpanded)
|
||||||
} else {
|
} else {
|
||||||
jsonExpanded = await req.collection.getOldJsonExpanded()
|
jsonExpanded = await req.collection.getOldJsonExpanded(req.user)
|
||||||
}
|
}
|
||||||
res.json(jsonExpanded)
|
res.json(jsonExpanded)
|
||||||
}
|
}
|
||||||
@@ -359,12 +363,12 @@ class CollectionController {
|
|||||||
|
|
||||||
let jsonExpanded = null
|
let jsonExpanded = null
|
||||||
if (hasUpdated) {
|
if (hasUpdated) {
|
||||||
await Database.collectionBookModel.bulkCreate(collectionBooksToAdd)
|
await Database.collectionBookModel.bulkCreate(collectionBooksToAdd, { ignoreDuplicates: true })
|
||||||
|
|
||||||
jsonExpanded = await req.collection.getOldJsonExpanded()
|
jsonExpanded = await req.collection.getOldJsonExpanded(req.user)
|
||||||
SocketAuthority.emitter('collection_updated', jsonExpanded)
|
if (jsonExpanded) SocketAuthority.clientEmitter(req.user.id, 'collection_updated', jsonExpanded)
|
||||||
} else {
|
} else {
|
||||||
jsonExpanded = await req.collection.getOldJsonExpanded()
|
jsonExpanded = await req.collection.getOldJsonExpanded(req.user)
|
||||||
}
|
}
|
||||||
res.json(jsonExpanded)
|
res.json(jsonExpanded)
|
||||||
}
|
}
|
||||||
@@ -417,9 +421,9 @@ class CollectionController {
|
|||||||
order++
|
order++
|
||||||
}
|
}
|
||||||
|
|
||||||
let jsonExpanded = await req.collection.getOldJsonExpanded()
|
let jsonExpanded = await req.collection.getOldJsonExpanded(req.user)
|
||||||
if (hasUpdated) {
|
if (hasUpdated && jsonExpanded) {
|
||||||
SocketAuthority.emitter('collection_updated', jsonExpanded)
|
SocketAuthority.clientEmitter(req.user.id, 'collection_updated', jsonExpanded)
|
||||||
}
|
}
|
||||||
res.json(jsonExpanded)
|
res.json(jsonExpanded)
|
||||||
}
|
}
|
||||||
@@ -447,7 +451,7 @@ class CollectionController {
|
|||||||
if (req.method == 'DELETE' && !req.params.bookId && !req.user.canDelete) {
|
if (req.method == 'DELETE' && !req.params.bookId && !req.user.canDelete) {
|
||||||
Logger.warn(`[CollectionController] User "${req.user.username}" attempted to delete without permission`)
|
Logger.warn(`[CollectionController] User "${req.user.username}" attempted to delete without permission`)
|
||||||
return res.sendStatus(403)
|
return res.sendStatus(403)
|
||||||
} else if ((req.method == 'PATCH' || req.method == 'POST') && !req.user.canUpdate) {
|
} else if ((req.method == 'PATCH' || req.method == 'POST' || (req.method == 'DELETE' && req.params.bookId)) && !req.user.canUpdate) {
|
||||||
Logger.warn(`[CollectionController] User "${req.user.username}" attempted to update without permission`)
|
Logger.warn(`[CollectionController] User "${req.user.username}" attempted to update without permission`)
|
||||||
return res.sendStatus(403)
|
return res.sendStatus(403)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,8 +188,10 @@ class LibraryController {
|
|||||||
async findAll(req, res) {
|
async findAll(req, res) {
|
||||||
let libraries = await Database.libraryModel.getAllWithFolders()
|
let libraries = await Database.libraryModel.getAllWithFolders()
|
||||||
|
|
||||||
const librariesAccessible = req.user.permissions?.librariesAccessible || []
|
// accessAllLibraries is stored with an empty librariesAccessible list. An empty list
|
||||||
if (librariesAccessible.length) {
|
// with access to all libraries turned off means the user can see no libraries.
|
||||||
|
if (!req.user.permissions?.accessAllLibraries) {
|
||||||
|
const librariesAccessible = req.user.permissions?.librariesAccessible || []
|
||||||
libraries = libraries.filter((lib) => librariesAccessible.includes(lib.id))
|
libraries = libraries.filter((lib) => librariesAccessible.includes(lib.id))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -495,7 +495,7 @@ class MeController {
|
|||||||
for (const mediaProgress of mediaProgressesInProgress) {
|
for (const mediaProgress of mediaProgressesInProgress) {
|
||||||
const oldMediaProgress = mediaProgress.getOldMediaProgress()
|
const oldMediaProgress = mediaProgress.getOldMediaProgress()
|
||||||
const libraryItem = libraryItems.find((li) => li.id === oldMediaProgress.libraryItemId)
|
const libraryItem = libraryItems.find((li) => li.id === oldMediaProgress.libraryItemId)
|
||||||
if (libraryItem) {
|
if (libraryItem && req.user.checkCanAccessLibraryItem(libraryItem)) {
|
||||||
if (oldMediaProgress.episodeId && libraryItem.isPodcast) {
|
if (oldMediaProgress.episodeId && libraryItem.isPodcast) {
|
||||||
const episode = libraryItem.media.podcastEpisodes.find((ep) => ep.id === oldMediaProgress.episodeId)
|
const episode = libraryItem.media.podcastEpisodes.find((ep) => ep.id === oldMediaProgress.episodeId)
|
||||||
if (episode) {
|
if (episode) {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class MiscController {
|
|||||||
return res.sendStatus(400)
|
return res.sendStatus(400)
|
||||||
}
|
}
|
||||||
|
|
||||||
const files = Object.values(req.files)
|
const files = Object.values(req.files).flat()
|
||||||
let { title, author, series, folder: folderId, library: libraryId } = req.body
|
let { title, author, series, folder: folderId, library: libraryId } = req.body
|
||||||
// Validate request body
|
// Validate request body
|
||||||
if (!libraryId || !folderId || typeof libraryId !== 'string' || typeof folderId !== 'string' || !title || typeof title !== 'string') {
|
if (!libraryId || !folderId || typeof libraryId !== 'string' || typeof folderId !== 'string' || !title || typeof title !== 'string') {
|
||||||
|
|||||||
@@ -361,6 +361,11 @@ class SessionController {
|
|||||||
return res.sendStatus(404)
|
return res.sendStatus(404)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (playbackSession.userId !== req.user.id && !req.user.isAdminOrUp) {
|
||||||
|
Logger.error(`[SessionController] Non-admin user "${req.user.username}" attempted to access session belonging to another user "${req.params.id}"`)
|
||||||
|
return res.sendStatus(403)
|
||||||
|
}
|
||||||
|
|
||||||
if (req.method == 'DELETE' && !req.user.canDelete) {
|
if (req.method == 'DELETE' && !req.user.canDelete) {
|
||||||
Logger.warn(`[SessionController] User "${req.user.username}" attempted to delete without permission`)
|
Logger.warn(`[SessionController] User "${req.user.username}" attempted to delete without permission`)
|
||||||
return res.sendStatus(403)
|
return res.sendStatus(403)
|
||||||
|
|||||||
@@ -28,13 +28,12 @@ class UserController {
|
|||||||
*/
|
*/
|
||||||
async findAll(req, res) {
|
async findAll(req, res) {
|
||||||
if (!req.user.isAdminOrUp) return res.sendStatus(403)
|
if (!req.user.isAdminOrUp) return res.sendStatus(403)
|
||||||
const hideRootToken = !req.user.isRoot
|
|
||||||
|
|
||||||
const includes = (req.query.include || '').split(',').map((i) => i.trim())
|
const includes = (req.query.include || '').split(',').map((i) => i.trim())
|
||||||
|
|
||||||
// Minimal toJSONForBrowser does not include mediaProgress and bookmarks
|
// Minimal toJSONForBrowser does not include mediaProgress and bookmarks
|
||||||
const allUsers = await Database.userModel.findAll()
|
const allUsers = await Database.userModel.findAll()
|
||||||
const users = allUsers.map((u) => u.toOldJSONForBrowser(hideRootToken, true))
|
const users = allUsers.map((u) => u.toOldJSONForBrowser(true))
|
||||||
|
|
||||||
if (includes.includes('latestSession')) {
|
if (includes.includes('latestSession')) {
|
||||||
for (const user of users) {
|
for (const user of users) {
|
||||||
@@ -97,7 +96,7 @@ class UserController {
|
|||||||
return oldMediaProgress
|
return oldMediaProgress
|
||||||
})
|
})
|
||||||
|
|
||||||
const userJson = req.reqUser.toOldJSONForBrowser(!req.user.isRoot)
|
const userJson = req.reqUser.toOldJSONForBrowser()
|
||||||
|
|
||||||
userJson.mediaProgress = oldMediaProgresses
|
userJson.mediaProgress = oldMediaProgresses
|
||||||
|
|
||||||
@@ -128,7 +127,6 @@ class UserController {
|
|||||||
|
|
||||||
const userId = uuidv4()
|
const userId = uuidv4()
|
||||||
const pash = await this.auth.localAuthStrategy.hashPassword(req.body.password)
|
const pash = await this.auth.localAuthStrategy.hashPassword(req.body.password)
|
||||||
const token = this.auth.generateAccessToken({ id: userId, username: req.body.username })
|
|
||||||
const userType = req.body.type || 'user'
|
const userType = req.body.type || 'user'
|
||||||
|
|
||||||
// librariesAccessible and itemTagsSelected can be on req.body or req.body.permissions
|
// librariesAccessible and itemTagsSelected can be on req.body or req.body.permissions
|
||||||
@@ -173,7 +171,6 @@ class UserController {
|
|||||||
username: req.body.username,
|
username: req.body.username,
|
||||||
email: typeof req.body.email === 'string' ? req.body.email : null,
|
email: typeof req.body.email === 'string' ? req.body.email : null,
|
||||||
pash,
|
pash,
|
||||||
token,
|
|
||||||
isActive: !!req.body.isActive,
|
isActive: !!req.body.isActive,
|
||||||
permissions,
|
permissions,
|
||||||
bookmarks: [],
|
bookmarks: [],
|
||||||
@@ -236,16 +233,13 @@ class UserController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let hasUpdates = false
|
let hasUpdates = false
|
||||||
let shouldUpdateToken = false
|
|
||||||
let shouldInvalidateJwtSessions = false
|
let shouldInvalidateJwtSessions = false
|
||||||
// When changing username create a new API token
|
|
||||||
if (updatePayload.username && updatePayload.username !== user.username) {
|
if (updatePayload.username && updatePayload.username !== user.username) {
|
||||||
const usernameExists = await Database.userModel.checkUserExistsWithUsername(updatePayload.username)
|
const usernameExists = await Database.userModel.checkUserExistsWithUsername(updatePayload.username)
|
||||||
if (usernameExists) {
|
if (usernameExists) {
|
||||||
return res.status(400).send('Username already taken')
|
return res.status(400).send('Username already taken')
|
||||||
}
|
}
|
||||||
user.username = updatePayload.username
|
user.username = updatePayload.username
|
||||||
shouldUpdateToken = true
|
|
||||||
shouldInvalidateJwtSessions = true
|
shouldInvalidateJwtSessions = true
|
||||||
hasUpdates = true
|
hasUpdates = true
|
||||||
}
|
}
|
||||||
@@ -327,11 +321,6 @@ class UserController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (hasUpdates) {
|
if (hasUpdates) {
|
||||||
if (shouldUpdateToken) {
|
|
||||||
user.token = this.auth.generateAccessToken(user)
|
|
||||||
Logger.info(`[UserController] User ${user.username} has generated a new api token`)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle JWT session invalidation for username/password changes
|
// Handle JWT session invalidation for username/password changes
|
||||||
if (shouldInvalidateJwtSessions) {
|
if (shouldInvalidateJwtSessions) {
|
||||||
const newTokens = await this.auth.invalidateJwtSessionsForUser(user, req, res)
|
const newTokens = await this.auth.invalidateJwtSessionsForUser(user, req, res)
|
||||||
|
|||||||
@@ -26,6 +26,18 @@ const waitFlushProperty = Symbol('wait flush property symbol');
|
|||||||
*/
|
*/
|
||||||
module.exports = (options, req, res, next) => {
|
module.exports = (options, req, res, next) => {
|
||||||
req.files = null;
|
req.files = null;
|
||||||
|
const pendingCleanups = [];
|
||||||
|
const runPendingCleanups = () => {
|
||||||
|
while (pendingCleanups.length) {
|
||||||
|
const cleanupFn = pendingCleanups.pop();
|
||||||
|
try {
|
||||||
|
cleanupFn();
|
||||||
|
} catch (err) {
|
||||||
|
debugLog(options, `Temp file cleanup failed: ${err}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
res.once('close', runPendingCleanups);
|
||||||
|
|
||||||
// Build busboy options and init busboy instance.
|
// Build busboy options and init busboy instance.
|
||||||
const busboyOptions = buildOptions(options, { headers: req.headers });
|
const busboyOptions = buildOptions(options, { headers: req.headers });
|
||||||
@@ -62,6 +74,7 @@ module.exports = (options, req, res, next) => {
|
|||||||
} = options.useTempFiles
|
} = options.useTempFiles
|
||||||
? tempFileHandler(options, field, filename) // Upload into temporary file.
|
? tempFileHandler(options, field, filename) // Upload into temporary file.
|
||||||
: memHandler(options, field, filename); // Upload into RAM.
|
: memHandler(options, field, filename); // Upload into RAM.
|
||||||
|
pendingCleanups.push(cleanup);
|
||||||
|
|
||||||
const writePromise = options.useTempFiles
|
const writePromise = options.useTempFiles
|
||||||
? getWritePromise().catch(err => {
|
? getWritePromise().catch(err => {
|
||||||
@@ -161,6 +174,7 @@ module.exports = (options, req, res, next) => {
|
|||||||
|
|
||||||
busboy.on('error', (err) => {
|
busboy.on('error', (err) => {
|
||||||
debugLog(options, `Busboy error`);
|
debugLog(options, `Busboy error`);
|
||||||
|
runPendingCleanups();
|
||||||
next(err);
|
next(err);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,18 @@ module.exports = (options, fieldname, filename) => {
|
|||||||
reject(err);
|
reject(err);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
// cleanup() can run from an error path and again on response close.
|
||||||
|
let cleanedUp = false;
|
||||||
|
|
||||||
|
// Windows cannot unlink while the write stream still holds the file.
|
||||||
|
const closeWriteStream = () => new Promise((resolve) => {
|
||||||
|
if (writeStream.destroyed || writeStream.closed) {
|
||||||
|
return resolve();
|
||||||
|
}
|
||||||
|
writeStream.once('close', resolve);
|
||||||
|
writeStream.once('error', resolve);
|
||||||
|
writeStream.end();
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
dataHandler: (data) => {
|
dataHandler: (data) => {
|
||||||
@@ -51,13 +63,21 @@ module.exports = (options, fieldname, filename) => {
|
|||||||
return Buffer.concat([]);
|
return Buffer.concat([]);
|
||||||
},
|
},
|
||||||
cleanup: () => {
|
cleanup: () => {
|
||||||
|
if (cleanedUp) return Promise.resolve();
|
||||||
|
cleanedUp = true;
|
||||||
completed = true;
|
completed = true;
|
||||||
debugLog(options, `Cleaning up temporary file ${tempFilePath}...`);
|
debugLog(options, `Cleaning up temporary file ${tempFilePath}...`);
|
||||||
writeStream.end();
|
return closeWriteStream().then(() => new Promise((resolve) => {
|
||||||
deleteFile(tempFilePath, err => (err
|
// ENOENT: handler already mv()'d the file; that is success.
|
||||||
? debugLog(options, `Cleaning up temporary file ${tempFilePath} failed: ${err}`)
|
deleteFile(tempFilePath, err => {
|
||||||
: debugLog(options, `Cleaning up temporary file ${tempFilePath} done.`)
|
if (err && err.code !== 'ENOENT') {
|
||||||
));
|
debugLog(options, `Cleaning up temporary file ${tempFilePath} failed: ${err}`);
|
||||||
|
} else {
|
||||||
|
debugLog(options, `Cleaning up temporary file ${tempFilePath} done.`);
|
||||||
|
}
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
}));
|
||||||
},
|
},
|
||||||
getWritePromise: () => writePromise
|
getWritePromise: () => writePromise
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
const fs = require('graceful-fs')
|
const fs = require('graceful-fs')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
|
const { pipeline } = require('stream')
|
||||||
const mkdirs = require('../mkdirs').mkdirs
|
const mkdirs = require('../mkdirs').mkdirs
|
||||||
const pathExists = require('../path-exists').pathExists
|
const pathExists = require('../path-exists').pathExists
|
||||||
const utimesMillis = require('../util/utimes').utimesMillis
|
const utimesMillis = require('../util/utimes').utimesMillis
|
||||||
@@ -98,10 +99,20 @@ function mayCopyFile (srcStat, src, dest, opts, cb) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function copyFile (srcStat, src, dest, opts, cb) {
|
function copyFile (srcStat, src, dest, opts, cb) {
|
||||||
fs.copyFile(src, dest, err => {
|
const finish = err => {
|
||||||
if (err) return cb(err)
|
if (err) return cb(err)
|
||||||
if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb)
|
if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb)
|
||||||
return setDestMode(dest, srcStat.mode, cb)
|
return setDestMode(dest, srcStat.mode, cb)
|
||||||
|
}
|
||||||
|
|
||||||
|
fs.copyFile(src, dest, err => {
|
||||||
|
if (err?.code !== 'EPERM' || !srcStat.isFile()) return finish(err)
|
||||||
|
|
||||||
|
// Stream the fallback so database copies do not require a full-file buffer.
|
||||||
|
pipeline(fs.createReadStream(src, { highWaterMark: 1024 * 1024 }), fs.createWriteStream(dest, { highWaterMark: 1024 * 1024 }), streamError => {
|
||||||
|
if (streamError) return fs.unlink(dest, () => cb(streamError))
|
||||||
|
finish()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ function doRename (src, dest, overwrite, isChangingCase, cb) {
|
|||||||
function rename (src, dest, overwrite, cb) {
|
function rename (src, dest, overwrite, cb) {
|
||||||
fs.rename(src, dest, err => {
|
fs.rename(src, dest, err => {
|
||||||
if (!err) return cb()
|
if (!err) return cb()
|
||||||
if (err.code !== 'EXDEV') return cb(err)
|
if (err.code !== 'EXDEV' && err.code !== 'EPERM') return cb(err)
|
||||||
return moveAcrossDevice(src, dest, overwrite, cb)
|
return moveAcrossDevice(src, dest, overwrite, cb)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class NotificationManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await Database.updateSetting(Database.notificationSettings)
|
await Database.updateSetting(Database.notificationSettings)
|
||||||
SocketAuthority.emitter('notifications_updated', Database.notificationSettings.toJSON())
|
SocketAuthority.adminEmitter('notifications_updated', Database.notificationSettings.toJSON())
|
||||||
|
|
||||||
this.notificationFinished()
|
this.notificationFinished()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ class RssFeedManager {
|
|||||||
const feedExpanded = await Database.feedModel.createFeedForLibraryItem(userId, libraryItem, slug, serverAddress, feedOptions)
|
const feedExpanded = await Database.feedModel.createFeedForLibraryItem(userId, libraryItem, slug, serverAddress, feedOptions)
|
||||||
if (feedExpanded) {
|
if (feedExpanded) {
|
||||||
Logger.info(`[RssFeedManager] Opened RSS feed "${feedExpanded.feedURL}"`)
|
Logger.info(`[RssFeedManager] Opened RSS feed "${feedExpanded.feedURL}"`)
|
||||||
SocketAuthority.emitter('rss_feed_open', feedExpanded.toOldJSONMinified())
|
SocketAuthority.emitter('rss_feed_open', feedExpanded.toOldJSONMinified(), (user) => user.checkCanAccessLibrary?.(libraryItem.libraryId))
|
||||||
}
|
}
|
||||||
return feedExpanded
|
return feedExpanded
|
||||||
}
|
}
|
||||||
@@ -320,7 +320,7 @@ class RssFeedManager {
|
|||||||
const feedExpanded = await Database.feedModel.createFeedForCollection(userId, collectionExpanded, slug, serverAddress, feedOptions)
|
const feedExpanded = await Database.feedModel.createFeedForCollection(userId, collectionExpanded, slug, serverAddress, feedOptions)
|
||||||
if (feedExpanded) {
|
if (feedExpanded) {
|
||||||
Logger.info(`[RssFeedManager] Opened RSS feed "${feedExpanded.feedURL}"`)
|
Logger.info(`[RssFeedManager] Opened RSS feed "${feedExpanded.feedURL}"`)
|
||||||
SocketAuthority.emitter('rss_feed_open', feedExpanded.toOldJSONMinified())
|
SocketAuthority.emitter('rss_feed_open', feedExpanded.toOldJSONMinified(), (user) => user.checkCanAccessLibrary?.(collectionExpanded.libraryId))
|
||||||
}
|
}
|
||||||
return feedExpanded
|
return feedExpanded
|
||||||
}
|
}
|
||||||
@@ -341,7 +341,7 @@ class RssFeedManager {
|
|||||||
const feedExpanded = await Database.feedModel.createFeedForSeries(userId, seriesExpanded, slug, serverAddress, feedOptions)
|
const feedExpanded = await Database.feedModel.createFeedForSeries(userId, seriesExpanded, slug, serverAddress, feedOptions)
|
||||||
if (feedExpanded) {
|
if (feedExpanded) {
|
||||||
Logger.info(`[RssFeedManager] Opened RSS feed "${feedExpanded.feedURL}"`)
|
Logger.info(`[RssFeedManager] Opened RSS feed "${feedExpanded.feedURL}"`)
|
||||||
SocketAuthority.emitter('rss_feed_open', feedExpanded.toOldJSONMinified())
|
SocketAuthority.emitter('rss_feed_open', feedExpanded.toOldJSONMinified(), (user) => user.checkCanAccessLibrary?.(seriesExpanded.libraryId))
|
||||||
}
|
}
|
||||||
return feedExpanded
|
return feedExpanded
|
||||||
}
|
}
|
||||||
@@ -354,8 +354,11 @@ class RssFeedManager {
|
|||||||
*/
|
*/
|
||||||
async handleCloseFeed(feed) {
|
async handleCloseFeed(feed) {
|
||||||
if (!feed) return false
|
if (!feed) return false
|
||||||
|
const entity = await feed.getEntity({ attributes: ['libraryId'] })
|
||||||
const wasRemoved = await Database.feedModel.removeById(feed.id)
|
const wasRemoved = await Database.feedModel.removeById(feed.id)
|
||||||
SocketAuthority.emitter('rss_feed_closed', feed.toOldJSONMinified())
|
if (entity?.libraryId) {
|
||||||
|
SocketAuthority.emitter('rss_feed_closed', feed.toOldJSONMinified(), (user) => user.checkCanAccessLibrary?.(entity.libraryId))
|
||||||
|
}
|
||||||
Logger.info(`[RssFeedManager] Closed RSS feed "${feed.feedURL}"`)
|
Logger.info(`[RssFeedManager] Closed RSS feed "${feed.feedURL}"`)
|
||||||
return wasRemoved
|
return wasRemoved
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
const { DataTypes, Model, where, fn, col } = require('sequelize')
|
const { DataTypes, Model, where, fn, col } = require('sequelize')
|
||||||
const parseNameString = require('../utils/parsers/parseNameString')
|
const parseNameString = require('../utils/parsers/parseNameString')
|
||||||
|
const htmlSanitizer = require('../utils/htmlSanitizer')
|
||||||
|
|
||||||
class Author extends Model {
|
class Author extends Model {
|
||||||
constructor(values, options) {
|
constructor(values, options) {
|
||||||
@@ -175,11 +176,16 @@ class Author extends Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toOldJSON() {
|
toOldJSON() {
|
||||||
|
let description = this.description
|
||||||
|
if (description) {
|
||||||
|
description = htmlSanitizer.sanitize(description) || null
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: this.id,
|
id: this.id,
|
||||||
asin: this.asin,
|
asin: this.asin,
|
||||||
name: this.name,
|
name: this.name,
|
||||||
description: this.description,
|
description,
|
||||||
imagePath: this.imagePath,
|
imagePath: this.imagePath,
|
||||||
libraryId: this.libraryId,
|
libraryId: this.libraryId,
|
||||||
addedAt: this.createdAt.valueOf(),
|
addedAt: this.createdAt.valueOf(),
|
||||||
|
|||||||
+26
-5
@@ -439,6 +439,7 @@ class Book extends Model {
|
|||||||
*/
|
*/
|
||||||
async updateAuthorsFromRequest(authors, libraryId) {
|
async updateAuthorsFromRequest(authors, libraryId) {
|
||||||
if (!Array.isArray(authors)) return null
|
if (!Array.isArray(authors)) return null
|
||||||
|
authors = parseNameString.dedupeNames(authors)
|
||||||
|
|
||||||
if (!this.authors) {
|
if (!this.authors) {
|
||||||
throw new Error(`[Book] Cannot update authors because authors are not loaded for book ${this.id}`)
|
throw new Error(`[Book] Cannot update authors because authors are not loaded for book ${this.id}`)
|
||||||
@@ -466,7 +467,15 @@ class Book extends Model {
|
|||||||
const authorsAdded = []
|
const authorsAdded = []
|
||||||
for (const authorName of newAuthorNames) {
|
for (const authorName of newAuthorNames) {
|
||||||
const { author, created } = await authorModel.findOrCreateByNameAndLibrary(authorName, libraryId)
|
const { author, created } = await authorModel.findOrCreateByNameAndLibrary(authorName, libraryId)
|
||||||
await bookAuthorModel.create({ bookId: this.id, authorId: author.id })
|
// findOrCreate matches case-insensitively, so a second spelling can resolve to an author just linked
|
||||||
|
if (this.authors.some((au) => au.id === author.id)) continue
|
||||||
|
try {
|
||||||
|
await bookAuthorModel.create({ bookId: this.id, authorId: author.id })
|
||||||
|
} catch (error) {
|
||||||
|
if (error.name !== 'SequelizeUniqueConstraintError') throw error
|
||||||
|
this.authors.push(author)
|
||||||
|
continue
|
||||||
|
}
|
||||||
if (created) {
|
if (created) {
|
||||||
SocketAuthority.emitter('author_added', author.toOldJSON())
|
SocketAuthority.emitter('author_added', author.toOldJSON())
|
||||||
} else {
|
} else {
|
||||||
@@ -522,11 +531,23 @@ class Book extends Model {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const series = await seriesModel.findOrCreateByNameAndLibrary(seriesObj.name, libraryId)
|
const series = await seriesModel.findOrCreateByNameAndLibrary(seriesObj.name, libraryId)
|
||||||
series.bookSeries = await bookSeriesModel.create({ bookId: this.id, seriesId: series.id, sequence: seriesObjSequence })
|
try {
|
||||||
|
series.bookSeries = await bookSeriesModel.create({ bookId: this.id, seriesId: series.id, sequence: seriesObjSequence })
|
||||||
|
seriesAdded.push(series)
|
||||||
|
hasUpdates = true
|
||||||
|
Logger.debug(`[Book] "${this.title}" Added series "${series.name}"`)
|
||||||
|
} catch (error) {
|
||||||
|
if (error.name !== 'SequelizeUniqueConstraintError') throw error
|
||||||
|
series.bookSeries = await bookSeriesModel.findOne({ where: { bookId: this.id, seriesId: series.id } })
|
||||||
|
if (!series.bookSeries) throw error
|
||||||
|
if (series.bookSeries.sequence !== seriesObjSequence) {
|
||||||
|
series.bookSeries.sequence = seriesObjSequence
|
||||||
|
await series.bookSeries.save()
|
||||||
|
hasUpdates = true
|
||||||
|
Logger.debug(`[Book] "${this.title}" Updated series "${series.name}" sequence ${seriesObjSequence}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
this.series.push(series)
|
this.series.push(series)
|
||||||
seriesAdded.push(series)
|
|
||||||
hasUpdates = true
|
|
||||||
Logger.debug(`[Book] "${this.title}" Added series "${series.name}"`)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+15
-3
@@ -87,6 +87,18 @@ class Feed extends Model {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} slug
|
||||||
|
* @param {string|null|undefined} coverPath
|
||||||
|
* @param {Date|null|undefined} entityUpdatedAt
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
static getFeedImageURL(slug, coverPath, entityUpdatedAt) {
|
||||||
|
if (!coverPath) return '/Logo.png'
|
||||||
|
const cacheBuster = entityUpdatedAt != null ? `?ts=${entityUpdatedAt.valueOf()}` : ''
|
||||||
|
return `/feed/${slug}/cover${Path.extname(coverPath)}${cacheBuster}`
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {string} userId
|
* @param {string} userId
|
||||||
@@ -119,7 +131,7 @@ class Feed extends Model {
|
|||||||
entityUpdatedAt,
|
entityUpdatedAt,
|
||||||
serverAddress,
|
serverAddress,
|
||||||
feedURL: `/feed/${slug}`,
|
feedURL: `/feed/${slug}`,
|
||||||
imageURL: media.coverPath ? `/feed/${slug}/cover${Path.extname(media.coverPath)}` : `/Logo.png`,
|
imageURL: Feed.getFeedImageURL(slug, media.coverPath, entityUpdatedAt),
|
||||||
siteURL: `/item/${libraryItem.id}`,
|
siteURL: `/item/${libraryItem.id}`,
|
||||||
title: media.title,
|
title: media.title,
|
||||||
description: media.description,
|
description: media.description,
|
||||||
@@ -212,7 +224,7 @@ class Feed extends Model {
|
|||||||
entityUpdatedAt,
|
entityUpdatedAt,
|
||||||
serverAddress,
|
serverAddress,
|
||||||
feedURL: `/feed/${slug}`,
|
feedURL: `/feed/${slug}`,
|
||||||
imageURL: firstBookWithCover?.coverPath ? `/feed/${slug}/cover${Path.extname(firstBookWithCover.coverPath)}` : `/Logo.png`,
|
imageURL: Feed.getFeedImageURL(slug, firstBookWithCover?.coverPath, entityUpdatedAt),
|
||||||
siteURL: `/collection/${collectionExpanded.id}`,
|
siteURL: `/collection/${collectionExpanded.id}`,
|
||||||
title: collectionExpanded.name,
|
title: collectionExpanded.name,
|
||||||
description: collectionExpanded.description || '',
|
description: collectionExpanded.description || '',
|
||||||
@@ -301,7 +313,7 @@ class Feed extends Model {
|
|||||||
entityUpdatedAt,
|
entityUpdatedAt,
|
||||||
serverAddress,
|
serverAddress,
|
||||||
feedURL: `/feed/${slug}`,
|
feedURL: `/feed/${slug}`,
|
||||||
imageURL: firstBookWithCover?.coverPath ? `/feed/${slug}/cover${Path.extname(firstBookWithCover.coverPath)}` : `/Logo.png`,
|
imageURL: Feed.getFeedImageURL(slug, firstBookWithCover?.coverPath, entityUpdatedAt),
|
||||||
siteURL: `/library/${booksWithTracks[0].libraryItem.libraryId}/series/${seriesExpanded.id}`,
|
siteURL: `/library/${booksWithTracks[0].libraryItem.libraryId}/series/${seriesExpanded.id}`,
|
||||||
title: seriesExpanded.name,
|
title: seriesExpanded.name,
|
||||||
description: seriesExpanded.description || '',
|
description: seriesExpanded.description || '',
|
||||||
|
|||||||
+15
-5
@@ -75,11 +75,21 @@ class Series extends Model {
|
|||||||
static async findOrCreateByNameAndLibrary(seriesName, libraryId) {
|
static async findOrCreateByNameAndLibrary(seriesName, libraryId) {
|
||||||
const series = await this.getByNameAndLibrary(seriesName, libraryId)
|
const series = await this.getByNameAndLibrary(seriesName, libraryId)
|
||||||
if (series) return series
|
if (series) return series
|
||||||
return this.create({
|
try {
|
||||||
name: seriesName,
|
return await this.create({
|
||||||
nameIgnorePrefix: getTitleIgnorePrefix(seriesName),
|
name: seriesName,
|
||||||
libraryId
|
nameIgnorePrefix: getTitleIgnorePrefix(seriesName),
|
||||||
})
|
libraryId
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
if (error.name !== 'SequelizeUniqueConstraintError') throw error
|
||||||
|
// The unique index is on the exact name. lower() can miss that row.
|
||||||
|
const existingSeries = await this.findOne({
|
||||||
|
where: { name: seriesName, libraryId }
|
||||||
|
})
|
||||||
|
if (!existingSeries) throw error
|
||||||
|
return existingSeries
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+37
-23
@@ -5,7 +5,6 @@ const { LRUCache } = require('lru-cache')
|
|||||||
const Logger = require('../Logger')
|
const Logger = require('../Logger')
|
||||||
const SocketAuthority = require('../SocketAuthority')
|
const SocketAuthority = require('../SocketAuthority')
|
||||||
const { isNullOrNaN } = require('../utils')
|
const { isNullOrNaN } = require('../utils')
|
||||||
const TokenManager = require('../auth/TokenManager')
|
|
||||||
|
|
||||||
class UserCache {
|
class UserCache {
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -94,8 +93,6 @@ class User extends Model {
|
|||||||
this.pash
|
this.pash
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
this.type
|
this.type
|
||||||
/** @type {string} */
|
|
||||||
this.token
|
|
||||||
/** @type {boolean} */
|
/** @type {boolean} */
|
||||||
this.isActive
|
this.isActive
|
||||||
/** @type {boolean} */
|
/** @type {boolean} */
|
||||||
@@ -186,20 +183,16 @@ class User extends Model {
|
|||||||
* Create root user
|
* Create root user
|
||||||
* @param {string} username
|
* @param {string} username
|
||||||
* @param {string} pash
|
* @param {string} pash
|
||||||
* @param {import('../Auth')} auth
|
|
||||||
* @returns {Promise<User>}
|
* @returns {Promise<User>}
|
||||||
*/
|
*/
|
||||||
static async createRootUser(username, pash, auth) {
|
static async createRootUser(username, pash, transaction = null) {
|
||||||
const userId = uuidv4()
|
const userId = uuidv4()
|
||||||
|
|
||||||
const token = auth.generateAccessToken({ id: userId, username })
|
|
||||||
|
|
||||||
const newUser = {
|
const newUser = {
|
||||||
id: userId,
|
id: userId,
|
||||||
type: 'root',
|
type: 'root',
|
||||||
username,
|
username,
|
||||||
pash,
|
pash,
|
||||||
token,
|
|
||||||
isActive: true,
|
isActive: true,
|
||||||
permissions: this.getDefaultPermissionsForUserType('root'),
|
permissions: this.getDefaultPermissionsForUserType('root'),
|
||||||
bookmarks: [],
|
bookmarks: [],
|
||||||
@@ -207,7 +200,7 @@ class User extends Model {
|
|||||||
seriesHideFromContinueListening: []
|
seriesHideFromContinueListening: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this.create(newUser)
|
return this.create(newUser, { transaction })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -314,15 +307,12 @@ class User extends Model {
|
|||||||
const username = userinfo.preferred_username || userinfo.name || userinfo.sub
|
const username = userinfo.preferred_username || userinfo.name || userinfo.sub
|
||||||
const email = userinfo.email && userinfo.email_verified ? userinfo.email : null
|
const email = userinfo.email && userinfo.email_verified ? userinfo.email : null
|
||||||
|
|
||||||
const token = TokenManager.generateAccessToken({ id: userId, username })
|
|
||||||
|
|
||||||
const newUser = {
|
const newUser = {
|
||||||
id: userId,
|
id: userId,
|
||||||
type: 'user',
|
type: 'user',
|
||||||
username,
|
username,
|
||||||
email,
|
email,
|
||||||
pash: null,
|
pash: null,
|
||||||
token,
|
|
||||||
isActive: true,
|
isActive: true,
|
||||||
permissions: this.getDefaultPermissionsForUserType('user'),
|
permissions: this.getDefaultPermissionsForUserType('user'),
|
||||||
bookmarks: [],
|
bookmarks: [],
|
||||||
@@ -514,6 +504,7 @@ class User extends Model {
|
|||||||
email: DataTypes.STRING,
|
email: DataTypes.STRING,
|
||||||
pash: DataTypes.STRING,
|
pash: DataTypes.STRING,
|
||||||
type: DataTypes.STRING,
|
type: DataTypes.STRING,
|
||||||
|
// Column remains so existing databases do not need a migration. New users leave it null.
|
||||||
token: DataTypes.STRING,
|
token: DataTypes.STRING,
|
||||||
isActive: {
|
isActive: {
|
||||||
type: DataTypes.BOOLEAN,
|
type: DataTypes.BOOLEAN,
|
||||||
@@ -596,11 +587,10 @@ class User extends Model {
|
|||||||
/**
|
/**
|
||||||
* User data for browser using old model
|
* User data for browser using old model
|
||||||
*
|
*
|
||||||
* @param {boolean} [hideRootToken=false]
|
|
||||||
* @param {boolean} [minimal=false]
|
* @param {boolean} [minimal=false]
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
toOldJSONForBrowser(hideRootToken = false, minimal = false) {
|
toOldJSONForBrowser(minimal = false) {
|
||||||
const seriesHideFromContinueListening = this.extraData?.seriesHideFromContinueListening || []
|
const seriesHideFromContinueListening = this.extraData?.seriesHideFromContinueListening || []
|
||||||
const librariesAccessible = this.permissions?.librariesAccessible || []
|
const librariesAccessible = this.permissions?.librariesAccessible || []
|
||||||
const itemTagsSelected = this.permissions?.itemTagsSelected || []
|
const itemTagsSelected = this.permissions?.itemTagsSelected || []
|
||||||
@@ -613,11 +603,6 @@ class User extends Model {
|
|||||||
username: this.username,
|
username: this.username,
|
||||||
email: this.email,
|
email: this.email,
|
||||||
type: this.type,
|
type: this.type,
|
||||||
// TODO: Old non-expiring token
|
|
||||||
token: this.type === 'root' && hideRootToken ? '' : this.token,
|
|
||||||
// TODO: Temporary flag not saved in db that is set in Auth.js jwtAuthCheck
|
|
||||||
// Necessary to detect apps using old tokens that no longer match the old token stored on the user
|
|
||||||
isOldToken: this.isOldToken,
|
|
||||||
mediaProgress: this.mediaProgresses?.map((mp) => mp.getOldMediaProgress()) || [],
|
mediaProgress: this.mediaProgresses?.map((mp) => mp.getOldMediaProgress()) || [],
|
||||||
seriesHideFromContinueListening: [...seriesHideFromContinueListening],
|
seriesHideFromContinueListening: [...seriesHideFromContinueListening],
|
||||||
bookmarks: this.bookmarks?.map((b) => ({ ...b })) || [],
|
bookmarks: this.bookmarks?.map((b) => ({ ...b })) || [],
|
||||||
@@ -743,10 +728,10 @@ class User extends Model {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
model: this.sequelize.models.podcast,
|
model: this.sequelize.models.podcast,
|
||||||
attributes: ['id', 'title'],
|
attributes: ['id', 'title', 'explicit', 'tags'],
|
||||||
include: {
|
include: {
|
||||||
model: this.sequelize.models.libraryItem,
|
model: this.sequelize.models.libraryItem,
|
||||||
attributes: ['id']
|
attributes: ['id', 'libraryId', 'mediaType']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -758,15 +743,38 @@ class User extends Model {
|
|||||||
statusCode: 404
|
statusCode: 404
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const episodeLibraryItem = podcastEpisode.podcast?.libraryItem
|
||||||
|
if (!episodeLibraryItem) {
|
||||||
|
Logger.error(`[User] createUpdateMediaProgress: library item for episode ${progressPayload.episodeId} not found`)
|
||||||
|
return {
|
||||||
|
error: 'Library item not found',
|
||||||
|
statusCode: 404
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (progressPayload.libraryItemId && episodeLibraryItem.id !== progressPayload.libraryItemId) {
|
||||||
|
Logger.error(`[User] createUpdateMediaProgress: episode ${progressPayload.episodeId} does not belong to library item ${progressPayload.libraryItemId}`)
|
||||||
|
return {
|
||||||
|
error: 'Episode does not belong to library item',
|
||||||
|
statusCode: 400
|
||||||
|
}
|
||||||
|
}
|
||||||
|
episodeLibraryItem.media = podcastEpisode.podcast
|
||||||
|
if (!this.checkCanAccessLibraryItem(episodeLibraryItem)) {
|
||||||
|
Logger.error(`[User] createUpdateMediaProgress: user "${this.username}" attempted to update progress for inaccessible library item "${episodeLibraryItem.id}"`)
|
||||||
|
return {
|
||||||
|
error: 'User does not have access to this library item',
|
||||||
|
statusCode: 403
|
||||||
|
}
|
||||||
|
}
|
||||||
mediaItemId = podcastEpisode.id
|
mediaItemId = podcastEpisode.id
|
||||||
mediaProgress = podcastEpisode.mediaProgresses?.[0]
|
mediaProgress = podcastEpisode.mediaProgresses?.[0]
|
||||||
podcastId = podcastEpisode.podcastId
|
podcastId = podcastEpisode.podcastId
|
||||||
} else {
|
} else {
|
||||||
const libraryItem = await this.sequelize.models.libraryItem.findByPk(progressPayload.libraryItemId, {
|
const libraryItem = await this.sequelize.models.libraryItem.findByPk(progressPayload.libraryItemId, {
|
||||||
attributes: ['id', 'mediaId', 'mediaType'],
|
attributes: ['id', 'libraryId', 'mediaId', 'mediaType'],
|
||||||
include: {
|
include: {
|
||||||
model: this.sequelize.models.book,
|
model: this.sequelize.models.book,
|
||||||
attributes: ['id', 'title'],
|
attributes: ['id', 'title', 'explicit', 'tags'],
|
||||||
required: false,
|
required: false,
|
||||||
include: {
|
include: {
|
||||||
model: this.sequelize.models.mediaProgress,
|
model: this.sequelize.models.mediaProgress,
|
||||||
@@ -787,6 +795,12 @@ class User extends Model {
|
|||||||
error: 'Library item is not a book',
|
error: 'Library item is not a book',
|
||||||
statusCode: 400
|
statusCode: 400
|
||||||
}
|
}
|
||||||
|
} else if (!this.checkCanAccessLibraryItem(libraryItem)) {
|
||||||
|
Logger.error(`[User] createUpdateMediaProgress: user "${this.username}" attempted to update progress for inaccessible library item "${libraryItem.id}"`)
|
||||||
|
return {
|
||||||
|
error: 'User does not have access to this library item',
|
||||||
|
statusCode: 403
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mediaItemId = libraryItem.media.id
|
mediaItemId = libraryItem.media.id
|
||||||
|
|||||||
@@ -75,9 +75,6 @@ class Stream extends EventEmitter {
|
|||||||
get codecsToForceAAC() {
|
get codecsToForceAAC() {
|
||||||
return ['alac', 'ac3', 'eac3', 'opus']
|
return ['alac', 'ac3', 'eac3', 'opus']
|
||||||
}
|
}
|
||||||
get userToken() {
|
|
||||||
return this.user.token
|
|
||||||
}
|
|
||||||
// Fmp4 does not work on iOS devices: https://github.com/advplyr/audiobookshelf-app/issues/85
|
// Fmp4 does not work on iOS devices: https://github.com/advplyr/audiobookshelf-app/issues/85
|
||||||
// Workaround: Force AAC transcode for FLAC
|
// Workaround: Force AAC transcode for FLAC
|
||||||
get hlsSegmentType() {
|
get hlsSegmentType() {
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ class Audible {
|
|||||||
timeout
|
timeout
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (!res?.data?.products) return null
|
if (!res?.data?.products) return []
|
||||||
return Promise.all(res.data.products.map((result) => this.asinSearch(result.asin, region, timeout)))
|
return Promise.all(res.data.products.map((result) => this.asinSearch(result.asin, region, timeout)))
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|||||||
@@ -27,6 +27,55 @@ const htmlSanitizer = require('../utils/htmlSanitizer')
|
|||||||
* @property {boolean} explicit
|
* @property {boolean} explicit
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Split a list of authors on commas. A piece with no space is a credential and is glued onto the previous name.
|
||||||
|
*
|
||||||
|
* @param {string} text
|
||||||
|
* @returns {string[]}
|
||||||
|
*/
|
||||||
|
function parseAuthorPieces(text) {
|
||||||
|
const authors = []
|
||||||
|
for (const piece of (text || '').split(',')) {
|
||||||
|
const name = piece.trim()
|
||||||
|
if (!name) continue
|
||||||
|
if (!name.includes(' ') && authors.length) {
|
||||||
|
authors[authors.length - 1] = `${authors[authors.length - 1]} ${name}`
|
||||||
|
} else {
|
||||||
|
authors.push(name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return authors
|
||||||
|
}
|
||||||
|
|
||||||
|
function stripCommasFromName(name) {
|
||||||
|
return (name || '').replace(/,/g, '').replace(/\s+/g, ' ').trim()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apple lists authors as "Name1, Name2 & Name3", but a comma can also sit inside one name ("Rick Hanson, PhD").
|
||||||
|
* A comma-separated piece with no space is treated as a credential and glued onto the previous name.
|
||||||
|
* The text after the last " & " is a single author, so commas there are removed.
|
||||||
|
* @see https://github.com/advplyr/audiobookshelf/issues/1022
|
||||||
|
* @see https://github.com/advplyr/audiobookshelf/issues/2661
|
||||||
|
*
|
||||||
|
* @param {string} artistName
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function cleanAuthor(artistName) {
|
||||||
|
const raw = (artistName || '').trim()
|
||||||
|
if (!raw) return ''
|
||||||
|
|
||||||
|
const lastAmpIndex = raw.lastIndexOf(' & ')
|
||||||
|
if (lastAmpIndex === -1) {
|
||||||
|
return stripCommasFromName(raw)
|
||||||
|
}
|
||||||
|
|
||||||
|
const authors = parseAuthorPieces(raw.slice(0, lastAmpIndex))
|
||||||
|
const lastAuthor = stripCommasFromName(raw.slice(lastAmpIndex + 3))
|
||||||
|
if (lastAuthor) authors.push(lastAuthor)
|
||||||
|
return authors.join(', ')
|
||||||
|
}
|
||||||
|
|
||||||
class iTunes {
|
class iTunes {
|
||||||
#responseTimeout = 10000
|
#responseTimeout = 10000
|
||||||
|
|
||||||
@@ -103,15 +152,11 @@ class iTunes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanAudiobook(data) {
|
cleanAudiobook(data) {
|
||||||
// artistName can be "Name1, Name2 & Name3" so we refactor this to "Name1, Name2, Name3"
|
|
||||||
// see: https://github.com/advplyr/audiobookshelf/issues/1022
|
|
||||||
const author = (data.artistName || '').split(' & ').join(', ')
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: data.collectionId,
|
id: data.collectionId,
|
||||||
artistId: data.artistId,
|
artistId: data.artistId,
|
||||||
title: data.collectionName,
|
title: data.collectionName,
|
||||||
author,
|
author: cleanAuthor(data.artistName),
|
||||||
description: data.description || null,
|
description: data.description || null,
|
||||||
publishedYear: data.releaseDate ? data.releaseDate.split('-')[0] : null,
|
publishedYear: data.releaseDate ? data.releaseDate.split('-')[0] : null,
|
||||||
genres: data.primaryGenreName ? [data.primaryGenreName] : null,
|
genres: data.primaryGenreName ? [data.primaryGenreName] : null,
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ const date = require('../libs/dateAndTime')
|
|||||||
|
|
||||||
const CacheManager = require('../managers/CacheManager')
|
const CacheManager = require('../managers/CacheManager')
|
||||||
const RssFeedManager = require('../managers/RssFeedManager')
|
const RssFeedManager = require('../managers/RssFeedManager')
|
||||||
|
const { fileUploadParser, requireUploadPermission } = require('../utils/fileUploadMiddleware')
|
||||||
|
|
||||||
const LibraryController = require('../controllers/LibraryController')
|
const LibraryController = require('../controllers/LibraryController')
|
||||||
const UserController = require('../controllers/UserController')
|
const UserController = require('../controllers/UserController')
|
||||||
@@ -110,7 +111,7 @@ class ApiRouter {
|
|||||||
this.router.get('/items/:id/download', LibraryItemController.middleware.bind(this), LibraryItemController.download.bind(this))
|
this.router.get('/items/:id/download', LibraryItemController.middleware.bind(this), LibraryItemController.download.bind(this))
|
||||||
this.router.patch('/items/:id/media', LibraryItemController.middleware.bind(this), LibraryItemController.updateMedia.bind(this))
|
this.router.patch('/items/:id/media', LibraryItemController.middleware.bind(this), LibraryItemController.updateMedia.bind(this))
|
||||||
this.router.get('/items/:id/cover', LibraryItemController.getCover.bind(this))
|
this.router.get('/items/:id/cover', LibraryItemController.getCover.bind(this))
|
||||||
this.router.post('/items/:id/cover', LibraryItemController.middleware.bind(this), LibraryItemController.uploadCover.bind(this))
|
this.router.post('/items/:id/cover', LibraryItemController.middleware.bind(this), requireUploadPermission, fileUploadParser, LibraryItemController.uploadCover.bind(this))
|
||||||
this.router.patch('/items/:id/cover', LibraryItemController.middleware.bind(this), LibraryItemController.updateCover.bind(this))
|
this.router.patch('/items/:id/cover', LibraryItemController.middleware.bind(this), LibraryItemController.updateCover.bind(this))
|
||||||
this.router.delete('/items/:id/cover', LibraryItemController.middleware.bind(this), LibraryItemController.removeCover.bind(this))
|
this.router.delete('/items/:id/cover', LibraryItemController.middleware.bind(this), LibraryItemController.removeCover.bind(this))
|
||||||
this.router.post('/items/:id/match', LibraryItemController.middleware.bind(this), LibraryItemController.match.bind(this))
|
this.router.post('/items/:id/match', LibraryItemController.middleware.bind(this), LibraryItemController.match.bind(this))
|
||||||
@@ -187,7 +188,7 @@ class ApiRouter {
|
|||||||
this.router.post('/me/item/:id/bookmark', MeController.createBookmark.bind(this))
|
this.router.post('/me/item/:id/bookmark', MeController.createBookmark.bind(this))
|
||||||
this.router.patch('/me/item/:id/bookmark', MeController.updateBookmark.bind(this))
|
this.router.patch('/me/item/:id/bookmark', MeController.updateBookmark.bind(this))
|
||||||
this.router.delete('/me/item/:id/bookmark/:time', MeController.removeBookmark.bind(this))
|
this.router.delete('/me/item/:id/bookmark/:time', MeController.removeBookmark.bind(this))
|
||||||
this.router.patch('/me/password', this.auth.authRateLimiter, MeController.updatePassword.bind(this))
|
this.router.patch('/me/password', this.auth.passwordChangeRateLimiter, MeController.updatePassword.bind(this))
|
||||||
this.router.get('/me/items-in-progress', MeController.getAllLibraryItemsInProgress.bind(this))
|
this.router.get('/me/items-in-progress', MeController.getAllLibraryItemsInProgress.bind(this))
|
||||||
this.router.get('/me/series/:id/remove-from-continue-listening', MeController.removeSeriesFromContinueListening.bind(this))
|
this.router.get('/me/series/:id/remove-from-continue-listening', MeController.removeSeriesFromContinueListening.bind(this))
|
||||||
this.router.get('/me/series/:id/readd-to-continue-listening', MeController.readdSeriesFromContinueListening.bind(this))
|
this.router.get('/me/series/:id/readd-to-continue-listening', MeController.readdSeriesFromContinueListening.bind(this))
|
||||||
@@ -202,7 +203,7 @@ class ApiRouter {
|
|||||||
this.router.delete('/backups/:id', BackupController.middleware.bind(this), BackupController.delete.bind(this))
|
this.router.delete('/backups/:id', BackupController.middleware.bind(this), BackupController.delete.bind(this))
|
||||||
this.router.get('/backups/:id/download', BackupController.middleware.bind(this), BackupController.download.bind(this))
|
this.router.get('/backups/:id/download', BackupController.middleware.bind(this), BackupController.download.bind(this))
|
||||||
this.router.get('/backups/:id/apply', BackupController.middleware.bind(this), BackupController.apply.bind(this))
|
this.router.get('/backups/:id/apply', BackupController.middleware.bind(this), BackupController.apply.bind(this))
|
||||||
this.router.post('/backups/upload', BackupController.middleware.bind(this), BackupController.upload.bind(this))
|
this.router.post('/backups/upload', BackupController.middleware.bind(this), fileUploadParser, BackupController.upload.bind(this))
|
||||||
this.router.patch('/backups/path', BackupController.middleware.bind(this), BackupController.updatePath.bind(this))
|
this.router.patch('/backups/path', BackupController.middleware.bind(this), BackupController.updatePath.bind(this))
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -343,7 +344,7 @@ class ApiRouter {
|
|||||||
//
|
//
|
||||||
// Misc Routes
|
// Misc Routes
|
||||||
//
|
//
|
||||||
this.router.post('/upload', MiscController.handleUpload.bind(this))
|
this.router.post('/upload', requireUploadPermission, fileUploadParser, MiscController.handleUpload.bind(this))
|
||||||
this.router.get('/tasks', MiscController.getTasks.bind(this))
|
this.router.get('/tasks', MiscController.getTasks.bind(this))
|
||||||
this.router.patch('/settings', MiscController.updateServerSettings.bind(this))
|
this.router.patch('/settings', MiscController.updateServerSettings.bind(this))
|
||||||
this.router.patch('/sorting-prefixes', MiscController.updateSortingPrefixes.bind(this))
|
this.router.patch('/sorting-prefixes', MiscController.updateSortingPrefixes.bind(this))
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ const { LogLevel } = require('../utils/constants')
|
|||||||
const { parseOverdriveMediaMarkersAsChapters } = require('../utils/parsers/parseOverdriveMediaMarkers')
|
const { parseOverdriveMediaMarkersAsChapters } = require('../utils/parsers/parseOverdriveMediaMarkers')
|
||||||
const parseNameString = require('../utils/parsers/parseNameString')
|
const parseNameString = require('../utils/parsers/parseNameString')
|
||||||
const parseSeriesString = require('../utils/parsers/parseSeriesString')
|
const parseSeriesString = require('../utils/parsers/parseSeriesString')
|
||||||
|
const htmlSanitizer = require('../utils/htmlSanitizer')
|
||||||
const LibraryItem = require('../models/LibraryItem')
|
const LibraryItem = require('../models/LibraryItem')
|
||||||
const AudioFile = require('../objects/files/AudioFile')
|
const AudioFile = require('../objects/files/AudioFile')
|
||||||
|
|
||||||
@@ -461,6 +462,7 @@ class AudioFileScanner {
|
|||||||
|
|
||||||
if (value && typeof value === 'string') {
|
if (value && typeof value === 'string') {
|
||||||
value = value.trim() // Trim whitespace
|
value = value.trim() // Trim whitespace
|
||||||
|
if (mapping.key === 'description' || mapping.key === 'subtitle') value = htmlSanitizer.sanitize(value)
|
||||||
|
|
||||||
if (mapping.key === 'pubDate') {
|
if (mapping.key === 'pubDate') {
|
||||||
const pubJsDate = new Date(value)
|
const pubJsDate = new Date(value)
|
||||||
|
|||||||
@@ -224,12 +224,16 @@ class BookScanner {
|
|||||||
if (!media.authors.some((au) => au.name === authorName)) {
|
if (!media.authors.some((au) => au.name === authorName)) {
|
||||||
const existingAuthorId = await Database.getAuthorIdByName(libraryItemData.libraryId, authorName)
|
const existingAuthorId = await Database.getAuthorIdByName(libraryItemData.libraryId, authorName)
|
||||||
if (existingAuthorId) {
|
if (existingAuthorId) {
|
||||||
await Database.bookAuthorModel.create({
|
try {
|
||||||
bookId: media.id,
|
await Database.bookAuthorModel.create({
|
||||||
authorId: existingAuthorId
|
bookId: media.id,
|
||||||
})
|
authorId: existingAuthorId
|
||||||
libraryScan.authorsNumBooksChangedIds.add(existingAuthorId)
|
})
|
||||||
libraryScan.addLog(LogLevel.DEBUG, `Updating book "${bookMetadata.title}" added author "${authorName}"`)
|
libraryScan.authorsNumBooksChangedIds.add(existingAuthorId)
|
||||||
|
libraryScan.addLog(LogLevel.DEBUG, `Updating book "${bookMetadata.title}" added author "${authorName}"`)
|
||||||
|
} catch (error) {
|
||||||
|
if (error.name !== 'SequelizeUniqueConstraintError') throw error
|
||||||
|
}
|
||||||
authorsUpdated = true
|
authorsUpdated = true
|
||||||
} else {
|
} else {
|
||||||
const newAuthor = await Database.authorModel.create({
|
const newAuthor = await Database.authorModel.create({
|
||||||
@@ -262,22 +266,51 @@ class BookScanner {
|
|||||||
if (!existingBookSeries) {
|
if (!existingBookSeries) {
|
||||||
const existingSeriesId = await Database.getSeriesIdByName(libraryItemData.libraryId, seriesObj.name)
|
const existingSeriesId = await Database.getSeriesIdByName(libraryItemData.libraryId, seriesObj.name)
|
||||||
if (existingSeriesId) {
|
if (existingSeriesId) {
|
||||||
await Database.bookSeriesModel.create({
|
try {
|
||||||
bookId: media.id,
|
await Database.bookSeriesModel.create({
|
||||||
seriesId: existingSeriesId,
|
bookId: media.id,
|
||||||
sequence: seriesObj.sequence
|
seriesId: existingSeriesId,
|
||||||
})
|
sequence: seriesObj.sequence
|
||||||
libraryScan.addLog(LogLevel.DEBUG, `Updating book "${bookMetadata.title}" added series "${seriesObj.name}"${seriesObj.sequence ? ` with sequence "${seriesObj.sequence}"` : ''}`)
|
})
|
||||||
|
libraryScan.addLog(LogLevel.DEBUG, `Updating book "${bookMetadata.title}" added series "${seriesObj.name}"${seriesObj.sequence ? ` with sequence "${seriesObj.sequence}"` : ''}`)
|
||||||
|
} catch (error) {
|
||||||
|
if (error.name !== 'SequelizeUniqueConstraintError') throw error
|
||||||
|
}
|
||||||
seriesUpdated = true
|
seriesUpdated = true
|
||||||
} else {
|
} else {
|
||||||
const newSeries = await Database.seriesModel.create({
|
let newSeries
|
||||||
name: seriesObj.name,
|
let seriesCreated = false
|
||||||
nameIgnorePrefix: getTitleIgnorePrefix(seriesObj.name),
|
try {
|
||||||
libraryId: libraryItemData.libraryId
|
newSeries = await Database.seriesModel.create({
|
||||||
})
|
name: seriesObj.name,
|
||||||
await media.addSeries(newSeries, { through: { sequence: seriesObj.sequence } })
|
nameIgnorePrefix: getTitleIgnorePrefix(seriesObj.name),
|
||||||
Database.addSeriesToFilterData(libraryItemData.libraryId, newSeries.name, newSeries.id)
|
libraryId: libraryItemData.libraryId
|
||||||
libraryScan.addLog(LogLevel.DEBUG, `Updating book "${bookMetadata.title}" added new series "${seriesObj.name}"${seriesObj.sequence ? ` with sequence "${seriesObj.sequence}"` : ''}`)
|
})
|
||||||
|
seriesCreated = true
|
||||||
|
} catch (error) {
|
||||||
|
if (error.name !== 'SequelizeUniqueConstraintError') throw error
|
||||||
|
newSeries = await Database.seriesModel.findOne({
|
||||||
|
where: { name: seriesObj.name, libraryId: libraryItemData.libraryId }
|
||||||
|
})
|
||||||
|
if (!newSeries) throw error
|
||||||
|
}
|
||||||
|
if (seriesCreated) {
|
||||||
|
Database.addSeriesToFilterData(libraryItemData.libraryId, newSeries.name, newSeries.id)
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
await Database.bookSeriesModel.create({
|
||||||
|
bookId: media.id,
|
||||||
|
seriesId: newSeries.id,
|
||||||
|
sequence: seriesObj.sequence
|
||||||
|
})
|
||||||
|
if (seriesCreated) {
|
||||||
|
libraryScan.addLog(LogLevel.DEBUG, `Updating book "${bookMetadata.title}" added new series "${seriesObj.name}"${seriesObj.sequence ? ` with sequence "${seriesObj.sequence}"` : ''}`)
|
||||||
|
} else {
|
||||||
|
libraryScan.addLog(LogLevel.DEBUG, `Updating book "${bookMetadata.title}" added series "${seriesObj.name}"${seriesObj.sequence ? ` with sequence "${seriesObj.sequence}"` : ''}`)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
if (error.name !== 'SequelizeUniqueConstraintError') throw error
|
||||||
|
}
|
||||||
seriesUpdated = true
|
seriesUpdated = true
|
||||||
}
|
}
|
||||||
} else if (seriesObj.sequence && existingBookSeries.bookSeries.sequence !== seriesObj.sequence) {
|
} else if (seriesObj.sequence && existingBookSeries.bookSeries.sequence !== seriesObj.sequence) {
|
||||||
@@ -507,24 +540,38 @@ class BookScanner {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bookMetadata.series.length) {
|
if (bookMetadata.series.length) {
|
||||||
|
const linkedSeriesIds = new Set()
|
||||||
for (const seriesObj of bookMetadata.series) {
|
for (const seriesObj of bookMetadata.series) {
|
||||||
if (!seriesObj.name) continue
|
if (!seriesObj.name) continue
|
||||||
const matchingSeriesId = await Database.getSeriesIdByName(libraryItemData.libraryId, seriesObj.name)
|
let seriesId = await Database.getSeriesIdByName(libraryItemData.libraryId, seriesObj.name)
|
||||||
if (matchingSeriesId) {
|
if (!seriesId) {
|
||||||
bookObject.bookSeries.push({
|
let series
|
||||||
seriesId: matchingSeriesId,
|
let seriesCreated = false
|
||||||
sequence: seriesObj.sequence
|
try {
|
||||||
})
|
series = await Database.seriesModel.create({
|
||||||
} else {
|
|
||||||
bookObject.bookSeries.push({
|
|
||||||
sequence: seriesObj.sequence,
|
|
||||||
series: {
|
|
||||||
name: seriesObj.name,
|
name: seriesObj.name,
|
||||||
nameIgnorePrefix: getTitleIgnorePrefix(seriesObj.name),
|
nameIgnorePrefix: getTitleIgnorePrefix(seriesObj.name),
|
||||||
libraryId: libraryItemData.libraryId
|
libraryId: libraryItemData.libraryId
|
||||||
}
|
})
|
||||||
})
|
seriesCreated = true
|
||||||
|
} catch (error) {
|
||||||
|
if (error.name !== 'SequelizeUniqueConstraintError') throw error
|
||||||
|
series = await Database.seriesModel.findOne({
|
||||||
|
where: { name: seriesObj.name, libraryId: libraryItemData.libraryId }
|
||||||
|
})
|
||||||
|
if (!series) throw error
|
||||||
|
}
|
||||||
|
seriesId = series.id
|
||||||
|
if (seriesCreated) {
|
||||||
|
Database.addSeriesToFilterData(libraryItemData.libraryId, series.name, series.id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (linkedSeriesIds.has(seriesId)) continue
|
||||||
|
linkedSeriesIds.add(seriesId)
|
||||||
|
bookObject.bookSeries.push({
|
||||||
|
seriesId,
|
||||||
|
sequence: seriesObj.sequence
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -703,6 +750,15 @@ class BookScanner {
|
|||||||
bookMetadata.description = htmlSanitizer.sanitize(bookMetadata.description)
|
bookMetadata.description = htmlSanitizer.sanitize(bookMetadata.description)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// One dedupe after every metadata source. A repeated name inserts the same bookAuthor or bookSeries twice and aborts the scan.
|
||||||
|
bookMetadata.authors = parseNameString.dedupeNames(bookMetadata.authors)
|
||||||
|
const seenSeriesNames = new Set()
|
||||||
|
bookMetadata.series = bookMetadata.series.filter((series) => {
|
||||||
|
if (!series?.name || seenSeriesNames.has(series.name)) return false
|
||||||
|
seenSeriesNames.add(series.name)
|
||||||
|
return true
|
||||||
|
})
|
||||||
|
|
||||||
return bookMetadata
|
return bookMetadata
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ class LibraryScan {
|
|||||||
/** @type {string[]} */
|
/** @type {string[]} */
|
||||||
this.seriesRemovedFromBooks = []
|
this.seriesRemovedFromBooks = []
|
||||||
|
|
||||||
|
/** @type {string} item label while a library item is being scanned, so a thrown error can name it */
|
||||||
|
this.failureItem = null
|
||||||
|
|
||||||
this.logs = []
|
this.logs = []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,8 @@ class LibraryScanner {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
libraryScan.setComplete()
|
libraryScan.setComplete()
|
||||||
|
|
||||||
Logger.error(`[LibraryScanner] Library scan ${libraryScan.id} failed after ${libraryScan.elapsedTimestamp} | ${libraryScan.resultStats}.`, err)
|
const failedItem = libraryScan.failureItem ? ` while scanning ${libraryScan.failureItem}` : ''
|
||||||
|
Logger.error(`[LibraryScanner] Library scan ${libraryScan.id} failed after ${libraryScan.elapsedTimestamp} | ${libraryScan.resultStats}${failedItem}.`, err)
|
||||||
|
|
||||||
task.data.scanResults = libraryScan.scanResults
|
task.data.scanResults = libraryScan.scanResults
|
||||||
const taskFailedString = {
|
const taskFailedString = {
|
||||||
@@ -169,6 +170,7 @@ class LibraryScanner {
|
|||||||
const libraryItemIdsMissing = []
|
const libraryItemIdsMissing = []
|
||||||
let libraryItemsUpdated = []
|
let libraryItemsUpdated = []
|
||||||
for (const existingLibraryItem of existingLibraryItems) {
|
for (const existingLibraryItem of existingLibraryItems) {
|
||||||
|
libraryScan.failureItem = scanItemFailureLabel(existingLibraryItem.title, existingLibraryItem.path)
|
||||||
// First try to find matching library item with exact file path
|
// First try to find matching library item with exact file path
|
||||||
let libraryItemData = libraryItemDataFound.find((lid) => lid.path === existingLibraryItem.path)
|
let libraryItemData = libraryItemDataFound.find((lid) => lid.path === existingLibraryItem.path)
|
||||||
if (!libraryItemData) {
|
if (!libraryItemData) {
|
||||||
@@ -221,6 +223,8 @@ class LibraryScanner {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
libraryScan.failureItem = null
|
||||||
|
|
||||||
// Emit item updates in chunks of 10 to client
|
// Emit item updates in chunks of 10 to client
|
||||||
if (libraryItemsUpdated.length === 10) {
|
if (libraryItemsUpdated.length === 10) {
|
||||||
SocketAuthority.libraryItemsEmitter('items_updated', libraryItemsUpdated)
|
SocketAuthority.libraryItemsEmitter('items_updated', libraryItemsUpdated)
|
||||||
@@ -259,12 +263,14 @@ class LibraryScanner {
|
|||||||
if (libraryItemDataFound.length) {
|
if (libraryItemDataFound.length) {
|
||||||
let newLibraryItems = []
|
let newLibraryItems = []
|
||||||
for (const libraryItemData of libraryItemDataFound) {
|
for (const libraryItemData of libraryItemDataFound) {
|
||||||
|
libraryScan.failureItem = scanItemFailureLabel(libraryItemData.mediaMetadata?.title, libraryItemData.path)
|
||||||
const newLibraryItem = await LibraryItemScanner.scanNewLibraryItem(libraryItemData, libraryScan.library.settings, libraryScan)
|
const newLibraryItem = await LibraryItemScanner.scanNewLibraryItem(libraryItemData, libraryScan.library.settings, libraryScan)
|
||||||
if (newLibraryItem) {
|
if (newLibraryItem) {
|
||||||
newLibraryItems.push(newLibraryItem)
|
newLibraryItems.push(newLibraryItem)
|
||||||
|
|
||||||
libraryScan.resultsAdded++
|
libraryScan.resultsAdded++
|
||||||
}
|
}
|
||||||
|
libraryScan.failureItem = null
|
||||||
|
|
||||||
// Emit new items in chunks of 10 to client
|
// Emit new items in chunks of 10 to client
|
||||||
if (newLibraryItems.length === 10) {
|
if (newLibraryItems.length === 10) {
|
||||||
@@ -597,7 +603,12 @@ class LibraryScanner {
|
|||||||
}
|
}
|
||||||
// Scan library item for updates
|
// Scan library item for updates
|
||||||
Logger.debug(`[LibraryScanner] Folder update for relative path "${itemDir}" is in library item "${existingLibraryItem.media.title}" with id "${existingLibraryItem.id}" - scan for updates`)
|
Logger.debug(`[LibraryScanner] Folder update for relative path "${itemDir}" is in library item "${existingLibraryItem.media.title}" with id "${existingLibraryItem.id}" - scan for updates`)
|
||||||
itemGroupingResults[itemDir] = await LibraryItemScanner.scanLibraryItem(existingLibraryItem.id, updatedLibraryItemDetails)
|
try {
|
||||||
|
itemGroupingResults[itemDir] = await LibraryItemScanner.scanLibraryItem(existingLibraryItem.id, updatedLibraryItemDetails)
|
||||||
|
} catch (err) {
|
||||||
|
Logger.error(`[LibraryScanner] Failed while scanning ${scanItemFailureLabel(existingLibraryItem.media?.title, existingLibraryItem.path)}`)
|
||||||
|
throw err
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
} else if (library.settings.audiobooksOnly && !hasAudioFiles(fileUpdateGroup, itemDir)) {
|
} else if (library.settings.audiobooksOnly && !hasAudioFiles(fileUpdateGroup, itemDir)) {
|
||||||
Logger.debug(`[LibraryScanner] Folder update for relative path "${itemDir}" has no audio files`)
|
Logger.debug(`[LibraryScanner] Folder update for relative path "${itemDir}" has no audio files`)
|
||||||
@@ -626,7 +637,13 @@ class LibraryScanner {
|
|||||||
|
|
||||||
Logger.debug(`[LibraryScanner] Folder update group must be a new item "${itemDir}" in library "${library.name}"`)
|
Logger.debug(`[LibraryScanner] Folder update group must be a new item "${itemDir}" in library "${library.name}"`)
|
||||||
const isSingleMediaItem = isSingleMediaFile(fileUpdateGroup, itemDir)
|
const isSingleMediaItem = isSingleMediaFile(fileUpdateGroup, itemDir)
|
||||||
const newLibraryItem = await LibraryItemScanner.scanPotentialNewLibraryItem(fullPath, library, folder, isSingleMediaItem)
|
let newLibraryItem
|
||||||
|
try {
|
||||||
|
newLibraryItem = await LibraryItemScanner.scanPotentialNewLibraryItem(fullPath, library, folder, isSingleMediaItem)
|
||||||
|
} catch (err) {
|
||||||
|
Logger.error(`[LibraryScanner] Failed while scanning ${scanItemFailureLabel(null, fullPath)}`)
|
||||||
|
throw err
|
||||||
|
}
|
||||||
if (newLibraryItem) {
|
if (newLibraryItem) {
|
||||||
SocketAuthority.libraryItemEmitter('item_added', newLibraryItem)
|
SocketAuthority.libraryItemEmitter('item_added', newLibraryItem)
|
||||||
}
|
}
|
||||||
@@ -638,6 +655,16 @@ class LibraryScanner {
|
|||||||
}
|
}
|
||||||
module.exports = new LibraryScanner()
|
module.exports = new LibraryScanner()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} title
|
||||||
|
* @param {string} path
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function scanItemFailureLabel(title, path) {
|
||||||
|
if (title && path) return `"${title}" at "${path}"`
|
||||||
|
return `"${path || title || 'unknown item'}"`
|
||||||
|
}
|
||||||
|
|
||||||
function ItemToFileInoMatch(libraryItem1, libraryItem2) {
|
function ItemToFileInoMatch(libraryItem1, libraryItem2) {
|
||||||
return libraryItem1.isFile && libraryItem2.libraryFiles.some((lf) => lf.ino === libraryItem1.ino)
|
return libraryItem1.isFile && libraryItem2.libraryFiles.some((lf) => lf.ino === libraryItem1.ino)
|
||||||
}
|
}
|
||||||
|
|||||||
+46
-21
@@ -260,16 +260,21 @@ class Scanner {
|
|||||||
// Update filter data
|
// Update filter data
|
||||||
Database.addAuthorToFilterData(libraryItem.libraryId, author.name, author.id)
|
Database.addAuthorToFilterData(libraryItem.libraryId, author.name, author.id)
|
||||||
}
|
}
|
||||||
await Database.bookAuthorModel
|
let bookAuthorCreated = true
|
||||||
.create({
|
try {
|
||||||
|
await Database.bookAuthorModel.create({
|
||||||
authorId: author.id,
|
authorId: author.id,
|
||||||
bookId: libraryItem.media.id
|
bookId: libraryItem.media.id
|
||||||
})
|
})
|
||||||
.then(() => {
|
} catch (error) {
|
||||||
Logger.info(`[Scanner] quickMatchBookBuildUpdatePayload: Added author "${author.name}" to "${libraryItem.media.title}"`)
|
if (error.name !== 'SequelizeUniqueConstraintError') throw error
|
||||||
libraryItem.media.authors.push(author)
|
bookAuthorCreated = false
|
||||||
hasAuthorUpdates = true
|
}
|
||||||
})
|
libraryItem.media.authors.push(author)
|
||||||
|
hasAuthorUpdates = true
|
||||||
|
if (bookAuthorCreated) {
|
||||||
|
Logger.info(`[Scanner] quickMatchBookBuildUpdatePayload: Added author "${author.name}" to "${libraryItem.media.title}"`)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const authorsRemoved = libraryItem.media.authors.filter((a) => !matchData.author.find((ma) => ma.toLowerCase() === a.name.toLowerCase()))
|
const authorsRemoved = libraryItem.media.authors.filter((a) => !matchData.author.find((ma) => ma.toLowerCase() === a.name.toLowerCase()))
|
||||||
if (authorsRemoved.length) {
|
if (authorsRemoved.length) {
|
||||||
@@ -306,23 +311,43 @@ class Scanner {
|
|||||||
} else {
|
} else {
|
||||||
let seriesItem = await Database.seriesModel.getByNameAndLibrary(seriesMatchItem.series, libraryItem.libraryId)
|
let seriesItem = await Database.seriesModel.getByNameAndLibrary(seriesMatchItem.series, libraryItem.libraryId)
|
||||||
if (!seriesItem) {
|
if (!seriesItem) {
|
||||||
seriesItem = await Database.seriesModel.create({
|
let seriesCreated = false
|
||||||
name: seriesMatchItem.series,
|
try {
|
||||||
nameIgnorePrefix: getTitleIgnorePrefix(seriesMatchItem.series),
|
seriesItem = await Database.seriesModel.create({
|
||||||
libraryId: libraryItem.libraryId
|
name: seriesMatchItem.series,
|
||||||
})
|
nameIgnorePrefix: getTitleIgnorePrefix(seriesMatchItem.series),
|
||||||
// Update filter data
|
libraryId: libraryItem.libraryId
|
||||||
Database.addSeriesToFilterData(libraryItem.libraryId, seriesItem.name, seriesItem.id)
|
})
|
||||||
SocketAuthority.emitter('series_added', seriesItem.toOldJSON())
|
seriesCreated = true
|
||||||
|
} catch (error) {
|
||||||
|
if (error.name !== 'SequelizeUniqueConstraintError') throw error
|
||||||
|
seriesItem = await Database.seriesModel.findOne({
|
||||||
|
where: { name: seriesMatchItem.series, libraryId: libraryItem.libraryId }
|
||||||
|
})
|
||||||
|
if (!seriesItem) throw error
|
||||||
|
}
|
||||||
|
if (seriesCreated) {
|
||||||
|
// Update filter data
|
||||||
|
Database.addSeriesToFilterData(libraryItem.libraryId, seriesItem.name, seriesItem.id)
|
||||||
|
SocketAuthority.emitter('series_added', seriesItem.toOldJSON())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let bookSeries
|
||||||
|
try {
|
||||||
|
bookSeries = await Database.bookSeriesModel.create({
|
||||||
|
seriesId: seriesItem.id,
|
||||||
|
bookId: libraryItem.media.id,
|
||||||
|
sequence: seriesMatchItem.sequence
|
||||||
|
})
|
||||||
|
Logger.info(`[Scanner] quickMatchBookBuildUpdatePayload: Added series "${seriesItem.name}" to "${libraryItem.media.title}"`)
|
||||||
|
} catch (error) {
|
||||||
|
if (error.name !== 'SequelizeUniqueConstraintError') throw error
|
||||||
|
bookSeries = await Database.bookSeriesModel.findOne({
|
||||||
|
where: { seriesId: seriesItem.id, bookId: libraryItem.media.id }
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const bookSeries = await Database.bookSeriesModel.create({
|
|
||||||
seriesId: seriesItem.id,
|
|
||||||
bookId: libraryItem.media.id,
|
|
||||||
sequence: seriesMatchItem.sequence
|
|
||||||
})
|
|
||||||
seriesItem.bookSeries = bookSeries
|
seriesItem.bookSeries = bookSeries
|
||||||
libraryItem.media.series.push(seriesItem)
|
libraryItem.media.series.push(seriesItem)
|
||||||
Logger.info(`[Scanner] quickMatchBookBuildUpdatePayload: Added series "${seriesItem.name}" to "${libraryItem.media.title}"`)
|
|
||||||
hasSeriesUpdates = true
|
hasSeriesUpdates = true
|
||||||
}
|
}
|
||||||
const seriesRemoved = libraryItem.media.series.filter((s) => !matchData.series.find((ms) => ms.series.toLowerCase() === s.name.toLowerCase()))
|
const seriesRemoved = libraryItem.media.series.filter((s) => !matchData.series.find((ms) => ms.series.toLowerCase() === s.name.toLowerCase()))
|
||||||
|
|||||||
@@ -0,0 +1,76 @@
|
|||||||
|
const Path = require('path')
|
||||||
|
const fs = require('../libs/fsExtra')
|
||||||
|
const fileUpload = require('../libs/expressFileupload')
|
||||||
|
const Logger = require('../Logger')
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Multipart parser for the three routes that read req.files.
|
||||||
|
* Reads MetadataPath per request so route registration does not depend on it.
|
||||||
|
*
|
||||||
|
* @param {import('express').Request} req
|
||||||
|
* @param {import('express').Response} res
|
||||||
|
* @param {import('express').NextFunction} next
|
||||||
|
*/
|
||||||
|
function fileUploadParser(req, res, next) {
|
||||||
|
fileUpload({
|
||||||
|
defCharset: 'utf8',
|
||||||
|
defParamCharset: 'utf8',
|
||||||
|
useTempFiles: true,
|
||||||
|
tempFileDir: Path.join(global.MetadataPath, 'tmp')
|
||||||
|
})(req, res, next)
|
||||||
|
}
|
||||||
|
module.exports.fileUploadParser = fileUploadParser
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reject users without upload permission before the multipart parser writes temp files.
|
||||||
|
*
|
||||||
|
* @param {import('express').Request} req
|
||||||
|
* @param {import('express').Response} res
|
||||||
|
* @param {import('express').NextFunction} next
|
||||||
|
*/
|
||||||
|
function requireUploadPermission(req, res, next) {
|
||||||
|
if (!req.user?.canUpload) {
|
||||||
|
Logger.warn(`User "${req.user?.username || 'unknown'}" attempted to upload without permission`)
|
||||||
|
return res.sendStatus(403)
|
||||||
|
}
|
||||||
|
next()
|
||||||
|
}
|
||||||
|
module.exports.requireUploadPermission = requireUploadPermission
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove leftover upload temp files (tmp-*) from metadata/tmp.
|
||||||
|
* Comic extraction uses the same directory with other names; those stay.
|
||||||
|
*
|
||||||
|
* @returns {Promise<void>}
|
||||||
|
*/
|
||||||
|
async function sweepUploadTempFiles() {
|
||||||
|
const tmpDir = Path.join(global.MetadataPath, 'tmp')
|
||||||
|
let names
|
||||||
|
try {
|
||||||
|
names = await fs.readdir(tmpDir)
|
||||||
|
} catch (error) {
|
||||||
|
if (error.code === 'ENOENT') return
|
||||||
|
Logger.warn(`[FileUpload] Failed to read upload temp directory "${tmpDir}": ${error.message}`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let removed = 0
|
||||||
|
for (const name of names) {
|
||||||
|
if (!name.startsWith('tmp-')) continue
|
||||||
|
const fullPath = Path.join(tmpDir, name)
|
||||||
|
try {
|
||||||
|
const stat = await fs.lstat(fullPath)
|
||||||
|
if (!stat.isFile()) continue
|
||||||
|
await fs.unlink(fullPath)
|
||||||
|
removed++
|
||||||
|
} catch (error) {
|
||||||
|
if (error.code === 'ENOENT') continue
|
||||||
|
Logger.warn(`[FileUpload] Failed to remove leftover upload temp file "${fullPath}": ${error.message}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (removed) {
|
||||||
|
Logger.info(`[FileUpload] Removed ${removed} leftover upload temp file(s) from "${tmpDir}"`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
module.exports.sweepUploadTempFiles = sweepUploadTempFiles
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
const Logger = require('../../Logger')
|
const Logger = require('../../Logger')
|
||||||
const parseSeriesString = require('../parsers/parseSeriesString')
|
const parseSeriesString = require('../parsers/parseSeriesString')
|
||||||
|
const { dedupeNames } = require('../parsers/parseNameString')
|
||||||
|
|
||||||
const mediaTypeKeys = {
|
const mediaTypeKeys = {
|
||||||
book: {
|
book: {
|
||||||
@@ -140,8 +141,7 @@ function validateMetadataValue(key, value, expectedType) {
|
|||||||
return undefined
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
const cleanedArray = value.filter((t) => typeof t === 'string')
|
return dedupeNames(value)
|
||||||
return [...new Set(cleanedArray.map((t) => t.trim()).filter((t) => t))]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.warn(`[abmetadataGenerator] Unknown expected type "${expectedType}" for key "${key}"`)
|
Logger.warn(`[abmetadataGenerator] Unknown expected type "${expectedType}" for key "${key}"`)
|
||||||
|
|||||||
@@ -35,6 +35,28 @@ module.exports.nameToLastFirst = (firstLast) => {
|
|||||||
return `${nameObj.last_name}, ${nameObj.first_name}`
|
return `${nameObj.last_name}, ${nameObj.first_name}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Trim names, drop blanks, and drop exact repeats. The first spelling is kept.
|
||||||
|
* Callers that build bookAuthors rows should use this instead of deduping per metadata source.
|
||||||
|
*
|
||||||
|
* @param {string[]} names
|
||||||
|
* @returns {string[]}
|
||||||
|
*/
|
||||||
|
function dedupeNames(names) {
|
||||||
|
if (!Array.isArray(names)) return []
|
||||||
|
const seen = new Set()
|
||||||
|
const deduped = []
|
||||||
|
for (const name of names) {
|
||||||
|
if (typeof name !== 'string') continue
|
||||||
|
const trimmed = name.trim()
|
||||||
|
if (!trimmed || seen.has(trimmed)) continue
|
||||||
|
seen.add(trimmed)
|
||||||
|
deduped.push(trimmed)
|
||||||
|
}
|
||||||
|
return deduped
|
||||||
|
}
|
||||||
|
module.exports.dedupeNames = dedupeNames
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses a name string into an array of names
|
* Parses a name string into an array of names
|
||||||
*
|
*
|
||||||
@@ -62,7 +84,7 @@ module.exports.parse = (nameString) => {
|
|||||||
// If names are in Chinese,Japanese and Korean languages, return as is.
|
// If names are in Chinese,Japanese and Korean languages, return as is.
|
||||||
if (/[\u4e00-\u9fff\u3040-\u30ff\u31f0-\u31ff]/.test(splitNames[0])) {
|
if (/[\u4e00-\u9fff\u3040-\u30ff\u31f0-\u31ff]/.test(splitNames[0])) {
|
||||||
return {
|
return {
|
||||||
names: splitNames
|
names: dedupeNames(splitNames)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,7 +124,7 @@ module.exports.parse = (nameString) => {
|
|||||||
names = names.filter((n) => n.first_name || n.last_name)
|
names = names.filter((n) => n.first_name || n.last_name)
|
||||||
|
|
||||||
// Set name strings and remove duplicates
|
// Set name strings and remove duplicates
|
||||||
const namesArray = [...new Set(names.map((a) => (a.first_name ? `${a.first_name} ${a.last_name}` : a.last_name)))]
|
const namesArray = dedupeNames(names.map((a) => (a.first_name ? `${a.first_name} ${a.last_name}` : a.last_name)))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
names: namesArray // Array of first last
|
names: namesArray // Array of first last
|
||||||
|
|||||||
@@ -242,7 +242,9 @@ module.exports = {
|
|||||||
if (!user.canAccessExplicitContent) {
|
if (!user.canAccessExplicitContent) {
|
||||||
attrQuery += ' AND b.explicit = 0'
|
attrQuery += ' AND b.explicit = 0'
|
||||||
}
|
}
|
||||||
if (!user.permissions?.accessAllTags && user.permissions?.itemTagsSelected?.length) {
|
if (!user.permissions?.accessAllTags && !user.permissions?.selectedTagsNotAccessible && !user.permissions?.itemTagsSelected?.length) {
|
||||||
|
attrQuery += ' AND 0'
|
||||||
|
} else if (!user.permissions?.accessAllTags && user.permissions?.itemTagsSelected?.length) {
|
||||||
if (user.permissions.selectedTagsNotAccessible) {
|
if (user.permissions.selectedTagsNotAccessible) {
|
||||||
attrQuery += ' AND (SELECT count(*) FROM json_each(tags) WHERE json_valid(tags) AND json_each.value IN (:userTagsSelected)) = 0'
|
attrQuery += ' AND (SELECT count(*) FROM json_each(tags) WHERE json_valid(tags) AND json_each.value IN (:userTagsSelected)) = 0'
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -24,7 +24,10 @@ module.exports = {
|
|||||||
explicit: false
|
explicit: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (!user.permissions?.accessAllTags && user.permissions?.itemTagsSelected?.length) {
|
if (!user.permissions?.accessAllTags && !user.permissions?.selectedTagsNotAccessible && !user.permissions?.itemTagsSelected?.length) {
|
||||||
|
// Empty allow-list: the per-item check denies every item. An empty block-list denies nothing.
|
||||||
|
bookWhere.push(Sequelize.where(Sequelize.literal('1'), 0))
|
||||||
|
} else if (!user.permissions?.accessAllTags && user.permissions?.itemTagsSelected?.length) {
|
||||||
replacements['userTagsSelected'] = user.permissions.itemTagsSelected
|
replacements['userTagsSelected'] = user.permissions.itemTagsSelected
|
||||||
if (user.permissions.selectedTagsNotAccessible) {
|
if (user.permissions.selectedTagsNotAccessible) {
|
||||||
bookWhere.push(Sequelize.where(Sequelize.literal(`(SELECT count(*) FROM json_each(tags) WHERE json_valid(tags) AND json_each.value IN (:userTagsSelected))`), 0))
|
bookWhere.push(Sequelize.where(Sequelize.literal(`(SELECT count(*) FROM json_each(tags) WHERE json_valid(tags) AND json_each.value IN (:userTagsSelected))`), 0))
|
||||||
|
|||||||
@@ -21,7 +21,10 @@ module.exports = {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!user.permissions?.accessAllTags && user.permissions?.itemTagsSelected?.length) {
|
if (!user.permissions?.accessAllTags && !user.permissions?.selectedTagsNotAccessible && !user.permissions?.itemTagsSelected?.length) {
|
||||||
|
// Empty allow-list: the per-item check denies every item. An empty block-list denies nothing.
|
||||||
|
podcastWhere.push(Sequelize.where(Sequelize.literal('1'), 0))
|
||||||
|
} else if (!user.permissions?.accessAllTags && user.permissions?.itemTagsSelected?.length) {
|
||||||
replacements['userTagsSelected'] = user.permissions.itemTagsSelected
|
replacements['userTagsSelected'] = user.permissions.itemTagsSelected
|
||||||
if (user.permissions.selectedTagsNotAccessible) {
|
if (user.permissions.selectedTagsNotAccessible) {
|
||||||
podcastWhere.push(Sequelize.where(Sequelize.literal(`(SELECT count(*) FROM json_each(tags) WHERE json_valid(tags) AND json_each.value IN (:userTagsSelected))`), 0))
|
podcastWhere.push(Sequelize.where(Sequelize.literal(`(SELECT count(*) FROM json_each(tags) WHERE json_valid(tags) AND json_each.value IN (:userTagsSelected))`), 0))
|
||||||
|
|||||||
@@ -102,7 +102,9 @@ module.exports = {
|
|||||||
if (!user.canAccessExplicitContent) {
|
if (!user.canAccessExplicitContent) {
|
||||||
attrQuery += ' AND b.explicit = 0'
|
attrQuery += ' AND b.explicit = 0'
|
||||||
}
|
}
|
||||||
if (!user.permissions?.accessAllTags && user.permissions?.itemTagsSelected?.length) {
|
if (!user.permissions?.accessAllTags && !user.permissions?.selectedTagsNotAccessible && !user.permissions?.itemTagsSelected?.length) {
|
||||||
|
attrQuery += ' AND 0'
|
||||||
|
} else if (!user.permissions?.accessAllTags && user.permissions?.itemTagsSelected?.length) {
|
||||||
if (user.permissions.selectedTagsNotAccessible) {
|
if (user.permissions.selectedTagsNotAccessible) {
|
||||||
attrQuery += ' AND (SELECT count(*) FROM json_each(tags) WHERE json_valid(tags) AND json_each.value IN (:userTagsSelected)) = 0'
|
attrQuery += ' AND (SELECT count(*) FROM json_each(tags) WHERE json_valid(tags) AND json_each.value IN (:userTagsSelected)) = 0'
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
const { rateLimit, RateLimitRequestHandler } = require('express-rate-limit')
|
const { rateLimit, RateLimitRequestHandler } = require('express-rate-limit')
|
||||||
const Logger = require('../Logger')
|
const Logger = require('../Logger')
|
||||||
const requestIp = require('../libs/requestIp')
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Factory for creating authentication rate limiters
|
* Factory for creating authentication rate limiters
|
||||||
@@ -8,9 +7,96 @@ const requestIp = require('../libs/requestIp')
|
|||||||
class RateLimiterFactory {
|
class RateLimiterFactory {
|
||||||
static DEFAULT_WINDOW_MS = 10 * 60 * 1000 // 10 minutes
|
static DEFAULT_WINDOW_MS = 10 * 60 * 1000 // 10 minutes
|
||||||
static DEFAULT_MAX = 40 // 40 attempts
|
static DEFAULT_MAX = 40 // 40 attempts
|
||||||
|
static LOCAL_LOGIN_KEY = 'local-login'
|
||||||
|
static UNKNOWN_USER_KEY = 'unknown-user'
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.authRateLimiter = null
|
this.authRateLimiter = null
|
||||||
|
this.passwordChangeRateLimiter = null
|
||||||
|
this.disabledLimiter = null
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shared window, max, and message. Null when rate limiting is disabled.
|
||||||
|
* @returns {{ windowMs: number, max: number, message: string } | null}
|
||||||
|
*/
|
||||||
|
getLimiterConfig() {
|
||||||
|
// Disable by setting max to 0
|
||||||
|
if (process.env.RATE_LIMIT_AUTH_MAX === '0') {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
let windowMs = RateLimiterFactory.DEFAULT_WINDOW_MS
|
||||||
|
if (parseInt(process.env.RATE_LIMIT_AUTH_WINDOW) > 0) {
|
||||||
|
windowMs = parseInt(process.env.RATE_LIMIT_AUTH_WINDOW)
|
||||||
|
}
|
||||||
|
|
||||||
|
let max = RateLimiterFactory.DEFAULT_MAX
|
||||||
|
if (parseInt(process.env.RATE_LIMIT_AUTH_MAX) > 0) {
|
||||||
|
max = parseInt(process.env.RATE_LIMIT_AUTH_MAX)
|
||||||
|
}
|
||||||
|
|
||||||
|
let message = 'Too many authentication requests'
|
||||||
|
if (process.env.RATE_LIMIT_AUTH_MESSAGE) {
|
||||||
|
message = process.env.RATE_LIMIT_AUTH_MESSAGE
|
||||||
|
}
|
||||||
|
|
||||||
|
return { windowMs, max, message }
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log non-default limiter settings once per process.
|
||||||
|
* @param {{ windowMs: number, max: number }} config
|
||||||
|
*/
|
||||||
|
logCustomLimiterConfig(config) {
|
||||||
|
if (this.loggedCustomConfig) return
|
||||||
|
this.loggedCustomConfig = true
|
||||||
|
|
||||||
|
if (config.windowMs !== RateLimiterFactory.DEFAULT_WINDOW_MS) {
|
||||||
|
Logger.info(`[RateLimiterFactory] Authentication rate limiting window set to ${config.windowMs}ms by ENV variable`)
|
||||||
|
}
|
||||||
|
if (config.max !== RateLimiterFactory.DEFAULT_MAX) {
|
||||||
|
Logger.info(`[RateLimiterFactory] Authentication rate limiting max set to ${config.max} by ENV variable`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {RateLimitRequestHandler}
|
||||||
|
*/
|
||||||
|
getDisabledLimiter() {
|
||||||
|
if (!this.disabledLimiter) {
|
||||||
|
this.disabledLimiter = (req, res, next) => next()
|
||||||
|
}
|
||||||
|
return this.disabledLimiter
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {{ windowMs: number, max: number, message: string }} config
|
||||||
|
* @param {(req: import('express').Request) => string} keyGenerator
|
||||||
|
* @returns {RateLimitRequestHandler}
|
||||||
|
*/
|
||||||
|
createLimiter(config, keyGenerator) {
|
||||||
|
return rateLimit({
|
||||||
|
windowMs: config.windowMs,
|
||||||
|
max: config.max,
|
||||||
|
standardHeaders: true,
|
||||||
|
legacyHeaders: false,
|
||||||
|
keyGenerator,
|
||||||
|
skipSuccessfulRequests: true,
|
||||||
|
handler: (req, res) => {
|
||||||
|
const userAgent = req.get('User-Agent') || 'Unknown'
|
||||||
|
const endpoint = req.path
|
||||||
|
const method = req.method
|
||||||
|
const userId = req.user?.id
|
||||||
|
const userLabel = userId ? `, User: ${userId}` : ''
|
||||||
|
|
||||||
|
Logger.warn(`[RateLimiter] Rate limit exceeded - Endpoint: ${method} ${endpoint}${userLabel}, User-Agent: ${userAgent}`)
|
||||||
|
|
||||||
|
res.status(429).json({
|
||||||
|
error: config.message
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -22,61 +108,49 @@ class RateLimiterFactory {
|
|||||||
return this.authRateLimiter
|
return this.authRateLimiter
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable by setting max to 0
|
const config = this.getLimiterConfig()
|
||||||
if (process.env.RATE_LIMIT_AUTH_MAX === '0') {
|
if (!config) {
|
||||||
this.authRateLimiter = (req, res, next) => next()
|
|
||||||
Logger.info(`[RateLimiterFactory] Authentication rate limiting disabled by ENV variable`)
|
Logger.info(`[RateLimiterFactory] Authentication rate limiting disabled by ENV variable`)
|
||||||
|
this.authRateLimiter = this.getDisabledLimiter()
|
||||||
return this.authRateLimiter
|
return this.authRateLimiter
|
||||||
}
|
}
|
||||||
|
|
||||||
let windowMs = RateLimiterFactory.DEFAULT_WINDOW_MS
|
this.logCustomLimiterConfig(config)
|
||||||
if (parseInt(process.env.RATE_LIMIT_AUTH_WINDOW) > 0) {
|
|
||||||
windowMs = parseInt(process.env.RATE_LIMIT_AUTH_WINDOW)
|
|
||||||
if (windowMs !== RateLimiterFactory.DEFAULT_WINDOW_MS) {
|
|
||||||
Logger.info(`[RateLimiterFactory] Authentication rate limiting window set to ${windowMs}ms by ENV variable`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let max = RateLimiterFactory.DEFAULT_MAX
|
// One process-wide bucket of failed local logins. Do not key on client IP headers.
|
||||||
if (parseInt(process.env.RATE_LIMIT_AUTH_MAX) > 0) {
|
this.authRateLimiter = this.createLimiter(config, () => RateLimiterFactory.LOCAL_LOGIN_KEY)
|
||||||
max = parseInt(process.env.RATE_LIMIT_AUTH_MAX)
|
|
||||||
if (max !== RateLimiterFactory.DEFAULT_MAX) {
|
|
||||||
Logger.info(`[RateLimiterFactory] Authentication rate limiting max set to ${max} by ENV variable`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let message = 'Too many authentication requests'
|
Logger.debug(`[RateLimiterFactory] Created auth rate limiter: ${config.max} failed attempts per ${config.windowMs / 1000 / 60} minutes`)
|
||||||
if (process.env.RATE_LIMIT_AUTH_MESSAGE) {
|
|
||||||
message = process.env.RATE_LIMIT_AUTH_MESSAGE
|
|
||||||
}
|
|
||||||
|
|
||||||
this.authRateLimiter = rateLimit({
|
|
||||||
windowMs,
|
|
||||||
max,
|
|
||||||
standardHeaders: true,
|
|
||||||
legacyHeaders: false,
|
|
||||||
keyGenerator: (req) => {
|
|
||||||
// Override keyGenerator to handle proxy IPs
|
|
||||||
return requestIp.getClientIp(req) || req.ip
|
|
||||||
},
|
|
||||||
handler: (req, res) => {
|
|
||||||
const userAgent = req.get('User-Agent') || 'Unknown'
|
|
||||||
const endpoint = req.path
|
|
||||||
const method = req.method
|
|
||||||
const ip = requestIp.getClientIp(req) || req.ip
|
|
||||||
|
|
||||||
Logger.warn(`[RateLimiter] Rate limit exceeded - IP: ${ip}, Endpoint: ${method} ${endpoint}, User-Agent: ${userAgent}`)
|
|
||||||
|
|
||||||
res.status(429).json({
|
|
||||||
error: message
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
Logger.debug(`[RateLimiterFactory] Created auth rate limiter: ${max} attempts per ${windowMs / 1000 / 60} minutes`)
|
|
||||||
|
|
||||||
return this.authRateLimiter
|
return this.authRateLimiter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Failed current-password checks on PATCH /me/password, keyed by the authenticated user.
|
||||||
|
* @returns {RateLimitRequestHandler}
|
||||||
|
*/
|
||||||
|
getPasswordChangeRateLimiter() {
|
||||||
|
if (this.passwordChangeRateLimiter) {
|
||||||
|
return this.passwordChangeRateLimiter
|
||||||
|
}
|
||||||
|
|
||||||
|
const config = this.getLimiterConfig()
|
||||||
|
if (!config) {
|
||||||
|
this.passwordChangeRateLimiter = this.getDisabledLimiter()
|
||||||
|
return this.passwordChangeRateLimiter
|
||||||
|
}
|
||||||
|
|
||||||
|
this.logCustomLimiterConfig(config)
|
||||||
|
|
||||||
|
this.passwordChangeRateLimiter = this.createLimiter(config, (req) => {
|
||||||
|
const userId = req.user?.id
|
||||||
|
return userId ? String(userId) : RateLimiterFactory.UNKNOWN_USER_KEY
|
||||||
|
})
|
||||||
|
|
||||||
|
Logger.debug(`[RateLimiterFactory] Created password change rate limiter: ${config.max} failed attempts per ${config.windowMs / 1000 / 60} minutes`)
|
||||||
|
|
||||||
|
return this.passwordChangeRateLimiter
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = new RateLimiterFactory()
|
module.exports = new RateLimiterFactory()
|
||||||
@@ -39,6 +39,16 @@ describe('TokenManager', () => {
|
|||||||
describe('jwtAuthCheck', () => {
|
describe('jwtAuthCheck', () => {
|
||||||
const user = { id: userId, username: 'testuser', isActive: true }
|
const user = { id: userId, username: 'testuser', isActive: true }
|
||||||
|
|
||||||
|
it('rejects legacy API tokens that have no type or expiration', async () => {
|
||||||
|
const legacyToken = jwt.sign({ userId, username: 'testuser' }, secret)
|
||||||
|
const decoded = jwt.verify(legacyToken, secret)
|
||||||
|
const done = sinon.spy()
|
||||||
|
|
||||||
|
await tokenManager.jwtAuthCheck(decoded, done)
|
||||||
|
|
||||||
|
expect(done.calledWith(null, null)).to.be.true
|
||||||
|
})
|
||||||
|
|
||||||
it('rejects refresh tokens for API auth', async () => {
|
it('rejects refresh tokens for API auth', async () => {
|
||||||
const refreshToken = tokenManager.generateRefreshToken(user)
|
const refreshToken = tokenManager.generateRefreshToken(user)
|
||||||
const decoded = jwt.verify(refreshToken, secret)
|
const decoded = jwt.verify(refreshToken, secret)
|
||||||
|
|||||||
@@ -0,0 +1,139 @@
|
|||||||
|
const { expect } = require('chai')
|
||||||
|
const { Sequelize } = require('sequelize')
|
||||||
|
const sinon = require('sinon')
|
||||||
|
|
||||||
|
const Database = require('../../../server/Database')
|
||||||
|
const AuthorController = require('../../../server/controllers/AuthorController')
|
||||||
|
const AuthorFinder = require('../../../server/finders/AuthorFinder')
|
||||||
|
const Logger = require('../../../server/Logger')
|
||||||
|
|
||||||
|
const unsafeDescription = '<p>Hello</p><script>alert(1)</script><img src="x" onerror="alert(document.domain)"><a href="https://example.com">link</a>'
|
||||||
|
const safeDescription = '<p>Hello</p><a href="https://example.com">link</a>'
|
||||||
|
|
||||||
|
describe('AuthorController', () => {
|
||||||
|
beforeEach(async () => {
|
||||||
|
global.ServerSettings = {}
|
||||||
|
Database.sequelize = new Sequelize({ dialect: 'sqlite', storage: ':memory:', logging: false })
|
||||||
|
Database.sequelize.uppercaseFirst = (str) => (str ? `${str[0].toUpperCase()}${str.substr(1)}` : '')
|
||||||
|
await Database.buildModels()
|
||||||
|
|
||||||
|
sinon.stub(Logger, 'info')
|
||||||
|
sinon.stub(Logger, 'debug')
|
||||||
|
})
|
||||||
|
|
||||||
|
afterEach(async () => {
|
||||||
|
sinon.restore()
|
||||||
|
|
||||||
|
// Clear all tables
|
||||||
|
await Database.sequelize.sync({ force: true })
|
||||||
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} [description]
|
||||||
|
*/
|
||||||
|
async function createAuthor(description) {
|
||||||
|
const library = await Database.libraryModel.create({ name: 'Test Library', mediaType: 'book' })
|
||||||
|
return Database.authorModel.create({
|
||||||
|
name: 'Test Author',
|
||||||
|
libraryId: library.id,
|
||||||
|
description: description || null
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('update', () => {
|
||||||
|
it('should store and return a sanitized description', async () => {
|
||||||
|
const author = await createAuthor()
|
||||||
|
const fakeReq = {
|
||||||
|
body: {
|
||||||
|
description: unsafeDescription
|
||||||
|
},
|
||||||
|
author
|
||||||
|
}
|
||||||
|
const fakeRes = {
|
||||||
|
status: sinon.stub().returnsThis(),
|
||||||
|
send: sinon.spy(),
|
||||||
|
json: sinon.spy()
|
||||||
|
}
|
||||||
|
|
||||||
|
await AuthorController.update(fakeReq, fakeRes)
|
||||||
|
|
||||||
|
expect(fakeRes.json.calledOnce).to.be.true
|
||||||
|
const response = fakeRes.json.firstCall.args[0]
|
||||||
|
expect(response.updated).to.be.true
|
||||||
|
expect(response.author.description).to.equal(safeDescription)
|
||||||
|
expect(response.author.description).to.not.include('script')
|
||||||
|
expect(response.author.description).to.not.include('onerror')
|
||||||
|
|
||||||
|
const stored = await Database.authorModel.findByPk(author.id)
|
||||||
|
expect(stored.description).to.equal(safeDescription)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should store null when sanitizing leaves an empty description', async () => {
|
||||||
|
const author = await createAuthor('<p>Existing</p>')
|
||||||
|
const fakeReq = {
|
||||||
|
body: {
|
||||||
|
description: '<script>alert(1)</script><img src="x" onerror="alert(1)">'
|
||||||
|
},
|
||||||
|
author
|
||||||
|
}
|
||||||
|
const fakeRes = {
|
||||||
|
json: sinon.spy()
|
||||||
|
}
|
||||||
|
|
||||||
|
await AuthorController.update(fakeReq, fakeRes)
|
||||||
|
|
||||||
|
const response = fakeRes.json.firstCall.args[0]
|
||||||
|
expect(response.author.description).to.equal(null)
|
||||||
|
|
||||||
|
const stored = await Database.authorModel.findByPk(author.id)
|
||||||
|
expect(stored.description).to.equal(null)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('toOldJSON', () => {
|
||||||
|
it('should sanitize a stored description without rewriting the row', async () => {
|
||||||
|
const author = await createAuthor(unsafeDescription)
|
||||||
|
|
||||||
|
expect(author.toOldJSON().description).to.equal(safeDescription)
|
||||||
|
expect(author.description).to.equal(unsafeDescription)
|
||||||
|
|
||||||
|
const stored = await Database.authorModel.findByPk(author.id)
|
||||||
|
expect(stored.description).to.equal(unsafeDescription)
|
||||||
|
expect(stored.toOldJSON().description).to.equal(safeDescription)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('match', () => {
|
||||||
|
it('should store the sanitized Audnexus description', async () => {
|
||||||
|
const author = await createAuthor()
|
||||||
|
sinon.stub(AuthorFinder, 'findAuthorByASIN').resolves({
|
||||||
|
asin: 'B00TEST000',
|
||||||
|
name: 'Test Author',
|
||||||
|
description: '<p>Bio</p><script>alert(1)</script>',
|
||||||
|
image: null
|
||||||
|
})
|
||||||
|
|
||||||
|
const fakeReq = {
|
||||||
|
body: {
|
||||||
|
asin: 'B00TEST000'
|
||||||
|
},
|
||||||
|
author
|
||||||
|
}
|
||||||
|
const fakeRes = {
|
||||||
|
status: sinon.stub().returnsThis(),
|
||||||
|
send: sinon.spy(),
|
||||||
|
json: sinon.spy()
|
||||||
|
}
|
||||||
|
|
||||||
|
await AuthorController.match(fakeReq, fakeRes)
|
||||||
|
|
||||||
|
expect(fakeRes.json.calledOnce).to.be.true
|
||||||
|
const response = fakeRes.json.firstCall.args[0]
|
||||||
|
expect(response.updated).to.be.true
|
||||||
|
expect(response.author.description).to.equal('<p>Bio</p>')
|
||||||
|
|
||||||
|
const stored = await Database.authorModel.findByPk(author.id)
|
||||||
|
expect(stored.description).to.equal('<p>Bio</p>')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
const { expect } = require('chai')
|
||||||
|
const { Sequelize } = require('sequelize')
|
||||||
|
const sinon = require('sinon')
|
||||||
|
|
||||||
|
const Database = require('../../../server/Database')
|
||||||
|
const Logger = require('../../../server/Logger')
|
||||||
|
const CollectionController = require('../../../server/controllers/CollectionController')
|
||||||
|
|
||||||
|
describe('CollectionController', () => {
|
||||||
|
/** @type {import('../../../server/models/Collection')} */
|
||||||
|
let collection
|
||||||
|
/** @type {import('../../../server/models/LibraryItem')} */
|
||||||
|
let libraryItem
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
global.ServerSettings = {}
|
||||||
|
Database.sequelize = new Sequelize({ dialect: 'sqlite', storage: ':memory:', logging: false })
|
||||||
|
Database.sequelize.uppercaseFirst = (str) => (str ? `${str[0].toUpperCase()}${str.substr(1)}` : '')
|
||||||
|
await Database.buildModels()
|
||||||
|
|
||||||
|
sinon.stub(Logger, 'info')
|
||||||
|
sinon.stub(Logger, 'debug')
|
||||||
|
sinon.stub(Logger, 'warn')
|
||||||
|
sinon.stub(Logger, 'error')
|
||||||
|
|
||||||
|
const library = await Database.libraryModel.create({ name: 'Test Library', mediaType: 'book' })
|
||||||
|
const libraryFolder = await Database.libraryFolderModel.create({ path: '/test-lib', libraryId: library.id })
|
||||||
|
const book = await Database.bookModel.create({ title: 'Test Book', audioFiles: [], tags: [], narrators: [], genres: [], chapters: [] })
|
||||||
|
libraryItem = await Database.libraryItemModel.create({
|
||||||
|
path: '/test-lib/book',
|
||||||
|
isFile: false,
|
||||||
|
libraryFiles: [],
|
||||||
|
mediaId: book.id,
|
||||||
|
mediaType: 'book',
|
||||||
|
libraryId: library.id,
|
||||||
|
libraryFolderId: libraryFolder.id
|
||||||
|
})
|
||||||
|
collection = await Database.collectionModel.create({ name: 'Test Collection', libraryId: library.id })
|
||||||
|
await Database.collectionBookModel.create({ collectionId: collection.id, bookId: book.id, order: 1 })
|
||||||
|
})
|
||||||
|
|
||||||
|
afterEach(async () => {
|
||||||
|
sinon.restore()
|
||||||
|
await Database.sequelize.sync({ force: true })
|
||||||
|
})
|
||||||
|
|
||||||
|
it('does not throw when the collectionBook link already exists', async () => {
|
||||||
|
sinon.stub(collection, 'getCollectionBooks').resolves([])
|
||||||
|
|
||||||
|
const res = {
|
||||||
|
statusCode: null,
|
||||||
|
body: null,
|
||||||
|
status(code) {
|
||||||
|
this.statusCode = code
|
||||||
|
return this
|
||||||
|
},
|
||||||
|
send(body) {
|
||||||
|
this.body = body
|
||||||
|
return this
|
||||||
|
},
|
||||||
|
json(body) {
|
||||||
|
this.body = body
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await CollectionController.addBook({ body: { id: libraryItem.id }, collection, user: { id: 'user-id' } }, res)
|
||||||
|
|
||||||
|
expect(res.statusCode).to.equal(400)
|
||||||
|
expect(res.body).to.equal('Book already in collection')
|
||||||
|
const links = await Database.collectionBookModel.findAll({ where: { collectionId: collection.id, bookId: libraryItem.mediaId } })
|
||||||
|
expect(links).to.have.lengthOf(1)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('does not throw when a batch includes a book already in the collection', async () => {
|
||||||
|
const book = await Database.bookModel.create({ title: 'Second Book', audioFiles: [], tags: [], narrators: [], genres: [], chapters: [] })
|
||||||
|
const secondItem = await Database.libraryItemModel.create({
|
||||||
|
path: '/test-lib/book-2',
|
||||||
|
isFile: false,
|
||||||
|
libraryFiles: [],
|
||||||
|
mediaId: book.id,
|
||||||
|
mediaType: 'book',
|
||||||
|
libraryId: libraryItem.libraryId,
|
||||||
|
libraryFolderId: libraryItem.libraryFolderId
|
||||||
|
})
|
||||||
|
sinon.stub(collection, 'getCollectionBooks').resolves([])
|
||||||
|
sinon.stub(collection, 'getOldJsonExpanded').resolves(null)
|
||||||
|
|
||||||
|
const res = {
|
||||||
|
statusCode: null,
|
||||||
|
body: null,
|
||||||
|
status(code) {
|
||||||
|
this.statusCode = code
|
||||||
|
return this
|
||||||
|
},
|
||||||
|
send(body) {
|
||||||
|
this.body = body
|
||||||
|
return this
|
||||||
|
},
|
||||||
|
json(body) {
|
||||||
|
this.body = body
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await CollectionController.addBatch({ body: { books: [libraryItem.id, secondItem.id] }, collection, user: { id: 'user-id' } }, res)
|
||||||
|
|
||||||
|
const existingLinks = await Database.collectionBookModel.findAll({ where: { collectionId: collection.id, bookId: libraryItem.mediaId } })
|
||||||
|
expect(existingLinks).to.have.lengthOf(1)
|
||||||
|
const newLinks = await Database.collectionBookModel.findAll({ where: { collectionId: collection.id, bookId: secondItem.mediaId } })
|
||||||
|
expect(newLinks).to.have.lengthOf(1)
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
const { expect } = require('chai')
|
||||||
|
const sinon = require('sinon')
|
||||||
|
const fs = require('graceful-fs')
|
||||||
|
const os = require('os')
|
||||||
|
const path = require('path')
|
||||||
|
const fsExtra = require('../../server/libs/fsExtra')
|
||||||
|
|
||||||
|
describe('fsExtra copy fallback', () => {
|
||||||
|
let dir
|
||||||
|
let source
|
||||||
|
let dest
|
||||||
|
let contents
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
dir = fs.mkdtempSync(path.join(os.tmpdir(), 'abs-copy-'))
|
||||||
|
source = path.join(dir, 'source')
|
||||||
|
dest = path.join(dir, 'dest')
|
||||||
|
contents = Buffer.alloc(2 * 1024 * 1024 + 17, 0x61)
|
||||||
|
fs.writeFileSync(source, contents)
|
||||||
|
})
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
sinon.restore()
|
||||||
|
fs.rmSync(dir, { recursive: true, force: true })
|
||||||
|
})
|
||||||
|
|
||||||
|
it('copies through streams when asynchronous copyFile is denied', async () => {
|
||||||
|
sinon.stub(fs, 'copyFile').callsFake((src, target, callback) => {
|
||||||
|
callback(Object.assign(new Error('copyfile denied'), { code: 'EPERM' }))
|
||||||
|
})
|
||||||
|
|
||||||
|
await fsExtra.copy(source, dest)
|
||||||
|
|
||||||
|
expect(fs.readFileSync(dest).equals(contents)).to.be.true
|
||||||
|
})
|
||||||
|
|
||||||
|
it('moves across devices when asynchronous copyFile is denied', async () => {
|
||||||
|
sinon.stub(fs, 'rename').callsFake((src, target, callback) => {
|
||||||
|
callback(Object.assign(new Error('cross-device link'), { code: 'EXDEV' }))
|
||||||
|
})
|
||||||
|
sinon.stub(fs, 'copyFile').callsFake((src, target, callback) => {
|
||||||
|
callback(Object.assign(new Error('copyfile denied'), { code: 'EPERM' }))
|
||||||
|
})
|
||||||
|
|
||||||
|
await fsExtra.move(source, dest)
|
||||||
|
|
||||||
|
expect(fs.existsSync(source)).to.be.false
|
||||||
|
expect(fs.readFileSync(dest).equals(contents)).to.be.true
|
||||||
|
})
|
||||||
|
|
||||||
|
it('moves over an existing file when asynchronous rename and copyFile are denied', async () => {
|
||||||
|
fs.writeFileSync(dest, 'old database')
|
||||||
|
sinon.stub(fs, 'rename').callsFake((src, target, callback) => {
|
||||||
|
callback(Object.assign(new Error('rename denied'), { code: 'EPERM' }))
|
||||||
|
})
|
||||||
|
sinon.stub(fs, 'copyFile').callsFake((src, target, callback) => {
|
||||||
|
callback(Object.assign(new Error('copyfile denied'), { code: 'EPERM' }))
|
||||||
|
})
|
||||||
|
|
||||||
|
await fsExtra.move(source, dest, { overwrite: true })
|
||||||
|
|
||||||
|
expect(fs.existsSync(source)).to.be.false
|
||||||
|
expect(fs.readFileSync(dest).equals(contents)).to.be.true
|
||||||
|
})
|
||||||
|
|
||||||
|
it('keeps the source when a move cannot copy it', async () => {
|
||||||
|
sinon.stub(fs, 'rename').callsFake((src, target, callback) => {
|
||||||
|
callback(Object.assign(new Error('rename denied'), { code: 'EPERM' }))
|
||||||
|
})
|
||||||
|
sinon.stub(fs, 'copyFile').callsFake((src, target, callback) => {
|
||||||
|
callback(Object.assign(new Error('read failed'), { code: 'EIO' }))
|
||||||
|
})
|
||||||
|
|
||||||
|
try {
|
||||||
|
await fsExtra.move(source, dest)
|
||||||
|
expect.fail('Expected move to fail')
|
||||||
|
} catch (error) {
|
||||||
|
expect(error.code).to.equal('EIO')
|
||||||
|
}
|
||||||
|
expect(fs.readFileSync(source).equals(contents)).to.be.true
|
||||||
|
})
|
||||||
|
|
||||||
|
it('propagates unrelated copy errors', async () => {
|
||||||
|
sinon.stub(fs, 'copyFile').callsFake((src, target, callback) => {
|
||||||
|
callback(Object.assign(new Error('file missing'), { code: 'ENOENT' }))
|
||||||
|
})
|
||||||
|
|
||||||
|
try {
|
||||||
|
await fsExtra.copy(source, dest)
|
||||||
|
expect.fail('Expected copy to fail')
|
||||||
|
} catch (error) {
|
||||||
|
expect(error.code).to.equal('ENOENT')
|
||||||
|
}
|
||||||
|
expect(fs.existsSync(dest)).to.be.false
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
const { expect } = require('chai')
|
||||||
|
const { Sequelize } = require('sequelize')
|
||||||
|
const sinon = require('sinon')
|
||||||
|
|
||||||
|
const Database = require('../../../server/Database')
|
||||||
|
const Logger = require('../../../server/Logger')
|
||||||
|
|
||||||
|
describe('Book author and series updates', () => {
|
||||||
|
/** @type {import('../../../server/models/Library')} */
|
||||||
|
let library
|
||||||
|
/** @type {import('../../../server/models/Book')} */
|
||||||
|
let book
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
global.ServerSettings = {}
|
||||||
|
Database.sequelize = new Sequelize({ dialect: 'sqlite', storage: ':memory:', logging: false })
|
||||||
|
Database.sequelize.uppercaseFirst = (str) => (str ? `${str[0].toUpperCase()}${str.substr(1)}` : '')
|
||||||
|
await Database.buildModels()
|
||||||
|
|
||||||
|
sinon.stub(Logger, 'info')
|
||||||
|
sinon.stub(Logger, 'debug')
|
||||||
|
sinon.stub(Logger, 'warn')
|
||||||
|
sinon.stub(Logger, 'error')
|
||||||
|
|
||||||
|
library = await Database.libraryModel.create({ name: 'Test Library', mediaType: 'book' })
|
||||||
|
book = await Database.bookModel.create({ title: 'Test Book', audioFiles: [], tags: [], narrators: [], genres: [], chapters: [] })
|
||||||
|
book.authors = []
|
||||||
|
book.series = []
|
||||||
|
})
|
||||||
|
|
||||||
|
afterEach(async () => {
|
||||||
|
sinon.restore()
|
||||||
|
await Database.sequelize.sync({ force: true })
|
||||||
|
})
|
||||||
|
|
||||||
|
it('does not throw when the bookSeries link already exists', async () => {
|
||||||
|
const series = await Database.seriesModel.create({ name: 'Crescent City', libraryId: library.id })
|
||||||
|
await Database.bookSeriesModel.create({ bookId: book.id, seriesId: series.id, sequence: '3' })
|
||||||
|
|
||||||
|
const result = await book.updateSeriesFromRequest([{ name: 'Crescent City', sequence: '3' }], library.id)
|
||||||
|
|
||||||
|
expect(result.hasUpdates).to.be.false
|
||||||
|
const links = await Database.bookSeriesModel.findAll({ where: { bookId: book.id, seriesId: series.id } })
|
||||||
|
expect(links).to.have.lengthOf(1)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('reuses an existing series when create hits the name unique constraint', async () => {
|
||||||
|
const series = await Database.seriesModel.create({ name: 'Crescent City', libraryId: library.id })
|
||||||
|
sinon.stub(Database.seriesModel, 'getByNameAndLibrary').resolves(null)
|
||||||
|
|
||||||
|
const result = await book.updateSeriesFromRequest([{ name: 'Crescent City', sequence: '3' }], library.id)
|
||||||
|
|
||||||
|
expect(result.seriesAdded).to.have.lengthOf(1)
|
||||||
|
expect(result.seriesAdded[0].id).to.equal(series.id)
|
||||||
|
const seriesRows = await Database.seriesModel.findAll({ where: { libraryId: library.id, name: 'Crescent City' } })
|
||||||
|
expect(seriesRows).to.have.lengthOf(1)
|
||||||
|
const links = await Database.bookSeriesModel.findAll({ where: { bookId: book.id, seriesId: series.id } })
|
||||||
|
expect(links).to.have.lengthOf(1)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('does not throw when the bookAuthor link already exists', async () => {
|
||||||
|
const author = await Database.authorModel.create({ name: 'Sarah Maas', libraryId: library.id })
|
||||||
|
await Database.bookAuthorModel.create({ bookId: book.id, authorId: author.id })
|
||||||
|
|
||||||
|
const result = await book.updateAuthorsFromRequest(['Sarah Maas'], library.id)
|
||||||
|
|
||||||
|
expect(result.authorsAdded).to.have.lengthOf(0)
|
||||||
|
const links = await Database.bookAuthorModel.findAll({ where: { bookId: book.id, authorId: author.id } })
|
||||||
|
expect(links).to.have.lengthOf(1)
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
const iTunes = require('../../../server/providers/iTunes')
|
||||||
|
const { expect } = require('chai')
|
||||||
|
|
||||||
|
describe('iTunes', () => {
|
||||||
|
let itunes
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
itunes = new iTunes()
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('cleanAudiobook', () => {
|
||||||
|
function authorFrom(artistName) {
|
||||||
|
return itunes.cleanAudiobook({ artistName }).author
|
||||||
|
}
|
||||||
|
|
||||||
|
it('should return an empty string if artistName is missing', () => {
|
||||||
|
expect(authorFrom()).to.equal('')
|
||||||
|
expect(authorFrom('')).to.equal('')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should keep a single author without commas', () => {
|
||||||
|
expect(authorFrom('Joy Fielding')).to.equal('Joy Fielding')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should strip commas from a single author with a credential', () => {
|
||||||
|
expect(authorFrom('Rick Hanson, PhD')).to.equal('Rick Hanson PhD')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should split two authors joined by an ampersand', () => {
|
||||||
|
expect(authorFrom('Name1 & Name2')).to.equal('Name1, Name2')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should split three authors using commas and an ampersand', () => {
|
||||||
|
expect(authorFrom('Keltie Knight, Becca Tobin & Jac Vanek')).to.equal('Keltie Knight, Becca Tobin, Jac Vanek')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should glue a one-word credential onto the previous author before the ampersand', () => {
|
||||||
|
expect(authorFrom('Rick Hanson, PhD & Jane Doe')).to.equal('Rick Hanson PhD, Jane Doe')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should glue several one-word credentials in a row', () => {
|
||||||
|
expect(authorFrom('Rick Hanson, PhD, MD & Jane Doe')).to.equal('Rick Hanson PhD MD, Jane Doe')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should strip commas from the last author', () => {
|
||||||
|
expect(authorFrom('Rick Hanson & Jane Doe, PhD')).to.equal('Rick Hanson, Jane Doe PhD')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should glue credentials before the ampersand and strip commas from the last author', () => {
|
||||||
|
expect(authorFrom('Rick Hanson, PhD & Jane Doe, PhD')).to.equal('Rick Hanson PhD, Jane Doe PhD')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -0,0 +1,123 @@
|
|||||||
|
const { expect } = require('chai')
|
||||||
|
const { Sequelize } = require('sequelize')
|
||||||
|
const sinon = require('sinon')
|
||||||
|
|
||||||
|
const Database = require('../../../server/Database')
|
||||||
|
const Logger = require('../../../server/Logger')
|
||||||
|
const BookScanner = require('../../../server/scanner/BookScanner')
|
||||||
|
const LibraryScan = require('../../../server/scanner/LibraryScan')
|
||||||
|
|
||||||
|
describe('BookScanner.rescanExistingBookLibraryItem', () => {
|
||||||
|
/** @type {import('../../../server/models/Library')} */
|
||||||
|
let library
|
||||||
|
/** @type {import('../../../server/models/LibraryItem')} */
|
||||||
|
let libraryItem
|
||||||
|
/** @type {import('../../../server/models/Book')} */
|
||||||
|
let book
|
||||||
|
/** @type {LibraryScan} */
|
||||||
|
let libraryScan
|
||||||
|
|
||||||
|
const librarySettings = { audiobooksOnly: true }
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
global.ServerSettings = {}
|
||||||
|
Database.sequelize = new Sequelize({ dialect: 'sqlite', storage: ':memory:', logging: false })
|
||||||
|
Database.sequelize.uppercaseFirst = (str) => (str ? `${str[0].toUpperCase()}${str.substr(1)}` : '')
|
||||||
|
await Database.buildModels()
|
||||||
|
|
||||||
|
sinon.stub(Logger, 'info')
|
||||||
|
sinon.stub(Logger, 'debug')
|
||||||
|
sinon.stub(Logger, 'warn')
|
||||||
|
sinon.stub(Logger, 'error')
|
||||||
|
|
||||||
|
library = await Database.libraryModel.create({ name: 'Test Library', mediaType: 'book' })
|
||||||
|
const libraryFolder = await Database.libraryFolderModel.create({ path: '/test', libraryId: library.id })
|
||||||
|
book = await Database.bookModel.create({ title: 'Test Book', audioFiles: [], tags: [], narrators: [], genres: [], chapters: [], coverPath: '/cover.jpg' })
|
||||||
|
libraryItem = await Database.libraryItemModel.create({
|
||||||
|
libraryFiles: [],
|
||||||
|
mediaId: book.id,
|
||||||
|
mediaType: 'book',
|
||||||
|
libraryId: library.id,
|
||||||
|
libraryFolderId: libraryFolder.id
|
||||||
|
})
|
||||||
|
libraryItem.isMissing = true
|
||||||
|
libraryItem.isFile = true
|
||||||
|
// Stale associations: the rows exist in the database, but this scan's loaded book does not see them
|
||||||
|
sinon.stub(libraryItem, 'getMedia').callsFake(async () => {
|
||||||
|
book.authors = []
|
||||||
|
book.series = []
|
||||||
|
book.audioFiles = []
|
||||||
|
book.coverPath = '/cover.jpg'
|
||||||
|
return book
|
||||||
|
})
|
||||||
|
|
||||||
|
libraryScan = new LibraryScan()
|
||||||
|
libraryScan.library = library
|
||||||
|
})
|
||||||
|
|
||||||
|
afterEach(async () => {
|
||||||
|
sinon.restore()
|
||||||
|
await Database.sequelize.sync({ force: true })
|
||||||
|
})
|
||||||
|
|
||||||
|
function scanData() {
|
||||||
|
return {
|
||||||
|
hasAudioFileChanges: false,
|
||||||
|
audioLibraryFiles: [],
|
||||||
|
imageLibraryFiles: [],
|
||||||
|
imageLibraryFilesRemoved: [],
|
||||||
|
imageLibraryFilesModified: [],
|
||||||
|
ebookLibraryFiles: [],
|
||||||
|
ebookLibraryFilesModified: [],
|
||||||
|
libraryId: library.id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
it('does not throw when the bookSeries link already exists', async () => {
|
||||||
|
const series = await Database.seriesModel.create({ name: 'Crescent City', libraryId: library.id })
|
||||||
|
await Database.bookSeriesModel.create({ bookId: book.id, seriesId: series.id, sequence: '3' })
|
||||||
|
sinon.stub(BookScanner, 'getBookMetadataFromScanData').resolves({
|
||||||
|
title: 'Test Book',
|
||||||
|
authors: [],
|
||||||
|
series: [{ name: 'Crescent City', sequence: '3' }]
|
||||||
|
})
|
||||||
|
|
||||||
|
const result = await BookScanner.rescanExistingBookLibraryItem(libraryItem, scanData(), librarySettings, libraryScan)
|
||||||
|
|
||||||
|
expect(result.wasUpdated).to.be.true
|
||||||
|
const links = await Database.bookSeriesModel.findAll({ where: { bookId: book.id, seriesId: series.id } })
|
||||||
|
expect(links).to.have.lengthOf(1)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('reuses an existing series when create hits the name unique constraint', async () => {
|
||||||
|
const series = await Database.seriesModel.create({ name: 'Crescent City', libraryId: library.id })
|
||||||
|
sinon.stub(Database, 'getSeriesIdByName').resolves(null)
|
||||||
|
sinon.stub(BookScanner, 'getBookMetadataFromScanData').resolves({
|
||||||
|
title: 'Test Book',
|
||||||
|
authors: [],
|
||||||
|
series: [{ name: 'Crescent City', sequence: '3' }]
|
||||||
|
})
|
||||||
|
|
||||||
|
await BookScanner.rescanExistingBookLibraryItem(libraryItem, scanData(), librarySettings, libraryScan)
|
||||||
|
|
||||||
|
const seriesRows = await Database.seriesModel.findAll({ where: { libraryId: library.id, name: 'Crescent City' } })
|
||||||
|
expect(seriesRows).to.have.lengthOf(1)
|
||||||
|
const links = await Database.bookSeriesModel.findAll({ where: { bookId: book.id, seriesId: series.id } })
|
||||||
|
expect(links).to.have.lengthOf(1)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('does not throw when the bookAuthor link already exists', async () => {
|
||||||
|
const author = await Database.authorModel.create({ name: 'Sarah Maas', libraryId: library.id })
|
||||||
|
await Database.bookAuthorModel.create({ bookId: book.id, authorId: author.id })
|
||||||
|
sinon.stub(BookScanner, 'getBookMetadataFromScanData').resolves({
|
||||||
|
title: 'Test Book',
|
||||||
|
authors: ['Sarah Maas'],
|
||||||
|
series: []
|
||||||
|
})
|
||||||
|
|
||||||
|
await BookScanner.rescanExistingBookLibraryItem(libraryItem, scanData(), librarySettings, libraryScan)
|
||||||
|
|
||||||
|
const links = await Database.bookAuthorModel.findAll({ where: { bookId: book.id, authorId: author.id } })
|
||||||
|
expect(links).to.have.lengthOf(1)
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
const { expect } = require('chai')
|
||||||
|
const { Sequelize } = require('sequelize')
|
||||||
|
const sinon = require('sinon')
|
||||||
|
|
||||||
|
const Database = require('../../../server/Database')
|
||||||
|
const Logger = require('../../../server/Logger')
|
||||||
|
const Scanner = require('../../../server/scanner/Scanner')
|
||||||
|
|
||||||
|
describe('Scanner.quickMatchBookBuildUpdatePayload', () => {
|
||||||
|
/** @type {import('../../../server/models/Library')} */
|
||||||
|
let library
|
||||||
|
/** @type {import('../../../server/models/LibraryItem')} */
|
||||||
|
let libraryItem
|
||||||
|
/** @type {import('../../../server/models/Book')} */
|
||||||
|
let book
|
||||||
|
|
||||||
|
const apiRouterCtx = {
|
||||||
|
checkRemoveAuthorsWithNoBooks: sinon.stub().resolves(),
|
||||||
|
checkRemoveEmptySeries: sinon.stub().resolves()
|
||||||
|
}
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
global.ServerSettings = {}
|
||||||
|
Database.sequelize = new Sequelize({ dialect: 'sqlite', storage: ':memory:', logging: false })
|
||||||
|
Database.sequelize.uppercaseFirst = (str) => (str ? `${str[0].toUpperCase()}${str.substr(1)}` : '')
|
||||||
|
await Database.buildModels()
|
||||||
|
|
||||||
|
sinon.stub(Logger, 'info')
|
||||||
|
sinon.stub(Logger, 'debug')
|
||||||
|
sinon.stub(Logger, 'warn')
|
||||||
|
sinon.stub(Logger, 'error')
|
||||||
|
|
||||||
|
library = await Database.libraryModel.create({ name: 'Test Library', mediaType: 'book' })
|
||||||
|
const libraryFolder = await Database.libraryFolderModel.create({ path: '/test', libraryId: library.id })
|
||||||
|
book = await Database.bookModel.create({ title: 'Test Book', audioFiles: [], tags: [], narrators: [], genres: [], chapters: [] })
|
||||||
|
libraryItem = await Database.libraryItemModel.create({
|
||||||
|
libraryFiles: [],
|
||||||
|
mediaId: book.id,
|
||||||
|
mediaType: 'book',
|
||||||
|
libraryId: library.id,
|
||||||
|
libraryFolderId: libraryFolder.id
|
||||||
|
})
|
||||||
|
libraryItem.media = book
|
||||||
|
// Stale in-memory associations: DB may already have links from a concurrent quick match
|
||||||
|
book.authors = []
|
||||||
|
book.series = []
|
||||||
|
})
|
||||||
|
|
||||||
|
afterEach(async () => {
|
||||||
|
sinon.restore()
|
||||||
|
await Database.sequelize.sync({ force: true })
|
||||||
|
})
|
||||||
|
|
||||||
|
it('does not throw when bookSeries link already exists from a concurrent quick match', async () => {
|
||||||
|
const series = await Database.seriesModel.create({ name: 'Crescent City', libraryId: library.id })
|
||||||
|
await Database.bookSeriesModel.create({ bookId: book.id, seriesId: series.id, sequence: '3' })
|
||||||
|
|
||||||
|
const result = await Scanner.quickMatchBookBuildUpdatePayload(
|
||||||
|
apiRouterCtx,
|
||||||
|
libraryItem,
|
||||||
|
{
|
||||||
|
series: [{ series: 'Crescent City', sequence: '3' }]
|
||||||
|
},
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
|
||||||
|
expect(result.hasSeriesUpdates).to.be.true
|
||||||
|
expect(libraryItem.media.series).to.have.lengthOf(1)
|
||||||
|
expect(libraryItem.media.series[0].id).to.equal(series.id)
|
||||||
|
expect(libraryItem.media.series[0].bookSeries).to.exist
|
||||||
|
expect(libraryItem.media.series[0].bookSeries.sequence).to.equal('3')
|
||||||
|
|
||||||
|
const links = await Database.bookSeriesModel.findAll({ where: { bookId: book.id, seriesId: series.id } })
|
||||||
|
expect(links).to.have.lengthOf(1)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('reuses an existing series when create hits the name unique constraint', async () => {
|
||||||
|
const series = await Database.seriesModel.create({ name: 'Crescent City', libraryId: library.id })
|
||||||
|
sinon.stub(Database.seriesModel, 'getByNameAndLibrary').resolves(null)
|
||||||
|
|
||||||
|
const result = await Scanner.quickMatchBookBuildUpdatePayload(
|
||||||
|
apiRouterCtx,
|
||||||
|
libraryItem,
|
||||||
|
{
|
||||||
|
series: [{ series: 'Crescent City', sequence: '3' }]
|
||||||
|
},
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
|
||||||
|
expect(result.hasSeriesUpdates).to.be.true
|
||||||
|
expect(libraryItem.media.series).to.have.lengthOf(1)
|
||||||
|
expect(libraryItem.media.series[0].id).to.equal(series.id)
|
||||||
|
|
||||||
|
const seriesRows = await Database.seriesModel.findAll({ where: { libraryId: library.id, name: 'Crescent City' } })
|
||||||
|
expect(seriesRows).to.have.lengthOf(1)
|
||||||
|
const links = await Database.bookSeriesModel.findAll({ where: { bookId: book.id, seriesId: series.id } })
|
||||||
|
expect(links).to.have.lengthOf(1)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('does not throw when bookAuthor link already exists from a concurrent quick match', async () => {
|
||||||
|
const author = await Database.authorModel.create({ name: 'Sarah Maas', libraryId: library.id })
|
||||||
|
await Database.bookAuthorModel.create({ bookId: book.id, authorId: author.id })
|
||||||
|
|
||||||
|
const result = await Scanner.quickMatchBookBuildUpdatePayload(
|
||||||
|
apiRouterCtx,
|
||||||
|
libraryItem,
|
||||||
|
{
|
||||||
|
author: ['Sarah Maas']
|
||||||
|
},
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
|
||||||
|
expect(result.hasAuthorUpdates).to.be.true
|
||||||
|
expect(libraryItem.media.authors).to.have.lengthOf(1)
|
||||||
|
expect(libraryItem.media.authors[0].id).to.equal(author.id)
|
||||||
|
|
||||||
|
const links = await Database.bookAuthorModel.findAll({ where: { bookId: book.id, authorId: author.id } })
|
||||||
|
expect(links).to.have.lengthOf(1)
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -0,0 +1,221 @@
|
|||||||
|
const { expect } = require('chai')
|
||||||
|
const express = require('express')
|
||||||
|
const fs = require('fs')
|
||||||
|
const http = require('http')
|
||||||
|
const os = require('os')
|
||||||
|
const path = require('path')
|
||||||
|
const sinon = require('sinon')
|
||||||
|
|
||||||
|
const Logger = require('../../../server/Logger')
|
||||||
|
const { fileUploadParser, requireUploadPermission, sweepUploadTempFiles } = require('../../../server/utils/fileUploadMiddleware')
|
||||||
|
|
||||||
|
function listTmpFiles(dir) {
|
||||||
|
if (!fs.existsSync(dir)) return []
|
||||||
|
return fs.readdirSync(dir).filter((name) => name.startsWith('tmp-'))
|
||||||
|
}
|
||||||
|
|
||||||
|
function sendMultipart(port, urlPath, extraHeaders = {}) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const boundary = '----AbsUploadTestBoundary'
|
||||||
|
const payload = [
|
||||||
|
`--${boundary}`,
|
||||||
|
'Content-Disposition: form-data; name="f"; filename="probe.txt"',
|
||||||
|
'Content-Type: text/plain',
|
||||||
|
'',
|
||||||
|
'probe',
|
||||||
|
`--${boundary}--`,
|
||||||
|
''
|
||||||
|
].join('\r\n')
|
||||||
|
|
||||||
|
const req = http.request(
|
||||||
|
{
|
||||||
|
hostname: '127.0.0.1',
|
||||||
|
port,
|
||||||
|
path: urlPath,
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': `multipart/form-data; boundary=${boundary}`,
|
||||||
|
'Content-Length': Buffer.byteLength(payload),
|
||||||
|
...extraHeaders
|
||||||
|
}
|
||||||
|
},
|
||||||
|
(res) => {
|
||||||
|
res.resume()
|
||||||
|
res.on('end', () => resolve(res.statusCode))
|
||||||
|
}
|
||||||
|
)
|
||||||
|
req.on('error', reject)
|
||||||
|
req.write(payload)
|
||||||
|
req.end()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function listen(app) {
|
||||||
|
const server = http.createServer(app)
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
server.listen(0, '127.0.0.1', () => {
|
||||||
|
resolve({ server, port: server.address().port })
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeServer(server) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
server.close((err) => (err ? reject(err) : resolve()))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async function waitFor(predicate, timeoutMs = 2000) {
|
||||||
|
const started = Date.now()
|
||||||
|
while (Date.now() - started < timeoutMs) {
|
||||||
|
if (predicate()) return
|
||||||
|
await new Promise((resolve) => setTimeout(resolve, 25))
|
||||||
|
}
|
||||||
|
throw new Error('Timed out waiting for condition')
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('fileUploadMiddleware', () => {
|
||||||
|
let metadataDir
|
||||||
|
let tmpDir
|
||||||
|
let previousMetadataPath
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
previousMetadataPath = global.MetadataPath
|
||||||
|
metadataDir = fs.mkdtempSync(path.join(os.tmpdir(), 'abs-upload-meta-'))
|
||||||
|
tmpDir = path.join(metadataDir, 'tmp')
|
||||||
|
global.MetadataPath = metadataDir
|
||||||
|
sinon.stub(Logger, 'info')
|
||||||
|
sinon.stub(Logger, 'warn')
|
||||||
|
})
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
sinon.restore()
|
||||||
|
global.MetadataPath = previousMetadataPath
|
||||||
|
fs.rmSync(metadataDir, { recursive: true, force: true })
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('requireUploadPermission', () => {
|
||||||
|
it('returns 403 when the user cannot upload', () => {
|
||||||
|
const req = { user: { canUpload: false, username: 'guest' } }
|
||||||
|
const res = { sendStatus: sinon.stub() }
|
||||||
|
const next = sinon.stub()
|
||||||
|
|
||||||
|
requireUploadPermission(req, res, next)
|
||||||
|
|
||||||
|
expect(res.sendStatus.calledOnceWithExactly(403)).to.equal(true)
|
||||||
|
expect(next.called).to.equal(false)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('calls next when the user can upload', () => {
|
||||||
|
const req = { user: { canUpload: true, username: 'uploader' } }
|
||||||
|
const res = { sendStatus: sinon.stub() }
|
||||||
|
const next = sinon.stub()
|
||||||
|
|
||||||
|
requireUploadPermission(req, res, next)
|
||||||
|
|
||||||
|
expect(next.calledOnce).to.equal(true)
|
||||||
|
expect(res.sendStatus.called).to.equal(false)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('sweepUploadTempFiles', () => {
|
||||||
|
it('removes leftover tmp-* files and leaves other names', async () => {
|
||||||
|
fs.mkdirSync(tmpDir, { recursive: true })
|
||||||
|
fs.writeFileSync(path.join(tmpDir, 'tmp-1-123'), 'stale')
|
||||||
|
fs.writeFileSync(path.join(tmpDir, 'tmp-2-456'), 'stale')
|
||||||
|
fs.writeFileSync(path.join(tmpDir, 'comic-extract-keep'), 'keep')
|
||||||
|
fs.mkdirSync(path.join(tmpDir, 'tmp-not-a-file'))
|
||||||
|
|
||||||
|
await sweepUploadTempFiles()
|
||||||
|
|
||||||
|
expect(fs.existsSync(path.join(tmpDir, 'tmp-1-123'))).to.equal(false)
|
||||||
|
expect(fs.existsSync(path.join(tmpDir, 'tmp-2-456'))).to.equal(false)
|
||||||
|
expect(fs.existsSync(path.join(tmpDir, 'comic-extract-keep'))).to.equal(true)
|
||||||
|
expect(fs.existsSync(path.join(tmpDir, 'tmp-not-a-file'))).to.equal(true)
|
||||||
|
})
|
||||||
|
|
||||||
|
it('returns when the temp directory does not exist', async () => {
|
||||||
|
await sweepUploadTempFiles()
|
||||||
|
expect(fs.existsSync(tmpDir)).to.equal(false)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('upload parser mounting', () => {
|
||||||
|
it('does not write tmp-* files for a route without the parser', async () => {
|
||||||
|
const app = express()
|
||||||
|
app.use((req, res) => res.sendStatus(404))
|
||||||
|
const { server, port } = await listen(app)
|
||||||
|
|
||||||
|
try {
|
||||||
|
const status = await sendMultipart(port, '/not-a-route')
|
||||||
|
expect(status).to.equal(404)
|
||||||
|
expect(listTmpFiles(tmpDir)).to.deep.equal([])
|
||||||
|
} finally {
|
||||||
|
await closeServer(server)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
it('does not write tmp-* files when permission is rejected before parsing', async () => {
|
||||||
|
const app = express()
|
||||||
|
app.use((req, res, next) => {
|
||||||
|
req.user = { canUpload: false, username: 'guest' }
|
||||||
|
next()
|
||||||
|
})
|
||||||
|
app.post('/upload', requireUploadPermission, fileUploadParser, (req, res) => {
|
||||||
|
res.sendStatus(200)
|
||||||
|
})
|
||||||
|
const { server, port } = await listen(app)
|
||||||
|
|
||||||
|
try {
|
||||||
|
const status = await sendMultipart(port, '/upload')
|
||||||
|
expect(status).to.equal(403)
|
||||||
|
expect(listTmpFiles(tmpDir)).to.deep.equal([])
|
||||||
|
} finally {
|
||||||
|
await closeServer(server)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
it('removes the temp file when the handler rejects without moving it', async () => {
|
||||||
|
const app = express()
|
||||||
|
app.use((req, res, next) => {
|
||||||
|
req.user = { canUpload: true, username: 'uploader' }
|
||||||
|
next()
|
||||||
|
})
|
||||||
|
app.post('/upload', requireUploadPermission, fileUploadParser, (req, res) => {
|
||||||
|
res.status(400).send('Invalid request no file or url')
|
||||||
|
})
|
||||||
|
const { server, port } = await listen(app)
|
||||||
|
|
||||||
|
try {
|
||||||
|
const status = await sendMultipart(port, '/upload')
|
||||||
|
expect(status).to.equal(400)
|
||||||
|
await waitFor(() => listTmpFiles(tmpDir).length === 0)
|
||||||
|
} finally {
|
||||||
|
await closeServer(server)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
it('keeps a moved file and leaves no tmp-* leftover', async () => {
|
||||||
|
const dest = path.join(metadataDir, 'moved.txt')
|
||||||
|
const app = express()
|
||||||
|
app.use((req, res, next) => {
|
||||||
|
req.user = { canUpload: true, username: 'uploader' }
|
||||||
|
next()
|
||||||
|
})
|
||||||
|
app.post('/upload', requireUploadPermission, fileUploadParser, async (req, res) => {
|
||||||
|
await req.files.f.mv(dest)
|
||||||
|
res.sendStatus(200)
|
||||||
|
})
|
||||||
|
const { server, port } = await listen(app)
|
||||||
|
|
||||||
|
try {
|
||||||
|
const status = await sendMultipart(port, '/upload')
|
||||||
|
expect(status).to.equal(200)
|
||||||
|
expect(fs.readFileSync(dest, 'utf8')).to.equal('probe')
|
||||||
|
await waitFor(() => listTmpFiles(tmpDir).length === 0)
|
||||||
|
} finally {
|
||||||
|
await closeServer(server)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
const chai = require('chai')
|
const chai = require('chai')
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
const { parse, nameToLastFirst } = require('../../../../server/utils/parsers/parseNameString')
|
const { parse, nameToLastFirst, dedupeNames } = require('../../../../server/utils/parsers/parseNameString')
|
||||||
|
|
||||||
describe('parseNameString', () => {
|
describe('parseNameString', () => {
|
||||||
describe('parse', () => {
|
describe('parse', () => {
|
||||||
@@ -80,6 +80,20 @@ describe('parseNameString', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('dedupeNames', () => {
|
||||||
|
it('trims, drops blanks, and keeps the first spelling of an exact repeat', () => {
|
||||||
|
expect(dedupeNames([' Stephen King ', 'Stephen King', '', ' ', 'stephen king'])).to.deep.equal(['Stephen King', 'stephen king'])
|
||||||
|
})
|
||||||
|
|
||||||
|
it('preserves order and ignores non-strings', () => {
|
||||||
|
expect(dedupeNames(['Amy Yao', null, 'Amy Yao', 3, 'Raymond Chandler'])).to.deep.equal(['Amy Yao', 'Raymond Chandler'])
|
||||||
|
})
|
||||||
|
|
||||||
|
it('returns an empty array for non-arrays', () => {
|
||||||
|
expect(dedupeNames(null)).to.deep.equal([])
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('nameToLastFirst', () => {
|
describe('nameToLastFirst', () => {
|
||||||
it('converts First Last to Last, First format', () => {
|
it('converts First Last to Last, First format', () => {
|
||||||
const result = nameToLastFirst('John Smith')
|
const result = nameToLastFirst('John Smith')
|
||||||
|
|||||||
@@ -0,0 +1,266 @@
|
|||||||
|
const { expect } = require('chai')
|
||||||
|
const express = require('express')
|
||||||
|
const http = require('http')
|
||||||
|
const sinon = require('sinon')
|
||||||
|
|
||||||
|
const Logger = require('../../../server/Logger')
|
||||||
|
const RateLimiterFactory = require('../../../server/utils/rateLimiterFactory')
|
||||||
|
|
||||||
|
function listen(app) {
|
||||||
|
const server = http.createServer(app)
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
server.listen(0, '127.0.0.1', () => {
|
||||||
|
resolve({ server, port: server.address().port })
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function closeServer(server) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
server.close((err) => (err ? reject(err) : resolve()))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function patchPassword(port, { userId, headers = {} } = {}) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const body = JSON.stringify({ password: 'current', newPassword: 'next' })
|
||||||
|
const req = http.request(
|
||||||
|
{
|
||||||
|
hostname: '127.0.0.1',
|
||||||
|
port,
|
||||||
|
path: '/me/password',
|
||||||
|
method: 'PATCH',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'Content-Length': Buffer.byteLength(body),
|
||||||
|
'User-Agent': 'rate-limiter-test',
|
||||||
|
'x-user-id': userId,
|
||||||
|
...headers
|
||||||
|
}
|
||||||
|
},
|
||||||
|
(res) => {
|
||||||
|
res.resume()
|
||||||
|
res.on('end', () => resolve({ status: res.statusCode }))
|
||||||
|
}
|
||||||
|
)
|
||||||
|
req.on('error', reject)
|
||||||
|
req.write(body)
|
||||||
|
req.end()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function passwordChangeApp(limiter) {
|
||||||
|
const app = express()
|
||||||
|
app.patch(
|
||||||
|
'/me/password',
|
||||||
|
(req, res, next) => {
|
||||||
|
const userId = req.get('x-user-id')
|
||||||
|
if (userId) req.user = { id: userId }
|
||||||
|
next()
|
||||||
|
},
|
||||||
|
limiter,
|
||||||
|
(req, res) => {
|
||||||
|
res.status(400).send('Invalid password')
|
||||||
|
}
|
||||||
|
)
|
||||||
|
return app
|
||||||
|
}
|
||||||
|
|
||||||
|
function postLogin(port, { headers = {} } = {}) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const body = JSON.stringify({ username: 'alice', password: 'guess' })
|
||||||
|
const req = http.request(
|
||||||
|
{
|
||||||
|
hostname: '127.0.0.1',
|
||||||
|
port,
|
||||||
|
path: '/login',
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'Content-Length': Buffer.byteLength(body),
|
||||||
|
'User-Agent': 'rate-limiter-test',
|
||||||
|
...headers
|
||||||
|
}
|
||||||
|
},
|
||||||
|
(res) => {
|
||||||
|
let data = ''
|
||||||
|
res.on('data', (chunk) => {
|
||||||
|
data += chunk
|
||||||
|
})
|
||||||
|
res.on('end', () => {
|
||||||
|
resolve({ status: res.statusCode, body: data, headers: res.headers })
|
||||||
|
})
|
||||||
|
}
|
||||||
|
)
|
||||||
|
req.on('error', reject)
|
||||||
|
req.write(body)
|
||||||
|
req.end()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
describe('rateLimiterFactory', () => {
|
||||||
|
const previousMax = process.env.RATE_LIMIT_AUTH_MAX
|
||||||
|
const previousWindow = process.env.RATE_LIMIT_AUTH_WINDOW
|
||||||
|
const previousMessage = process.env.RATE_LIMIT_AUTH_MESSAGE
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
RateLimiterFactory.authRateLimiter = null
|
||||||
|
RateLimiterFactory.passwordChangeRateLimiter = null
|
||||||
|
process.env.RATE_LIMIT_AUTH_MAX = '3'
|
||||||
|
process.env.RATE_LIMIT_AUTH_WINDOW = '60000'
|
||||||
|
delete process.env.RATE_LIMIT_AUTH_MESSAGE
|
||||||
|
sinon.stub(Logger, 'info')
|
||||||
|
sinon.stub(Logger, 'warn')
|
||||||
|
sinon.stub(Logger, 'debug')
|
||||||
|
})
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
RateLimiterFactory.authRateLimiter = null
|
||||||
|
RateLimiterFactory.passwordChangeRateLimiter = null
|
||||||
|
if (previousMax === undefined) delete process.env.RATE_LIMIT_AUTH_MAX
|
||||||
|
else process.env.RATE_LIMIT_AUTH_MAX = previousMax
|
||||||
|
if (previousWindow === undefined) delete process.env.RATE_LIMIT_AUTH_WINDOW
|
||||||
|
else process.env.RATE_LIMIT_AUTH_WINDOW = previousWindow
|
||||||
|
if (previousMessage === undefined) delete process.env.RATE_LIMIT_AUTH_MESSAGE
|
||||||
|
else process.env.RATE_LIMIT_AUTH_MESSAGE = previousMessage
|
||||||
|
sinon.restore()
|
||||||
|
})
|
||||||
|
|
||||||
|
it('shares one bucket across rotating client IP headers and returns 429 after max failures', async () => {
|
||||||
|
const app = express()
|
||||||
|
const limiter = RateLimiterFactory.getAuthRateLimiter()
|
||||||
|
app.post('/login', limiter, (req, res) => {
|
||||||
|
res.status(401).json({ error: 'Unauthorized' })
|
||||||
|
})
|
||||||
|
|
||||||
|
const { server, port } = await listen(app)
|
||||||
|
try {
|
||||||
|
const statuses = []
|
||||||
|
for (let i = 0; i < 4; i++) {
|
||||||
|
const result = await postLogin(port, {
|
||||||
|
headers: {
|
||||||
|
'X-Client-IP': `10.0.0.${i}`,
|
||||||
|
'X-Forwarded-For': `203.0.113.${i}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
statuses.push(result.status)
|
||||||
|
}
|
||||||
|
|
||||||
|
expect(statuses).to.deep.equal([401, 401, 401, 429])
|
||||||
|
} finally {
|
||||||
|
await closeServer(server)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
it('does not consume a slot for successful logins', async () => {
|
||||||
|
const app = express()
|
||||||
|
const limiter = RateLimiterFactory.getAuthRateLimiter()
|
||||||
|
let attempt = 0
|
||||||
|
app.post('/login', limiter, (req, res) => {
|
||||||
|
attempt += 1
|
||||||
|
if (attempt === 1) {
|
||||||
|
return res.status(200).json({ ok: true })
|
||||||
|
}
|
||||||
|
res.status(401).json({ error: 'Unauthorized' })
|
||||||
|
})
|
||||||
|
|
||||||
|
const { server, port } = await listen(app)
|
||||||
|
try {
|
||||||
|
const success = await postLogin(port)
|
||||||
|
expect(success.status).to.equal(200)
|
||||||
|
|
||||||
|
const statuses = []
|
||||||
|
for (let i = 0; i < 4; i++) {
|
||||||
|
const result = await postLogin(port, {
|
||||||
|
headers: {
|
||||||
|
'X-Client-IP': `10.1.0.${i}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
statuses.push(result.status)
|
||||||
|
}
|
||||||
|
|
||||||
|
expect(statuses).to.deep.equal([401, 401, 401, 429])
|
||||||
|
} finally {
|
||||||
|
await closeServer(server)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
it('limits password changes per user and ignores client IP headers', async () => {
|
||||||
|
const app = passwordChangeApp(RateLimiterFactory.getPasswordChangeRateLimiter())
|
||||||
|
const { server, port } = await listen(app)
|
||||||
|
try {
|
||||||
|
const alice = []
|
||||||
|
for (let i = 0; i < 4; i++) {
|
||||||
|
const result = await patchPassword(port, {
|
||||||
|
userId: 'alice',
|
||||||
|
headers: {
|
||||||
|
'X-Client-IP': `10.2.0.${i}`,
|
||||||
|
'X-Forwarded-For': `198.51.100.${i}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
alice.push(result.status)
|
||||||
|
}
|
||||||
|
const bob = await patchPassword(port, { userId: 'bob' })
|
||||||
|
|
||||||
|
expect(alice).to.deep.equal([400, 400, 400, 429])
|
||||||
|
expect(bob.status).to.equal(400)
|
||||||
|
expect(Logger.warn.calledWithMatch(/User: alice/)).to.equal(true)
|
||||||
|
} finally {
|
||||||
|
await closeServer(server)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
it('does not consume a password-change slot for a successful update', async () => {
|
||||||
|
let attempt = 0
|
||||||
|
const app = express()
|
||||||
|
const limiter = RateLimiterFactory.getPasswordChangeRateLimiter()
|
||||||
|
app.patch(
|
||||||
|
'/me/password',
|
||||||
|
(req, res, next) => {
|
||||||
|
req.user = { id: 'alice' }
|
||||||
|
next()
|
||||||
|
},
|
||||||
|
limiter,
|
||||||
|
(req, res) => {
|
||||||
|
attempt += 1
|
||||||
|
res.status(attempt === 1 ? 200 : 400).send(attempt === 1 ? 'ok' : 'Invalid password')
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
const { server, port } = await listen(app)
|
||||||
|
try {
|
||||||
|
const success = await patchPassword(port, { userId: 'alice' })
|
||||||
|
expect(success.status).to.equal(200)
|
||||||
|
|
||||||
|
const statuses = []
|
||||||
|
for (let i = 0; i < 4; i++) {
|
||||||
|
const result = await patchPassword(port, { userId: 'alice' })
|
||||||
|
statuses.push(result.status)
|
||||||
|
}
|
||||||
|
expect(statuses).to.deep.equal([400, 400, 400, 429])
|
||||||
|
} finally {
|
||||||
|
await closeServer(server)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
it('can be disabled with RATE_LIMIT_AUTH_MAX=0', async () => {
|
||||||
|
RateLimiterFactory.authRateLimiter = null
|
||||||
|
process.env.RATE_LIMIT_AUTH_MAX = '0'
|
||||||
|
|
||||||
|
const app = express()
|
||||||
|
const limiter = RateLimiterFactory.getAuthRateLimiter()
|
||||||
|
app.post('/login', limiter, (req, res) => {
|
||||||
|
res.status(401).json({ error: 'Unauthorized' })
|
||||||
|
})
|
||||||
|
|
||||||
|
const { server, port } = await listen(app)
|
||||||
|
try {
|
||||||
|
for (let i = 0; i < 5; i++) {
|
||||||
|
const result = await postLogin(port)
|
||||||
|
expect(result.status).to.equal(401)
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
await closeServer(server)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
Reference in new issue
Block a user