Skip to content

Diochan extension revamp#26

Open
Dashchanon wants to merge 1 commit intoMishiranu:diochanfrom
Dashchanon:diochan
Open

Diochan extension revamp#26
Dashchanon wants to merge 1 commit intoMishiranu:diochanfrom
Dashchanon:diochan

Conversation

@Dashchanon
Copy link
Copy Markdown

A few months ago diochan switched engine from Kusaba to NPFchan, meaning the extension wouldn't work anymore.
This is a working revamp based on lainchan's extension code, since lainchan also uses NPFchan.

@Mishiranu
Copy link
Copy Markdown
Owner

Mishiranu commented Sep 28, 2020

This code will need some rework, I'll take a look later.

@Mishiranu
Copy link
Copy Markdown
Owner

Mishiranu commented Oct 23, 2020

Well, as you can see, I don't have much time to do this. The problem is that I'm migrating all extensions into single branch (look at master branch), but I want to do some "generic implementations", like I already did for Wakaba and FoolFuuka engines (see master branch).

As far as I understand, NPFchan is based on vichan, which is based on tinyboard. So I need to migrate all tinyboard extensions first, then I'll work on vichan boards, and only after that I'll be able to handle NPFchan boards properly. This will take a lot of time, and I'm currently busy with other things in Dashchan client itself.

For instance, I reworked HTTP client interface (didn't push this change yet), and so on. All these changes won't be included to com.github.mishiranu:dashchan.library since this library is effectively deprecated. But I'll maintain API and ABI compatibility until all extensions will be migrated and updated (see "TODO CHAN" comments in the client code).

I'd recommended to distribute your extension yourself until I'll be able to work on it. It's not that hard, you can stick to 1.7 library until then, and host your own update data (just use a github repo with json files) and replace chan.extension.source URL in the manifest.

I didn't read the changes carefully, but I noticed you use HttpURLConnection to run HEAD requests in your DiochanModelMapper. Don't do this: you're doing HTTP requests bypassing HttpHolder, and the amount of requests may be high. Instead, just place the URL you extracted from JSON into Post entity without any additional checks. Then override onReadContent method in DiochanChanPerformer, where you can do multiple requests on demand to check 404 response for png images and try to load webp instead.

desertkun pushed a commit to desertkun/Dashchan-Extensions that referenced this pull request May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants