Files
wehub-resource-sync ead81af521
Deploy to GitHub Pages / deploy (push) Failing after 0s
CI / go (push) Has been cancelled
CI / build (darwin, macos-14) (push) Has been cancelled
CI / build (windows, windows-2025) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:31:13 +08:00

17 lines
421 B
Go

package model
import "github.com/bjarneo/cliamp/provider"
// navSortLabel resolves a sort-type ID to its human label for the active
// provider's album browser, falling back to the raw ID.
func (m Model) navSortLabel(sortID string) string {
if ab, ok := m.navBrowser.prov.(provider.AlbumBrowser); ok {
for _, st := range ab.AlbumSortTypes() {
if st.ID == sortID {
return st.Label
}
}
}
return sortID
}