From a96c5d4cafee2739c1588b8ef88107485cf77804 Mon Sep 17 00:00:00 2001 From: sifacaii Date: Sat, 15 Oct 2022 20:07:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DPicasso=20https=E8=AF=81?= =?UTF-8?q?=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/org/sifacai/vlcjellyfin/JfClient.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/org/sifacai/vlcjellyfin/JfClient.java b/app/src/main/java/org/sifacai/vlcjellyfin/JfClient.java index 9cd8135..9b15864 100644 --- a/app/src/main/java/org/sifacai/vlcjellyfin/JfClient.java +++ b/app/src/main/java/org/sifacai/vlcjellyfin/JfClient.java @@ -11,6 +11,8 @@ import com.lzy.okgo.callback.AbsCallback; import com.lzy.okgo.model.HttpHeaders; import com.lzy.okgo.model.Response; +import com.squareup.picasso.OkHttp3Downloader; +import com.squareup.picasso.Picasso; import org.sifacai.vlcjellyfin.Bean.Item; import org.sifacai.vlcjellyfin.Bean.Items; @@ -130,6 +132,10 @@ public static void init(Application application) { OkGo.getInstance().init(application) .setOkHttpClient(builder.build()) .setRetryCount(3); + Picasso.setSingletonInstance(new Picasso.Builder(application.getBaseContext()) + .downloader(new OkHttp3Downloader(builder.build())) + .build() + ); } /**