mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-20 02:39:38 +00:00
Update absId to id
This commit is contained in:
parent
d5cd4f7944
commit
94e13014ed
4 changed files with 6 additions and 6 deletions
|
|
@ -574,7 +574,7 @@ class LibraryItem extends Model {
|
|||
let jsonObject = {}
|
||||
if (this.mediaType === 'book') {
|
||||
jsonObject = {
|
||||
absId: this.id,
|
||||
id: this.id,
|
||||
tags: mediaExpanded.tags || [],
|
||||
chapters: mediaExpanded.chapters?.map((c) => ({ ...c })) || [],
|
||||
title: mediaExpanded.title,
|
||||
|
|
@ -599,7 +599,7 @@ class LibraryItem extends Model {
|
|||
}
|
||||
} else {
|
||||
jsonObject = {
|
||||
absId: this.id,
|
||||
id: this.id,
|
||||
tags: mediaExpanded.tags || [],
|
||||
title: mediaExpanded.title,
|
||||
author: mediaExpanded.author,
|
||||
|
|
|
|||
|
|
@ -821,7 +821,7 @@ class BookScanner {
|
|||
const metadataFilePath = Path.join(metadataPath, `metadata.${global.ServerSettings.metadataFileFormat}`)
|
||||
|
||||
const jsonObject = {
|
||||
absId: libraryItem.id,
|
||||
id: libraryItem.id,
|
||||
tags: libraryItem.media.tags || [],
|
||||
chapters: libraryItem.media.chapters?.map((c) => ({ ...c })) || [],
|
||||
title: libraryItem.media.title,
|
||||
|
|
|
|||
|
|
@ -717,10 +717,10 @@ async function findLibraryItemByItemToMetadata(fullPath, isSingleMedia) {
|
|||
if (!metadataText) return null
|
||||
const abMetadata = abmetadataGenerator.parseJson(metadataText) || {}
|
||||
// check if metadata id exists in the database
|
||||
const existingLibraryItem = await Database.libraryItemModel.getExpandedById(abMetadata.absId)
|
||||
const existingLibraryItem = await Database.libraryItemModel.getExpandedById(abMetadata.id)
|
||||
|
||||
if (existingLibraryItem) {
|
||||
Logger.debug(`[LibraryScanner] Found library item with metadata id matching one of "${abMetadata.absId}" at path "${existingLibraryItem.path}"`)
|
||||
Logger.debug(`[LibraryScanner] Found library item with metadata id matching one of "${abMetadata.id}" at path "${existingLibraryItem.path}"`)
|
||||
|
||||
for (const { metadata } of existingLibraryItem.getLibraryFiles())
|
||||
if (await fs.pathExists(metadata.path)) {
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@ class PodcastScanner {
|
|||
const metadataFilePath = Path.join(metadataPath, `metadata.${global.ServerSettings.metadataFileFormat}`)
|
||||
|
||||
const jsonObject = {
|
||||
absId: libraryItem.id,
|
||||
id: libraryItem.id,
|
||||
tags: libraryItem.media.tags || [],
|
||||
title: libraryItem.media.title,
|
||||
author: libraryItem.media.author,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue