45 Commits

Author SHA1 Message Date
Deluan
58a9ccf00b
Add support for listening on Unix socket.
For that to work, specify the config option `Address` with `unix:/path/to/socket/file`.

Closes #1477
2026-01-02 20:25:33 +00:00
Deluan
27773f8ab7
Add option to load TLS cert/key, and use HTTPS 2026-01-02 20:24:48 +00:00
Deluan
b9115b85e2
Add pprof endpoint, disabled by default 2026-01-02 20:24:48 +00:00
Aleksey Lobanov
a808c0f868
Base SQL metrics in MetricsWorker (#2002)
* feat: Add metrics worker

* refactor: Add todos for useful for metrics methods

* feat: Run MetricsWorker is Prometheus is Enabled

* refactor: Unused low-level variable was removed in metrics

* feat: No worker for metrics, add more

* refactor: Unnecessary todo removed

* refactor: Remove dead unused constant

* Reduce metrics public interface

Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:22:01 +00:00
Deluan
b2aac87d1d
More work on Shares 2026-01-02 20:21:58 +00:00
Deluan
04abdf4509
Initial work on Shares 2026-01-02 20:21:58 +00:00
Deluan
e19cdb100f
Use constant 2026-01-02 20:21:57 +00:00
Deluan
373d139fe2
Add public endpoint to expose images 2026-01-02 20:21:16 +00:00
Deluan
c4d13acadb
Fix background images when BaseURL is specified 2026-01-02 20:17:48 +00:00
Deluan
bac1a22a68
Host default login background images in Navidrome's own website 2026-01-02 20:17:21 +00:00
Deluan
7028cc05f5
Compress more http content-types.
Also, some minor refactoring
2026-01-02 20:17:20 +00:00
Deluan
34bd983ef5
Shutdown gracefully, close DB connection 2026-01-02 20:16:00 +00:00
Aleksey Lobanov
4febbefe0b
Add basic Prometheus metrics handler (#1830)
* feat: Add Prometheus configuration options

* feat: Add Prometheus metrics handler

* build: prometheus became direct dependency

* docs: change description for prometheus metrics path
2026-01-02 20:15:58 +00:00
Deluan
e6ba5a2229
Only compute version once 2026-01-02 20:14:54 +00:00
Ian Kerins
69699df961
Fix signaler not exiting on cancel (#1638)
* fix: make signaler exit on cancel

`break` is incorrect here, as it just breaks out of the select.
`return` to exit the function instead.

Fixes #1636.

Signed-off-by: Ian Kerins <ianskerins@gmail.com>

* fix: exit non-zero on fatal error

Signed-off-by: Ian Kerins <ianskerins@gmail.com>
2026-01-02 20:11:59 +00:00
Steve Richter
babc48c29d
Rename ListenBrainz config flag and enable by default (#1443) 2026-01-02 20:11:36 +00:00
Steve Richter
310ce67c2e
Listenbrainz scrobbling (#1424)
* Refactor session_keys to its own package

* Adjust play_tracker

- Don't send external NowPlaying/Scrobble for tracks with unknown artist
- Continue to the next agent on error

* Implement ListenBrainz Agent and Auth Router

* Implement frontend for ListenBrainz linking

* Update listenBrainzRequest

- Don't marshal Player to json
- Rename Track to Title

* Return ErrRetryLater on ListenBrainz server errors

* Add tests for listenBrainzAgent

* Add tests for ListenBrainz Client

* Adjust ListenBrainzTokenDialog to handle errors better

* Refactor listenbrainz.formatListen and listenBrainzRequest structs

* Refactor agent auth_routers

* Refactor session_keys to agents package

* Add test for listenBrainzResponse

* Add tests for ListenBrainz auth_router

* Update ListenBrainzTokenDialog and auth_router

* Adjust player scrobble toggle
2026-01-02 20:09:02 +00:00
Deluan
d09d874dbb
Simplify resources code, enabling any resource to be overridden (not just translations) 2026-01-02 20:09:01 +00:00
Deluan
39915e1da9
Fix harmless error message in logs when ScanSchedule set was "0"
Message:
`ERRO[0000] Error scheduling periodic scan                error="expected exactly 5 fields, found 1: [0]"`
2026-01-02 20:08:01 +00:00
Deluan
3085484848
Change initial scan message log level 2026-01-02 20:06:08 +00:00
Deluan
75cc2580b7
Disable Last.FM features based on LastFM.Enabled config option 2026-01-02 20:05:07 +00:00
Deluan
6d46689622
Implement Scrobble buffering/retrying 2026-01-02 20:05:07 +00:00
Deluan
883d316670
Use singleton in other places as well 2026-01-02 20:05:04 +00:00
Deluan
f468522c72
Implement Last.FM Desktop Auth flow endpoints 2026-01-02 20:05:04 +00:00
Deluan
7fd15e12cd
Rename app package to nativeapi 2026-01-02 20:00:50 +00:00
Deluan Quintão
5be15bb98b
Refactor routing, changes API URLs (#1171)
* Make authentication part of the server, so it can be reused outside the Native API

This commit has broken tests after a rebase

* Serve frontend assets from `server`, and not from Native API

* Change Native API URL

* Fix auth tests

* Refactor server authentication

* Simplify authProvider, now subsonic token+salt comes from the server

* Don't send JWT token to UI when authenticated via Request Header

* Enable ReverseProxyWhitelist to be read from environment
2026-01-02 20:00:31 +00:00
Deluan
9f46738f73
Change back mounting order, for better logs 2026-01-02 19:31:11 +00:00
Deluan
7b38e33b26
Show name of router in log 2026-01-02 19:31:11 +00:00
Deluan
d3edef8390
Schedule periodic scan before starting initial scan 2026-01-02 19:26:44 +00:00
Deluan
d2d780918b
Breaking change: Add ScanSchedule, allows interval and cron based configurations.
See https://pkg.go.dev/github.com/robfig/cron#hdr-CRON_Expression_Format for expression syntax.

`ScanInterval` will still work for the time being. The only situation it does not work is when you want to disable periodic scanning by setting `ScanInterval=0`. If you want to disable it, please set `ScanSchedule=""`

Closes #1085
2026-01-02 19:26:43 +00:00
Deluan
b9e8ae07d3
Less waiting for cache to be ready 2026-01-02 19:26:41 +00:00
Deluan
ddae77c3ac
Fix SIGUSR1 work when ScanInterval=0 2026-01-02 19:26:41 +00:00
Deluan
10cf2372f8
Move project to Navidrome GitHub organization 2026-01-02 19:20:16 +00:00
Deluan
971728dfd5
Replace periodic scanner cancellation channel with a context 2026-01-02 19:20:13 +00:00
Deluan
8c0cbeffbb
Simplify scanner utilization 2026-01-02 19:18:59 +00:00
Deluan
01b5871218
Implements library scanning endpoints. Also:
- Bumped Subsonic API version to 1.15:
- Better User/Users Subsonic endpoint implementations, not final though
2026-01-02 19:18:26 +00:00
Deluan
002bfccfaa
Add scanner status 2026-01-02 19:17:32 +00:00
Deluan
bd68dbd438
Add better process lifecycle management 2026-01-02 19:17:32 +00:00
Deluan
28d1428c90 Add option to disable .m3u auto-import 2020-08-02 23:17:13 -04:00
Deluan
7c3fd38559 Add option to change IP address to bind 2020-07-08 20:54:56 -04:00
Deluan
3a7d70c908 Add scan command 2020-07-03 10:49:11 -04:00
Deluan
ef9af6ed1a Don't fail if config file isnot found 2020-07-03 09:39:28 -04:00
Deluan
99e269208e Fix lint errors 2020-07-02 18:17:31 -04:00
Deluan
a65c9bbb16 Refactor and clean up 2020-07-02 17:53:51 -04:00
Deluan
5021c0fd0c Replace multiconfig with cobra+viper 2020-07-02 17:53:51 -04:00