Improve torrent search and ranking algorithm

Enhanced the ranking algorithm to better distinguish complete title matches from partial matches, reducing series confusion. Updated the torrent search modal to allow users to customize the search title for new requests, improving search flexibility. Also refined request lookup to ignore deleted requests.
This commit is contained in:
kikootwo
2025-12-24 02:52:29 -05:00
parent f043688a71
commit 1374e66f13
4 changed files with 80 additions and 12 deletions
@@ -96,11 +96,12 @@ export async function POST(request: NextRequest) {
});
}
// Check if user already has an active request for this audiobook
// Check if user already has an active (non-deleted) request for this audiobook
const existingRequest = await prisma.request.findFirst({
where: {
userId: req.user.id,
audiobookId: audiobookRecord.id,
deletedAt: null, // Only check active requests
},
});