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.
This commit is contained in:
1 parent
88d4bc8471
commit
dec6eab109
1 file changed
+3
-3
@@ -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)?,
|
||||
|
||||
Reference in new issue
Block a user