From c25b7badbe46b9f0f0fd8f0a52de7b71545e8145 Mon Sep 17 00:00:00 2001 From: Lynn Smeria Date: Wed, 29 Aug 2018 17:00:34 +0200 Subject: [PATCH] Sort tracks by track number --- package.json | 2 +- src/generate.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b7efc44..7b32537 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "publikator", - "version": "0.15.0", + "version": "0.16.0", "main": "index.js", "repository": "https://github.com/aengl/publikator.git", "author": "Lynn Smeria ", diff --git a/src/generate.js b/src/generate.js index ff98be4..8917f24 100644 --- a/src/generate.js +++ b/src/generate.js @@ -28,7 +28,7 @@ const getAlbumInfo = (root, tracks) => ({ bitrate: collect(tracks, t => t.format.bitrate), trackCount: tracks.length, cover: tracks[0].cover || null, - tracks, + tracks: _.sortBy(tracks, 'common.track.no'), }); /**