mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 21:00:09 +00:00
Implement file hash-based library matching and remove fuzzy ASIN matching
Adds file hash-based matching for Audiobookshelf library items to ensure 100% accurate ASIN assignment for RMAB-organized content. Removes fuzzy matching from library availability checks, making all matching ASIN-only to eliminate false positives and race conditions. Updates database schema, processors, and matcher utilities; adds new tests and documentation for the new matching strategy. Removes obsolete scripts, Dockerfile, and related tests; updates docker-compose for test environments.
This commit is contained in:
@@ -113,7 +113,7 @@ export class LocalAuthProvider implements IAuthProvider {
|
||||
id: user.id,
|
||||
plexId: user.plexId,
|
||||
username: user.plexUsername,
|
||||
isAdmin: user.role === 'admin',
|
||||
role: user.role,
|
||||
});
|
||||
|
||||
logger.info('Tokens generated, returning user data');
|
||||
@@ -214,7 +214,7 @@ export class LocalAuthProvider implements IAuthProvider {
|
||||
id: user.id,
|
||||
plexId: user.plexId,
|
||||
username: user.plexUsername,
|
||||
isAdmin: user.role === 'admin',
|
||||
role: user.role,
|
||||
});
|
||||
|
||||
return {
|
||||
@@ -245,7 +245,7 @@ export class LocalAuthProvider implements IAuthProvider {
|
||||
sub: userInfo.id,
|
||||
plexId: userInfo.plexId,
|
||||
username: userInfo.username,
|
||||
role: userInfo.isAdmin ? 'admin' : 'user',
|
||||
role: userInfo.role || 'user',
|
||||
};
|
||||
|
||||
logger.debug('JWT token payload', { tokenPayload });
|
||||
|
||||
Reference in New Issue
Block a user