Skip to content

Commit

Permalink
Confilict resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
tom5079 committed Feb 23, 2020
2 parents 9d0898b + 8204a15 commit 2f1a63e
Show file tree
Hide file tree
Showing 3 changed files with 5,563 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Pupil

![Banner](https://github.com/tom5079/Pupil/blob/gh-pages/assets/images/pupil-banner.png?raw=true)
*Pupil, Hitomi.la viewer for Android*
*Pupil, Hitomi.la viewer for Android*

[![](https://discordapp.com/api/guilds/610452916612104194/embed.png?style=banner2)](https://discord.gg/Stj4b5v)
I can speak English, Japanese and Korean. If you have any questions, head over to my discord server or DM me!

# Screenshot
![Main Screen](https://github.com/tom5079/Pupil/blob/gh-pages/assets/images/main-screenshot.png?raw=true)
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/java/xyz/quaver/pupil/util/download/Cache.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import kotlinx.io.InputStream
import xyz.quaver.Code
import xyz.quaver.hitomi.GalleryBlock
import xyz.quaver.hitomi.Reader
import xyz.quaver.proxy
import xyz.quaver.pupil.util.getCachedGallery
import xyz.quaver.pupil.util.getDownloadDirectory
import xyz.quaver.pupil.util.json
Expand Down Expand Up @@ -80,7 +81,9 @@ class Cache(context: Context) : ContextWrapper(context) {
withContext(Dispatchers.IO) {
val thumbnails = getGalleryBlock(galleryID)?.thumbnails
try {
Base64.encodeToString(URL(thumbnails?.firstOrNull()).readBytes(), Base64.DEFAULT)
Base64.encodeToString(URL(thumbnails?.firstOrNull()).openConnection(proxy).getInputStream().use {
it.readBytes()
}, Base64.DEFAULT)
} catch (e: Exception) {
null
}
Expand Down
Loading

0 comments on commit 2f1a63e

Please sign in to comment.