Implement better image selection strategy

This commit is contained in:
Stypox 2023-05-02 12:30:27 +02:00
parent 0a8f28b1c6
commit 35073c780d
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23
19 changed files with 161 additions and 89 deletions

View file

@ -20,6 +20,7 @@ import org.schabi.newpipe.extractor.downloader.Downloader;
import org.schabi.newpipe.ktx.ExceptionUtils;
import org.schabi.newpipe.settings.NewPipeSettings;
import org.schabi.newpipe.util.Localization;
import org.schabi.newpipe.util.image.ImageStrategy;
import org.schabi.newpipe.util.image.PicassoHelper;
import org.schabi.newpipe.util.ServiceHelper;
import org.schabi.newpipe.util.StateSaver;
@ -100,7 +101,7 @@ public class App extends Application {
// Initialize image loader
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
PicassoHelper.init(this);
PicassoHelper.setPreferredImageQuality(PreferredImageQuality.fromPreferenceKey(this,
ImageStrategy.setPreferredImageQuality(PreferredImageQuality.fromPreferenceKey(this,
prefs.getString(getString(R.string.image_quality_key),
getString(R.string.image_quality_default))));
PicassoHelper.setIndicatorsEnabled(MainActivity.DEBUG