File tree Expand file tree Collapse file tree 3 files changed +5563
-2
lines changed
app/src/main/java/xyz/quaver/pupil/util/download Expand file tree Collapse file tree 3 files changed +5563
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Pupil
2
2
3
3
![ Banner] ( https://github.com/tom5079/Pupil/blob/gh-pages/assets/images/pupil-banner.png?raw=true )
4
- * Pupil, Hitomi.la viewer for Android*
4
+ * Pupil, Hitomi.la viewer for Android*
5
+
6
+ [ ![ ] ( https://discordapp.com/api/guilds/610452916612104194/embed.png?style=banner2 )] ( https://discord.gg/Stj4b5v )
7
+ I can speak English, Japanese and Korean. If you have any questions, head over to my discord server or DM me!
5
8
6
9
# Screenshot
7
10
![ Main Screen] ( https://github.com/tom5079/Pupil/blob/gh-pages/assets/images/main-screenshot.png?raw=true )
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import kotlinx.io.InputStream
31
31
import xyz.quaver.Code
32
32
import xyz.quaver.hitomi.GalleryBlock
33
33
import xyz.quaver.hitomi.Reader
34
+ import xyz.quaver.proxy
34
35
import xyz.quaver.pupil.util.getCachedGallery
35
36
import xyz.quaver.pupil.util.getDownloadDirectory
36
37
import xyz.quaver.pupil.util.json
@@ -80,7 +81,9 @@ class Cache(context: Context) : ContextWrapper(context) {
80
81
withContext(Dispatchers .IO ) {
81
82
val thumbnails = getGalleryBlock(galleryID)?.thumbnails
82
83
try {
83
- Base64 .encodeToString(URL (thumbnails?.firstOrNull()).readBytes(), Base64 .DEFAULT )
84
+ Base64 .encodeToString(URL (thumbnails?.firstOrNull()).openConnection(proxy).getInputStream().use {
85
+ it.readBytes()
86
+ }, Base64 .DEFAULT )
84
87
} catch (e: Exception ) {
85
88
null
86
89
}
You can’t perform that action at this time.
0 commit comments