This commit is contained in:
2024-08-18 13:03:24 +02:00
parent f69f7ae294
commit 6d648b9a71
11 changed files with 61 additions and 118 deletions
@@ -91,7 +91,7 @@ suspend fun getCachedSkin(uuid: String): Pair<File, Boolean> {
val file = File(kCacheFolderFile, "$uuid.webp")
if (file.exists()) {
if (CacheConfig.isOutdated(uuid)) {
val skin = client.get("https://visage.surgeplay.com/bust/150/$uuid")
val skin = client.get("https://vzge.me/bust/150/$uuid")
skin.bodyAsChannel().copyTo(file.outputStream())
CacheConfig.update(uuid)
@@ -103,7 +103,7 @@ suspend fun getCachedSkin(uuid: String): Pair<File, Boolean> {
withContext(Dispatchers.IO) {
file.createNewFile()
}
val skin = client.get("https://visage.surgeplay.com/bust/150/$uuid")
val skin = client.get("https://vzge.me/bust/150/$uuid")
skin.bodyAsChannel().copyTo(file.outputStream())
CacheConfig.update(uuid)
return file to false