feat: optimize lazy PK resolution and fix OpenHome IdList delimiter

- In track_metadata.rs: cache real_pk at construction time to avoid repeated DB queries per metadata field access.
- In openhome_client.rs: change IdList delimiter from comma to space per OpenHome spec.
This commit is contained in:
2026-03-25 12:59:27 +01:00
parent 8005968ec5
commit bded788431
2 changed files with 20 additions and 15 deletions

View File

@@ -185,11 +185,12 @@ impl OhPlaylistClient {
return Ok(Vec::new());
}
// OpenHome spec: IdList is space-delimited (not comma-delimited)
let id_list_csv = id_list
.iter()
.map(|id| id.to_string())
.collect::<Vec<_>>()
.join(",");
.join(" ");
let args = [("IdList", id_list_csv.as_str())];
let call_result =