diff --git a/src/components/NowPlaying.tsx b/src/components/NowPlaying.tsx index 3df8be5..7357ebf 100644 --- a/src/components/NowPlaying.tsx +++ b/src/components/NowPlaying.tsx @@ -68,6 +68,7 @@ class NowPlaying extends React.Component<{}, {audioFeatures: AudioFeaturesRespon } }; + // Toggles whether the metric that the user clicked on should be displayed or not toggleMetric = (metric: string) => { let newArray = this.state.metricsToDisplay.slice(); if (newArray.includes(metric)) { diff --git a/src/components/RecommendedTrack.tsx b/src/components/RecommendedTrack.tsx index 965b34f..73fa58a 100644 --- a/src/components/RecommendedTrack.tsx +++ b/src/components/RecommendedTrack.tsx @@ -8,6 +8,7 @@ class RecommendedTrack extends React.Component<{songCover: string, songURI: string}, {paddingRight: string}> { + // Plays the recommended song whose play icon has been clicked playSong = () => { Spicetify.Player.playUri(this.props.songURI); } diff --git a/src/services/enhancifyInternalService.tsx b/src/services/enhancifyInternalService.tsx index 12a6c7e..16b3e70 100644 --- a/src/services/enhancifyInternalService.tsx +++ b/src/services/enhancifyInternalService.tsx @@ -16,7 +16,6 @@ export function getSongMetrics(audioFeatures: AudioFeaturesResponse, metricsToDi } // Object that represents which metrics require a progress bar and which metrics require a specific label -// TODO: Add information for other metrics that we can show the user const metricFeatures: MetricFeatures = { progressbar: new Set(["Danceability", "Energy", "Acousticness", "Instrumentalness", "Speechiness", "Valence", "Liveness"]), label: { @@ -28,4 +27,5 @@ const metricFeatures: MetricFeatures = { } }; +// Array of all the metric types that we allow to be shown export const allMetrics: string[] = ["Danceability", "Energy", "Acousticness", "Loudness", "Key", "Tempo", "Instrumentalness", "Liveness", "Mode", "Speechiness", "Time_Signature", "Valence"];