From 161c09a025bc3a58e56dcc4e24a201cd059b11bc Mon Sep 17 00:00:00 2001 From: Mitchell Syer Date: Thu, 22 May 2025 23:55:05 +0000 Subject: [PATCH] Opds --- README.md | 6 ++++++ scripts/startup_script.sh | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/README.md b/README.md index a5c1f0c..fdc2294 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,12 @@ There are a number of environment variables available to configure Suwayomi: | **FLARESOLVERR_TIMEOUT** | `60` | Time in seconds for FlareSolverr to timeout if the challenge is not solved | | **FLARESOLVERR_SESSION_NAME** | `suwayomi` | The name of the session that Suwayomi will use with FlareSolverr | | **FLARESOLVERR_SESSION_TTL** | `15` | The time to live for the FlareSolverr session | +| **OPDS_ITEMS_PER_PAGE** | `50` | How many items to show on a page - 10 <= n < 5000 | +| **OPDS_ENABLE_PAGE_READ_PROGRESS** | `true` | Track and update your reading progress by page for each chapter during page streaming | +| **OPDS_MARK_AS_READ_ON_DOWNLOAD** | `false` | Automatically mark chapters as read when you download them | +| **OPDS_SHOW_ONLY_UNREAD_CHAPTERS** | `false` | Filter manga feed to display only chapters you haven't read | +| **OPDS_SHOW_ONLY_DOWNLOADED_CHAPTERS** | `false` | Filter manga feed to display only chapters you have downloaded | +| **OPDS_CHAPTER_SORT_ORDER** | `DESC` | "DESC" or "ASC" | ### Downloads Folder We do not allow configuration of the downloads folder, since Docker Volumes can handle that instead, here is an example of a docker-compose.yaml that has downloads volume configuration: diff --git a/scripts/startup_script.sh b/scripts/startup_script.sh index c1cfca2..efd3710 100755 --- a/scripts/startup_script.sh +++ b/scripts/startup_script.sh @@ -80,4 +80,12 @@ sed -i -r "s/server.flareSolverrTimeout = ([0-9]+|[a-zA-Z]+)( #)?/server.flareSo sed -i -r "s/server.flareSolverrSessionName = \"(.*?)\"( #)?/server.flareSolverrSessionName = \"${FLARESOLVERR_SESSION_NAME:-\1}\" #/" /home/suwayomi/.local/share/Tachidesk/server.conf sed -i -r "s/server.flareSolverrSessionTtl = ([0-9]+|[a-zA-Z]+)( #)?/server.flareSolverrSessionTtl = ${FLARESOLVERR_SESSION_TTL:-\1} #/" /home/suwayomi/.local/share/Tachidesk/server.conf +# opds +sed -i -r "s/server.opdsItemsPerPage = ([0-9]+|[a-zA-Z]+)( #)?/server.opdsItemsPerPage = ${OPDS_ITEMS_PER_PAGE:-\1} #/" /home/suwayomi/.local/share/Tachidesk/server.conf +sed -i -r "s/server.opdsEnablePageReadProgress = ([0-9]+|[a-zA-Z]+)( #)?/server.opdsEnablePageReadProgress = ${OPDS_ENABLE_PAGE_READ_PROGRESS:-\1} #/" /home/suwayomi/.local/share/Tachidesk/server.conf +sed -i -r "s/server.opdsMarkAsReadOnDownload = ([0-9]+|[a-zA-Z]+)( #)?/server.opdsMarkAsReadOnDownload = ${OPDS_MARK_AS_READ_ON_DOWNLOAD:-\1} #/" /home/suwayomi/.local/share/Tachidesk/server.conf +sed -i -r "s/server.opdsShowOnlyUnreadChapters = ([0-9]+|[a-zA-Z]+)( #)?/server.opdsShowOnlyUnreadChapters = ${OPDS_SHOW_ONLY_UNREAD_CHAPTERS:-\1} #/" /home/suwayomi/.local/share/Tachidesk/server.conf +sed -i -r "s/server.opdsShowOnlyDownloadedChapters = ([0-9]+|[a-zA-Z]+)( #)?/server.opdsShowOnlyDownloadedChapters = ${OPDS_SHOW_ONLY_DOWNLOADED_CHAPTERS:-\1} #/" /home/suwayomi/.local/share/Tachidesk/server.conf +sed -i -r "s/server.opdsChapterSortOrder = \"(.*?)\"( #)?/server.opdsChapterSortOrder = \"${OPDS_CHAPTER_SORT_ORDER:-\1}\" #/" /home/suwayomi/.local/share/Tachidesk/server.conf + exec java -Duser.home=/home/suwayomi -jar "/home/suwayomi/startup/tachidesk_latest.jar";