Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
skycube19 committed Sep 29, 2024
1 parent 2b86234 commit 9bb9c3a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/NowPlaying.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
1 change: 1 addition & 0 deletions src/components/RecommendedTrack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/enhancifyInternalService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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"];

0 comments on commit 9bb9c3a

Please sign in to comment.