Closed rodolfo-github closed 7 years ago
Yeah, by default the slideshow will always try to connect to the server, to show fresh images. It can withstand brief offline period, but it can't start while offline.
However, there is a way: in the Streams list just touch the stream name - the stream should expand and show more buttons. There is a cache blue-ish button which will show all images locally cached on your phone. In this mode, PhotoCloud should not even attempt to connect to the server.
Thank you. I see it now and that gives me the slideshow :-)
So for my use case (Google Photos like application but with my photos stored on NextCcloud), I would like to access (mostly browse and not slideshow) my pictures offline completely.
Is that feature planned ?
It's not planned currently, but maybe it could be doable easily. I actually cache both photos and directory listings. Let me try to prototype a sample offline directory browser.
Hi, not sure if you done this but it seems I can browse folders and photos offline? Thanks.
Hi, that's probably caused by #41 . Currently the cached listing of the folder is shown, however when your server is inaccessible, that listing is replaced by an error message.
By introducing the repeat mechanism, the connection is retried automatically when such I/O error happens, which gives more time for you to browse the cached listings ;)
Interesting, we can use this to our advantage. Perhaps during browsing, the retry mechanism could be extended indefinitely? I wonder if that would cause confusion (since older version of folder may be shown)...
Hi, that's probably caused by #41 . Currently the cached listing of the folder is shown, however when your server is inaccessible, that listing is replaced by an error message. By introducing the repeat mechanism, the connection is retried automatically when such I/O error happens, which gives more time for you to browse the cached listings ;)
Great!
Interesting, we can use this to our advantage. Perhaps during browsing, the retry mechanism could be extended indefinitely? I wonder if that would cause confusion (since older version of folder may be shown)...
It does work and for photos as well it seems. Not sure about it extended indefinitely though and not because of older version but because of battery usage concerns.
Actually Nextcloud 2.0 on Android has been released and it seems to support offline mode: it caches thumbnails and images after I set it to sync the Photos folder. I'll play with it for the next weeks.
PhotoCloud caches photos as they are shown, either in Browser or in the Slideshow. So, the easiest way to populate the cache is to launch a Slideshow and keep it going for a while.
I'm thinking about implementing an offline mode for the Browser. Originally I thought that I should only show cached folders when the device is offline and the Browser is opened, that however would not bring the current content in when the phone becomes online during the browsing.
The best strategy is thus to modify the current behavior - the browser shows cached contents and keeps polling updates on the background until the phone reaches online status. To work around battery issues, I can implement an exponential backoff , and also attempt connecting only when the phone is on wifi.
Implemented in PhotoCloud 1.10.1
Hi again! I can view my photos while online just fine but it seems I can't view them while in offline mode for my Nextcloud, I get this error:
Thank you.
p.s. I've redacted the hostname for privacy reasons