OPDS: Offer CBZ in older mimetype (#1731)

* OPDS: Offer CBZ in older mimetype

* OPDS: Include length when offering CBZ download

* Disable compression on CBZ endpoint

Zipping a zip

* CBZ download match content type of OPDS

* Move compression disable

* Introduce setting for configuring CBZ mimetype

* Document new option

[no-ci]

* Update server/src/main/kotlin/suwayomi/tachidesk/opds/impl/OpdsEntryBuilder.kt

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>

---------

Co-authored-by: Mitchell Syer <Syer10@users.noreply.github.com>
This commit is contained in:
Constantin Piber
2025-10-25 00:36:59 +02:00
committed by GitHub
parent 68492bf591
commit bc6e28cabe
8 changed files with 47 additions and 16 deletions

View File

@@ -100,12 +100,11 @@ object ChapterDownloadHelper {
return Triple(cbzFile.first, fileName, cbzFile.second)
}
fun getCbzMetadataForDownload(chapterId: Int): Triple<String, Long, String> { // fileName, fileSize, contentType
fun getCbzMetadataForDownload(chapterId: Int): Pair<String, Long> { // fileName, fileSize
val (chapterData, fileName) = getChapterWithCbzFileName(chapterId)
val fileSize = provider(chapterData.mangaId, chapterData.id).getArchiveSize()
val contentType = "application/vnd.comicbook+zip"
return Triple(fileName, fileSize, contentType)
return Pair(fileName, fileSize)
}
}