Merge develop into master for the release
This commit is contained in:
@@ -26,8 +26,8 @@ Organize, read, annotate, sync across devices, and share, all without relying on
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://booklore.org/">🌐 Website</a> ·
|
<a href="https://booklore.org/">🌐 Website</a> ·
|
||||||
<a href="https://booklore.org/docs/getting-started">📖 Docs</a> ·
|
<a href="https://booklore.org/docs/getting-started">📖 Docs</a> ·
|
||||||
<a href="#🎮-live-demo">🎮 Demo</a> ·
|
<a href="#-live-demo">🎮 Demo</a> ·
|
||||||
<a href="#🚀-quick-start">🚀 Quick Start</a> ·
|
<a href="#-quick-start">🚀 Quick Start</a> ·
|
||||||
<a href="https://discord.gg/Ee5hd458Uz">💬 Discord</a>
|
<a href="https://discord.gg/Ee5hd458Uz">💬 Discord</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
@@ -35,3 +35,6 @@ out/
|
|||||||
|
|
||||||
### VS Code ###
|
### VS Code ###
|
||||||
.vscode/
|
.vscode/
|
||||||
|
|
||||||
|
### Local scripts ###
|
||||||
|
local/
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ import org.booklore.config.BookmarkProperties;
|
|||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class BookloreApplication {
|
public class BookloreApplication {
|
||||||
|
|
||||||
|
static {
|
||||||
|
System.setProperty("sun.net.http.allowRestrictedHeaders", "true");
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(BookloreApplication.class, args);
|
SpringApplication.run(BookloreApplication.class, args);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -262,8 +262,11 @@ public class SecurityConfig {
|
|||||||
protected void prepareConnection(HttpURLConnection connection, String httpMethod) throws IOException {
|
protected void prepareConnection(HttpURLConnection connection, String httpMethod) throws IOException {
|
||||||
super.prepareConnection(connection, httpMethod);
|
super.prepareConnection(connection, httpMethod);
|
||||||
connection.setInstanceFollowRedirects(false);
|
connection.setInstanceFollowRedirects(false);
|
||||||
if (connection instanceof HttpsURLConnection httpsConnection) {
|
|
||||||
String targetHost = FileService.getTargetHost();
|
String targetHost = FileService.getTargetHost();
|
||||||
|
if (targetHost != null) {
|
||||||
|
connection.setRequestProperty("Host", targetHost);
|
||||||
|
}
|
||||||
|
if (connection instanceof HttpsURLConnection httpsConnection) {
|
||||||
if (targetHost != null) {
|
if (targetHost != null) {
|
||||||
// Set original host for SNI (even if connecting to IP)
|
// Set original host for SNI (even if connecting to IP)
|
||||||
SSLSocketFactory defaultFactory = httpsConnection.getSSLSocketFactory();
|
SSLSocketFactory defaultFactory = httpsConnection.getSSLSocketFactory();
|
||||||
|
|||||||
@@ -2,7 +2,10 @@ package org.booklore.controller;
|
|||||||
|
|
||||||
import org.booklore.config.security.annotation.CheckBookAccess;
|
import org.booklore.config.security.annotation.CheckBookAccess;
|
||||||
import org.booklore.model.dto.BookFile;
|
import org.booklore.model.dto.BookFile;
|
||||||
|
import org.booklore.model.dto.request.DetachBookFileRequest;
|
||||||
|
import org.booklore.model.dto.response.DetachBookFileResponse;
|
||||||
import org.booklore.model.enums.BookFileType;
|
import org.booklore.model.enums.BookFileType;
|
||||||
|
import org.booklore.service.book.BookFileDetachmentService;
|
||||||
import org.booklore.service.file.AdditionalFileService;
|
import org.booklore.service.file.AdditionalFileService;
|
||||||
import org.booklore.service.upload.FileUploadService;
|
import org.booklore.service.upload.FileUploadService;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@@ -22,6 +25,7 @@ public class AdditionalFileController {
|
|||||||
|
|
||||||
private final AdditionalFileService additionalFileService;
|
private final AdditionalFileService additionalFileService;
|
||||||
private final FileUploadService fileUploadService;
|
private final FileUploadService fileUploadService;
|
||||||
|
private final BookFileDetachmentService bookFileDetachmentService;
|
||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@CheckBookAccess(bookIdParam = "bookId")
|
@CheckBookAccess(bookIdParam = "bookId")
|
||||||
@@ -69,4 +73,14 @@ public class AdditionalFileController {
|
|||||||
additionalFileService.deleteAdditionalFile(fileId);
|
additionalFileService.deleteAdditionalFile(fileId);
|
||||||
return ResponseEntity.noContent().build();
|
return ResponseEntity.noContent().build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/{fileId}/detach")
|
||||||
|
@CheckBookAccess(bookIdParam = "bookId")
|
||||||
|
@PreAuthorize("@securityUtil.canManageLibrary() or @securityUtil.isAdmin()")
|
||||||
|
public ResponseEntity<DetachBookFileResponse> detachFile(
|
||||||
|
@PathVariable Long bookId,
|
||||||
|
@PathVariable Long fileId,
|
||||||
|
@RequestBody DetachBookFileRequest request) {
|
||||||
|
return ResponseEntity.ok(bookFileDetachmentService.detachBookFile(bookId, fileId, request.copyMetadata()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.booklore.model.dto.request.PersonalRatingUpdateRequest;
|
|||||||
import org.booklore.model.dto.request.ReadProgressRequest;
|
import org.booklore.model.dto.request.ReadProgressRequest;
|
||||||
import org.booklore.model.dto.request.ReadStatusUpdateRequest;
|
import org.booklore.model.dto.request.ReadStatusUpdateRequest;
|
||||||
import org.booklore.model.dto.request.ShelvesAssignmentRequest;
|
import org.booklore.model.dto.request.ShelvesAssignmentRequest;
|
||||||
|
import org.booklore.model.dto.response.AttachBookFileResponse;
|
||||||
import org.booklore.model.dto.response.BookDeletionResponse;
|
import org.booklore.model.dto.response.BookDeletionResponse;
|
||||||
import org.booklore.model.dto.response.BookStatusUpdateResponse;
|
import org.booklore.model.dto.response.BookStatusUpdateResponse;
|
||||||
import org.booklore.model.dto.response.DuplicateGroup;
|
import org.booklore.model.dto.response.DuplicateGroup;
|
||||||
@@ -285,7 +286,7 @@ public class BookController {
|
|||||||
})
|
})
|
||||||
@PostMapping("/{targetBookId}/attach-file")
|
@PostMapping("/{targetBookId}/attach-file")
|
||||||
@PreAuthorize("@securityUtil.canManageLibrary() or @securityUtil.isAdmin()")
|
@PreAuthorize("@securityUtil.canManageLibrary() or @securityUtil.isAdmin()")
|
||||||
public ResponseEntity<Book> attachBookFiles(
|
public ResponseEntity<AttachBookFileResponse> attachBookFiles(
|
||||||
@Parameter(description = "ID of the target book to attach the files to") @PathVariable Long targetBookId,
|
@Parameter(description = "ID of the target book to attach the files to") @PathVariable Long targetBookId,
|
||||||
@Parameter(description = "Request containing source book IDs and delete option") @RequestBody @Valid AttachBookFileRequest request) {
|
@Parameter(description = "Request containing source book IDs and delete option") @RequestBody @Valid AttachBookFileRequest request) {
|
||||||
return ResponseEntity.ok(bookFileAttachmentService.attachBookFiles(targetBookId, request.getSourceBookIds(), request.isMoveFiles()));
|
return ResponseEntity.ok(bookFileAttachmentService.attachBookFiles(targetBookId, request.getSourceBookIds(), request.isMoveFiles()));
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.booklore.config.JacksonConfig;
|
import org.booklore.config.JacksonConfig;
|
||||||
|
import org.booklore.config.security.service.AuthenticationService;
|
||||||
|
import org.booklore.config.security.userdetails.OpdsUserDetails;
|
||||||
import org.booklore.mapper.komga.KomgaMapper;
|
import org.booklore.mapper.komga.KomgaMapper;
|
||||||
import org.booklore.model.dto.komga.KomgaBookDto;
|
import org.booklore.model.dto.komga.KomgaBookDto;
|
||||||
import org.booklore.model.dto.komga.KomgaLibraryDto;
|
import org.booklore.model.dto.komga.KomgaLibraryDto;
|
||||||
@@ -13,6 +15,7 @@ import org.booklore.model.dto.komga.KomgaPageableDto;
|
|||||||
import org.booklore.model.dto.komga.KomgaSeriesDto;
|
import org.booklore.model.dto.komga.KomgaSeriesDto;
|
||||||
import org.booklore.service.book.BookService;
|
import org.booklore.service.book.BookService;
|
||||||
import org.booklore.service.komga.KomgaService;
|
import org.booklore.service.komga.KomgaService;
|
||||||
|
import org.booklore.service.opds.OpdsBookService;
|
||||||
import org.booklore.service.opds.OpdsUserV2Service;
|
import org.booklore.service.opds.OpdsUserV2Service;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
import org.springframework.core.io.Resource;
|
import org.springframework.core.io.Resource;
|
||||||
@@ -36,6 +39,8 @@ public class KomgaController {
|
|||||||
|
|
||||||
private final KomgaService komgaService;
|
private final KomgaService komgaService;
|
||||||
private final BookService bookService;
|
private final BookService bookService;
|
||||||
|
private final OpdsBookService opdsBookService;
|
||||||
|
private final AuthenticationService authenticationService;
|
||||||
private final OpdsUserV2Service opdsUserV2Service;
|
private final OpdsUserV2Service opdsUserV2Service;
|
||||||
private final KomgaMapper komgaMapper;
|
private final KomgaMapper komgaMapper;
|
||||||
|
|
||||||
@@ -147,6 +152,7 @@ public class KomgaController {
|
|||||||
@Parameter(description = "Book ID") @PathVariable Long bookId,
|
@Parameter(description = "Book ID") @PathVariable Long bookId,
|
||||||
@Parameter(description = "Page number") @PathVariable Integer pageNumber,
|
@Parameter(description = "Page number") @PathVariable Integer pageNumber,
|
||||||
@Parameter(description = "Convert image format (e.g., 'png')") @RequestParam(required = false) String convert) {
|
@Parameter(description = "Convert image format (e.g., 'png')") @RequestParam(required = false) String convert) {
|
||||||
|
opdsBookService.validateBookContentAccess(bookId, getOpdsUserId());
|
||||||
try {
|
try {
|
||||||
boolean convertToPng = "png".equalsIgnoreCase(convert);
|
boolean convertToPng = "png".equalsIgnoreCase(convert);
|
||||||
Resource pageImage = komgaService.getBookPageImage(bookId, pageNumber, convertToPng);
|
Resource pageImage = komgaService.getBookPageImage(bookId, pageNumber, convertToPng);
|
||||||
@@ -166,6 +172,7 @@ public class KomgaController {
|
|||||||
@GetMapping("/v1/books/{bookId}/file")
|
@GetMapping("/v1/books/{bookId}/file")
|
||||||
public ResponseEntity<Resource> downloadBook(
|
public ResponseEntity<Resource> downloadBook(
|
||||||
@Parameter(description = "Book ID") @PathVariable Long bookId) {
|
@Parameter(description = "Book ID") @PathVariable Long bookId) {
|
||||||
|
opdsBookService.validateBookContentAccess(bookId, getOpdsUserId());
|
||||||
return bookService.downloadBook(bookId);
|
return bookService.downloadBook(bookId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,6 +180,7 @@ public class KomgaController {
|
|||||||
@GetMapping("/v1/books/{bookId}/thumbnail")
|
@GetMapping("/v1/books/{bookId}/thumbnail")
|
||||||
public ResponseEntity<Resource> getBookThumbnail(
|
public ResponseEntity<Resource> getBookThumbnail(
|
||||||
@Parameter(description = "Book ID") @PathVariable Long bookId) {
|
@Parameter(description = "Book ID") @PathVariable Long bookId) {
|
||||||
|
opdsBookService.validateBookContentAccess(bookId, getOpdsUserId());
|
||||||
Resource coverImage = bookService.getBookThumbnail(bookId);
|
Resource coverImage = bookService.getBookThumbnail(bookId);
|
||||||
return ResponseEntity.ok()
|
return ResponseEntity.ok()
|
||||||
.header("Content-Type", "image/jpeg")
|
.header("Content-Type", "image/jpeg")
|
||||||
@@ -208,4 +216,11 @@ public class KomgaController {
|
|||||||
@Parameter(description = "Return all collections without paging") @RequestParam(defaultValue = "false") boolean unpaged) {
|
@Parameter(description = "Return all collections without paging") @RequestParam(defaultValue = "false") boolean unpaged) {
|
||||||
return writeJson(komgaService.getCollections(page, size, unpaged));
|
return writeJson(komgaService.getCollections(page, size, unpaged));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Long getOpdsUserId() {
|
||||||
|
OpdsUserDetails details = authenticationService.getOpdsUser();
|
||||||
|
return details != null && details.getOpdsUserV2() != null
|
||||||
|
? details.getOpdsUserV2().getUserId()
|
||||||
|
: null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
package org.booklore.controller;
|
package org.booklore.controller;
|
||||||
|
|
||||||
|
import org.booklore.config.security.service.AuthenticationService;
|
||||||
|
import org.booklore.config.security.userdetails.OpdsUserDetails;
|
||||||
import org.booklore.service.book.BookDownloadService;
|
import org.booklore.service.book.BookDownloadService;
|
||||||
import org.booklore.service.book.BookService;
|
import org.booklore.service.book.BookService;
|
||||||
|
import org.booklore.service.opds.OpdsBookService;
|
||||||
import org.booklore.service.opds.OpdsFeedService;
|
import org.booklore.service.opds.OpdsFeedService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
@@ -34,6 +37,8 @@ public class OpdsController {
|
|||||||
private final OpdsFeedService opdsFeedService;
|
private final OpdsFeedService opdsFeedService;
|
||||||
private final BookService bookService;
|
private final BookService bookService;
|
||||||
private final BookDownloadService bookDownloadService;
|
private final BookDownloadService bookDownloadService;
|
||||||
|
private final OpdsBookService opdsBookService;
|
||||||
|
private final AuthenticationService authenticationService;
|
||||||
|
|
||||||
@Operation(summary = "Download book file", description = "Download the book file by its ID. Optionally specify a fileId to download a specific format.")
|
@Operation(summary = "Download book file", description = "Download the book file by its ID. Optionally specify a fileId to download a specific format.")
|
||||||
@ApiResponses({
|
@ApiResponses({
|
||||||
@@ -44,6 +49,7 @@ public class OpdsController {
|
|||||||
public ResponseEntity<Resource> downloadBook(
|
public ResponseEntity<Resource> downloadBook(
|
||||||
@Parameter(description = "ID of the book to download") @PathVariable("bookId") Long bookId,
|
@Parameter(description = "ID of the book to download") @PathVariable("bookId") Long bookId,
|
||||||
@Parameter(description = "Optional ID of a specific file format to download") @RequestParam(required = false) Long fileId) {
|
@Parameter(description = "Optional ID of a specific file format to download") @RequestParam(required = false) Long fileId) {
|
||||||
|
opdsBookService.validateBookContentAccess(bookId, getOpdsUserId());
|
||||||
if (fileId != null) {
|
if (fileId != null) {
|
||||||
return bookDownloadService.downloadBookFile(bookId, fileId);
|
return bookDownloadService.downloadBookFile(bookId, fileId);
|
||||||
}
|
}
|
||||||
@@ -57,6 +63,7 @@ public class OpdsController {
|
|||||||
})
|
})
|
||||||
@GetMapping("/{bookId}/cover")
|
@GetMapping("/{bookId}/cover")
|
||||||
public ResponseEntity<Resource> getBookCover(@Parameter(description = "ID of the book") @PathVariable long bookId) {
|
public ResponseEntity<Resource> getBookCover(@Parameter(description = "ID of the book") @PathVariable long bookId) {
|
||||||
|
opdsBookService.validateBookContentAccess(bookId, getOpdsUserId());
|
||||||
Resource coverImage = bookService.getBookThumbnail(bookId);
|
Resource coverImage = bookService.getBookThumbnail(bookId);
|
||||||
String contentType = "image/jpeg";
|
String contentType = "image/jpeg";
|
||||||
return ResponseEntity.ok()
|
return ResponseEntity.ok()
|
||||||
@@ -169,4 +176,11 @@ public class OpdsController {
|
|||||||
.contentType(MediaType.parseMediaType("application/opensearchdescription+xml;charset=utf-8"))
|
.contentType(MediaType.parseMediaType("application/opensearchdescription+xml;charset=utf-8"))
|
||||||
.body(searchDoc);
|
.body(searchDoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Long getOpdsUserId() {
|
||||||
|
OpdsUserDetails details = authenticationService.getOpdsUser();
|
||||||
|
return details != null && details.getOpdsUserV2() != null
|
||||||
|
? details.getOpdsUserV2().getUserId()
|
||||||
|
: null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package org.booklore.model.dto.request;
|
||||||
|
|
||||||
|
public record DetachBookFileRequest(boolean copyMetadata) {}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package org.booklore.model.dto.response;
|
||||||
|
|
||||||
|
import org.booklore.model.dto.Book;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public record AttachBookFileResponse(Book updatedBook, List<Long> deletedSourceBookIds) {}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package org.booklore.model.dto.response;
|
||||||
|
|
||||||
|
import org.booklore.model.dto.Book;
|
||||||
|
|
||||||
|
public record DetachBookFileResponse(Book sourceBook, Book newBook) {}
|
||||||
@@ -322,9 +322,37 @@ public class BookMetadataEntity {
|
|||||||
@PrePersist
|
@PrePersist
|
||||||
@PreUpdate
|
@PreUpdate
|
||||||
public void updateSearchText() {
|
public void updateSearchText() {
|
||||||
|
trimStringFields();
|
||||||
this.searchText = BookUtils.buildSearchText(this);
|
this.searchText = BookUtils.buildSearchText(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void trimStringFields() {
|
||||||
|
this.title = trimOrNull(this.title);
|
||||||
|
this.subtitle = trimOrNull(this.subtitle);
|
||||||
|
this.publisher = trimOrNull(this.publisher);
|
||||||
|
this.seriesName = trimOrNull(this.seriesName);
|
||||||
|
this.language = trimOrNull(this.language);
|
||||||
|
this.isbn13 = trimOrNull(this.isbn13);
|
||||||
|
this.isbn10 = trimOrNull(this.isbn10);
|
||||||
|
this.asin = trimOrNull(this.asin);
|
||||||
|
this.goodreadsId = trimOrNull(this.goodreadsId);
|
||||||
|
this.hardcoverId = trimOrNull(this.hardcoverId);
|
||||||
|
this.hardcoverBookId = trimOrNull(this.hardcoverBookId);
|
||||||
|
this.googleId = trimOrNull(this.googleId);
|
||||||
|
this.comicvineId = trimOrNull(this.comicvineId);
|
||||||
|
this.lubimyczytacId = trimOrNull(this.lubimyczytacId);
|
||||||
|
this.ranobedbId = trimOrNull(this.ranobedbId);
|
||||||
|
this.audibleId = trimOrNull(this.audibleId);
|
||||||
|
this.contentRating = trimOrNull(this.contentRating);
|
||||||
|
this.narrator = trimOrNull(this.narrator);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String trimOrNull(String value) {
|
||||||
|
if (value == null) return null;
|
||||||
|
String trimmed = value.trim();
|
||||||
|
return trimmed.isEmpty() ? null : trimmed;
|
||||||
|
}
|
||||||
|
|
||||||
@OneToOne(fetch = FetchType.LAZY)
|
@OneToOne(fetch = FetchType.LAZY)
|
||||||
@MapsId
|
@MapsId
|
||||||
@JoinColumn(name = "book_id")
|
@JoinColumn(name = "book_id")
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ public enum AuditAction {
|
|||||||
LOGIN_RATE_LIMITED,
|
LOGIN_RATE_LIMITED,
|
||||||
REFRESH_RATE_LIMITED,
|
REFRESH_RATE_LIMITED,
|
||||||
DUPLICATE_BOOKS_MERGED,
|
DUPLICATE_BOOKS_MERGED,
|
||||||
|
BOOK_FILE_DETACHED,
|
||||||
AUTHOR_METADATA_UPDATED,
|
AUTHOR_METADATA_UPDATED,
|
||||||
AUTHOR_DELETED
|
AUTHOR_DELETED
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +1,33 @@
|
|||||||
package org.booklore.model.enums;
|
package org.booklore.model.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
public enum PermissionType {
|
public enum PermissionType {
|
||||||
ADMIN,
|
|
||||||
UPLOAD,
|
ADMIN("permissionAdmin"),
|
||||||
DOWNLOAD,
|
UPLOAD("permissionUpload"),
|
||||||
EDIT_METADATA,
|
DOWNLOAD("permissionDownload"),
|
||||||
MANAGE_LIBRARY,
|
EDIT_METADATA("permissionEditMetadata"),
|
||||||
EMAIL_BOOK,
|
MANAGE_LIBRARY("permissionManageLibrary"),
|
||||||
DELETE_BOOK,
|
EMAIL_BOOK("permissionEmailBook"),
|
||||||
SYNC_KOREADER,
|
DELETE_BOOK("permissionDeleteBook"),
|
||||||
SYNC_KOBO,
|
SYNC_KOREADER("permissionSyncKoreader"),
|
||||||
ACCESS_OPDS,
|
SYNC_KOBO("permissionSyncKobo"),
|
||||||
MANAGE_METADATA_CONFIG,
|
ACCESS_OPDS("permissionAccessOpds"),
|
||||||
ACCESS_BOOKDROP,
|
MANAGE_METADATA_CONFIG("permissionManageMetadataConfig"),
|
||||||
ACCESS_LIBRARY_STATS,
|
ACCESS_BOOKDROP("permissionAccessBookdrop"),
|
||||||
ACCESS_USER_STATS,
|
ACCESS_LIBRARY_STATS("permissionAccessLibraryStats"),
|
||||||
ACCESS_TASK_MANAGER,
|
ACCESS_USER_STATS("permissionAccessUserStats"),
|
||||||
MANAGE_GLOBAL_PREFERENCES,
|
ACCESS_TASK_MANAGER("permissionAccessTaskManager"),
|
||||||
MANAGE_ICONS,
|
MANAGE_GLOBAL_PREFERENCES("permissionManageGlobalPreferences"),
|
||||||
MANAGE_FONTS,
|
MANAGE_ICONS("permissionManageIcons"),
|
||||||
DEMO_USER
|
MANAGE_FONTS("permissionManageFonts"),
|
||||||
|
DEMO_USER("permissionDemoUser");
|
||||||
|
|
||||||
|
private final String entityField;
|
||||||
|
|
||||||
|
PermissionType(String entityField) {
|
||||||
|
this.entityField = entityField;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,18 @@
|
|||||||
package org.booklore.service;
|
package org.booklore.service;
|
||||||
|
|
||||||
import org.booklore.config.security.service.AuthenticationService;
|
import org.booklore.config.security.service.AuthenticationService;
|
||||||
import org.booklore.model.entity.BookLoreUserEntity;
|
|
||||||
import org.booklore.model.entity.UserPermissionsEntity;
|
|
||||||
import org.booklore.model.enums.PermissionType;
|
import org.booklore.model.enums.PermissionType;
|
||||||
import org.booklore.model.websocket.Topic;
|
import org.booklore.model.websocket.Topic;
|
||||||
import org.booklore.repository.UserRepository;
|
import jakarta.persistence.EntityManager;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.messaging.simp.SimpMessagingTemplate;
|
import org.springframework.messaging.simp.SimpMessagingTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import static org.booklore.util.UserPermissionUtils.hasPermission;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@@ -24,7 +21,7 @@ public class NotificationService {
|
|||||||
|
|
||||||
private final SimpMessagingTemplate messagingTemplate;
|
private final SimpMessagingTemplate messagingTemplate;
|
||||||
private final AuthenticationService authenticationService;
|
private final AuthenticationService authenticationService;
|
||||||
private final UserRepository userRepository;
|
private final EntityManager entityManager;
|
||||||
|
|
||||||
public void sendMessage(Topic topic, Object message) {
|
public void sendMessage(Topic topic, Object message) {
|
||||||
try {
|
try {
|
||||||
@@ -40,27 +37,25 @@ public class NotificationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional(readOnly = true)
|
||||||
public void sendMessageToPermissions(Topic topic, Object message, Set<PermissionType> permissionTypes) {
|
public void sendMessageToPermissions(Topic topic, Object message, Set<PermissionType> permissionTypes) {
|
||||||
if (permissionTypes == null || permissionTypes.isEmpty()) return;
|
if (permissionTypes == null || permissionTypes.isEmpty()) return;
|
||||||
|
|
||||||
Set<PermissionType> permissionSet = EnumSet.noneOf(PermissionType.class);
|
|
||||||
permissionSet.addAll(permissionTypes);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
List<BookLoreUserEntity> users = userRepository.findAll();
|
List<String> usernames = findUsernamesWithPermissions(permissionTypes);
|
||||||
for (BookLoreUserEntity user : users) {
|
for (String username : usernames) {
|
||||||
UserPermissionsEntity perms = user.getPermissions();
|
messagingTemplate.convertAndSendToUser(username, topic.getPath(), message);
|
||||||
if (perms != null) {
|
|
||||||
for (PermissionType p : permissionSet) {
|
|
||||||
if (hasPermission(perms, p)) {
|
|
||||||
messagingTemplate.convertAndSendToUser(user.getUsername(), topic.getPath(), message);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Error sending message to users with permissions {}: {}", permissionSet, e.getMessage(), e);
|
log.error("Error sending message to users with permissions {}: {}", permissionTypes, e.getMessage(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<String> findUsernamesWithPermissions(Set<PermissionType> permissionTypes) {
|
||||||
|
String conditions = permissionTypes.stream()
|
||||||
|
.map(p -> "p." + p.getEntityField() + " = true")
|
||||||
|
.collect(Collectors.joining(" OR "));
|
||||||
|
String jpql = "SELECT u.username FROM BookLoreUserEntity u JOIN u.permissions p WHERE " + conditions;
|
||||||
|
return entityManager.createQuery(jpql, String.class).getResultList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+41
-21
@@ -5,6 +5,7 @@ import org.booklore.exception.ApiError;
|
|||||||
import org.booklore.mapper.BookMapper;
|
import org.booklore.mapper.BookMapper;
|
||||||
import org.booklore.model.dto.Book;
|
import org.booklore.model.dto.Book;
|
||||||
import org.booklore.model.dto.BookLoreUser;
|
import org.booklore.model.dto.BookLoreUser;
|
||||||
|
import org.booklore.model.dto.response.AttachBookFileResponse;
|
||||||
import org.booklore.model.entity.BookEntity;
|
import org.booklore.model.entity.BookEntity;
|
||||||
import org.booklore.model.entity.BookFileEntity;
|
import org.booklore.model.entity.BookFileEntity;
|
||||||
import org.booklore.model.entity.LibraryPathEntity;
|
import org.booklore.model.entity.LibraryPathEntity;
|
||||||
@@ -45,17 +46,15 @@ public class BookFileAttachmentService {
|
|||||||
private final EntityManager entityManager;
|
private final EntityManager entityManager;
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public Book attachBookFiles(Long targetBookId, List<Long> sourceBookIds, boolean moveFiles) {
|
public AttachBookFileResponse attachBookFiles(Long targetBookId, List<Long> sourceBookIds, boolean moveFiles) {
|
||||||
BookEntity targetBook = bookRepository.findByIdWithBookFiles(targetBookId)
|
BookEntity targetBook = bookRepository.findByIdWithBookFiles(targetBookId)
|
||||||
.orElseThrow(() -> ApiError.BOOK_NOT_FOUND.createException(targetBookId));
|
.orElseThrow(() -> ApiError.BOOK_NOT_FOUND.createException(targetBookId));
|
||||||
|
|
||||||
// Validate and deduplicate source book IDs
|
Set<Long> uniqueSourceBookIds = new LinkedHashSet<>(sourceBookIds);
|
||||||
Set<Long> uniqueSourceBookIds = new LinkedHashSet<>(sourceBookIds); // Preserves order, removes duplicates
|
|
||||||
if (uniqueSourceBookIds.contains(targetBookId)) {
|
if (uniqueSourceBookIds.contains(targetBookId)) {
|
||||||
throw ApiError.GENERIC_BAD_REQUEST.createException("Cannot attach a book to itself");
|
throw ApiError.GENERIC_BAD_REQUEST.createException("Cannot attach a book to itself");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load all source books upfront to avoid Hibernate auto-flush issues when loading inside loop
|
|
||||||
List<BookEntity> sourceBooks = new ArrayList<>();
|
List<BookEntity> sourceBooks = new ArrayList<>();
|
||||||
for (Long sourceBookId : uniqueSourceBookIds) {
|
for (Long sourceBookId : uniqueSourceBookIds) {
|
||||||
BookEntity sourceBook = bookRepository.findByIdWithBookFiles(sourceBookId)
|
BookEntity sourceBook = bookRepository.findByIdWithBookFiles(sourceBookId)
|
||||||
@@ -63,17 +62,12 @@ public class BookFileAttachmentService {
|
|||||||
sourceBooks.add(sourceBook);
|
sourceBooks.add(sourceBook);
|
||||||
}
|
}
|
||||||
|
|
||||||
// === VALIDATION PHASE - Do all validation BEFORE any file operations ===
|
|
||||||
|
|
||||||
// Validate target has a primary file
|
|
||||||
BookFileEntity targetPrimaryFile = targetBook.getBookFiles().stream()
|
BookFileEntity targetPrimaryFile = targetBook.getBookFiles().stream()
|
||||||
.filter(BookFileEntity::isBookFormat)
|
.filter(BookFileEntity::isBookFormat)
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElseThrow(() -> ApiError.GENERIC_BAD_REQUEST.createException("Target book has no primary file"));
|
.orElseThrow(() -> ApiError.GENERIC_BAD_REQUEST.createException("Target book has no primary file"));
|
||||||
|
|
||||||
// Validate all source books upfront
|
|
||||||
for (BookEntity sourceBook : sourceBooks) {
|
for (BookEntity sourceBook : sourceBooks) {
|
||||||
// Validate same library
|
|
||||||
if (!targetBook.getLibrary().getId().equals(sourceBook.getLibrary().getId())) {
|
if (!targetBook.getLibrary().getId().equals(sourceBook.getLibrary().getId())) {
|
||||||
throw ApiError.GENERIC_BAD_REQUEST.createException("Source book " + sourceBook.getId() + " must be in the same library as target");
|
throw ApiError.GENERIC_BAD_REQUEST.createException("Source book " + sourceBook.getId() + " must be in the same library as target");
|
||||||
}
|
}
|
||||||
@@ -100,34 +94,54 @@ public class BookFileAttachmentService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<Long> deletedSourceBookIds;
|
||||||
if (moveFiles) {
|
if (moveFiles) {
|
||||||
attachWithFileMove(targetBook, sourceBooks, targetPrimaryFile);
|
deletedSourceBookIds = attachWithFileMove(targetBook, sourceBooks, targetPrimaryFile);
|
||||||
} else {
|
} else {
|
||||||
attachWithoutFileMove(targetBook, sourceBooks);
|
deletedSourceBookIds = attachWithoutFileMove(targetBook, sourceBooks);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return updated target book
|
return new AttachBookFileResponse(getUpdatedBook(targetBookId), deletedSourceBookIds);
|
||||||
return getUpdatedBook(targetBookId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void attachWithoutFileMove(BookEntity targetBook, List<BookEntity> sourceBooks) {
|
private List<Long> attachWithoutFileMove(BookEntity targetBook, List<BookEntity> sourceBooks) {
|
||||||
List<Long> sourceBooksToDeleteIds = new ArrayList<>();
|
List<Long> sourceBooksToDeleteIds = new ArrayList<>();
|
||||||
|
Path targetLibraryRoot = Paths.get(targetBook.getLibraryPath().getPath()).toAbsolutePath().normalize();
|
||||||
|
|
||||||
for (BookEntity sourceBook : sourceBooks) {
|
for (BookEntity sourceBook : sourceBooks) {
|
||||||
List<Long> bookFileIds = sourceBook.getBookFiles().stream()
|
boolean sameLibraryPath = sourceBook.getLibraryPath().getId().equals(targetBook.getLibraryPath().getId());
|
||||||
|
List<BookFileEntity> bookFormatFiles = sourceBook.getBookFiles().stream()
|
||||||
.filter(BookFileEntity::isBookFormat)
|
.filter(BookFileEntity::isBookFormat)
|
||||||
.map(BookFileEntity::getId)
|
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
if (!bookFileIds.isEmpty()) {
|
if (!bookFormatFiles.isEmpty()) {
|
||||||
|
if (sameLibraryPath) {
|
||||||
|
List<Long> bookFileIds = bookFormatFiles.stream()
|
||||||
|
.map(BookFileEntity::getId)
|
||||||
|
.toList();
|
||||||
entityManager.createQuery(
|
entityManager.createQuery(
|
||||||
"UPDATE BookFileEntity bf SET bf.book.id = :targetId WHERE bf.id IN :fileIds")
|
"UPDATE BookFileEntity bf SET bf.book.id = :targetId WHERE bf.id IN :fileIds")
|
||||||
.setParameter("targetId", targetBook.getId())
|
.setParameter("targetId", targetBook.getId())
|
||||||
.setParameter("fileIds", bookFileIds)
|
.setParameter("fileIds", bookFileIds)
|
||||||
.executeUpdate();
|
.executeUpdate();
|
||||||
|
} else {
|
||||||
|
Path sourceLibraryRoot = Paths.get(sourceBook.getLibraryPath().getPath()).toAbsolutePath().normalize();
|
||||||
|
for (BookFileEntity file : bookFormatFiles) {
|
||||||
|
Path fileDir = sourceLibraryRoot.resolve(file.getFileSubPath()).normalize();
|
||||||
|
String newSubPath = fileDir.equals(targetLibraryRoot)
|
||||||
|
? ""
|
||||||
|
: targetLibraryRoot.relativize(fileDir).toString();
|
||||||
|
entityManager.createQuery(
|
||||||
|
"UPDATE BookFileEntity bf SET bf.book.id = :targetId, bf.fileSubPath = :subPath WHERE bf.id = :fileId")
|
||||||
|
.setParameter("targetId", targetBook.getId())
|
||||||
|
.setParameter("subPath", newSubPath)
|
||||||
|
.setParameter("fileId", file.getId())
|
||||||
|
.executeUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
long remainingBookFiles = sourceBook.getBookFiles().size() - bookFileIds.size();
|
long remainingBookFiles = sourceBook.getBookFiles().size() - bookFormatFiles.size();
|
||||||
if (remainingBookFiles == 0) {
|
if (remainingBookFiles == 0) {
|
||||||
sourceBooksToDeleteIds.add(sourceBook.getId());
|
sourceBooksToDeleteIds.add(sourceBook.getId());
|
||||||
}
|
}
|
||||||
@@ -140,9 +154,11 @@ public class BookFileAttachmentService {
|
|||||||
List<BookEntity> booksToDelete = bookRepository.findAllById(sourceBooksToDeleteIds);
|
List<BookEntity> booksToDelete = bookRepository.findAllById(sourceBooksToDeleteIds);
|
||||||
bookRepository.deleteAll(booksToDelete);
|
bookRepository.deleteAll(booksToDelete);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return sourceBooksToDeleteIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void attachWithFileMove(BookEntity targetBook, List<BookEntity> sourceBooks,
|
private List<Long> attachWithFileMove(BookEntity targetBook, List<BookEntity> sourceBooks,
|
||||||
BookFileEntity targetPrimaryFile) {
|
BookFileEntity targetPrimaryFile) {
|
||||||
String fileNamingPattern = fileMoveHelper.getFileNamingPattern(targetBook.getLibrary());
|
String fileNamingPattern = fileMoveHelper.getFileNamingPattern(targetBook.getLibrary());
|
||||||
String patternResolvedPath = PathPatternResolver.resolvePattern(targetBook, targetPrimaryFile, fileNamingPattern);
|
String patternResolvedPath = PathPatternResolver.resolvePattern(targetBook, targetPrimaryFile, fileNamingPattern);
|
||||||
@@ -306,6 +322,10 @@ public class BookFileAttachmentService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<Long> deletedSourceBookIds = sourceBooksToDelete.stream()
|
||||||
|
.map(BookEntity::getId)
|
||||||
|
.toList();
|
||||||
|
|
||||||
if (!sourceBooksToDelete.isEmpty()) {
|
if (!sourceBooksToDelete.isEmpty()) {
|
||||||
bookRepository.deleteAll(sourceBooksToDelete);
|
bookRepository.deleteAll(sourceBooksToDelete);
|
||||||
}
|
}
|
||||||
@@ -319,6 +339,8 @@ public class BookFileAttachmentService {
|
|||||||
for (Path sourceDir : sourceDirectoriesToCleanup) {
|
for (Path sourceDir : sourceDirectoriesToCleanup) {
|
||||||
bookService.deleteEmptyParentDirsUpToLibraryFolders(sourceDir, libraryRoots);
|
bookService.deleteEmptyParentDirsUpToLibraryFolders(sourceDir, libraryRoots);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return deletedSourceBookIds;
|
||||||
} finally {
|
} finally {
|
||||||
for (Path path : pathsToReregister) {
|
for (Path path : pathsToReregister) {
|
||||||
if (Files.exists(path) && Files.isDirectory(path)) {
|
if (Files.exists(path) && Files.isDirectory(path)) {
|
||||||
@@ -356,7 +378,6 @@ public class BookFileAttachmentService {
|
|||||||
return originalFileName;
|
return originalFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract base name and extension
|
|
||||||
String baseName;
|
String baseName;
|
||||||
String extension;
|
String extension;
|
||||||
int lastDotIndex = originalFileName.lastIndexOf('.');
|
int lastDotIndex = originalFileName.lastIndexOf('.');
|
||||||
@@ -368,7 +389,6 @@ public class BookFileAttachmentService {
|
|||||||
extension = "";
|
extension = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try with incrementing suffix
|
|
||||||
int counter = 1;
|
int counter = 1;
|
||||||
String newFileName;
|
String newFileName;
|
||||||
do {
|
do {
|
||||||
|
|||||||
@@ -0,0 +1,222 @@
|
|||||||
|
package org.booklore.service.book;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.booklore.config.security.service.AuthenticationService;
|
||||||
|
import org.booklore.exception.ApiError;
|
||||||
|
import org.booklore.mapper.BookMapper;
|
||||||
|
import org.booklore.model.dto.Book;
|
||||||
|
import org.booklore.model.dto.BookLoreUser;
|
||||||
|
import org.booklore.model.dto.response.DetachBookFileResponse;
|
||||||
|
import org.booklore.model.entity.BookEntity;
|
||||||
|
import org.booklore.model.entity.BookFileEntity;
|
||||||
|
import org.booklore.model.entity.BookMetadataEntity;
|
||||||
|
import org.booklore.model.entity.LibraryPathEntity;
|
||||||
|
import org.booklore.model.entity.UserBookFileProgressEntity;
|
||||||
|
import org.booklore.model.entity.UserBookProgressEntity;
|
||||||
|
import org.booklore.model.enums.AuditAction;
|
||||||
|
import org.booklore.repository.BookRepository;
|
||||||
|
import org.booklore.repository.UserBookProgressRepository;
|
||||||
|
import org.booklore.service.audit.AuditService;
|
||||||
|
import org.booklore.service.metadata.BookCoverService;
|
||||||
|
import org.booklore.service.progress.ReadingProgressService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
import java.time.Instant;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class BookFileDetachmentService {
|
||||||
|
|
||||||
|
private final BookRepository bookRepository;
|
||||||
|
private final UserBookProgressRepository userBookProgressRepository;
|
||||||
|
private final AuthenticationService authenticationService;
|
||||||
|
private final ReadingProgressService readingProgressService;
|
||||||
|
private final BookMapper bookMapper;
|
||||||
|
private final BookService bookService;
|
||||||
|
private final AuditService auditService;
|
||||||
|
private final BookCoverService bookCoverService;
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public DetachBookFileResponse detachBookFile(Long bookId, Long fileId, boolean copyMetadata) {
|
||||||
|
BookEntity sourceBook = bookRepository.findByIdWithBookFiles(bookId)
|
||||||
|
.orElseThrow(() -> ApiError.BOOK_NOT_FOUND.createException(bookId));
|
||||||
|
|
||||||
|
BookFileEntity targetFile = sourceBook.getBookFiles().stream()
|
||||||
|
.filter(f -> f.getId().equals(fileId))
|
||||||
|
.findFirst()
|
||||||
|
.orElseThrow(() -> ApiError.GENERIC_BAD_REQUEST.createException("File not found on this book"));
|
||||||
|
|
||||||
|
if (sourceBook.getBookFiles().size() <= 1) {
|
||||||
|
throw ApiError.GENERIC_BAD_REQUEST.createException("Cannot detach the only file from a book");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (targetFile.isBookFormat()) {
|
||||||
|
long bookFormatCount = sourceBook.getBookFiles().stream()
|
||||||
|
.filter(BookFileEntity::isBookFormat)
|
||||||
|
.count();
|
||||||
|
if (bookFormatCount == 1) {
|
||||||
|
boolean hasSupplementaryOnly = sourceBook.getBookFiles().stream()
|
||||||
|
.anyMatch(f -> !f.isBookFormat());
|
||||||
|
if (hasSupplementaryOnly) {
|
||||||
|
throw ApiError.GENERIC_BAD_REQUEST.createException(
|
||||||
|
"Cannot detach the only book format file. The book would be left with only supplementary files.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Path fileDiskPath = targetFile.getFullFilePath();
|
||||||
|
LibraryPathEntity newLibraryPath = resolveLibraryPath(sourceBook, fileDiskPath);
|
||||||
|
String newFileSubPath = computeFileSubPath(newLibraryPath, fileDiskPath);
|
||||||
|
|
||||||
|
BookEntity newBook = BookEntity.builder()
|
||||||
|
.library(sourceBook.getLibrary())
|
||||||
|
.libraryPath(newLibraryPath)
|
||||||
|
.addedOn(Instant.now())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
BookMetadataEntity newMetadata;
|
||||||
|
if (copyMetadata) {
|
||||||
|
newMetadata = copyMetadataFrom(sourceBook.getMetadata());
|
||||||
|
} else {
|
||||||
|
newMetadata = BookMetadataEntity.builder().build();
|
||||||
|
String title = deriveTitle(targetFile.getFileName());
|
||||||
|
newMetadata.setTitle(title);
|
||||||
|
}
|
||||||
|
newMetadata.setBook(newBook);
|
||||||
|
newBook.setMetadata(newMetadata);
|
||||||
|
|
||||||
|
sourceBook.getBookFiles().remove(targetFile);
|
||||||
|
targetFile.setFileSubPath(newFileSubPath);
|
||||||
|
targetFile.setBook(newBook);
|
||||||
|
|
||||||
|
newBook = bookRepository.saveAndFlush(newBook);
|
||||||
|
|
||||||
|
try {
|
||||||
|
bookCoverService.regenerateCover(newBook.getId());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.warn("Failed to generate cover for detached book {}: {}", newBook.getId(), e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
auditService.log(AuditAction.BOOK_FILE_DETACHED, "Book", bookId,
|
||||||
|
"Detached file '" + targetFile.getFileName() + "' from book " + bookId + " to new book " + newBook.getId());
|
||||||
|
|
||||||
|
Book sourceBookDto = getUpdatedBook(sourceBook.getId());
|
||||||
|
Book newBookDto = getUpdatedBook(newBook.getId());
|
||||||
|
|
||||||
|
return new DetachBookFileResponse(sourceBookDto, newBookDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
private BookMetadataEntity copyMetadataFrom(BookMetadataEntity source) {
|
||||||
|
if (source == null) {
|
||||||
|
return BookMetadataEntity.builder().build();
|
||||||
|
}
|
||||||
|
|
||||||
|
BookMetadataEntity copy = BookMetadataEntity.builder().build();
|
||||||
|
copy.setTitle(source.getTitle());
|
||||||
|
copy.setSubtitle(source.getSubtitle());
|
||||||
|
copy.setPublisher(source.getPublisher());
|
||||||
|
copy.setPublishedDate(source.getPublishedDate());
|
||||||
|
copy.setDescription(source.getDescription());
|
||||||
|
copy.setSeriesName(source.getSeriesName());
|
||||||
|
copy.setSeriesNumber(source.getSeriesNumber());
|
||||||
|
copy.setSeriesTotal(source.getSeriesTotal());
|
||||||
|
copy.setIsbn13(source.getIsbn13());
|
||||||
|
copy.setIsbn10(source.getIsbn10());
|
||||||
|
copy.setPageCount(source.getPageCount());
|
||||||
|
copy.setLanguage(source.getLanguage());
|
||||||
|
copy.setRating(source.getRating());
|
||||||
|
copy.setReviewCount(source.getReviewCount());
|
||||||
|
copy.setAmazonRating(source.getAmazonRating());
|
||||||
|
copy.setAmazonReviewCount(source.getAmazonReviewCount());
|
||||||
|
copy.setGoodreadsRating(source.getGoodreadsRating());
|
||||||
|
copy.setGoodreadsReviewCount(source.getGoodreadsReviewCount());
|
||||||
|
copy.setHardcoverRating(source.getHardcoverRating());
|
||||||
|
copy.setHardcoverReviewCount(source.getHardcoverReviewCount());
|
||||||
|
copy.setLubimyczytacRating(source.getLubimyczytacRating());
|
||||||
|
copy.setRanobedbRating(source.getRanobedbRating());
|
||||||
|
copy.setAudibleRating(source.getAudibleRating());
|
||||||
|
copy.setAudibleReviewCount(source.getAudibleReviewCount());
|
||||||
|
copy.setAsin(source.getAsin());
|
||||||
|
copy.setGoodreadsId(source.getGoodreadsId());
|
||||||
|
copy.setHardcoverId(source.getHardcoverId());
|
||||||
|
copy.setHardcoverBookId(source.getHardcoverBookId());
|
||||||
|
copy.setGoogleId(source.getGoogleId());
|
||||||
|
copy.setComicvineId(source.getComicvineId());
|
||||||
|
copy.setLubimyczytacId(source.getLubimyczytacId());
|
||||||
|
copy.setRanobedbId(source.getRanobedbId());
|
||||||
|
copy.setAudibleId(source.getAudibleId());
|
||||||
|
copy.setNarrator(source.getNarrator());
|
||||||
|
copy.setAbridged(source.getAbridged());
|
||||||
|
copy.setAgeRating(source.getAgeRating());
|
||||||
|
copy.setContentRating(source.getContentRating());
|
||||||
|
|
||||||
|
if (source.getAuthors() != null) {
|
||||||
|
copy.setAuthors(new HashSet<>(source.getAuthors()));
|
||||||
|
}
|
||||||
|
if (source.getCategories() != null) {
|
||||||
|
copy.setCategories(new HashSet<>(source.getCategories()));
|
||||||
|
}
|
||||||
|
if (source.getMoods() != null) {
|
||||||
|
copy.setMoods(new HashSet<>(source.getMoods()));
|
||||||
|
}
|
||||||
|
if (source.getTags() != null) {
|
||||||
|
copy.setTags(new HashSet<>(source.getTags()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String deriveTitle(String fileName) {
|
||||||
|
if (fileName == null || fileName.isBlank()) {
|
||||||
|
return "Untitled";
|
||||||
|
}
|
||||||
|
int lastDot = fileName.lastIndexOf('.');
|
||||||
|
return lastDot > 0 ? fileName.substring(0, lastDot) : fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
private LibraryPathEntity resolveLibraryPath(BookEntity sourceBook, Path fileDiskPath) {
|
||||||
|
Path normalizedFilePath = fileDiskPath.toAbsolutePath().normalize();
|
||||||
|
return sourceBook.getLibrary().getLibraryPaths().stream()
|
||||||
|
.map(lp -> Map.entry(lp, Paths.get(lp.getPath()).toAbsolutePath().normalize()))
|
||||||
|
.filter(entry -> normalizedFilePath.startsWith(entry.getValue()))
|
||||||
|
.max(Comparator.comparingInt(entry -> entry.getValue().getNameCount()))
|
||||||
|
.map(Map.Entry::getKey)
|
||||||
|
.orElse(sourceBook.getLibraryPath());
|
||||||
|
}
|
||||||
|
|
||||||
|
private String computeFileSubPath(LibraryPathEntity libraryPath, Path fileDiskPath) {
|
||||||
|
Path libraryRoot = Paths.get(libraryPath.getPath()).toAbsolutePath().normalize();
|
||||||
|
Path fileDir = fileDiskPath.toAbsolutePath().normalize().getParent();
|
||||||
|
if (fileDir == null || fileDir.equals(libraryRoot)) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return libraryRoot.relativize(fileDir).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Book getUpdatedBook(Long bookId) {
|
||||||
|
BookLoreUser user = authenticationService.getAuthenticatedUser();
|
||||||
|
BookEntity refreshedBook = bookRepository.findByIdWithBookFiles(bookId)
|
||||||
|
.orElseThrow(() -> ApiError.BOOK_NOT_FOUND.createException(bookId));
|
||||||
|
|
||||||
|
UserBookProgressEntity userProgress = userBookProgressRepository.findByUserIdAndBookId(user.getId(), bookId)
|
||||||
|
.orElse(new UserBookProgressEntity());
|
||||||
|
UserBookFileProgressEntity fileProgress = readingProgressService
|
||||||
|
.fetchUserFileProgress(user.getId(), Set.of(bookId))
|
||||||
|
.get(bookId);
|
||||||
|
|
||||||
|
Book book = bookMapper.toBook(refreshedBook);
|
||||||
|
book.setShelves(bookService.filterShelvesByUserId(book.getShelves(), user.getId()));
|
||||||
|
readingProgressService.enrichBookWithProgress(book, userProgress, fileProgress);
|
||||||
|
|
||||||
|
return book;
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -233,7 +233,7 @@ public class AudiobookProcessor extends AbstractFileProcessor implements BookFil
|
|||||||
setAudiobookTechnicalMetadata(bookEntity, audioMetadata);
|
setAudiobookTechnicalMetadata(bookEntity, audioMetadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setAudiobookTechnicalMetadata(BookEntity bookEntity, BookMetadata audioMetadata) {
|
public void setAudiobookTechnicalMetadata(BookEntity bookEntity, BookMetadata audioMetadata) {
|
||||||
AudiobookMetadata audiobookDto = audioMetadata.getAudiobookMetadata();
|
AudiobookMetadata audiobookDto = audioMetadata.getAudiobookMetadata();
|
||||||
if (audiobookDto == null) {
|
if (audiobookDto == null) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -11,11 +11,13 @@ import org.booklore.model.websocket.Topic;
|
|||||||
import org.booklore.repository.LibraryRepository;
|
import org.booklore.repository.LibraryRepository;
|
||||||
import org.booklore.repository.BookRepository;
|
import org.booklore.repository.BookRepository;
|
||||||
import org.booklore.service.NotificationService;
|
import org.booklore.service.NotificationService;
|
||||||
|
import org.booklore.service.fileprocessor.AudiobookProcessor;
|
||||||
import org.booklore.service.metadata.BookMetadataUpdater;
|
import org.booklore.service.metadata.BookMetadataUpdater;
|
||||||
import org.booklore.service.metadata.extractor.MetadataExtractorFactory;
|
import org.booklore.service.metadata.extractor.MetadataExtractorFactory;
|
||||||
import org.booklore.task.options.RescanLibraryContext;
|
import org.booklore.task.options.RescanLibraryContext;
|
||||||
import org.booklore.task.TaskCancellationManager;
|
import org.booklore.task.TaskCancellationManager;
|
||||||
import org.booklore.task.TaskStatus;
|
import org.booklore.task.TaskStatus;
|
||||||
|
import org.booklore.model.enums.BookFileType;
|
||||||
import org.booklore.model.enums.TaskType;
|
import org.booklore.model.enums.TaskType;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
@@ -34,14 +36,16 @@ public class LibraryRescanHelper {
|
|||||||
private final NotificationService notificationService;
|
private final NotificationService notificationService;
|
||||||
private final TaskCancellationManager cancellationManager;
|
private final TaskCancellationManager cancellationManager;
|
||||||
private final BookRepository bookRepository;
|
private final BookRepository bookRepository;
|
||||||
|
private final AudiobookProcessor audiobookProcessor;
|
||||||
|
|
||||||
public LibraryRescanHelper(LibraryRepository libraryRepository, MetadataExtractorFactory metadataExtractorFactory, @Lazy BookMetadataUpdater bookMetadataUpdater, NotificationService notificationService, TaskCancellationManager cancellationManager, BookRepository bookRepository) {
|
public LibraryRescanHelper(LibraryRepository libraryRepository, MetadataExtractorFactory metadataExtractorFactory, @Lazy BookMetadataUpdater bookMetadataUpdater, NotificationService notificationService, TaskCancellationManager cancellationManager, BookRepository bookRepository, AudiobookProcessor audiobookProcessor) {
|
||||||
this.libraryRepository = libraryRepository;
|
this.libraryRepository = libraryRepository;
|
||||||
this.metadataExtractorFactory = metadataExtractorFactory;
|
this.metadataExtractorFactory = metadataExtractorFactory;
|
||||||
this.bookMetadataUpdater = bookMetadataUpdater;
|
this.bookMetadataUpdater = bookMetadataUpdater;
|
||||||
this.notificationService = notificationService;
|
this.notificationService = notificationService;
|
||||||
this.cancellationManager = cancellationManager;
|
this.cancellationManager = cancellationManager;
|
||||||
this.bookRepository = bookRepository;
|
this.bookRepository = bookRepository;
|
||||||
|
this.audiobookProcessor = audiobookProcessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -105,6 +109,10 @@ public class LibraryRescanHelper {
|
|||||||
.mergeTags(true)
|
.mergeTags(true)
|
||||||
.build();
|
.build();
|
||||||
bookMetadataUpdater.setBookMetadata(metadataUpdateContext);
|
bookMetadataUpdater.setBookMetadata(metadataUpdateContext);
|
||||||
|
|
||||||
|
if (bookEntity.getPrimaryBookFile().getBookType() == BookFileType.AUDIOBOOK && bookMetadata.getAudiobookMetadata() != null) {
|
||||||
|
audiobookProcessor.setAudiobookTechnicalMetadata(bookEntity, bookMetadata);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Failed to update metadata for book id={} path={}: {}", bookEntity.getId(), bookEntity.getFullFilePath(), e.getMessage(), e);
|
log.error("Failed to update metadata for book id={} path={}: {}", bookEntity.getId(), bookEntity.getFullFilePath(), e.getMessage(), e);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
+23
-1
@@ -1,10 +1,12 @@
|
|||||||
package org.booklore.service.metadata.extractor;
|
package org.booklore.service.metadata.extractor;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.booklore.model.dto.AudiobookMetadata;
|
import org.booklore.model.dto.AudiobookMetadata;
|
||||||
import org.booklore.model.dto.BookMetadata;
|
import org.booklore.model.dto.BookMetadata;
|
||||||
|
import org.booklore.service.reader.FfprobeService;
|
||||||
import org.jaudiotagger.audio.AudioFile;
|
import org.jaudiotagger.audio.AudioFile;
|
||||||
import org.jaudiotagger.audio.AudioFileIO;
|
import org.jaudiotagger.audio.AudioFileIO;
|
||||||
import org.jaudiotagger.audio.AudioHeader;
|
import org.jaudiotagger.audio.AudioHeader;
|
||||||
@@ -22,6 +24,7 @@ import tools.jackson.databind.ObjectMapper;
|
|||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.nio.file.Path;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@@ -32,8 +35,11 @@ import java.util.logging.Logger;
|
|||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
|
@AllArgsConstructor
|
||||||
public class AudiobookMetadataExtractor implements FileMetadataExtractor {
|
public class AudiobookMetadataExtractor implements FileMetadataExtractor {
|
||||||
|
|
||||||
|
private final FfprobeService ffprobeService;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
Logger.getLogger("org.jaudiotagger").setLevel(Level.WARNING);
|
Logger.getLogger("org.jaudiotagger").setLevel(Level.WARNING);
|
||||||
}
|
}
|
||||||
@@ -210,6 +216,16 @@ public class AudiobookMetadataExtractor implements FileMetadataExtractor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<AudiobookMetadata.ChapterInfo> extractChaptersFromFile(File audioFile) {
|
||||||
|
try {
|
||||||
|
AudioFile f = AudioFileIO.read(audioFile);
|
||||||
|
return extractChapters(audioFile, f, f.getAudioHeader());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.warn("Failed to extract chapters from {}: {}", audioFile.getName(), e.getMessage());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private List<AudiobookMetadata.ChapterInfo> extractChapters(File audioFile, AudioFile taggedFile, AudioHeader header) {
|
private List<AudiobookMetadata.ChapterInfo> extractChapters(File audioFile, AudioFile taggedFile, AudioHeader header) {
|
||||||
List<AudiobookMetadata.ChapterInfo> chapters = extractId3v2Chapters(taggedFile);
|
List<AudiobookMetadata.ChapterInfo> chapters = extractId3v2Chapters(taggedFile);
|
||||||
if (chapters != null && !chapters.isEmpty()) {
|
if (chapters != null && !chapters.isEmpty()) {
|
||||||
@@ -322,8 +338,14 @@ public class AudiobookMetadataExtractor implements FileMetadataExtractor {
|
|||||||
List<AudiobookMetadata.ChapterInfo> chapters = new ArrayList<>();
|
List<AudiobookMetadata.ChapterInfo> chapters = new ArrayList<>();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Path ffprobeBinary = ffprobeService.getFfprobeBinary();
|
||||||
|
if (ffprobeBinary == null) {
|
||||||
|
log.debug("ffprobe binary not available, skipping chapter extraction for {}", audioFile.getName());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
ProcessBuilder pb = new ProcessBuilder(
|
ProcessBuilder pb = new ProcessBuilder(
|
||||||
"ffprobe",
|
ffprobeBinary.toAbsolutePath().toString(),
|
||||||
"-v", "quiet",
|
"-v", "quiet",
|
||||||
"-print_format", "json",
|
"-print_format", "json",
|
||||||
"-show_chapters",
|
"-show_chapters",
|
||||||
|
|||||||
@@ -16,13 +16,16 @@ import org.booklore.repository.BookRepository;
|
|||||||
import org.booklore.repository.MagicShelfRepository;
|
import org.booklore.repository.MagicShelfRepository;
|
||||||
import org.booklore.repository.UserRepository;
|
import org.booklore.repository.UserRepository;
|
||||||
import org.booklore.service.BookRuleEvaluatorService;
|
import org.booklore.service.BookRuleEvaluatorService;
|
||||||
|
import org.booklore.service.restriction.ContentRestrictionService;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.PageImpl;
|
||||||
import org.springframework.data.domain.PageRequest;
|
import org.springframework.data.domain.PageRequest;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.data.jpa.domain.Specification;
|
import org.springframework.data.jpa.domain.Specification;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import tools.jackson.databind.ObjectMapper;
|
import tools.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -37,6 +40,7 @@ public class MagicShelfBookService {
|
|||||||
private final UserRepository userRepository;
|
private final UserRepository userRepository;
|
||||||
private final BookLoreUserTransformer bookLoreUserTransformer;
|
private final BookLoreUserTransformer bookLoreUserTransformer;
|
||||||
private final BookRuleEvaluatorService ruleEvaluatorService;
|
private final BookRuleEvaluatorService ruleEvaluatorService;
|
||||||
|
private final ContentRestrictionService contentRestrictionService;
|
||||||
private final ObjectMapper objectMapper;
|
private final ObjectMapper objectMapper;
|
||||||
|
|
||||||
public Page<Book> getBooksByMagicShelfId(Long userId, Long magicShelfId, int page, int size) {
|
public Page<Book> getBooksByMagicShelfId(Long userId, Long magicShelfId, int page, int size) {
|
||||||
@@ -49,7 +53,12 @@ public class MagicShelfBookService {
|
|||||||
|
|
||||||
Page<BookEntity> booksPage = bookRepository.findAll(specification, pageable);
|
Page<BookEntity> booksPage = bookRepository.findAll(specification, pageable);
|
||||||
|
|
||||||
return booksPage.map(bookMapper::toBook).map(book -> filterBook(book, userId));
|
List<BookEntity> filteredEntities = contentRestrictionService.applyRestrictions(booksPage.getContent(), userId);
|
||||||
|
List<Book> books = filteredEntities.stream()
|
||||||
|
.map(bookMapper::toBook)
|
||||||
|
.map(book -> filterBook(book, userId))
|
||||||
|
.toList();
|
||||||
|
return new PageImpl<>(books, pageable, booksPage.getTotalElements());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Failed to parse or execute magic shelf rules", e);
|
log.error("Failed to parse or execute magic shelf rules", e);
|
||||||
throw new RuntimeException("Failed to parse or execute magic shelf rules: " + e.getMessage(), e);
|
throw new RuntimeException("Failed to parse or execute magic shelf rules: " + e.getMessage(), e);
|
||||||
|
|||||||
@@ -12,8 +12,10 @@ import org.booklore.model.enums.OpdsSortOrder;
|
|||||||
import org.booklore.repository.BookOpdsRepository;
|
import org.booklore.repository.BookOpdsRepository;
|
||||||
import org.booklore.repository.ShelfRepository;
|
import org.booklore.repository.ShelfRepository;
|
||||||
import org.booklore.repository.UserRepository;
|
import org.booklore.repository.UserRepository;
|
||||||
|
import org.booklore.repository.BookRepository;
|
||||||
import org.booklore.util.BookUtils;
|
import org.booklore.util.BookUtils;
|
||||||
import org.booklore.service.library.LibraryService;
|
import org.booklore.service.library.LibraryService;
|
||||||
|
import org.booklore.service.restriction.ContentRestrictionService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
@@ -32,11 +34,13 @@ import java.util.stream.Collectors;
|
|||||||
public class OpdsBookService {
|
public class OpdsBookService {
|
||||||
|
|
||||||
private final BookOpdsRepository bookOpdsRepository;
|
private final BookOpdsRepository bookOpdsRepository;
|
||||||
|
private final BookRepository bookRepository;
|
||||||
private final BookMapper bookMapper;
|
private final BookMapper bookMapper;
|
||||||
private final UserRepository userRepository;
|
private final UserRepository userRepository;
|
||||||
private final BookLoreUserTransformer bookLoreUserTransformer;
|
private final BookLoreUserTransformer bookLoreUserTransformer;
|
||||||
private final ShelfRepository shelfRepository;
|
private final ShelfRepository shelfRepository;
|
||||||
private final LibraryService libraryService;
|
private final LibraryService libraryService;
|
||||||
|
private final ContentRestrictionService contentRestrictionService;
|
||||||
|
|
||||||
public List<Library> getAccessibleLibraries(Long userId) {
|
public List<Library> getAccessibleLibraries(Long userId) {
|
||||||
if (userId == null) {
|
if (userId == null) {
|
||||||
@@ -76,28 +80,28 @@ public class OpdsBookService {
|
|||||||
if (shelfIds != null && !shelfIds.isEmpty()) {
|
if (shelfIds != null && !shelfIds.isEmpty()) {
|
||||||
validateShelfAccess(shelfIds, user.getId(), isAdmin);
|
validateShelfAccess(shelfIds, user.getId(), isAdmin);
|
||||||
Page<Book> books = query != null && !query.isBlank()
|
Page<Book> books = query != null && !query.isBlank()
|
||||||
? searchByMetadataInShelvesPageInternal(BookUtils.normalizeForSearch(query), shelfIds, page, size)
|
? searchByMetadataInShelvesPageInternal(BookUtils.normalizeForSearch(query), shelfIds, page, size, userId)
|
||||||
: getBooksByShelfIdsPageInternal(shelfIds, page, size);
|
: getBooksByShelfIdsPageInternal(shelfIds, page, size, userId);
|
||||||
return applyBookFilters(books, userId);
|
return applyBookFilters(books, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (libraryId != null) {
|
if (libraryId != null) {
|
||||||
validateLibraryAccess(libraryId, userLibraryIds, isAdmin);
|
validateLibraryAccess(libraryId, userLibraryIds, isAdmin);
|
||||||
Page<Book> books = query != null && !query.isBlank()
|
Page<Book> books = query != null && !query.isBlank()
|
||||||
? searchByMetadataInLibrariesPageInternal(BookUtils.normalizeForSearch(query), Set.of(libraryId), page, size)
|
? searchByMetadataInLibrariesPageInternal(BookUtils.normalizeForSearch(query), Set.of(libraryId), page, size, userId)
|
||||||
: getBooksByLibraryIdsPageInternal(Set.of(libraryId), page, size);
|
: getBooksByLibraryIdsPageInternal(Set.of(libraryId), page, size, userId);
|
||||||
return applyBookFilters(books, userId);
|
return applyBookFilters(books, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isAdmin) {
|
if (isAdmin) {
|
||||||
return query != null && !query.isBlank()
|
return query != null && !query.isBlank()
|
||||||
? searchByMetadataPageInternal(BookUtils.normalizeForSearch(query), page, size)
|
? searchByMetadataPageInternal(BookUtils.normalizeForSearch(query), page, size, null)
|
||||||
: getAllBooksPageInternal(page, size);
|
: getAllBooksPageInternal(page, size, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
Page<Book> books = query != null && !query.isBlank()
|
Page<Book> books = query != null && !query.isBlank()
|
||||||
? searchByMetadataInLibrariesPageInternal(BookUtils.normalizeForSearch(query), userLibraryIds, page, size)
|
? searchByMetadataInLibrariesPageInternal(BookUtils.normalizeForSearch(query), userLibraryIds, page, size, userId)
|
||||||
: getBooksByLibraryIdsPageInternal(userLibraryIds, page, size);
|
: getBooksByLibraryIdsPageInternal(userLibraryIds, page, size, userId);
|
||||||
return applyBookFilters(books, userId);
|
return applyBookFilters(books, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,14 +115,14 @@ public class OpdsBookService {
|
|||||||
BookLoreUser user = bookLoreUserTransformer.toDTO(entity);
|
BookLoreUser user = bookLoreUserTransformer.toDTO(entity);
|
||||||
|
|
||||||
if (user.getPermissions().isAdmin()) {
|
if (user.getPermissions().isAdmin()) {
|
||||||
return getRecentBooksPageInternal(page, size);
|
return getRecentBooksPageInternal(page, size, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<Long> libraryIds = user.getAssignedLibraries().stream()
|
Set<Long> libraryIds = user.getAssignedLibraries().stream()
|
||||||
.map(Library::getId)
|
.map(Library::getId)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
Page<Book> books = getRecentBooksByLibraryIdsPageInternal(libraryIds, page, size);
|
Page<Book> books = getRecentBooksByLibraryIdsPageInternal(libraryIds, page, size, userId);
|
||||||
return applyBookFilters(books, userId);
|
return applyBookFilters(books, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,6 +164,9 @@ public class OpdsBookService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<BookEntity> books = bookOpdsRepository.findAllWithMetadataByIds(ids.stream().limit(count).toList());
|
List<BookEntity> books = bookOpdsRepository.findAllWithMetadataByIds(ids.stream().limit(count).toList());
|
||||||
|
if (userId != null) {
|
||||||
|
books = contentRestrictionService.applyRestrictions(books, userId);
|
||||||
|
}
|
||||||
return books.stream().map(bookMapper::toBook).toList();
|
return books.stream().map(bookMapper::toBook).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,7 +215,7 @@ public class OpdsBookService {
|
|||||||
return new PageImpl<>(List.of(), pageable, 0);
|
return new PageImpl<>(List.of(), pageable, 0);
|
||||||
}
|
}
|
||||||
List<BookEntity> books = bookOpdsRepository.findAllWithFullMetadataByIds(idPage.getContent());
|
List<BookEntity> books = bookOpdsRepository.findAllWithFullMetadataByIds(idPage.getContent());
|
||||||
return createPageFromEntities(books, idPage, pageable);
|
return createPageFromEntities(books, idPage, pageable, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<Long> libraryIds = user.getAssignedLibraries().stream()
|
Set<Long> libraryIds = user.getAssignedLibraries().stream()
|
||||||
@@ -221,7 +228,7 @@ public class OpdsBookService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<BookEntity> books = bookOpdsRepository.findAllWithFullMetadataByIdsAndLibraryIds(idPage.getContent(), libraryIds);
|
List<BookEntity> books = bookOpdsRepository.findAllWithFullMetadataByIdsAndLibraryIds(idPage.getContent(), libraryIds);
|
||||||
Page<Book> booksPage = createPageFromEntities(books, idPage, pageable);
|
Page<Book> booksPage = createPageFromEntities(books, idPage, pageable, userId);
|
||||||
return applyBookFilters(booksPage, userId);
|
return applyBookFilters(booksPage, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,7 +269,7 @@ public class OpdsBookService {
|
|||||||
return new PageImpl<>(List.of(), pageable, 0);
|
return new PageImpl<>(List.of(), pageable, 0);
|
||||||
}
|
}
|
||||||
List<BookEntity> books = bookOpdsRepository.findAllWithFullMetadataByIds(idPage.getContent());
|
List<BookEntity> books = bookOpdsRepository.findAllWithFullMetadataByIds(idPage.getContent());
|
||||||
return createPageFromEntities(books, idPage, pageable);
|
return createPageFromEntities(books, idPage, pageable, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<Long> libraryIds = user.getAssignedLibraries().stream()
|
Set<Long> libraryIds = user.getAssignedLibraries().stream()
|
||||||
@@ -275,11 +282,11 @@ public class OpdsBookService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<BookEntity> books = bookOpdsRepository.findAllWithFullMetadataByIdsAndLibraryIds(idPage.getContent(), libraryIds);
|
List<BookEntity> books = bookOpdsRepository.findAllWithFullMetadataByIdsAndLibraryIds(idPage.getContent(), libraryIds);
|
||||||
Page<Book> booksPage = createPageFromEntities(books, idPage, pageable);
|
Page<Book> booksPage = createPageFromEntities(books, idPage, pageable, userId);
|
||||||
return applyBookFilters(booksPage, userId);
|
return applyBookFilters(booksPage, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Page<Book> getAllBooksPageInternal(int page, int size) {
|
private Page<Book> getAllBooksPageInternal(int page, int size, Long userId) {
|
||||||
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
||||||
|
|
||||||
Page<Long> idPage = bookOpdsRepository.findBookIds(pageable);
|
Page<Long> idPage = bookOpdsRepository.findBookIds(pageable);
|
||||||
@@ -288,10 +295,10 @@ public class OpdsBookService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<BookEntity> books = bookOpdsRepository.findAllWithMetadataByIds(idPage.getContent());
|
List<BookEntity> books = bookOpdsRepository.findAllWithMetadataByIds(idPage.getContent());
|
||||||
return createPageFromEntities(books, idPage, pageable);
|
return createPageFromEntities(books, idPage, pageable, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Page<Book> getRecentBooksPageInternal(int page, int size) {
|
private Page<Book> getRecentBooksPageInternal(int page, int size, Long userId) {
|
||||||
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
||||||
|
|
||||||
Page<Long> idPage = bookOpdsRepository.findRecentBookIds(pageable);
|
Page<Long> idPage = bookOpdsRepository.findRecentBookIds(pageable);
|
||||||
@@ -300,10 +307,10 @@ public class OpdsBookService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<BookEntity> books = bookOpdsRepository.findAllWithMetadataByIds(idPage.getContent());
|
List<BookEntity> books = bookOpdsRepository.findAllWithMetadataByIds(idPage.getContent());
|
||||||
return createPageFromEntities(books, idPage, pageable);
|
return createPageFromEntities(books, idPage, pageable, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Page<Book> getBooksByLibraryIdsPageInternal(Set<Long> libraryIds, int page, int size) {
|
private Page<Book> getBooksByLibraryIdsPageInternal(Set<Long> libraryIds, int page, int size, Long userId) {
|
||||||
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
||||||
|
|
||||||
Page<Long> idPage = bookOpdsRepository.findBookIdsByLibraryIds(libraryIds, pageable);
|
Page<Long> idPage = bookOpdsRepository.findBookIdsByLibraryIds(libraryIds, pageable);
|
||||||
@@ -312,10 +319,10 @@ public class OpdsBookService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<BookEntity> books = bookOpdsRepository.findAllWithMetadataByIdsAndLibraryIds(idPage.getContent(), libraryIds);
|
List<BookEntity> books = bookOpdsRepository.findAllWithMetadataByIdsAndLibraryIds(idPage.getContent(), libraryIds);
|
||||||
return createPageFromEntities(books, idPage, pageable);
|
return createPageFromEntities(books, idPage, pageable, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Page<Book> getRecentBooksByLibraryIdsPageInternal(Set<Long> libraryIds, int page, int size) {
|
private Page<Book> getRecentBooksByLibraryIdsPageInternal(Set<Long> libraryIds, int page, int size, Long userId) {
|
||||||
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
||||||
|
|
||||||
Page<Long> idPage = bookOpdsRepository.findRecentBookIdsByLibraryIds(libraryIds, pageable);
|
Page<Long> idPage = bookOpdsRepository.findRecentBookIdsByLibraryIds(libraryIds, pageable);
|
||||||
@@ -324,10 +331,10 @@ public class OpdsBookService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<BookEntity> books = bookOpdsRepository.findAllWithMetadataByIdsAndLibraryIds(idPage.getContent(), libraryIds);
|
List<BookEntity> books = bookOpdsRepository.findAllWithMetadataByIdsAndLibraryIds(idPage.getContent(), libraryIds);
|
||||||
return createPageFromEntities(books, idPage, pageable);
|
return createPageFromEntities(books, idPage, pageable, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Page<Book> getBooksByShelfIdPageInternal(Long shelfId, int page, int size) {
|
private Page<Book> getBooksByShelfIdPageInternal(Long shelfId, int page, int size, Long userId) {
|
||||||
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
||||||
|
|
||||||
Page<Long> idPage = bookOpdsRepository.findBookIdsByShelfId(shelfId, pageable);
|
Page<Long> idPage = bookOpdsRepository.findBookIdsByShelfId(shelfId, pageable);
|
||||||
@@ -336,10 +343,10 @@ public class OpdsBookService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<BookEntity> books = bookOpdsRepository.findAllWithMetadataByIdsAndShelfId(idPage.getContent(), shelfId);
|
List<BookEntity> books = bookOpdsRepository.findAllWithMetadataByIdsAndShelfId(idPage.getContent(), shelfId);
|
||||||
return createPageFromEntities(books, idPage, pageable);
|
return createPageFromEntities(books, idPage, pageable, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Page<Book> getBooksByShelfIdsPageInternal(Set<Long> shelfIds, int page, int size) {
|
private Page<Book> getBooksByShelfIdsPageInternal(Set<Long> shelfIds, int page, int size, Long userId) {
|
||||||
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
||||||
|
|
||||||
Page<Long> idPage = bookOpdsRepository.findBookIdsByShelfIds(shelfIds, pageable);
|
Page<Long> idPage = bookOpdsRepository.findBookIdsByShelfIds(shelfIds, pageable);
|
||||||
@@ -348,10 +355,10 @@ public class OpdsBookService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<BookEntity> books = bookOpdsRepository.findAllWithMetadataByIdsAndShelfIds(idPage.getContent(), shelfIds);
|
List<BookEntity> books = bookOpdsRepository.findAllWithMetadataByIdsAndShelfIds(idPage.getContent(), shelfIds);
|
||||||
return createPageFromEntities(books, idPage, pageable);
|
return createPageFromEntities(books, idPage, pageable, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Page<Book> searchByMetadataPageInternal(String text, int page, int size) {
|
private Page<Book> searchByMetadataPageInternal(String text, int page, int size, Long userId) {
|
||||||
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
||||||
|
|
||||||
Page<Long> idPage = bookOpdsRepository.findBookIdsByMetadataSearch(text, pageable);
|
Page<Long> idPage = bookOpdsRepository.findBookIdsByMetadataSearch(text, pageable);
|
||||||
@@ -360,10 +367,10 @@ public class OpdsBookService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<BookEntity> books = bookOpdsRepository.findAllWithFullMetadataByIds(idPage.getContent());
|
List<BookEntity> books = bookOpdsRepository.findAllWithFullMetadataByIds(idPage.getContent());
|
||||||
return createPageFromEntities(books, idPage, pageable);
|
return createPageFromEntities(books, idPage, pageable, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Page<Book> searchByMetadataInLibrariesPageInternal(String text, Set<Long> libraryIds, int page, int size) {
|
private Page<Book> searchByMetadataInLibrariesPageInternal(String text, Set<Long> libraryIds, int page, int size, Long userId) {
|
||||||
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
||||||
|
|
||||||
Page<Long> idPage = bookOpdsRepository.findBookIdsByMetadataSearchAndLibraryIds(text, libraryIds, pageable);
|
Page<Long> idPage = bookOpdsRepository.findBookIdsByMetadataSearchAndLibraryIds(text, libraryIds, pageable);
|
||||||
@@ -372,10 +379,10 @@ public class OpdsBookService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<BookEntity> books = bookOpdsRepository.findAllWithFullMetadataByIdsAndLibraryIds(idPage.getContent(), libraryIds);
|
List<BookEntity> books = bookOpdsRepository.findAllWithFullMetadataByIdsAndLibraryIds(idPage.getContent(), libraryIds);
|
||||||
return createPageFromEntities(books, idPage, pageable);
|
return createPageFromEntities(books, idPage, pageable, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Page<Book> searchByMetadataInShelvesPageInternal(String text, Set<Long> shelfIds, int page, int size) {
|
private Page<Book> searchByMetadataInShelvesPageInternal(String text, Set<Long> shelfIds, int page, int size, Long userId) {
|
||||||
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
Pageable pageable = PageRequest.of(Math.max(page, 0), size);
|
||||||
|
|
||||||
Page<Long> idPage = bookOpdsRepository.findBookIdsByMetadataSearchAndShelfIds(text, shelfIds, pageable);
|
Page<Long> idPage = bookOpdsRepository.findBookIdsByMetadataSearchAndShelfIds(text, shelfIds, pageable);
|
||||||
@@ -384,7 +391,7 @@ public class OpdsBookService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<BookEntity> books = bookOpdsRepository.findAllWithFullMetadataByIdsAndShelfIds(idPage.getContent(), shelfIds);
|
List<BookEntity> books = bookOpdsRepository.findAllWithFullMetadataByIdsAndShelfIds(idPage.getContent(), shelfIds);
|
||||||
return createPageFromEntities(books, idPage, pageable);
|
return createPageFromEntities(books, idPage, pageable, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateShelfAccess(Long shelfId, Long userId, boolean isAdmin) {
|
private void validateShelfAccess(Long shelfId, Long userId, boolean isAdmin) {
|
||||||
@@ -407,13 +414,49 @@ public class OpdsBookService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Page<Book> createPageFromEntities(List<BookEntity> books, Page<Long> idPage, Pageable pageable) {
|
public void validateBookContentAccess(Long bookId, Long userId) {
|
||||||
|
if (userId == null) {
|
||||||
|
throw ApiError.FORBIDDEN.createException("Authentication required");
|
||||||
|
}
|
||||||
|
|
||||||
|
BookLoreUserEntity entity = userRepository.findById(userId)
|
||||||
|
.orElseThrow(() -> ApiError.USER_NOT_FOUND.createException(userId));
|
||||||
|
|
||||||
|
if (entity.getPermissions() != null && entity.getPermissions().isPermissionAdmin()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
BookEntity book = bookRepository.findById(bookId)
|
||||||
|
.orElseThrow(() -> ApiError.BOOK_NOT_FOUND.createException(bookId));
|
||||||
|
|
||||||
|
BookLoreUser user = bookLoreUserTransformer.toDTO(entity);
|
||||||
|
boolean hasLibraryAccess = user.getAssignedLibraries().stream()
|
||||||
|
.anyMatch(library -> library.getId().equals(book.getLibrary().getId()));
|
||||||
|
|
||||||
|
if (!hasLibraryAccess) {
|
||||||
|
throw ApiError.FORBIDDEN.createException("You are not authorized to access this book.");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<BookEntity> filtered = contentRestrictionService.applyRestrictions(List.of(book), userId);
|
||||||
|
if (filtered.isEmpty()) {
|
||||||
|
throw ApiError.FORBIDDEN.createException("You are not authorized to access this book.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Page<Book> createPageFromEntities(List<BookEntity> books, Page<Long> idPage, Pageable pageable, Long userId) {
|
||||||
Map<Long, BookEntity> bookMap = books.stream()
|
Map<Long, BookEntity> bookMap = books.stream()
|
||||||
.collect(Collectors.toMap(BookEntity::getId, Function.identity()));
|
.collect(Collectors.toMap(BookEntity::getId, Function.identity()));
|
||||||
|
|
||||||
List<Book> sortedBooks = idPage.getContent().stream()
|
List<BookEntity> orderedEntities = idPage.getContent().stream()
|
||||||
.map(bookMap::get)
|
.map(bookMap::get)
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
if (userId != null) {
|
||||||
|
orderedEntities = contentRestrictionService.applyRestrictions(orderedEntities, userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Book> sortedBooks = orderedEntities.stream()
|
||||||
.map(bookMapper::toBook)
|
.map(bookMapper::toBook)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
package org.booklore.service.reader;
|
package org.booklore.service.reader;
|
||||||
|
|
||||||
|
import org.booklore.model.dto.AudiobookMetadata;
|
||||||
import org.booklore.model.dto.response.AudiobookChapter;
|
import org.booklore.model.dto.response.AudiobookChapter;
|
||||||
import org.booklore.model.dto.response.AudiobookInfo;
|
import org.booklore.model.dto.response.AudiobookInfo;
|
||||||
import org.booklore.model.dto.response.AudiobookTrack;
|
import org.booklore.model.dto.response.AudiobookTrack;
|
||||||
import org.booklore.model.entity.BookFileEntity;
|
import org.booklore.model.entity.BookFileEntity;
|
||||||
import org.booklore.model.entity.BookMetadataEntity;
|
import org.booklore.model.entity.BookMetadataEntity;
|
||||||
|
import org.booklore.repository.BookFileRepository;
|
||||||
|
import org.booklore.service.metadata.extractor.AudiobookMetadataExtractor;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jaudiotagger.audio.AudioFile;
|
import org.jaudiotagger.audio.AudioFile;
|
||||||
@@ -15,6 +18,7 @@ import org.jaudiotagger.tag.Tag;
|
|||||||
import org.jaudiotagger.tag.images.Artwork;
|
import org.jaudiotagger.tag.images.Artwork;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -27,6 +31,8 @@ import java.util.stream.Collectors;
|
|||||||
public class AudioMetadataService {
|
public class AudioMetadataService {
|
||||||
|
|
||||||
private final AudioFileUtilityService audioFileUtility;
|
private final AudioFileUtilityService audioFileUtility;
|
||||||
|
private final AudiobookMetadataExtractor audiobookMetadataExtractor;
|
||||||
|
private final BookFileRepository bookFileRepository;
|
||||||
|
|
||||||
public AudiobookInfo getMetadata(BookFileEntity bookFile, Path audioPath) throws Exception {
|
public AudiobookInfo getMetadata(BookFileEntity bookFile, Path audioPath) throws Exception {
|
||||||
if (bookFile.isFolderBased()) {
|
if (bookFile.isFolderBased()) {
|
||||||
@@ -64,6 +70,8 @@ public class AudioMetadataService {
|
|||||||
.build())
|
.build())
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
builder.chapters(chapters);
|
builder.chapters(chapters);
|
||||||
|
} else {
|
||||||
|
backfillChapters(bookFile, audioPath, builder);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (metadata != null) {
|
if (metadata != null) {
|
||||||
@@ -222,19 +230,63 @@ public class AudioMetadataService {
|
|||||||
.narrator(getTagValue(tag, FieldKey.COMPOSER));
|
.narrator(getTagValue(tag, FieldKey.COMPOSER));
|
||||||
}
|
}
|
||||||
|
|
||||||
List<AudiobookChapter> chapters = new ArrayList<>();
|
List<AudiobookChapter> chapters = extractChaptersFromFile(audioPath.toFile(), durationMs);
|
||||||
chapters.add(AudiobookChapter.builder()
|
|
||||||
.index(0)
|
|
||||||
.title("Full Audiobook")
|
|
||||||
.startTimeMs(0L)
|
|
||||||
.endTimeMs(durationMs)
|
|
||||||
.durationMs(durationMs)
|
|
||||||
.build());
|
|
||||||
builder.chapters(chapters);
|
builder.chapters(chapters);
|
||||||
|
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void backfillChapters(BookFileEntity bookFile, Path audioPath, AudiobookInfo.AudiobookInfoBuilder builder) {
|
||||||
|
try {
|
||||||
|
List<AudiobookChapter> chapters = extractChaptersFromFile(
|
||||||
|
audioPath.toFile(),
|
||||||
|
bookFile.getDurationSeconds() != null ? bookFile.getDurationSeconds() * 1000 : 0
|
||||||
|
);
|
||||||
|
builder.chapters(chapters);
|
||||||
|
|
||||||
|
List<BookFileEntity.AudioFileChapter> entityChapters = chapters.stream()
|
||||||
|
.map(ch -> BookFileEntity.AudioFileChapter.builder()
|
||||||
|
.index(ch.getIndex())
|
||||||
|
.title(ch.getTitle())
|
||||||
|
.startTimeMs(ch.getStartTimeMs())
|
||||||
|
.endTimeMs(ch.getEndTimeMs())
|
||||||
|
.durationMs(ch.getDurationMs())
|
||||||
|
.build())
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
bookFile.setChapters(entityChapters);
|
||||||
|
bookFile.setChapterCount(entityChapters.size());
|
||||||
|
bookFileRepository.save(bookFile);
|
||||||
|
log.info("Backfilled {} chapters for audiobook file id={}", entityChapters.size(), bookFile.getId());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.debug("Failed to backfill chapters for audiobook file id={}: {}", bookFile.getId(), e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<AudiobookChapter> extractChaptersFromFile(File audioFile, long fallbackDurationMs) {
|
||||||
|
List<AudiobookMetadata.ChapterInfo> extracted = audiobookMetadataExtractor.extractChaptersFromFile(audioFile);
|
||||||
|
if (extracted != null && !extracted.isEmpty()) {
|
||||||
|
return extracted.stream()
|
||||||
|
.map(ch -> AudiobookChapter.builder()
|
||||||
|
.index(ch.getIndex())
|
||||||
|
.title(ch.getTitle())
|
||||||
|
.startTimeMs(ch.getStartTimeMs())
|
||||||
|
.endTimeMs(ch.getEndTimeMs())
|
||||||
|
.durationMs(ch.getDurationMs())
|
||||||
|
.build())
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
List<AudiobookChapter> fallback = new ArrayList<>();
|
||||||
|
fallback.add(AudiobookChapter.builder()
|
||||||
|
.index(0)
|
||||||
|
.title("Full Audiobook")
|
||||||
|
.startTimeMs(0L)
|
||||||
|
.endTimeMs(fallbackDurationMs)
|
||||||
|
.durationMs(fallbackDurationMs)
|
||||||
|
.build());
|
||||||
|
return fallback;
|
||||||
|
}
|
||||||
|
|
||||||
public byte[] getEmbeddedCoverArt(Path audioPath) {
|
public byte[] getEmbeddedCoverArt(Path audioPath) {
|
||||||
try {
|
try {
|
||||||
AudioFile audioFile = AudioFileIO.read(audioPath.toFile());
|
AudioFile audioFile = AudioFileIO.read(audioPath.toFile());
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package org.booklore.service.reader;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.booklore.util.FileService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
import java.nio.file.StandardCopyOption;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class FfprobeService {
|
||||||
|
|
||||||
|
private static final String FFPROBE_GITHUB_BASE_URL = "https://github.com/booklore-app/booklore-tools/raw/main/ffprobe/";
|
||||||
|
|
||||||
|
private static final String BIN_DARWIN_ARM64 = "ffprobe-darwin-arm64";
|
||||||
|
private static final String BIN_DARWIN_X64 = "ffprobe-darwin-64";
|
||||||
|
private static final String BIN_LINUX_X64 = "ffprobe-linux-64";
|
||||||
|
private static final String BIN_LINUX_ARM64 = "ffprobe-linux-arm64";
|
||||||
|
|
||||||
|
private final FileService fileService;
|
||||||
|
|
||||||
|
public Path getFfprobeBinary() {
|
||||||
|
try {
|
||||||
|
return setupFfprobeBinary();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.warn("Failed to set up ffprobe binary: {}", e.getMessage());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Path setupFfprobeBinary() throws Exception {
|
||||||
|
String binaryName = getFfprobeBinaryName();
|
||||||
|
Path toolsDir = Paths.get(fileService.getToolsFfprobePath());
|
||||||
|
if (!Files.exists(toolsDir)) {
|
||||||
|
Files.createDirectories(toolsDir);
|
||||||
|
}
|
||||||
|
Path binaryPath = toolsDir.resolve(binaryName);
|
||||||
|
|
||||||
|
if (!Files.exists(binaryPath)) {
|
||||||
|
String downloadUrl = FFPROBE_GITHUB_BASE_URL + binaryName;
|
||||||
|
log.info("Downloading ffprobe binary '{}' from {}", binaryName, downloadUrl);
|
||||||
|
try (InputStream in = java.net.URI.create(downloadUrl).toURL().openStream()) {
|
||||||
|
Files.copy(in, binaryPath, StandardCopyOption.REPLACE_EXISTING);
|
||||||
|
}
|
||||||
|
if (!binaryPath.toFile().setExecutable(true)) {
|
||||||
|
log.warn("Failed to set executable permission for '{}'", binaryPath.toAbsolutePath());
|
||||||
|
}
|
||||||
|
log.info("Downloaded ffprobe binary to {}", binaryPath.toAbsolutePath());
|
||||||
|
} else {
|
||||||
|
if (!binaryPath.toFile().setExecutable(true)) {
|
||||||
|
log.warn("Failed to set executable permission for '{}'", binaryPath.toAbsolutePath());
|
||||||
|
}
|
||||||
|
log.debug("Using existing ffprobe binary at {}", binaryPath.toAbsolutePath());
|
||||||
|
}
|
||||||
|
return binaryPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getFfprobeBinaryName() {
|
||||||
|
String osName = System.getProperty("os.name").toLowerCase();
|
||||||
|
String osArch = System.getProperty("os.arch").toLowerCase();
|
||||||
|
|
||||||
|
log.debug("Detected OS: {} ({})", osName, osArch);
|
||||||
|
|
||||||
|
if (osName.contains("mac") || osName.contains("darwin")) {
|
||||||
|
if (osArch.contains("arm") || osArch.contains("aarch64")) {
|
||||||
|
return BIN_DARWIN_ARM64;
|
||||||
|
} else {
|
||||||
|
return BIN_DARWIN_X64;
|
||||||
|
}
|
||||||
|
} else if (osName.contains("linux")) {
|
||||||
|
if (osArch.contains("arm64") || osArch.contains("aarch64")) {
|
||||||
|
return BIN_LINUX_ARM64;
|
||||||
|
} else if (osArch.contains("64")) {
|
||||||
|
return BIN_LINUX_X64;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new IllegalStateException("Unsupported operating system or architecture: " + osName + " / " + osArch);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -57,11 +57,6 @@ public class FileService {
|
|||||||
TARGET_HOST_THREAD_LOCAL.remove();
|
TARGET_HOST_THREAD_LOCAL.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
|
||||||
// Enable restricted headers to allow 'Host' header override for DNS rebinding protection
|
|
||||||
System.setProperty("sun.net.http.allowRestrictedHeaders", "true");
|
|
||||||
}
|
|
||||||
|
|
||||||
private final AppProperties appProperties;
|
private final AppProperties appProperties;
|
||||||
private final RestTemplate restTemplate;
|
private final RestTemplate restTemplate;
|
||||||
private final AppSettingService appSettingService;
|
private final AppSettingService appSettingService;
|
||||||
@@ -170,6 +165,10 @@ public class FileService {
|
|||||||
return Paths.get(appProperties.getPathConfig(), "tools", "kepubify").toString();
|
return Paths.get(appProperties.getPathConfig(), "tools", "kepubify").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getToolsFfprobePath() {
|
||||||
|
return Paths.get(appProperties.getPathConfig(), "tools", "ffprobe").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
// VALIDATION
|
// VALIDATION
|
||||||
|
|||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
-- Trim leading/trailing whitespace from string columns in book_metadata.
|
||||||
|
-- Blank-after-trim values are set to NULL to avoid empty-string duplicates.
|
||||||
|
|
||||||
|
UPDATE book_metadata SET title = NULLIF(TRIM(title), '') WHERE title IS NOT NULL AND title != TRIM(title);
|
||||||
|
UPDATE book_metadata SET subtitle = NULLIF(TRIM(subtitle), '') WHERE subtitle IS NOT NULL AND subtitle != TRIM(subtitle);
|
||||||
|
UPDATE book_metadata SET publisher = NULLIF(TRIM(publisher), '') WHERE publisher IS NOT NULL AND publisher != TRIM(publisher);
|
||||||
|
UPDATE book_metadata SET series_name = NULLIF(TRIM(series_name), '') WHERE series_name IS NOT NULL AND series_name != TRIM(series_name);
|
||||||
|
UPDATE book_metadata SET language = NULLIF(TRIM(language), '') WHERE language IS NOT NULL AND language != TRIM(language);
|
||||||
|
UPDATE book_metadata SET isbn_13 = NULLIF(TRIM(isbn_13), '') WHERE isbn_13 IS NOT NULL AND isbn_13 != TRIM(isbn_13);
|
||||||
|
UPDATE book_metadata SET isbn_10 = NULLIF(TRIM(isbn_10), '') WHERE isbn_10 IS NOT NULL AND isbn_10 != TRIM(isbn_10);
|
||||||
|
UPDATE book_metadata SET asin = NULLIF(TRIM(asin), '') WHERE asin IS NOT NULL AND asin != TRIM(asin);
|
||||||
|
UPDATE book_metadata SET goodreads_id = NULLIF(TRIM(goodreads_id), '') WHERE goodreads_id IS NOT NULL AND goodreads_id != TRIM(goodreads_id);
|
||||||
|
UPDATE book_metadata SET hardcover_id = NULLIF(TRIM(hardcover_id), '') WHERE hardcover_id IS NOT NULL AND hardcover_id != TRIM(hardcover_id);
|
||||||
|
UPDATE book_metadata SET hardcover_book_id = NULLIF(TRIM(hardcover_book_id), '') WHERE hardcover_book_id IS NOT NULL AND hardcover_book_id != TRIM(hardcover_book_id);
|
||||||
|
UPDATE book_metadata SET google_id = NULLIF(TRIM(google_id), '') WHERE google_id IS NOT NULL AND google_id != TRIM(google_id);
|
||||||
|
UPDATE book_metadata SET comicvine_id = NULLIF(TRIM(comicvine_id), '') WHERE comicvine_id IS NOT NULL AND comicvine_id != TRIM(comicvine_id);
|
||||||
|
UPDATE book_metadata SET lubimyczytac_id = NULLIF(TRIM(lubimyczytac_id), '') WHERE lubimyczytac_id IS NOT NULL AND lubimyczytac_id != TRIM(lubimyczytac_id);
|
||||||
|
UPDATE book_metadata SET ranobedb_id = NULLIF(TRIM(ranobedb_id), '') WHERE ranobedb_id IS NOT NULL AND ranobedb_id != TRIM(ranobedb_id);
|
||||||
|
UPDATE book_metadata SET audible_id = NULLIF(TRIM(audible_id), '') WHERE audible_id IS NOT NULL AND audible_id != TRIM(audible_id);
|
||||||
|
UPDATE book_metadata SET content_rating = NULLIF(TRIM(content_rating), '') WHERE content_rating IS NOT NULL AND content_rating != TRIM(content_rating);
|
||||||
|
UPDATE book_metadata SET narrator = NULLIF(TRIM(narrator), '') WHERE narrator IS NOT NULL AND narrator != TRIM(narrator);
|
||||||
@@ -67,6 +67,95 @@ class BookMetadataEntityTest {
|
|||||||
assertFalse(searchText.contains("í"), "Should not contain 'í': " + searchText);
|
assertFalse(searchText.contains("í"), "Should not contain 'í': " + searchText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void updateSearchText_trimsLeadingAndTrailingWhitespace() {
|
||||||
|
BookMetadataEntity metadata = new BookMetadataEntity();
|
||||||
|
metadata.setTitle(" The Snowman ");
|
||||||
|
metadata.setSubtitle(" A Mystery ");
|
||||||
|
metadata.setPublisher(" Harvill Secker ");
|
||||||
|
metadata.setSeriesName(" Harry Hole ");
|
||||||
|
metadata.setLanguage(" en ");
|
||||||
|
metadata.setIsbn13(" 9780099520276 ");
|
||||||
|
metadata.setIsbn10(" 0099520273 ");
|
||||||
|
metadata.setAsin(" B003GK21A8 ");
|
||||||
|
metadata.setGoodreadsId(" 12345 ");
|
||||||
|
metadata.setHardcoverId(" hc-1 ");
|
||||||
|
metadata.setHardcoverBookId(" hcb-1 ");
|
||||||
|
metadata.setGoogleId(" g-1 ");
|
||||||
|
metadata.setComicvineId(" cv-1 ");
|
||||||
|
metadata.setLubimyczytacId(" lub-1 ");
|
||||||
|
metadata.setRanobedbId(" ran-1 ");
|
||||||
|
metadata.setAudibleId(" aud-1 ");
|
||||||
|
metadata.setContentRating(" PG-13 ");
|
||||||
|
metadata.setNarrator(" John Smith ");
|
||||||
|
|
||||||
|
metadata.updateSearchText();
|
||||||
|
|
||||||
|
assertEquals("The Snowman", metadata.getTitle());
|
||||||
|
assertEquals("A Mystery", metadata.getSubtitle());
|
||||||
|
assertEquals("Harvill Secker", metadata.getPublisher());
|
||||||
|
assertEquals("Harry Hole", metadata.getSeriesName());
|
||||||
|
assertEquals("en", metadata.getLanguage());
|
||||||
|
assertEquals("9780099520276", metadata.getIsbn13());
|
||||||
|
assertEquals("0099520273", metadata.getIsbn10());
|
||||||
|
assertEquals("B003GK21A8", metadata.getAsin());
|
||||||
|
assertEquals("12345", metadata.getGoodreadsId());
|
||||||
|
assertEquals("hc-1", metadata.getHardcoverId());
|
||||||
|
assertEquals("hcb-1", metadata.getHardcoverBookId());
|
||||||
|
assertEquals("g-1", metadata.getGoogleId());
|
||||||
|
assertEquals("cv-1", metadata.getComicvineId());
|
||||||
|
assertEquals("lub-1", metadata.getLubimyczytacId());
|
||||||
|
assertEquals("ran-1", metadata.getRanobedbId());
|
||||||
|
assertEquals("aud-1", metadata.getAudibleId());
|
||||||
|
assertEquals("PG-13", metadata.getContentRating());
|
||||||
|
assertEquals("John Smith", metadata.getNarrator());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void updateSearchText_blanksAndWhitespaceOnlyBecomeNull() {
|
||||||
|
BookMetadataEntity metadata = new BookMetadataEntity();
|
||||||
|
metadata.setTitle("Valid Title");
|
||||||
|
metadata.setSubtitle(" ");
|
||||||
|
metadata.setPublisher("");
|
||||||
|
metadata.setSeriesName(" \t ");
|
||||||
|
metadata.setLanguage(" ");
|
||||||
|
metadata.setNarrator("\t");
|
||||||
|
|
||||||
|
metadata.updateSearchText();
|
||||||
|
|
||||||
|
assertEquals("Valid Title", metadata.getTitle());
|
||||||
|
assertNull(metadata.getSubtitle());
|
||||||
|
assertNull(metadata.getPublisher());
|
||||||
|
assertNull(metadata.getSeriesName());
|
||||||
|
assertNull(metadata.getLanguage());
|
||||||
|
assertNull(metadata.getNarrator());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void updateSearchText_preservesNulls() {
|
||||||
|
BookMetadataEntity metadata = new BookMetadataEntity();
|
||||||
|
metadata.setTitle("Valid Title");
|
||||||
|
|
||||||
|
metadata.updateSearchText();
|
||||||
|
|
||||||
|
assertEquals("Valid Title", metadata.getTitle());
|
||||||
|
assertNull(metadata.getSubtitle());
|
||||||
|
assertNull(metadata.getPublisher());
|
||||||
|
assertNull(metadata.getSeriesName());
|
||||||
|
assertNull(metadata.getNarrator());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void updateSearchText_doesNotTrimDescription() {
|
||||||
|
BookMetadataEntity metadata = new BookMetadataEntity();
|
||||||
|
metadata.setTitle("Valid Title");
|
||||||
|
metadata.setDescription(" Some description with leading/trailing spaces ");
|
||||||
|
|
||||||
|
metadata.updateSearchText();
|
||||||
|
|
||||||
|
assertEquals(" Some description with leading/trailing spaces ", metadata.getDescription());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void searchSimulation_withDiacritics() {
|
void searchSimulation_withDiacritics() {
|
||||||
BookMetadataEntity metadata = new BookMetadataEntity();
|
BookMetadataEntity metadata = new BookMetadataEntity();
|
||||||
|
|||||||
@@ -6,13 +6,16 @@ import org.booklore.mapper.custom.BookLoreUserTransformer;
|
|||||||
import org.booklore.model.dto.*;
|
import org.booklore.model.dto.*;
|
||||||
import org.booklore.model.entity.BookEntity;
|
import org.booklore.model.entity.BookEntity;
|
||||||
import org.booklore.model.entity.BookLoreUserEntity;
|
import org.booklore.model.entity.BookLoreUserEntity;
|
||||||
|
import org.booklore.model.entity.LibraryEntity;
|
||||||
import org.booklore.model.entity.ShelfEntity;
|
import org.booklore.model.entity.ShelfEntity;
|
||||||
import org.booklore.model.entity.UserPermissionsEntity;
|
import org.booklore.model.entity.UserPermissionsEntity;
|
||||||
import org.booklore.repository.BookOpdsRepository;
|
import org.booklore.repository.BookOpdsRepository;
|
||||||
|
import org.booklore.repository.BookRepository;
|
||||||
import org.booklore.repository.ShelfRepository;
|
import org.booklore.repository.ShelfRepository;
|
||||||
import org.booklore.repository.UserRepository;
|
import org.booklore.repository.UserRepository;
|
||||||
import org.booklore.service.library.LibraryService;
|
import org.booklore.service.library.LibraryService;
|
||||||
import org.booklore.service.opds.OpdsBookService;
|
import org.booklore.service.opds.OpdsBookService;
|
||||||
|
import org.booklore.service.restriction.ContentRestrictionService;
|
||||||
import org.junit.jupiter.api.AfterEach;
|
import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
@@ -36,11 +39,13 @@ import static org.mockito.Mockito.*;
|
|||||||
class OpdsBookServiceTest {
|
class OpdsBookServiceTest {
|
||||||
|
|
||||||
@Mock private BookOpdsRepository bookOpdsRepository;
|
@Mock private BookOpdsRepository bookOpdsRepository;
|
||||||
|
@Mock private BookRepository bookRepository;
|
||||||
@Mock private BookMapper bookMapper;
|
@Mock private BookMapper bookMapper;
|
||||||
@Mock private UserRepository userRepository;
|
@Mock private UserRepository userRepository;
|
||||||
@Mock private BookLoreUserTransformer bookLoreUserTransformer;
|
@Mock private BookLoreUserTransformer bookLoreUserTransformer;
|
||||||
@Mock private ShelfRepository shelfRepository;
|
@Mock private ShelfRepository shelfRepository;
|
||||||
@Mock private LibraryService libraryService;
|
@Mock private LibraryService libraryService;
|
||||||
|
@Mock private ContentRestrictionService contentRestrictionService;
|
||||||
|
|
||||||
@InjectMocks private OpdsBookService opdsBookService;
|
@InjectMocks private OpdsBookService opdsBookService;
|
||||||
|
|
||||||
@@ -49,6 +54,8 @@ class OpdsBookServiceTest {
|
|||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setUp() {
|
void setUp() {
|
||||||
mocks = MockitoAnnotations.openMocks(this);
|
mocks = MockitoAnnotations.openMocks(this);
|
||||||
|
when(contentRestrictionService.applyRestrictions(anyList(), anyLong()))
|
||||||
|
.thenAnswer(invocation -> invocation.getArgument(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterEach
|
@AfterEach
|
||||||
@@ -528,4 +535,276 @@ class OpdsBookServiceTest {
|
|||||||
verify(bookOpdsRepository).findBookIdsByShelfIds(eq(Set.of(10L)), any());
|
verify(bookOpdsRepository).findBookIdsByShelfIds(eq(Set.of(10L)), any());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ==================== validateBookContentAccess ====================
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void validateBookContentAccess_throwsForbidden_whenUserIdIsNull() {
|
||||||
|
assertThatThrownBy(() ->
|
||||||
|
opdsBookService.validateBookContentAccess(1L, null)
|
||||||
|
).hasMessageContaining("Authentication required");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void validateBookContentAccess_allowsAdmin() {
|
||||||
|
BookLoreUserEntity entity = mock(BookLoreUserEntity.class);
|
||||||
|
var permissionsEntity = mock(UserPermissionsEntity.class);
|
||||||
|
when(permissionsEntity.isPermissionAdmin()).thenReturn(true);
|
||||||
|
when(entity.getPermissions()).thenReturn(permissionsEntity);
|
||||||
|
when(userRepository.findById(1L)).thenReturn(Optional.of(entity));
|
||||||
|
|
||||||
|
opdsBookService.validateBookContentAccess(99L, 1L);
|
||||||
|
|
||||||
|
verify(bookRepository, never()).findById(anyLong());
|
||||||
|
verify(contentRestrictionService, never()).applyRestrictions(anyList(), eq(1L));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void validateBookContentAccess_throwsForbidden_whenNoLibraryAccess() {
|
||||||
|
BookLoreUserEntity userEntity = mock(BookLoreUserEntity.class);
|
||||||
|
var permissionsEntity = mock(UserPermissionsEntity.class);
|
||||||
|
when(permissionsEntity.isPermissionAdmin()).thenReturn(false);
|
||||||
|
when(userEntity.getPermissions()).thenReturn(permissionsEntity);
|
||||||
|
when(userRepository.findById(2L)).thenReturn(Optional.of(userEntity));
|
||||||
|
|
||||||
|
BookLoreUser user = mock(BookLoreUser.class);
|
||||||
|
when(bookLoreUserTransformer.toDTO(userEntity)).thenReturn(user);
|
||||||
|
when(user.getAssignedLibraries()).thenReturn(List.of(Library.builder().id(5L).watch(false).build()));
|
||||||
|
|
||||||
|
BookEntity book = mock(BookEntity.class);
|
||||||
|
LibraryEntity library = mock(LibraryEntity.class);
|
||||||
|
when(library.getId()).thenReturn(99L);
|
||||||
|
when(book.getLibrary()).thenReturn(library);
|
||||||
|
when(bookRepository.findById(1L)).thenReturn(Optional.of(book));
|
||||||
|
|
||||||
|
assertThatThrownBy(() ->
|
||||||
|
opdsBookService.validateBookContentAccess(1L, 2L)
|
||||||
|
).hasMessageContaining("You are not authorized to access this book.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void validateBookContentAccess_throwsForbidden_whenContentRestricted() {
|
||||||
|
BookLoreUserEntity userEntity = mock(BookLoreUserEntity.class);
|
||||||
|
var permissionsEntity = mock(UserPermissionsEntity.class);
|
||||||
|
when(permissionsEntity.isPermissionAdmin()).thenReturn(false);
|
||||||
|
when(userEntity.getPermissions()).thenReturn(permissionsEntity);
|
||||||
|
when(userRepository.findById(2L)).thenReturn(Optional.of(userEntity));
|
||||||
|
|
||||||
|
BookLoreUser user = mock(BookLoreUser.class);
|
||||||
|
when(bookLoreUserTransformer.toDTO(userEntity)).thenReturn(user);
|
||||||
|
when(user.getAssignedLibraries()).thenReturn(List.of(Library.builder().id(5L).watch(false).build()));
|
||||||
|
|
||||||
|
BookEntity book = mock(BookEntity.class);
|
||||||
|
LibraryEntity library = mock(LibraryEntity.class);
|
||||||
|
when(library.getId()).thenReturn(5L);
|
||||||
|
when(book.getLibrary()).thenReturn(library);
|
||||||
|
when(bookRepository.findById(1L)).thenReturn(Optional.of(book));
|
||||||
|
|
||||||
|
when(contentRestrictionService.applyRestrictions(eq(List.of(book)), eq(2L)))
|
||||||
|
.thenReturn(List.of());
|
||||||
|
|
||||||
|
assertThatThrownBy(() ->
|
||||||
|
opdsBookService.validateBookContentAccess(1L, 2L)
|
||||||
|
).hasMessageContaining("You are not authorized to access this book.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void validateBookContentAccess_allowsAccess_whenBookPassesRestrictions() {
|
||||||
|
BookLoreUserEntity userEntity = mock(BookLoreUserEntity.class);
|
||||||
|
var permissionsEntity = mock(UserPermissionsEntity.class);
|
||||||
|
when(permissionsEntity.isPermissionAdmin()).thenReturn(false);
|
||||||
|
when(userEntity.getPermissions()).thenReturn(permissionsEntity);
|
||||||
|
when(userRepository.findById(2L)).thenReturn(Optional.of(userEntity));
|
||||||
|
|
||||||
|
BookLoreUser user = mock(BookLoreUser.class);
|
||||||
|
when(bookLoreUserTransformer.toDTO(userEntity)).thenReturn(user);
|
||||||
|
when(user.getAssignedLibraries()).thenReturn(List.of(Library.builder().id(5L).watch(false).build()));
|
||||||
|
|
||||||
|
BookEntity book = mock(BookEntity.class);
|
||||||
|
LibraryEntity library = mock(LibraryEntity.class);
|
||||||
|
when(library.getId()).thenReturn(5L);
|
||||||
|
when(book.getLibrary()).thenReturn(library);
|
||||||
|
when(bookRepository.findById(1L)).thenReturn(Optional.of(book));
|
||||||
|
|
||||||
|
when(contentRestrictionService.applyRestrictions(eq(List.of(book)), eq(2L)))
|
||||||
|
.thenReturn(List.of(book));
|
||||||
|
|
||||||
|
opdsBookService.validateBookContentAccess(1L, 2L);
|
||||||
|
|
||||||
|
verify(contentRestrictionService).applyRestrictions(eq(List.of(book)), eq(2L));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ==================== Content restriction filtering in feeds ====================
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getBooksPage_appliesContentRestrictions_forNonAdmin() {
|
||||||
|
BookLoreUserEntity entity = mock(BookLoreUserEntity.class);
|
||||||
|
var permissionsEntity = mock(UserPermissionsEntity.class);
|
||||||
|
when(permissionsEntity.isPermissionAccessOpds()).thenReturn(true);
|
||||||
|
when(permissionsEntity.isPermissionAdmin()).thenReturn(false);
|
||||||
|
when(entity.getPermissions()).thenReturn(permissionsEntity);
|
||||||
|
when(userRepository.findById(1L)).thenReturn(Optional.of(entity));
|
||||||
|
|
||||||
|
BookLoreUser user = mock(BookLoreUser.class);
|
||||||
|
BookLoreUser.UserPermissions perms = mock(BookLoreUser.UserPermissions.class);
|
||||||
|
when(bookLoreUserTransformer.toDTO(entity)).thenReturn(user);
|
||||||
|
when(user.getPermissions()).thenReturn(perms);
|
||||||
|
when(perms.isAdmin()).thenReturn(false);
|
||||||
|
when(user.getId()).thenReturn(1L);
|
||||||
|
when(user.getAssignedLibraries()).thenReturn(List.of(Library.builder().id(1L).watch(false).build()));
|
||||||
|
|
||||||
|
BookEntity allowedEntity = mock(BookEntity.class);
|
||||||
|
BookEntity restrictedEntity = mock(BookEntity.class);
|
||||||
|
when(allowedEntity.getId()).thenReturn(1L);
|
||||||
|
when(restrictedEntity.getId()).thenReturn(2L);
|
||||||
|
|
||||||
|
Book allowedBook = Book.builder().id(1L).build();
|
||||||
|
when(bookMapper.toBook(allowedEntity)).thenReturn(allowedBook);
|
||||||
|
|
||||||
|
when(bookOpdsRepository.findBookIdsByLibraryIds(anySet(), any()))
|
||||||
|
.thenReturn(new PageImpl<>(List.of(1L, 2L)));
|
||||||
|
when(bookOpdsRepository.findAllWithMetadataByIdsAndLibraryIds(anyList(), anySet()))
|
||||||
|
.thenReturn(List.of(allowedEntity, restrictedEntity));
|
||||||
|
|
||||||
|
when(contentRestrictionService.applyRestrictions(anyList(), eq(1L)))
|
||||||
|
.thenReturn(List.of(allowedEntity));
|
||||||
|
|
||||||
|
Page<Book> result = opdsBookService.getBooksPage(1L, null, null, null, 0, 10);
|
||||||
|
|
||||||
|
assertThat(result.getContent()).hasSize(1);
|
||||||
|
assertThat(result.getContent().getFirst().getId()).isEqualTo(1L);
|
||||||
|
verify(contentRestrictionService).applyRestrictions(anyList(), eq(1L));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getBooksPage_skipsContentRestrictions_forAdmin() {
|
||||||
|
BookLoreUserEntity entity = mock(BookLoreUserEntity.class);
|
||||||
|
var permissionsEntity = mock(UserPermissionsEntity.class);
|
||||||
|
when(permissionsEntity.isPermissionAccessOpds()).thenReturn(true);
|
||||||
|
when(permissionsEntity.isPermissionAdmin()).thenReturn(true);
|
||||||
|
when(entity.getPermissions()).thenReturn(permissionsEntity);
|
||||||
|
when(userRepository.findById(1L)).thenReturn(Optional.of(entity));
|
||||||
|
|
||||||
|
BookLoreUser user = mock(BookLoreUser.class);
|
||||||
|
BookLoreUser.UserPermissions perms = mock(BookLoreUser.UserPermissions.class);
|
||||||
|
when(bookLoreUserTransformer.toDTO(entity)).thenReturn(user);
|
||||||
|
when(user.getPermissions()).thenReturn(perms);
|
||||||
|
when(perms.isAdmin()).thenReturn(true);
|
||||||
|
when(user.getId()).thenReturn(1L);
|
||||||
|
|
||||||
|
when(bookOpdsRepository.findBookIds(any())).thenReturn(Page.empty());
|
||||||
|
|
||||||
|
opdsBookService.getBooksPage(1L, null, null, null, 0, 10);
|
||||||
|
|
||||||
|
verify(contentRestrictionService, never()).applyRestrictions(anyList(), eq(1L));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getRecentBooksPage_appliesContentRestrictions_forNonAdmin() {
|
||||||
|
BookLoreUserEntity entity = mock(BookLoreUserEntity.class);
|
||||||
|
when(userRepository.findById(2L)).thenReturn(Optional.of(entity));
|
||||||
|
BookLoreUser user = mock(BookLoreUser.class);
|
||||||
|
when(bookLoreUserTransformer.toDTO(entity)).thenReturn(user);
|
||||||
|
BookLoreUser.UserPermissions perms = mock(BookLoreUser.UserPermissions.class);
|
||||||
|
when(user.getPermissions()).thenReturn(perms);
|
||||||
|
when(perms.isAdmin()).thenReturn(false);
|
||||||
|
when(user.getAssignedLibraries()).thenReturn(List.of(Library.builder().id(1L).watch(false).build()));
|
||||||
|
|
||||||
|
BookEntity bookEntity = mock(BookEntity.class);
|
||||||
|
when(bookEntity.getId()).thenReturn(1L);
|
||||||
|
Book book = Book.builder().id(1L).build();
|
||||||
|
when(bookMapper.toBook(bookEntity)).thenReturn(book);
|
||||||
|
|
||||||
|
when(bookOpdsRepository.findRecentBookIdsByLibraryIds(anySet(), any()))
|
||||||
|
.thenReturn(new PageImpl<>(List.of(1L)));
|
||||||
|
when(bookOpdsRepository.findAllWithMetadataByIdsAndLibraryIds(anyList(), anySet()))
|
||||||
|
.thenReturn(List.of(bookEntity));
|
||||||
|
|
||||||
|
opdsBookService.getRecentBooksPage(2L, 0, 10);
|
||||||
|
|
||||||
|
verify(contentRestrictionService).applyRestrictions(anyList(), eq(2L));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getRecentBooksPage_skipsContentRestrictions_forAdmin() {
|
||||||
|
BookLoreUserEntity entity = mock(BookLoreUserEntity.class);
|
||||||
|
when(userRepository.findById(1L)).thenReturn(Optional.of(entity));
|
||||||
|
BookLoreUser user = mock(BookLoreUser.class);
|
||||||
|
when(bookLoreUserTransformer.toDTO(entity)).thenReturn(user);
|
||||||
|
BookLoreUser.UserPermissions perms = mock(BookLoreUser.UserPermissions.class);
|
||||||
|
when(user.getPermissions()).thenReturn(perms);
|
||||||
|
when(perms.isAdmin()).thenReturn(true);
|
||||||
|
|
||||||
|
when(bookOpdsRepository.findRecentBookIds(any())).thenReturn(Page.empty());
|
||||||
|
|
||||||
|
opdsBookService.getRecentBooksPage(1L, 0, 10);
|
||||||
|
|
||||||
|
verify(contentRestrictionService, never()).applyRestrictions(anyList(), eq(1L));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getRandomBooks_appliesContentRestrictions() {
|
||||||
|
OpdsBookService spy = Mockito.spy(opdsBookService);
|
||||||
|
doReturn(List.of(Library.builder().id(1L).watch(false).build()))
|
||||||
|
.when(spy).getAccessibleLibraries(2L);
|
||||||
|
|
||||||
|
BookEntity allowedEntity = mock(BookEntity.class);
|
||||||
|
BookEntity restrictedEntity = mock(BookEntity.class);
|
||||||
|
|
||||||
|
when(bookOpdsRepository.findRandomBookIdsByLibraryIds(anyList())).thenReturn(List.of(1L, 2L));
|
||||||
|
when(bookOpdsRepository.findAllWithMetadataByIds(anyList()))
|
||||||
|
.thenReturn(List.of(allowedEntity, restrictedEntity));
|
||||||
|
|
||||||
|
when(contentRestrictionService.applyRestrictions(anyList(), eq(2L)))
|
||||||
|
.thenReturn(List.of(allowedEntity));
|
||||||
|
|
||||||
|
Book book = Book.builder().id(1L).build();
|
||||||
|
when(bookMapper.toBook(allowedEntity)).thenReturn(book);
|
||||||
|
|
||||||
|
List<Book> result = spy.getRandomBooks(2L, 5);
|
||||||
|
|
||||||
|
assertThat(result).hasSize(1);
|
||||||
|
verify(contentRestrictionService).applyRestrictions(anyList(), eq(2L));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getBooksPage_contentRestrictions_filtersFromPage() {
|
||||||
|
BookLoreUserEntity entity = mock(BookLoreUserEntity.class);
|
||||||
|
var permissionsEntity = mock(UserPermissionsEntity.class);
|
||||||
|
when(permissionsEntity.isPermissionAccessOpds()).thenReturn(true);
|
||||||
|
when(permissionsEntity.isPermissionAdmin()).thenReturn(false);
|
||||||
|
when(entity.getPermissions()).thenReturn(permissionsEntity);
|
||||||
|
when(userRepository.findById(3L)).thenReturn(Optional.of(entity));
|
||||||
|
|
||||||
|
BookLoreUser user = mock(BookLoreUser.class);
|
||||||
|
BookLoreUser.UserPermissions perms = mock(BookLoreUser.UserPermissions.class);
|
||||||
|
when(bookLoreUserTransformer.toDTO(entity)).thenReturn(user);
|
||||||
|
when(user.getPermissions()).thenReturn(perms);
|
||||||
|
when(perms.isAdmin()).thenReturn(false);
|
||||||
|
when(user.getId()).thenReturn(3L);
|
||||||
|
when(user.getAssignedLibraries()).thenReturn(List.of(Library.builder().id(1L).watch(false).build()));
|
||||||
|
|
||||||
|
BookEntity book1 = mock(BookEntity.class);
|
||||||
|
BookEntity book2 = mock(BookEntity.class);
|
||||||
|
BookEntity book3 = mock(BookEntity.class);
|
||||||
|
when(book1.getId()).thenReturn(1L);
|
||||||
|
when(book2.getId()).thenReturn(2L);
|
||||||
|
when(book3.getId()).thenReturn(3L);
|
||||||
|
|
||||||
|
when(bookMapper.toBook(book1)).thenReturn(Book.builder().id(1L).build());
|
||||||
|
when(bookMapper.toBook(book3)).thenReturn(Book.builder().id(3L).build());
|
||||||
|
|
||||||
|
when(bookOpdsRepository.findBookIdsByLibraryIds(anySet(), any()))
|
||||||
|
.thenReturn(new PageImpl<>(List.of(1L, 2L, 3L)));
|
||||||
|
when(bookOpdsRepository.findAllWithMetadataByIdsAndLibraryIds(anyList(), anySet()))
|
||||||
|
.thenReturn(List.of(book1, book2, book3));
|
||||||
|
|
||||||
|
when(contentRestrictionService.applyRestrictions(anyList(), eq(3L)))
|
||||||
|
.thenReturn(List.of(book1, book3));
|
||||||
|
|
||||||
|
Page<Book> result = opdsBookService.getBooksPage(3L, null, null, null, 0, 10);
|
||||||
|
|
||||||
|
assertThat(result.getContent()).hasSize(2);
|
||||||
|
assertThat(result.getContent()).extracting(Book::getId).containsExactly(1L, 3L);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+61
-5
@@ -7,6 +7,7 @@ import org.booklore.exception.APIException;
|
|||||||
import org.booklore.mapper.BookMapper;
|
import org.booklore.mapper.BookMapper;
|
||||||
import org.booklore.model.dto.Book;
|
import org.booklore.model.dto.Book;
|
||||||
import org.booklore.model.dto.BookLoreUser;
|
import org.booklore.model.dto.BookLoreUser;
|
||||||
|
import org.booklore.model.dto.response.AttachBookFileResponse;
|
||||||
import org.booklore.model.entity.*;
|
import org.booklore.model.entity.*;
|
||||||
import org.booklore.model.enums.BookFileType;
|
import org.booklore.model.enums.BookFileType;
|
||||||
import org.booklore.repository.BookRepository;
|
import org.booklore.repository.BookRepository;
|
||||||
@@ -68,7 +69,7 @@ class BookFileAttachmentServiceTest {
|
|||||||
.path(tempDir.toString())
|
.path(tempDir.toString())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
library.setLibraryPaths(List.of(libraryPath));
|
library.setLibraryPaths(new ArrayList<>(List.of(libraryPath)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private BookEntity createBook(Long id) {
|
private BookEntity createBook(Long id) {
|
||||||
@@ -320,9 +321,11 @@ class BookFileAttachmentServiceTest {
|
|||||||
when(bookRepository.findAllById(List.of(2L))).thenReturn(List.of(source));
|
when(bookRepository.findAllById(List.of(2L))).thenReturn(List.of(source));
|
||||||
setupGetUpdatedBookMocks(1L, target);
|
setupGetUpdatedBookMocks(1L, target);
|
||||||
|
|
||||||
Book result = service.attachBookFiles(1L, List.of(2L), false);
|
AttachBookFileResponse result = service.attachBookFiles(1L, List.of(2L), false);
|
||||||
|
|
||||||
assertNotNull(result);
|
assertNotNull(result);
|
||||||
|
assertNotNull(result.updatedBook());
|
||||||
|
assertEquals(List.of(2L), result.deletedSourceBookIds());
|
||||||
verify(entityManager).createQuery(contains("UPDATE BookFileEntity"));
|
verify(entityManager).createQuery(contains("UPDATE BookFileEntity"));
|
||||||
verify(entityManager).flush();
|
verify(entityManager).flush();
|
||||||
verify(entityManager).clear();
|
verify(entityManager).clear();
|
||||||
@@ -693,10 +696,11 @@ class BookFileAttachmentServiceTest {
|
|||||||
when(bookMapper.toBook(target)).thenReturn(dto);
|
when(bookMapper.toBook(target)).thenReturn(dto);
|
||||||
when(bookService.filterShelvesByUserId(any(), eq(1L))).thenReturn(Set.of());
|
when(bookService.filterShelvesByUserId(any(), eq(1L))).thenReturn(Set.of());
|
||||||
|
|
||||||
Book result = service.attachBookFiles(1L, List.of(2L), false);
|
AttachBookFileResponse result = service.attachBookFiles(1L, List.of(2L), false);
|
||||||
|
|
||||||
assertNotNull(result);
|
assertNotNull(result);
|
||||||
assertEquals(1L, result.getId());
|
assertEquals(1L, result.updatedBook().getId());
|
||||||
|
assertEquals(List.of(2L), result.deletedSourceBookIds());
|
||||||
verify(readingProgressService).enrichBookWithProgress(eq(dto), any(), any());
|
verify(readingProgressService).enrichBookWithProgress(eq(dto), any(), any());
|
||||||
verify(bookService).filterShelvesByUserId(any(), eq(1L));
|
verify(bookService).filterShelvesByUserId(any(), eq(1L));
|
||||||
}
|
}
|
||||||
@@ -727,10 +731,11 @@ class BookFileAttachmentServiceTest {
|
|||||||
|
|
||||||
setupGetUpdatedBookMocks(1L, target);
|
setupGetUpdatedBookMocks(1L, target);
|
||||||
|
|
||||||
service.attachBookFiles(1L, List.of(2L), false);
|
AttachBookFileResponse result = service.attachBookFiles(1L, List.of(2L), false);
|
||||||
|
|
||||||
// Should not delete source since it has remaining non-book files
|
// Should not delete source since it has remaining non-book files
|
||||||
verify(bookRepository, never()).deleteAll(anyList());
|
verify(bookRepository, never()).deleteAll(anyList());
|
||||||
|
assertTrue(result.deletedSourceBookIds().isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -791,6 +796,57 @@ class BookFileAttachmentServiceTest {
|
|||||||
assertTrue(Files.exists(tempDir.resolve("target.pdf")));
|
assertTrue(Files.exists(tempDir.resolve("target.pdf")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Attach without move keeps file in place and recalculates fileSubPath for different library paths")
|
||||||
|
void attachBookFiles_differentLibraryPaths_noMoveRecalculatesSubPath() throws IOException {
|
||||||
|
LibraryPathEntity otherLibraryPath = LibraryPathEntity.builder()
|
||||||
|
.id(2L)
|
||||||
|
.library(library)
|
||||||
|
.path(tempDir.resolve("other_root").toString())
|
||||||
|
.build();
|
||||||
|
library.setLibraryPaths(new ArrayList<>(List.of(libraryPath, otherLibraryPath)));
|
||||||
|
|
||||||
|
Files.createDirectories(tempDir.resolve("other_root"));
|
||||||
|
|
||||||
|
BookEntity target = createBook(1L);
|
||||||
|
createBookFile(10L, target, "target.epub", "target_dir", true, false);
|
||||||
|
|
||||||
|
BookEntity source = BookEntity.builder()
|
||||||
|
.id(2L)
|
||||||
|
.library(library)
|
||||||
|
.libraryPath(otherLibraryPath)
|
||||||
|
.build();
|
||||||
|
source.setBookFiles(new ArrayList<>());
|
||||||
|
BookFileEntity sourceFile = BookFileEntity.builder()
|
||||||
|
.id(20L)
|
||||||
|
.book(source)
|
||||||
|
.fileName("source.pdf")
|
||||||
|
.fileSubPath("source_dir")
|
||||||
|
.isBookFormat(true)
|
||||||
|
.folderBased(false)
|
||||||
|
.bookType(BookFileType.PDF)
|
||||||
|
.build();
|
||||||
|
Path sourceDir = tempDir.resolve("other_root/source_dir");
|
||||||
|
Files.createDirectories(sourceDir);
|
||||||
|
Files.createFile(sourceDir.resolve("source.pdf"));
|
||||||
|
|
||||||
|
Query mockQuery = mock(Query.class);
|
||||||
|
when(entityManager.createQuery(anyString())).thenReturn(mockQuery);
|
||||||
|
when(mockQuery.setParameter(anyString(), any())).thenReturn(mockQuery);
|
||||||
|
when(mockQuery.executeUpdate()).thenReturn(1);
|
||||||
|
|
||||||
|
when(bookRepository.findByIdWithBookFiles(1L)).thenReturn(Optional.of(target));
|
||||||
|
when(bookRepository.findByIdWithBookFiles(2L)).thenReturn(Optional.of(source));
|
||||||
|
setupGetUpdatedBookMocks(1L, target);
|
||||||
|
|
||||||
|
AttachBookFileResponse result = service.attachBookFiles(1L, List.of(2L), false);
|
||||||
|
|
||||||
|
assertTrue(Files.exists(sourceDir.resolve("source.pdf")),
|
||||||
|
"Source file should remain at original location");
|
||||||
|
verify(entityManager).createQuery(contains("bf.fileSubPath"));
|
||||||
|
assertEquals(List.of(2L), result.deletedSourceBookIds());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@DisplayName("File without extension handled correctly")
|
@DisplayName("File without extension handled correctly")
|
||||||
void attachWithFileMove_fileWithoutExtension() throws IOException {
|
void attachWithFileMove_fileWithoutExtension() throws IOException {
|
||||||
|
|||||||
+288
@@ -0,0 +1,288 @@
|
|||||||
|
package org.booklore.service.book;
|
||||||
|
|
||||||
|
import org.booklore.config.security.service.AuthenticationService;
|
||||||
|
import org.booklore.exception.APIException;
|
||||||
|
import org.booklore.mapper.BookMapper;
|
||||||
|
import org.booklore.model.dto.Book;
|
||||||
|
import org.booklore.model.dto.BookLoreUser;
|
||||||
|
import org.booklore.model.dto.response.DetachBookFileResponse;
|
||||||
|
import org.booklore.model.entity.*;
|
||||||
|
import org.booklore.model.enums.BookFileType;
|
||||||
|
import org.booklore.repository.BookRepository;
|
||||||
|
import org.booklore.repository.UserBookProgressRepository;
|
||||||
|
import org.booklore.service.audit.AuditService;
|
||||||
|
import org.booklore.service.metadata.BookCoverService;
|
||||||
|
import org.booklore.service.progress.ReadingProgressService;
|
||||||
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
|
import org.mockito.InjectMocks;
|
||||||
|
import org.mockito.Mock;
|
||||||
|
import org.mockito.junit.jupiter.MockitoExtension;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||||
|
import static org.mockito.ArgumentMatchers.*;
|
||||||
|
import static org.mockito.Mockito.*;
|
||||||
|
|
||||||
|
@ExtendWith(MockitoExtension.class)
|
||||||
|
class BookFileDetachmentServiceTest {
|
||||||
|
|
||||||
|
@Mock private BookRepository bookRepository;
|
||||||
|
@Mock private UserBookProgressRepository userBookProgressRepository;
|
||||||
|
@Mock private AuthenticationService authenticationService;
|
||||||
|
@Mock private ReadingProgressService readingProgressService;
|
||||||
|
@Mock private BookMapper bookMapper;
|
||||||
|
@Mock private BookService bookService;
|
||||||
|
@Mock private AuditService auditService;
|
||||||
|
@Mock private BookCoverService bookCoverService;
|
||||||
|
|
||||||
|
@InjectMocks
|
||||||
|
private BookFileDetachmentService service;
|
||||||
|
|
||||||
|
private LibraryEntity library;
|
||||||
|
private LibraryPathEntity libraryPath;
|
||||||
|
|
||||||
|
@BeforeEach
|
||||||
|
void setUp() {
|
||||||
|
library = LibraryEntity.builder()
|
||||||
|
.id(1L)
|
||||||
|
.name("Test Library")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
libraryPath = LibraryPathEntity.builder()
|
||||||
|
.id(1L)
|
||||||
|
.library(library)
|
||||||
|
.path("/tmp/test-library")
|
||||||
|
.build();
|
||||||
|
|
||||||
|
library.setLibraryPaths(new ArrayList<>(List.of(libraryPath)));
|
||||||
|
}
|
||||||
|
|
||||||
|
private BookEntity createBook(Long id) {
|
||||||
|
BookEntity book = BookEntity.builder()
|
||||||
|
.id(id)
|
||||||
|
.library(library)
|
||||||
|
.libraryPath(libraryPath)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
BookMetadataEntity metadata = BookMetadataEntity.builder()
|
||||||
|
.book(book)
|
||||||
|
.title("Test Book " + id)
|
||||||
|
.build();
|
||||||
|
book.setMetadata(metadata);
|
||||||
|
|
||||||
|
return book;
|
||||||
|
}
|
||||||
|
|
||||||
|
private BookFileEntity createBookFile(Long id, BookEntity book, boolean isBookFormat, BookFileType type) {
|
||||||
|
BookFileEntity file = BookFileEntity.builder()
|
||||||
|
.id(id)
|
||||||
|
.book(book)
|
||||||
|
.fileName("file-" + id + "." + type.name().toLowerCase())
|
||||||
|
.fileSubPath("")
|
||||||
|
.isBookFormat(isBookFormat)
|
||||||
|
.bookType(type)
|
||||||
|
.build();
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupMocksForGetUpdatedBook() {
|
||||||
|
BookLoreUser user = new BookLoreUser();
|
||||||
|
user.setId(1L);
|
||||||
|
when(authenticationService.getAuthenticatedUser()).thenReturn(user);
|
||||||
|
when(userBookProgressRepository.findByUserIdAndBookId(anyLong(), anyLong()))
|
||||||
|
.thenReturn(Optional.of(new UserBookProgressEntity()));
|
||||||
|
when(readingProgressService.fetchUserFileProgress(anyLong(), anySet()))
|
||||||
|
.thenReturn(new HashMap<>());
|
||||||
|
when(bookMapper.toBook(any(BookEntity.class))).thenReturn(Book.builder().build());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void detachAlternativeFormat_withCopyMetadata() {
|
||||||
|
BookEntity book = createBook(1L);
|
||||||
|
BookFileEntity primaryFile = createBookFile(10L, book, true, BookFileType.EPUB);
|
||||||
|
BookFileEntity altFile = createBookFile(11L, book, true, BookFileType.PDF);
|
||||||
|
|
||||||
|
when(bookRepository.findByIdWithBookFiles(1L)).thenReturn(Optional.of(book));
|
||||||
|
when(bookRepository.saveAndFlush(any(BookEntity.class))).thenAnswer(inv -> {
|
||||||
|
BookEntity saved = inv.getArgument(0);
|
||||||
|
saved.setId(2L);
|
||||||
|
return saved;
|
||||||
|
});
|
||||||
|
|
||||||
|
setupMocksForGetUpdatedBook();
|
||||||
|
when(bookRepository.findByIdWithBookFiles(2L)).thenReturn(Optional.of(createBook(2L)));
|
||||||
|
|
||||||
|
DetachBookFileResponse response = service.detachBookFile(1L, 11L, true);
|
||||||
|
|
||||||
|
assertThat(response).isNotNull();
|
||||||
|
assertThat(book.getBookFiles()).hasSize(1);
|
||||||
|
assertThat(book.getBookFiles().getFirst().getId()).isEqualTo(10L);
|
||||||
|
verify(auditService).log(eq(org.booklore.model.enums.AuditAction.BOOK_FILE_DETACHED), anyString(), eq(1L), anyString());
|
||||||
|
verify(bookRepository).saveAndFlush(argThat(newBook -> {
|
||||||
|
assertThat(newBook.getBookFiles()).hasSize(1);
|
||||||
|
assertThat(newBook.getMetadata().getTitle()).isEqualTo("Test Book 1");
|
||||||
|
return true;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void detachAlternativeFormat_withoutCopyMetadata() {
|
||||||
|
BookEntity book = createBook(1L);
|
||||||
|
createBookFile(10L, book, true, BookFileType.EPUB);
|
||||||
|
createBookFile(11L, book, true, BookFileType.PDF);
|
||||||
|
|
||||||
|
when(bookRepository.findByIdWithBookFiles(1L)).thenReturn(Optional.of(book));
|
||||||
|
when(bookRepository.saveAndFlush(any(BookEntity.class))).thenAnswer(inv -> {
|
||||||
|
BookEntity saved = inv.getArgument(0);
|
||||||
|
saved.setId(2L);
|
||||||
|
return saved;
|
||||||
|
});
|
||||||
|
|
||||||
|
setupMocksForGetUpdatedBook();
|
||||||
|
when(bookRepository.findByIdWithBookFiles(2L)).thenReturn(Optional.of(createBook(2L)));
|
||||||
|
|
||||||
|
service.detachBookFile(1L, 11L, false);
|
||||||
|
|
||||||
|
verify(bookRepository).saveAndFlush(argThat(newBook -> {
|
||||||
|
assertThat(newBook.getMetadata().getTitle()).isEqualTo("file-11");
|
||||||
|
return true;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void detachSupplementaryFile() {
|
||||||
|
BookEntity book = createBook(1L);
|
||||||
|
createBookFile(10L, book, true, BookFileType.EPUB);
|
||||||
|
BookFileEntity suppFile = createBookFile(11L, book, false, BookFileType.PDF);
|
||||||
|
suppFile.setFileName("notes.txt");
|
||||||
|
|
||||||
|
when(bookRepository.findByIdWithBookFiles(1L)).thenReturn(Optional.of(book));
|
||||||
|
when(bookRepository.saveAndFlush(any(BookEntity.class))).thenAnswer(inv -> {
|
||||||
|
BookEntity saved = inv.getArgument(0);
|
||||||
|
saved.setId(2L);
|
||||||
|
return saved;
|
||||||
|
});
|
||||||
|
|
||||||
|
setupMocksForGetUpdatedBook();
|
||||||
|
when(bookRepository.findByIdWithBookFiles(2L)).thenReturn(Optional.of(createBook(2L)));
|
||||||
|
|
||||||
|
service.detachBookFile(1L, 11L, false);
|
||||||
|
|
||||||
|
assertThat(book.getBookFiles()).hasSize(1);
|
||||||
|
verify(bookRepository).saveAndFlush(argThat(newBook -> {
|
||||||
|
assertThat(newBook.getBookFiles()).hasSize(1);
|
||||||
|
assertThat(newBook.getBookFiles().getFirst().getFileName()).isEqualTo("notes.txt");
|
||||||
|
return true;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void detachPrimaryFile_alternativeGetsPromoted() {
|
||||||
|
BookEntity book = createBook(1L);
|
||||||
|
BookFileEntity primaryFile = createBookFile(10L, book, true, BookFileType.EPUB);
|
||||||
|
createBookFile(11L, book, true, BookFileType.PDF);
|
||||||
|
|
||||||
|
when(bookRepository.findByIdWithBookFiles(1L)).thenReturn(Optional.of(book));
|
||||||
|
when(bookRepository.saveAndFlush(any(BookEntity.class))).thenAnswer(inv -> {
|
||||||
|
BookEntity saved = inv.getArgument(0);
|
||||||
|
saved.setId(2L);
|
||||||
|
return saved;
|
||||||
|
});
|
||||||
|
|
||||||
|
setupMocksForGetUpdatedBook();
|
||||||
|
when(bookRepository.findByIdWithBookFiles(2L)).thenReturn(Optional.of(createBook(2L)));
|
||||||
|
|
||||||
|
service.detachBookFile(1L, 10L, false);
|
||||||
|
|
||||||
|
assertThat(book.getBookFiles()).hasSize(1);
|
||||||
|
assertThat(book.getBookFiles().getFirst().getId()).isEqualTo(11L);
|
||||||
|
assertThat(book.getBookFiles().getFirst().isBookFormat()).isTrue();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void rejectDetach_onlyOneFile() {
|
||||||
|
BookEntity book = createBook(1L);
|
||||||
|
BookFileEntity file = createBookFile(10L, book, true, BookFileType.EPUB);
|
||||||
|
|
||||||
|
assertThat(book.getBookFiles()).hasSize(1);
|
||||||
|
assertThat(file.isBookFormat()).isTrue();
|
||||||
|
|
||||||
|
when(bookRepository.findByIdWithBookFiles(1L)).thenReturn(Optional.of(book));
|
||||||
|
|
||||||
|
assertThatThrownBy(() -> service.detachBookFile(1L, 10L, false))
|
||||||
|
.isInstanceOf(APIException.class)
|
||||||
|
.hasMessageContaining("Cannot detach the only file");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void rejectDetach_fileNotOnBook() {
|
||||||
|
BookEntity book = createBook(1L);
|
||||||
|
createBookFile(10L, book, true, BookFileType.EPUB);
|
||||||
|
createBookFile(11L, book, true, BookFileType.PDF);
|
||||||
|
|
||||||
|
when(bookRepository.findByIdWithBookFiles(1L)).thenReturn(Optional.of(book));
|
||||||
|
|
||||||
|
assertThatThrownBy(() -> service.detachBookFile(1L, 99L, false))
|
||||||
|
.isInstanceOf(APIException.class)
|
||||||
|
.hasMessageContaining("File not found on this book");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void rejectDetach_bookNotFound() {
|
||||||
|
when(bookRepository.findByIdWithBookFiles(1L)).thenReturn(Optional.empty());
|
||||||
|
|
||||||
|
assertThatThrownBy(() -> service.detachBookFile(1L, 10L, false))
|
||||||
|
.isInstanceOf(APIException.class)
|
||||||
|
.hasMessageContaining("Book not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void rejectDetach_onlyBookFormatWithSupplementary() {
|
||||||
|
BookEntity book = createBook(1L);
|
||||||
|
createBookFile(10L, book, true, BookFileType.EPUB);
|
||||||
|
createBookFile(11L, book, false, BookFileType.PDF);
|
||||||
|
|
||||||
|
when(bookRepository.findByIdWithBookFiles(1L)).thenReturn(Optional.of(book));
|
||||||
|
|
||||||
|
assertThatThrownBy(() -> service.detachBookFile(1L, 10L, false))
|
||||||
|
.isInstanceOf(APIException.class)
|
||||||
|
.hasMessageContaining("only book format file");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void detachFile_resolvesCorrectLibraryPath() {
|
||||||
|
LibraryPathEntity libraryPath2 = LibraryPathEntity.builder()
|
||||||
|
.id(2L)
|
||||||
|
.library(library)
|
||||||
|
.path("/tmp/test-library/folder-2")
|
||||||
|
.build();
|
||||||
|
library.getLibraryPaths().add(libraryPath2);
|
||||||
|
|
||||||
|
BookEntity book = createBook(1L);
|
||||||
|
BookFileEntity primaryFile = createBookFile(10L, book, true, BookFileType.EPUB);
|
||||||
|
BookFileEntity altFile = createBookFile(11L, book, true, BookFileType.PDF);
|
||||||
|
altFile.setFileSubPath("folder-2");
|
||||||
|
|
||||||
|
when(bookRepository.findByIdWithBookFiles(1L)).thenReturn(Optional.of(book));
|
||||||
|
when(bookRepository.saveAndFlush(any(BookEntity.class))).thenAnswer(inv -> {
|
||||||
|
BookEntity saved = inv.getArgument(0);
|
||||||
|
saved.setId(2L);
|
||||||
|
return saved;
|
||||||
|
});
|
||||||
|
|
||||||
|
setupMocksForGetUpdatedBook();
|
||||||
|
when(bookRepository.findByIdWithBookFiles(2L)).thenReturn(Optional.of(createBook(2L)));
|
||||||
|
|
||||||
|
service.detachBookFile(1L, 11L, false);
|
||||||
|
|
||||||
|
verify(bookRepository).saveAndFlush(argThat(newBook -> {
|
||||||
|
assertThat(newBook.getLibraryPath().getId()).isEqualTo(2L);
|
||||||
|
assertThat(newBook.getBookFiles().getFirst().getFileSubPath()).isEmpty();
|
||||||
|
return true;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.booklore.service.library;
|
package org.booklore.service.library;
|
||||||
|
|
||||||
import org.booklore.model.MetadataUpdateContext;
|
import org.booklore.model.MetadataUpdateContext;
|
||||||
|
import org.booklore.model.dto.AudiobookMetadata;
|
||||||
import org.booklore.model.dto.BookMetadata;
|
import org.booklore.model.dto.BookMetadata;
|
||||||
import org.booklore.model.entity.BookFileEntity;
|
import org.booklore.model.entity.BookFileEntity;
|
||||||
import org.booklore.model.entity.BookEntity;
|
import org.booklore.model.entity.BookEntity;
|
||||||
@@ -14,6 +15,7 @@ import org.booklore.model.websocket.Topic;
|
|||||||
import org.booklore.repository.BookRepository;
|
import org.booklore.repository.BookRepository;
|
||||||
import org.booklore.repository.LibraryRepository;
|
import org.booklore.repository.LibraryRepository;
|
||||||
import org.booklore.service.NotificationService;
|
import org.booklore.service.NotificationService;
|
||||||
|
import org.booklore.service.fileprocessor.AudiobookProcessor;
|
||||||
import org.booklore.service.metadata.BookMetadataUpdater;
|
import org.booklore.service.metadata.BookMetadataUpdater;
|
||||||
import org.booklore.service.metadata.extractor.MetadataExtractorFactory;
|
import org.booklore.service.metadata.extractor.MetadataExtractorFactory;
|
||||||
import org.booklore.task.options.RescanLibraryContext;
|
import org.booklore.task.options.RescanLibraryContext;
|
||||||
@@ -46,6 +48,7 @@ class LibraryRescanHelperTest {
|
|||||||
@Mock private NotificationService notificationService;
|
@Mock private NotificationService notificationService;
|
||||||
@Mock private TaskCancellationManager cancellationManager;
|
@Mock private TaskCancellationManager cancellationManager;
|
||||||
@Mock private BookRepository bookRepository;
|
@Mock private BookRepository bookRepository;
|
||||||
|
@Mock private AudiobookProcessor audiobookProcessor;
|
||||||
@InjectMocks private LibraryRescanHelper libraryRescanHelper;
|
@InjectMocks private LibraryRescanHelper libraryRescanHelper;
|
||||||
|
|
||||||
@Captor private ArgumentCaptor<TaskProgressPayload> payloadCaptor;
|
@Captor private ArgumentCaptor<TaskProgressPayload> payloadCaptor;
|
||||||
@@ -306,6 +309,71 @@ class LibraryRescanHelperTest {
|
|||||||
verify(bookMetadataUpdater).setBookMetadata(any(MetadataUpdateContext.class));
|
verify(bookMetadataUpdater).setBookMetadata(any(MetadataUpdateContext.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void handleRescanOptions_shouldUpdateAudiobookTechnicalMetadata() {
|
||||||
|
BookEntity audiobookEntity = createBookEntity(3L, "audiobook.m4b", BookFileType.AUDIOBOOK);
|
||||||
|
|
||||||
|
AudiobookMetadata audiobookMeta = AudiobookMetadata.builder()
|
||||||
|
.durationSeconds(3600L)
|
||||||
|
.bitrate(128)
|
||||||
|
.sampleRate(44100)
|
||||||
|
.channels(2)
|
||||||
|
.codec("AAC")
|
||||||
|
.chapterCount(5)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
BookMetadata metadata = new BookMetadata();
|
||||||
|
metadata.setTitle("Test Audiobook");
|
||||||
|
metadata.setAudiobookMetadata(audiobookMeta);
|
||||||
|
|
||||||
|
when(libraryRepository.findById(1L)).thenReturn(Optional.of(library));
|
||||||
|
when(bookRepository.findAllWithMetadataByLibraryId(1L)).thenReturn(List.of(audiobookEntity));
|
||||||
|
when(metadataExtractorFactory.extractMetadata(eq(BookFileType.AUDIOBOOK), any(File.class))).thenReturn(metadata);
|
||||||
|
when(cancellationManager.isTaskCancelled(taskId)).thenReturn(false);
|
||||||
|
|
||||||
|
libraryRescanHelper.handleRescanOptions(rescanContext, taskId);
|
||||||
|
|
||||||
|
verify(bookMetadataUpdater).setBookMetadata(any(MetadataUpdateContext.class));
|
||||||
|
verify(audiobookProcessor).setAudiobookTechnicalMetadata(audiobookEntity, metadata);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void handleRescanOptions_shouldNotUpdateTechnicalMetadata_forNonAudiobooks() {
|
||||||
|
BookEntity epubBook = createBookEntity(1L, "book.epub", BookFileType.EPUB);
|
||||||
|
|
||||||
|
BookMetadata metadata = new BookMetadata();
|
||||||
|
metadata.setTitle("Epub Book");
|
||||||
|
|
||||||
|
when(libraryRepository.findById(1L)).thenReturn(Optional.of(library));
|
||||||
|
when(bookRepository.findAllWithMetadataByLibraryId(1L)).thenReturn(List.of(epubBook));
|
||||||
|
when(metadataExtractorFactory.extractMetadata(eq(BookFileType.EPUB), any(File.class))).thenReturn(metadata);
|
||||||
|
when(cancellationManager.isTaskCancelled(taskId)).thenReturn(false);
|
||||||
|
|
||||||
|
libraryRescanHelper.handleRescanOptions(rescanContext, taskId);
|
||||||
|
|
||||||
|
verify(bookMetadataUpdater).setBookMetadata(any(MetadataUpdateContext.class));
|
||||||
|
verify(audiobookProcessor, never()).setAudiobookTechnicalMetadata(any(), any());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void handleRescanOptions_shouldSkipTechnicalMetadata_whenAudiobookMetadataNull() {
|
||||||
|
BookEntity audiobookEntity = createBookEntity(3L, "audiobook.m4b", BookFileType.AUDIOBOOK);
|
||||||
|
|
||||||
|
BookMetadata metadata = new BookMetadata();
|
||||||
|
metadata.setTitle("Audiobook Without Tech Meta");
|
||||||
|
metadata.setAudiobookMetadata(null);
|
||||||
|
|
||||||
|
when(libraryRepository.findById(1L)).thenReturn(Optional.of(library));
|
||||||
|
when(bookRepository.findAllWithMetadataByLibraryId(1L)).thenReturn(List.of(audiobookEntity));
|
||||||
|
when(metadataExtractorFactory.extractMetadata(eq(BookFileType.AUDIOBOOK), any(File.class))).thenReturn(metadata);
|
||||||
|
when(cancellationManager.isTaskCancelled(taskId)).thenReturn(false);
|
||||||
|
|
||||||
|
libraryRescanHelper.handleRescanOptions(rescanContext, taskId);
|
||||||
|
|
||||||
|
verify(bookMetadataUpdater).setBookMetadata(any(MetadataUpdateContext.class));
|
||||||
|
verify(audiobookProcessor, never()).setAudiobookTechnicalMetadata(any(), any());
|
||||||
|
}
|
||||||
|
|
||||||
private BookEntity createBookEntity(Long id, String fileName, BookFileType bookType) {
|
private BookEntity createBookEntity(Long id, String fileName, BookFileType bookType) {
|
||||||
LibraryPathEntity libraryPath = new LibraryPathEntity();
|
LibraryPathEntity libraryPath = new LibraryPathEntity();
|
||||||
libraryPath.setPath("/test/path");
|
libraryPath.setPath("/test/path");
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
package org.booklore.service.reader;
|
package org.booklore.service.reader;
|
||||||
|
|
||||||
|
import org.booklore.model.dto.AudiobookMetadata;
|
||||||
import org.booklore.model.dto.response.AudiobookChapter;
|
import org.booklore.model.dto.response.AudiobookChapter;
|
||||||
import org.booklore.model.dto.response.AudiobookInfo;
|
import org.booklore.model.dto.response.AudiobookInfo;
|
||||||
import org.booklore.model.dto.response.AudiobookTrack;
|
import org.booklore.model.dto.response.AudiobookTrack;
|
||||||
import org.booklore.model.entity.BookEntity;
|
import org.booklore.model.entity.BookEntity;
|
||||||
import org.booklore.model.entity.BookFileEntity;
|
import org.booklore.model.entity.BookFileEntity;
|
||||||
import org.booklore.model.entity.BookMetadataEntity;
|
import org.booklore.model.entity.BookMetadataEntity;
|
||||||
|
import org.booklore.repository.BookFileRepository;
|
||||||
|
import org.booklore.service.metadata.extractor.AudiobookMetadataExtractor;
|
||||||
import org.jaudiotagger.audio.AudioFile;
|
import org.jaudiotagger.audio.AudioFile;
|
||||||
import org.jaudiotagger.audio.AudioFileIO;
|
import org.jaudiotagger.audio.AudioFileIO;
|
||||||
import org.jaudiotagger.audio.AudioHeader;
|
import org.jaudiotagger.audio.AudioHeader;
|
||||||
@@ -23,6 +26,7 @@ import org.mockito.junit.jupiter.MockitoExtension;
|
|||||||
import org.mockito.junit.jupiter.MockitoSettings;
|
import org.mockito.junit.jupiter.MockitoSettings;
|
||||||
import org.mockito.quality.Strictness;
|
import org.mockito.quality.Strictness;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -37,6 +41,12 @@ class AudioMetadataServiceTest {
|
|||||||
@Mock
|
@Mock
|
||||||
AudioFileUtilityService audioFileUtility;
|
AudioFileUtilityService audioFileUtility;
|
||||||
|
|
||||||
|
@Mock
|
||||||
|
AudiobookMetadataExtractor audiobookMetadataExtractor;
|
||||||
|
|
||||||
|
@Mock
|
||||||
|
BookFileRepository bookFileRepository;
|
||||||
|
|
||||||
@InjectMocks
|
@InjectMocks
|
||||||
AudioMetadataService audioMetadataService;
|
AudioMetadataService audioMetadataService;
|
||||||
|
|
||||||
@@ -558,4 +568,124 @@ class AudioMetadataServiceTest {
|
|||||||
assertNull(info.getBitrate());
|
assertNull(info.getBitrate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getMetadata_backfillsChapters_whenDbHasMetadataButNoChapters() throws Exception {
|
||||||
|
bookFileEntity.setDurationSeconds(3600L);
|
||||||
|
bookFileEntity.setBitrate(192);
|
||||||
|
bookFileEntity.setChapters(null);
|
||||||
|
|
||||||
|
var bookMetadata = new BookMetadataEntity();
|
||||||
|
bookMetadata.setTitle("Test Book");
|
||||||
|
bookEntity.setMetadata(bookMetadata);
|
||||||
|
|
||||||
|
List<AudiobookMetadata.ChapterInfo> extractedChapters = List.of(
|
||||||
|
AudiobookMetadata.ChapterInfo.builder()
|
||||||
|
.index(0).title("Chapter 1").startTimeMs(0L).endTimeMs(1800000L).durationMs(1800000L).build(),
|
||||||
|
AudiobookMetadata.ChapterInfo.builder()
|
||||||
|
.index(1).title("Chapter 2").startTimeMs(1800000L).endTimeMs(3600000L).durationMs(1800000L).build()
|
||||||
|
);
|
||||||
|
when(audiobookMetadataExtractor.extractChaptersFromFile(any(File.class))).thenReturn(extractedChapters);
|
||||||
|
|
||||||
|
AudiobookInfo info = audioMetadataService.getMetadata(bookFileEntity, audioPath);
|
||||||
|
|
||||||
|
assertNotNull(info.getChapters());
|
||||||
|
assertEquals(2, info.getChapters().size());
|
||||||
|
assertEquals("Chapter 1", info.getChapters().get(0).getTitle());
|
||||||
|
assertEquals("Chapter 2", info.getChapters().get(1).getTitle());
|
||||||
|
|
||||||
|
verify(bookFileRepository).save(bookFileEntity);
|
||||||
|
assertNotNull(bookFileEntity.getChapters());
|
||||||
|
assertEquals(2, bookFileEntity.getChapters().size());
|
||||||
|
assertEquals(2, bookFileEntity.getChapterCount());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getMetadata_backfillFallsBackToFullAudiobook_whenExtractorReturnsNull() throws Exception {
|
||||||
|
bookFileEntity.setDurationSeconds(7200L);
|
||||||
|
bookFileEntity.setChapters(null);
|
||||||
|
|
||||||
|
var bookMetadata = new BookMetadataEntity();
|
||||||
|
bookEntity.setMetadata(bookMetadata);
|
||||||
|
|
||||||
|
when(audiobookMetadataExtractor.extractChaptersFromFile(any(File.class))).thenReturn(null);
|
||||||
|
|
||||||
|
AudiobookInfo info = audioMetadataService.getMetadata(bookFileEntity, audioPath);
|
||||||
|
|
||||||
|
assertNotNull(info.getChapters());
|
||||||
|
assertEquals(1, info.getChapters().size());
|
||||||
|
assertEquals("Full Audiobook", info.getChapters().get(0).getTitle());
|
||||||
|
assertEquals(7200000L, info.getChapters().get(0).getEndTimeMs());
|
||||||
|
|
||||||
|
verify(bookFileRepository).save(bookFileEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getMetadata_extractSingleFile_usesRealChapterExtraction() throws Exception {
|
||||||
|
AudioFile audioFile = mock(AudioFile.class);
|
||||||
|
AudioHeader header = mock(AudioHeader.class);
|
||||||
|
|
||||||
|
when(audioFile.getAudioHeader()).thenReturn(header);
|
||||||
|
when(audioFile.getTag()).thenReturn(null);
|
||||||
|
when(header.getPreciseTrackLength()).thenReturn(3600.0);
|
||||||
|
|
||||||
|
List<AudiobookMetadata.ChapterInfo> extractedChapters = List.of(
|
||||||
|
AudiobookMetadata.ChapterInfo.builder()
|
||||||
|
.index(0).title("Intro").startTimeMs(0L).endTimeMs(600000L).durationMs(600000L).build(),
|
||||||
|
AudiobookMetadata.ChapterInfo.builder()
|
||||||
|
.index(1).title("Part One").startTimeMs(600000L).endTimeMs(3600000L).durationMs(3000000L).build()
|
||||||
|
);
|
||||||
|
when(audiobookMetadataExtractor.extractChaptersFromFile(any(File.class))).thenReturn(extractedChapters);
|
||||||
|
|
||||||
|
try (MockedStatic<AudioFileIO> audioFileIOMock = mockStatic(AudioFileIO.class)) {
|
||||||
|
audioFileIOMock.when(() -> AudioFileIO.read(audioPath.toFile())).thenReturn(audioFile);
|
||||||
|
|
||||||
|
AudiobookInfo info = audioMetadataService.getMetadata(bookFileEntity, audioPath);
|
||||||
|
|
||||||
|
assertNotNull(info.getChapters());
|
||||||
|
assertEquals(2, info.getChapters().size());
|
||||||
|
assertEquals("Intro", info.getChapters().get(0).getTitle());
|
||||||
|
assertEquals("Part One", info.getChapters().get(1).getTitle());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getMetadata_extractSingleFile_fallsBackWhenExtractionReturnsEmpty() throws Exception {
|
||||||
|
AudioFile audioFile = mock(AudioFile.class);
|
||||||
|
AudioHeader header = mock(AudioHeader.class);
|
||||||
|
|
||||||
|
when(audioFile.getAudioHeader()).thenReturn(header);
|
||||||
|
when(audioFile.getTag()).thenReturn(null);
|
||||||
|
when(header.getPreciseTrackLength()).thenReturn(5400.0);
|
||||||
|
|
||||||
|
when(audiobookMetadataExtractor.extractChaptersFromFile(any(File.class))).thenReturn(List.of());
|
||||||
|
|
||||||
|
try (MockedStatic<AudioFileIO> audioFileIOMock = mockStatic(AudioFileIO.class)) {
|
||||||
|
audioFileIOMock.when(() -> AudioFileIO.read(audioPath.toFile())).thenReturn(audioFile);
|
||||||
|
|
||||||
|
AudiobookInfo info = audioMetadataService.getMetadata(bookFileEntity, audioPath);
|
||||||
|
|
||||||
|
assertNotNull(info.getChapters());
|
||||||
|
assertEquals(1, info.getChapters().size());
|
||||||
|
assertEquals("Full Audiobook", info.getChapters().get(0).getTitle());
|
||||||
|
assertEquals(5400000L, info.getChapters().get(0).getDurationMs());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getMetadata_backfillSurvivesExtractionException() throws Exception {
|
||||||
|
bookFileEntity.setDurationSeconds(1800L);
|
||||||
|
bookFileEntity.setChapters(null);
|
||||||
|
|
||||||
|
var bookMetadata = new BookMetadataEntity();
|
||||||
|
bookEntity.setMetadata(bookMetadata);
|
||||||
|
|
||||||
|
when(audiobookMetadataExtractor.extractChaptersFromFile(any(File.class)))
|
||||||
|
.thenThrow(new RuntimeException("ffprobe failed"));
|
||||||
|
|
||||||
|
AudiobookInfo info = audioMetadataService.getMetadata(bookFileEntity, audioPath);
|
||||||
|
|
||||||
|
assertNotNull(info);
|
||||||
|
verify(bookFileRepository, never()).save(any());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,108 @@
|
|||||||
|
package org.booklore.service.reader;
|
||||||
|
|
||||||
|
import org.booklore.util.FileService;
|
||||||
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
|
import org.junit.jupiter.api.io.TempDir;
|
||||||
|
import org.mockito.InjectMocks;
|
||||||
|
import org.mockito.Mock;
|
||||||
|
import org.mockito.junit.jupiter.MockitoExtension;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
|
@ExtendWith(MockitoExtension.class)
|
||||||
|
class FfprobeServiceTest {
|
||||||
|
|
||||||
|
@Mock
|
||||||
|
FileService fileService;
|
||||||
|
|
||||||
|
@InjectMocks
|
||||||
|
FfprobeService ffprobeService;
|
||||||
|
|
||||||
|
@TempDir
|
||||||
|
Path tempDir;
|
||||||
|
|
||||||
|
@BeforeEach
|
||||||
|
void setUp() {
|
||||||
|
when(fileService.getToolsFfprobePath()).thenReturn(tempDir.resolve("tools/ffprobe").toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getFfprobeBinary_returnsExistingBinary() throws IOException {
|
||||||
|
Path toolsDir = tempDir.resolve("tools/ffprobe");
|
||||||
|
Files.createDirectories(toolsDir);
|
||||||
|
|
||||||
|
String expectedName = getExpectedBinaryName();
|
||||||
|
Path binaryPath = toolsDir.resolve(expectedName);
|
||||||
|
Files.writeString(binaryPath, "fake-binary");
|
||||||
|
|
||||||
|
Path result = ffprobeService.getFfprobeBinary();
|
||||||
|
|
||||||
|
assertThat(result).isNotNull();
|
||||||
|
assertThat(result.getFileName().toString()).isEqualTo(expectedName);
|
||||||
|
assertThat(result).exists();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getFfprobeBinary_createsDirectoryIfMissing() throws IOException {
|
||||||
|
Path toolsDir = tempDir.resolve("tools/ffprobe");
|
||||||
|
|
||||||
|
String expectedName = getExpectedBinaryName();
|
||||||
|
Path binaryPath = toolsDir.resolve(expectedName);
|
||||||
|
Files.createDirectories(toolsDir);
|
||||||
|
Files.writeString(binaryPath, "fake-binary");
|
||||||
|
|
||||||
|
Path result = ffprobeService.getFfprobeBinary();
|
||||||
|
|
||||||
|
assertThat(result).isNotNull();
|
||||||
|
assertThat(toolsDir).exists();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getFfprobeBinary_returnsNullOnFailure() {
|
||||||
|
when(fileService.getToolsFfprobePath()).thenReturn("/nonexistent\0path");
|
||||||
|
|
||||||
|
Path result = ffprobeService.getFfprobeBinary();
|
||||||
|
|
||||||
|
assertThat(result).isNull();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getFfprobeBinary_setsExecutablePermission() throws IOException {
|
||||||
|
Path toolsDir = tempDir.resolve("tools/ffprobe");
|
||||||
|
Files.createDirectories(toolsDir);
|
||||||
|
|
||||||
|
String expectedName = getExpectedBinaryName();
|
||||||
|
Path binaryPath = toolsDir.resolve(expectedName);
|
||||||
|
Files.writeString(binaryPath, "fake-binary");
|
||||||
|
|
||||||
|
Path result = ffprobeService.getFfprobeBinary();
|
||||||
|
|
||||||
|
assertThat(result).isNotNull();
|
||||||
|
assertThat(result.toFile().canExecute()).isTrue();
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getExpectedBinaryName() {
|
||||||
|
String osName = System.getProperty("os.name").toLowerCase();
|
||||||
|
String osArch = System.getProperty("os.arch").toLowerCase();
|
||||||
|
|
||||||
|
if (osName.contains("mac") || osName.contains("darwin")) {
|
||||||
|
if (osArch.contains("arm") || osArch.contains("aarch64")) {
|
||||||
|
return "ffprobe-darwin-arm64";
|
||||||
|
}
|
||||||
|
return "ffprobe-darwin-64";
|
||||||
|
} else if (osName.contains("linux")) {
|
||||||
|
if (osArch.contains("arm64") || osArch.contains("aarch64")) {
|
||||||
|
return "ffprobe-linux-arm64";
|
||||||
|
}
|
||||||
|
return "ffprobe-linux-64";
|
||||||
|
}
|
||||||
|
throw new IllegalStateException("Unsupported OS for test: " + osName);
|
||||||
|
}
|
||||||
|
}
|
||||||
Generated
+103
-103
@@ -4020,9 +4020,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-android-arm-eabi": {
|
"node_modules/@rollup/rollup-android-arm-eabi": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz",
|
||||||
"integrity": "sha512-A6ehUVSiSaaliTxai040ZpZ2zTevHYbvu/lDoeAteHI8QnaosIzm4qwtezfRg1jOYaUmnzLX1AOD6Z+UJjtifg==",
|
"integrity": "sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@@ -4034,9 +4034,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-android-arm64": {
|
"node_modules/@rollup/rollup-android-arm64": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.59.0.tgz",
|
||||||
"integrity": "sha512-dQaAddCY9YgkFHZcFNS/606Exo8vcLHwArFZ7vxXq4rigo2bb494/xKMMwRRQW6ug7Js6yXmBZhSBRuBvCCQ3w==",
|
"integrity": "sha512-hZ+Zxj3SySm4A/DylsDKZAeVg0mvi++0PYVceVyX7hemkw7OreKdCvW2oQ3T1FMZvCaQXqOTHb8qmBShoqk69Q==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -4048,9 +4048,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-darwin-arm64": {
|
"node_modules/@rollup/rollup-darwin-arm64": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.59.0.tgz",
|
||||||
"integrity": "sha512-crNPrwJOrRxagUYeMn/DZwqN88SDmwaJ8Cvi/TN1HnWBU7GwknckyosC2gd0IqYRsHDEnXf328o9/HC6OkPgOg==",
|
"integrity": "sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -4062,9 +4062,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-darwin-x64": {
|
"node_modules/@rollup/rollup-darwin-x64": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.59.0.tgz",
|
||||||
"integrity": "sha512-Ji8g8ChVbKrhFtig5QBV7iMaJrGtpHelkB3lsaKzadFBe58gmjfGXAOfI5FV0lYMH8wiqsxKQ1C9B0YTRXVy4w==",
|
"integrity": "sha512-ZW2KkwlS4lwTv7ZVsYDiARfFCnSGhzYPdiOU4IM2fDbL+QGlyAbjgSFuqNRbSthybLbIJ915UtZBtmuLrQAT/w==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -4076,9 +4076,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-freebsd-arm64": {
|
"node_modules/@rollup/rollup-freebsd-arm64": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.59.0.tgz",
|
||||||
"integrity": "sha512-R+/WwhsjmwodAcz65guCGFRkMb4gKWTcIeLy60JJQbXrJ97BOXHxnkPFrP+YwFlaS0m+uWJTstrUA9o+UchFug==",
|
"integrity": "sha512-EsKaJ5ytAu9jI3lonzn3BgG8iRBjV4LxZexygcQbpiU0wU0ATxhNVEpXKfUa0pS05gTcSDMKpn3Sx+QB9RlTTA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -4090,9 +4090,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-freebsd-x64": {
|
"node_modules/@rollup/rollup-freebsd-x64": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.59.0.tgz",
|
||||||
"integrity": "sha512-IEQTCHeiTOnAUC3IDQdzRAGj3jOAYNr9kBguI7MQAAZK3caezRrg0GxAb6Hchg4lxdZEI5Oq3iov/w/hnFWY9Q==",
|
"integrity": "sha512-d3DuZi2KzTMjImrxoHIAODUZYoUUMsuUiY4SRRcJy6NJoZ6iIqWnJu9IScV9jXysyGMVuW+KNzZvBLOcpdl3Vg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -4104,9 +4104,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.59.0.tgz",
|
||||||
"integrity": "sha512-F8sWbhZ7tyuEfsmOxwc2giKDQzN3+kuBLPwwZGyVkLlKGdV1nvnNwYD0fKQ8+XS6hp9nY7B+ZeK01EBUE7aHaw==",
|
"integrity": "sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@@ -4118,9 +4118,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
|
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.59.0.tgz",
|
||||||
"integrity": "sha512-rGfNUfn0GIeXtBP1wL5MnzSj98+PZe/AXaGBCRmT0ts80lU5CATYGxXukeTX39XBKsxzFpEeK+Mrp9faXOlmrw==",
|
"integrity": "sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
@@ -4132,9 +4132,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.59.0.tgz",
|
||||||
"integrity": "sha512-MMtej3YHWeg/0klK2Qodf3yrNzz6CGjo2UntLvk2RSPlhzgLvYEB3frRvbEF2wRKh1Z2fDIg9KRPe1fawv7C+g==",
|
"integrity": "sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -4146,9 +4146,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.59.0.tgz",
|
||||||
"integrity": "sha512-1a/qhaaOXhqXGpMFMET9VqwZakkljWHLmZOX48R0I/YLbhdxr1m4gtG1Hq7++VhVUmf+L3sTAf9op4JlhQ5u1Q==",
|
"integrity": "sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -4160,9 +4160,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-loong64-gnu": {
|
"node_modules/@rollup/rollup-linux-loong64-gnu": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.59.0.tgz",
|
||||||
"integrity": "sha512-QWO6RQTZ/cqYtJMtxhkRkidoNGXc7ERPbZN7dVW5SdURuLeVU7lwKMpo18XdcmpWYd0qsP1bwKPf7DNSUinhvA==",
|
"integrity": "sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"loong64"
|
"loong64"
|
||||||
],
|
],
|
||||||
@@ -4174,9 +4174,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-loong64-musl": {
|
"node_modules/@rollup/rollup-linux-loong64-musl": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.59.0.tgz",
|
||||||
"integrity": "sha512-xpObYIf+8gprgWaPP32xiN5RVTi/s5FCR+XMXSKmhfoJjrpRAjCuuqQXyxUa/eJTdAE6eJ+KDKaoEqjZQxh3Gw==",
|
"integrity": "sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"loong64"
|
"loong64"
|
||||||
],
|
],
|
||||||
@@ -4188,9 +4188,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-ppc64-gnu": {
|
"node_modules/@rollup/rollup-linux-ppc64-gnu": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.59.0.tgz",
|
||||||
"integrity": "sha512-4BrCgrpZo4hvzMDKRqEaW1zeecScDCR+2nZ86ATLhAoJ5FQ+lbHVD3ttKe74/c7tNT9c6F2viwB3ufwp01Oh2w==",
|
"integrity": "sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
@@ -4202,9 +4202,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-ppc64-musl": {
|
"node_modules/@rollup/rollup-linux-ppc64-musl": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.59.0.tgz",
|
||||||
"integrity": "sha512-NOlUuzesGauESAyEYFSe3QTUguL+lvrN1HtwEEsU2rOwdUDeTMJdO5dUYl/2hKf9jWydJrO9OL/XSSf65R5+Xw==",
|
"integrity": "sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
@@ -4216,9 +4216,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.59.0.tgz",
|
||||||
"integrity": "sha512-ptA88htVp0AwUUqhVghwDIKlvJMD/fmL/wrQj99PRHFRAG6Z5nbWoWG4o81Nt9FT+IuqUQi+L31ZKAFeJ5Is+A==",
|
"integrity": "sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
@@ -4230,9 +4230,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-riscv64-musl": {
|
"node_modules/@rollup/rollup-linux-riscv64-musl": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.59.0.tgz",
|
||||||
"integrity": "sha512-S51t7aMMTNdmAMPpBg7OOsTdn4tySRQvklmL3RpDRyknk87+Sp3xaumlatU+ppQ+5raY7sSTcC2beGgvhENfuw==",
|
"integrity": "sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
@@ -4244,9 +4244,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-s390x-gnu": {
|
"node_modules/@rollup/rollup-linux-s390x-gnu": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.59.0.tgz",
|
||||||
"integrity": "sha512-Bl00OFnVFkL82FHbEqy3k5CUCKH6OEJL54KCyx2oqsmZnFTR8IoNqBF+mjQVcRCT5sB6yOvK8A37LNm/kPJiZg==",
|
"integrity": "sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"s390x"
|
"s390x"
|
||||||
],
|
],
|
||||||
@@ -4258,9 +4258,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.59.0.tgz",
|
||||||
"integrity": "sha512-ABca4ceT4N+Tv/GtotnWAeXZUZuM/9AQyCyKYyKnpk4yoA7QIAuBt6Hkgpw8kActYlew2mvckXkvx0FfoInnLg==",
|
"integrity": "sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -4272,9 +4272,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-linux-x64-musl": {
|
"node_modules/@rollup/rollup-linux-x64-musl": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.59.0.tgz",
|
||||||
"integrity": "sha512-HFps0JeGtuOR2convgRRkHCekD7j+gdAuXM+/i6kGzQtFhlCtQkpwtNzkNj6QhCDp7DRJ7+qC/1Vg2jt5iSOFw==",
|
"integrity": "sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -4286,9 +4286,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-openbsd-x64": {
|
"node_modules/@rollup/rollup-openbsd-x64": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.59.0.tgz",
|
||||||
"integrity": "sha512-H+hXEv9gdVQuDTgnqD+SQffoWoc0Of59AStSzTEj/feWTBAnSfSD3+Dql1ZruJQxmykT/JVY0dE8Ka7z0DH1hw==",
|
"integrity": "sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -4300,9 +4300,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-openharmony-arm64": {
|
"node_modules/@rollup/rollup-openharmony-arm64": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.59.0.tgz",
|
||||||
"integrity": "sha512-4wYoDpNg6o/oPximyc/NG+mYUejZrCU2q+2w6YZqrAs2UcNUChIZXjtafAiiZSUc7On8v5NyNj34Kzj/Ltk6dQ==",
|
"integrity": "sha512-tt9KBJqaqp5i5HUZzoafHZX8b5Q2Fe7UjYERADll83O4fGqJ49O1FsL6LpdzVFQcpwvnyd0i+K/VSwu/o/nWlA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -4314,9 +4314,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.59.0.tgz",
|
||||||
"integrity": "sha512-O54mtsV/6LW3P8qdTcamQmuC990HDfR71lo44oZMZlXU4tzLrbvTii87Ni9opq60ds0YzuAlEr/GNwuNluZyMQ==",
|
"integrity": "sha512-V5B6mG7OrGTwnxaNUzZTDTjDS7F75PO1ae6MJYdiMu60sq0CqN5CVeVsbhPxalupvTX8gXVSU9gq+Rx1/hvu6A==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
@@ -4328,9 +4328,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.59.0.tgz",
|
||||||
"integrity": "sha512-P3dLS+IerxCT/7D2q2FYcRdWRl22dNbrbBEtxdWhXrfIMPP9lQhb5h4Du04mdl5Woq05jVCDPCMF7Ub0NAjIew==",
|
"integrity": "sha512-UKFMHPuM9R0iBegwzKF4y0C4J9u8C6MEJgFuXTBerMk7EJ92GFVFYBfOZaSGLu6COf7FxpQNqhNS4c4icUPqxA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
@@ -4342,9 +4342,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-x64-gnu": {
|
"node_modules/@rollup/rollup-win32-x64-gnu": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.59.0.tgz",
|
||||||
"integrity": "sha512-VMBH2eOOaKGtIJYleXsi2B8CPVADrh+TyNxJ4mWPnKfLB/DBUmzW+5m1xUrcwWoMfSLagIRpjUFeW5CO5hyciQ==",
|
"integrity": "sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -4356,9 +4356,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.59.0.tgz",
|
||||||
"integrity": "sha512-mxRFDdHIWRxg3UfIIAwCm6NzvxG0jDX/wBN6KsQFTvKFqqg9vTrWUE68qEjHt19A5wwx5X5aUi2zuZT7YR0jrA==",
|
"integrity": "sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==",
|
||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
@@ -9435,9 +9435,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/rollup": {
|
"node_modules/rollup": {
|
||||||
"version": "4.57.1",
|
"version": "4.59.0",
|
||||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.57.1.tgz",
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz",
|
||||||
"integrity": "sha512-oQL6lgK3e2QZeQ7gcgIkS2YZPg5slw37hYufJ3edKlfQSGGm8ICoxswK15ntSzF/a8+h7ekRy7k7oWc3BQ7y8A==",
|
"integrity": "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -9451,31 +9451,31 @@
|
|||||||
"npm": ">=8.0.0"
|
"npm": ">=8.0.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@rollup/rollup-android-arm-eabi": "4.57.1",
|
"@rollup/rollup-android-arm-eabi": "4.59.0",
|
||||||
"@rollup/rollup-android-arm64": "4.57.1",
|
"@rollup/rollup-android-arm64": "4.59.0",
|
||||||
"@rollup/rollup-darwin-arm64": "4.57.1",
|
"@rollup/rollup-darwin-arm64": "4.59.0",
|
||||||
"@rollup/rollup-darwin-x64": "4.57.1",
|
"@rollup/rollup-darwin-x64": "4.59.0",
|
||||||
"@rollup/rollup-freebsd-arm64": "4.57.1",
|
"@rollup/rollup-freebsd-arm64": "4.59.0",
|
||||||
"@rollup/rollup-freebsd-x64": "4.57.1",
|
"@rollup/rollup-freebsd-x64": "4.59.0",
|
||||||
"@rollup/rollup-linux-arm-gnueabihf": "4.57.1",
|
"@rollup/rollup-linux-arm-gnueabihf": "4.59.0",
|
||||||
"@rollup/rollup-linux-arm-musleabihf": "4.57.1",
|
"@rollup/rollup-linux-arm-musleabihf": "4.59.0",
|
||||||
"@rollup/rollup-linux-arm64-gnu": "4.57.1",
|
"@rollup/rollup-linux-arm64-gnu": "4.59.0",
|
||||||
"@rollup/rollup-linux-arm64-musl": "4.57.1",
|
"@rollup/rollup-linux-arm64-musl": "4.59.0",
|
||||||
"@rollup/rollup-linux-loong64-gnu": "4.57.1",
|
"@rollup/rollup-linux-loong64-gnu": "4.59.0",
|
||||||
"@rollup/rollup-linux-loong64-musl": "4.57.1",
|
"@rollup/rollup-linux-loong64-musl": "4.59.0",
|
||||||
"@rollup/rollup-linux-ppc64-gnu": "4.57.1",
|
"@rollup/rollup-linux-ppc64-gnu": "4.59.0",
|
||||||
"@rollup/rollup-linux-ppc64-musl": "4.57.1",
|
"@rollup/rollup-linux-ppc64-musl": "4.59.0",
|
||||||
"@rollup/rollup-linux-riscv64-gnu": "4.57.1",
|
"@rollup/rollup-linux-riscv64-gnu": "4.59.0",
|
||||||
"@rollup/rollup-linux-riscv64-musl": "4.57.1",
|
"@rollup/rollup-linux-riscv64-musl": "4.59.0",
|
||||||
"@rollup/rollup-linux-s390x-gnu": "4.57.1",
|
"@rollup/rollup-linux-s390x-gnu": "4.59.0",
|
||||||
"@rollup/rollup-linux-x64-gnu": "4.57.1",
|
"@rollup/rollup-linux-x64-gnu": "4.59.0",
|
||||||
"@rollup/rollup-linux-x64-musl": "4.57.1",
|
"@rollup/rollup-linux-x64-musl": "4.59.0",
|
||||||
"@rollup/rollup-openbsd-x64": "4.57.1",
|
"@rollup/rollup-openbsd-x64": "4.59.0",
|
||||||
"@rollup/rollup-openharmony-arm64": "4.57.1",
|
"@rollup/rollup-openharmony-arm64": "4.59.0",
|
||||||
"@rollup/rollup-win32-arm64-msvc": "4.57.1",
|
"@rollup/rollup-win32-arm64-msvc": "4.59.0",
|
||||||
"@rollup/rollup-win32-ia32-msvc": "4.57.1",
|
"@rollup/rollup-win32-ia32-msvc": "4.59.0",
|
||||||
"@rollup/rollup-win32-x64-gnu": "4.57.1",
|
"@rollup/rollup-win32-x64-gnu": "4.59.0",
|
||||||
"@rollup/rollup-win32-x64-msvc": "4.57.1",
|
"@rollup/rollup-win32-x64-msvc": "4.59.0",
|
||||||
"fsevents": "~2.3.2"
|
"fsevents": "~2.3.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-10
@@ -144,16 +144,7 @@ export class BookBrowserEntityService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fetchShelfBooks(shelfId: number, sortOption: SortOption): Observable<BookState> {
|
private fetchShelfBooks(shelfId: number, sortOption: SortOption): Observable<BookState> {
|
||||||
return this.shelfService.getBooksOnShelf(shelfId).pipe(
|
return this.fetchBooks(book => book.shelves?.some(s => s.id === shelfId) ?? false, sortOption);
|
||||||
map(books => {
|
|
||||||
const sortedBooks = this.sortService.applySort(books, sortOption);
|
|
||||||
return {
|
|
||||||
books: sortedBooks,
|
|
||||||
loaded: true,
|
|
||||||
error: null
|
|
||||||
};
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fetchMagicShelfBooks(magicShelfId: number, sortOption: SortOption): Observable<BookState> {
|
private fetchMagicShelfBooks(magicShelfId: number, sortOption: SortOption): Observable<BookState> {
|
||||||
|
|||||||
+1
-1
@@ -287,7 +287,7 @@ export class BookBrowserQueryParamsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const currentParams = this.activatedRoute.snapshot.queryParams;
|
const currentParams = this.activatedRoute.snapshot.queryParams;
|
||||||
const changed = Object.keys(queryParams).some(k => currentParams[k] !== queryParams[k]);
|
const changed = Object.keys(queryParams).some(k => (queryParams[k] ?? undefined) !== (currentParams[k] ?? undefined));
|
||||||
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
const mergedParams = {...currentParams, ...queryParams};
|
const mergedParams = {...currentParams, ...queryParams};
|
||||||
|
|||||||
+24
-4
@@ -470,8 +470,13 @@ export class BookBrowserComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
this.visibleSortOptions = visibleFields.map(f => sortOptionsByField.get(f)).filter((o): o is SortOption => !!o);
|
this.visibleSortOptions = visibleFields.map(f => sortOptionsByField.get(f)).filter((o): o is SortOption => !!o);
|
||||||
|
|
||||||
|
|
||||||
// Only update sort criteria if they actually changed to avoid resetting popover/CDK state
|
// Only update sort criteria if they actually changed to avoid resetting popover/CDK state.
|
||||||
if (!this.areSortCriteriaEqual(this.bookSorter.selectedSortCriteria, parseResult.sortCriteria)) {
|
// Skip preference-based sort re-derivation when sort is already established (prevents
|
||||||
|
// userState$ emissions from non-sort preference changes like seriesCollapsed from
|
||||||
|
// resetting the sort during the race window before syncQueryParams writes to URL).
|
||||||
|
const sortFromUrl = !!queryParamMap.get('sort');
|
||||||
|
const sortNotYetEstablished = this.bookSorter.selectedSortCriteria.length === 0;
|
||||||
|
if ((sortFromUrl || sortNotYetEstablished) && !this.areSortCriteriaEqual(this.bookSorter.selectedSortCriteria, parseResult.sortCriteria)) {
|
||||||
this.bookSorter.setSortCriteria(parseResult.sortCriteria);
|
this.bookSorter.setSortCriteria(parseResult.sortCriteria);
|
||||||
}
|
}
|
||||||
this.currentViewMode = parseResult.viewMode;
|
this.currentViewMode = parseResult.viewMode;
|
||||||
@@ -822,6 +827,11 @@ export class BookBrowserComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
lockUnlockMetadata(): void {
|
lockUnlockMetadata(): void {
|
||||||
this.dynamicDialogRef = this.dialogHelperService.openLockUnlockMetadataDialog(this.selectedBooks);
|
this.dynamicDialogRef = this.dialogHelperService.openLockUnlockMetadataDialog(this.selectedBooks);
|
||||||
|
if (this.dynamicDialogRef) {
|
||||||
|
this.dynamicDialogRef.onClose.subscribe(() => {
|
||||||
|
this.bookSelectionService.deselectAll();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
autoFetchMetadata(): void {
|
autoFetchMetadata(): void {
|
||||||
@@ -837,11 +847,21 @@ export class BookBrowserComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bulkEditMetadata(): void {
|
bulkEditMetadata(): void {
|
||||||
this.dialogHelperService.openBulkMetadataEditDialog(this.selectedBooks);
|
this.dynamicDialogRef = this.dialogHelperService.openBulkMetadataEditDialog(this.selectedBooks);
|
||||||
|
if (this.dynamicDialogRef) {
|
||||||
|
this.dynamicDialogRef.onClose.subscribe(() => {
|
||||||
|
this.bookSelectionService.deselectAll();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
multiBookEditMetadata(): void {
|
multiBookEditMetadata(): void {
|
||||||
this.dialogHelperService.openMultibookMetadataEditorDialog(this.selectedBooks);
|
this.dynamicDialogRef = this.dialogHelperService.openMultibookMetadataEditorDialog(this.selectedBooks);
|
||||||
|
if (this.dynamicDialogRef) {
|
||||||
|
this.dynamicDialogRef.onClose.subscribe(() => {
|
||||||
|
this.bookSelectionService.deselectAll();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
regenerateCoversForSelected(): void {
|
regenerateCoversForSelected(): void {
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@
|
|||||||
[dropdown]="true"
|
[dropdown]="true"
|
||||||
[showClear]="true"
|
[showClear]="true"
|
||||||
[placeholder]="t('searchPlaceholder')"
|
[placeholder]="t('searchPlaceholder')"
|
||||||
class="full-width"
|
fluid
|
||||||
[disabled]="isAttaching">
|
[disabled]="isAttaching">
|
||||||
<ng-template let-book pTemplate="item">
|
<ng-template let-book pTemplate="item">
|
||||||
<div class="book-suggestion">
|
<div class="book-suggestion">
|
||||||
|
|||||||
+2
-1
@@ -9,7 +9,7 @@ import { filter, take } from 'rxjs/operators';
|
|||||||
import { BookService } from '../../service/book.service';
|
import { BookService } from '../../service/book.service';
|
||||||
import { BookFileService } from '../../service/book-file.service';
|
import { BookFileService } from '../../service/book-file.service';
|
||||||
import { Book } from '../../model/book.model';
|
import { Book } from '../../model/book.model';
|
||||||
import { MessageService } from 'primeng/api';
|
import {MessageService, PrimeTemplate} from 'primeng/api';
|
||||||
import { TranslocoDirective, TranslocoPipe, TranslocoService } from '@jsverse/transloco';
|
import { TranslocoDirective, TranslocoPipe, TranslocoService } from '@jsverse/transloco';
|
||||||
import { AppSettingsService } from '../../../../shared/service/app-settings.service';
|
import { AppSettingsService } from '../../../../shared/service/app-settings.service';
|
||||||
|
|
||||||
@@ -23,6 +23,7 @@ import { AppSettingsService } from '../../../../shared/service/app-settings.serv
|
|||||||
Checkbox,
|
Checkbox,
|
||||||
TranslocoDirective,
|
TranslocoDirective,
|
||||||
TranslocoPipe,
|
TranslocoPipe,
|
||||||
|
PrimeTemplate,
|
||||||
],
|
],
|
||||||
templateUrl: './book-file-attacher.component.html',
|
templateUrl: './book-file-attacher.component.html',
|
||||||
styleUrls: ['./book-file-attacher.component.scss']
|
styleUrls: ['./book-file-attacher.component.scss']
|
||||||
|
|||||||
@@ -673,6 +673,11 @@ export class SeriesPageComponent implements OnDestroy, AfterViewChecked {
|
|||||||
|
|
||||||
lockUnlockMetadata(): void {
|
lockUnlockMetadata(): void {
|
||||||
this.dialogRef = this.dialogHelperService.openLockUnlockMetadataDialog(this.selectedBooks);
|
this.dialogRef = this.dialogHelperService.openLockUnlockMetadataDialog(this.selectedBooks);
|
||||||
|
if (this.dialogRef) {
|
||||||
|
this.dialogRef.onClose.subscribe(() => {
|
||||||
|
this.deselectAllBooks();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
autoFetchMetadata(): void {
|
autoFetchMetadata(): void {
|
||||||
@@ -688,11 +693,21 @@ export class SeriesPageComponent implements OnDestroy, AfterViewChecked {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bulkEditMetadata(): void {
|
bulkEditMetadata(): void {
|
||||||
this.dialogHelperService.openBulkMetadataEditDialog(this.selectedBooks);
|
this.dialogRef = this.dialogHelperService.openBulkMetadataEditDialog(this.selectedBooks);
|
||||||
|
if (this.dialogRef) {
|
||||||
|
this.dialogRef.onClose.subscribe(() => {
|
||||||
|
this.deselectAllBooks();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
multiBookEditMetadata(): void {
|
multiBookEditMetadata(): void {
|
||||||
this.dialogHelperService.openMultibookMetadataEditorDialog(this.selectedBooks);
|
this.dialogRef = this.dialogHelperService.openMultibookMetadataEditorDialog(this.selectedBooks);
|
||||||
|
if (this.dialogRef) {
|
||||||
|
this.dialogRef.onClose.subscribe(() => {
|
||||||
|
this.deselectAllBooks();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
regenerateCoversForSelected(): void {
|
regenerateCoversForSelected(): void {
|
||||||
|
|||||||
@@ -97,6 +97,14 @@ export interface BookFileProgress {
|
|||||||
progressPercent: number;
|
progressPercent: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface AudiobookChapterInfo {
|
||||||
|
index?: number;
|
||||||
|
title?: string;
|
||||||
|
startTimeMs?: number;
|
||||||
|
endTimeMs?: number;
|
||||||
|
durationMs?: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface AudiobookMetadata {
|
export interface AudiobookMetadata {
|
||||||
narrator?: string;
|
narrator?: string;
|
||||||
abridged?: boolean | null;
|
abridged?: boolean | null;
|
||||||
@@ -106,6 +114,7 @@ export interface AudiobookMetadata {
|
|||||||
channels?: number;
|
channels?: number;
|
||||||
codec?: string;
|
codec?: string;
|
||||||
chapterCount?: number;
|
chapterCount?: number;
|
||||||
|
chapters?: AudiobookChapterInfo[];
|
||||||
narratorLocked?: boolean;
|
narratorLocked?: boolean;
|
||||||
abridgedLocked?: boolean;
|
abridgedLocked?: boolean;
|
||||||
}
|
}
|
||||||
@@ -432,3 +441,8 @@ export interface DuplicateGroup {
|
|||||||
matchReason: string;
|
matchReason: string;
|
||||||
books: Book[];
|
books: Book[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface DetachBookFileResponse {
|
||||||
|
sourceBook: Book;
|
||||||
|
newBook: Book;
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {inject, Injectable} from '@angular/core';
|
|||||||
import {Observable, throwError} from 'rxjs';
|
import {Observable, throwError} from 'rxjs';
|
||||||
import {HttpClient} from '@angular/common/http';
|
import {HttpClient} from '@angular/common/http';
|
||||||
import {catchError, tap} from 'rxjs/operators';
|
import {catchError, tap} from 'rxjs/operators';
|
||||||
import {AdditionalFile, AdditionalFileType, Book, DuplicateDetectionRequest, DuplicateGroup} from '../model/book.model';
|
import {AdditionalFile, AdditionalFileType, Book, DetachBookFileResponse, DuplicateDetectionRequest, DuplicateGroup} from '../model/book.model';
|
||||||
import {API_CONFIG} from '../../../core/config/api-config';
|
import {API_CONFIG} from '../../../core/config/api-config';
|
||||||
import {MessageService} from 'primeng/api';
|
import {MessageService} from 'primeng/api';
|
||||||
import {FileDownloadService} from '../../../shared/service/file-download.service';
|
import {FileDownloadService} from '../../../shared/service/file-download.service';
|
||||||
@@ -208,21 +208,52 @@ export class BookFileService {
|
|||||||
this.fileDownloadService.downloadFile(downloadUrl, additionalFile?.fileName ?? 'file');
|
this.fileDownloadService.downloadFile(downloadUrl, additionalFile?.fileName ?? 'file');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
detachBookFile(bookId: number, fileId: number, copyMetadata: boolean): Observable<DetachBookFileResponse> {
|
||||||
|
return this.http.post<DetachBookFileResponse>(`${this.url}/${bookId}/files/${fileId}/detach`, { copyMetadata }).pipe(
|
||||||
|
tap(response => {
|
||||||
|
const currentState = this.bookStateService.getCurrentBookState();
|
||||||
|
let updatedBooks = (currentState.books || []).map(book =>
|
||||||
|
book.id === bookId ? response.sourceBook : book
|
||||||
|
);
|
||||||
|
updatedBooks = [...updatedBooks, response.newBook];
|
||||||
|
|
||||||
|
this.bookStateService.updateBookState({
|
||||||
|
...currentState,
|
||||||
|
books: updatedBooks
|
||||||
|
});
|
||||||
|
|
||||||
|
this.messageService.add({
|
||||||
|
severity: 'success',
|
||||||
|
summary: this.t.translate('metadata.viewer.toast.detachFileSuccessSummary'),
|
||||||
|
detail: this.t.translate('metadata.viewer.toast.detachFileSuccessDetail')
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
catchError(error => {
|
||||||
|
this.messageService.add({
|
||||||
|
severity: 'error',
|
||||||
|
summary: this.t.translate('metadata.viewer.toast.detachFileErrorSummary'),
|
||||||
|
detail: error?.error?.message || error?.message || this.t.translate('metadata.viewer.toast.detachFileErrorDetail')
|
||||||
|
});
|
||||||
|
return throwError(() => error);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
findDuplicates(request: DuplicateDetectionRequest): Observable<DuplicateGroup[]> {
|
findDuplicates(request: DuplicateDetectionRequest): Observable<DuplicateGroup[]> {
|
||||||
return this.http.post<DuplicateGroup[]>(`${this.url}/duplicates`, request);
|
return this.http.post<DuplicateGroup[]>(`${this.url}/duplicates`, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
attachBookFiles(targetBookId: number, sourceBookIds: number[], moveFiles: boolean): Observable<Book> {
|
attachBookFiles(targetBookId: number, sourceBookIds: number[], moveFiles: boolean): Observable<{updatedBook: Book, deletedSourceBookIds: number[]}> {
|
||||||
return this.http.post<Book>(`${this.url}/${targetBookId}/attach-file`, {
|
return this.http.post<{updatedBook: Book, deletedSourceBookIds: number[]}>(`${this.url}/${targetBookId}/attach-file`, {
|
||||||
sourceBookIds,
|
sourceBookIds,
|
||||||
moveFiles
|
moveFiles
|
||||||
}).pipe(
|
}).pipe(
|
||||||
tap(updatedBook => {
|
tap(response => {
|
||||||
const currentState = this.bookStateService.getCurrentBookState();
|
const currentState = this.bookStateService.getCurrentBookState();
|
||||||
const sourceIdSet = new Set(sourceBookIds);
|
const deletedIdSet = new Set(response.deletedSourceBookIds);
|
||||||
let updatedBooks = (currentState.books || []).map(book =>
|
let updatedBooks = (currentState.books || []).map(book =>
|
||||||
book.id === targetBookId ? updatedBook : book
|
book.id === targetBookId ? response.updatedBook : book
|
||||||
).filter(book => !sourceIdSet.has(book.id));
|
).filter(book => !deletedIdSet.has(book.id));
|
||||||
|
|
||||||
this.bookStateService.updateBookState({
|
this.bookStateService.updateBookState({
|
||||||
...currentState,
|
...currentState,
|
||||||
|
|||||||
+28
-28
@@ -2,41 +2,41 @@
|
|||||||
@if (fetchedMetadata && fetchedMetadata.title) {
|
@if (fetchedMetadata && fetchedMetadata.title) {
|
||||||
<form [formGroup]="metadataForm" class="metapicker">
|
<form [formGroup]="metadataForm" class="metapicker">
|
||||||
<div class="form-scroll">
|
<div class="form-scroll">
|
||||||
<div class="metaheader">
|
<div class="column-headers">
|
||||||
<label class="field-label"></label>
|
<div class="column-label current">
|
||||||
<div class="header-fields-row">
|
<span>{{ t('fileData') }}</span>
|
||||||
<p class="header-column">{{ t('fileData') }}</p>
|
</div>
|
||||||
<div class="midbuttons">
|
<div class="column-actions">
|
||||||
<p-button
|
<button
|
||||||
size="small"
|
type="button"
|
||||||
icon="pi pi-angle-left"
|
class="p-button p-button-outlined p-button-sm p-button-icon-only"
|
||||||
class="btn-margin"
|
|
||||||
[outlined]="true"
|
|
||||||
[pTooltip]="t('copyMissingTooltip')"
|
[pTooltip]="t('copyMissingTooltip')"
|
||||||
tooltipPosition="bottom"
|
tooltipPosition="bottom"
|
||||||
(onClick)="copyMissing()"
|
(click)="copyMissing()"
|
||||||
></p-button>
|
>
|
||||||
<p-button
|
<span class="p-button-icon pi pi-angle-left"></span>
|
||||||
size="small"
|
</button>
|
||||||
icon="pi pi-angle-double-left"
|
<button
|
||||||
class="btn-margin"
|
type="button"
|
||||||
[outlined]="true"
|
class="p-button p-button-outlined p-button-sm p-button-icon-only"
|
||||||
[pTooltip]="t('overwriteAllTooltip')"
|
[pTooltip]="t('overwriteAllTooltip')"
|
||||||
tooltipPosition="bottom"
|
tooltipPosition="bottom"
|
||||||
(onClick)="copyAll()"
|
(click)="copyAll()"
|
||||||
></p-button>
|
>
|
||||||
<p-button
|
<span class="p-button-icon pi pi-angle-double-left"></span>
|
||||||
size="small"
|
</button>
|
||||||
severity="warn"
|
<button
|
||||||
icon="pi pi-refresh"
|
type="button"
|
||||||
class="btn-margin"
|
class="p-button p-button-outlined p-button-sm p-button-icon-only p-button-warn"
|
||||||
[outlined]="true"
|
|
||||||
[pTooltip]="t('resetAllTooltip')"
|
[pTooltip]="t('resetAllTooltip')"
|
||||||
tooltipPosition="bottom"
|
tooltipPosition="bottom"
|
||||||
(onClick)="confirmReset()"
|
(click)="confirmReset()"
|
||||||
></p-button>
|
>
|
||||||
|
<span class="p-button-icon pi pi-refresh"></span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<p class="header-column">{{ t('fetchedData') }}</p>
|
<div class="column-label fetched">
|
||||||
|
<span>{{ t('fetchedData') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="metacontent">
|
<div class="metacontent">
|
||||||
|
|||||||
+36
-22
@@ -93,18 +93,45 @@ textarea.changed,
|
|||||||
width: 8rem;
|
width: 8rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-fields-row {
|
.column-headers {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
padding: 1rem;
|
||||||
|
border-bottom: 1px dotted var(--border-color);
|
||||||
|
|
||||||
.header-column {
|
@media (min-width: 768px) {
|
||||||
width: 50%;
|
&::before {
|
||||||
}
|
content: '';
|
||||||
|
min-width: 8rem;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.btn-margin {
|
.column-label {
|
||||||
margin: 0 0.5rem;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex: 1;
|
||||||
|
color: var(--text-color-secondary);
|
||||||
|
font-size: 0.875rem;
|
||||||
|
|
||||||
|
&.current {
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding-right: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.fetched {
|
||||||
|
justify-content: flex-start;
|
||||||
|
padding-left: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.column-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbnail-row {
|
.thumbnail-row {
|
||||||
@@ -217,25 +244,13 @@ textarea.changed,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.metaheader {
|
.metaheader {
|
||||||
position: relative;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: 1px dotted var(--border-color);
|
border-bottom: 1px dotted var(--border-color);
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
p {
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
font-size: 0.875rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.metaheader .midbuttons {
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.metacontent {
|
.metacontent {
|
||||||
@@ -294,7 +309,6 @@ textarea.changed,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
.metaheader,
|
|
||||||
.metapicker .metacontent,
|
.metapicker .metacontent,
|
||||||
.metaeditor .metabody {
|
.metaeditor .metabody {
|
||||||
padding-left: 3.25rem;
|
padding-left: 3.25rem;
|
||||||
|
|||||||
+24
-3
@@ -1,5 +1,7 @@
|
|||||||
import {Component, EventEmitter, inject, Input, Output} from '@angular/core';
|
import {Component, DestroyRef, EventEmitter, inject, Input, OnInit, Output} from '@angular/core';
|
||||||
|
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||||
import {FormGroup, FormsModule, ReactiveFormsModule} from '@angular/forms';
|
import {FormGroup, FormsModule, ReactiveFormsModule} from '@angular/forms';
|
||||||
|
import {filter} from 'rxjs/operators';
|
||||||
import {Button} from 'primeng/button';
|
import {Button} from 'primeng/button';
|
||||||
import {NgClass} from '@angular/common';
|
import {NgClass} from '@angular/common';
|
||||||
import {Tooltip} from 'primeng/tooltip';
|
import {Tooltip} from 'primeng/tooltip';
|
||||||
@@ -14,6 +16,8 @@ import {ConfirmationService} from 'primeng/api';
|
|||||||
import {DatePicker} from 'primeng/datepicker';
|
import {DatePicker} from 'primeng/datepicker';
|
||||||
import {ALL_METADATA_FIELDS, getArrayFields, getBottomFields, getTextareaFields, MetadataFieldConfig} from '../../../../shared/metadata';
|
import {ALL_METADATA_FIELDS, getArrayFields, getBottomFields, getTextareaFields, MetadataFieldConfig} from '../../../../shared/metadata';
|
||||||
import {MetadataUtilsService} from '../../../../shared/metadata';
|
import {MetadataUtilsService} from '../../../../shared/metadata';
|
||||||
|
import {MetadataProviderSpecificFields} from '../../../../shared/model/app-settings.model';
|
||||||
|
import {AppSettingsService} from '../../../../shared/service/app-settings.service';
|
||||||
import {TranslocoDirective, TranslocoService} from '@jsverse/transloco';
|
import {TranslocoDirective, TranslocoService} from '@jsverse/transloco';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -35,11 +39,13 @@ import {TranslocoDirective, TranslocoService} from '@jsverse/transloco';
|
|||||||
templateUrl: './bookdrop-file-metadata-picker.component.html',
|
templateUrl: './bookdrop-file-metadata-picker.component.html',
|
||||||
styleUrl: './bookdrop-file-metadata-picker.component.scss'
|
styleUrl: './bookdrop-file-metadata-picker.component.scss'
|
||||||
})
|
})
|
||||||
export class BookdropFileMetadataPickerComponent {
|
export class BookdropFileMetadataPickerComponent implements OnInit {
|
||||||
|
|
||||||
private readonly confirmationService = inject(ConfirmationService);
|
private readonly confirmationService = inject(ConfirmationService);
|
||||||
private readonly metadataUtils = inject(MetadataUtilsService);
|
private readonly metadataUtils = inject(MetadataUtilsService);
|
||||||
protected readonly urlHelper = inject(UrlHelperService);
|
protected readonly urlHelper = inject(UrlHelperService);
|
||||||
|
private readonly appSettingsService = inject(AppSettingsService);
|
||||||
|
private readonly destroyRef = inject(DestroyRef);
|
||||||
private readonly t = inject(TranslocoService);
|
private readonly t = inject(TranslocoService);
|
||||||
|
|
||||||
@Input() fetchedMetadata!: BookMetadata;
|
@Input() fetchedMetadata!: BookMetadata;
|
||||||
@@ -51,7 +57,8 @@ export class BookdropFileMetadataPickerComponent {
|
|||||||
|
|
||||||
@Output() metadataCopied = new EventEmitter<boolean>();
|
@Output() metadataCopied = new EventEmitter<boolean>();
|
||||||
|
|
||||||
// Use shared field configuration - separate publishedDate for DatePicker
|
private enabledProviderFields: MetadataProviderSpecificFields | null = null;
|
||||||
|
|
||||||
metadataFieldsTop: MetadataFieldConfig[] = ALL_METADATA_FIELDS.filter(f =>
|
metadataFieldsTop: MetadataFieldConfig[] = ALL_METADATA_FIELDS.filter(f =>
|
||||||
['title', 'subtitle', 'publisher'].includes(f.controlName)
|
['title', 'subtitle', 'publisher'].includes(f.controlName)
|
||||||
);
|
);
|
||||||
@@ -66,6 +73,20 @@ export class BookdropFileMetadataPickerComponent {
|
|||||||
|
|
||||||
metadataFieldsBottom: MetadataFieldConfig[] = getBottomFields();
|
metadataFieldsBottom: MetadataFieldConfig[] = getBottomFields();
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
this.appSettingsService.appSettings$
|
||||||
|
.pipe(
|
||||||
|
filter(settings => !!settings?.metadataProviderSpecificFields),
|
||||||
|
takeUntilDestroyed(this.destroyRef)
|
||||||
|
)
|
||||||
|
.subscribe(settings => {
|
||||||
|
if (settings?.metadataProviderSpecificFields) {
|
||||||
|
this.enabledProviderFields = settings.metadataProviderSpecificFields;
|
||||||
|
this.metadataFieldsBottom = getBottomFields(this.enabledProviderFields);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
copyMissing(): void {
|
copyMissing(): void {
|
||||||
this.metadataUtils.copyMissingFields(
|
this.metadataUtils.copyMissingFields(
|
||||||
this.fetchedMetadata,
|
this.fetchedMetadata,
|
||||||
|
|||||||
+6
-5
@@ -462,7 +462,7 @@ export class MetadataPickerComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
flags['cover'] = !current.thumbnailUrl && !!original.thumbnailUrl;
|
flags['cover'] = this.copiedFields['thumbnailUrl'] === false && !current.thumbnailUrl && !!original.thumbnailUrl;
|
||||||
|
|
||||||
// Handle audiobook metadata clear flags (now at top-level of BookMetadata)
|
// Handle audiobook metadata clear flags (now at top-level of BookMetadata)
|
||||||
for (const field of AUDIOBOOK_METADATA_FIELDS) {
|
for (const field of AUDIOBOOK_METADATA_FIELDS) {
|
||||||
@@ -502,7 +502,10 @@ export class MetadataPickerComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getThumbnail(): string | null {
|
getThumbnail(): string | null {
|
||||||
// For Audible provider, cover is handled separately via uploadAudiobookCoverFromUrl
|
if (this.copiedFields['thumbnailUrl']) {
|
||||||
|
return (this.fetchedMetadata['thumbnailUrl' as keyof BookMetadata] as string) || null;
|
||||||
|
}
|
||||||
|
// For Audible provider, audiobook cover is handled separately via uploadAudiobookCoverFromUrl
|
||||||
if (this.isAudibleProvider()) {
|
if (this.isAudibleProvider()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -510,9 +513,6 @@ export class MetadataPickerComponent implements OnInit {
|
|||||||
if (thumbnailUrl?.includes('api/v1')) {
|
if (thumbnailUrl?.includes('api/v1')) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (this.copiedFields['thumbnailUrl']) {
|
|
||||||
return (this.fetchedMetadata['thumbnailUrl' as keyof BookMetadata] as string) || null;
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -640,6 +640,7 @@ export class MetadataPickerComponent implements OnInit {
|
|||||||
// For audiobook cover from Audible, use the thumbnailUrl from fetched metadata
|
// For audiobook cover from Audible, use the thumbnailUrl from fetched metadata
|
||||||
if (field === 'audiobookThumbnailUrl') {
|
if (field === 'audiobookThumbnailUrl') {
|
||||||
this.metadataForm.get('audiobookThumbnailUrl')?.setValue(this.fetchedMetadata.thumbnailUrl);
|
this.metadataForm.get('audiobookThumbnailUrl')?.setValue(this.fetchedMetadata.thumbnailUrl);
|
||||||
|
this.copiedFields['audiobookThumbnailUrl'] = true;
|
||||||
this.highlightCopiedInput(field);
|
this.highlightCopiedInput(field);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+33
@@ -194,6 +194,17 @@
|
|||||||
tooltipPosition="top"
|
tooltipPosition="top"
|
||||||
(onClick)="download(book)">
|
(onClick)="download(book)">
|
||||||
</p-button>
|
</p-button>
|
||||||
|
@if (canDetach(book)) {
|
||||||
|
<p-button
|
||||||
|
icon="pi pi-external-link"
|
||||||
|
size="small"
|
||||||
|
text
|
||||||
|
severity="warn"
|
||||||
|
[pTooltip]="t('detachTooltip')"
|
||||||
|
tooltipPosition="top"
|
||||||
|
(onClick)="detachFile(book, book.primaryFile!.id, book.primaryFile!.fileName || 'file')">
|
||||||
|
</p-button>
|
||||||
|
}
|
||||||
<p-button
|
<p-button
|
||||||
icon="pi pi-trash"
|
icon="pi pi-trash"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -271,6 +282,17 @@
|
|||||||
tooltipPosition="top"
|
tooltipPosition="top"
|
||||||
(onClick)="downloadAdditionalFile(book, format.id)">
|
(onClick)="downloadAdditionalFile(book, format.id)">
|
||||||
</p-button>
|
</p-button>
|
||||||
|
@if (canDetach(book)) {
|
||||||
|
<p-button
|
||||||
|
icon="pi pi-external-link"
|
||||||
|
size="small"
|
||||||
|
text
|
||||||
|
severity="warn"
|
||||||
|
[pTooltip]="t('detachTooltip')"
|
||||||
|
tooltipPosition="top"
|
||||||
|
(onClick)="detachFile(book, format.id, format.fileName || 'file')">
|
||||||
|
</p-button>
|
||||||
|
}
|
||||||
<p-button
|
<p-button
|
||||||
icon="pi pi-trash"
|
icon="pi pi-trash"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -307,6 +329,17 @@
|
|||||||
tooltipPosition="top"
|
tooltipPosition="top"
|
||||||
(onClick)="downloadAdditionalFile(book, file.id)">
|
(onClick)="downloadAdditionalFile(book, file.id)">
|
||||||
</p-button>
|
</p-button>
|
||||||
|
@if (canDetach(book)) {
|
||||||
|
<p-button
|
||||||
|
icon="pi pi-external-link"
|
||||||
|
size="small"
|
||||||
|
text
|
||||||
|
severity="warn"
|
||||||
|
[pTooltip]="t('detachTooltip')"
|
||||||
|
tooltipPosition="top"
|
||||||
|
(onClick)="detachFile(book, file.id, file.fileName || 'file')">
|
||||||
|
</p-button>
|
||||||
|
}
|
||||||
<p-button
|
<p-button
|
||||||
icon="pi pi-trash"
|
icon="pi pi-trash"
|
||||||
size="small"
|
size="small"
|
||||||
|
|||||||
+18
@@ -47,6 +47,12 @@ export interface DeleteSupplementaryFileEvent {
|
|||||||
fileName: string;
|
fileName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface DetachBookFileEvent {
|
||||||
|
book: Book;
|
||||||
|
fileId: number;
|
||||||
|
fileName: string;
|
||||||
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-metadata-tabs',
|
selector: 'app-metadata-tabs',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
@@ -84,6 +90,7 @@ export class MetadataTabsComponent {
|
|||||||
@Output() downloadAllFiles = new EventEmitter<DownloadAllFilesEvent>();
|
@Output() downloadAllFiles = new EventEmitter<DownloadAllFilesEvent>();
|
||||||
@Output() deleteBookFile = new EventEmitter<DeleteBookFileEvent>();
|
@Output() deleteBookFile = new EventEmitter<DeleteBookFileEvent>();
|
||||||
@Output() deleteSupplementaryFile = new EventEmitter<DeleteSupplementaryFileEvent>();
|
@Output() deleteSupplementaryFile = new EventEmitter<DeleteSupplementaryFileEvent>();
|
||||||
|
@Output() detachBookFile = new EventEmitter<DetachBookFileEvent>();
|
||||||
|
|
||||||
get defaultTabValue(): string {
|
get defaultTabValue(): string {
|
||||||
return this.bookInSeries && this.bookInSeries.length > 1 ? 'series' : 'similar';
|
return this.bookInSeries && this.bookInSeries.length > 1 ? 'series' : 'similar';
|
||||||
@@ -114,6 +121,17 @@ export class MetadataTabsComponent {
|
|||||||
this.deleteSupplementaryFile.emit({ bookId, fileId, fileName });
|
this.deleteSupplementaryFile.emit({ bookId, fileId, fileName });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
detachFile(book: Book, fileId: number, fileName: string): void {
|
||||||
|
this.detachBookFile.emit({ book, fileId, fileName });
|
||||||
|
}
|
||||||
|
|
||||||
|
canDetach(book: Book): boolean {
|
||||||
|
const totalFiles = (book.primaryFile ? 1 : 0)
|
||||||
|
+ (book.alternativeFormats?.length ?? 0)
|
||||||
|
+ (book.supplementaryFiles?.length ?? 0);
|
||||||
|
return totalFiles > 1;
|
||||||
|
}
|
||||||
|
|
||||||
hasMultipleFiles(book: Book): boolean {
|
hasMultipleFiles(book: Book): boolean {
|
||||||
const primaryCount = book.primaryFile ? 1 : 0;
|
const primaryCount = book.primaryFile ? 1 : 0;
|
||||||
const altCount = book.alternativeFormats?.length ?? 0;
|
const altCount = book.alternativeFormats?.length ?? 0;
|
||||||
|
|||||||
+56
-1
@@ -978,6 +978,27 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if (audio.chapters?.length) {
|
||||||
|
<div class="audiobook-chapters-section">
|
||||||
|
<div class="audiobook-chapters-header clickable" (click)="isChapterListExpanded = !isChapterListExpanded">
|
||||||
|
<span class="audiobook-chapters-toggle-label">
|
||||||
|
<i class="pi pi-list"></i>
|
||||||
|
{{ t('audiobookChapterList') }}
|
||||||
|
</span>
|
||||||
|
<i class="pi section-toggle-icon" [ngClass]="isChapterListExpanded ? 'pi-chevron-up' : 'pi-chevron-down'"></i>
|
||||||
|
</div>
|
||||||
|
<div class="audiobook-chapters-list" [ngClass]="{'collapsed': !isChapterListExpanded}">
|
||||||
|
@for (chapter of audio.chapters; track chapter.index) {
|
||||||
|
<div class="audiobook-chapter-row">
|
||||||
|
<span class="audiobook-chapter-index">{{ chapter.index! + 1 }}</span>
|
||||||
|
<span class="audiobook-chapter-title">{{ chapter.title }}</span>
|
||||||
|
<span class="audiobook-chapter-duration">{{ formatDurationMs(chapter.durationMs!) }}</span>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -991,8 +1012,42 @@
|
|||||||
(downloadFile)="onDownloadFile($event)"
|
(downloadFile)="onDownloadFile($event)"
|
||||||
(downloadAllFiles)="onDownloadAllFiles($event)"
|
(downloadAllFiles)="onDownloadAllFiles($event)"
|
||||||
(deleteBookFile)="onDeleteBookFile($event)"
|
(deleteBookFile)="onDeleteBookFile($event)"
|
||||||
(deleteSupplementaryFile)="onDeleteSupplementaryFile($event)">
|
(deleteSupplementaryFile)="onDeleteSupplementaryFile($event)"
|
||||||
|
(detachBookFile)="onDetachBookFile($event)">
|
||||||
</app-metadata-tabs>
|
</app-metadata-tabs>
|
||||||
|
|
||||||
|
<p-dialog
|
||||||
|
[header]="t('confirm.detachFileHeader')"
|
||||||
|
[(visible)]="showDetachDialog"
|
||||||
|
[modal]="true"
|
||||||
|
[closable]="true"
|
||||||
|
[style]="{ width: '450px' }"
|
||||||
|
[breakpoints]="{ '575px': '95vw' }">
|
||||||
|
<div class="detach-dialog-content">
|
||||||
|
<p>{{ t('confirm.detachFileMessage', { fileName: detachFileName }) }}</p>
|
||||||
|
<div class="detach-dialog-option">
|
||||||
|
<p-checkbox
|
||||||
|
[(ngModel)]="detachCopyMetadata"
|
||||||
|
[binary]="true"
|
||||||
|
inputId="copyMetadata">
|
||||||
|
</p-checkbox>
|
||||||
|
<label for="copyMetadata">{{ t('confirm.detachFileCopyMetadata') }}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ng-template #footer>
|
||||||
|
<p-button
|
||||||
|
[label]="'common.cancel' | transloco"
|
||||||
|
severity="secondary"
|
||||||
|
(onClick)="showDetachDialog = false">
|
||||||
|
</p-button>
|
||||||
|
<p-button
|
||||||
|
[label]="t('confirm.detachFileBtn')"
|
||||||
|
severity="warn"
|
||||||
|
icon="pi pi-external-link"
|
||||||
|
(onClick)="confirmDetach()">
|
||||||
|
</p-button>
|
||||||
|
</ng-template>
|
||||||
|
</p-dialog>
|
||||||
</div>
|
</div>
|
||||||
} @else {
|
} @else {
|
||||||
<div class="loading-state" *transloco="let t; prefix: 'metadata.viewer'">
|
<div class="loading-state" *transloco="let t; prefix: 'metadata.viewer'">
|
||||||
|
|||||||
+98
-1
@@ -1019,7 +1019,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
max-height: 500px;
|
max-height: 2000px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
|
transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
@@ -1099,3 +1099,100 @@
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.audiobook-chapters-section {
|
||||||
|
border-top: 1px solid var(--border-color);
|
||||||
|
padding-top: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.audiobook-chapters-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
padding: 0.375rem 0;
|
||||||
|
|
||||||
|
&:hover .audiobook-chapters-toggle-label {
|
||||||
|
color: var(--primary-hover-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.audiobook-chapters-toggle-label {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.375rem;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--text-color);
|
||||||
|
transition: color 0.2s ease;
|
||||||
|
|
||||||
|
i {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: var(--primary-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.audiobook-chapters-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0;
|
||||||
|
max-height: 500px;
|
||||||
|
overflow-y: auto;
|
||||||
|
transition: max-height 0.3s ease, opacity 0.3s ease;
|
||||||
|
opacity: 1;
|
||||||
|
|
||||||
|
&.collapsed {
|
||||||
|
max-height: 0;
|
||||||
|
opacity: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.audiobook-chapter-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.75rem;
|
||||||
|
padding: 0.5rem 0.25rem;
|
||||||
|
border-bottom: 1px solid var(--surface-border);
|
||||||
|
font-size: 0.875rem;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.audiobook-chapter-index {
|
||||||
|
flex: 0 0 1.75rem;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--text-color-secondary);
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.audiobook-chapter-title {
|
||||||
|
flex: 1;
|
||||||
|
color: var(--text-color);
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.audiobook-chapter-duration {
|
||||||
|
flex-shrink: 0;
|
||||||
|
color: var(--text-color-secondary);
|
||||||
|
font-size: 0.8rem;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detach-dialog-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1rem;
|
||||||
|
|
||||||
|
.detach-dialog-option {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+42
-2
@@ -33,9 +33,11 @@ import {AGE_RATING_OPTIONS, CONTENT_RATING_LABELS, fileSizeRanges, matchScoreRan
|
|||||||
import {BookNavigationService} from '../../../../book/service/book-navigation.service';
|
import {BookNavigationService} from '../../../../book/service/book-navigation.service';
|
||||||
import {BookMetadataHostService} from '../../../../../shared/service/book-metadata-host.service';
|
import {BookMetadataHostService} from '../../../../../shared/service/book-metadata-host.service';
|
||||||
import {AppSettingsService} from '../../../../../shared/service/app-settings.service';
|
import {AppSettingsService} from '../../../../../shared/service/app-settings.service';
|
||||||
import {DeleteBookFileEvent, DeleteSupplementaryFileEvent, DownloadAdditionalFileEvent, DownloadAllFilesEvent, DownloadEvent, MetadataTabsComponent, ReadEvent} from './metadata-tabs/metadata-tabs.component';
|
import {DeleteBookFileEvent, DeleteSupplementaryFileEvent, DetachBookFileEvent, DownloadAdditionalFileEvent, DownloadAllFilesEvent, DownloadEvent, MetadataTabsComponent, ReadEvent} from './metadata-tabs/metadata-tabs.component';
|
||||||
import {TranslocoDirective, TranslocoPipe, TranslocoService} from '@jsverse/transloco';
|
import {TranslocoDirective, TranslocoPipe, TranslocoService} from '@jsverse/transloco';
|
||||||
import {AuthorService} from '../../../../author-browser/service/author.service';
|
import {AuthorService} from '../../../../author-browser/service/author.service';
|
||||||
|
import {Dialog} from 'primeng/dialog';
|
||||||
|
import {Checkbox} from 'primeng/checkbox';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -43,7 +45,7 @@ import {AuthorService} from '../../../../author-browser/service/author.service';
|
|||||||
standalone: true,
|
standalone: true,
|
||||||
templateUrl: './metadata-viewer.component.html',
|
templateUrl: './metadata-viewer.component.html',
|
||||||
styleUrl: './metadata-viewer.component.scss',
|
styleUrl: './metadata-viewer.component.scss',
|
||||||
imports: [Button, AsyncPipe, Rating, FormsModule, SplitButton, NgClass, Tooltip, DecimalPipe, ProgressBar, Menu, DatePicker, ProgressSpinner, TieredMenu, Image, TagComponent, MetadataTabsComponent, TranslocoDirective, TranslocoPipe]
|
imports: [Button, AsyncPipe, Rating, FormsModule, SplitButton, NgClass, Tooltip, DecimalPipe, ProgressBar, Menu, DatePicker, ProgressSpinner, TieredMenu, Image, TagComponent, MetadataTabsComponent, TranslocoDirective, TranslocoPipe, Dialog, Checkbox]
|
||||||
})
|
})
|
||||||
export class MetadataViewerComponent implements OnInit, OnChanges, AfterViewChecked {
|
export class MetadataViewerComponent implements OnInit, OnChanges, AfterViewChecked {
|
||||||
@Input() book$!: Observable<Book | null>;
|
@Input() book$!: Observable<Book | null>;
|
||||||
@@ -72,17 +74,24 @@ export class MetadataViewerComponent implements OnInit, OnChanges, AfterViewChec
|
|||||||
otherItems$!: Observable<MenuItem[]>;
|
otherItems$!: Observable<MenuItem[]>;
|
||||||
downloadMenuItems$!: Observable<MenuItem[]>;
|
downloadMenuItems$!: Observable<MenuItem[]>;
|
||||||
bookInSeries: Book[] = [];
|
bookInSeries: Book[] = [];
|
||||||
|
@ViewChild(Image) private coverImage?: Image;
|
||||||
@ViewChild('descriptionContent') descriptionContentRef?: ElementRef<HTMLElement>;
|
@ViewChild('descriptionContent') descriptionContentRef?: ElementRef<HTMLElement>;
|
||||||
isExpanded = false;
|
isExpanded = false;
|
||||||
isOverflowing = false;
|
isOverflowing = false;
|
||||||
isComicSectionExpanded = true;
|
isComicSectionExpanded = true;
|
||||||
isAudiobookSectionExpanded = true;
|
isAudiobookSectionExpanded = true;
|
||||||
|
isChapterListExpanded = false;
|
||||||
showFilePath = false;
|
showFilePath = false;
|
||||||
isAutoFetching = false;
|
isAutoFetching = false;
|
||||||
private metadataCenterViewMode: 'route' | 'dialog' = 'route';
|
private metadataCenterViewMode: 'route' | 'dialog' = 'route';
|
||||||
selectedReadStatus: ReadStatus = ReadStatus.UNREAD;
|
selectedReadStatus: ReadStatus = ReadStatus.UNREAD;
|
||||||
isEditingDateFinished = false;
|
isEditingDateFinished = false;
|
||||||
editDateFinished: Date | null = null;
|
editDateFinished: Date | null = null;
|
||||||
|
showDetachDialog = false;
|
||||||
|
detachCopyMetadata = true;
|
||||||
|
private detachBookId = 0;
|
||||||
|
private detachFileId = 0;
|
||||||
|
detachFileName = '';
|
||||||
|
|
||||||
readStatusOptions: { value: ReadStatus, labelKey: string }[] = [
|
readStatusOptions: { value: ReadStatus, labelKey: string }[] = [
|
||||||
{value: ReadStatus.UNREAD, labelKey: 'metadata.viewer.readStatusUnread'},
|
{value: ReadStatus.UNREAD, labelKey: 'metadata.viewer.readStatusUnread'},
|
||||||
@@ -104,6 +113,12 @@ export class MetadataViewerComponent implements OnInit, OnChanges, AfterViewChec
|
|||||||
navigationState$ = this.bookNavigationService.getNavigationState();
|
navigationState$ = this.bookNavigationService.getNavigationState();
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
this.destroyRef.onDestroy(() => this.coverImage?.closePreview());
|
||||||
|
|
||||||
|
const onPopState = () => this.coverImage?.closePreview();
|
||||||
|
window.addEventListener('popstate', onPopState);
|
||||||
|
this.destroyRef.onDestroy(() => window.removeEventListener('popstate', onPopState));
|
||||||
|
|
||||||
this.readMenuItems$ = this.book$.pipe(
|
this.readMenuItems$ = this.book$.pipe(
|
||||||
filter((book): book is Book => book !== null),
|
filter((book): book is Book => book !== null),
|
||||||
map((book): MenuItem[] => {
|
map((book): MenuItem[] => {
|
||||||
@@ -529,6 +544,19 @@ export class MetadataViewerComponent implements OnInit, OnChanges, AfterViewChec
|
|||||||
this.deleteAdditionalFile(event.bookId, event.fileId, event.fileName);
|
this.deleteAdditionalFile(event.bookId, event.fileId, event.fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onDetachBookFile(event: DetachBookFileEvent): void {
|
||||||
|
this.detachBookId = event.book.id;
|
||||||
|
this.detachFileId = event.fileId;
|
||||||
|
this.detachFileName = event.fileName;
|
||||||
|
this.detachCopyMetadata = true;
|
||||||
|
this.showDetachDialog = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
confirmDetach(): void {
|
||||||
|
this.showDetachDialog = false;
|
||||||
|
this.bookFileService.detachBookFile(this.detachBookId, this.detachFileId, this.detachCopyMetadata).subscribe();
|
||||||
|
}
|
||||||
|
|
||||||
deleteAdditionalFile(bookId: number, fileId: number, fileName: string) {
|
deleteAdditionalFile(bookId: number, fileId: number, fileName: string) {
|
||||||
this.confirmationService.confirm({
|
this.confirmationService.confirm({
|
||||||
message: this.t.translate('metadata.viewer.confirm.deleteSupplementaryMessage', { fileName }),
|
message: this.t.translate('metadata.viewer.confirm.deleteSupplementaryMessage', { fileName }),
|
||||||
@@ -1365,6 +1393,18 @@ export class MetadataViewerComponent implements OnInit, OnChanges, AfterViewChec
|
|||||||
return `${minutes}m`;
|
return `${minutes}m`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
formatDurationMs(ms: number): string {
|
||||||
|
if (!ms) return '-';
|
||||||
|
const totalSeconds = Math.floor(ms / 1000);
|
||||||
|
const hours = Math.floor(totalSeconds / 3600);
|
||||||
|
const minutes = Math.floor((totalSeconds % 3600) / 60);
|
||||||
|
const seconds = totalSeconds % 60;
|
||||||
|
if (hours > 0) {
|
||||||
|
return `${hours}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
|
||||||
|
}
|
||||||
|
return `${minutes}:${seconds.toString().padStart(2, '0')}`;
|
||||||
|
}
|
||||||
|
|
||||||
formatSampleRate(sampleRate: number): string {
|
formatSampleRate(sampleRate: number): string {
|
||||||
if (!sampleRate) return '-';
|
if (!sampleRate) return '-';
|
||||||
return `${(sampleRate / 1000).toFixed(1)} kHz`;
|
return `${(sampleRate / 1000).toFixed(1)} kHz`;
|
||||||
|
|||||||
@@ -388,9 +388,12 @@ export class AudiobookPlayerComponent implements OnInit, OnDestroy {
|
|||||||
private updateMediaSessionMetadata(): void {
|
private updateMediaSessionMetadata(): void {
|
||||||
if (!('mediaSession' in navigator)) return;
|
if (!('mediaSession' in navigator)) return;
|
||||||
|
|
||||||
|
const chapters = this.audiobookInfo.chapters;
|
||||||
|
const chapterTitle = chapters && chapters.length > 1 ? this.getCurrentChapter()?.title : null;
|
||||||
|
|
||||||
const title = this.audiobookInfo.folderBased
|
const title = this.audiobookInfo.folderBased
|
||||||
? this.currentTrack?.title
|
? this.currentTrack?.title
|
||||||
: this.getCurrentChapter()?.title || this.audiobookInfo.title;
|
: chapterTitle || this.audiobookInfo.title;
|
||||||
|
|
||||||
navigator.mediaSession.metadata = new MediaMetadata({
|
navigator.mediaSession.metadata = new MediaMetadata({
|
||||||
title: title || this.t.translate('readerAudiobook.untitled'),
|
title: title || this.t.translate('readerAudiobook.untitled'),
|
||||||
|
|||||||
@@ -997,6 +997,8 @@ export class CbxReaderComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private handleSwipeGesture() {
|
private handleSwipeGesture() {
|
||||||
|
if (this.scrollMode === CbxScrollMode.INFINITE || this.scrollMode === CbxScrollMode.LONG_STRIP) return;
|
||||||
|
|
||||||
const delta = this.touchEndX - this.touchStartX;
|
const delta = this.touchEndX - this.touchStartX;
|
||||||
if (Math.abs(delta) >= 50) {
|
if (Math.abs(delta) >= 50) {
|
||||||
// In RTL mode, swipe directions are reversed
|
// In RTL mode, swipe directions are reversed
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th style="width: 120px">{{ t('columns.timestamp') }}</th>
|
<th style="width: 120px">{{ t('columns.timestamp') }}</th>
|
||||||
<th style="width: 100px">{{ t('columns.user') }}</th>
|
<th style="width: 100px">{{ t('columns.user') }}</th>
|
||||||
<th style="width: 140px">{{ t('columns.action') }}</th>
|
<th style="width: 200px">{{ t('columns.action') }}</th>
|
||||||
<th>{{ t('columns.description') }}</th>
|
<th>{{ t('columns.description') }}</th>
|
||||||
<th style="width: 160px">{{ t('columns.ip') }}</th>
|
<th style="width: 160px">{{ t('columns.ip') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -91,9 +91,9 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>{{ log.username }}</td>
|
<td>{{ log.username }}</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="action-badge" [ngClass]="getActionClass(log.action)">
|
<app-tag [color]="getActionColor(log.action)" size="2xs" [rounded]="true">
|
||||||
{{ formatAction(log.action) }}
|
{{ formatAction(log.action) }}
|
||||||
</span>
|
</app-tag>
|
||||||
</td>
|
</td>
|
||||||
<td class="description-cell"
|
<td class="description-cell"
|
||||||
[class.expanded]="expandedRows.has(log.id)"
|
[class.expanded]="expandedRows.has(log.id)"
|
||||||
|
|||||||
@@ -86,35 +86,6 @@
|
|||||||
table-layout: fixed;
|
table-layout: fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-badge {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0.125rem 0.5rem;
|
|
||||||
border-radius: 12px;
|
|
||||||
font-size: 0.75rem;
|
|
||||||
font-weight: 600;
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
&.action-danger {
|
|
||||||
background: color-mix(in srgb, var(--p-red-500) 15%, transparent);
|
|
||||||
color: var(--p-red-400);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.action-success {
|
|
||||||
background: color-mix(in srgb, var(--p-green-500) 15%, transparent);
|
|
||||||
color: var(--p-green-400);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.action-info {
|
|
||||||
background: color-mix(in srgb, var(--p-primary-color) 15%, transparent);
|
|
||||||
color: var(--p-primary-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.action-warning {
|
|
||||||
background: color-mix(in srgb, var(--p-orange-500) 15%, transparent);
|
|
||||||
color: var(--p-orange-400);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.timestamp-cell {
|
.timestamp-cell {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|||||||
@@ -8,6 +8,24 @@ import {FormsModule} from '@angular/forms';
|
|||||||
import {TranslocoDirective} from '@jsverse/transloco';
|
import {TranslocoDirective} from '@jsverse/transloco';
|
||||||
import {Subscription, interval} from 'rxjs';
|
import {Subscription, interval} from 'rxjs';
|
||||||
import {AuditLog, AuditLogService} from './audit-log.service';
|
import {AuditLog, AuditLogService} from './audit-log.service';
|
||||||
|
import {TagColor, TagComponent} from '../../../shared/components/tag/tag.component';
|
||||||
|
|
||||||
|
const ACTION_COLOR_GROUPS: [TagColor, string[]][] = [
|
||||||
|
['red', ['USER_DELETED', 'LIBRARY_DELETED', 'BOOK_DELETED', 'SHELF_DELETED', 'MAGIC_SHELF_DELETED', 'EMAIL_PROVIDER_DELETED', 'OPDS_USER_DELETED', 'AUTHOR_DELETED']],
|
||||||
|
['green', ['USER_CREATED', 'LIBRARY_CREATED', 'BOOK_UPLOADED', 'SHELF_CREATED', 'MAGIC_SHELF_CREATED', 'EMAIL_PROVIDER_CREATED', 'OPDS_USER_CREATED', 'LOGIN_SUCCESS']],
|
||||||
|
['blue', ['USER_UPDATED', 'LIBRARY_UPDATED', 'SHELF_UPDATED', 'MAGIC_SHELF_UPDATED', 'EMAIL_PROVIDER_UPDATED', 'OPDS_USER_UPDATED']],
|
||||||
|
['purple', ['METADATA_UPDATED', 'AUTHOR_METADATA_UPDATED']],
|
||||||
|
['orange', ['SETTINGS_UPDATED', 'OIDC_CONFIG_CHANGED', 'NAMING_PATTERN_CHANGED']],
|
||||||
|
['amber', ['PASSWORD_CHANGED', 'PERMISSIONS_CHANGED']],
|
||||||
|
['fuchsia', ['LOGIN_FAILED']],
|
||||||
|
['pink', ['LOGIN_RATE_LIMITED', 'REFRESH_RATE_LIMITED']],
|
||||||
|
['teal', ['LIBRARY_SCANNED', 'BOOK_SENT', 'BOOK_FILE_DETACHED', 'DUPLICATE_BOOKS_MERGED']],
|
||||||
|
['indigo', ['TASK_EXECUTED']],
|
||||||
|
];
|
||||||
|
|
||||||
|
const ACTION_COLOR_MAP = new Map<string, TagColor>(
|
||||||
|
ACTION_COLOR_GROUPS.flatMap(([color, actions]) => actions.map(a => [a, color]))
|
||||||
|
);
|
||||||
|
|
||||||
interface ActionOption {
|
interface ActionOption {
|
||||||
label: string;
|
label: string;
|
||||||
@@ -22,7 +40,7 @@ interface UsernameOption {
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'app-audit-logs',
|
selector: 'app-audit-logs',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [CommonModule, TableModule, Select, DatePicker, FormsModule, TranslocoDirective],
|
imports: [CommonModule, TableModule, Select, DatePicker, FormsModule, TranslocoDirective, TagComponent],
|
||||||
templateUrl: './audit-logs.component.html',
|
templateUrl: './audit-logs.component.html',
|
||||||
styleUrl: './audit-logs.component.scss'
|
styleUrl: './audit-logs.component.scss'
|
||||||
})
|
})
|
||||||
@@ -77,6 +95,12 @@ export class AuditLogsComponent implements OnInit, OnDestroy {
|
|||||||
{label: 'OPDS User Deleted', value: 'OPDS_USER_DELETED'},
|
{label: 'OPDS User Deleted', value: 'OPDS_USER_DELETED'},
|
||||||
{label: 'OPDS User Updated', value: 'OPDS_USER_UPDATED'},
|
{label: 'OPDS User Updated', value: 'OPDS_USER_UPDATED'},
|
||||||
{label: 'Naming Pattern Changed', value: 'NAMING_PATTERN_CHANGED'},
|
{label: 'Naming Pattern Changed', value: 'NAMING_PATTERN_CHANGED'},
|
||||||
|
{label: 'Login Rate Limited', value: 'LOGIN_RATE_LIMITED'},
|
||||||
|
{label: 'Refresh Rate Limited', value: 'REFRESH_RATE_LIMITED'},
|
||||||
|
{label: 'Duplicate Books Merged', value: 'DUPLICATE_BOOKS_MERGED'},
|
||||||
|
{label: 'Book File Detached', value: 'BOOK_FILE_DETACHED'},
|
||||||
|
{label: 'Author Metadata Updated', value: 'AUTHOR_METADATA_UPDATED'},
|
||||||
|
{label: 'Author Deleted', value: 'AUTHOR_DELETED'},
|
||||||
];
|
];
|
||||||
|
|
||||||
currentPage = 0;
|
currentPage = 0;
|
||||||
@@ -199,11 +223,8 @@ export class AuditLogsComponent implements OnInit, OnDestroy {
|
|||||||
return action.replace(/_/g, ' ').replace(/\b\w/g, c => c.toUpperCase()).replace(/\B\w+/g, c => c.toLowerCase());
|
return action.replace(/_/g, ' ').replace(/\b\w/g, c => c.toUpperCase()).replace(/\B\w+/g, c => c.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
getActionClass(action: string): string {
|
getActionColor(action: string): TagColor {
|
||||||
if (action.includes('FAILED') || action.includes('DELETED')) return 'action-danger';
|
return ACTION_COLOR_MAP.get(action) ?? 'gray';
|
||||||
if (action.includes('CREATED') || action.includes('SUCCESS') || action.includes('UPLOADED')) return 'action-success';
|
|
||||||
if (action.includes('OIDC') || action.includes('PERMISSIONS')) return 'action-warning';
|
|
||||||
return 'action-info';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private restoreFromQueryParams(): void {
|
private restoreFromQueryParams(): void {
|
||||||
|
|||||||
@@ -27,7 +27,8 @@
|
|||||||
"unshelved": "Nicht eingeordnet",
|
"unshelved": "Nicht eingeordnet",
|
||||||
"series": "Serien",
|
"series": "Serien",
|
||||||
"notebook": "Notizbuch",
|
"notebook": "Notizbuch",
|
||||||
"update": "(Aktualisierung)"
|
"update": "(Aktualisierung)",
|
||||||
|
"authors": "Autoren"
|
||||||
},
|
},
|
||||||
"changelog": {
|
"changelog": {
|
||||||
"title": "Neuigkeiten",
|
"title": "Neuigkeiten",
|
||||||
@@ -42,11 +43,11 @@
|
|||||||
"uploadDialog": {
|
"uploadDialog": {
|
||||||
"chooseFile": "Datei auswählen:",
|
"chooseFile": "Datei auswählen:",
|
||||||
"selectImage": "Bild auswählen",
|
"selectImage": "Bild auswählen",
|
||||||
"fileNote": "Unterstützte Formate: JPEG, PNG \u2022 Maximale Dateigröße: 5 MB",
|
"fileNote": "Unterstützte Formate: JPEG, PNG • Maximale Dateigröße: 5 MB",
|
||||||
"or": "ODER",
|
"or": "ODER",
|
||||||
"imageUrl": "Bild-URL:",
|
"imageUrl": "Bild-URL:",
|
||||||
"urlPlaceholder": "Bild-URL hier einfügen",
|
"urlPlaceholder": "Bild-URL hier einfügen",
|
||||||
"urlNote": "Unterstützte Formate: JPEG, PNG \u2022 Maximale Dateigröße: 5 MB",
|
"urlNote": "Unterstützte Formate: JPEG, PNG • Maximale Dateigröße: 5 MB",
|
||||||
"errorNoInput": "Bitte wählen Sie eine Datei aus oder fügen Sie eine URL ein.",
|
"errorNoInput": "Bitte wählen Sie eine Datei aus oder fügen Sie eine URL ein.",
|
||||||
"errorUploadFailed": "Bild konnte nicht hochgeladen werden.",
|
"errorUploadFailed": "Bild konnte nicht hochgeladen werden.",
|
||||||
"errorUploadRetry": "Hochladen fehlgeschlagen. Bitte versuchen Sie es erneut."
|
"errorUploadRetry": "Hochladen fehlgeschlagen. Bitte versuchen Sie es erneut."
|
||||||
|
|||||||
@@ -151,7 +151,7 @@
|
|||||||
"personalRating": {
|
"personalRating": {
|
||||||
"title": "Persönliche Bewertungsverteilung",
|
"title": "Persönliche Bewertungsverteilung",
|
||||||
"tooltip": "Zeigt, wie viele Bücher Sie mit jeder Bewertung von 1 bis 10 bewertet haben. Hilft Ihnen zu sehen, ob Sie eher großzügig, streng oder um einen bestimmten Wert herum bewerten. Nur Bücher mit persönlicher Bewertung sind enthalten.",
|
"tooltip": "Zeigt, wie viele Bücher Sie mit jeder Bewertung von 1 bis 10 bewertet haben. Hilft Ihnen zu sehen, ob Sie eher großzügig, streng oder um einen bestimmten Wert herum bewerten. Nur Bücher mit persönlicher Bewertung sind enthalten.",
|
||||||
"description": "Bücher nach Ihrer Bewertung (1\u201310)",
|
"description": "Bücher nach Ihrer Bewertung (1–10)",
|
||||||
"axisPersonalRating": "Persönliche Bewertung",
|
"axisPersonalRating": "Persönliche Bewertung",
|
||||||
"axisNumberOfBooks": "Anzahl der Bücher",
|
"axisNumberOfBooks": "Anzahl der Bücher",
|
||||||
"booksByPersonalRating": "Bücher nach persönlicher Bewertung",
|
"booksByPersonalRating": "Bücher nach persönlicher Bewertung",
|
||||||
@@ -470,5 +470,12 @@
|
|||||||
"statusAbandoned": "Abgebrochen",
|
"statusAbandoned": "Abgebrochen",
|
||||||
"statusOther": "Sonstige",
|
"statusOther": "Sonstige",
|
||||||
"trend": "Trend"
|
"trend": "Trend"
|
||||||
|
},
|
||||||
|
"bookFlow": {
|
||||||
|
"colRating": "Bewertung"
|
||||||
|
},
|
||||||
|
"readingDebt": {
|
||||||
|
"booksAdded": "Bücher hinzugefügt",
|
||||||
|
"booksFinished": "Bücher beendet"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -220,6 +220,7 @@
|
|||||||
"playTooltip": "Play",
|
"playTooltip": "Play",
|
||||||
"downloadTooltip": "Download",
|
"downloadTooltip": "Download",
|
||||||
"deleteTooltip": "Delete",
|
"deleteTooltip": "Delete",
|
||||||
|
"detachTooltip": "Detach",
|
||||||
"downloadAllTooltip": "Download all files as a ZIP archive",
|
"downloadAllTooltip": "Download all files as a ZIP archive",
|
||||||
"physicalBookHint": "You can upload a digital copy or add metadata manually."
|
"physicalBookHint": "You can upload a digital copy or add metadata manually."
|
||||||
},
|
},
|
||||||
@@ -286,6 +287,7 @@
|
|||||||
"audiobookSampleRate": "Sample Rate",
|
"audiobookSampleRate": "Sample Rate",
|
||||||
"audiobookChannels": "Channels",
|
"audiobookChannels": "Channels",
|
||||||
"audiobookCodec": "Codec",
|
"audiobookCodec": "Codec",
|
||||||
|
"audiobookChapterList": "Chapter List",
|
||||||
"abridged": "Abridged",
|
"abridged": "Abridged",
|
||||||
"unabridged": "Unabridged",
|
"unabridged": "Unabridged",
|
||||||
"readBtn": "Read",
|
"readBtn": "Read",
|
||||||
@@ -354,6 +356,10 @@
|
|||||||
"deleteFormatSuccessDetail": "Book format \"{{ fileName }}\" deleted successfully",
|
"deleteFormatSuccessDetail": "Book format \"{{ fileName }}\" deleted successfully",
|
||||||
"deleteFormatErrorSummary": "Error",
|
"deleteFormatErrorSummary": "Error",
|
||||||
"deleteFormatErrorDetail": "Failed to delete book format: {{ error }}",
|
"deleteFormatErrorDetail": "Failed to delete book format: {{ error }}",
|
||||||
|
"detachFileSuccessSummary": "File Detached",
|
||||||
|
"detachFileSuccessDetail": "The file has been detached and a new book has been created.",
|
||||||
|
"detachFileErrorSummary": "Detach Failed",
|
||||||
|
"detachFileErrorDetail": "Failed to detach file.",
|
||||||
"dateUpdatedSummary": "Date Updated",
|
"dateUpdatedSummary": "Date Updated",
|
||||||
"dateUpdatedDetail": "Book finish date has been updated.",
|
"dateUpdatedDetail": "Book finish date has been updated.",
|
||||||
"dateUpdateFailedSummary": "Update Failed",
|
"dateUpdateFailedSummary": "Update Failed",
|
||||||
@@ -371,6 +377,10 @@
|
|||||||
"deleteAltFormatMessage": "Are you sure you want to delete \"{{ fileName }}\"?\n\nThis file will be permanently removed from your filesystem.",
|
"deleteAltFormatMessage": "Are you sure you want to delete \"{{ fileName }}\"?\n\nThis file will be permanently removed from your filesystem.",
|
||||||
"deleteAltFormatHeader": "Delete Book Format",
|
"deleteAltFormatHeader": "Delete Book Format",
|
||||||
"deleteFileBtn": "Delete File",
|
"deleteFileBtn": "Delete File",
|
||||||
|
"detachFileHeader": "Detach File",
|
||||||
|
"detachFileMessage": "This will detach \"{{ fileName }}\" from this book and create a new standalone book for it. The file will not be deleted.",
|
||||||
|
"detachFileCopyMetadata": "Copy metadata to new book",
|
||||||
|
"detachFileBtn": "Detach",
|
||||||
"deleteBookMessage": "Are you sure you want to delete \"{{ title }}\"?\n\nThis will permanently remove the book record from your library.\n\nThis action cannot be undone.",
|
"deleteBookMessage": "Are you sure you want to delete \"{{ title }}\"?\n\nThis will permanently remove the book record from your library.\n\nThis action cannot be undone.",
|
||||||
"deleteBookAllFilesMessage": "Are you sure you want to delete \"{{ title }}\"?\n\nThis will permanently remove the book record AND all associated files from your filesystem.\n\nThis action cannot be undone.",
|
"deleteBookAllFilesMessage": "Are you sure you want to delete \"{{ title }}\"?\n\nThis will permanently remove the book record AND all associated files from your filesystem.\n\nThis action cannot be undone.",
|
||||||
"deleteEverythingBtn": "Delete Everything"
|
"deleteEverythingBtn": "Delete Everything"
|
||||||
|
|||||||
@@ -220,6 +220,7 @@
|
|||||||
"playTooltip": "Reproducir",
|
"playTooltip": "Reproducir",
|
||||||
"downloadTooltip": "Descargar",
|
"downloadTooltip": "Descargar",
|
||||||
"deleteTooltip": "Eliminar",
|
"deleteTooltip": "Eliminar",
|
||||||
|
"detachTooltip": "Separar",
|
||||||
"downloadAllTooltip": "Descargar todos los archivos como archivo ZIP",
|
"downloadAllTooltip": "Descargar todos los archivos como archivo ZIP",
|
||||||
"physicalBookHint": "Puede subir una copia digital o agregar metadatos manualmente."
|
"physicalBookHint": "Puede subir una copia digital o agregar metadatos manualmente."
|
||||||
},
|
},
|
||||||
@@ -286,6 +287,7 @@
|
|||||||
"audiobookSampleRate": "Frecuencia de muestreo",
|
"audiobookSampleRate": "Frecuencia de muestreo",
|
||||||
"audiobookChannels": "Canales",
|
"audiobookChannels": "Canales",
|
||||||
"audiobookCodec": "Códec",
|
"audiobookCodec": "Códec",
|
||||||
|
"audiobookChapterList": "Lista de capítulos",
|
||||||
"abridged": "Abreviado",
|
"abridged": "Abreviado",
|
||||||
"unabridged": "Íntegro",
|
"unabridged": "Íntegro",
|
||||||
"readBtn": "Leer",
|
"readBtn": "Leer",
|
||||||
@@ -354,6 +356,10 @@
|
|||||||
"deleteFormatSuccessDetail": "Formato de libro \"{{ fileName }}\" eliminado correctamente",
|
"deleteFormatSuccessDetail": "Formato de libro \"{{ fileName }}\" eliminado correctamente",
|
||||||
"deleteFormatErrorSummary": "Error",
|
"deleteFormatErrorSummary": "Error",
|
||||||
"deleteFormatErrorDetail": "Error al eliminar formato de libro: {{ error }}",
|
"deleteFormatErrorDetail": "Error al eliminar formato de libro: {{ error }}",
|
||||||
|
"detachFileSuccessSummary": "Archivo separado",
|
||||||
|
"detachFileSuccessDetail": "El archivo se ha separado y se ha creado un nuevo libro.",
|
||||||
|
"detachFileErrorSummary": "Error al separar",
|
||||||
|
"detachFileErrorDetail": "No se pudo separar el archivo.",
|
||||||
"dateUpdatedSummary": "Fecha actualizada",
|
"dateUpdatedSummary": "Fecha actualizada",
|
||||||
"dateUpdatedDetail": "La fecha de finalización del libro se ha actualizado.",
|
"dateUpdatedDetail": "La fecha de finalización del libro se ha actualizado.",
|
||||||
"dateUpdateFailedSummary": "Actualización fallida",
|
"dateUpdateFailedSummary": "Actualización fallida",
|
||||||
@@ -371,6 +377,10 @@
|
|||||||
"deleteAltFormatMessage": "¿Estás seguro de que deseas eliminar \"{{ fileName }}\"?\n\nEste archivo será eliminado permanentemente de tu sistema de archivos.",
|
"deleteAltFormatMessage": "¿Estás seguro de que deseas eliminar \"{{ fileName }}\"?\n\nEste archivo será eliminado permanentemente de tu sistema de archivos.",
|
||||||
"deleteAltFormatHeader": "Eliminar formato del libro",
|
"deleteAltFormatHeader": "Eliminar formato del libro",
|
||||||
"deleteFileBtn": "Eliminar archivo",
|
"deleteFileBtn": "Eliminar archivo",
|
||||||
|
"detachFileHeader": "Separar archivo",
|
||||||
|
"detachFileMessage": "Esto separará \"{{ fileName }}\" de este libro y creará un nuevo libro independiente. El archivo no será eliminado.",
|
||||||
|
"detachFileCopyMetadata": "Copiar metadatos al nuevo libro",
|
||||||
|
"detachFileBtn": "Separar",
|
||||||
"deleteBookMessage": "¿Estás seguro de que deseas eliminar \"{{ title }}\"?\n\nEsto eliminará permanentemente el registro del libro de tu biblioteca.\n\nEsta acción no se puede deshacer.",
|
"deleteBookMessage": "¿Estás seguro de que deseas eliminar \"{{ title }}\"?\n\nEsto eliminará permanentemente el registro del libro de tu biblioteca.\n\nEsta acción no se puede deshacer.",
|
||||||
"deleteBookAllFilesMessage": "¿Estás seguro de que deseas eliminar \"{{ title }}\"?\n\nEsto eliminará permanentemente el registro del libro Y todos los archivos asociados de tu sistema de archivos.\n\nEsta acción no se puede deshacer.",
|
"deleteBookAllFilesMessage": "¿Estás seguro de que deseas eliminar \"{{ title }}\"?\n\nEsto eliminará permanentemente el registro del libro Y todos los archivos asociados de tu sistema de archivos.\n\nEsta acción no se puede deshacer.",
|
||||||
"deleteEverythingBtn": "Eliminar todo"
|
"deleteEverythingBtn": "Eliminar todo"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"offline": "Offline vagy",
|
"offline": "Offline vagy",
|
||||||
"loading": "",
|
"loading": "Booklore betöltése…",
|
||||||
"loadingDescription": "",
|
"loadingDescription": "Kérlek várj amíg felkészülünk.",
|
||||||
"offlineLoadingDescription": "",
|
"offlineLoadingDescription": "Szerverkapcsolat szükséges a BookLore betöltéséhez.",
|
||||||
"offlineDescription": "",
|
"offlineDescription": "Ellenőrizd a hálózati kapcsolatodat és próbáld újra.",
|
||||||
"connectionLost": ""
|
"connectionLost": "A kapcsolatod megszakadt. Bizonyos funkciók elérhetetlenek lehetnek."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
{
|
{
|
||||||
"oidc": {
|
"oidc": {
|
||||||
"loginFailedSummary": "",
|
"loginFailedSummary": "OIDC bejelentkezés sikertelen",
|
||||||
"redirectingDetail": ""
|
"redirectingDetail": "Átirányítás lokális bejelentkezésre..."
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"title": "",
|
"title": "Üdvözlünk újra itt",
|
||||||
"subtitle": "",
|
"subtitle": "Jelentkezz be a folytatáshoz",
|
||||||
"usernameLabel": "",
|
"usernameLabel": "Felhasználónév",
|
||||||
"usernamePlaceholder": "",
|
"usernamePlaceholder": "Add meg a felhasználónevedet",
|
||||||
"passwordLabel": "",
|
"passwordLabel": "Jelszó",
|
||||||
"passwordPlaceholder": "",
|
"passwordPlaceholder": "Add meg a jelszavadat",
|
||||||
"signIn": "",
|
"signIn": "Bejelentkezés",
|
||||||
"orContinueWith": "",
|
"orContinueWith": "vagy folytatás ezzel",
|
||||||
"redirectingTo": "",
|
"redirectingTo": "Átirányítás ide: {{provider}}...",
|
||||||
"oidcTrouble": "",
|
"oidcTrouble": "Problémába ütköztél itt: {{provider}}? Használj lokális bejelentkezést",
|
||||||
"reEnableOidc": "",
|
"reEnableOidc": "{{provider}} bejelentkezés újraengedélyezése",
|
||||||
"connectionError": "",
|
"connectionError": "Nem tudunk kapcsolódni a szerverhez. Kérlek ellenőrizd a hálózati kapcsolatodat és próbált újra.",
|
||||||
"unexpectedError": "",
|
"unexpectedError": "Egy nem várt hiba történt. Kérlek próbáld újra.",
|
||||||
"oidcInitError": "",
|
"oidcInitError": "Nem sikerült elindítani az OIDC bejelentkezést. Kérlek próbáld újra vagy használj lokális bejelentkezést.",
|
||||||
"oidcWarningTitle": "",
|
"oidcWarningTitle": "OIDC Autentikációs Hiba",
|
||||||
"retryOidc": "",
|
"retryOidc": "OIDC újrapróbálása",
|
||||||
"useLocalLogin": "",
|
"useLocalLogin": "Lokális bejelentkezés használata",
|
||||||
"oidcAutoDisabled": "",
|
"oidcAutoDisabled": "{{provider}}-n keresztüli bejelentkezés automatikusan letiltásra került {{count}} egymást követő sikertelen kísérlet után (beleértve az időtúllépéseket is). Próbáld újra vagy használj lokális bejelentkezést.",
|
||||||
"oidcManuallyDisabled": "",
|
"oidcManuallyDisabled": "{{provider}}-n keresztüli bejelentkezés manuálisan letiltásra került. Újra engedélyezheted vagy folytathatod lokális bejelentkezéssel.",
|
||||||
"oidcErrors": "",
|
"oidcErrors": "{{provider}}-n keresztüli bejelentkezés {{count}} alkalommal is hibába ütközött, valószínűleg időtúllépés vagy szerver problémák miatt.",
|
||||||
"rateLimited": ""
|
"rateLimited": "Túl sok hibás bejelentkezési kísérlet. Kérlek próbáld újra később."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,105 +1,105 @@
|
|||||||
{
|
{
|
||||||
"browser": {
|
"browser": {
|
||||||
"confirm": {
|
"confirm": {
|
||||||
"deleteMessage": "",
|
"deleteMessage": "Biztosan ki akarod törölni a kijelölt {{ count }} könyvet?\n\nEzzel véglegesen eltávolítod a könyvek fájljait a fájlrendszerből.\n\nEz az akció nem vonható vissza.",
|
||||||
"deleteHeader": "",
|
"deleteHeader": "Törlés megerősítése",
|
||||||
"regenCoverMessage": "",
|
"regenCoverMessage": "Biztosan újra szeretnéd generálni a borítókat a kijelölt {{ count }} könyvhöz?",
|
||||||
"regenCoverHeader": "",
|
"regenCoverHeader": "Borítók újragenerálásának megerősítése",
|
||||||
"customCoverMessage": "",
|
"customCoverMessage": "Biztosan szeretnél egyedi borítókat generálni a kijelölt {{ count }} könyvhöz?",
|
||||||
"customCoverHeader": ""
|
"customCoverHeader": "Egyedi borító generálás megerősítése"
|
||||||
},
|
},
|
||||||
"toast": {
|
"toast": {
|
||||||
"sortSavedSummary": "",
|
"sortSavedSummary": "Rendezés elmentve",
|
||||||
"sortSavedGlobalDetail": "",
|
"sortSavedGlobalDetail": "Alapértelmezett rendezési sorrend elmentve.",
|
||||||
"sortSavedEntityDetail": "",
|
"sortSavedEntityDetail": "Rendezési sorrend elmentve a következőhöz: {{ entityType }}",
|
||||||
"regenCoverStartedSummary": "",
|
"regenCoverStartedSummary": "Borító újragenerálás elindítva",
|
||||||
"regenCoverStartedDetail": "",
|
"regenCoverStartedDetail": "Borítók újragenerálása {{ count }} könyv számára. Frissítsd az oldalt miután végeztünk.",
|
||||||
"customCoverStartedSummary": "",
|
"customCoverStartedSummary": "Egyedi borító generálás elindítva",
|
||||||
"customCoverStartedDetail": "",
|
"customCoverStartedDetail": "Egyedi borító generálása {{ count }} könyv számára.",
|
||||||
"failedSummary": "",
|
"failedSummary": "Sikertelen",
|
||||||
"regenCoverFailedDetail": "",
|
"regenCoverFailedDetail": "Nem tudtuk elindítani a borítók újragenerálását.",
|
||||||
"customCoverFailedDetail": "",
|
"customCoverFailedDetail": "Nem tudtuk elindítani az egyedi borító generálást.",
|
||||||
"unshelveSuccessDetail": "",
|
"unshelveSuccessDetail": "Könyvespolcok frissítve",
|
||||||
"unshelveFailedDetail": "",
|
"unshelveFailedDetail": "Könyvespolcok frissítése sikertelen",
|
||||||
"noEligibleBooksSummary": "",
|
"noEligibleBooksSummary": "Nincsenek alkalmas könyvek",
|
||||||
"noEligibleBooksDetail": "",
|
"noEligibleBooksDetail": "A kiválasztott könyvek egy fájlból kell álljanak (alternatív formátumok nem elérhetőek).",
|
||||||
"multipleLibrariesSummary": "",
|
"multipleLibrariesSummary": "Külöböző könyvtárak",
|
||||||
"multipleLibrariesDetail": ""
|
"multipleLibrariesDetail": "Minden kiválasztott könyvnek azonos könyvtárból kell származnia."
|
||||||
},
|
},
|
||||||
"loading": {
|
"loading": {
|
||||||
"deleting": "",
|
"deleting": "{{ count }} könyv törlése...",
|
||||||
"unshelving": ""
|
"unshelving": "{{ count }} könyv levétele a polcokról..."
|
||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"allBooks": "",
|
"allBooks": "Minden könyv",
|
||||||
"unshelvedBooks": "",
|
"unshelvedBooks": "Polc nélküli könyvek",
|
||||||
"unshelvedBooksFiltered": "",
|
"unshelvedBooksFiltered": "Polc nélküli könyvek (szűrt)",
|
||||||
"filteredSuffix": "",
|
"filteredSuffix": "(Szűrt)",
|
||||||
"seriesCollapsedInfo": "",
|
"seriesCollapsedInfo": "{{ count }} {{ itemWord }} mutatása (sorozatok összevonva)",
|
||||||
"item": "",
|
"item": "elem",
|
||||||
"items": "",
|
"items": "elemek",
|
||||||
"selected": "",
|
"selected": "kiválasztott",
|
||||||
"setAsDefault": "",
|
"setAsDefault": "Beállítod alapértelmezésként?",
|
||||||
"save": "",
|
"save": "Mentés",
|
||||||
"collapseSeries": "",
|
"collapseSeries": "Sorozatok összevonása",
|
||||||
"gridColumns": "",
|
"gridColumns": "Rácsnézet oszlopai",
|
||||||
"gridItemSize": "",
|
"gridItemSize": "Rácsnézet elem mérete",
|
||||||
"bookTypeOverlay": "",
|
"bookTypeOverlay": "Könyvtípus overlay",
|
||||||
"noBooks": "",
|
"noBooks": "Ebben a gyűjteményben nem találhatóak könyvek!",
|
||||||
"failedLibrary": "",
|
"failedLibrary": "Nem sikerült betölteni a könyvtárban lévő könyveket!",
|
||||||
"failedShelf": "",
|
"failedShelf": "Nem sikerült betölteni a polcon lévő könyveket!",
|
||||||
"activeFilters": ""
|
"activeFilters": "{{ count }} aktív szűrő"
|
||||||
},
|
},
|
||||||
"tooltip": {
|
"tooltip": {
|
||||||
"clearFilters": "",
|
"clearFilters": "Szűrők eltávolítása",
|
||||||
"visibleColumns": "",
|
"visibleColumns": "Látható oszlopok",
|
||||||
"displaySettings": "",
|
"displaySettings": "Megjelenítés beállításai",
|
||||||
"selectSorting": "",
|
"selectSorting": "Rendezés kiválasztása",
|
||||||
"toggleView": "",
|
"toggleView": "Válts Rácsos és Táblázatos megjelenítés között",
|
||||||
"search": "",
|
"search": "Keresés",
|
||||||
"toggleSidebar": "",
|
"toggleSidebar": "Oldalhasáb megjelenítése / elrejtése",
|
||||||
"metadataActions": "",
|
"metadataActions": "Metaadat tevékenységek",
|
||||||
"assignToShelf": "",
|
"assignToShelf": "Polcra tesz",
|
||||||
"removeFromShelf": "",
|
"removeFromShelf": "Polcról levesz",
|
||||||
"lockUnlockMetadata": "",
|
"lockUnlockMetadata": "Metaadatok zárolása / feloldása",
|
||||||
"organizeFiles": "",
|
"organizeFiles": "Fájlok rendszerezése",
|
||||||
"attachToBook": "",
|
"attachToBook": "Hozzáadás egy másik könyvhöz",
|
||||||
"moreActions": "",
|
"moreActions": "További lehetőségek",
|
||||||
"selectAll": "",
|
"selectAll": "Összes könyv kiválasztása",
|
||||||
"deselectAll": "",
|
"deselectAll": "Kiválasztások megszüntetése",
|
||||||
"deleteSelected": ""
|
"deleteSelected": "Kiválasztott könyvek törlése"
|
||||||
},
|
},
|
||||||
"placeholder": {
|
"placeholder": {
|
||||||
"selectColumns": "",
|
"selectColumns": "Oszlopok kiválasztása",
|
||||||
"search": ""
|
"search": "Cím, Szerző, Sorozat, Műfaj, vagy ISBN..."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"card": {
|
"card": {
|
||||||
"menu": {
|
"menu": {
|
||||||
"assignShelf": "",
|
"assignShelf": "Polcra helyezés",
|
||||||
"viewDetails": "",
|
"viewDetails": "Részletek megtekintése",
|
||||||
"download": "",
|
"download": "Letöltés",
|
||||||
"delete": "",
|
"delete": "Törlés",
|
||||||
"emailBook": "",
|
"emailBook": "Küldés emailben",
|
||||||
"quickSend": "",
|
"quickSend": "Gyors küldés",
|
||||||
"customSend": "",
|
"customSend": "Egyedi küldés",
|
||||||
"metadata": "",
|
"metadata": "Metaadat",
|
||||||
"searchMetadata": "",
|
"searchMetadata": "Metaadat keresése",
|
||||||
"autoFetch": "",
|
"autoFetch": "Auto lehívás",
|
||||||
"customFetch": "",
|
"customFetch": "Egyedi lehívás",
|
||||||
"regenerateCover": "",
|
"regenerateCover": "Borító újragenerálása (fájl)",
|
||||||
"generateCustomCover": "",
|
"generateCustomCover": "Egyedi borító generálása",
|
||||||
"moreActions": "",
|
"moreActions": "További lehetőségek",
|
||||||
"organizeFile": "",
|
"organizeFile": "Fájl rendszerezése",
|
||||||
"readStatus": "",
|
"readStatus": "Olvasás állapota",
|
||||||
"resetBookloreProgress": "",
|
"resetBookloreProgress": "Booklore előrehaladás nullázása",
|
||||||
"resetKOReaderProgress": "",
|
"resetKOReaderProgress": "KOReader előrehaladás nullázása",
|
||||||
"book": "",
|
"book": "Könyv",
|
||||||
"loading": ""
|
"loading": "Betöltés..."
|
||||||
},
|
},
|
||||||
"confirm": {
|
"confirm": {
|
||||||
"deleteBookMessage": "",
|
"deleteBookMessage": "Biztosan ki szeretnéd törölni a következőt: \"{{ title }}\"?\n\nEzzel eltávolítod a könyv fájlt a fájlrendszeredből.\n\nEz a művelet nem vonható vissza.",
|
||||||
"deleteBookHeader": "",
|
"deleteBookHeader": "Törlés megerősítése",
|
||||||
"deleteFileMessage": "",
|
"deleteFileMessage": "",
|
||||||
"deleteFileHeader": ""
|
"deleteFileHeader": ""
|
||||||
},
|
},
|
||||||
@@ -790,7 +790,7 @@
|
|||||||
"assignToShelf": "",
|
"assignToShelf": "",
|
||||||
"lockUnlockMetadata": "",
|
"lockUnlockMetadata": "",
|
||||||
"organizeFiles": "",
|
"organizeFiles": "",
|
||||||
"moreActions": "",
|
"moreActions": "További lehetőségek",
|
||||||
"selectAll": "",
|
"selectAll": "",
|
||||||
"deselectAll": "",
|
"deselectAll": "",
|
||||||
"deleteSelected": ""
|
"deleteSelected": ""
|
||||||
|
|||||||
@@ -1,192 +1,192 @@
|
|||||||
{
|
{
|
||||||
"bulkEdit": {
|
"bulkEdit": {
|
||||||
"infoBanner": "",
|
"infoBanner": "Válaszd ki mely mezőket alkalmazzuk a kiválasztott <strong>{{ fileCount}}</strong> fájlra. Csak a kijelölt mezők kerülnek frissítésre.",
|
||||||
"textFieldsTitle": "",
|
"textFieldsTitle": "Szöveg Mezők",
|
||||||
"numberFieldsTitle": "",
|
"numberFieldsTitle": "Szám Mezők",
|
||||||
"arrayFieldsTitle": "",
|
"arrayFieldsTitle": "Tömb Mezők",
|
||||||
"modeLabel": "",
|
"modeLabel": "Mód:",
|
||||||
"helperText": "",
|
"helperText": "Gépelj majd nyomj Entert hogy hozzáadj egy elemet.",
|
||||||
"enableField": "",
|
"enableField": "Engedélyezt a következőt: {{ label }}",
|
||||||
"mergeOption": "",
|
"mergeOption": "Összefűz",
|
||||||
"replaceOption": "",
|
"replaceOption": "Csere",
|
||||||
"applyToSelected": "",
|
"applyToSelected": "Alkalmazás a Kiválasztottra",
|
||||||
"seriesName": "",
|
"seriesName": "Sorozat Név",
|
||||||
"publisher": "",
|
"publisher": "Kiadó",
|
||||||
"language": "",
|
"language": "Nyelv",
|
||||||
"seriesTotal": "",
|
"seriesTotal": "Sorozat Összes",
|
||||||
"authors": "",
|
"authors": "Szerzők",
|
||||||
"genres": "",
|
"genres": "Műfajok",
|
||||||
"moods": "",
|
"moods": "Hangulatok",
|
||||||
"tags": ""
|
"tags": "Címkék"
|
||||||
},
|
},
|
||||||
"metadataPicker": {
|
"metadataPicker": {
|
||||||
"fileData": "",
|
"fileData": "Fájl Adatok",
|
||||||
"fetchedData": "",
|
"fetchedData": "Begyűjtött Adatok",
|
||||||
"copyMissingTooltip": "",
|
"copyMissingTooltip": "Másold a hiányzó mezőket a begyűjtött metaadatokból",
|
||||||
"overwriteAllTooltip": "",
|
"overwriteAllTooltip": "Minden mező felülírása a begyűjtött metaadatokkal",
|
||||||
"resetAllTooltip": "",
|
"resetAllTooltip": "Az összes mező visszaállítása az eredeti értékekre",
|
||||||
"noCoverImage": "",
|
"noCoverImage": "Nincs borítókép",
|
||||||
"coverImageNotFound": "",
|
"coverImageNotFound": "Borítókép nem található",
|
||||||
"unableToFetchMetadata": "",
|
"unableToFetchMetadata": "Nem sikerült metaadatokat begyűjteni ehhez a fájlhoz",
|
||||||
"confirmResetMessage": "",
|
"confirmResetMessage": "Biztosan vissza akarsz állítani minden változtatást ennek a fájlnak a metaadataiban?",
|
||||||
"confirmResetHeader": ""
|
"confirmResetHeader": "Metaadatok Visszaállítása?"
|
||||||
},
|
},
|
||||||
"fileReview": {
|
"fileReview": {
|
||||||
"title": "",
|
"title": "Gyűjtőládába helyezett fájlok ellenőrzése",
|
||||||
"viewDocumentationTooltip": "",
|
"viewDocumentationTooltip": "Dokumentáció megtekintése",
|
||||||
"description": "",
|
"description": "Az alábbi fájlok a <strong>Gyűjtőláda mappájába</strong> lettek feltöltve. Ellenőrizd a begyűjtött metaadatokat, add meg a könyvtárukat és az almappájukat, majd véglegesítsd hova tartoznak a gyűjteményedben.",
|
||||||
"rescan": "",
|
"rescan": "Újra Ellenőrzés",
|
||||||
"rescanTooltip": "",
|
"rescanTooltip": "Kézzel indított újraellenőrzése a Gyűjtőláda mappájának",
|
||||||
"loadingMessage": "",
|
"loadingMessage": "Gyűjtőládába helyezett fájlok betöltése. Kérlek várj...",
|
||||||
"savingMessage": "",
|
"savingMessage": "Fájlok rendszerezése és mozgatása a kijelölt könyvtárakba. Kérlek várj...",
|
||||||
"importMetadata": "",
|
"importMetadata": "Metaadatok Importálása",
|
||||||
"importMetadataTooltip": "",
|
"importMetadataTooltip": "Begyűjtött metaadatok importálása a kiválasztott fájlokhoz",
|
||||||
"includeCoversTooltip": "",
|
"includeCoversTooltip": "Vedd figyelembe a borítókat is a begyűjtött metaadatok importálásakor",
|
||||||
"bulkEdit": "",
|
"bulkEdit": "Tömeges Szerkesztés",
|
||||||
"bulkEditTooltip": "",
|
"bulkEditTooltip": "A kiválasztott fájlok metaadat mezőinek tömeges szerkesztése",
|
||||||
"extractPattern": "",
|
"extractPattern": "Minta Kinyerés",
|
||||||
"extractPatternTooltip": "",
|
"extractPatternTooltip": "Nyerj ki metaadatokat a fájlnevekből egy minta felhasználásával",
|
||||||
"libraryPlaceholder": "",
|
"libraryPlaceholder": "Könyvtár",
|
||||||
"subpathPlaceholder": "",
|
"subpathPlaceholder": "Almappa",
|
||||||
"specifyLibraryTooltip": "",
|
"specifyLibraryTooltip": "Add meg a könyvtárat és az almappát a kiválasztott fájlokhoz",
|
||||||
"applyLibraryTooltip": "",
|
"applyLibraryTooltip": "Alkalmazd a könyvtárat és almappát a kiválasztott fájlokra",
|
||||||
"emptyState": "",
|
"emptyState": "Nincsenek ellenőrzésre váró fájlok a Gyűjtőládában.",
|
||||||
"originalCoverTitle": "",
|
"originalCoverTitle": "Eredeti borító",
|
||||||
"noCoverFoundTitle": "",
|
"noCoverFoundTitle": "Nem található borító",
|
||||||
"fetchedCoverTitle": "",
|
"fetchedCoverTitle": "Begyűjtött borító",
|
||||||
"noCoverFetchedTitle": "",
|
"noCoverFetchedTitle": "Nem került begyűjtésre borító",
|
||||||
"metadataAppliedTooltip": "",
|
"metadataAppliedTooltip": "A begyűjtött metaadat alkalmazásra került.",
|
||||||
"noMetadataTooltip": "",
|
"noMetadataTooltip": "Nem érhető el begyűjtött metaadat. Az eredeti metaadatok kerülnek felhasználásra.",
|
||||||
"metadataNotAppliedTooltip": "",
|
"metadataNotAppliedTooltip": "A begyűjtött metaadatok még nem kerültek alkalmazásra. Nyisd meg a metaadat kiválasztót az ellenőrzéshez.",
|
||||||
"hideMetadataTooltip": "",
|
"hideMetadataTooltip": "Metaadatok elrejtése",
|
||||||
"reviewMetadataTooltip": "",
|
"reviewMetadataTooltip": "A begyűjtött metaadatok ellenőrzése és másolása",
|
||||||
"showMetadataTooltip": "",
|
"showMetadataTooltip": "Fájl metaadatainak mutatása (begyűjtött metaadatok nélkül)",
|
||||||
"selectedCountTooltip": "",
|
"selectedCountTooltip": "Kiválasztott fájlok száma",
|
||||||
"selectAll": "",
|
"selectAll": "Összes Kiválasztása",
|
||||||
"selectAllTooltip": "",
|
"selectAllTooltip": "Az összes fájl kiválasztása az összes oldalról",
|
||||||
"clear": "",
|
"clear": "Kiválasztás megszüntetése",
|
||||||
"clearTooltip": "",
|
"clearTooltip": "A kiválasztás megszüntetése az összes fájlról és oldalról",
|
||||||
"reset": "",
|
"reset": "Visszaállítás",
|
||||||
"resetTooltip": "",
|
"resetTooltip": "Az összes metaadat módosítás elvetése a kijelölt fájloknál",
|
||||||
"delete": "",
|
"delete": "Törlés",
|
||||||
"deleteTooltip": "",
|
"deleteTooltip": "Végleges törlése a kiválasztott Gyűjtőládába helyezett fájloknak és minden módosítás elvetése",
|
||||||
"finalize": "",
|
"finalize": "Véglegesítés",
|
||||||
"finalizeTooltip": "",
|
"finalizeTooltip": "A kiválasztott fájlok mozgatása a kijelölt könyvtárakba és almappákba",
|
||||||
"toast": {
|
"toast": {
|
||||||
"noFilesSelectedSummary": "",
|
"noFilesSelectedSummary": "Nincsenek kiválasztva fájlok",
|
||||||
"noFilesResetDetail": "",
|
"noFilesResetDetail": "Kérlek válassz ki fájlokat a metaadatok visszaállításához.",
|
||||||
"noFilesFinalizeDetail": "",
|
"noFilesFinalizeDetail": "Kérlek válassz ki fájlokat a véglegesítéshez.",
|
||||||
"noFilesDeleteDetail": "",
|
"noFilesDeleteDetail": "Kérlek válassz ki fájlokat a törléshez.",
|
||||||
"noFilesBulkEditDetail": "",
|
"noFilesBulkEditDetail": "Kérlek válassz ki fájlokat a tömeges szerkesztéshez.",
|
||||||
"noFilesExtractDetail": "",
|
"noFilesExtractDetail": "Kérlek válassz ki fájlokat a metaadatok kinyeréséhez.",
|
||||||
"confirmResetMessage": "",
|
"confirmResetMessage": "Biztosan vissza akarsz állítani minden módosítást a kiválasztott fájlok metaadataiban?",
|
||||||
"confirmResetHeader": "",
|
"confirmResetHeader": "Visszaállítás megerősítése",
|
||||||
"confirmResetAccept": "",
|
"confirmResetAccept": "Visszaállítás",
|
||||||
"confirmFinalizeMessage": "",
|
"confirmFinalizeMessage": "Biztosan véglegesíteni akarod a következő {{ count }} fájl importálását?",
|
||||||
"confirmFinalizeHeader": "",
|
"confirmFinalizeHeader": "Véglegesítés megerősítése",
|
||||||
"confirmFinalizeAccept": "",
|
"confirmFinalizeAccept": "Véglegesítés",
|
||||||
"confirmDeleteMessage": "",
|
"confirmDeleteMessage": "Biztosan ki akarod törölni a kiválasztott {{ count }} Gyűjtőládába helyezett fájlt? Ez a művelet nem vonható vissza.",
|
||||||
"confirmDeleteHeader": "",
|
"confirmDeleteHeader": "Törlés megerősítése",
|
||||||
"confirmDeleteAccept": "",
|
"confirmDeleteAccept": "Törlés",
|
||||||
"filesDeletedSummary": "",
|
"filesDeletedSummary": "Fájok törölve",
|
||||||
"filesDeletedDetail": "",
|
"filesDeletedDetail": "A kiválasztott Gyűjtőládába helyezett fájlok sikeresen törlésre kerültek.",
|
||||||
"deleteFailedSummary": "",
|
"deleteFailedSummary": "Törlés sikertelen",
|
||||||
"deleteFailedDetail": "",
|
"deleteFailedDetail": "Egy hiba lépett fel a Gyűjtőládába helyezett fájlok eltávolításakor.",
|
||||||
"importCompleteSummary": "",
|
"importCompleteSummary": "Importálás sikeres",
|
||||||
"importCompleteDetail": "",
|
"importCompleteDetail": "Az importálás sikeresen befejeződött. A részleteket lásd alább.",
|
||||||
"importFailedSummary": "",
|
"importFailedSummary": "Importálás sikertelen",
|
||||||
"importFailedDetail": "",
|
"importFailedDetail": "Bizonyos fájok átmozgatása nem járt sikerrel. Kérlek ellenőrizd a konzolt további részletekért.",
|
||||||
"rescanTriggeredSummary": "",
|
"rescanTriggeredSummary": "Újraellenőrzés folyamatban",
|
||||||
"rescanTriggeredDetail": "",
|
"rescanTriggeredDetail": "A Gyűjtőláda ellenőrzése sikeresen elkezdődött.",
|
||||||
"rescanFailedSummary": "",
|
"rescanFailedSummary": "Újraellenőrzés sikertelen",
|
||||||
"rescanFailedDetail": "",
|
"rescanFailedDetail": "A Gyűjtőláda ellenőrzése sikertelen volt. Kérlek próbáld újra.",
|
||||||
"bulkEditDialogHeader": "",
|
"bulkEditDialogHeader": "{{ count }} fájl tömeges szerkesztése",
|
||||||
"bulkEditAppliedSummary": "",
|
"bulkEditAppliedSummary": "Tömeges szerkesztés alkalmazva",
|
||||||
"bulkEditAppliedDetail": "",
|
"bulkEditAppliedDetail": "A kiválasztott {{ total }} fájlból {{ success }} esetben sikeresen frissítésre kerültek a metaadatok.",
|
||||||
"bulkEditFailedSummary": "",
|
"bulkEditFailedSummary": "Tömeges szerkesztés sikertelen",
|
||||||
"bulkEditFailedDetail": "",
|
"bulkEditFailedDetail": "Egy hiba történt a tömeges szerkesztés alkalmazása közben.",
|
||||||
"bulkEditCacheFailedDetail": "",
|
"bulkEditCacheFailedDetail": "Egy hiba történt a fájlok gyorsítótárba való betöltése közben.",
|
||||||
"patternExtractionAppliedSummary": "",
|
"patternExtractionAppliedSummary": "Minta kinyerés alkalmazva",
|
||||||
"patternExtractionAppliedDetail": "",
|
"patternExtractionAppliedDetail": "A kinyert metaadatok alkalmazásra kerültek {{ count }} fájl esetében.",
|
||||||
"patternExtractionCacheFailedSummary": "",
|
"patternExtractionCacheFailedSummary": "Minta kinyerés sikertelen",
|
||||||
"patternExtractionCacheFailedDetail": "",
|
"patternExtractionCacheFailedDetail": "Egy hiba történt a fájlok gyorsítótárba való betöltése közben.",
|
||||||
"extractMetadataDialogHeader": ""
|
"extractMetadataDialogHeader": "Metaadatok kinyerése fájlnevekből"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filesWidget": {
|
"filesWidget": {
|
||||||
"title": "",
|
"title": "Ellenőrizendő Gyűjtőláda Fájlok",
|
||||||
"lastUpdated": "",
|
"lastUpdated": "Utoljára frissítve:",
|
||||||
"reviewBtn": ""
|
"reviewBtn": "Ellenőrzés"
|
||||||
},
|
},
|
||||||
"finalizeResult": {
|
"finalizeResult": {
|
||||||
"panelTitle": "",
|
"panelTitle": "Importálás Összegző",
|
||||||
"panelDescription": "",
|
"panelDescription": "A könyv importálásod eredményei",
|
||||||
"totalFiles": "",
|
"totalFiles": "Összes Fájl",
|
||||||
"successfullyImported": "",
|
"successfullyImported": "Sikeresen Importált",
|
||||||
"failed": "",
|
"failed": "Sikertelen",
|
||||||
"processedAt": ""
|
"processedAt": "Feldolgozott itt"
|
||||||
},
|
},
|
||||||
"patternExtract": {
|
"patternExtract": {
|
||||||
"infoBanner": "",
|
"infoBanner": "Adj meg egy mintát, amely szerint metaadatokat nyerjünk ki a kiválasztott <strong>{{ fileCount }}</strong> fájlból. Használj helyőrzőket, mint például <code>{{ '{' }}SeriesName{{ '}' }}</code> hogy kinyerd az értékeket.",
|
||||||
"patternTitle": "",
|
"patternTitle": "Minta",
|
||||||
"patternPlaceholder": "",
|
"patternPlaceholder": "pl.: {SeriesName} - Ch {SeriesNumber}",
|
||||||
"patternAriaLabel": "",
|
"patternAriaLabel": "Fájlnév minta metaadat kinyeréshez",
|
||||||
"preview": "",
|
"preview": "Előnézet",
|
||||||
"previewAriaLabel": "",
|
"previewAriaLabel": "Mintakinyerés előnézete a próbafájlokon",
|
||||||
"availablePlaceholdersTitle": "",
|
"availablePlaceholdersTitle": "Elérhető helyőrzők",
|
||||||
"commonPatternsTitle": "",
|
"commonPatternsTitle": "Gyakori minták",
|
||||||
"previewTitle": "",
|
"previewTitle": "Előnézet (Próba fájlok)",
|
||||||
"extractingMessage": "",
|
"extractingMessage": "Metaadatok kinyerése...",
|
||||||
"extractAndApply": "",
|
"extractAndApply": "Kinyerés és Alkalmazás",
|
||||||
"patternDidNotMatch": "",
|
"patternDidNotMatch": "A minták nem egyeztek",
|
||||||
"patternDidNotMatchStructure": "",
|
"patternDidNotMatchStructure": "A minta nem egyezett a fájlnév felépítésével",
|
||||||
"placeholders": {
|
"placeholders": {
|
||||||
"wildcard": "",
|
"wildcard": "Joker - kihagy bármilyen szöveget (nem egy metaadat mezőt)",
|
||||||
"seriesName": "",
|
"seriesName": "Sorozat vagy képregény név",
|
||||||
"title": "",
|
"title": "Könyv cím",
|
||||||
"subtitle": "",
|
"subtitle": "Könyv alcím",
|
||||||
"authors": "",
|
"authors": "Szerző(k) neve",
|
||||||
"seriesNumber": "",
|
"seriesNumber": "Könyv sorszáma a sorozatban",
|
||||||
"published": "",
|
"published": "Teljes dátum formátummal együtt",
|
||||||
"publisher": "",
|
"publisher": "Kiadó neve",
|
||||||
"language": "",
|
"language": "Nyelv kódja",
|
||||||
"seriesTotal": "",
|
"seriesTotal": "Összes könyv száma a sorozatban",
|
||||||
"isbn10": "",
|
"isbn10": "ISBN-10 azonosító",
|
||||||
"isbn13": "",
|
"isbn13": "ISBN-13 azonosító",
|
||||||
"asin": ""
|
"asin": "Amazon ASIN"
|
||||||
},
|
},
|
||||||
"placeholderExamples": {
|
"placeholderExamples": {
|
||||||
"wildcard": "",
|
"wildcard": "bármi",
|
||||||
"seriesName": "",
|
"seriesName": "A Föld Krónikái",
|
||||||
"title": "",
|
"title": "Az Elveszett Város",
|
||||||
"subtitle": "",
|
"subtitle": "Egy Kaland Története",
|
||||||
"authors": "",
|
"authors": "John Smith",
|
||||||
"seriesNumber": "",
|
"seriesNumber": "25",
|
||||||
"published": "",
|
"published": "{Published:yyyy-MM-dd}",
|
||||||
"publisher": "",
|
"publisher": "Epic Press",
|
||||||
"language": "",
|
"language": "en",
|
||||||
"seriesTotal": "",
|
"seriesTotal": "50",
|
||||||
"isbn10": "",
|
"isbn10": "1234567890",
|
||||||
"isbn13": "",
|
"isbn13": "1234567890123",
|
||||||
"asin": ""
|
"asin": "B012345678"
|
||||||
},
|
},
|
||||||
"commonPatternLabels": {
|
"commonPatternLabels": {
|
||||||
"authorTitle": "",
|
"authorTitle": "Szerző - Cím",
|
||||||
"titleAuthor": "",
|
"titleAuthor": "Cím - Szerző",
|
||||||
"titleYear": "",
|
"titleYear": "Cím (Év)",
|
||||||
"authorTitleYear": "",
|
"authorTitleYear": "Szerző - Cím (Év)",
|
||||||
"seriesNumber": "",
|
"seriesNumber": "Sorozat #Sorszám",
|
||||||
"seriesChapter": "",
|
"seriesChapter": "Sorozat - Fejezet Szám",
|
||||||
"seriesVol": "",
|
"seriesVol": "Sorozat - Vol Sorszám",
|
||||||
"tagSeriesChapter": "",
|
"tagSeriesChapter": "[Címke] Sorozat - Fejezet Szám",
|
||||||
"titleByAuthor": "",
|
"titleByAuthor": "Cím írta Szerző",
|
||||||
"seriesVTotal": ""
|
"seriesVTotal": "Sorozat vX (ebből: Összes)"
|
||||||
},
|
},
|
||||||
"toast": {
|
"toast": {
|
||||||
"extractionCompleteSummary": "",
|
"extractionCompleteSummary": "Kinyerés befejeződött",
|
||||||
"extractionCompleteDetail": "",
|
"extractionCompleteDetail": "Sikeresen kinyertük a metaadatokat {{ success }} esetben a {{ total }} fájlból.",
|
||||||
"extractionFailedSummary": "",
|
"extractionFailedSummary": "Kinyerés sikertelen",
|
||||||
"extractionFailedDetail": ""
|
"extractionFailedDetail": "Egy hiba történt a minta kinyerése közben."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
{
|
{
|
||||||
"save": "",
|
"save": "Mentés",
|
||||||
"cancel": "",
|
"cancel": "Mégsem",
|
||||||
"delete": "",
|
"delete": "Törlés",
|
||||||
"close": "",
|
"close": "Bezárás",
|
||||||
"confirm": "",
|
"confirm": "Megerősítés",
|
||||||
"search": "",
|
"search": "Keresés",
|
||||||
"loading": "",
|
"loading": "Betöltés...",
|
||||||
"error": "",
|
"error": "Hiba",
|
||||||
"success": "",
|
"success": "Siker",
|
||||||
"yes": "",
|
"yes": "Igen",
|
||||||
"no": "",
|
"no": "Nem",
|
||||||
"ok": "",
|
"ok": "OK",
|
||||||
"retry": "",
|
"retry": "Újra",
|
||||||
"back": "",
|
"back": "Vissza",
|
||||||
"next": "",
|
"next": "Következő",
|
||||||
"submit": "",
|
"submit": "Küldés",
|
||||||
"remove": "",
|
"remove": "Eltávolítás",
|
||||||
"edit": "",
|
"edit": "Szerkesztés",
|
||||||
"info": "",
|
"info": "Info",
|
||||||
"select": "",
|
"select": "Kiválasztás",
|
||||||
"dismiss": "",
|
"dismiss": "Ignorálás",
|
||||||
"discard": "",
|
"discard": "Elvetés",
|
||||||
"review": ""
|
"review": "Felülvizsgálat"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,66 +1,66 @@
|
|||||||
{
|
{
|
||||||
"main": {
|
"main": {
|
||||||
"pageTitle": "",
|
"pageTitle": "Kezdőlap",
|
||||||
"welcomeTitle": "",
|
"welcomeTitle": "Üdvözöl a BookLore!",
|
||||||
"welcomeSubtitle": "",
|
"welcomeSubtitle": "Hozzuk létre az első könyvtáradat",
|
||||||
"welcomeDescription": "",
|
"welcomeDescription": "A könyvár az a hely, ahol az összes könyved otthonra lel. Kezdd el építeni a digitális gyűjteményedet ma!",
|
||||||
"createLibrary": "",
|
"createLibrary": "Könyvtár létrehozása",
|
||||||
"customizeDashboard": ""
|
"customizeDashboard": "Kezdőlap testreszabása"
|
||||||
},
|
},
|
||||||
"scroller": {
|
"scroller": {
|
||||||
"noBooksFound": "",
|
"noBooksFound": "Nem találhatóak könyvek ehhez a könyveskocsihoz.",
|
||||||
"loadError": "",
|
"loadError": "Nem sikerült betölteni a könyveket! Kérlek próbáld meg frissíteni az oldalt.",
|
||||||
"continueListening": "",
|
"continueListening": "Lejátszás Folytatása",
|
||||||
"continueReading": "",
|
"continueReading": "Olvasás Folytatása",
|
||||||
"recentlyAdded": "",
|
"recentlyAdded": "Nemrégiben Hozzáadott",
|
||||||
"discoverNew": "",
|
"discoverNew": "Fedezz fel valami újat",
|
||||||
"magicShelf": "",
|
"magicShelf": "Varázspolc",
|
||||||
"default": ""
|
"default": "Könyveskocsi"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"title": "",
|
"title": "Kezdőlap Konfigurálása",
|
||||||
"description": "",
|
"description": "Adj hozzá maximum 5 könyveskocsit különböző gyűjteményekből és szabd testre a viselkedésüket",
|
||||||
"type": "",
|
"type": "Típus",
|
||||||
"selectType": "",
|
"selectType": "Típus kiválasztása",
|
||||||
"magicShelf": "",
|
"magicShelf": "Varázspolc",
|
||||||
"selectMagicShelf": "",
|
"selectMagicShelf": "Varázspolc kiválasztása",
|
||||||
"sortField": "",
|
"sortField": "Rendező Mező",
|
||||||
"selectField": "",
|
"selectField": "Mező kiválasztása",
|
||||||
"direction": "",
|
"direction": "Irány",
|
||||||
"selectDirection": "",
|
"selectDirection": "Irány kiválasztása",
|
||||||
"maxItems": "",
|
"maxItems": "Maximális Elemek",
|
||||||
"addScroller": "",
|
"addScroller": "Könyveskocsi hozzáadása",
|
||||||
"resetToDefault": "",
|
"resetToDefault": "Visszaállítás Alapértelmezettre",
|
||||||
"scrollerTypes": {
|
"scrollerTypes": {
|
||||||
"lastRead": "",
|
"lastRead": "Olvasás Folytatása",
|
||||||
"lastListened": "",
|
"lastListened": "Lejátszás Folytatása",
|
||||||
"latestAdded": "",
|
"latestAdded": "Nemrégiben Hozzáadott",
|
||||||
"random": "",
|
"random": "Fedezz fel valami újat",
|
||||||
"magicShelf": "",
|
"magicShelf": "Varázspolc",
|
||||||
"default": ""
|
"default": "Könyveskocsi"
|
||||||
},
|
},
|
||||||
"sortFields": {
|
"sortFields": {
|
||||||
"title": "",
|
"title": "Cím",
|
||||||
"fileName": "",
|
"fileName": "Fájlnév",
|
||||||
"filePath": "",
|
"filePath": "Elérési Útvonal",
|
||||||
"addedOn": "",
|
"addedOn": "Hozzáadás Dátuma",
|
||||||
"author": "",
|
"author": "Szerző",
|
||||||
"authorSurnameVorname": "",
|
"authorSurnameVorname": "Szerző (családnév)",
|
||||||
"seriesName": "",
|
"seriesName": "Sorozat Neve",
|
||||||
"seriesNumber": "",
|
"seriesNumber": "Sorozat Száma",
|
||||||
"personalRating": "",
|
"personalRating": "Személyes Értékelés",
|
||||||
"publisher": "",
|
"publisher": "Kiadó",
|
||||||
"publishedDate": "",
|
"publishedDate": "Kiadás Dátuma",
|
||||||
"lastReadTime": "",
|
"lastReadTime": "Utoljára Olvasott",
|
||||||
"readStatus": "",
|
"readStatus": "Olvasás Állapota",
|
||||||
"dateFinished": "",
|
"dateFinished": "Befejezés Dátuma",
|
||||||
"readingProgress": "",
|
"readingProgress": "Olvasás Előrehaladottsága",
|
||||||
"bookType": "",
|
"bookType": "Könyv Típus",
|
||||||
"pageCount": ""
|
"pageCount": "Oldalak"
|
||||||
},
|
},
|
||||||
"sortDirections": {
|
"sortDirections": {
|
||||||
"asc": "",
|
"asc": "Emelkedő",
|
||||||
"desc": ""
|
"desc": "Csökkenő"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,55 +1,55 @@
|
|||||||
{
|
{
|
||||||
"topbar": {
|
"topbar": {
|
||||||
"bookdrop": "",
|
"bookdrop": "Gyűjtőláda",
|
||||||
"createNewLibrary": "",
|
"createNewLibrary": "Új Könyvtár Létrehozása",
|
||||||
"uploadBook": "",
|
"uploadBook": "Könyv Feltöltése",
|
||||||
"charts": "",
|
"charts": "Kimutatások",
|
||||||
"metadataManager": "",
|
"metadataManager": "Metaadat Szerkesztő",
|
||||||
"settings": "",
|
"settings": "Beállítások",
|
||||||
"documentation": "",
|
"documentation": "Dokumentáció",
|
||||||
"profile": "",
|
"profile": "Profil",
|
||||||
"logout": "",
|
"logout": "Kijelentkezés",
|
||||||
"language": "",
|
"language": "Nyelv",
|
||||||
"supportBookLore": "",
|
"supportBookLore": "BookLore Támogatása",
|
||||||
"notificationAriaLabel": "",
|
"notificationAriaLabel": "Egységes Értesítés Ikon",
|
||||||
"createLibrary": "",
|
"createLibrary": "Könyvtár Létrehozása",
|
||||||
"stats": "",
|
"stats": "Statisztikák",
|
||||||
"libraryStats": "",
|
"libraryStats": "Könyvtár Statisztikák",
|
||||||
"readingStats": ""
|
"readingStats": "Olvasási Statisztikák"
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"home": "",
|
"home": "Áttekintés",
|
||||||
"dashboard": "",
|
"dashboard": "Kezdőlap",
|
||||||
"allBooks": "",
|
"allBooks": "Minden Könyv",
|
||||||
"libraries": "",
|
"libraries": "Könyvtárak",
|
||||||
"shelves": "",
|
"shelves": "Polcok",
|
||||||
"magicShelves": "",
|
"magicShelves": "Varázspolcok",
|
||||||
"unshelved": "",
|
"unshelved": "Besorolatlan",
|
||||||
"series": "",
|
"series": "Sorozatok",
|
||||||
"authors": "",
|
"authors": "Szerzők",
|
||||||
"notebook": "",
|
"notebook": "Jegyzetfüzet",
|
||||||
"update": ""
|
"update": "(Frissítés)"
|
||||||
},
|
},
|
||||||
"changelog": {
|
"changelog": {
|
||||||
"title": "",
|
"title": "Újdonságok",
|
||||||
"description": "",
|
"description": "Legújabb frissítések és fejlesztések",
|
||||||
"loading": "",
|
"loading": "Változáskövetés betöltése...",
|
||||||
"empty": ""
|
"empty": "Nem érhető el új frissítés."
|
||||||
},
|
},
|
||||||
"theme": {
|
"theme": {
|
||||||
"primary": "",
|
"primary": "Elsődleges",
|
||||||
"surface": ""
|
"surface": "Felszín"
|
||||||
},
|
},
|
||||||
"uploadDialog": {
|
"uploadDialog": {
|
||||||
"chooseFile": "",
|
"chooseFile": "Fájl Tallózása:",
|
||||||
"selectImage": "",
|
"selectImage": "Kép Kiválasztása",
|
||||||
"fileNote": "",
|
"fileNote": "Támogatott formátumok: JPEG, PNG • Maximális fájlméret: 5 MB",
|
||||||
"or": "",
|
"or": "VAGY",
|
||||||
"imageUrl": "",
|
"imageUrl": "Kép URL:",
|
||||||
"urlPlaceholder": "",
|
"urlPlaceholder": "Illeszd be ide a kép URL-jét",
|
||||||
"urlNote": "",
|
"urlNote": "Támogatott formátumok: JPEG, PNG • Maximális fájlméret: 5 MB",
|
||||||
"errorNoInput": "",
|
"errorNoInput": "Kérlek válassz ki egy fájlt vagy illesz be egy URL-t.",
|
||||||
"errorUploadFailed": "",
|
"errorUploadFailed": "Kép feltöltése sikertelen.",
|
||||||
"errorUploadRetry": ""
|
"errorUploadRetry": "Feltöltés sikertelen. Kérlek próbáld újra."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,62 +1,62 @@
|
|||||||
{
|
{
|
||||||
"creator": {
|
"creator": {
|
||||||
"titleNew": "",
|
"titleNew": "Új Könyvtár",
|
||||||
"titleEdit": "",
|
"titleEdit": "Könyvtár szerkesztése",
|
||||||
"subtitle": "",
|
"subtitle": "Konfiguráld a könyv gyűjteményed",
|
||||||
"libraryDetails": "",
|
"libraryDetails": "Könyvtár részletek",
|
||||||
"nameLabel": "",
|
"nameLabel": "Név",
|
||||||
"namePlaceholder": "",
|
"namePlaceholder": "Saját Könyvtár",
|
||||||
"iconLabel": "",
|
"iconLabel": "Ikon (Opcionális)",
|
||||||
"chooseIcon": "",
|
"chooseIcon": "Válassz ikont",
|
||||||
"customSvg": "",
|
"customSvg": "Egyedi SVG",
|
||||||
"bookFolders": "",
|
"bookFolders": "Könyvek mappái",
|
||||||
"addFolder": "",
|
"addFolder": "Mappa hozzáadása",
|
||||||
"emptyFoldersHint": "",
|
"emptyFoldersHint": "Add hozzá a könyveidet tartalmazó mappákat",
|
||||||
"options": "",
|
"options": "Opciók",
|
||||||
"watchFolders": "",
|
"watchFolders": "Mappák figyelése",
|
||||||
"watchFoldersTooltip": "",
|
"watchFoldersTooltip": "A mappákhoz újonnan hozzáadott könyvek automatikus felismerése",
|
||||||
"metadataSource": "",
|
"metadataSource": "Metaadat források",
|
||||||
"metadataSourceTooltip": "",
|
"metadataSourceTooltip": "Válaszd ki honnan kerüljenek beolvasásra a metaadatok a könyvek hozzáadásakor",
|
||||||
"metadataSourcePlaceholder": "",
|
"metadataSourcePlaceholder": "Forrás kiválasztása",
|
||||||
"metadataSourceEmbedded": "",
|
"metadataSourceEmbedded": "Kizárólag Beágyazott",
|
||||||
"metadataSourceSidecar": "",
|
"metadataSourceSidecar": "Kizárólag Sidecar",
|
||||||
"metadataSourcePreferSidecar": "",
|
"metadataSourcePreferSidecar": "Elsődlegesen Sidecar",
|
||||||
"metadataSourcePreferEmbedded": "",
|
"metadataSourcePreferEmbedded": "Elsődlegesen Beágyazott",
|
||||||
"metadataSourceNone": "",
|
"metadataSourceNone": "Sehonnan",
|
||||||
"formatPriority": "",
|
"formatPriority": "Formátum prioritás",
|
||||||
"formatPriorityTooltip": "",
|
"formatPriorityTooltip": "Rendezd a formátumokat aszerint, hogy melyik kerüljön preferálásra ha egy könyv több fájltípusban is elérhető",
|
||||||
"allowedFormats": "",
|
"allowedFormats": "Engedélyezett formátumok",
|
||||||
"allowedFormatsTooltip": "",
|
"allowedFormatsTooltip": "Válaszd ki mely fájl formátumok legyenek figyelembe véve a beolvasások során",
|
||||||
"allowAll": "",
|
"allowAll": "Mindegyik engedélyezése",
|
||||||
"formatWarning": "",
|
"formatWarning": "{{count}} létező könyv nem fog megjelenni az ezt követő beolvasások során",
|
||||||
"deselectedFormatsWarning": "",
|
"deselectedFormatsWarning": "A ki nem választott formátumok nem fognak megjelenni az ezt követő beolvasások során",
|
||||||
"validation": {
|
"validation": {
|
||||||
"enterName": "",
|
"enterName": "Add meg a könyvtár nevét",
|
||||||
"selectIcon": "",
|
"selectIcon": "Válassz ki egy ikont",
|
||||||
"addFolder": "",
|
"addFolder": "Adj hozzá legalább egy mappát",
|
||||||
"readyCreate": "",
|
"readyCreate": "Készen állunk a létrehozásra",
|
||||||
"readyUpdate": ""
|
"readyUpdate": "Készen állunk a frissítésre"
|
||||||
},
|
},
|
||||||
"buttonCreate": "",
|
"buttonCreate": "Létrehozás",
|
||||||
"buttonUpdate": "",
|
"buttonUpdate": "Frissítés",
|
||||||
"toast": {
|
"toast": {
|
||||||
"nameExistsSummary": "",
|
"nameExistsSummary": "Létező könyvtárnév",
|
||||||
"nameExistsDetail": "",
|
"nameExistsDetail": "Ez a könyvtárnév már foglalt.",
|
||||||
"updatedSummary": "",
|
"updatedSummary": "Könyvtár frissítve",
|
||||||
"updatedDetail": "",
|
"updatedDetail": "Ez a könyvtár sikeresen frissítésre került.",
|
||||||
"updateFailedSummary": "",
|
"updateFailedSummary": "Frissítés sikertelen",
|
||||||
"updateFailedDetail": "",
|
"updateFailedDetail": "Egy hiba következett be a könyvtár frissítése közben. Kérlek próbáld újra.",
|
||||||
"createdSummary": "",
|
"createdSummary": "Könyvtár létrehozva",
|
||||||
"createdDetail": "",
|
"createdDetail": "A könyvtár sikeresen létrehozásra került.",
|
||||||
"createdLargeDetail": "",
|
"createdLargeDetail": "Könyvtár létrehozva {{count}} fájllal. Betöltés folyamatban...",
|
||||||
"createFailedSummary": "",
|
"createFailedSummary": "Létrehozás sikertelen",
|
||||||
"createFailedDetail": ""
|
"createFailedDetail": "Egy hiba lépett fel a könyvtár létrehozása közben. Kérlek próbáld újra."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"loading": {
|
"loading": {
|
||||||
"title": "",
|
"title": "Könyvtár betöltése",
|
||||||
"processing": "",
|
"processing": "Feldolgozás folyamatban:",
|
||||||
"complete": "",
|
"complete": "Könyvtár betöltés sikeres!",
|
||||||
"openLibrary": ""
|
"openLibrary": "Könyvtár megnyitása"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"dashboard": "",
|
"dashboard": "Kezdőlap",
|
||||||
"libraries": "",
|
"libraries": "Könyvtárak",
|
||||||
"settings": ""
|
"settings": "Beállítások"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
{
|
{
|
||||||
"pageTitle": "",
|
"pageTitle": "Jegyzetfüzet",
|
||||||
"pageDescription": "",
|
"pageDescription": "Az összes kiemelésed, jegyzeted és könyvjelződ a könyvtáraidból egy helyen.",
|
||||||
"searchPlaceholder": "",
|
"searchPlaceholder": "Keresés a széljegyzetekben...",
|
||||||
"filterAll": "",
|
"filterAll": "Mind",
|
||||||
"filterHighlights": "",
|
"filterHighlights": "Kiemelések",
|
||||||
"filterNotes": "",
|
"filterNotes": "Jegyzetek",
|
||||||
"filterBookmarks": "",
|
"filterBookmarks": "Könyvjelzők",
|
||||||
"filterByBook": "",
|
"filterByBook": "Szűrés könyv szerint",
|
||||||
"allBooks": "",
|
"allBooks": "Minden könyv",
|
||||||
"sortNewest": "",
|
"sortNewest": "Legújabb elöl",
|
||||||
"sortOldest": "",
|
"sortOldest": "Legrégebbi elöl",
|
||||||
"export": "",
|
"export": "Exportálás",
|
||||||
"exportMarkdown": "",
|
"exportMarkdown": "Exportálás Markdown fájlként",
|
||||||
"noEntries": "",
|
"noEntries": "Még nincsenek széljegyzetek",
|
||||||
"noEntriesHint": "",
|
"noEntriesHint": "Kezdj el kijelölni és jegyzetelni olvasás közben!",
|
||||||
"noResults": "",
|
"noResults": "A beállított szűrőkkel nincsenek találatok",
|
||||||
"chapter": "",
|
"chapter": "Fejezet",
|
||||||
"highlight": "",
|
"highlight": "Kiemelés",
|
||||||
"note": "",
|
"note": "Jegyzet",
|
||||||
"bookmark": "",
|
"bookmark": "Könyvjelző",
|
||||||
"annotation": "",
|
"annotation": "széljegyzet",
|
||||||
"annotations": ""
|
"annotations": "széljegyzetek"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,64 +1,64 @@
|
|||||||
{
|
{
|
||||||
"loading": "",
|
"loading": "Hangoskönyv betöltése...",
|
||||||
"untitled": "",
|
"untitled": "Ismeretlen cím",
|
||||||
"unknownAuthor": "",
|
"unknownAuthor": "Ismeretlen szerző",
|
||||||
"coverAlt": "",
|
"coverAlt": "Borító",
|
||||||
"header": {
|
"header": {
|
||||||
"backTooltip": "",
|
"backTooltip": "Vissza",
|
||||||
"bookmarksTooltip": "",
|
"bookmarksTooltip": "Könyvjelzők",
|
||||||
"chaptersTracksTooltip": ""
|
"chaptersTracksTooltip": "Fejezetek/Részek"
|
||||||
},
|
},
|
||||||
"trackInfo": {
|
"trackInfo": {
|
||||||
"trackOf": "",
|
"trackOf": "{{ current }} / {{ total }} rész",
|
||||||
"chapterOf": ""
|
"chapterOf": "{{ current }} / {{ total }} fejezet"
|
||||||
},
|
},
|
||||||
"controls": {
|
"controls": {
|
||||||
"previousTrackTooltip": "",
|
"previousTrackTooltip": "Előző rész",
|
||||||
"previousChapterTooltip": "",
|
"previousChapterTooltip": "Előző fejezet",
|
||||||
"rewindTooltip": "",
|
"rewindTooltip": "-30mp",
|
||||||
"forwardTooltip": "",
|
"forwardTooltip": "+30mp",
|
||||||
"nextTrackTooltip": "",
|
"nextTrackTooltip": "Következő rész",
|
||||||
"nextChapterTooltip": ""
|
"nextChapterTooltip": "Következő fejezet"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"addBookmark": "",
|
"addBookmark": "Könyvjelző hozzáadása",
|
||||||
"sleepTimer": "",
|
"sleepTimer": "Elalvás időzítő",
|
||||||
"endOfChapter": ""
|
"endOfChapter": "Fejezet vége"
|
||||||
},
|
},
|
||||||
"details": {
|
"details": {
|
||||||
"narratedBy": "",
|
"narratedBy": "Narrátor: {{ narrator }}",
|
||||||
"kbps": "",
|
"kbps": "{{ bitrate }} kbps",
|
||||||
"totalDuration": ""
|
"totalDuration": "{{ duration }} összesen"
|
||||||
},
|
},
|
||||||
"sidebar": {
|
"sidebar": {
|
||||||
"tracks": "",
|
"tracks": "Részek",
|
||||||
"chapters": ""
|
"chapters": "Fejezetek"
|
||||||
},
|
},
|
||||||
"bookmarks": {
|
"bookmarks": {
|
||||||
"title": "",
|
"title": "Könyvjelzők",
|
||||||
"empty": "",
|
"empty": "Nincsenek még könyvjelzők",
|
||||||
"emptyHint": "",
|
"emptyHint": "Adj hozzá egy könyvjelzőt hogy elmentsd a jelenlegi helyzetedet",
|
||||||
"deleteTooltip": "",
|
"deleteTooltip": "Törlés",
|
||||||
"bookmarkAt": ""
|
"bookmarkAt": "Könyvjelző itt: {{ time }}"
|
||||||
},
|
},
|
||||||
"sleepTimerMenu": {
|
"sleepTimerMenu": {
|
||||||
"minutes15": "",
|
"minutes15": "15 perc",
|
||||||
"minutes30": "",
|
"minutes30": "30 perc",
|
||||||
"minutes45": "",
|
"minutes45": "45 perc",
|
||||||
"minutes60": "",
|
"minutes60": "60 perc",
|
||||||
"endOfChapter": "",
|
"endOfChapter": "Fejezet vége",
|
||||||
"cancelTimer": ""
|
"cancelTimer": "Időzítő kikapcsolása"
|
||||||
},
|
},
|
||||||
"toast": {
|
"toast": {
|
||||||
"loadFailed": "",
|
"loadFailed": "Nem sikerült betölteni a hangoskönyvet",
|
||||||
"audioLoadFailed": "",
|
"audioLoadFailed": "Nem sikerült betölteni a hangot",
|
||||||
"sleepTimerSet": "",
|
"sleepTimerSet": "A lejátszás megáll {{ minutes }} perc múlva",
|
||||||
"sleepTimerEndOfChapter": "",
|
"sleepTimerEndOfChapter": "A lejátszás megáll a fejezet végén",
|
||||||
"sleepTimerStopped": "",
|
"sleepTimerStopped": "Lejátszás megállítva az elalvás időzítő által",
|
||||||
"bookmarkAdded": "",
|
"bookmarkAdded": "Könyvjelző hozzáadva",
|
||||||
"bookmarkExists": "",
|
"bookmarkExists": "Könyvjelző már létezik",
|
||||||
"bookmarkExistsDetail": "",
|
"bookmarkExistsDetail": "Egy könyvjelző már létezik ennél a pozíciónál",
|
||||||
"bookmarkFailed": "",
|
"bookmarkFailed": "Könyvjelző hozzáadása sikertelen",
|
||||||
"bookmarkDeleted": ""
|
"bookmarkDeleted": "Könyvjelző eltávolítva"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"offline": "",
|
"offline": "Je bent offline",
|
||||||
"loading": "",
|
"loading": "Booklore laden…",
|
||||||
"loadingDescription": "",
|
"loadingDescription": "Even geduld terwijl we alles gereedmaken.",
|
||||||
"offlineLoadingDescription": "",
|
"offlineLoadingDescription": "BookLore heeft een verbinding met de server nodig om te laden.",
|
||||||
"offlineDescription": "",
|
"offlineDescription": "Controleer uw netwerk en probeer het opnieuw.",
|
||||||
"connectionLost": ""
|
"connectionLost": "Uw verbinding is verbroken. Sommige functies werken mogelijk niet."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
{
|
{
|
||||||
"oidc": {
|
"oidc": {
|
||||||
"loginFailedSummary": "",
|
"loginFailedSummary": "OIDC-login mislukt",
|
||||||
"redirectingDetail": ""
|
"redirectingDetail": "Doorverwijzen naar lokale login..."
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"title": "",
|
"title": "Welkom terug",
|
||||||
"subtitle": "",
|
"subtitle": "Log in om je reis te vervolgen",
|
||||||
"usernameLabel": "",
|
"usernameLabel": "Gebruikersnaam",
|
||||||
"usernamePlaceholder": "",
|
"usernamePlaceholder": "Voer je gebruikersnaam in",
|
||||||
"passwordLabel": "",
|
"passwordLabel": "Wachtwoord",
|
||||||
"passwordPlaceholder": "",
|
"passwordPlaceholder": "Voer je wachtwoord in",
|
||||||
"signIn": "",
|
"signIn": "Inloggen",
|
||||||
"orContinueWith": "",
|
"orContinueWith": "of ga verder met",
|
||||||
"redirectingTo": "",
|
"redirectingTo": "Doorverwijzen naar {{provider}}...",
|
||||||
"oidcTrouble": "",
|
"oidcTrouble": "Problemen met {{provider}}? Gebruik lokale login",
|
||||||
"reEnableOidc": "",
|
"reEnableOidc": "{{provider}}-login opnieuw inschakelen",
|
||||||
"connectionError": "",
|
"connectionError": "Kan geen verbinding maken met de server. Controleer je verbinding en probeer het opnieuw.",
|
||||||
"unexpectedError": "",
|
"unexpectedError": "Er is een onverwachte fout opgetreden. Probeer het opnieuw.",
|
||||||
"oidcInitError": "",
|
"oidcInitError": "OIDC-login mislukt. Probeer het opnieuw of gebruik de lokale login.",
|
||||||
"oidcWarningTitle": "",
|
"oidcWarningTitle": "OIDC-authenticatieproblemen",
|
||||||
"retryOidc": "",
|
"retryOidc": "OIDC opnieuw proberen",
|
||||||
"useLocalLogin": "",
|
"useLocalLogin": "Lokale login gebruiken",
|
||||||
"oidcAutoDisabled": "",
|
"oidcAutoDisabled": "{{provider}}-authenticatie is automatisch uitgeschakeld na {{count}} opeenvolgende fouten (inclusief time-outs). Je kunt het opnieuw proberen of doorgaan met de lokale login.",
|
||||||
"oidcManuallyDisabled": "",
|
"oidcManuallyDisabled": "{{provider}}-authenticatie is handmatig uitgeschakeld. Je kunt het opnieuw inschakelen of doorgaan met de lokale login.",
|
||||||
"oidcErrors": "",
|
"oidcErrors": "{{provider}}-authenticatie heeft {{count}} fout(en) ondervonden, mogelijk door time-outs of serverproblemen.",
|
||||||
"rateLimited": ""
|
"rateLimited": "Te veel mislukte inlogpogingen. Probeer het later opnieuw."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"pageTitle": "",
|
"pageTitle": "Paginatitel",
|
||||||
"browseAllAuthors": "",
|
"browseAllAuthors": "",
|
||||||
"searchPlaceholder": "",
|
"searchPlaceholder": "",
|
||||||
"noAuthorsFound": "",
|
"noAuthorsFound": "",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"browser": {
|
"browser": {
|
||||||
"confirm": {
|
"confirm": {
|
||||||
"deleteMessage": "",
|
"deleteMessage": "",
|
||||||
"deleteHeader": "",
|
"deleteHeader": "Verwijdering bevestigen",
|
||||||
"regenCoverMessage": "",
|
"regenCoverMessage": "",
|
||||||
"regenCoverHeader": "",
|
"regenCoverHeader": "",
|
||||||
"customCoverMessage": "",
|
"customCoverMessage": "",
|
||||||
|
|||||||
@@ -1,88 +1,88 @@
|
|||||||
{
|
{
|
||||||
"bulkEdit": {
|
"bulkEdit": {
|
||||||
"infoBanner": "",
|
"infoBanner": "Selecteer welke velden u wilt toepassen op <strong>{{ fileCount }}</strong> geselecteerde bestand(en). Alleen aangevinkte velden worden bijgewerkt.",
|
||||||
"textFieldsTitle": "",
|
"textFieldsTitle": "Tekstvelden",
|
||||||
"numberFieldsTitle": "",
|
"numberFieldsTitle": "Nummervelden",
|
||||||
"arrayFieldsTitle": "",
|
"arrayFieldsTitle": "Lijstvelden",
|
||||||
"modeLabel": "",
|
"modeLabel": "Modus:",
|
||||||
"helperText": "",
|
"helperText": "Typ en druk op Enter om elk item toe te voegen.",
|
||||||
"enableField": "",
|
"enableField": "{{ label }} inschakelen",
|
||||||
"mergeOption": "",
|
"mergeOption": "Samenvoegen",
|
||||||
"replaceOption": "",
|
"replaceOption": "Vervangen",
|
||||||
"applyToSelected": "",
|
"applyToSelected": "Toepassen op geselecteerde",
|
||||||
"seriesName": "",
|
"seriesName": "Reeksnaam",
|
||||||
"publisher": "",
|
"publisher": "Uitgever",
|
||||||
"language": "",
|
"language": "Taal",
|
||||||
"seriesTotal": "",
|
"seriesTotal": "Reekstotaal",
|
||||||
"authors": "",
|
"authors": "Auteurs",
|
||||||
"genres": "",
|
"genres": "Genres",
|
||||||
"moods": "",
|
"moods": "Stemmingen",
|
||||||
"tags": ""
|
"tags": "Tags"
|
||||||
},
|
},
|
||||||
"metadataPicker": {
|
"metadataPicker": {
|
||||||
"fileData": "",
|
"fileData": "Bestandsgegevens",
|
||||||
"fetchedData": "",
|
"fetchedData": "Opgehaalde gegevens",
|
||||||
"copyMissingTooltip": "",
|
"copyMissingTooltip": "Ontbrekende velden kopiëren van opgehaalde metadata",
|
||||||
"overwriteAllTooltip": "",
|
"overwriteAllTooltip": "Alle velden overschrijven met opgehaalde metadata",
|
||||||
"resetAllTooltip": "",
|
"resetAllTooltip": "Alle velden terugzetten naar oorspronkelijke waarden",
|
||||||
"noCoverImage": "",
|
"noCoverImage": "Geen omslagafbeelding",
|
||||||
"coverImageNotFound": "",
|
"coverImageNotFound": "Omslagafbeelding niet gevonden",
|
||||||
"unableToFetchMetadata": "",
|
"unableToFetchMetadata": "Kan metadata voor dit bestand niet ophalen",
|
||||||
"confirmResetMessage": "",
|
"confirmResetMessage": "Weet u zeker dat u alle metadata-wijzigingen aan dit bestand wilt terugzetten?",
|
||||||
"confirmResetHeader": ""
|
"confirmResetHeader": "Metadata-wijzigingen terugzetten?"
|
||||||
},
|
},
|
||||||
"fileReview": {
|
"fileReview": {
|
||||||
"title": "",
|
"title": "Bookdrop-bestanden beoordelen",
|
||||||
"viewDocumentationTooltip": "",
|
"viewDocumentationTooltip": "Documentatie bekijken",
|
||||||
"description": "",
|
"description": "Deze bestanden zijn geüpload naar de <strong>Bookdrop-map</strong>. Beoordeel hun opgehaalde metadata, wijs een bibliotheek en subpad toe, en bepaal waar ze in uw collectie thuishoren.",
|
||||||
"rescan": "",
|
"rescan": "Opnieuw scannen",
|
||||||
"rescanTooltip": "",
|
"rescanTooltip": "Handmatig een herscan van de Bookdrop-map starten",
|
||||||
"loadingMessage": "",
|
"loadingMessage": "Bookdrop-bestanden laden. Even geduld...",
|
||||||
"savingMessage": "",
|
"savingMessage": "Bestanden worden georganiseerd en verplaatst naar hun aangewezen bibliotheken. Even geduld...",
|
||||||
"importMetadata": "",
|
"importMetadata": "Metadata importeren",
|
||||||
"importMetadataTooltip": "",
|
"importMetadataTooltip": "Opgehaalde metadata importeren voor geselecteerde bestanden",
|
||||||
"includeCoversTooltip": "",
|
"includeCoversTooltip": "Boekomslagen meenemen bij het importeren van opgehaalde metadata",
|
||||||
"bulkEdit": "",
|
"bulkEdit": "",
|
||||||
"bulkEditTooltip": "",
|
"bulkEditTooltip": "Metadatavelden in bulk bewerken voor geselecteerde bestanden",
|
||||||
"extractPattern": "",
|
"extractPattern": "",
|
||||||
"extractPatternTooltip": "",
|
"extractPatternTooltip": "",
|
||||||
"libraryPlaceholder": "",
|
"libraryPlaceholder": "Bibliotheek",
|
||||||
"subpathPlaceholder": "",
|
"subpathPlaceholder": "",
|
||||||
"specifyLibraryTooltip": "",
|
"specifyLibraryTooltip": "",
|
||||||
"applyLibraryTooltip": "",
|
"applyLibraryTooltip": "",
|
||||||
"emptyState": "",
|
"emptyState": "Geen bookdrop-bestanden om te beoordelen.",
|
||||||
"originalCoverTitle": "",
|
"originalCoverTitle": "Oorspronkelijke omslag",
|
||||||
"noCoverFoundTitle": "",
|
"noCoverFoundTitle": "Geen omslag gevonden",
|
||||||
"fetchedCoverTitle": "",
|
"fetchedCoverTitle": "Opgehaalde omslag",
|
||||||
"noCoverFetchedTitle": "",
|
"noCoverFetchedTitle": "Geen omslag opgehaald",
|
||||||
"metadataAppliedTooltip": "",
|
"metadataAppliedTooltip": "Opgehaalde metadata is toegepast.",
|
||||||
"noMetadataTooltip": "",
|
"noMetadataTooltip": "Geen opgehaalde metadata beschikbaar. Oorspronkelijke metadata wordt gebruikt.",
|
||||||
"metadataNotAppliedTooltip": "",
|
"metadataNotAppliedTooltip": "Opgehaalde metadata is nog niet toegepast. Open de metadata-kiezer om te beoordelen.",
|
||||||
"hideMetadataTooltip": "",
|
"hideMetadataTooltip": "Metadata verbergen",
|
||||||
"reviewMetadataTooltip": "",
|
"reviewMetadataTooltip": "Opgehaalde metadata beoordelen en kopiëren",
|
||||||
"showMetadataTooltip": "",
|
"showMetadataTooltip": "Bestandsmetadata tonen (geen opgehaalde metadata)",
|
||||||
"selectedCountTooltip": "",
|
"selectedCountTooltip": "Aantal geselecteerde bestanden",
|
||||||
"selectAll": "",
|
"selectAll": "Alles selecteren",
|
||||||
"selectAllTooltip": "",
|
"selectAllTooltip": "Alle bestanden op alle pagina's selecteren",
|
||||||
"clear": "",
|
"clear": "",
|
||||||
"clearTooltip": "",
|
"clearTooltip": "Selectie opheffen voor alle bestanden op alle pagina's",
|
||||||
"reset": "",
|
"reset": "Terugzetten",
|
||||||
"resetTooltip": "",
|
"resetTooltip": "Alle metadata-wijzigingen aan geselecteerde bestanden ongedaan maken",
|
||||||
"delete": "",
|
"delete": "Verwijderen",
|
||||||
"deleteTooltip": "",
|
"deleteTooltip": "Geselecteerde Bookdrop-bestanden permanent verwijderen en wijzigingen negeren",
|
||||||
"finalize": "",
|
"finalize": "Afronden",
|
||||||
"finalizeTooltip": "",
|
"finalizeTooltip": "Geselecteerde bestanden verplaatsen naar de gekozen bibliotheek en subpad",
|
||||||
"toast": {
|
"toast": {
|
||||||
"noFilesSelectedSummary": "",
|
"noFilesSelectedSummary": "Geen bestanden geselecteerd",
|
||||||
"noFilesResetDetail": "",
|
"noFilesResetDetail": "Selecteer bestanden om metadata terug te zetten.",
|
||||||
"noFilesFinalizeDetail": "",
|
"noFilesFinalizeDetail": "Selecteer bestanden om af te ronden.",
|
||||||
"noFilesDeleteDetail": "",
|
"noFilesDeleteDetail": "Selecteer bestanden om te verwijderen.",
|
||||||
"noFilesBulkEditDetail": "",
|
"noFilesBulkEditDetail": "Selecteer bestanden om in bulk te bewerken.",
|
||||||
"noFilesExtractDetail": "",
|
"noFilesExtractDetail": "Selecteer bestanden om metadata uit te extraheren.",
|
||||||
"confirmResetMessage": "",
|
"confirmResetMessage": "Weet u zeker dat u alle metadata-wijzigingen aan de geselecteerde bestanden wilt terugzetten?",
|
||||||
"confirmResetHeader": "",
|
"confirmResetHeader": "Terugzetten bevestigen",
|
||||||
"confirmResetAccept": "",
|
"confirmResetAccept": "Terugzetten",
|
||||||
"confirmFinalizeMessage": "",
|
"confirmFinalizeMessage": "Weet u zeker dat u de import van {{ count }} bestand(en) wilt afronden?",
|
||||||
"confirmFinalizeHeader": "",
|
"confirmFinalizeHeader": "",
|
||||||
"confirmFinalizeAccept": "",
|
"confirmFinalizeAccept": "",
|
||||||
"confirmDeleteMessage": "",
|
"confirmDeleteMessage": "",
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
{
|
{
|
||||||
"save": "",
|
"save": "Opslaan",
|
||||||
"cancel": "",
|
"cancel": "Annuleren",
|
||||||
"delete": "",
|
"delete": "Verwijderen",
|
||||||
"close": "",
|
"close": "Sluiten",
|
||||||
"confirm": "",
|
"confirm": "Bevestigen",
|
||||||
"search": "",
|
"search": "Zoeken",
|
||||||
"loading": "",
|
"loading": "Laden...",
|
||||||
"error": "",
|
"error": "Fout",
|
||||||
"success": "",
|
"success": "Gelukt",
|
||||||
"yes": "",
|
"yes": "Ja",
|
||||||
"no": "",
|
"no": "Nee",
|
||||||
"ok": "",
|
"ok": "OK",
|
||||||
"retry": "",
|
"retry": "Opnieuw proberen",
|
||||||
"back": "",
|
"back": "Terug",
|
||||||
"next": "",
|
"next": "Volgende",
|
||||||
"submit": "",
|
"submit": "Verzenden",
|
||||||
"remove": "",
|
"remove": "Verwijderen",
|
||||||
"edit": "",
|
"edit": "Bewerken",
|
||||||
"info": "",
|
"info": "Info",
|
||||||
"select": "",
|
"select": "Selecteren",
|
||||||
"dismiss": "",
|
"dismiss": "Sluiten",
|
||||||
"discard": "",
|
"discard": "Verwerpen",
|
||||||
"review": ""
|
"review": "Beoordelen"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,66 +1,66 @@
|
|||||||
{
|
{
|
||||||
"main": {
|
"main": {
|
||||||
"pageTitle": "",
|
"pageTitle": "Dashboard",
|
||||||
"welcomeTitle": "",
|
"welcomeTitle": "Welkom bij BookLore!",
|
||||||
"welcomeSubtitle": "",
|
"welcomeSubtitle": "Laten we je eerste bibliotheek maken",
|
||||||
"welcomeDescription": "",
|
"welcomeDescription": "Een bibliotheek is waar je boeken leven. Start vandaag met je digitale collectie te bouwen!",
|
||||||
"createLibrary": "",
|
"createLibrary": "Maak jouw bibliotheek",
|
||||||
"customizeDashboard": ""
|
"customizeDashboard": "Dashboard aanpassen"
|
||||||
},
|
},
|
||||||
"scroller": {
|
"scroller": {
|
||||||
"noBooksFound": "",
|
"noBooksFound": "Geen boeken gevonden voor deze scroller.",
|
||||||
"loadError": "",
|
"loadError": "Boeken laden mislukt! Probeer de pagina te vernieuwen.",
|
||||||
"continueListening": "",
|
"continueListening": "Luister Verder",
|
||||||
"continueReading": "",
|
"continueReading": "Lees Verder",
|
||||||
"recentlyAdded": "",
|
"recentlyAdded": "Recent toegevoegd",
|
||||||
"discoverNew": "",
|
"discoverNew": "Ontdek Iets Nieuws",
|
||||||
"magicShelf": "",
|
"magicShelf": "Magische plank",
|
||||||
"default": ""
|
"default": "Scroller"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"title": "",
|
"title": "Dashboardconfiguratie",
|
||||||
"description": "",
|
"description": "Voeg maximaal 5 scrollers toe uit verschillende boekcollecties en pas hun gedrag aan",
|
||||||
"type": "",
|
"type": "Type",
|
||||||
"selectType": "",
|
"selectType": "Selecteer type",
|
||||||
"magicShelf": "",
|
"magicShelf": "",
|
||||||
"selectMagicShelf": "",
|
"selectMagicShelf": "",
|
||||||
"sortField": "",
|
"sortField": "Sorteerveld",
|
||||||
"selectField": "",
|
"selectField": "Selecteer veld",
|
||||||
"direction": "",
|
"direction": "Richting",
|
||||||
"selectDirection": "",
|
"selectDirection": "Selecteer richting",
|
||||||
"maxItems": "",
|
"maxItems": "Max. items",
|
||||||
"addScroller": "",
|
"addScroller": "Scroller toevoegen",
|
||||||
"resetToDefault": "",
|
"resetToDefault": "Naar standaard resetten",
|
||||||
"scrollerTypes": {
|
"scrollerTypes": {
|
||||||
"lastRead": "",
|
"lastRead": "Verder lezen",
|
||||||
"lastListened": "",
|
"lastListened": "Verder luisteren",
|
||||||
"latestAdded": "",
|
"latestAdded": "Recent toegevoegd",
|
||||||
"random": "",
|
"random": "Ontdek iets nieuws",
|
||||||
"magicShelf": "",
|
"magicShelf": "",
|
||||||
"default": ""
|
"default": "Scroller"
|
||||||
},
|
},
|
||||||
"sortFields": {
|
"sortFields": {
|
||||||
"title": "",
|
"title": "Titel",
|
||||||
"fileName": "",
|
"fileName": "Bestandsnaam",
|
||||||
"filePath": "",
|
"filePath": "Bestandspad",
|
||||||
"addedOn": "",
|
"addedOn": "Datum toegevoegd",
|
||||||
"author": "",
|
"author": "Auteur",
|
||||||
"authorSurnameVorname": "",
|
"authorSurnameVorname": "Auteur (Achternaam)",
|
||||||
"seriesName": "",
|
"seriesName": "Reeksnaam",
|
||||||
"seriesNumber": "",
|
"seriesNumber": "Reeksnummer",
|
||||||
"personalRating": "",
|
"personalRating": "Persoonlijke beoordeling",
|
||||||
"publisher": "",
|
"publisher": "Uitgever",
|
||||||
"publishedDate": "",
|
"publishedDate": "Publicatiedatum",
|
||||||
"lastReadTime": "",
|
"lastReadTime": "Laatst gelezen",
|
||||||
"readStatus": "",
|
"readStatus": "Leesstatus",
|
||||||
"dateFinished": "",
|
"dateFinished": "Datum voltooid",
|
||||||
"readingProgress": "",
|
"readingProgress": "Leesvoortgang",
|
||||||
"bookType": "",
|
"bookType": "Boektype",
|
||||||
"pageCount": ""
|
"pageCount": "Pagina's"
|
||||||
},
|
},
|
||||||
"sortDirections": {
|
"sortDirections": {
|
||||||
"asc": "",
|
"asc": "Oplopend",
|
||||||
"desc": ""
|
"desc": "Aflopend"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"topbar": {
|
"topbar": {
|
||||||
"bookdrop": "",
|
"bookdrop": "Bookdrop",
|
||||||
"createNewLibrary": "",
|
"createNewLibrary": "Nieuwe bibliotheek aanmaken",
|
||||||
"uploadBook": "",
|
"uploadBook": "",
|
||||||
"charts": "",
|
"charts": "",
|
||||||
"metadataManager": "",
|
"metadataManager": "",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"creator": {
|
"creator": {
|
||||||
"titleNew": "",
|
"titleNew": "Nieuwe bibliotheek",
|
||||||
"titleEdit": "",
|
"titleEdit": "Bibliotheek bewerken",
|
||||||
"subtitle": "",
|
"subtitle": "",
|
||||||
"libraryDetails": "",
|
"libraryDetails": "",
|
||||||
"nameLabel": "",
|
"nameLabel": "",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"center": {
|
"center": {
|
||||||
"title": "",
|
"title": "Boekdetails",
|
||||||
"description": "",
|
"description": "Boekmetadata bekijken en bewerken",
|
||||||
"tabView": "",
|
"tabView": "",
|
||||||
"tabEdit": "",
|
"tabEdit": "",
|
||||||
"tabSearch": "",
|
"tabSearch": "",
|
||||||
@@ -455,12 +455,12 @@
|
|||||||
"targetValuesLabel": "",
|
"targetValuesLabel": "",
|
||||||
"singleValuePlaceholder": "",
|
"singleValuePlaceholder": "",
|
||||||
"multiValuePlaceholder": "",
|
"multiValuePlaceholder": "",
|
||||||
"singleMergeHowItWorks": "",
|
"singleMergeHowItWorks": "<strong>Hoe het werkt:</strong><br/>• Voer de gestandaardiseerde waarde in waarnaar u alle geselecteerde items wilt samenvoegen<br/>• Alle boeken met een van de geselecteerde {{ type }} worden bijgewerkt naar deze enkele waarde<br/><br/><strong>Voorbeeld:</strong> Bij het samenvoegen van \"En\", \"English\", \"en-US\"<br/>• Voer \"English\" in → Alle boeken krijgen hun {{ singular }} samengevoegd tot \"English\"<br/><br/><strong>Opmerking:</strong> Elk boek kan slechts één {{ singular }} hebben, dus voer slechts één doelwaarde in.",
|
||||||
"multiMergeHowItWorks": "",
|
"multiMergeHowItWorks": "<strong>Hoe het werkt:</strong><br/>• Voer één waarde in om alle geselecteerde {{ type }} samen te voegen tot één<br/>• Voer meerdere waarden in, gescheiden door komma's, om te splitsen in meerdere {{ type }}<br/><br/><strong>Voorbeeld:</strong> Bij het samenvoegen/splitsen van \"Sci-Fi\", \"SciFi\", \"Science Fiction\"<br/>• Samenvoegen: Voer \"Science Fiction\" in → Alle boeken krijgen één gestandaardiseerde tag<br/>• Splitsen: Voer \"Science Fiction, Sci-Fi\" in → Alle boeken krijgen zowel de formele naam als de gangbare afkorting",
|
||||||
"processingNote": "",
|
"processingNote": "Dit proces kan langer duren als \"Schrijven naar bestand\" is ingeschakeld in de instellingen.",
|
||||||
"processing": "",
|
"processing": "Verwerken...",
|
||||||
"renameSplitDialogTitle": "",
|
"renameSplitDialogTitle": "{{ type }} hernoemen/splitsen",
|
||||||
"renameSplitDescription": "",
|
"renameSplitDescription": "U hernoemt/splitst:",
|
||||||
"newNamesLabel": "",
|
"newNamesLabel": "",
|
||||||
"singleRenamePlaceholder": "",
|
"singleRenamePlaceholder": "",
|
||||||
"multiRenamePlaceholder": "",
|
"multiRenamePlaceholder": "",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"dashboard": "",
|
"dashboard": "Dashboard",
|
||||||
"libraries": "",
|
"libraries": "Bibliotheken",
|
||||||
"settings": ""
|
"settings": "Instellingen"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"pageTitle": "",
|
"pageTitle": "Notitieboek",
|
||||||
"pageDescription": "",
|
"pageDescription": "Al je markeringen, notities en bladwijzers uit je hele bibliotheek op één plek.",
|
||||||
"searchPlaceholder": "",
|
"searchPlaceholder": "",
|
||||||
"filterAll": "",
|
"filterAll": "",
|
||||||
"filterHighlights": "",
|
"filterHighlights": "",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"loading": "",
|
"loading": "Luisterboek laden...",
|
||||||
"untitled": "",
|
"untitled": "",
|
||||||
"unknownAuthor": "",
|
"unknownAuthor": "",
|
||||||
"coverAlt": "",
|
"coverAlt": "",
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"reader": {
|
"reader": {
|
||||||
"continueToNextBook": "",
|
"continueToNextBook": "Doorgaan naar het volgende boek",
|
||||||
"noPagesAvailable": "",
|
"noPagesAvailable": "",
|
||||||
"loadingBook": "",
|
"loadingBook": "Boek laden...",
|
||||||
"slideshow": ""
|
"slideshow": ""
|
||||||
},
|
},
|
||||||
"noteDialog": {
|
"noteDialog": {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"reader": {
|
"reader": {
|
||||||
"loadingBook": ""
|
"loadingBook": "Boek laden..."
|
||||||
},
|
},
|
||||||
"metadataDialog": {
|
"metadataDialog": {
|
||||||
"title": "",
|
"title": "Boek informatie",
|
||||||
"basicInformation": "",
|
"basicInformation": "",
|
||||||
"titleLabel": "",
|
"titleLabel": "",
|
||||||
"subtitle": "",
|
"subtitle": "",
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"toolbar": {
|
"toolbar": {
|
||||||
"switchToLightMode": "",
|
"switchToLightMode": "Schakel over naar de lichte modus",
|
||||||
"switchToDarkMode": "",
|
"switchToDarkMode": "Schakel over naar de donkere modus",
|
||||||
"closePdfReader": ""
|
"closePdfReader": "PDF lezer sluiten"
|
||||||
},
|
},
|
||||||
"toast": {
|
"toast": {
|
||||||
"failedToLoadBook": ""
|
"failedToLoadBook": "Het laden van het boek is mislukt"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"pageTitle": "",
|
"pageTitle": "Reeksen",
|
||||||
"browseAllSeries": "",
|
"browseAllSeries": "",
|
||||||
"searchPlaceholder": "",
|
"searchPlaceholder": "",
|
||||||
"readNext": "",
|
"readNext": "",
|
||||||
|
|||||||
@@ -1,45 +1,45 @@
|
|||||||
{
|
{
|
||||||
"title": "",
|
"title": "Globale voorkeuren",
|
||||||
"description": "",
|
"description": "Configureer globale instellingen voor uw Booklore-instantie, waaronder omslagafbeeldingbeheer, zoekvoorkeuren en uploadlimieten.",
|
||||||
"covers": {
|
"covers": {
|
||||||
"sectionTitle": "",
|
"sectionTitle": "Boekomslagafbeelding",
|
||||||
"regenerate": "",
|
"regenerate": "Omslagen opnieuw genereren",
|
||||||
"regenerateBtn": "",
|
"regenerateBtn": "Opnieuw genereren",
|
||||||
"regenerateDesc": "",
|
"regenerateDesc": "",
|
||||||
"regenerateStarted": "",
|
"regenerateStarted": "Omslaggeneratie gestart",
|
||||||
"regenerateStartedDetail": "",
|
"regenerateStartedDetail": "Boekomslagen worden opnieuw gegenereerd.",
|
||||||
"regenerateError": "",
|
"regenerateError": "Kon omslaggeneratie niet starten.",
|
||||||
"verticalCropping": "",
|
"verticalCropping": "Verticaal omslagbijsnijden",
|
||||||
"verticalCroppingDesc": "",
|
"verticalCroppingDesc": "Snijdt automatisch extreem hoge afbeeldingen (zoals webcomics) vanaf de bovenkant bij om bruikbare omslagminiaturen te maken.",
|
||||||
"horizontalCropping": "",
|
"horizontalCropping": "Horizontaal omslagbijsnijden",
|
||||||
"horizontalCroppingDesc": "",
|
"horizontalCroppingDesc": "Snijdt automatisch extreem brede afbeeldingen vanaf links bij om bruikbare omslagminiaturen te maken.",
|
||||||
"aspectRatio": "",
|
"aspectRatio": "Beeldverhoudingsdrempel: {{value}}",
|
||||||
"aspectRatioDesc": "",
|
"aspectRatioDesc": "Afbeeldingen met een beeldverhouding boven deze drempel worden bijgesneden. Een waarde van 2,5 betekent dat afbeeldingen meer dan 2,5x hoger (of breder) dan normaal worden bijgesneden.",
|
||||||
"smartCropping": "",
|
"smartCropping": "Slim bijsnijden",
|
||||||
"smartCroppingDesc": ""
|
"smartCroppingDesc": "Sla uniforme kleurgebieden over bij het bepalen waar bijgesneden moet worden. Richt de omslagafbeelding op de meest relevante inhoud."
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"sectionTitle": "",
|
"sectionTitle": "Zoeken en aanbevelingen",
|
||||||
"autoBookSearch": "",
|
"autoBookSearch": "Automatisch boek zoeken",
|
||||||
"autoBookSearchDesc": "",
|
"autoBookSearchDesc": "Probeert automatisch metadata te matchen wanneer het boekinformatiepaneel wordt geopend.",
|
||||||
"similarBook": "",
|
"similarBook": "Vergelijkbare boekaanbeveling",
|
||||||
"similarBookDesc": ""
|
"similarBookDesc": "Schakelt vergelijkbare boekaanbevelingen in of uit op basis van uw bibliotheek."
|
||||||
},
|
},
|
||||||
"fileManagement": {
|
"fileManagement": {
|
||||||
"sectionTitle": "",
|
"sectionTitle": "Bestandsbeheer",
|
||||||
"maxUploadSize": "",
|
"maxUploadSize": "Max. uploadgrootte",
|
||||||
"maxUploadPlaceholder": "",
|
"maxUploadPlaceholder": "Max. grootte",
|
||||||
"maxUploadDesc": "",
|
"maxUploadDesc": "Bepaalt de maximaal toegestane grootte (in MB) per geüpload bestand. Van toepassing op alle ondersteunde bestandsformaten.",
|
||||||
"restartWarning": "",
|
"restartWarning": "Wijzigingen worden van kracht na het herstarten van de server",
|
||||||
"invalidInput": "",
|
"invalidInput": "Ongeldige invoer",
|
||||||
"invalidInputDetail": ""
|
"invalidInputDetail": "Voer een geldige maximale uploadgrootte in MB in."
|
||||||
},
|
},
|
||||||
"telemetry": {
|
"telemetry": {
|
||||||
"sectionTitle": "",
|
"sectionTitle": "Telemetrie",
|
||||||
"enableTelemetry": "",
|
"enableTelemetry": "Telemetrie inschakelen",
|
||||||
"telemetryDesc": ""
|
"telemetryDesc": "Help Booklore te verbeteren door anonieme gebruiksstatistieken te delen. Deze gegevens laten de ontwikkelaars zien welke functies het meest worden gebruikt, bugs identificeren en prestatieproblemen opsporen zodat ze weten waar ze aan moeten werken. Er worden nooit persoonlijke gegevens, boekinhoud of identificeerbare gegevens verzonden. Gegevens worden automatisch elke 24 uur naar de Booklore-server verzonden. Het is volledig veilig en zeer nuttig voor de ontwikkelaars."
|
||||||
},
|
},
|
||||||
"settingsSaved": "",
|
"settingsSaved": "Instellingen opgeslagen",
|
||||||
"settingsSavedDetail": "",
|
"settingsSavedDetail": "De instellingen zijn succesvol opgeslagen!",
|
||||||
"settingsError": ""
|
"settingsError": "Er is een fout opgetreden bij het opslaan van de instellingen."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"title": "",
|
"title": "",
|
||||||
"description": "",
|
"description": "Bekijk een overzicht van beheerdersrelevante acties die in het systeem zijn uitgevoerd.",
|
||||||
"sectionTitle": "",
|
"sectionTitle": "",
|
||||||
"filterPlaceholder": "",
|
"filterPlaceholder": "",
|
||||||
"userFilterPlaceholder": "",
|
"userFilterPlaceholder": "",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"title": "",
|
"title": "Authenticatie-instellingen",
|
||||||
"description": "",
|
"description": "Configureer authenticatiemethoden voor uw Booklore-instantie. Interne authenticatie is altijd ingeschakeld en u kunt optioneel OIDC inschakelen voor externe authenticatieproviders.",
|
||||||
"methods": {
|
"methods": {
|
||||||
"sectionTitle": "",
|
"sectionTitle": "Authenticatiemethoden",
|
||||||
"sectionDesc": ""
|
"sectionDesc": "Kies welke authenticatiemethoden beschikbaar zijn voor gebruikers om in te loggen."
|
||||||
},
|
},
|
||||||
"internal": {
|
"internal": {
|
||||||
"label": "",
|
"label": "",
|
||||||
@@ -51,14 +51,14 @@
|
|||||||
"selectLibraries": ""
|
"selectLibraries": ""
|
||||||
},
|
},
|
||||||
"perms": {
|
"perms": {
|
||||||
"uploadBooks": "",
|
"uploadBooks": "Boeken uploaden",
|
||||||
"downloadBooks": "",
|
"downloadBooks": "Boeken downloaden",
|
||||||
"editMetadata": "",
|
"editMetadata": "",
|
||||||
"manageLibrary": "",
|
"manageLibrary": "Bibliotheek beheren",
|
||||||
"emailBook": "",
|
"emailBook": "",
|
||||||
"deleteBook": "",
|
"deleteBook": "",
|
||||||
"koreaderSync": "",
|
"koreaderSync": "KOReader-synchronisatie",
|
||||||
"koboSync": "",
|
"koboSync": "Kobo-synchronisatie",
|
||||||
"accessOpds": ""
|
"accessOpds": ""
|
||||||
},
|
},
|
||||||
"toast": {
|
"toast": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"accessRestricted": "",
|
"accessRestricted": "Toegang beperkt",
|
||||||
"contactAdmin": "",
|
"contactAdmin": "Neem contact op met uw beheerder om toestemming aan te vragen.",
|
||||||
"copied": "",
|
"copied": "",
|
||||||
"copyFailed": "",
|
"copyFailed": "",
|
||||||
"copiedDetail": "",
|
"copiedDetail": "",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"title": "",
|
"title": "E-mailconfiguratie",
|
||||||
"description": "",
|
"description": "Configureer e-mailinstellingen om boeken rechtstreeks naar uw apparaten of ontvangers te verzenden. Stel e-mailproviders in (zoals Gmail, Outlook of aangepaste SMTP-servers) en beheer e-mailadressen van ontvangers.",
|
||||||
"accessRestricted": "",
|
"accessRestricted": "Toegang beperkt",
|
||||||
"accessDenied": "",
|
"accessDenied": "",
|
||||||
"contactAdmin": "",
|
"contactAdmin": "Neem contact op met uw beheerder om toestemming aan te vragen.",
|
||||||
"provider": {
|
"provider": {
|
||||||
"title": "",
|
"title": "",
|
||||||
"description": "",
|
"description": "",
|
||||||
|
|||||||
@@ -1,34 +1,34 @@
|
|||||||
{
|
{
|
||||||
"title": "",
|
"title": "Bibliotheek-metadataconfiguratie",
|
||||||
"description": "",
|
"description": "Configureer het ophaalgedrag van metadata voor uw bibliotheken. Stel globale standaardwaarden in en maak bibliotheekspecifieke overschrijvingen om te bepalen hoe boekmetadata van verschillende providers wordt opgehaald.",
|
||||||
"defaultSettings": {
|
"defaultSettings": {
|
||||||
"sectionTitle": "",
|
"sectionTitle": "Standaard metadata-instellingen",
|
||||||
"sectionDesc": "",
|
"sectionDesc": "Stel globale standaard providerprioriteiten in voor boekmetadatavelden. Deze instellingen gelden voor alle bibliotheken tenzij hieronder overschreven. BookLore probeert providers van links naar rechts (1e → 2e → 3e → 4e prioriteit) voor elk boekveld totdat er gegevens gevonden worden. Het systeem controleert eerst uw 1e prioriteitsprovider. Als die provider het specifieke veld niet heeft (zoals beschrijving of auteur), gaat het automatisch naar uw 2e prioriteit, dan 3e en uiteindelijk 4e. Laat een prioriteit leeg om deze volledig over te slaan. Als Amazon (1e) bijvoorbeeld geen beschrijving heeft maar Google Books (2e) wel, dan wordt de beschrijving van Google gebruikt. Gebruik de selectievakjes Inschakelen om het ophalen voor specifieke velden volledig uit te schakelen.",
|
||||||
"saveButton": "",
|
"saveButton": "Standaardinstellingen opslaan",
|
||||||
"saveSuccess": "",
|
"saveSuccess": "Standaard metadata-opties zijn succesvol opgeslagen.",
|
||||||
"saveFailed": "",
|
"saveFailed": "Opslaan mislukt",
|
||||||
"saveError": ""
|
"saveError": "Kon standaard metadata-opties niet opslaan. Probeer het opnieuw."
|
||||||
},
|
},
|
||||||
"libraryOverrides": {
|
"libraryOverrides": {
|
||||||
"sectionTitle": "",
|
"sectionTitle": "Bibliotheekspecifieke overschrijvingen",
|
||||||
"sectionDesc": "",
|
"sectionDesc": "Overschrijf de standaard prioriteitsinstellingen voor specifieke bibliotheken. U kunt bijvoorbeeld de voorkeur geven aan Amazon voor fictie maar Google Books voor technische boeken. Elke bibliotheek kan zijn eigen providerprioriteit hebben terwijl standaardwaarden worden gebruikt voor niet-gespecificeerde velden. U kunt ook specifieke metadatavelden per bibliotheek in- of uitschakelen.",
|
||||||
"customSettings": "",
|
"customSettings": "Aangepaste instellingen",
|
||||||
"defaultSettings": "",
|
"defaultSettings": "Standaardinstellingen",
|
||||||
"exportSidecar": "",
|
"exportSidecar": "Sidecar exporteren",
|
||||||
"importSidecar": "",
|
"importSidecar": "Sidecar importeren",
|
||||||
"exportTooltip": "",
|
"exportTooltip": ".metadata.json-bestanden genereren voor alle boeken in deze bibliotheek",
|
||||||
"importTooltip": "",
|
"importTooltip": "Metadata importeren uit bestaande .metadata.json-bestanden in deze bibliotheek",
|
||||||
"saveLibraryButton": "",
|
"saveLibraryButton": "{{name}}-instellingen opslaan",
|
||||||
"saveSuccess": "",
|
"saveSuccess": "Bibliotheek-metadata-opties zijn succesvol opgeslagen.",
|
||||||
"saveFailed": "",
|
"saveFailed": "Opslaan mislukt",
|
||||||
"saveError": "",
|
"saveError": "Kon bibliotheek-metadata-opties niet opslaan. Probeer het opnieuw.",
|
||||||
"exportSuccess": "",
|
"exportSuccess": "Sidecar-bestanden geëxporteerd voor {{count}} boeken.",
|
||||||
"exportComplete": "",
|
"exportComplete": "Export voltooid",
|
||||||
"exportFailed": "",
|
"exportFailed": "Export mislukt",
|
||||||
"exportError": "",
|
"exportError": "Kon sidecar-bestanden niet exporteren. Probeer het opnieuw.",
|
||||||
"importSuccess": "",
|
"importSuccess": "Metagegevens geïmporteerd uit {{count}} sidecar-bestanden.",
|
||||||
"importComplete": "",
|
"importComplete": "Import voltooid",
|
||||||
"importFailed": "",
|
"importFailed": "Import mislukt",
|
||||||
"importError": ""
|
"importError": "Kon niet importeren uit sidecar-bestanden. Probeer het opnieuw."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"title": "",
|
"title": "Metadata-instellingen",
|
||||||
"description": "",
|
"description": "Configureer hoe metadata wordt opgehaald, opgeslagen en gematcht voor uw boeken, inclusief providerinstellingen en veldvoorkeuren.",
|
||||||
"autoDownload": {
|
"autoDownload": {
|
||||||
"sectionTitle": "",
|
"sectionTitle": "",
|
||||||
"warning": "",
|
"warning": "",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"title": "",
|
"title": "Bestandsnaampatronen",
|
||||||
"description": "",
|
"description": "Configureer automatische bestandsorganisatie met metadata-plaatshouders. Patronen worden toegepast bij het uploaden, verplaatsen van bestanden of na metadata-updates.",
|
||||||
"warning": {
|
"warning": {
|
||||||
"title": "",
|
"title": "",
|
||||||
"text": ""
|
"text": ""
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"title": "",
|
"title": "OPDS-configuratie",
|
||||||
"description": "",
|
"description": "Beheer uw OPDS-inloggegevens en bepaal hoe uw boekcollectie wordt gedeeld met lees-apps. Standaard worden alle bibliotheken waartoe u toegang hebt opgenomen in de OPDS-feed.",
|
||||||
"server": {
|
"server": {
|
||||||
"sectionTitle": "",
|
"sectionTitle": "Serverinstellingen",
|
||||||
"sectionDesc": "",
|
"sectionDesc": "Schakel OPDS- en Komga API-services in of uit om de toegang tot uw boekcollectie te beheren.",
|
||||||
"opdsLabel": "",
|
"opdsLabel": "OPDS Server",
|
||||||
"opdsDesc": "",
|
"opdsDesc": "Schakel de OPDS-server in om uw boekcollectie te benaderen via OPDS-compatibele lees-apps zoals KOReader, Moon+ Reader, etc.",
|
||||||
"komgaLabel": "",
|
"komgaLabel": "Komga API",
|
||||||
"komgaDesc": "",
|
"komgaDesc": "Schakel de Komga-compatibele API in om Komga-clients (Tachiyomi, Komelia, etc.) te gebruiken met Booklore. Gebruikt dezelfde OPDS-gebruikersaccounts voor authenticatie.",
|
||||||
"groupUnknownLabel": "",
|
"groupUnknownLabel": "Onbekende reeksen groeperen",
|
||||||
"groupUnknownDesc": "",
|
"groupUnknownDesc": "",
|
||||||
"enabled": "",
|
"enabled": "",
|
||||||
"disabled": "",
|
"disabled": "",
|
||||||
@@ -35,8 +35,8 @@
|
|||||||
},
|
},
|
||||||
"createDialog": {
|
"createDialog": {
|
||||||
"title": "",
|
"title": "",
|
||||||
"username": "",
|
"username": "Gebruikersnaam",
|
||||||
"password": "",
|
"password": "Wachtwoord",
|
||||||
"sortOrder": "",
|
"sortOrder": "",
|
||||||
"enterUsername": "",
|
"enterUsername": "",
|
||||||
"enterPassword": "",
|
"enterPassword": "",
|
||||||
@@ -57,9 +57,9 @@
|
|||||||
},
|
},
|
||||||
"deleteConfirm": "",
|
"deleteConfirm": "",
|
||||||
"deleteHeader": "",
|
"deleteHeader": "",
|
||||||
"accessRestricted": "",
|
"accessRestricted": "Toegang beperkt",
|
||||||
"accessDenied": "",
|
"accessDenied": "",
|
||||||
"contactAdmin": "",
|
"contactAdmin": "Neem contact op met uw beheerder om toestemming aan te vragen.",
|
||||||
"loadError": "",
|
"loadError": "",
|
||||||
"createSuccess": "",
|
"createSuccess": "",
|
||||||
"createError": "",
|
"createError": "",
|
||||||
@@ -69,8 +69,8 @@
|
|||||||
"komgaCopied": "",
|
"komgaCopied": "",
|
||||||
"sortUpdateSuccess": "",
|
"sortUpdateSuccess": "",
|
||||||
"sortUpdateError": "",
|
"sortUpdateError": "",
|
||||||
"settingsSaved": "",
|
"settingsSaved": "Instellingen opgeslagen",
|
||||||
"settingsError": "",
|
"settingsError": "Er is een fout opgetreden bij het opslaan van de instellingen.",
|
||||||
"opdsEnabled": "",
|
"opdsEnabled": "",
|
||||||
"opdsDisabled": "",
|
"opdsDisabled": "",
|
||||||
"komgaEnabled": "",
|
"komgaEnabled": "",
|
||||||
|
|||||||
@@ -1,34 +1,34 @@
|
|||||||
{
|
{
|
||||||
"title": "",
|
"title": "Gebruikersprofiel",
|
||||||
"description": "",
|
"description": "Beheer uw accountgegevens en beveiligingsinstellingen",
|
||||||
"basicInfo": "",
|
"basicInfo": "Basisgegevens",
|
||||||
"username": "",
|
"username": "Gebruikersnaam",
|
||||||
"usernamePlaceholder": "",
|
"usernamePlaceholder": "Gebruikersnaam...",
|
||||||
"fullName": "",
|
"fullName": "Volledige naam",
|
||||||
"fullNamePlaceholder": "",
|
"fullNamePlaceholder": "Voer volledige naam in...",
|
||||||
"email": "",
|
"email": "E-mail",
|
||||||
"emailPlaceholder": "",
|
"emailPlaceholder": "Voer e-mail in...",
|
||||||
"editProfile": "",
|
"editProfile": "Profiel bewerken",
|
||||||
"saveChanges": "",
|
"saveChanges": "Wijzigingen opslaan",
|
||||||
"security": "",
|
"security": "Beveiligingsinstellingen",
|
||||||
"currentPassword": "",
|
"currentPassword": "Huidig wachtwoord",
|
||||||
"newPassword": "",
|
"newPassword": "Nieuw wachtwoord",
|
||||||
"confirmNewPassword": "",
|
"confirmNewPassword": "Nieuw wachtwoord bevestigen",
|
||||||
"changePassword": "",
|
"changePassword": "Wachtwoord wijzigen",
|
||||||
"loading": "",
|
"loading": "Gebruikersgegevens laden...",
|
||||||
"validation": {
|
"validation": {
|
||||||
"currentPasswordRequired": "",
|
"currentPasswordRequired": "Huidig wachtwoord is vereist.",
|
||||||
"newPasswordRequired": "",
|
"newPasswordRequired": "Nieuw wachtwoord is vereist.",
|
||||||
"passwordMinLength": "",
|
"passwordMinLength": "Wachtwoord moet minimaal 6 tekens bevatten.",
|
||||||
"confirmPasswordRequired": "",
|
"confirmPasswordRequired": "Bevestig uw nieuwe wachtwoord.",
|
||||||
"passwordMismatch": ""
|
"passwordMismatch": "Wachtwoorden komen niet overeen."
|
||||||
},
|
},
|
||||||
"toast": {
|
"toast": {
|
||||||
"errorNoUser": "",
|
"errorNoUser": "Gebruikersgegevens niet beschikbaar.",
|
||||||
"noChanges": "",
|
"noChanges": "Geen wijzigingen gedetecteerd.",
|
||||||
"profileUpdated": "",
|
"profileUpdated": "Profiel succesvol bijgewerkt",
|
||||||
"profileUpdateFailed": "",
|
"profileUpdateFailed": "Kon profiel niet bijwerken",
|
||||||
"passwordChanged": "",
|
"passwordChanged": "Wachtwoord succesvol gewijzigd",
|
||||||
"passwordChangeFailed": ""
|
"passwordChangeFailed": "Kon wachtwoord niet wijzigen"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"title": "",
|
"title": "Leesvoorkeuren",
|
||||||
"description": "",
|
"description": "Configureer leeservaring-instellingen voor uw bibliotheek. Stel standaardvoorkeuren in die als overschrijvingen dienen voor individuele boeken, of laat elk boek zijn eigen aangepaste instellingen behouden voor PDF-, EPUB-, FB2-, MOBI-, AZW3- en CBX-formaten.",
|
||||||
"appMode": {
|
"appMode": {
|
||||||
"title": "",
|
"title": "",
|
||||||
"description": "",
|
"description": "",
|
||||||
|
|||||||
@@ -1,69 +1,69 @@
|
|||||||
{
|
{
|
||||||
"title": "",
|
"title": "Systeem taakbeheer",
|
||||||
"description": "",
|
"description": "Beheer geautomatiseerde systeemtaken voor bibliotheeonderhoud, metadata-verversing en cache-opschoning. Plan terugkerende bewerkingen met behulp van <a href=\"https://spring.io/blog/2020/11/10/new-in-spring-5-3-improved-cron-expressions\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"cron-link\">Spring cron-expressies</a>.",
|
||||||
"systemTasks": {
|
"systemTasks": {
|
||||||
"sectionTitle": "",
|
"sectionTitle": "Systeemtaken",
|
||||||
"sectionDesc": ""
|
"sectionDesc": "Voer taken handmatig uit, bewaak de voortgang in realtime en configureer geplande automatisering."
|
||||||
},
|
},
|
||||||
"loading": "",
|
"loading": "Taken laden...",
|
||||||
"emptyTitle": "",
|
"emptyTitle": "Geen taken beschikbaar",
|
||||||
"status": {
|
"status": {
|
||||||
"running": "",
|
"running": "Actief",
|
||||||
"stale": "",
|
"stale": "Vastgelopen",
|
||||||
"neverRun": "",
|
"neverRun": "Nooit uitgevoerd",
|
||||||
"justNow": ""
|
"justNow": "Zojuist"
|
||||||
},
|
},
|
||||||
"cron": {
|
"cron": {
|
||||||
"noSchedule": "",
|
"noSchedule": "Geen planning",
|
||||||
"edit": "",
|
"edit": "Bewerken",
|
||||||
"placeholder": "",
|
"placeholder": "bijv. 0 2 * * *",
|
||||||
"validationPrefix": "",
|
"validationPrefix": "Cron-expressie moet precies 6 velden bevatten (seconden, minuten, uren, dag, maand, weekdag)",
|
||||||
"invalidField": "",
|
"invalidField": "Ongeldig {{name}}-veld: {{value}}",
|
||||||
"updateSuccess": "",
|
"updateSuccess": "Geplande taakconfiguratie is succesvol bijgewerkt.",
|
||||||
"updateError": ""
|
"updateError": "Kon geplande taakconfiguratie niet bijwerken."
|
||||||
},
|
},
|
||||||
"buttons": {
|
"buttons": {
|
||||||
"run": "",
|
"run": "Uitvoeren",
|
||||||
"rerun": ""
|
"rerun": "Opnieuw uitvoeren"
|
||||||
},
|
},
|
||||||
"metadataReplace": {
|
"metadataReplace": {
|
||||||
"label": "",
|
"label": "Metadata-vervangmodus:",
|
||||||
"selectMode": "",
|
"selectMode": "Selecteer modus",
|
||||||
"replaceMissing": "",
|
"replaceMissing": "Alleen ontbrekende metadata bijwerken (Aanbevolen)",
|
||||||
"replaceAll": "",
|
"replaceAll": "Alle metadata vervangen (Bestaande overschrijven)",
|
||||||
"replaceMissingDesc": "",
|
"replaceMissingDesc": "Werk alleen boeken bij die metadata missen. Bestaande metadata wordt behouden.",
|
||||||
"replaceAllDesc": ""
|
"replaceAllDesc": "Vervang alle metadata voor alle boeken, zelfs als ze al metadata hebben. Gebruik met voorzichtigheid, want dit overschrijft bestaande gegevens."
|
||||||
},
|
},
|
||||||
"progress": {
|
"progress": {
|
||||||
"staleWarning": "",
|
"staleWarning": "Deze taak lijkt vast te zitten. Geen updates ontvangen gedurende meer dan 5 minuten.",
|
||||||
"statusLabel": "",
|
"statusLabel": "Status:",
|
||||||
"progressLabel": "",
|
"progressLabel": "Voortgang:",
|
||||||
"startedLabel": "",
|
"startedLabel": "Gestart:",
|
||||||
"processing": "",
|
"processing": "Verwerken...",
|
||||||
"stuckMessage": ""
|
"stuckMessage": "Taak lijkt vast te zitten (geen updates ontvangen)"
|
||||||
},
|
},
|
||||||
"toast": {
|
"toast": {
|
||||||
"taskQueued": "",
|
"taskQueued": "Taak in wachtrij",
|
||||||
"taskQueuedDetail": "",
|
"taskQueuedDetail": "{{name}} is in de wachtrij geplaatst en wordt op de achtergrond uitgevoerd.",
|
||||||
"taskCompleted": "",
|
"taskCompleted": "Taak voltooid",
|
||||||
"taskCompletedDetail": "",
|
"taskCompletedDetail": "{{name}} is succesvol voltooid.",
|
||||||
"taskFailed": "",
|
"taskFailed": "Taak mislukt",
|
||||||
"taskFailedDetail": "",
|
"taskFailedDetail": "{{name}} kon niet worden voltooid.",
|
||||||
"taskStarted": "",
|
"taskStarted": "Taak gestart",
|
||||||
"taskStartedDetail": "",
|
"taskStartedDetail": "{{name}} is succesvol gestart.",
|
||||||
"startError": "",
|
"startError": "Kon {{name}} niet starten.",
|
||||||
"alreadyRunning": "",
|
"alreadyRunning": "Taak wordt al uitgevoerd",
|
||||||
"alreadyRunningDetail": "",
|
"alreadyRunningDetail": "Deze taak is al bezig of in behandeling.",
|
||||||
"taskCancelled": "",
|
"taskCancelled": "Taak geannuleerd",
|
||||||
"cancelledDetail": "",
|
"cancelledDetail": "Taak is succesvol geannuleerd.",
|
||||||
"cancelFailed": "",
|
"cancelFailed": "Annulering mislukt",
|
||||||
"cancelError": "",
|
"cancelError": "Kon de taak niet annuleren. De taak is mogelijk al voltooid of mislukt.",
|
||||||
"cancelNoId": "",
|
"cancelNoId": "Kan taak niet annuleren zonder ID.",
|
||||||
"loadError": "",
|
"loadError": "Kon taken niet laden",
|
||||||
"metadataScheduled": "",
|
"metadataScheduled": "Metadata-update ingepland",
|
||||||
"metadataScheduledDetail": "",
|
"metadataScheduledDetail": "De metadata-update voor de geselecteerde boeken is succesvol ingepland.",
|
||||||
"metadataAlreadyRunningDetail": "",
|
"metadataAlreadyRunningDetail": "Er wordt al een metadata-verversionstaak uitgevoerd. Wacht tot deze is voltooid voordat u een nieuwe start.",
|
||||||
"metadataFailed": "",
|
"metadataFailed": "Metadata-update mislukt",
|
||||||
"metadataFailedDetail": ""
|
"metadataFailedDetail": "Er is een onverwachte fout opgetreden bij het inplannen van de metadata-update. Probeer het later opnieuw of neem contact op met ondersteuning als het probleem aanhoudt."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user