diff --git a/src/en/spyfakku/build.gradle b/src/en/spyfakku/build.gradle index dc7d16c89..abe4b9035 100644 --- a/src/en/spyfakku/build.gradle +++ b/src/en/spyfakku/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'SpyFakku' extClass = '.SpyFakku' - extVersionCode = 2 + extVersionCode = 3 isNsfw = true } diff --git a/src/en/spyfakku/src/eu/kanade/tachiyomi/extension/en/spyfakku/SpyFakku.kt b/src/en/spyfakku/src/eu/kanade/tachiyomi/extension/en/spyfakku/SpyFakku.kt index 67cfe564e..8ba00b4f8 100644 --- a/src/en/spyfakku/src/eu/kanade/tachiyomi/extension/en/spyfakku/SpyFakku.kt +++ b/src/en/spyfakku/src/eu/kanade/tachiyomi/extension/en/spyfakku/SpyFakku.kt @@ -61,7 +61,7 @@ class SpyFakku : HttpSource() { private fun popularManga(hentai: ShortHentai) = SManga.create().apply { setUrlWithoutDomain("$baseUrl/g/${hentai.id}") title = hentai.title - thumbnail_url = "$baseImageUrl/${hentai.hash}/cover" + thumbnail_url = "$baseImageUrl/${hentai.hash}/1/c" } override fun searchMangaParse(response: Response) = popularMangaParse(response) @@ -117,27 +117,27 @@ class SpyFakku : HttpSource() { private fun Hentai.toSManga() = SManga.create().apply { title = this@toSManga.title url = "/g/$id" - author = (circles?.emptyToNull() ?: artists)?.joinToString { it.value } - artist = artists?.joinToString { it.value } - genre = tags?.joinToString { it.value } - thumbnail_url = "$baseImageUrl/$hash/cover" + author = (circles?.emptyToNull() ?: artists)?.joinToString { it.name } + artist = artists?.joinToString { it.name } + genre = tags?.joinToString { it.name } + thumbnail_url = "$baseImageUrl/$hash/1/c" description = buildString { this@toSManga.description?.let { append(this@toSManga.description, "\n\n") } - circles?.emptyToNull()?.joinToString { it.value }?.let { + circles?.emptyToNull()?.joinToString { it.name }?.let { append("Circles: ", it, "\n") } - publishers?.emptyToNull()?.joinToString { it.value }?.let { + publishers?.emptyToNull()?.joinToString { it.name }?.let { append("Publishers: ", it, "\n") } - magazines?.emptyToNull()?.joinToString { it.value }?.let { + magazines?.emptyToNull()?.joinToString { it.name }?.let { append("Magazines: ", it, "\n") } - events?.emptyToNull()?.joinToString { it.value }?.let { + events?.emptyToNull()?.joinToString { it.name }?.let { append("Events: ", it, "\n\n") } - parodies?.emptyToNull()?.joinToString { it.value }?.let { + parodies?.emptyToNull()?.joinToString { it.name }?.let { append("Parodies: ", it, "\n") } append("Pages: ", pages, "\n\n") @@ -153,6 +153,15 @@ class SpyFakku : HttpSource() { append("Added: ", dateReformat.format(it.time), "\n") } } catch (_: Exception) {} + append( + "Size: ", + when { + size >= 300 * 1000 * 1000 -> "${"%.2f".format(size / (1000.0 * 1000.0 * 1000.0))} GB" + size >= 100 * 1000 -> "${"%.2f".format(size / (1000.0 * 1000.0))} MB" + size >= 1000 -> "${"%.2f".format(size / (1000.0))} kB" + else -> "$size B" + }, + ) } status = SManga.COMPLETED update_strategy = UpdateStrategy.ONLY_FETCH_ONCE diff --git a/src/en/spyfakku/src/eu/kanade/tachiyomi/extension/en/spyfakku/SpyFakkuDto.kt b/src/en/spyfakku/src/eu/kanade/tachiyomi/extension/en/spyfakku/SpyFakkuDto.kt index 84b73d818..731b4fecc 100644 --- a/src/en/spyfakku/src/eu/kanade/tachiyomi/extension/en/spyfakku/SpyFakkuDto.kt +++ b/src/en/spyfakku/src/eu/kanade/tachiyomi/extension/en/spyfakku/SpyFakkuDto.kt @@ -1,6 +1,5 @@ package eu.kanade.tachiyomi.extension.en.spyfakku -import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable @@ -17,6 +16,7 @@ class Hentai( val released_at: String, val created_at: String, val pages: Int, + val size: Int = 0, val publishers: List?, val artists: List?, val circles: List?, @@ -41,5 +41,5 @@ class Image( @Serializable class Name( - @SerialName("name") val value: String, + val name: String, )