From 965f044e0c2b6e5cb61d24fab0fb632ce38292cf Mon Sep 17 00:00:00 2001 From: Kyle Rector Date: Thu, 18 Dec 2025 20:38:50 -0500 Subject: [PATCH] Showing singular "song" if playlist or album only has one song (#168) --- frontend/src/components/AlbumInfo.tsx | 4 +++- frontend/src/components/PlaylistInfo.tsx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/AlbumInfo.tsx b/frontend/src/components/AlbumInfo.tsx index e4f0ab1..6fa3fd3 100644 --- a/frontend/src/components/AlbumInfo.tsx +++ b/frontend/src/components/AlbumInfo.tsx @@ -148,7 +148,9 @@ export function AlbumInfo({ {albumInfo.release_date} - {albumInfo.total_tracks} songs + + {albumInfo.total_tracks} {albumInfo.total_tracks === 1 ? "song" : "songs"} +
diff --git a/frontend/src/components/PlaylistInfo.tsx b/frontend/src/components/PlaylistInfo.tsx index 28ec179..b5e6596 100644 --- a/frontend/src/components/PlaylistInfo.tsx +++ b/frontend/src/components/PlaylistInfo.tsx @@ -137,7 +137,9 @@ export function PlaylistInfo({
{playlistInfo.owner.display_name} - {playlistInfo.tracks.total} songs + + {playlistInfo.tracks.total} {playlistInfo.tracks.total === 1 ? "song" : "songs"} + {playlistInfo.followers.total.toLocaleString()} followers