LoliSnatcher_Droid
LoliSnatcher_Droid copied to clipboard
Gallery prefetch 4 resets to 1 everytime browsing a prefetched video
Reproduction steps:
Video cache mode: Cache
Gallery preview: 4
Consider this gallery view, with each letter representing 1 booru media, those in brackets have already been cached to disk:
A and B are videos, everything else are pictures.
A[B]CDEF[G]
I start viewing media G:
A[B]CDEF[G]
^
Scroll to media F, which is uncached. App starts downloading in foreground:
A[B]CDEF[G]
^
Scroll towards media C, which is uncached. App starts downloading C, continues downloading DEF in background (---):
A[B]CDEF[G]
^---
Now I scroll to media B, which is a precached video. At this point, the app suddenly reset the Gallery preview: 4 to Gallery preview: 1, stopping download DEF, but keeps downloading C (-):
A[B]CDEF[G]
^-
Finally, I scroll to media A, which is an uncached video. At this point, app will stop downloading media C, because media A needs to be cached, and Gallery preview: 1 will remove job C.
A[B]CDEF[G]
^
Expected: App continues downloading uncached media no matter which media I am watching now, correctly removing jobs that has the oldest start time
Result: App resets Gallery preview to 1, then drops any other caching job when it starts downloading current foreground uncached media