Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WNACG | Added support for ".jpeg" and fixed domain update #6101

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KenjieDec
Copy link
Contributor

Closes #6050
Closes #6056

Checklist:

  • Updated extVersionCode value in build.gradle for individual extensions
  • Updated overrideVersionCode or baseVersionCode as needed for all multisrc extensions
  • Referenced all related issues in the PR body (e.g. "Closes #xyz")
  • Added the isNsfw = true flag in build.gradle when appropriate
  • Have not changed source names
  • Have explicitly kept the id if a source's name or language were changed
  • Have tested the modifications by compiling and running the extension through Android Studio
  • Have removed web_hi_res_512.png when adding a new extension

AwkwardPeak7
AwkwardPeak7 previously approved these changes Nov 18, 2024
@@ -71,7 +71,7 @@ class UpdateUrlInterceptor(private val preferences: SharedPreferences) : Interce

val failedResponse = try {
val response = chain.proceed(request)
if (response.isSuccessful) return response
if (response.isSuccessful && response.peekBody(Long.MAX_VALUE).string().contains("紳士漫畫")) return response
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could there be a cheaper check? What's the URL that returned successful code?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this effectively blocks away all images? Did you test your changes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least check the content-type like this
if (response.header("content-type")?.startsWith("text/html") != true) { return response }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide the problematic URL so we can decide what's the proper thing to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WNACG: Unable to display images with .jpeg suffix Wnacg cannot automatically update the domain correctly
4 participants