Adding sorting to album tracks, fixes #469 and #530

This commit is contained in:
James Barnsley
2020-05-03 13:54:20 +12:00
parent 27e3c12a9d
commit d4e6757341

View File

@ -1993,9 +1993,10 @@ const MopidyMiddleware = (function () {
request(socket, store, 'library.lookup', { uris: [action.uri] })
.then((_response) => {
if (!_response) return;
const response = _response[action.uri];
let response = _response[action.uri];
if (!response || !response.length) return;
response = sortItems(response, 'track_number');
const artists = [];
if (response[0].artists) {
for (const artist of response[0].artists) {