(input?: string)
| 168 | return /^\d+$/.test(value) ? value : null; |
| 169 | } |
| 170 | |
| 171 | function sourceLabel(key: SourceMode): string { |
| 172 | if (key === "auto") return "auto"; |
| 173 | const source = MUSIC_SOURCES.find((item) => item.key === key); |
| 174 | return source ? `${source.name} (${source.key})` : key; |
| 175 | } |
| 176 | |
| 177 | function normalizeSource(input?: string): SourceMode | null { |
| 178 | if (!input) return null; |
| 179 | const lowered = input.trim().toLowerCase(); |
| 180 | if (!lowered) return null; |
no outgoing calls
no test coverage detected