quintodrome/core/agents/lastfm
maya doshi b7c4128b1b
fix(server): Lastfm.ScrobbleFirstArtistOnly also only scrobbles the first artist of the album (#4762)
* feat(server): add option Lastfm.ScrobbleFirstAlbumArtistOnly to send only the first album artist

* fix: remove config parameter scrobbleFirstAlbumArtist

* test: add NowPlaying test for ScrobbleFirstArtistOnly

Add a test case for the NowPlaying function when ScrobbleFirstArtistOnly is enabled. This ensures that only the first artist from the Participants list is sent to Last.fm for both artist and album artist fields, matching the existing test coverage for the Scrobble function.

* refactor: consolidate getArtistForScrobble and getAlbumArtistForScrobble

Merge the separate getArtistForScrobble and getAlbumArtistForScrobble functions into a single parameterized function. This eliminates code duplication and makes the scrobble artist handling logic more maintainable. The function now accepts a role parameter and display name, allowing it to handle both artist and album artist extraction based on the ScrobbleFirstArtistOnly configuration.

---------

Co-authored-by: Deluan <deluan@navidrome.org>
2025-12-03 15:55:25 -05:00
..
agent.go fix(server): Lastfm.ScrobbleFirstArtistOnly also only scrobbles the first artist of the album (#4762) 2025-12-03 15:55:25 -05:00
agent_test.go fix(server): Lastfm.ScrobbleFirstArtistOnly also only scrobbles the first artist of the album (#4762) 2025-12-03 15:55:25 -05:00
auth_router.go fix(ui): don't hide Last.fm scrobble switch (#3561) 2024-12-19 09:08:28 -05:00
client.go feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
client_test.go feat(bfr): Big Refactor: new scanner, lots of new fields and tags, improvements and DB schema changes (#2709) 2025-02-19 20:35:17 -05:00
lastfm_suite_test.go Rename log.LevelCritical to log.LevelFatal 2022-12-21 14:53:36 -05:00
responses.go Get album info (when available) from Last.fm, add getAlbumInfo endpoint (#2061) 2023-01-17 20:22:54 -05:00
responses_test.go Upgrade Ginkgo to V2 2022-07-26 16:53:17 -04:00
token_received.html Only show message after 2 seconds, giving time for the browser to close it first 2021-06-25 22:23:35 -04:00