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
+7 -1
View File
@@ -136,6 +136,12 @@ export class QBittorrentService {
* Add torrent (magnet link or file URL) - Enterprise Implementation
*/
async addTorrent(url: string, options?: AddTorrentOptions): Promise<string> {
// Validate URL parameter
if (!url || typeof url !== 'string' || url.trim() === '') {
console.error('[qBittorrent] Invalid download URL:', url);
throw new Error('Invalid download URL: URL is required and must be a non-empty string');
}
// Ensure we're authenticated
if (!this.cookie) {
await this.login();
@@ -242,7 +248,7 @@ export class QBittorrentService {
responseType: 'arraybuffer',
maxRedirects: 0,
validateStatus: (status) => status >= 200 && status < 300, // Only 2xx is success
timeout: 10000,
timeout: 30000, // 30 seconds - public indexers can be slow
});
console.log(`[qBittorrent] Got 2xx response, size=${torrentResponse.data.length} bytes`);