playlists + lyrics: setlists with pages of their own, and the words timed to the voice

This commit is contained in:
KeelrLeek committed 2026-08-17 18:05:31 -05:00
1 parent c4ff6269a3
commit df3d15553a
49 files changed
+14419 -599

No files matched your search

+12 -5
View File
@@ -101,8 +101,14 @@ pub fn snapshot(app: &tauri::AppHandle) -> (bool, f64, Option<CurrentTrack>) {
)
}
/// Keyed by track path, so it describes THIS library's files and belongs
/// beside them. Measuring a whole library again on another machine is hours
/// of work that the drive was already carrying the answer to.
fn cache_file(app: &tauri::AppHandle) -> Option<PathBuf> {
app.path().app_data_dir().ok().map(|d| d.join(CACHE_FILE))
let cfg = crate::config::load(app);
crate::config::ensure_library_data_dir(app, &cfg)
.ok()
.map(|d| d.join(CACHE_FILE))
}
pub fn init(app: &tauri::AppHandle) {
@@ -947,8 +953,10 @@ mod tests {
.and_then(|e| e.to_str())
.unwrap_or_default()
.to_ascii_lowercase();
if matches!(ext.as_str(), "flac" | "mp3" | "ogg" | "opus" | "wav" | "m4a" | "aiff")
{
// Measuring means decoding, so this is the PLAYABLE table, not
// the recognised one — an `.opus` or `.wv` here only produces a
// failed decode (or, for WavPack, NaN).
if audio_formats::is_playable_ext(&ext) {
files.push(path);
}
}
@@ -1092,8 +1100,7 @@ mod tests {
.and_then(|e| e.to_str())
.unwrap_or_default()
.to_ascii_lowercase();
if !matches!(ext.as_str(), "flac" | "mp3" | "ogg" | "opus" | "wav" | "m4a" | "aiff")
{
if !audio_formats::is_playable_ext(&ext) {
continue;
}
let artist = path