update types

This commit is contained in:
Seth 2025-05-19 21:22:28 -04:00
parent fd9734ccb7
commit cac779ffaa

View file

@ -95,18 +95,18 @@ const tracks = await utils.fetchTracks() as {
premiumStreamingOnly: boolean, premiumStreamingOnly: boolean,
trackNumber: number, trackNumber: number,
volumeNumber: number, // discNumber volumeNumber: number, // discNumber
version: null, // ? version: string, // Slowed, Acoustic, Remix, etc
popularity: number, popularity: number,
copyright: string, copyright: string,
bpm: null, // think this is only provided to DJ users bpm: null | number, // not available for all tracks
url: string, url: string,
isrc: string, isrc: string,
editable: boolean, editable: boolean,
explicit: boolean, explicit: boolean,
audioQuality: string, audioQuality: string,
audioModes: "STEREO"[], // todo find other modes audioModes: "STEREO" | "DOLBY_ATMOS"[], // todo find other modes
mediaMetadata: { mediaMetadata: {
tags: "LOSSLESS"[], // todo find other tags tags: "DOLBY_ATMOS" | "LOSSLESS" | "HIRES_LOSSLESS"[], // todo find other tags
}, },
upload: boolean, // was uploaded by a user upload: boolean, // was uploaded by a user
artist: { artist: {
@ -121,7 +121,7 @@ const tracks = await utils.fetchTracks() as {
id: number, id: number,
name: string, name: string,
handle: null, handle: null,
type: "MAIN", type: "MAIN" | "FEATURED",
picture: string, picture: string,
} }
], ],
@ -130,15 +130,22 @@ const tracks = await utils.fetchTracks() as {
title: string, title: string,
cover: string, cover: string,
vibrantColor: string, vibrantColor: string,
videoCover: null, videoCover: null | string, // only available for some albums
}, },
mixes: { 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 /* Remove all tracks that are unavailable
for (const track of tracks.items) { for (const track of tracks.items) {
if (track.item.streamReady) { if (track.item.streamReady) {