Add source/qobuz_track_id to LocalTrack model and implement filtering for Artists/Tracks

- Added source and qobuz_track_id fields to LocalTrack model for proper filtering
- Updated all database row mapping functions to include new fields
- Implemented network folder and download filtering for library_get_artists command
- Implemented network folder and download filtering for library_search (Tracks) command
- Made tab counters (Albums, Artists, Tracks) reactive to filtered content
- Counters now update based on current filtered data instead of total stats

Fixes offline mode filtering for Artists and Tracks tabs. When offline or when
downloads are hidden, Artists/Tracks now properly filter out inaccessible content,
matching the behavior already implemented for Albums.
This commit is contained in:
vicrodh committed 2026-01-20 01:26:27 -06:00
1 parent 1347c11fcc
commit 2270d80139
6 files changed
+152 -14

No files matched your search

+6
View File
@@ -72,6 +72,10 @@ pub struct LocalTrack {
// Indexing
pub last_modified: i64,
pub indexed_at: i64,
// Download tracking
pub source: Option<String>,
pub qobuz_track_id: Option<i64>,
}
impl Default for LocalTrack {
@@ -102,6 +106,8 @@ impl Default for LocalTrack {
artwork_path: None,
last_modified: 0,
indexed_at: 0,
source: None,
qobuz_track_id: None,
}
}
}