mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2025-01-11 16:29:08 +01:00
cached response for source list iconUrl
This commit is contained in:
parent
7284e0d4ae
commit
22bf49078f
@ -166,3 +166,7 @@ fun getExtensionIcon(apkName: String): Pair<InputStream, String> {
|
||||
).execute()
|
||||
}
|
||||
}
|
||||
|
||||
fun getExtensionIconUrl(apkName: String): String {
|
||||
return "http://127.0.0.1:4567/api/v1/extension/icon/$apkName"
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ fun getExtensionList(offline: Boolean = false): List<ExtensionDataClass> {
|
||||
it[ExtensionsTable.lang],
|
||||
it[ExtensionsTable.isNsfw],
|
||||
it[ExtensionsTable.apkName],
|
||||
it[ExtensionsTable.iconUrl],
|
||||
getExtensionIconUrl(it[ExtensionsTable.apkName]),
|
||||
it[ExtensionsTable.installed],
|
||||
it[ExtensionsTable.classFQName]
|
||||
)
|
||||
|
@ -78,7 +78,7 @@ fun getSourceList(): List<SourceDataClass> {
|
||||
it[SourceTable.id].value.toString(),
|
||||
it[SourceTable.name],
|
||||
Locale(it[SourceTable.lang]).getDisplayLanguage(Locale(it[SourceTable.lang])),
|
||||
ExtensionsTable.select { ExtensionsTable.id eq it[SourceTable.extension] }.first()[ExtensionsTable.iconUrl],
|
||||
getExtensionIconUrl(ExtensionsTable.select { ExtensionsTable.id eq it[SourceTable.extension] }.first()[ExtensionsTable.apkName]),
|
||||
getHttpSource(it[SourceTable.id].value).supportsLatest
|
||||
)
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ interface IProps {
|
||||
export default function ExtensionCard(props: IProps) {
|
||||
const {
|
||||
extension: {
|
||||
name, lang, versionName, installed, apkName,
|
||||
name, lang, versionName, installed, apkName, iconUrl,
|
||||
},
|
||||
} = props;
|
||||
const [installedState, setInstalledState] = useState<string>((installed ? 'uninstall' : 'install'));
|
||||
@ -81,7 +81,7 @@ export default function ExtensionCard(props: IProps) {
|
||||
variant="rounded"
|
||||
className={classes.icon}
|
||||
alt={name}
|
||||
src={`http://127.0.0.1:4567/api/v1/extension/icon/${apkName}`}
|
||||
src={iconUrl}
|
||||
/>
|
||||
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
||||
<Typography variant="h5" component="h2">
|
||||
|
Loading…
x
Reference in New Issue
Block a user