mirror of
https://github.com/d-fi/d-fi-core.git
synced 2025-07-27 15:44:26 +02:00
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
|
* @param {String} alb_id user id
|
||||||
*/
|
*/
|
||||||
export const getAlbumTracks = async (alb_id: string): Promise<albumTracksType> => {
|
export const getAlbumTracks = async (alb_id: string): Promise<albumTracksType> =>
|
||||||
const albumTracks: albumTracksType = await request({alb_id, lang: 'us', nb: -1}, 'song.getListByAlbum');
|
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;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {String} playlist_id playlist id
|
* @param {String} playlist_id playlist id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user