fix: several small fixes
🏗️ Build and Test JellyTau / Run Tests (pull_request) Successful in 3m51s
Traceability Validation / Check Requirement Traces (pull_request) Successful in 22s
🏗️ Build and Test JellyTau / Build Android APK (pull_request) Successful in 18m26s

This commit is contained in:
2026-06-25 20:02:01 +02:00
parent 1836615dc0
commit 2811e1b7ca
6 changed files with 69 additions and 37 deletions
+17 -7
View File
@@ -580,8 +580,10 @@ impl MediaRepository for OnlineRepository {
}
}
// Request image fields for list views (People only needed in get_item detail view)
endpoint.push_str("&Fields=BackdropImageTags,ParentBackdropImageTags");
// Request image fields for list views (People only needed in get_item
// detail view). Genres is needed so cached items carry their genres,
// which lets the offline store derive genre lists + per-genre counts.
endpoint.push_str("&Fields=BackdropImageTags,ParentBackdropImageTags,Genres");
let response: ItemsResponse = self.get_json(&endpoint).await?;
@@ -854,10 +856,17 @@ impl MediaRepository for OnlineRepository {
.collect();
let with_counts = genres.iter().filter(|g| g.album_count.is_some()).count();
log::debug!(
"get_genres: {} genres, {} carry counts (AlbumCount/ChildCount)",
// TEMP DIAGNOSTIC: dump the first few genres with their counts so we can
// see whether the server populates any count field. Remove once known.
log::warn!(
"get_genres: {} genres, {} carry counts. sample: {:?}",
genres.len(),
with_counts
with_counts,
genres
.iter()
.take(8)
.map(|g| (g.name.as_str(), g.album_count))
.collect::<Vec<_>>()
);
Ok(genres)
@@ -890,8 +899,9 @@ impl MediaRepository for OnlineRepository {
}
}
// Request image fields for list views (People only needed in get_item detail view)
endpoint.push_str("&Fields=BackdropImageTags,ParentBackdropImageTags");
// Request image fields for list views (plus Genres so cached items
// carry genres for offline genre lists/counts).
endpoint.push_str("&Fields=BackdropImageTags,ParentBackdropImageTags,Genres");
let response: ItemsResponse = self.get_json(&endpoint).await?;
Ok(SearchResult {