From 87d795af510a5b528a5237d6ac2c744dab7e72c5 Mon Sep 17 00:00:00 2001 From: Inrixia Date: Tue, 24 Sep 2024 17:40:28 +1200 Subject: [PATCH] makeTags - Always use Tidal album name to avoid disambiguation issues - fixes #83 --- plugins/_lib/makeTags.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/_lib/makeTags.ts b/plugins/_lib/makeTags.ts index 2de4a37c..6db2e073 100644 --- a/plugins/_lib/makeTags.ts +++ b/plugins/_lib/makeTags.ts @@ -6,9 +6,10 @@ import { Album, TrackItem } from "neptune-types/tidal"; import type { MediaItem } from "./Caches/MediaItemCache"; export const fullTitle = (tidal?: { title?: string; version?: string }, musicBrainz?: { title?: string; disambiguation?: string }) => { - let title; - if (tidal?.title === undefined || musicBrainz?.title === undefined) title = musicBrainz?.title ?? tidal?.title; - else title = tidal?.title?.includes("feat. ") && !musicBrainz.title?.includes("feat. ") ? tidal?.title : musicBrainz.title; + let title = musicBrainz?.title ?? tidal?.title; + + // If the musicBrainz title is missing "feat ." use the tidal title. + if (tidal?.title?.includes("feat. ") && !musicBrainz?.title?.includes("feat. ")) title = tidal?.title; if (title === undefined) return undefined; @@ -117,7 +118,7 @@ export const makeTags = async (extTrackItem: ExtendedMediaItem): Promise