b7c4128b1b
* 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>
This folder abstracts metadata lookup into "agents". Each agent can be implemented to get as much info as the external source provides, by using a granular set of interfaces (see interfaces).
A new agent must comply with these simple implementation rules:
- Implement the
AgentName()method. It just returns the name of the agent for logging purposes. - Implement one or more of the
*Retriever()interfaces. That's where the agent's logic resides. - Register itself (in its
init()function).
For an agent to be used it needs to be listed in the Agents config option (default is "lastfm,spotify"). The order dictates the priority of the agents
For a simple Agent example, look at the local_agent agent source code.