mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 15:25:46 +00:00
feat(album): show OpenSubsonic disc subtitles after the CD heading (#753)
* feat(album): show OpenSubsonic disc subtitles after the CD heading Multi-disc albums in OpenSubsonic / Navidrome carry a per-disc subtitle (`discTitles`) — e.g. "Sessions" on CD 3 of a deluxe edition. AlbumTrackList only rendered "CD N" and dropped the subtitle, so users couldn't tell two discs apart unless they read the track names. * `SubsonicAlbum.discTitles` typed; `getAlbum` forwards it as-is. * `AlbumTrackList` and `AlbumTrackListMobile` take a discTitleByNum map and render the subtitle in the disc separator after "CD N". * Heading bumped slightly (13 → 15 px, icon 16 → 18 px) so the disc separator stays legible next to the new subtitle. * docs(changelog): note disc subtitles after CD heading (#753)
This commit is contained in:
committed by
GitHub
parent
48c7b8b780
commit
6595c146a3
@@ -8,6 +8,7 @@ import { formatLongDuration } from '../../utils/format/formatDuration';
|
||||
interface Props {
|
||||
discNums: number[];
|
||||
discs: Map<number, SubsonicSong[]>;
|
||||
discTitleByNum: Map<number, string>;
|
||||
isMultiDisc: boolean;
|
||||
currentTrackId: string | null;
|
||||
isPlaying: boolean;
|
||||
@@ -31,6 +32,7 @@ interface Props {
|
||||
export function AlbumTrackListMobile({
|
||||
discNums,
|
||||
discs,
|
||||
discTitleByNum,
|
||||
isMultiDisc,
|
||||
currentTrackId,
|
||||
isPlaying,
|
||||
@@ -46,6 +48,9 @@ export function AlbumTrackListMobile({
|
||||
{isMultiDisc && (
|
||||
<div className="disc-header">
|
||||
<span className="disc-icon">💿</span> CD {discNum}
|
||||
{discTitleByNum.get(discNum) && (
|
||||
<span className="disc-subtitle">{discTitleByNum.get(discNum)}</span>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{discs.get(discNum)!.map(song => {
|
||||
|
||||
Reference in New Issue
Block a user