From dec6eab109fee1bc69e7879969b433f50b96db3d Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Mon, 19 Jan 2026 20:23:33 -0600 Subject: [PATCH] Add explicit f64 type annotations for all sample_rate reads Fixed missing type annotations in row.get() calls for sample_rate. Without explicit type annotation, Rust was inferring the wrong type causing 'Invalid column type Real' errors when reading from database. Added ::<_, f64> type annotation to all three locations: - row_to_track (line 1168) - get_playlist_local_tracks (line 1772) - get_playlist_local_tracks_with_qobuz (line 1821) This is the critical fix for the database migration error. --- src-tauri/src/library/database.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src-tauri/src/library/database.rs b/src-tauri/src/library/database.rs index 4bce4bdfb..14e0a6bbb 100644 --- a/src-tauri/src/library/database.rs +++ b/src-tauri/src/library/database.rs @@ -1165,7 +1165,7 @@ impl LibraryDatabase { duration_secs: row.get(10)?, format: Self::parse_format(&row.get::<_, String>(11)?), bit_depth: row.get(12)?, - sample_rate: row.get(13)?, + sample_rate: row.get::<_, f64>(13)?, channels: row.get(14)?, file_size_bytes: row.get(15)?, cue_file_path: row.get(16)?, @@ -1769,7 +1769,7 @@ impl LibraryDatabase { duration_secs: row.get(12)?, format: Self::parse_format(&row.get::<_, String>(13)?), bit_depth: row.get(14)?, - sample_rate: row.get(15)?, + sample_rate: row.get::<_, f64>(15)?, channels: row.get(16)?, file_size_bytes: row.get(17)?, cue_file_path: row.get(18)?, @@ -1818,7 +1818,7 @@ impl LibraryDatabase { duration_secs: row.get(12)?, format: Self::parse_format(&row.get::<_, String>(13)?), bit_depth: row.get(14)?, - sample_rate: row.get(15)?, + sample_rate: row.get::<_, f64>(15)?, channels: row.get(16)?, file_size_bytes: row.get(17)?, cue_file_path: row.get(18)?,