fix(opds): handle dead sources and prevent kosync binary hash crashes (#2116)

This commit is contained in:
Zeedif
2026-06-17 20:39:22 -06:00
committed by GitHub
parent bfa0038f53
commit 14ab3aa9f4
4 changed files with 36 additions and 16 deletions

View File

@@ -644,6 +644,16 @@ object OpdsFeedBuilder {
skipMetadata,
)
// Return a not-found feed if all available chapters are filtered out as unreachable
if (skipMetadata && chapterEntries.isEmpty() && totalChapters > 0L) {
return buildNotFoundFeed(
baseUrl = baseUrl,
locale = locale,
idPath = "series/$mangaId/chapters",
title = MR.strings.opds_error_chapters_not_found.localized(locale, pageNum),
)
}
// If no chapters are found in the database, attempt to fetch them from the source.
if (chapterEntries.isEmpty() && totalChapters == 0L) {
try {