revert: default icon prefix back to github raw

Prefer github as default; the self-hosted Gitea (now at
https://git.sunlunfan.com) stays available as a manually-entered
alternative. Drops the github->gitea migration added earlier.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-09 13:05:20 +08:00
parent 076643ea46
commit 134f0461e8
2 changed files with 3 additions and 14 deletions
@@ -94,16 +94,7 @@ class SettingsStore(
_servers.value = list
_currentServerId.value = p[K.CURRENT] ?: ID_OFFICIAL
currentServer.value = list.firstOrNull { it.id == _currentServerId.value } ?: list.firstOrNull()
// 图标前缀:旧 github 默认值自动迁移到 Gitea;用户自定义值保留
val storedPrefix = p[K.ICON_PREFIX]
iconPrefix.value = when (storedPrefix) {
null -> DEFAULT_ICON_PREFIX
LEGACY_ICON_PREFIX -> {
scope.launch { edit { it[K.ICON_PREFIX] = DEFAULT_ICON_PREFIX } }
DEFAULT_ICON_PREFIX
}
else -> storedPrefix
}
iconPrefix.value = p[K.ICON_PREFIX] ?: DEFAULT_ICON_PREFIX
forwardingEnabled.value = p[K.FWD] ?: true
codeEnabled.value = p[K.CODE] ?: true
adFilterEnabled.value = p[K.AD] ?: true
@@ -193,8 +184,6 @@ class SettingsStore(
companion object {
const val ID_OFFICIAL = "official"
// 图标前缀默认走自建 Gitea(国内可达);github raw 作为备份
const val DEFAULT_ICON_PREFIX = "http://45.143.131.159:3000/song/a2i/raw/branch/main/icons/"
const val LEGACY_ICON_PREFIX = "https://raw.githubusercontent.com/lsxf/a2i/main/icons/"
const val DEFAULT_ICON_PREFIX = "https://raw.githubusercontent.com/lsxf/a2i/main/icons/"
}
}