Add e-book sidecar integration and improve request handling

Introduces optional e-book sidecar downloads from Anna's Archive, including admin UI, settings API, FlareSolverr integration, and documentation. Enhances request creation logic to prevent duplicate downloads by checking for 'downloaded' and 'available' statuses, updates UI to reflect processing state, and adds SABnzbd support to download and cleanup flows. Also updates ranking algorithm documentation and improves cache invalidation for recent requests.
This commit is contained in:
kikootwo
2026-01-07 17:19:42 -05:00
parent 24ea53bd2f
commit 95c25ff73a
26 changed files with 1968 additions and 116 deletions
+21 -5
View File
@@ -110,6 +110,17 @@ export function AudiobookCard({
<span>Available</span>
</div>
)}
{/* Processing Badge - show when status is 'downloaded' */}
{audiobook.requestStatus === 'downloaded' && (
<div className="absolute top-2 right-2 bg-orange-500 text-white text-xs font-semibold px-2 py-1 rounded-md shadow-lg flex items-center gap-1">
<svg className="w-3 h-3 animate-spin" fill="none" viewBox="0 0 24 24">
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4"></circle>
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
<span>Processing</span>
</div>
)}
</div>
{/* Content */}
@@ -162,12 +173,17 @@ export function AudiobookCard({
}
// Check if book is requested and in progress (non-re-requestable statuses)
const inProgressStatuses = ['pending', 'awaiting_search', 'searching', 'downloading', 'processing', 'awaiting_import'];
const inProgressStatuses = ['pending', 'awaiting_search', 'searching', 'downloading', 'processing', 'downloaded', 'awaiting_import'];
if (audiobook.isRequested && audiobook.requestStatus && inProgressStatuses.includes(audiobook.requestStatus)) {
// Show who requested it
const buttonText = audiobook.requestedByUsername
? `Requested by ${audiobook.requestedByUsername}`
: 'Requested';
// Special text for 'downloaded' status (waiting for Plex scan)
let buttonText;
if (audiobook.requestStatus === 'downloaded') {
buttonText = 'Processing...';
} else {
buttonText = audiobook.requestedByUsername
? `Requested by ${audiobook.requestedByUsername}`
: 'Requested';
}
return (
<Button
@@ -364,6 +364,7 @@ export function AudiobookDetailsModal({
'searching',
'downloading',
'processing',
'downloaded',
'awaiting_import',
];
if (
@@ -371,10 +372,15 @@ export function AudiobookDetailsModal({
requestStatus &&
inProgressStatuses.includes(requestStatus)
) {
// Show who requested it
const buttonText = requestedByUsername
? `Requested by ${requestedByUsername}`
: 'Already Requested';
// Special text for 'downloaded' status (waiting for Plex scan)
let buttonText;
if (requestStatus === 'downloaded') {
buttonText = 'Processing...';
} else {
buttonText = requestedByUsername
? `Requested by ${requestedByUsername}`
: 'Already Requested';
}
return (
<div className="flex-1">