From ed8175b1d05d9cb4f4d34219499e952b3a86ee59 Mon Sep 17 00:00:00 2001 From: Connor Johnstone Date: Thu, 26 Mar 2026 17:38:16 -0400 Subject: [PATCH] Unified the track logic. Seems to work much better --- src/indexer.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/indexer.rs b/src/indexer.rs index b0ee7a8..fddfb92 100644 --- a/src/indexer.rs +++ b/src/indexer.rs @@ -107,7 +107,11 @@ async fn process_file( bitrate: Set(meta.bitrate), file_size: Set(scanned.file_size), fingerprint: NotSet, - musicbrainz_id: Set(meta.musicbrainz_recording_id), + musicbrainz_id: if meta.musicbrainz_recording_id.is_some() { + Set(meta.musicbrainz_recording_id) + } else { + NotSet // Don't overwrite existing DB MBID when file tag is missing + }, artist_id: Set(artist_id), album_id: Set(album_id), file_mtime: Set(Some(scanned.mtime)),