Add "description" field to Track.ts

This commit is contained in:
encode42 2024-05-24 22:49:01 -04:00
parent 08894dc078
commit 8e1ed47f4b
No known key found for this signature in database
GPG Key ID: 7E6D1008AC19B80B
3 changed files with 3 additions and 1 deletions

View File

@ -57,7 +57,7 @@ export default class AlbumInfoParser {
url: basic['@id'], url: basic['@id'],
numTracks: basic.numTracks, numTracks: basic.numTracks,
keywords: basic.keywords, keywords: basic.keywords,
description: basic.description || '', description: basic.description.replaceAll('\r\n', '\n') || '',
releaseDate: extra.album_release_date, releaseDate: extra.album_release_date,
artist, artist,
releases: [], releases: [],

View File

@ -63,6 +63,7 @@ export default class TrackInfoParser {
const track: Track = { const track: Track = {
type: 'track', type: 'track',
name: basic.name, name: basic.name,
description: basic.description.replaceAll('\r\n', '\n') || '',
url: basic['@id'] url: basic['@id']
}; };

View File

@ -3,6 +3,7 @@ import MediaKind from './MediaKind.js';
interface Track extends MediaKind { interface Track extends MediaKind {
type: 'track'; type: 'track';
description?: string;
duration?: number; duration?: number;
seekPosition?: number; seekPosition?: number;
streamUrl?: string; streamUrl?: string;