575 Commits

Author SHA1 Message Date
Deluan
59aaf56b0d
Increase artist image url sizes.
See https://support.symfonium.app/t/artist-picture-less-compressed/4447
2026-01-02 20:37:00 +00:00
Deluan
c48d3b3526
Replace gg.If with cmp.Or 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
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
Drew Weymouth
1247cb5174
Fix XML marshaling of OpenSubsonic structured lyrics (#3041) 2026-01-02 20:36:58 +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
c98da13299
Fix G404 gosec lint error 2026-01-02 20:36:58 +00:00
Guilherme Souza
c9a39d9986
Deterministic pagination in random albums sort (#1841)
* Deterministic pagination in random albums sort

* Reseed on first random page

* Add unit tests

* Use rand in Subsonic API

* Use different seeds per user on SEEDEDRAND() SQLite3 function

* Small refactor

* Fix id mismatch

* Add seeded random to media_file (subsonic endpoint `getRandomSongs`)

* Refactor

* Remove unneeded import

---------

Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:36:58 +00:00
Deluan
b8ac62a13b
Fix lint error 2026-01-02 20:36:57 +00:00
Deluan
ffbc1cebd4
Associate main entities with library 2026-01-02 20:36:57 +00:00
Deluan
82e79073cd
Store MusicFolder as a library in DB 2026-01-02 20:36:57 +00:00
Deluan
b0f6a395a8
Rename MediaFolder to Library 2026-01-02 20:36:57 +00:00
Deluan
7057bd104d
Refactor to use more Go 1.22 features 2026-01-02 20:36:56 +00:00
Deluan
5d8b10635e
Simplify random.Int64 usage with generics 2026-01-02 20:36:56 +00:00
Deluan
af627aa18e
Refactor random functions 2026-01-02 20:36:56 +00:00
Deluan
2b13262b25
Uses Unix milliseconds support from standard Go lib 2026-01-02 20:36:56 +00:00
Deluan
0a5c72e8f2
Add samplingRate to OpenSubsonic responses 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
14a379e16c
Replace sync.WaitGroup with more appropriate errgroup.Group 2026-01-02 20:36:55 +00:00
Deluan
6640509044
Make dependency injection more consistent 2026-01-02 20:36:55 +00:00
Deluan
ad89e02a93
Limit access to Jukebox for admins only (configurable).
Closes #2849
2026-01-02 20:36:54 +00:00
Deluan
3459141f8c
Add HTTPSecurityHeaders.CustomFrameOptionsValue option.
Requested in https://github.com/navidrome/navidrome/issues/248#issuecomment-1783768985
2026-01-02 20:36:33 +00:00
Deluan
044ef35d8e
Fix int types in OpenSubsonic responses.
Refer to https://support.symfonium.app/t/symfonium-sync-crashes-when-tpos-is-not-an-int/4204
2026-01-02 20:35:32 +00:00
Deluan
88b7165362
Load mime_types from external file 2026-01-02 20:35:32 +00:00
crazygolem
7c196d544f
Add support for Reverse Proxy auth in Subsonic endpoints (#2558)
* feat(subsonic): Add support for Reverse Proxy auth - #2557

Signed-off-by: Jeremiah Menétrey <superjun1@gmail.com>

* Small refactoring

---------

Signed-off-by: Jeremiah Menétrey <superjun1@gmail.com>
Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2026-01-02 20:35:31 +00:00
Deluan
281f611c0e
Add OpenSubsonic channelCount 2026-01-02 20:35:04 +00:00
crazygolem
b75b09e8da
Use the RealIP middleware also behind a reverse proxy (#2858)
* Use the RealIP middleware only behind a reverse proxy

* Fix proxy ip source in tests

* Fix test for PR#2087

The PR did not update the test after changing the behavior, but the test still
passed because another condition was preventing the user from being created in
the test.

* Use RealIP even without a trusted reverse proxy

* Use own type for context key

* Fix casing to follow go's conventions

* Do not apply RealIP middleware twice

* Fix IP source in logs

The most interesting data point in the log message is the proxy's IP, but
having the client IP too can help identify integration issues.
2026-01-02 20:35:04 +00:00
Deluan
76a906d2d2
Fix DiscTitle OpenSubsonic compatibility. Closes #2929 2026-01-02 20:34:24 +00:00
Kendall Garner
25ef1b25d0
Expose OpenSubsonic release date for album (#2906)
* [enhancement]: OS expose release date for album, make original optional

* not optional

* remove omitempty
2026-01-02 20:34:24 +00:00
Deluan
a0bac6c068
Send Subsonic formatted response on marshalling errors 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
fd25dbfaa3
Return 500 in case of Subsonic response marshalling errors 2026-01-02 20:33:00 +00:00
Deluan
9a54740bad
Handle "Infinity" values for ReplayGain. Fix #2862 2026-01-02 20:33:00 +00:00
Deluan
a91aa246da
Don't swallow marshalling errors in the Subsonic API 2026-01-02 20:32:59 +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
d238a3ae5c
Don't expose Last.fm API Key in the index.html 2026-01-02 20:32:59 +00:00
Deluan
573a3c7f25
Make Subsonic search query default to "" if not present.
See https://github.com/orgs/music-assistant/discussions/414#discussioncomment-8265985
2026-01-02 20:32:59 +00:00
Deluan
57b3e22067
Simplify default middlewares setup 2026-01-02 20:32:58 +00:00
Deluan
5824737dc9
Simplify RealIP middleware setup 2026-01-02 20:32:58 +00:00
Johannes Engl
74deddef91
Make server unix socket file permission configurable via flag UnixSocketPerm (#2763)
* feat(any): Add flag unixsocketperm with default 0017 - #2625

Signed-off-by: johannesengl <hello@johannesengl.com>

* feat(server): Update unix socket file perm based on config - #2625

Signed-off-by: johannesengl <hello@johannesengl.com>

* Fix default value of socket.

* Refactor unix socket file creation.

* Remove misplaced comment

---------

Signed-off-by: johannesengl <hello@johannesengl.com>
Co-authored-by: Caio Cotts <caio@cotts.com.br>
Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:32:38 +00:00
Deluan
faed89622d
Fix ReplayGain values not being retrieved from DB 2026-01-02 20:32:37 +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 Quintão
7eefae4a7c
Implement originalReleaseDate in OpenSubsonic responses. (#2733)
See https://github.com/opensubsonic/open-subsonic-api/pull/80
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
Deluan
b932d0cbf1
Add req.Params to replace utils.Param* 2026-01-02 20:32:36 +00:00
Deluan
add688e594
Some cleanup in the jukebox code, specially log messages 2026-01-02 20:32:35 +00:00
Deluan
917b974100
Change required fields in Subsonic Jukebox endpoint
See discussion here: https://gitlab.com/ultrasonic/ultrasonic/-/issues/1266#note_1621953651
2026-01-02 20:32:35 +00:00
Deluan
4ef7fd2e9c
Fix possible authentication bypass 2026-01-02 20:32:35 +00:00
Kendall Garner
ed43e620cf
Allow reverse proxy auth for unix socket (#2701) 2026-01-02 20:32:24 +00:00