yellowbluesky / PixivforMuzei3

Best Pixiv plugin for Muzei 3
GNU General Public License v3.0
174 stars 15 forks source link

Add min picture width/height filter #126

Closed FluffyDiscord closed 4 years ago

FluffyDiscord commented 4 years ago

Add new filter to specify minimal picture width/height. This is a workaround for low res, and thus blurry, pictures being downloaded. Only enabled for logged users. It works for non logged users too, but it will not download full res picture, as that is only available for logged users :|

There is small issue with detecting whenever user is logged, when upon login user needs to exit/open the app for sharedresource to update. Note: AdvOptionsPreferenceFragment.kt line 61

yellowbluesky commented 4 years ago

Hi there, I'll review and merge in a short while, I just got back from work.

Thanks for contributing!

yellowbluesky commented 4 years ago

I believe that my app does indeed download full res pictures on all modes, even on Ranking update modes / non logged users.

I find that adding two sliders, one for width and one for height, is more complex than the options needs to be. How about having just one slider, that only sets a minimum edge (both width and height) size? Please let me know your thoughts

FluffyDiscord commented 4 years ago

It's just a hunch, really. I had to log-in for the filter to work reliably (download hi-res version of the pictures). Maybe that was just an old running process.

yellowbluesky commented 4 years ago

It's just a hunch, really. I had to log-in for the filter to work reliably (download hi-res version of the pictures). Maybe that was just an old running process.

I'm not sure what was happening for you, the filter worked reliably for me when not logged in.

I got curious, so I decided to graph Daily Ranking resolutions vs Follow Feed.

Daily Ranking

image

The average width is 1191, and the average height was 1500. Median width is 1035, and median height is 1298.

Follow feed

image

Average width was 1390, average height was 1896 Median width was 1087, median height was 1480

Comparison

The comparison shows that my feed has higher resolution photos than Daily Ranking. However, this is just one data set, and the resolutions are still high enough to use as a wallpaper

I'm happy to merge your code in the coming days, but there's one thing I want cleared up:

What's your rationale behind having three different checks depending on whether or not the user wants landscape, portrait, or any aspec ratio? Code linked here