apps/readest-app/extensions/windows-thumbnail/README.md
This crate provides Windows Explorer thumbnail support for eBook files when Readest is set as the default application.
IThumbnailProvider| Format | Extension | Cover Source |
|---|---|---|
| EPUB | .epub | OPF manifest cover reference |
| MOBI/AZW | .mobi, .azw, .prc | EXTH cover offset |
| AZW3/KF8 | .azw3, .kf8 | KF8 format cover |
| FB2 | .fb2 | <binary> coverpage element |
| Comic Book | .cbz, .cbr | First image in archive |
| Plain Text | .txt | Generated placeholder |
cargo build --release
cargo build --release --features com
cargo build --release --features cli
The thumbnail provider DLL is automatically registered when Readest is installed via the NSIS installer.
# Register the DLL
regsvr32 /s target\release\windows_thumbnail.dll
# Unregister the DLL
regsvr32 /s /u target\release\windows_thumbnail.dll
# Refresh Explorer to see changes
ie4uinit.exe -show
After registration, you may need to restart Windows Explorer or log out/in for changes to take effect.
For local development and testing, build the Windows DLL (or the library) from the Readest Tauri app folder and register it manually. The legacy CLI test harness used to live in the separate packages/tauri workspace, but the thumbnail handler implementation now lives inside Readest's Tauri app.
Build the DLL (for Windows explorer integration):
cd apps/readest-app/src-tauri
cargo build --release --manifest-path Cargo.toml --features com
The standalone CLI test harness is no longer distributed with the app. To test the thumbnail provider locally, build and register the DLL as shown above and use a small test harness that imports readestlib's thumbnail code or use Explorer after registering the handler.
Manual registration for development (register the generated DLL):
# Register the DLL
regsvr32 /s target\release\windows_thumbnail.dll
# Unregister the DLL
regsvr32 /s /u target\release\windows_thumbnail.dll
# Refresh Explorer to see changes
ie4uinit.exe -show
This generates a thumbnail with the Readest overlay at the specified size.
┌─────────────────────────────────────────────────────────────────┐
│ Windows Explorer │
├─────────────────────────────────────────────────────────────────┤
│ │ │
│ IThumbnailProvider ───┼──► ThumbnailProvider │
│ │ │ │
│ │ ▼ │
│ │ Check File Association │
│ │ (is Readest the default?) │
│ │ │ │
│ │ ▼ (if yes) │
│ │ Extract Cover Image │
│ │ │ │
│ │ ▼ │
│ │ Add Readest Overlay │
│ │ │ │
│ │ ▼ │
│ │ Return HBITMAP │
│ │ │
└─────────────────────────────────────────────────────────────────┘
{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}{e357fccd-a995-4576-b01f-234630154e96}IInitializeWithItem to receive the file pathAssocQueryStringWS_FALSE to let Windows use other handlersThis ensures thumbnails only appear for files the user has associated with Readest.
MIT License - See LICENSE file for details.