Add ASIN/ISBN fields to library and improve matching

Introduces `asin` and `isbn` fields to the PlexLibrary schema and database, with migration and indexing for fast lookups. Updates scan and recently-added processors to persist ASIN/ISBN from both Plex and Audiobookshelf backends. Enhances matching logic to prioritize exact ASIN matches using the new fields, improving match accuracy for Audiobookshelf users. Also includes minor improvements: fixes cover art handling for cached thumbnails, adds download URL validation in Prowlarr and qBittorrent integrations, and updates documentation to reflect these changes.
This commit is contained in:
kikootwo
2025-12-22 14:20:22 -05:00
parent a3381cba31
commit 1cefa437b7
12 changed files with 469 additions and 16 deletions
@@ -103,6 +103,8 @@ export async function processPlexRecentlyAddedCheck(payload: PlexRecentlyAddedPa
summary: item.description,
duration: item.duration ? item.duration * 1000 : null, // Convert seconds to milliseconds
year: item.year,
asin: item.asin, // Store ASIN from library backend
isbn: item.isbn, // Store ISBN from library backend
thumbUrl: item.coverUrl,
plexLibraryId: libraryId!,
addedAt: item.addedAt,
@@ -121,6 +123,8 @@ export async function processPlexRecentlyAddedCheck(payload: PlexRecentlyAddedPa
summary: item.description || existing.summary,
duration: item.duration ? item.duration * 1000 : existing.duration,
year: item.year || existing.year,
asin: item.asin || existing.asin, // Update ASIN if available
isbn: item.isbn || existing.isbn, // Update ISBN if available
thumbUrl: item.coverUrl || existing.thumbUrl,
lastScannedAt: new Date(),
},