mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-03 12:50:09 +00:00
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:
@@ -105,6 +105,13 @@ export function useCreateRequest() {
|
||||
const data = await response.json();
|
||||
|
||||
if (!response.ok) {
|
||||
// Handle specific error types with custom messages
|
||||
if (data.error === 'BeingProcessed') {
|
||||
throw new Error('This audiobook is being processed. It will be available in your library soon.');
|
||||
}
|
||||
if (data.error === 'AlreadyAvailable') {
|
||||
throw new Error('This audiobook is already in your Plex library.');
|
||||
}
|
||||
throw new Error(data.message || 'Failed to create request');
|
||||
}
|
||||
|
||||
@@ -362,6 +369,13 @@ export function useRequestWithTorrent() {
|
||||
const data = await response.json();
|
||||
|
||||
if (!response.ok) {
|
||||
// Handle specific error types with custom messages
|
||||
if (data.error === 'BeingProcessed') {
|
||||
throw new Error('This audiobook is being processed. It will be available in your library soon.');
|
||||
}
|
||||
if (data.error === 'AlreadyAvailable') {
|
||||
throw new Error('This audiobook is already in your Plex library.');
|
||||
}
|
||||
throw new Error(data.message || 'Failed to create request and download torrent');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user