394 Commits

Author SHA1 Message Date
Deluan
90eacd3d66
fix(insights): get Windows version
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:43:19 +00:00
Deluan
1a430d75e0
fix(server): change log level for some last.fm warnings
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:43:19 +00:00
Deluan
4197da3613
fix(insights): check if running in a container
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:43:18 +00:00
Deluan
e970b3670c
fix(insights): better status
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:43:18 +00:00
Deluan Quintão
4d1ed54ca9
fix(ui): don't hide Last.fm scrobble switch (#3561)
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:43:18 +00:00
Deluan Quintão
06a61c261f
fix(insights): fix issues and improve reports (#3558)
* fix(insights): show error whn reading library counts

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(insights): wait 30 mins before send first report

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(insights): send number of active players, grouped by client type

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(insights): disable reports when running in dev mode

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(insights): add Dockerfile to the docker build, to avoid `vcs.modified=true`

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(insights): add more linux fs types

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(insights): need admin permissions to retrieve library counts

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(insights): dev flag to disable player insights

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:43:18 +00:00
Deluan Quintão
ebde3d1655
feat(Insights): add anonymous usage data collection (#3543)
* feat(insights): initial code (WIP)

* feat(insights): add more info

* feat(insights): add fs info

* feat(insights): export insights.Data

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(insights): more config info

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor(insights): move data struct to its own package

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor(insights): omit some attrs if empty

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(insights): send insights to server, add option to disable

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(insights): remove info about anonymous login

Signed-off-by: Deluan <deluan@navidrome.org>

* chore(insights): fix lint

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(insights): disable collector if EnableExternalServices is false

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(insights): fix type casting for 32bit platforms

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(insights): remove EnableExternalServices from the collection (as it will always be false)

Signed-off-by: Deluan <deluan@navidrome.org>

* chore(insights): fix lint

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor(insights): rename function for consistency

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(insights): log the data sent to the collector server

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(insights): add last collection timestamp to the "about" dialog.

Also add opt-out info to the SignUp form

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(insights): only sends the initial data collection after an admin user is created

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(insights): remove dangling comment

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(insights): Translate insights messages

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(insights): reporting empty library

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor: move URL to consts.js

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:41:57 +00:00
Deluan
1c869102e6
fix(server): don't try to save JWT if it fails to encrypt
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:41:57 +00:00
Deluan
05521781a8
fix(server): encrypt jwt secret at rest
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:41:57 +00:00
Deluan
03fa2920a2
fix(server): more race conditions when updating artist/album from external sources
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:41:57 +00:00
Deluan
cdcfc99db8
fix(server): add disc number to fake path.
Also revert "feat(server): enable "Report Real Path" by default"

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:41:57 +00:00
Deluan
b7bb44cc7e
fix(server): race condition when updating artist/album from external sources
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:41:56 +00:00
Deluan
16f2f849e5
feat(server): get artist images from Last.fm
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:41:56 +00:00
Deluan
df0ba725c1
feat(server): enable "Report Real Path" by default
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:41:56 +00:00
Deluan
f7a0484874
fix: pre-cache square images, or else they are not useful for the Album Grid
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:41:56 +00:00
Deluan
0744038ead
refactor: when resizing, don't buffer the original image "just in case"
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:41:56 +00:00
Deluan
fd85b458ac
refactor: remove unnecessary intermediate buffer for ffmpeg image extraction
Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:41:56 +00:00
Deluan
17755b7676
refactor: better implementation of newRefreshQueue.
- use pointer references in channel
 - actually exits when context is canceled

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:41:55 +00:00
Deluan Quintão
54c3b8d14b
fix: forcing transcoding when client does not specify transcoding options (#3455)
* fix: wip

Signed-off-by: Deluan <deluan@navidrome.org>

* fix: revert #3227

It is not respecting the server configured transcoding for the player

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-01-02 20:41:22 +00:00
Deluan Quintão
dd94c6689b
fix(server): try to find proper embedded front cover - only for vorbis comments for now (#3348)
* fix(artwork): get the first image from vorbis comments, not the last. fixes #3254

This uses a fork for now.

* fix(artwork): prioritize getting embedded types that are listed as "front" covers

* fix: cleanup
2026-01-02 20:41:04 +00:00
Deluan
be017614c5
fix(server): allow extra spaces in transcoding commands 2026-01-02 20:41:03 +00:00
Deluan
a581e3e0c5
refactor(server): remove ffmpeg unused code 2026-01-02 20:41:03 +00:00
Caio Cotts
0d00f29104
fix(playlists): make the m3u parser case-insensitive again #3410 2026-01-02 20:41:03 +00:00
Deluan
b1893ac7c6
fix(server): FFmpegPath can contain spaces 2026-01-02 20:41:03 +00:00
Kendall Garner
b7917f14ff
fix(server): preserve m3u file order on import (#3314)
* fix(playlist): preserve m3u file order on import - 3307

Signed-off-by: Kendall Garner <17521368+kgarner7@users.noreply.github.com>

* test(server): cover playlist order

* refactor(server): micro-optimizations

* refactor(server): micro-optimizations

* fix(server): playlists imported from reader (POST /playlist) are not synced

* refactor(server): only allocate the capacity required to hold a playlist chunk

---------

Signed-off-by: Kendall Garner <17521368+kgarner7@users.noreply.github.com>
Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:40:19 +00:00
Deluan Quintão
f3f66da3da
refactor(server): replace RangeByChunks with Go 1.23 iterators (#3292)
* refactor(server): replace RangeByChunks with Go 1.23 iterators

* chore: fix comments re: SQLITE_MAX_VARIABLE_NUMBER

* test: improve playqueue test

* refactor(server): don't create a new iterator when it is not required
2026-01-02 20:39:44 +00:00
Deluan
be25753d37
fix(scanner): improve M3U playlist import times (#2706) 2026-01-02 20:39:42 +00:00
Deluan
dfe07abb72
Fix log message 2026-01-02 20:39:41 +00:00
Vlad Shulcz
20fbd7c740
refactor(core): Refactor selectTranscodingOptions function (#3227)
* refactor(core): Refactor selectTranscodingOptions function - #3226

Signed-off-by: shulcz <vshulcz@gmail.com>

* chore: Fix selectTranscodingOptions function - #3226

Signed-off-by: shulcz <vshulcz@gmail.com>

* Small refactoring to make code more concise

* Fix log message

---------

Signed-off-by: shulcz <vshulcz@gmail.com>
Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:39:14 +00:00
Deluan
a7aa4c1b52
Change DefaultPlaylistPublicVisibility to false 2026-01-02 20:39:13 +00:00
John White
53559f5ba0
feat: imported playlists are public by default (#3143)
* feat: imported playlists are public by default

* chore: make linter happy

---------

Co-authored-by: John White <john@activecode.dev>
2026-01-02 20:39:13 +00:00
Rob Emery
48154ef58b
Fixing Build/lint error: "non-constant format string in call to fmt.Errorf (govet)" (#3198)
* Fixing " non-constant format string in call to fmt.Errorf (govet)"

* Its a string, not an int; read better.
2026-01-02 20:38:44 +00:00
Deluan Quintão
819d0afd03
Upgrade Go to 1.23 (#3190)
* Upgrade to Golang 1.23rc1

* Fix imports

* Go 1.23 final version

* Fix lint compatibility with ci-goreleaser
2026-01-02 20:38:44 +00:00
Deluan
d68dc6d3d7
Reduce noise in logs when pre-caching artwork 2026-01-02 20:37:43 +00:00
Kendall Garner
a50af42872
Use userId in player, other fixes (#3182)
* [bugfix] player: use userId, other fixes

This PR primarily resolves #1928 by switching the foreign key of `player` from `user.user_name` to `user.id`.
There are also a few other fixes/changes:

- For some bizarre reason, `ip_address` is never returned from `read`/`get`. Change the field to `ip`, which works. Somehow
- Update `players_test.go` mock to also check for user agent, replicating the actual code
- Update `player_repository.go` `isPermitted` to check user id. I don't know how this worked before...
- tests!
- a few places referred to `typ`, when it is really `userAgent`. Change the field names

* baseRequest -> selectPlayer

* remove comment

* update migration, make all of persistence foreign key enabled

* maybe don't forget to save the file first
2026-01-02 20:37:43 +00:00
Deluan
89138e75f4
Evict expired items from SimpleCache 2026-01-02 20:37:15 +00:00
Deluan
843d48f448
Upgrade to ttlcache/v3 2026-01-02 20:37:15 +00:00
Deluan
10ab9cfb55
Wrap ttlcache in our own SimpleCache implementation 2026-01-02 20:37:15 +00:00
Deluan
883c6bb591
Change resized image cache key 2026-01-02 20:37:00 +00:00
Deluan
fe600067da
Fix race condition in external metadata retrieval 2026-01-02 20:37:00 +00:00
Deluan
4783fe395e
Small refactoring 2026-01-02 20:36:59 +00:00
Deluan
38a219648d
Refactor string utilities into its own package str 2026-01-02 20:36:59 +00:00
Deluan
30671bf0dc
Fix tests expectations 2026-01-02 20:36:59 +00:00
Caio Cotts
ce5a6aa4fd
Fix image stuttering (#3035)
* Fix image stuttering.

* Fix docker publishing for PRs

* Write tests for new square parameter.

* Simplify code for createImage.

---------

Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2026-01-02 20:36:59 +00:00
Deluan
47068d2dea
Optimize SQLite3 access. Mainly separate read access from write access.
Based on tips from https://archive.is/Xfjh6#selection-257.0-278.0
2026-01-02 20:36:58 +00:00
Deluan
880af2efe1
Refactor random.WeightedChooser, unsing generics 2026-01-02 20:36:57 +00:00
Deluan
e34c657e42
Simplify image format detection code 2026-01-02 20:36:57 +00:00
Deluan
e08e353763
Improve resizeImage code readability 2026-01-02 20:36:57 +00:00
Fynn Petersen-Frey
9bae65167c
fix bug in jukebox: property unavailable (#3024)
* fix bug in jukebox: property unavailable

* fix lint error
2026-01-02 20:36:57 +00:00
Deluan
af627aa18e
Refactor random functions 2026-01-02 20:36:56 +00:00