Fetch metadata when something is added to the playlist.

This commit is contained in:
2025-02-15 21:40:30 -08:00
parent a06bc3960e
commit d465dbf6fb
6 changed files with 297 additions and 5 deletions

View File

@@ -36,6 +36,8 @@ const SongRow: React.FC<SongRowProps> = ({ song, playState, onDelete, onPlay })
};
}, [showDeleteConfirm]);
const displayTitle = song.metadata?.title || song.title || song.filename;
return (
<div className={classNames("flex flex-row w-full h-[100px] px-2 py-5 items-center border-b gap-2 transition-colors", {
"bg-black/10": (playState === PlayState.Playing || playState === PlayState.Paused),
@@ -56,10 +58,10 @@ const SongRow: React.FC<SongRowProps> = ({ song, playState, onDelete, onPlay })
<div className="flex-grow min-w-0">
{
song.title ? (
displayTitle ? (
<div>
<div className="text-white text-md truncate text-bold">
{song.title}
{displayTitle}
</div>
<div className="text-white/80 text-xs truncate">
{song.filename}