yellowbluesky / PixivforMuzei3

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

Downloader is going haywire and downloading the same image multiple times #174

Closed biomatter closed 2 years ago

biomatter commented 2 years ago

Screenshot_20211122-152722

Please see attached image as an example. This only started happening within the last few days. The image previewer in the app does not show the duplicates, hiding the problem

yellowbluesky commented 2 years ago

Hi there,

What version of Android are you using, and are you storing into external storage?

I had completely refactored the image downloading and sharing code for the last update, so there must be something that I messed up somewhere

biomatter commented 2 years ago

I'm on Android version 10. This is not external storage. Thanks for being so fast, I really like the app

yellowbluesky commented 2 years ago

This is more for my curiosity, but can you please try setting each duplicate to be your wallpaper and then check if the same wallpaper is applied each time? Muzei sometimes bugs out its thumbnails, perhaps causing the issue you are having now.

Do you have the cache set to clear every day? If not, can you please try clearing the cache and then report back to me again tomorrow?

I am not sure why this issue has started happening recently / after the latest app update. The code that handles duplicate image detection was not touched, and has not been touched for many months now.

EDIT: I'm glad you like my app 😊 Please suggest any features you would like to see

biomatter commented 2 years ago

Those aren't muzei thumbnails, that was a view from a photo viewing app. The duplicates were real, essentially.

I don't have it set to clear cache. Will that delete the contents of the folder?

yellowbluesky commented 2 years ago

Yes, clearing the cache (etiher by pressing the button on the Main tab or by enabling the automatic option) will clear all the images you have in there.

FYI, note that because you are not storing into external storage, the Android system may clear that folder at any time if it feels like it needs to reclaim space. This is dependent on how much remaining space you have left on the storage

I have a theory on why the duplicates are appearing:

However, this theory doesn't hold water:

biomatter commented 2 years ago

Sorry, I was wrong... It is duplicates being saved into external storage, not the cache. I didn't understand the difference and thought that the pixiv folder was the one the app used. My bad :(