fix sort
This commit is contained in:
parent
db325e7700
commit
c93f0ea403
1 changed files with 2 additions and 2 deletions
|
@ -29,9 +29,9 @@ pub async fn albums_route(artist_id: &str, lib: &State<Libary>) -> 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)
|
||||
|
|
Loading…
Reference in a new issue