74 Commits

Author SHA1 Message Date
Deluan
30671bf0dc
Fix tests expectations 2026-01-02 20:36:59 +00:00
Deluan
56964b676d
Refactor cache.HTTPClient 2026-01-02 20:36:56 +00:00
Deluan
a8a14370bd
Use new slices package from Go standard lib 2026-01-02 20:33:14 +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
Deluan
c7d80128a5
Remove LastFM shared key 2026-01-02 20:31:57 +00:00
Philipp Wolfer
ea0282e8c0
Submit duration to ListenBrainz (#2405) 2026-01-02 20:27:56 +00:00
Philipp Wolfer
cd62da04f8
Fix listenbrainz submission and clarify MusicBrainz recording ID field (#2279)
* Fix MB recording ID parameter name for ListenBrainz submission

This follows the ListenBrainz API documentation.

Fixes #1657

* Rename MediaFile.MbzTrackID to MbzRecordingID

This better reflects the actual data. That the MusicBrainz
recording ID is stored in file metadata as musicbrainz_trackid
is a historical artifact.

* Rename database column mbz_track_id to mbz_recording_id
2026-01-02 20:27:27 +00:00
Deluan
9b1ff0d815
Don't retrieve Various Artists and Unknown Artist info from Last.fm 2026-01-02 20:22:24 +00:00
Deluan
69f0d85f2e
Don't try to connect to external services if artist is Unknown 2026-01-02 20:22:03 +00:00
Deluan
1ca8693a29
Add trace logs to calls to external services 2026-01-02 20:22:02 +00:00
Deluan
eb0d9d69f4
Make private methods unpublished 2026-01-02 20:21:57 +00:00
Kendall Garner
3242ae96b7
Get album info (when available) from Last.fm, add getAlbumInfo endpoint (#2061)
* lastfm album.getInfo, getAlbuminfo(2) endpoints

* ... for description and reduce not found log level

* address first comments

* return all images

* Update migration timestamp

* Handle a few edge cases

* Add CoverArtPriority option to retrieve albumart from external sources

* Make agents methods more descriptive

* Use Last.fm name consistently

Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:21:18 +00:00
Deluan
6c2562210b
Remove "Biography not available" when agents are not available 2026-01-02 20:21:16 +00:00
Deluan
d4cc09f06c
Remove size from public image ID JWT 2026-01-02 20:21:16 +00:00
Deluan
7d9de23f6c
Add local TopSongs 2026-01-02 20:21:16 +00:00
Deluan
9e87f552aa
Always access artist images through Navidrome (proxy calls to external URLs) 2026-01-02 20:21:16 +00:00
Deluan
d1cf8e9b71
Artwork reader for Artist 2026-01-02 20:21:16 +00:00
Deluan
aa5979c7ea
Add local agent, only for images 2026-01-02 20:21:16 +00:00
Deluan
e850665ebc
Serve artist placeholder directly, instead of using LastFM's CDN 2026-01-02 20:20:20 +00:00
Deluan
189ff97809
Refactor file type functions 2026-01-02 20:20:19 +00:00
Deluan
e0bfb22007
Rename log.LevelCritical to log.LevelFatal 2026-01-02 20:20:16 +00:00
Deluan
5fef41681b
Some cleanup, fixes typos and grammar errors 2026-01-02 20:19:52 +00:00
Deluan
650989c871
Some cleanup, adding missing context handling 2026-01-02 20:19:52 +00:00
Raghd Hamzeh
5d3ae98fcf
fix: send content type header in listenbrainz requests - #1944 (#1994)
fixes #1944

Signed-off-by: Raghd Hamzeh <raghd@rhamzeh.com>

Signed-off-by: Raghd Hamzeh <raghd@rhamzeh.com>
2026-01-02 20:17:21 +00:00
jan666
37ea26c7ff
Listenbrainz Scrobble (#2009)
- send SubmissionClient and SubmissionClientVersion
2026-01-02 20:16:31 +00:00
Deluan
f729efebbc
Add nilerr linter 2026-01-02 20:15:58 +00:00
Deluan
d66b04750b
Add errorlint linter 2026-01-02 20:15:58 +00:00
Deluan
03128f2b97
Fix error comparisons 2026-01-02 20:15:58 +00:00
Andy Klimczak
b560dad1bc
feat: Add listenbrainz base url configuration (#1774)
* feat: Add listenbrainz base url configuration

- ListenBrainz.BaseURL config value

* Don't need to store baseUrl

* Use `url.JoinPath` to concatenate url paths

* Replace url.JoinPath (Go 1.19 only) with custom function

Co-authored-by: Deluan <deluan@navidrome.org>
2026-01-02 20:15:29 +00:00
Deluan
90bc1981d8
Upgrade Ginkgo to V2 2026-01-02 20:14:21 +00:00
Deluan
7be85ed032
Better logging for agents configuration 2026-01-02 20:11:57 +00:00
Steve Richter
babc48c29d
Rename ListenBrainz config flag and enable by default (#1443) 2026-01-02 20:11:36 +00:00
Deluan
bc765d02af
Better logging of GetSimilar call 2026-01-02 20:09:30 +00:00
Deluan
8fb11946f9
More info in scrobbling logs 2026-01-02 20:09:03 +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
e63769051f
Remove dependency of deprecated ioutil package 2026-01-02 20:06:10 +00:00
Deluan
f4a2f59b7d
Removed unused attributes in Last.fm responses 2026-01-02 20:06:07 +00:00
Deluan
5142a842f4
Fix small lint errors found by gocritic 2026-01-02 20:06:07 +00:00
Deluan
ea2e3b692d
Fix Last.fm's artist.getInfo 2026-01-02 20:05:07 +00:00
Deluan
6d46689622
Implement Scrobble buffering/retrying 2026-01-02 20:05:07 +00:00
Deluan
b23918816d
Only show message after 2 seconds, giving time for the browser to close it first 2026-01-02 20:05:06 +00:00
Deluan
6a254c8b67
Pass userId explicitly to UserPropsRepository methods 2026-01-02 20:05:06 +00:00
Deluan
33447c73b6
Skip songs with less than 31 seconds, as per Last.fm specification
See https://www.last.fm/api/scrobbling#when-is-a-scrobble-a-scrobble
2026-01-02 20:05:05 +00:00
Deluan
a52a88d1d7
Move user properties (like session keys) to their own table 2026-01-02 20:05:05 +00:00
Deluan
541411322c
Disable completely external scrobblers if feature is disabled (DevEnableScrobble) 2026-01-02 20:05:05 +00:00
Deluan
c0f5b6950f
Don't send scrobbles/nowPlaying updates to Last.fm if user has not authorized 2026-01-02 20:05:04 +00:00
Deluan
6dbeb8fedf
Fix wrong warning about ignored NowPlaying 2026-01-02 20:05:04 +00:00
Deluan
5db24ff145
Send NowPlaying and Scrobbles to Last.fm 2026-01-02 20:05:04 +00:00
Deluan
0a9f6cb807
Refactor Agents to be singleton
Initial work for Last.fm scrobbler
2026-01-02 20:05:04 +00:00