Remove hardcoded avatar image library

Delete the bundled character avatar JPGs and the AvatarLibrary/AvatarProvider
Kotlin files that referenced them.
This commit is contained in:
KhooLy 2026-07-03 12:51:30 +03:00
parent 301f0f07b5
commit 585cafe266
31 changed files with 0 additions and 58 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

View file

@ -1,24 +0,0 @@
package com.fluxa.app.ui.catalog
data class AvatarCategory(
val showName: String,
val imdbId: String,
val characters: List<AvatarCharacter> = emptyList() // Will be populated dynamically
)
data class AvatarCharacter(
val name: String,
val url: String
)
object AvatarLibrary {
private val defaultCategories = listOf(
AvatarCategory("The Boys", "TheBoys"),
AvatarCategory("Breaking Bad", "BreakingBad"),
AvatarCategory("Peaky Blinders", "PeakyBlinders"),
AvatarCategory("Invincible", "Invincible"),
AvatarCategory("Avatar: The Last Airbender", "ATLA")
)
val categories: List<AvatarCategory> = defaultCategories
}

View file

@ -1,34 +0,0 @@
package com.fluxa.app.ui.catalog
import android.content.Context
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import java.io.File
import java.util.concurrent.ConcurrentHashMap
object AvatarProvider {
private val cache = ConcurrentHashMap<String, List<AvatarCharacter>>()
suspend fun fetchAvatarsForShow(context: Context, folderName: String): List<AvatarCharacter> = withContext(Dispatchers.IO) {
cache[folderName]?.let { return@withContext it }
val basePath = "profile_avatars/$folderName"
val characters = runCatching {
context.assets.list(basePath)
.orEmpty()
.filter { fileName -> fileName.endsWith(".jpg", true) || fileName.endsWith(".jpeg", true) || fileName.endsWith(".png", true) || fileName.endsWith(".webp", true) || fileName.endsWith(".gif", true) }
.sorted()
.map { fileName ->
val name = fileName.substringBeforeLast('.')
.replace('-', ' ')
.replace('_', ' ')
.split(' ')
.filter { it.isNotBlank() }
.joinToString(" ") { part -> part.replaceFirstChar(Char::titlecase) }
AvatarCharacter(name, "file:///android_asset/$basePath/${File(fileName).name}")
}
}.getOrDefault(emptyList())
cache[folderName] = characters
characters
}
}