remove track position from albums

This commit is contained in:
Sayem Chowdhury 2021-03-04 17:12:13 +06:00
parent a2e8dc985d
commit 738f538b82
1 changed files with 2 additions and 8 deletions

View File

@ -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