Skip to content

Commit

Permalink
makeTags - add discNumber tag
Browse files Browse the repository at this point in the history
fixes #101
  • Loading branch information
Inrixia committed Dec 24, 2024
1 parent bd4a4bd commit 622d35e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/_lib/makeTags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const resolveArtist = (trackItem: MediaItem, album?: Album) => {
export type FlacTags = {
title?: string;
trackNumber?: string;
discNumber?: string;
date?: string;
copyright?: string;
REPLAYGAIN_TRACK_GAIN?: string;
Expand All @@ -68,6 +69,7 @@ export type FlacTags = {
export const availableTags: (keyof FlacTags)[] = [
"title",
"trackNumber",
"discNumber",
"date",
"copyright",
"REPLAYGAIN_TRACK_GAIN",
Expand Down Expand Up @@ -117,6 +119,8 @@ export const makeTags = async (extTrackItem: ExtendedMediaItem): Promise<MetaTag
if (tidalTrack.replayGain) tags.REPLAYGAIN_TRACK_GAIN = tidalTrack.replayGain.toString();
}

if (tidalTrack.volumeNumber !== undefined) tags.discNumber = tidalTrack.volumeNumber.toString();

// track isrc & album upc
const isrc = tidalTrack.isrc ?? releaseTrack?.recording.isrcs?.[0];
if (isrc) tags.isrc = isrc;
Expand Down

0 comments on commit 622d35e

Please sign in to comment.