diff options
author | Florrie <towerofnix@gmail.com> | 2020-05-25 10:55:59 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2020-05-25 10:55:59 -0300 |
commit | d593e0b2dcbf8a68b5e44f06402c6f03b105f34f (patch) | |
tree | 5d4f9fa35db0b2471c0fec0f0f7511ba3cc89f72 /common.js | |
parent | 192c9fea16d376c604889bd2bd36cd41bc6bbcfd (diff) |
big update owo
Diffstat (limited to 'common.js')
-rw-r--r-- | common.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common.js b/common.js index b4bf934b..208e33b6 100644 --- a/common.js +++ b/common.js @@ -46,6 +46,11 @@ const C = { return data.sort((a, b) => a.date - b.date); }, + // Same details as the sortByDate, 8ut for covers~ + sortByArtDate: data => { + return data.sort((a, b) => (a.artDate || a.date) - (b.artDate || b.date)); + }, + // This gets all the track o8jects defined in every al8um, and sorts them 8y // date released. Generally, albumData will pro8a8ly already 8e sorted 8efore // you pass it to this function, 8ut individual tracks can have their own |