remove track position from albums
This commit is contained in:
parent
a2e8dc985d
commit
738f538b82
10
src/api.ts
10
src/api.ts
|
@ -62,14 +62,8 @@ export const getAlbumInfo = (alb_id: string): Promise<albumType> => request({alb
|
|||
/**
|
||||
* @param {String} alb_id user id
|
||||
*/
|
||||
export const getAlbumTracks = async (alb_id: string): Promise<albumTracksType> => {
|
||||
const albumTracks: albumTracksType = await request({alb_id, lang: 'us', nb: -1}, 'song.getListByAlbum');
|
||||
albumTracks.data = albumTracks.data.map((track, index) => {
|
||||
track.TRACK_POSITION = index + 1;
|
||||
return track;
|
||||
});
|
||||
return albumTracks;
|
||||
};
|
||||
export const getAlbumTracks = async (alb_id: string): Promise<albumTracksType> =>
|
||||
request({alb_id, lang: 'us', nb: -1}, 'song.getListByAlbum');
|
||||
|
||||
/**
|
||||
* @param {String} playlist_id playlist id
|
||||
|
|
Loading…
Reference in New Issue