diff --git a/src/all/mangadex/build.gradle b/src/all/mangadex/build.gradle index b38d9e61a..1e63414ee 100644 --- a/src/all/mangadex/build.gradle +++ b/src/all/mangadex/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'MangaDex' pkgNameSuffix = 'all.mangadex' extClass = '.MangaDexFactory' - extVersionCode = 190 + extVersionCode = 191 isNsfw = true } diff --git a/src/all/mangadex/src/eu/kanade/tachiyomi/extension/all/mangadex/MdAtHomeReportInterceptor.kt b/src/all/mangadex/src/eu/kanade/tachiyomi/extension/all/mangadex/MdAtHomeReportInterceptor.kt index 41d2559eb..4c4bc315f 100644 --- a/src/all/mangadex/src/eu/kanade/tachiyomi/extension/all/mangadex/MdAtHomeReportInterceptor.kt +++ b/src/all/mangadex/src/eu/kanade/tachiyomi/extension/all/mangadex/MdAtHomeReportInterceptor.kt @@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.extension.all.mangadex import android.util.Log import eu.kanade.tachiyomi.extension.all.mangadex.dto.ImageReportDto -import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.POST import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json @@ -68,10 +67,15 @@ class MdAtHomeReportInterceptor( Log.e("MangaDex", "Error connecting to MD@Home node, fallback to uploads server") val fallbackUrl = MDConstants.cdnUrl.toHttpUrl().newBuilder() - .addPathSegments(originalRequest.url.pathSegments.joinToString("/")) + .addPathSegments(originalRequest.url.pathSegments.dropWhile{ it != "data" && it != "data-saver" }.joinToString("/")) .build() - return client.newCall(GET(fallbackUrl, headers)).execute() + val fallbackRequest = originalRequest.newBuilder() + .url(fallbackUrl) + .headers(headers) + .build() + + return chain.proceed(fallbackRequest) } companion object {