update types
This commit is contained in:
parent
fd9734ccb7
commit
cac779ffaa
1 changed files with 15 additions and 8 deletions
23
index.ts
23
index.ts
|
@ -95,18 +95,18 @@ const tracks = await utils.fetchTracks() as {
|
|||
premiumStreamingOnly: boolean,
|
||||
trackNumber: number,
|
||||
volumeNumber: number, // discNumber
|
||||
version: null, // ?
|
||||
version: string, // Slowed, Acoustic, Remix, etc
|
||||
popularity: number,
|
||||
copyright: string,
|
||||
bpm: null, // think this is only provided to DJ users
|
||||
bpm: null | number, // not available for all tracks
|
||||
url: string,
|
||||
isrc: string,
|
||||
editable: boolean,
|
||||
explicit: boolean,
|
||||
audioQuality: string,
|
||||
audioModes: "STEREO"[], // todo find other modes
|
||||
audioModes: "STEREO" | "DOLBY_ATMOS"[], // todo find other modes
|
||||
mediaMetadata: {
|
||||
tags: "LOSSLESS"[], // todo find other tags
|
||||
tags: "DOLBY_ATMOS" | "LOSSLESS" | "HIRES_LOSSLESS"[], // todo find other tags
|
||||
},
|
||||
upload: boolean, // was uploaded by a user
|
||||
artist: {
|
||||
|
@ -121,7 +121,7 @@ const tracks = await utils.fetchTracks() as {
|
|||
id: number,
|
||||
name: string,
|
||||
handle: null,
|
||||
type: "MAIN",
|
||||
type: "MAIN" | "FEATURED",
|
||||
picture: string,
|
||||
}
|
||||
],
|
||||
|
@ -130,15 +130,22 @@ const tracks = await utils.fetchTracks() as {
|
|||
title: string,
|
||||
cover: string,
|
||||
vibrantColor: string,
|
||||
videoCover: null,
|
||||
videoCover: null | string, // only available for some albums
|
||||
},
|
||||
mixes: {
|
||||
TRACK_MIX: string,
|
||||
TRACK_MIX?: string,
|
||||
},
|
||||
}
|
||||
}[]
|
||||
};
|
||||
|
||||
/*
|
||||
for (const track of tracks.items) {
|
||||
// check if has more than just stereo
|
||||
if (track.item.artist.handle) {
|
||||
console.log(track.item.artist.handle);
|
||||
}
|
||||
}
|
||||
*/
|
||||
/* Remove all tracks that are unavailable
|
||||
for (const track of tracks.items) {
|
||||
if (track.item.streamReady) {
|
||||
|
|
Loading…
Add table
Reference in a new issue