Commit Graph

114 Commits

Author SHA1 Message Date
CaliBrain
8ea2fee0bb Fixing the title and book details from AA (#289)
Should fix #288
v0.2.3 v0.2.4
2025-10-04 14:44:10 -04:00
John Cocula
1c24312eb0 Update book_manager.py to fix #286 (#287)
Implement the fix mentioned in
https://github.com/calibrain/calibre-web-automated-book-downloader/issues/286

Note however that I have 0% success with downloads with 0.2.2 even with
this change.
2025-10-02 19:26:29 -04:00
CaliBrain
98e3a2f114 Add all supported format as default (#283) v0.2.2 2025-09-16 11:22:19 -04:00
CaliBrain
cd16f09f2e Fix local download (#282) 2025-09-16 11:19:09 -04:00
CaliBrain
527c5d495d Fix formats in the HTML (read from config) (#279)
Fix #277
2025-09-09 08:15:44 -04:00
CaliBrain
f5de2ab143 Fix AA extension parsing (#275)
Fix #274
v0.2.1
2025-09-07 13:57:43 -04:00
RHDev
4e5c9b788f Display book covers at full height (#266)
# Why
Book covers in the UI are currently cut off on the top and bottom,
making it hard to see.

# How
doubled the height of the book cover image div so the covers are not cut
off. I found that setting it to a specific size (rather than `h-full`)
resulted in better handling of small images and made for a more
consistent look.

# Before
<img width="488" height="520" alt="Screenshot from 2025-09-02 11-44-49"
src="https://github.com/user-attachments/assets/cf94e5f7-3981-40b6-a148-2a847f565c41"
/>
<img width="488" height="520" alt="Screenshot from 2025-09-02 11-45-06"
src="https://github.com/user-attachments/assets/5849eb34-57e8-4c36-af26-cb2f9647605f"
/>



# After
<img width="488" height="520" alt="Screenshot from 2025-09-02 11-41-41"
src="https://github.com/user-attachments/assets/6ffdde1f-ba36-4253-8092-12afe1c8f84e"
/>
<img width="488" height="520" alt="Screenshot from 2025-09-02 11-44-38"
src="https://github.com/user-attachments/assets/e44b57b7-ee03-4e8b-a186-444e8a5bf5aa"
/>

---------

Co-authored-by: Ryan Hults <contact@ryanthults.com>
2025-09-02 13:13:10 -04:00
CaliBrain
199d8453eb Adding Release version (#263) 2025-08-30 03:10:15 -04:00
BMillerCodes
a9854b1a5c UI Overhaul - Tailwind CSS (#259)
New Homepage
<img width="2559" height="1388" alt="image"
src="https://github.com/user-attachments/assets/787668c6-61a9-4a2d-9878-9daaee8ae114"
/>
New Card Layout:
<img width="2547" height="1250" alt="image"
src="https://github.com/user-attachments/assets/44d015f9-c29d-4cac-a8b4-1c4ff7d40009"
/>
Light-Mode:
<img width="2547" height="1253" alt="image"
src="https://github.com/user-attachments/assets/7f81f6d7-ec69-4680-8ddc-4737601d00bb"
/>
New Download Queue and Status:
<img width="1260" height="146" alt="image"
src="https://github.com/user-attachments/assets/4acbb5a3-e985-4b23-8527-392e21151fa4"
/>

Haven't contributed to open-source before, but figured I could try and
help out on the UI side of the house. Appreciate everything you've done
this far!

Wanted to get something that was a tad bit more mobile-friendly.

Open to any feedback/comments/questions/concerns. :)

---------

Co-authored-by: BMillerCodes <BMillerCodes@users.noreply.github.com>
v0.2.0
2025-08-29 22:48:25 -04:00
CaliBrain
e4d3a372c8 Add retry logic for failed file copy (#261) 2025-08-29 22:32:04 -04:00
CaliBrain
ff44881415 Pyautogui bug fix (#260) 2025-08-29 21:14:06 -04:00
CaliBrain
9ffedc1fc0 Several Bug fixes (#256)
Emoji check fix Fix multi language books
Fix DNS in Chromium Headless
Fix DNS IPv6 address by un-abreviating them
Fix typo in Quad9 DNS
2025-08-29 12:47:05 -04:00
CaliBrain
00370818f0 Fix eager cloudflare check (#247) 2025-08-28 17:42:50 -04:00
CaliBrain
7d9a82bfea Add default flaresolverr values (#253) 2025-08-28 17:41:15 -04:00
Federico Della Rovere
207cff96d3 External CloudFlare resolver (#245)
Adding support for an external CloudFlare bypasser service and
introducing a new Docker image build with a dedicated target.

Key Changes
- Added `cloudflare_bypasser_external.py` for external bypasser
integration.
- Updated Docker Compose files to support the new service.
- Introduced a new Docker target for building a separate image for the
external bypasser.
- Refactored relevant modules to utilize the external bypasser when
configured.
- Documentation and configuration updates to reflect new options and
Docker targets.

Impact
- Users can now choose between internal and external CloudFlare
bypassing.
- New Docker image and target streamline deployment of the external
bypasser.
- Improved modularity and maintainability.
- No breaking changes for existing workflows.

Testing
- Manual and E2E tests performed for both bypasser modes.
- Docker Compose setups and new image build verified for development and
production.

Notes
Please review the new configuration options and Docker targets. Update
your environment and deployment scripts as needed. Feedback and
suggestions are welcome!
2025-08-28 17:37:59 -04:00
CaliBrain
c8f21b8f8d Fix progression in download (#248) v0.1.8 2025-08-25 23:59:05 -04:00
Stephon Parker
5e04b6bfb8 Add Download Queue Management & Concurrent Downloads (#231)
## Summary

This PR completely overhauls the download system to support concurrent
downloads, cancellation, and advanced queue
management. No more waiting for stuck downloads to block the entire
queue!

  ## New Features

  ###  **Concurrent Downloads**
  - **3 simultaneous downloads** by default (configurable)
- ThreadPoolExecutor-based architecture replaces single-threaded
bottleneck
  - Downloads no longer block each other

  ###  **Download Cancellation**
  - **Cancel button** for active/queued downloads
  - Clean cancellation with partial file cleanup
  - Thread-safe cancellation flags

  ### **Queue Priority & Reordering**
  - **Priority-based queue** (lower number = higher priority)
  - **Editable priority inputs** in UI for queued items
  - **Bulk reordering** API support

  ## UI Enhancements

- **Enhanced status table** with Priority, Progress, and Actions columns
  - **Progress bars** for active downloads
  - **Cancel buttons** for downloads
- **Queue management controls**: Refresh, Clear Completed, Active
Counter
  - **Real-time updates** every 60 seconds

## Implementation

  ### New Architecture
  - `queue.PriorityQueue` replaces simple `set()` for proper ordering
  - `concurrent.futures.ThreadPoolExecutor` handles worker threads
  - `threading.Event` flags enable clean cancellation
  - Thread-safe operations with proper locking

  ### New API Endpoints
  DELETE /api/download/{id}/cancel     # Cancel downloads
PUT /api/queue/{id}/priority # Set priorityPOST /api/queue/reorder #
Bulk reorder
  GET /api/downloads/active          # Active tracking
  DELETE /api/queue/clear            # Clear completed

  ### New Environment Variables
  ```bash
  MAX_CONCURRENT_DOWNLOADS=3          # Worker thread count
  DOWNLOAD_PROGRESS_UPDATE_INTERVAL=5  # Progress frequency
  ```

### Fully backward compatible - existing functionality unchanged

### Fixes

  - Resolves: Downloads blocking when one gets stuck
  - Resolves: No way to cancel problematic downloads
  - Resolves: No queue management or prioritization
  
  #183

---------

Co-authored-by: CaliBrain <calibrain@l4n.xyz>
v0.1.7
2025-08-25 13:28:35 -04:00
CaliBrain
09bd5ae9f0 Bug fixes for Login and WELIB (#242)
Fix login (when using latest CWA in dev)
Add PRIORITIZE_WELIB option
libgen seems to be back, revert the url rewrite

Should fix #242 and #226
v0.1.6
2025-08-22 18:21:55 -04:00
CaliBrain
5f6a81d97d Update requirements.txt (#239)
#229
v0.1.5
2025-08-20 20:55:30 -04:00
CaliBrain
cf3d4d9352 Use matrix build for main and tor github action (#237) v0.1.4 2025-08-20 09:03:42 -04:00
CaliBrain
b1673904c5 fix build latest (#236)
- Fix branch tagging and use :dev for main and :latest for tagged
release
- Fix latest tag check for release
2025-08-20 08:50:51 -04:00
CaliBrain
a336caf281 Fix branch tagging and use :dev for main and :latest for tagged release (#235) v0.1.3 2025-08-20 08:41:05 -04:00
CaliBrain
6c2471966e fix seleniumbase (#230)
- Fix typo
v0.1.2
2025-08-19 12:43:47 -04:00
CaliBrain
3ae129119d Fix Seleniumbase (#229) 2025-08-19 12:41:27 -04:00
Borderpatrol1987
8a13a503b2 Update docker-compose.yml (#228)
Added container name to compose.yml
2025-08-19 12:15:32 -04:00
CaliBrain
3b76b23c42 Add partial support for welib. Now while the search still uses AA, we use welib as a fallback for download links: welib is less strict on cloudflare checks (#225) 2025-08-19 00:55:30 -04:00
CaliBrain
a3292d3f1c Fix AA detail page after they changed layout (#223)
Fix #222 and #221
v0.1.1
2025-08-18 13:34:05 -04:00
na
bdc36af9a9 Add semantic versioning for the docker images (#215)
For every push of a tag, create an image with the same tag.
This was also mentioned in [Semantic versioning for the docker container
#68

](https://github.com/calibrain/calibre-web-automated-book-downloader/issues/68)

---------

Co-authored-by: CaliBrain <calibrain@l4n.xyz>
v0.1.0
2025-08-18 11:49:10 -04:00
CaliBrain
5cf070a22d Fix book parsing from AA (#220) 2025-08-15 18:55:52 -04:00
CaliBrain
86c642d874 Restart Button when on DEBUG mode (#211)
Feature for #210
2025-08-06 17:17:32 -04:00
CaliBrain
340aa3aeee Fix slow download ordering logic (#208) 2025-07-30 10:58:53 -04:00
CaliBrain
20e14a970f Force libgen bz proxy (#207) 2025-07-30 10:34:02 -04:00
CaliBrain
6e50fb9249 Remove '--disable-web-security' which trips CF checks (#206) 2025-07-30 09:44:06 -04:00
CCarpo
f9ddc2ffc2 use the FLASK_HOST variable as declared in the documentation (#205)
I noticed that the FLASK_HOST was not used as stated in the
documentation. I need it so that FLASK is listening on my IPv6 address.
2025-07-30 08:29:25 -04:00
CaliBrain
e1d94f9cb5 Update download handling and URL selection logic (#203)
Changed intermediate download file naming in backend.py to use
.crdownload extension. Refactored URL selection logic in book_manager.py
to adjust order and inclusion based on Cloudflare bypass and donator
key. Added extra Chromium arguments in cloudflare_bypasser.py to ignore
certificate and SSL errors for improved bypass reliability.
2025-07-14 16:05:09 -04:00
smoke007
8c8cf4a4af Updated readme.md - Added details to fix "database locked" error for anyone using a cifs share for their library (#197)
Added details to fix "database locked" error for anyone using a cifs
share for their library under volumes. nobrl option needs to be added to
the mount line in your fstab file. e.g. //192.168.1.1/Books /media/books
cifs credentials=.smbcredentials,uid=1000,gid=1000,iocharset=utf8,nobrl
2025-07-14 15:31:47 -04:00
Martijn Ruijzendaal
f9fb6c13b5 Add option to select formats (#193)
In response to #184, and for my own desperate need for PDFs, I
implemented this change.

The UI needs some tweaking, the functionality looks complete.

Before this pull request is merged, I'm modifying my docker compose as
follows to use the version that includes format options:

```diff
services:
  calibre-web-automated-book-downloader:
-    image: ghcr.io/calibrain/calibre-web-automated-book-downloader:latest
+    build:
+      context: https://github.com/mruijzendaal/calibre-web-automated-book-downloader.git
```

@calibrain Could you adjust the UI such that this fits better with the
rest of the application? I'm not well-versed with UIKit. Thanks in
advance for considering this pull request!
2025-07-14 15:31:18 -04:00
jojo141185
d90db433c4 Fix: Correct healthcheck behavior (#189)
### Problem
The current `HEALTHCHECK` uses a custom script that fails on any non-2xx
HTTP response. When the API returns a `401 Unauthorized` status (a
common and valid case), the container is incorrectly marked as
`unhealthy`, even though the web server is running perfectly.

### Solution
This PR replaces the custom `pyrequests` script with a standard `curl`
command. The new `HEALTHCHECK` now only verifies that the server is
reachable and responding to connections, regardless of the HTTP status
code.

`curl` is used instead of patching the existing script because it is the
standard, most robust, and simplest solution for this type of check in a
Docker environment. It removes a custom dependency and follows a
well-understood pattern.

This change ensures the container's health status accurately reflects
the state of the server process, improving reliability for orchestration
platforms.
2025-07-14 15:29:29 -04:00
Timothy Allen
086401083e Add simple authentication (#181)
This commit adds user authentication, using Calibre-Web's app.db as its
authentication source, as requested in #56. It uses @prinzpi's
[comment](https://github.com/calibrain/calibre-web-automated-book-downloader/issues/56#issuecomment-2919335169)
as a starting point, but integrates the logic directly into the app.

This requires the user to specify the environment variable CONFIG_ROOT,
set to Calibre-Web's config directory (the directory that contains the
app.db database that holds the user's authentication information).

If the user does not wish to add authentication, they can simply leave
CONFIG_ROOT unset, or not pointing at Calibre-Web's app.db directory.
2025-06-15 00:55:25 -04:00
CaliBrain
64733da704 Disable accordion insanely slow animation (#186)
Fix #185
2025-06-09 02:20:56 -04:00
CaliBrain
690c2b699c Fix download for other files than epub (#174)
Fix #173
2025-05-06 08:44:43 -04:00
CaliBrain
3d2d285da4 Fix typo in book-downloader logs (#172) 2025-05-01 02:12:25 -04:00
CaliBrain
600605f9c4 Fix is_writable check (#170) 2025-04-28 15:34:15 -04:00
CaliBrain
5c9962f17b Do not fail on folder permission error (#169) 2025-04-28 14:28:50 -04:00
CaliBrain
c6ccff8c1c Add Permissions debug (#168) 2025-04-28 14:22:47 -04:00
CaliBrain
457351fa0b Better File check (#165)
- Better file permission initialization
- Fix chown bug
2025-04-27 13:49:07 -04:00
CaliBrain
49287ac86e Revert "Better file permission initialization" (#164)
Reverts calibrain/calibre-web-automated-book-downloader#162
2025-04-27 12:43:07 -04:00
CaliBrain
4ca8298b7e Better file permission initialization (#162) 2025-04-27 01:27:48 -04:00
CaliBrain
1d2d06a6d3 Add ISSUE template (#159) 2025-04-22 14:46:20 -07:00
CaliBrain
b6931bb774 Add more debug tools (#158) 2025-04-22 14:39:43 -07:00