Skip to content

feat: add book support - #1918

Closed
jabloink wants to merge 21 commits into
seerr-team:developfrom
jabloink:feat-readarr
Closed

jabloink wants to merge 21 commits into
seerr-team:developfrom
jabloink:feat-readarr

Conversation

@jabloink

@jabloink jabloink commented Sep 24, 2025 •

Copy link
Copy Markdown
Contributor

Description

Adds book support to jellyseerr

This PR is mainly for feedback, made some substantial db changes and would love input on what would be preferred if this were to get merged.

AI Disclosure: 90% of the code in this PR was written by me, claude code was used for some refactoring and was used to ask questions about the codebase. Claude code also authored the commits and helped me understand some git commands ( happy to redo those if needed )

Screenshot (if UI-related)

image image image image

To-Dos

  • Disclosed any use of AI (see our policy)
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

Issues Fixed or Closed

Comment on lines +152 to +154
const response = await this.axios.get<ReadarrBook[]>('/book/lookup', {
params: { term: `work:${newBookId}` },
});

Check failure

Code scanning / CodeQL

Server-side request forgery

The [host](1) of this request depends on a [user-provided value](2). The [host](1) of this request depends on a [user-provided value](3).
Comment on lines +206 to +223
const response = await this.axios.put<ReadarrBook>(`/book`, {
...bookData,
monitored: true,
author: {
...bookData.author,
qualityProfileId: options.qualityProfileId,
metadataProfileId: options.metadataProfileId,
tags: options.tags,
rootFolderPath: options.rootFolderPath,
},
editions: editionData.map((edition) => ({
...edition,
monitored: edition.foreignEditionId === book.foreignEditionId,
})),
addOptions: {
searchForNewBook: options.searchNow,
},
});

Check failure

Code scanning / CodeQL

Server-side request forgery

The [host](1) of this request depends on a [user-provided value](2). The [host](1) of this request depends on a [user-provided value](3).
Comment thread server/routes/author.ts
Comment on lines +12 to +48
authorRoutes.get('/:id', async (req, res, next) => {
const hardcover = new Hardcover();

try {
const hardcoverAuthor = (await hardcover.getAuthor(
Number(req.params.id)
)) as HardcoverAuthorDetails;

const media = await Media.getRelatedMedia(
req.user,
hardcoverAuthor.contributions.map((result) => result.book.id),
MediaType.BOOK
);

const books = hardcoverAuthor.contributions.map((result) =>
mapBookResult(
result.book,
media.find(
(req) =>
req.hcId === result.book.id && req.mediaType === MediaType.BOOK
)
)
);

return res.status(200).json(mapAuthorDetails(hardcoverAuthor, books));
} catch (e) {
logger.debug('Something went wrong retrieving author', {
label: 'API',
errorMessage: e.message,
authorId: req.params.id,
});
return next({
status: 500,
message: 'Unable to retrieve author.',
});
}
});

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [authorization](1), but is not rate-limited.
@github-actions github-actions Bot added the merge conflict Cannot merge due to merge conflicts label Sep 25, 2025
@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

@github-actions github-actions Bot removed the merge conflict Cannot merge due to merge conflicts label Sep 25, 2025
Comment on lines +10 to +37
name: Build & Publish Docker Preview Images
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
build-args: |
COMMIT_TAG=${{ github.sha }}
BUILD_VERSION=${{ steps.get_version.outputs.VERSION }}
BUILD_DATE=${{ github.event.repository.updated_at }}
tags: |
ghcr.io/jabloink/jellyseerr:preview-books

Check warning

Code scanning / CodeQL

Workflow does not contain permissions

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {{contents: read}}
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow

Unpinned 3rd party Action 'Jellyseerr Books Preview' step [Uses Step](1) uses 'docker/setup-qemu-action' with ref 'v3', not a pinned commit hash
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow

Unpinned 3rd party Action 'Jellyseerr Books Preview' step [Uses Step](1) uses 'docker/setup-buildx-action' with ref 'v3', not a pinned commit hash
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow

Unpinned 3rd party Action 'Jellyseerr Books Preview' step [Uses Step](1) uses 'docker/login-action' with ref 'v3', not a pinned commit hash
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow

Unpinned 3rd party Action 'Jellyseerr Books Preview' step [Uses Step](1) uses 'docker/build-push-action' with ref 'v5', not a pinned commit hash
@JamesDAdams

Copy link
Copy Markdown

Finaly book support thanks !

But you can't use Hardcover api because readarr use Goodreads so the books id are not the same...

@JamesDAdams

Copy link
Copy Markdown

Finaly book support thanks !

But you can't use Hardcover api because readarr use Goodreads so the books id are not the same...

I didn't realize you were using Bookshelf, which uses Hardcover

@eemersonrosa

Copy link
Copy Markdown

Finally book support
Can't wait!

@github-actions github-actions Bot added the merge conflict Cannot merge due to merge conflicts label Oct 6, 2025
@github-actions

github-actions Bot commented Oct 6, 2025

Copy link
Copy Markdown

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

- Add db migrations for book support
- Add hcId field to Media entity for Hardcover book IDs
- Add metadataProfileId to MediaRequest and OverrideRule entities
- Add book quota fields to User entity
- Update Blacklist entity to use externalId for unified media types
- Add book media type constants and interfaces
- Update request interfaces to support book requests
- Add Hardcover GraphQL API client for book data
- Add Readarr service integration for book management
- Add Book, Author, and Series data models with proper mapping
- Add API routes for book, author, and series endpoints
- Update search functionality to include books
- Update API specification with book-related endpoints
- Add book, author, and series detail pages with full metadata display
- Add book discovery page with filtering and search capabilities
- Add author and book card components for grid/list views
- Add book support to search functionality and navigation
- Add Readarr and Chaptarr service icons
- Update media slider and title card components for books
- Add deep linking support for book-related pages
- Update layout components to support book navigation
- Add book request modal with Readarr integration
- Add series request modal for book series
- Update request handling to support book media type
- Add book quota management for users
- Update request cards and blocks to display book requests
- Add book request override detection and display
- Update advanced requester for book-specific options
- Add book support to request search and validation
- Add Readarr service settings modal with connection testing
- Add metadata profile support to override rules for Readarr
- Update override rule management for book-specific settings
- Add book service configuration to settings services page
- Update permissions system to support book management
- Add Readarr service API endpoints and validation
- Update settings context to include book-related configurations
- Update all notification agents to handle book media types
- Add Hardcover API integration to issue and media subscribers
- Update notification templates to support book titles and metadata
- Fix book request notifications with proper image and title handling
- Add book support to notification type selector
- Update media request and issue notifications for books
- Fix issue details page to load book data correctly
- Update issue list items to display book information and images
- Add book support to issue creation modal
- Fix manage slide over to handle book requests properly
- Add proper book data fetching for issue pages
- Update issue display with book-specific metadata
- Add Readarr scanner for book library synchronization
- Update blacklist system to support books with unified external IDs
- Add book support to discover interface and media scanning
- Update movie and TV detail pages to handle book-related scenarios
- Add book availability tracking and status management
- Update user profile and settings to support book quotas
- Add internationalization support for book-related messages
- Fix various UI components to properly handle book media types
Align with upstream fix for *arr tag handling
updated is4k to isAlt
add book handling
add remove function to readarr
@github-actions github-actions Bot removed the merge conflict Cannot merge due to merge conflicts label Oct 8, 2025
Comment on lines +347 to +352
await this.axios.delete(`/book/${id}`, {
params: {
deleteFiles: true,
addImportExclusion: false,
},
});

Check failure

Code scanning / CodeQL

Server-side request forgery

The [host](1) of this request depends on a [user-provided value](2). The [host](1) of this request depends on a [user-provided value](3).
@GabrielPearce

Copy link
Copy Markdown

Great work! I have been trying this today and it works great :)

@jabloink Could there be a popup when selecting a book to choose either eBook or audio book? I have two separate servers of bookshelf setup for each and did not see any way to choose between them when requesting. I know it can be selected once the request is approved but it would be ideal for setups with auto approval.

Also for setups where you are wanting to have both audio books downloaded and eBooks. It may be better to have them as separate categories on the left hand bar. Just a thought.

Being able to add Audiobookshelf/calibre-web-automated as well depending on if media is an eBook/ audio book would be great. even if it just opened up the respective app without finding the media for now.

Thanks again for all your hard work on this, its awesome to see an a user friendly, nice looking solution for book requesting

@jabloink

Copy link
Copy Markdown
Contributor Author

@GabrielPearce the ability to request ebooks or audiobooks is handled the same way as 4K requesting, you would define both bookshelf services in seerr and set one as the default for audiobooks, youll then see the option on the book details page:
image
I havent used this feature much yet so if you find any bugs, please let me know

Also for setups where you are wanting to have both audio books downloaded and eBooks. It may be better to have them as separate categories on the left hand bar. Just a thought.

Im not sure what you mean by this, are you asking for another tab on the left sidebar to separate ebooks and audiobooks ?

Being able to add Audiobookshelf/calibre-web-automated as well depending on if media is an eBook/ audio book would be great. even if it just opened up the respective app without finding the media for now.

Are you asking to add external links to the book pages, similar to the "Open in Plex/Tautulli" options?

@Gylesie

Gylesie commented Oct 15, 2025

Copy link
Copy Markdown
Contributor

Holy, 150 files changed, close to 10k lines of code. This is practically unreviewable. This would need to be broken down into multiple PRs...

@GabrielPearce

GabrielPearce commented Oct 16, 2025 •

Copy link
Copy Markdown

Thanks @jabloink I wasn't familiar with the 4k feature, that seems to be what I was after yeah, I just tried it out and it worked fine

Im not sure what you mean by this, are you asking for another tab on the left sidebar to separate ebooks and audiobooks ?

yup thats exactly what I meant, but I don't think its actually needed now.

Are you asking to add external links to the book pages, similar to the "Open in Plex/Tautulli" options?

Yep thats correct, would be great if possible

@github-actions github-actions Bot added the merge conflict Cannot merge due to merge conflicts label Oct 17, 2025
@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.

@jabloink

Copy link
Copy Markdown
Contributor Author

@Gylesie

yeah its a biggie, its around the size of the lidarr PR so I thought it would be fine but im also happy to break it down into smaller PRs… how small were you thinking, i can see maybe splitting it up into 2 or 3 but could use some guidance on what would be best for yall

 ( most of the changes are either the book pages or the boilerplate to handle books alongside movies/tv and adding readarr so im flexible on how to group them )

also wanted to bring up the decisions I made around changing is4k to isAlt in order to support multiple media types (audiobooks and ebooks vs 4k movies and 1080p) I made the change early on and id like the teams input as there is probably a better long term solution



I know everyone has their hands full with the merger so not expecting anything until that has finished and i know the lidarr merge is already on deck, but happy to start discussing whenever things settle





excited for the future of seerr

@adoreparler

Copy link
Copy Markdown

I hope this is still in progress, would love to see this and lidarr support get added!

@xxDmOxx

xxDmOxx commented Mar 2, 2026

Copy link
Copy Markdown

Amazing efforts @jabloink!

I can also see your efforts migrate over to music requests and then seer would be fully complete in terms of popular media content requesting.

Super excited for this one!

@fallenbagel fallenbagel mentioned this pull request Mar 20, 2026
@M0NsTeRRR

Copy link
Copy Markdown
Member

Hello @jabloink,

This PR is too large for us to review. If you still want to implement it, you can wait for the Lidarr implementation to be merged to see how to split the book support into multiple PRs, so we can review them in the same way.

See Lidarr discussion in #3109.

@jabloink

jabloink commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

@M0NsTeRRR Great, will do

@jabloink jabloink closed this Jun 9, 2026
@mpetuska

Copy link
Copy Markdown

Seems lidarr PR got merged early June. Any chance of reviving this now?

@M0NsTeRRR

Copy link
Copy Markdown
Member

Lidarr is far from being merged.

@mpetuska

Copy link
Copy Markdown

Oh my bad, didn't notice that it's being merged to a separate branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Cannot merge due to merge conflicts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Implement bookshelf (fork of Readarr) as a Service

10 participants