Repository navigation
feat(settings): pick and add Z-Library domains - #49
Merged
Merged
Conversation
Z-Library moves domains and puts some behind a bot check, so the domain is now chosen in Settings instead of only by environment variable. - Settings → Z-Library lists the published domains (z-lib.sk, z-library.im, z-library.sk, z-library.hn, libb.la) plus z-library.ec, checks each one from the server (a one-result search) and shows whether it works. - Pick the domain in use; add your own domains and remove them again. - The choice is kept in a new settings table and applies at once (the client logs in afresh on the new domain). SHELFLOOM_ZLIBRARY_DOMAIN is now only the starting choice, defaulting to z-library.hn. - A redirect-loop bot check reads as such instead of a generic error, and search errors about the domain link to Settings.
z-library.ec is not one of Z-Library's domains: it proxies the real API to collect account logins. Only the published domains stay built in, and the README warns to take new domains from Z-Library's own channels.
Z-Library's app API publishes its current domains (/eapi/info/domains). Opening Settings → Z-Library now fetches that list (asking the domain in use first, then the others until one answers), keeps it, and shows those domains as "From Z-Library" next to the official ones, each with its live check. The list stays as last fetched when no domain answers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Z-Library moves domains and puts some behind a bot check, so the domain is now chosen in Settings → Z-Library instead of only through an env var.
z-lib.sk,z-library.im,z-library.sk,z-library.hnand the mirrorlibb.la./eapi/info/domains. Opening Settings fetches that list, asking the domain in use first and then the others until one answers, and stores it. Those domains appear as From Z-Library. If no domain answers, the last list fetched stays.settingstable (migration0002_settings.sql) and apply immediately; the client logs in again on the new domain.SHELFLOOM_ZLIBRARY_DOMAINis now only the starting choice, and its default changes toz-library.hn.z-library.ecdropped: it was the old default but is a phishing lookalike, not a Z-Library domain. The README warns to take domains only from Z-Library's own channels.API:
GET/POST /api/zlibrary/domains,POST /api/zlibrary/domains/refresh,PUT /api/zlibrary/domain,DELETE /api/zlibrary/domains/{domain},GET /api/zlibrary/domains/check?domain=.Live check from the homelab host (2026-10-11)
Testing
z-library.hnand checked every domain (phone and desktop screenshots).