Coder Social home page Coder Social logo

pixivformuzei3's People

Contributors

alvince avatar ceuilisa avatar dependabot-preview[bot] avatar dependabot[bot] avatar fluffydiscord avatar imgbotapp avatar linsui avatar mslxl avatar notsfsssf avatar poussinou avatar settingdust avatar tacothedank avatar ujuiujumandan avatar yellowbluesky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pixivformuzei3's Issues

App doesn't download images (custom rom)

Hi, recently I moved from galaxy a5 2016 (stock) to Xiaomi Redmi Note 4X with custom ROM (Pixel Experience - Android 10)

Sadly the app now seems to not be able to download any images (After selecting it in Muzei nothing happens). Dahlia's pixiv app works just fine so it's nothing related to Muzei itself. I tried version 2.6.1 (from play store) and 2.4.5 (from github) and both had the same issue.

---EDIT---
I just saw issue #49 and after doing what NarihiroCH did in his last comment app does work. I'm going to test it a bit more.

After allowing NSFW art app still downloads images (gallery gets bigger)

After ticking auto cache clear at 1AM app still downloads images (gallery gets bigger)

After ticking external storage app seems to not download any images (gallery size stays the same)

After disabling external storage app downloads images once more (galley gets bigger, I also cleared cache just to see if it redownloads old images)

At this point I went to check storage permissions and Pixiv for Muzei did have storage permissions but Muzei itself did not (and never asked for them but i allowed storage permissions manually, it didn't help anyway)

I enabled external storage again and cleared cache. After loading next image in Muzei it showed M logo for a while, then started iterating through informations about images only to later disable next image button, gallery has one image inside that doesn't get set as wallpaper even if I press it (Muzei states it did set it as wallpaper). I checked it again few minutes later and there was a new image that ended up being empty with some pixiv info attached to it. Seems like gallery slowly fills up with those empty images over time now. Muzei still has the next image button disabled, double click doesn't do anything.

Seems like there's an issue with external storage option (Android 10? or maybe just some specific roms?)

---Edit2---

I turned off external storage and 1am cache clear, cleared cache manually, app still doesn't download anything, button is gone, gallery is still full of empty images.

I reinstalled Muzei and Pixiv for Muzei, enabled 1am wipe and NSFW. Works fine, I disables 1am wipe. Works fine. Seems like if it starts to fill gallery with empty images that only have info attached it completely bricks Pixiv for Muzei.

Loosen restrictions or download an offset JSON if filtering fails

With the number of filtering options now available, I am now seeing in the logs that filtering is now often retrying for something that satisfies all conditions set

Things that I can do are:

  • Loosen NSFW filtering (not a good idea)

  • loosen aspect ratio filtering (will have an impact)

  • Download an offset JSON

    • There is provision in the API to download the next 30 or 50 artworks. Implementation can be found here
      This option is the most robust, but will require a fair bit of rework to how my code flows

Different set of filtering levels if update mode is rankings

Ranking images only have two levels of NSFW filtering levels: images with and without the "sexual" tag set

This conflicts with the current set of NSFW levels which are catered for the auth update modes: there are four levels.

I can have another two fields in the array.xml, and in the activity call the necessary functions to change the entry and entryvalues as needed

Stop using random to select artwork

Now that I have robust filtering and retry counting, I can stop using random and instead linearly traverse the artwork list

Especially applicable for Auth feed modes, where I can simply request a new offset JSON.

For ranking feed modes, as there are no offset JSONs available, filtering restrictions will need to be gradually relaxed as iterate counts increase

Add and use unit tests

As functionality grows, it becomes harder and harder to test all permutations of app settings

Break a number of the larger functions into smaller specialized functions

Worst offenders of being a large function include:

  • doWork()
    • Spawn two child functions, one for feed and one for bookmark
    • Maybe even allow the child functions to insert the pictures into Muzei's database (addArtwork())
  • getAccessToken()
    • Separate functions for logging in with username/password, and for using a refresh token
  • selectPicture()
    • Split into two functions, one for feed and one for bookmark

App freezing

Issue thread for information gathering on app no longer working

Make more functions pure functions

Code is getting hard to follow and understand
e.g. every child function creating a SharedPreferences object of their own

Pass the required parameters instead

Button to clear the image cache, or automatically clear them

Daily ranking updates everyday, however the images often continue to display well into the next day.

This can be solved by having a button where the user can manually clear the image cache, or by tagging each image stored with its expiry date

F-Droid

Would you please publish this app on F-Droid? Thanks!

filter image by aspect ratio

I'd like to get wallpaper fit my screen or only part of the image can be display. Would it be possible to filter image by aspect ratio (e.g. width:height < 1)?

Cache the ranking JSON for the relevant period

Cache daily rank JSON for 24 hours, weekly rank JSON for 7 days, monthly rank JSON for 30 days.

If expired simply acquire a new one.

Delete the cache and do not use one if switching to/using feed, bookmark, tag, or artist modes

Will probably need some sort of serdes, maybe Google protobuf? Will need much more research

Investigate the impact of WorkManager existing work policy

It is currently on APPEND, and I am seeing some odd cases where the app stops working when cache is cleared or when mode changes

Changing it to KEEP may help with this.

Downside is the fact that pulling many images at once (on change mode or cache clear) will be much slower

Didn't work with OneUI2.0(Android 10)

It's able to open settings but can't change any backgrounds while it has been chosen in Muzei app. Neither In-app Background nor launcher background.

Filesize limit

On inspection, while most downloaded images are under 1MB, a number of the imagesbeing downloaded are quite large; from 6 MBs up to 17MB.

Should be trivial if file size can be determined from Response body

Can't log in

When I enter the setting, I go to "Pixiv Login" and then I tap "Pixiv ID" and I put my id and then I tap the "Password" and I put my password then nothing happens, and in the bottom of "Pixiv ID" appears "Not logged in", I do something wrong?

Add proxy

Add option to define the proxy like pixiv.cat

Download more pictures on empty cache

On an empty cache (from fresh app install or app requested clear), Muzei only queues and downloads two images.

A setArtwork(), then a loop calling addArtwork repeatedly should be an easy fix

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.