More rich metadata with NowPlaying

This commit is contained in:
2025-02-15 22:15:59 -08:00
parent d465dbf6fb
commit a3801f6698
7 changed files with 72 additions and 26 deletions

View File

@@ -1,7 +1,7 @@
import classNames from 'classnames';
import React, { useState, useRef, useEffect } from 'react';
import { FaPlay, FaVolumeUp, FaVolumeOff } from 'react-icons/fa';
import { PlaylistItem } from '../api/player';
import { getDisplayTitle, PlaylistItem } from '../api/player';
export enum PlayState {
NotPlaying,
@@ -36,7 +36,7 @@ const SongRow: React.FC<SongRowProps> = ({ song, playState, onDelete, onPlay })
};
}, [showDeleteConfirm]);
const displayTitle = song.metadata?.title || song.title || song.filename;
const displayTitle = getDisplayTitle(song);
return (
<div className={classNames("flex flex-row w-full h-[100px] px-2 py-5 items-center border-b gap-2 transition-colors", {