From c93f0ea4037df8265c9351223961b49761781593 Mon Sep 17 00:00:00 2001 From: JMARyA Date: Mon, 12 Aug 2024 18:54:31 +0200 Subject: [PATCH] fix sort --- src/route/album.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/route/album.rs b/src/route/album.rs index 18f84bd..00eb0a7 100644 --- a/src/route/album.rs +++ b/src/route/album.rs @@ -29,9 +29,9 @@ pub async fn albums_route(artist_id: &str, lib: &State) -> FallibleApiRe fn sort_by_tracknumber(a: &serde_json::Value, b: &serde_json::Value) -> Ordering { let order = (|| { Some( - a.get("tracknumber")? + a.get("track_number")? .as_i64()? - .cmp(&b.get("tracknumber")?.as_i64()?), + .cmp(&b.get("track_number")?.as_i64()?), ) })(); order.unwrap_or(Ordering::Equal)