(sourceUrl)
| 355 | } |
| 356 | |
| 357 | function deriveQuality(sourceUrl) { |
| 358 | if (!sourceUrl) return "—"; |
| 359 | if (sourceUrl.startsWith("local:")) { |
| 360 | const ext = sourceUrl.split(".").pop()?.toLowerCase(); |
| 361 | if (ext === "wav") return "Lossless (WAV)"; |
| 362 | if (ext === "mp3") return "Compressed (MP3)"; |
| 363 | return "Local file"; |
| 364 | } |
| 365 | if (sourceUrl.includes("youtube.com") || sourceUrl.includes("youtu.be")) return "High"; |
| 366 | if (sourceUrl.includes("soundcloud.com")) return "Compressed (MP3)"; |
| 367 | return "—"; |
| 368 | } |
| 369 | |
| 370 | function drLabel(dr) { |
| 371 | if (dr < 7) return "Compressed"; |
no outgoing calls
no test coverage detected