Skip to content

[Bug]: Bad old copy of certain albums persisting in database #4081

@TheHYPO35

Description

@TheHYPO35

I confirm that:

  • I have searched the existing open AND closed issues to see if an issue already exists for the bug I've encountered
  • I'm using the latest version (your issue may have been fixed already)

Version

0.55.2 (a057a68)

Current Behavior

I have two copies of certain albums showing up in my Albums>All section.

I will preempt the comments I've received in other forums - this is NOT about new "missing" files mechanic. Both copies show as current and existing.

The copies have the same displayed name, artist and artwork. I have done quick and full scans of my library which does not remove the second copy.

The working and correct album (I'll call it the "Good" copy) lists the path (in the web interface) for the first track as:

/music/Ed Sheeran/Ed Sheeran - Subtract [Deluxe Edition] 2023 CD MP3 320/01 - Boat.mp3

The second copy (I'll call it the "Bad" copy) of the album lists the path as:

/music/Ed Sheeran/Ed Sheeran - Subtract [Deluxe Edition] 2023 CD MP3 320/1-18 - Boat.mp3

i.e. same path/folder, different filename numbering.

Files with the "-18" (track total) in the filename do not exist. I'm guessing they once existed and I renamed at some point, but they aren't there now.

Notably:

  • The Bad copy does not play
  • If I click the artist name of the Bad copy, I get "Element does not exist" error
  • If I click the artist name of the Good copy, it only lists the Good copy
  • If I .ndignore the folder, only the Good copy of the album is greyed and marked "missing"

Looking into my .db file itself, in the 'albums' table, I have two copies of the album. the 'id' for the Bad copy is much longer than the id for the Good copy. Same with the album_artist_id (the Good copy's album_artist_id matches the other albums of the same artist). The embeded art path for the bad copy is /music/Ed Sheeran/Ed... (one of the bad files) while the art path for the good copy is /Ed Sheeran/Ed... without the leading /music/. The Bad copy has no imported_at date, and the folder_ids is blank (just square brackets).

The tracks themselves are similar database entries. The 'id' tags are all longer (album_id, artist_id, etc.). The paths are in the same format (Ed Sheeran/Ed...) other than the different filenames. The Bad copy's created_at and birth_time are March 30 2024 and the Good copy March 10 2025. The Bad copy has no folder_id.

Before I dug into the database, I was only aware of one album like this, but now that I look at my database, I see a small handful of album duplicates with longer 'id' tags than the rest of the albums.

I don't remember renaming or replacing the Sheeran album, but the other handful of duplicate albums are mp3 files I replaced with FLAC files fairly recently (post update to 0.55.x)

From my logs, a scan results in:

time="2025-04-30T15:13:16Z" level=info msg="Scanner: Completed processing folder" audioCount=18 elapsed=2.67s imageCount=0 library="Music Library" plsCount=0 tracksImported=18 tracksMissing=0 ​folder="Ed Sheeran/Ed Sheeran - Subtract [Deluxe Edition] 2023 CD MP3 320"

There are no other lines about that album from a scan. The only other lines related to it are failures to play or load metadata when I try to play one of the Bad copy songs:

time="2025-04-30T15:35:17Z" level=warning msg="API: Failed response" endpoint=/navidrome/rest/stream error=0 message="Internal Server Error: open /music/Ed Sheeran/Ed Sheeran - Subtract [Deluxe Edition] 2023 CD MP3 320/1-18 - Boat.mp3: no such file or directory" requestId=b5a6ae31ff85/dICQ9FkvFj-005143

time="2025-04-30T15:35:17Z" level=warning msg="API: Failed response" endpoint=/navidrome/rest/stream error=0 message="Internal Server Error: open /music/Ed Sheeran/Ed Sheeran - Subtract [Deluxe Edition] 2023 CD MP3 320/1-18 - Boat.mp3: no such file or directory" requestId=b5a6ae31ff85/dICQ9FkvFj-005144

Expected Behavior

That the missing files would be removed/marked missing on a scan.

Steps To Reproduce

Unknown

Environment

- OS: Docker/Debian
- Browser: Various - doesn't seem relevant to the issue
- Client: Various

How Navidrome is installed?

Docker

Configuration

LogLevel = 'info'

ScanSchedule = '@every 24h'
AutoImportPlaylists = 'true'
PlaylistsPath = 'Playlists'

CoverArtPriority = 'embedded, cover.*, folder.*, front.*, external'
IgnoredArticles = 'The El La Los Las Le Le Os As A ( ) [ ] < >'

Scanner.Extractor = 'ffmpeg'

TranscodingCacheSize = '150MiB'
BaseUrl = '/navidrome'

LastFM.Enabled = 'true'
LastFM.ApiKey = [xxx]
LastFM.Secret = [xxx]

Spotify.ID = [xxx]
Spotify.Secret = [xxx]

# EnableDownloads = 'false'

Relevant log output

Anything else?

No response

Code of Conduct

  • I agree to follow Navidrome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtriageNew bug reports that need to be evaluated

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions