⬆️ version bump to v0.3.40
- Update crate and project versions from `v0.3.39` to "\"" - Reorder imports in media_server.rs for consistency – Move `error_codes` import before other soap modules in pmoupnp – Reorder crate imports to group external and local deps logically (soap_client, then core types) - Improve Browse response formatting: wrap long expressions for readability – Add deterministic sort by `+dc:title` in Browse requests (alphabetical, ascending) – Preserve track ordering by NOT sorting items (track number preserved), only containers - Add explicit sort of container list in content_handler.rs for deterministic output
This commit is contained in:
@@ -432,6 +432,12 @@ impl ContentHandler {
|
||||
items.len()
|
||||
);
|
||||
|
||||
// Trier les containers par titre pour ordre déterministe (alphabétique, insensible à la casse)
|
||||
// Les HashMap/HashSet utilisés pour la déduplication ne garantissent pas l'ordre,
|
||||
// et les APIs externes peuvent renvoyer dans un ordre non-déterministe
|
||||
// On NE trie PAS les items (pistes) car l'ordre original (numéro de piste) est important
|
||||
containers.sort_by(|a, b| a.title.to_lowercase().cmp(&b.title.to_lowercase()));
|
||||
|
||||
// Calculer le total avant pagination
|
||||
let total = (containers.len() + items.len()) as u32;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user