cleanup path replacement

This commit is contained in:
jeffvli
2026-01-03 02:24:53 -08:00
parent 5c14d20f78
commit 261c5541cd
2 changed files with 2 additions and 8 deletions
@@ -211,10 +211,7 @@ const normalizeSong = (
mbzTrackId: item.ProviderIds?.MusicBrainzTrack || null,
name: item.Name,
participants: getPeople(item),
path:
path && (pathReplace || pathReplaceWith)
? replacePathPrefix(path, pathReplace || '', pathReplaceWith || '')
: path,
path: replacePathPrefix(path || '', pathReplace, pathReplaceWith),
peak: null,
playCount: (item.UserData && item.UserData.PlayCount) || 0,
playlistItemId: item.PlaylistItemId,
@@ -165,10 +165,7 @@ const normalizeSong = (
mbzTrackId: null,
name: item.title,
participants: getParticipants(item),
path:
pathReplace || pathReplaceWith
? replacePathPrefix(item.path || '', pathReplace, pathReplaceWith)
: item.path,
path: replacePathPrefix(item.path || '', pathReplace, pathReplaceWith),
peak:
item.replayGain && (item.replayGain.albumPeak || item.replayGain.trackPeak)
? {