369 Commits

Author SHA1 Message Date
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
Deluan
56964b676d
Refactor cache.HTTPClient 2026-01-02 20:36:56 +00:00
Deluan
d68cdac3d2
Do not panic if when updatePlaylist is called with a non-existent ID.
Fix #2876
2026-01-02 20:36:55 +00:00
Deluan Quintão
9e9f72ae8a
Make sorting lists by name/title case-insensitive (#2993)
* Make sort by order_* fields case-insensitive.

* Sort internet radios by name case-insensitive
2026-01-02 20:36:55 +00:00
Deluan Quintão
9ff3145845
Terminate all MPV instances when stopping Navidrome (#3008)
* Terminate all mpv instances when stopping Navidrome

* Exit trackSwitcher goroutine when terminating

* Remove potential race condition when starting the Playback device

* Fix lint error

* Removed unused and unneeded vars/functions

* Use device short name in log

* Small refactor

* Small nitpick

* Make start functions more uniform
2026-01-02 20:36:55 +00:00
Deluan
6640509044
Make dependency injection more consistent 2026-01-02 20:36:55 +00:00
Matthias Schmidt
7cd38f9742
Guard against missing active track (#2996)
Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2026-01-02 20:36:35 +00:00
Matthias Schmidt
2c6216817d
Persist adjusted volume (#2997)
Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2026-01-02 20:36:35 +00:00
Deluan
02604f0cfb
Allow comments in the NSP file.
See comment https://github.com/navidrome/navidrome/issues/1417#issuecomment-2064731407
2026-01-02 20:35:03 +00:00
Deluan
b9e273bcf7
Fix issue in https://github.com/navidrome/navidrome/issues/2767#issuecomment-2065636352 2026-01-02 20:35:03 +00:00
Jonathan
2e0daf03db
Externalize MPV command template (#2948)
* externalise MPVTemplate

* Remove unnecessary comment

---------

Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:35:03 +00:00
Andrew Katsikas
da76a24539
Fix jukebox mode under Windows (#2774)
* bug(core/playback/mpv): jukebox mode under windows - #2767

Use named pipe for socket path under windows during mpv playback, change function name, unexport function

Signed-off-by: apkatsikas <apkatsikas@gmail.com>

* bug(core/playback/mpv): jukebox mode under windows - #2767

Fix typo

Signed-off-by: apkatsikas <apkatsikas@gmail.com>

* bug(core/playback/mpv): jukebox mode under windows - navidrome#2767

Early return for Close on Windows

Signed-off-by: apkatsikas <apkatsikas@gmail.com>

* bug(core/playback/mpv): jukebox mode under windows - navidrome#2767

Update import and run prettier

Signed-off-by: apkatsikas <apkatsikas@gmail.com>

* bug(core/playback/mpv): jukebox mode under windows - navidrome#2767

Update function name

Signed-off-by: apkatsikas <apkatsikas@gmail.com>

* bug(core/playback/mpv): jukebox mode under windows - navidrome#2767

Create track_close files for both platforms and move MpvTrack Close into new file

Signed-off-by: apkatsikas <apkatsikas@gmail.com>

* bug(core/playback/mpv): jukebox mode under windows - navidrome#2767

Create SocketName function for both platforms, restore name of TempFileName

Signed-off-by: apkatsikas <apkatsikas@gmail.com>

* bug(core/playback/mpv): jukebox mode under windows - navidrome#2767

Add missing params to SocketName on windows

Signed-off-by: apkatsikas <apkatsikas@gmail.com>

* Unexport SocketName, use socketName in NewTrack

---------

Signed-off-by: apkatsikas <apkatsikas@gmail.com>
2026-01-02 20:35:03 +00:00
oftenoccur
d03d0e4d61
Fix some typos in comments (#2949)
Signed-off-by: oftenoccur <ezc5@sina.com>
2026-01-02 20:35:02 +00:00
Deluan
d642d6f60f
Move TempFileName to utils 2026-01-02 20:33:14 +00:00
Deluan
58fe792d0d
Show taglib and ffmpeg versions in the log 2026-01-02 20:33:14 +00:00
Deluan
a8a14370bd
Use new slices package from Go standard lib 2026-01-02 20:33:14 +00:00
Deluan
bb0c49e8ba
Use Go builtin min/max func 2026-01-02 20:33:14 +00:00
Deluan
d7b7626488
Bump github.com/jellydator/ttlcache/v2 to v2.11.1 2026-01-02 20:33:14 +00:00
Caio Cotts
b57ba9e232
Fix null values in DB (#2840)
* Fix album image_files being null.

* Fix small nitpick.

* Use ExecContext instead of Exec.

* Change more columns to not null and set default values.

* Remove columns that don't need to be changed from migration.

* Fix typo.

* Remove unnecessary select statements.

* Remove duplicate code.

* Do not apply changes to radio table.

* Do not apply changes full_text columns and respective indexes.

* Fix musicbrainz columns.

* Rename migration.

* Make ExternalInfoUpdatedAt nullable

* Make Share's timestamps nullable

---------

Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2026-01-02 20:32:59 +00:00
Deluan
631e26eb70
Improve some Jukebox error messages 2026-01-02 20:32:58 +00:00
Kendall Garner
044c8c09ac
Add OS Lyrics extension (#2656)
* draft commit

* time to fight pipeline

* round 2 changes

* remove unnecessary line

* fight taglib. again

* make taglib work again???

* add id3 tags

* taglib 1.12 vs 1.13

* use int instead for windows

* store as json now

* add migration, more tests

* support repeated line, multiline

* fix ms and support .m, .mm, .mmm

* address some concerns, make cpp a bit safer

* separate responses from model

* remove [:]

* Add trace log

* Try to unblock pipeline

* Fix merge errors

* Fix SIGSEGV error (proper handling of empty frames)

* Add fallback artist/title to structured lyrics

* Rename conflicting named vars

* Fix tests

* Do we still need ffmpeg in the pipeline?

* Revert "Do we still need ffmpeg in the pipeline?"

Yes we do.

This reverts commit 87df7f6df79bccee83f48c4b7a8118a7636a5e66.

* Does this passes now, with a newer ffmpeg version?

* Revert "Does this passes now, with a newer ffmpeg version?"

No, it does not :(

This reverts commit 372eb4b0ae05d9ffe98078e9bc4e56a9b2921f32.

* My OCD made me do it :P

---------

Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2026-01-02 20:32:37 +00:00
Deluan
0d18620030
Add log.IsGreaterOrEqualTo, that take into consideration path-scoped log levels 2026-01-02 20:32:37 +00:00
Deluan
81bf9d23e4
Replace all utils.Param* with req.Params 2026-01-02 20:32:36 +00:00
Dany Marcoux
8382ecf64c
Remove beep and the files where it was imported (#2731)
Beep isn't needed anymore since we rely on MPV instead.

The changes to `go.mod` and `go.sum` were done with:
```
go get github.com/faiface/beep@none
go mod tidy
```

Signed-off-by: Dany Marcoux <git@dmarcoux.com>
2026-01-02 20:32:36 +00:00
Deluan
656c383e1a
Fix mpvipc dependency 2026-01-02 20:32:35 +00:00
Deluan
add688e594
Some cleanup in the jukebox code, specially log messages 2026-01-02 20:32:35 +00:00