Open lbesnard opened 5 years ago
The list of available sizes depends on the server settings (in Configuration / Photo sizes). Only the Square, Thumbnail and Medium file sizes are always available so it might be worth providing an option for choosing other sizes and adopt the Thumbnail size by default as does the iOS app.
Today @voriondev changed already to xsmall, but we shall make it dynamic, depending on the available sizes on the server.
We did set the thumbnail quality to medium to avoid downloading 2 different qualities for a photo as our "local repository" system is not implemented yet in any way, we are just using the Picasso Caching System.
Let's move that milestone to 1.2.0
"download size" is configurable already in Release 1.1, but "all" sizes are selectable, not only those which are supported by the configured gallery.
So we should adjust this to constrain the list of available options and after implementing #207 we shall store the setting for download size per account, in SettingsActivity/Fragment. List of available sizes can be read via pwg.session.getStatus.
By installing the latest beta via android-studio, I noticed the debug urls for the thumbnails use the small version of the pictures. Such as http://***/piwigo/i.php?/upload/2019/01/30/20190130083950-c3ac7346-sm.jpg
This works fine, but the loading could be much faster if using the smallest version available http://10.1.1.198/piwigo/i.php?/upload/2019/01/30/20190130083950-c3ac7346-2s.jpg
The difference is using 2s instead of sm
In my case, I have used the xsmall keyword. I modified the following :
1) adding
to
https://github.com/Piwigo/Piwigo-Android/blob/b3cb7208b5cf460c78a2ba82bf1e5f8b86f3931e/app/src/main/java/org/piwigo/io/model/Derivatives.java#L24
2) Modifying
in https://github.com/Piwigo/Piwigo-Android/blob/28f0d87611c66bce50a7343724d3791cf4d79197/app/src/main/java/org/piwigo/ui/main/AlbumsViewModel.java#L181
Unfortunately, the tiny and _xxsmall options don't seem to work.
It worked fine on my end. But I'm not a android dev