No description
Find a file
Deluan Quintão cad9cdc53e
fix(scanner): preserve created_at when moving songs between libraries (#5055)
* fix: preserve created_at when moving songs between libraries (#5050)

When songs are moved between libraries, their creation date was being
reset to the current time, causing them to incorrectly appear in
"Recently Added". Three changes fix this:

1. Add hash:"ignore" to AlbumID in MediaFile struct so that Equals()
   works for cross-library moves (AlbumID includes library prefix,
   making hashes always differ between libraries)

2. Preserve album created_at in moveMatched() via CopyAttributes,
   matching the pattern already used in persistAlbum() for
   within-library album ID changes

3. Only set CreatedAt in Put() when it's zero (new files), and
   explicitly copy missing.CreatedAt to the target in moveMatched()
   as defense-in-depth for the INSERT code path

* test: add regression tests for created_at preservation (#5050)

Add tests covering the three aspects of the fix:
- Scanner: moveMatched preserves missing track's created_at
- Scanner: CopyAttributes called for album created_at on album change
- Scanner: CopyAttributes not called when album ID stays the same
- Persistence: Put sets CreatedAt to now for new files with zero value
- Persistence: Put preserves non-zero CreatedAt on insert
- Persistence: Put does not reset CreatedAt on update

Also adds CopyAttributes to MockAlbumRepo for test support.

* test: verify album created_at is updated in cross-library move test (#5050)

Added end-to-end assertion in the cross-library move test to verify that
the new album's CreatedAt field is actually set to the original value after
CopyAttributes runs, not just that the method was called. This strengthens
the test by confirming the mock correctly propagates the timestamp.
2026-02-17 08:37:05 -05:00
.devcontainer fix: build on Go 1.25.6 2026-01-15 19:30:08 -05:00
.github ci: add GitHub Actions workflow for pushing translations to POEditor 2026-02-12 16:32:58 -05:00
adapters fix(scanner): pass filename hint to gotaglib's OpenStream for format detection (#5012) 2026-02-09 16:16:28 -05:00
cmd feat: add go-taglib pure Go metadata extractor (#4902) 2026-01-18 14:42:53 -05:00
conf refactor: run Go modernize (#5002) 2026-02-08 09:57:30 -05:00
consts feat(agents): Add artist url and top and similar songs to ListenBrainz agent (#4934) 2026-02-07 13:20:42 -05:00
contrib build: add packages for deb and rpm to release (#3202) 2024-10-26 13:31:45 -04:00
core fix(insights): update HasCustomPID logic to use default constants 2026-02-12 14:33:25 -05:00
db refactor: run Go modernize (#5002) 2026-02-08 09:57:30 -05:00
git feat(plugins): experimental support for plugins (#3998) 2025-06-22 20:45:38 -04:00
log refactor: run Go modernize (#5002) 2026-02-08 09:57:30 -05:00
model fix(scanner): preserve created_at when moving songs between libraries (#5055) 2026-02-17 08:37:05 -05:00
persistence fix(scanner): preserve created_at when moving songs between libraries (#5055) 2026-02-17 08:37:05 -05:00
plugins refactor: run Go modernize 2026-02-09 08:44:44 -05:00
release fix: linux service should restart when upgrading (#5001) 2026-02-09 17:11:45 -05:00
resources fix(ui): update Danish, Portuguese (BR) translations from POEditor (#5039) 2026-02-12 16:38:57 -05:00
scanner fix(scanner): preserve created_at when moving songs between libraries (#5055) 2026-02-17 08:37:05 -05:00
scheduler refactor: run Go modernize (#5002) 2026-02-08 09:57:30 -05:00
server fix(server): return 404 instead of 500 for non-existent playlists 2026-02-15 22:39:27 -05:00
tests fix(scanner): preserve created_at when moving songs between libraries (#5055) 2026-02-17 08:37:05 -05:00
ui fix(ui): prevent "Play Next" restarting play at top of queue (#5049) 2026-02-17 08:34:24 -05:00
utils refactor: run Go modernize (#5002) 2026-02-08 09:57:30 -05:00
.dockerignore fix: add music.old to .dockerignore and .gitignore 2026-02-06 07:40:05 -05:00
.git-blame-ignore-revs Move project to Navidrome GitHub organization 2021-02-06 21:47:19 -05:00
.gitignore fix: add music.old to .dockerignore and .gitignore 2026-02-06 07:40:05 -05:00
.golangci.yml chore(deps) upgrade Go dependencies, including golangci-lint (#3937) 2025-04-07 19:42:00 -03:00
.nvmrc chore(deps): update all dependencies (#4618) 2025-10-25 17:05:16 -04:00
CODE_OF_CONDUCT.md Use Contributor Covenant v2.0 2020-07-21 14:40:21 -04:00
CONTRIBUTING.md build(ci): change GitHub release notes (#3300) 2024-09-21 17:00:13 -04:00
Dockerfile feat: add riscv64 builds (#4949) 2026-01-31 07:24:19 +01:00
go.mod chore(deps): update go-sqlite3 to v1.14.34 and pocketbase/dbx to v1.12.0 2026-02-17 08:35:02 -05:00
go.sum chore(deps): update go-sqlite3 to v1.14.34 and pocketbase/dbx to v1.12.0 2026-02-17 08:35:02 -05:00
LICENSE Change license to GPLv3 2020-01-22 14:48:38 -05:00
main.go build(netgo): make sure the project is always compiled with netgo build tag (#3428) 2024-10-26 13:28:23 -04:00
Makefile chore: update golangci-lint version to v2.9.0 in Makefile 2026-02-11 08:31:51 -05:00
Procfile.dev chore(deps): upgrade to Go 1.24.1 (#3851) 2025-03-17 21:08:10 -04:00
README.md feat: add Navidrome Guru on Gurubase.io (#3491) 2024-11-23 17:29:00 -05:00
reflex.conf fix: split reflex -R flags to preserve directory exclusion optimization 2026-02-09 10:47:30 -05:00

Navidrome logo

Navidrome Music Server  Tweet

Last Release Build Downloads Docker Pulls Dev Chat Subreddit Contributor Covenant Gurubase

Navidrome is an open source web-based music collection server and streamer. It gives you freedom to listen to your music collection from any browser or mobile device. It's like your personal Spotify!

Note: The master branch may be in an unstable or even broken state during development. Please use releases instead of the master branch in order to get a stable set of binaries.

Check out our Live Demo!

Any feedback is welcome! If you need/want a new feature, find a bug or think of any way to improve Navidrome, please file a GitHub issue or join the discussion in our Subreddit. If you want to contribute to the project in any other way (ui/backend dev, translations, themes), please join the chat in our Discord server.

Installation

See instructions on the project's website

Cloud Hosting

PikaPods has partnered with us to offer you an officially supported, cloud-hosted solution. A share of the revenue helps fund the development of Navidrome at no additional cost for you.

PikaPods

Features

  • Handles very large music collections
  • Streams virtually any audio format available
  • Reads and uses all your beautifully curated metadata
  • Great support for compilations (Various Artists albums) and box sets (multi-disc albums)
  • Multi-user, each user has their own play counts, playlists, favourites, etc...
  • Very low resource usage
  • Multi-platform, runs on macOS, Linux and Windows. Docker images are also provided
  • Ready to use binaries for all major platforms, including Raspberry Pi
  • Automatically monitors your library for changes, importing new files and reloading new metadata
  • Themeable, modern and responsive Web interface based on Material UI
  • Compatible with all Subsonic/Madsonic/Airsonic clients
  • Transcoding on the fly. Can be set per user/player. Opus encoding is supported
  • Translated to various languages

Translations

Navidrome uses POEditor for translations, and we are always looking for more contributors

Documentation

All documentation can be found in the project's website: https://www.navidrome.org/docs. Here are some useful direct links:

Screenshots