quintodrome/core/agents
Deluan 55966ba5ec feat(agents): add ID field to Artist and Song structs with direct matching
Add ID field to Artist and Song structs in the agents package. When resolving
similar artists and top songs, the provider now uses a three-phase lookup:
1. Direct ID match (if agent returns internal Navidrome IDs)
2. MBID exact match (if MusicBrainz ID is available)
3. Fuzzy name/title match (existing behavior)

This enables agents to return more precise matches when they have access to
internal database IDs, while maintaining backward compatibility with
name-based matching.
2026-01-11 17:06:25 -05:00
..
deezer fix(deezer): add order parameter to artist search for improved ranking 2025-12-10 13:31:24 -05:00
lastfm fix(server): Lastfm.ScrobbleFirstArtistOnly also only scrobbles the first artist of the album (#4762) 2025-12-03 15:55:25 -05:00
listenbrainz feat(plugins): experimental support for plugins (#3998) 2025-06-22 20:45:38 -04:00
spotify fix(server): remove misleading "Agent not available" warning. 2025-03-05 14:11:44 -08:00
agents.go feat(deezer): Add artist bio, top tracks, related artists and language support (#4720) 2025-11-21 15:09:24 -05:00
agents_plugin_test.go refactor: streamline agents logic and remove unnecessary caching (#4298) 2025-07-05 10:11:35 -03:00
agents_suite_test.go Rename log.LevelCritical to log.LevelFatal 2022-12-21 14:53:36 -05:00
agents_test.go refactor: streamline agents logic and remove unnecessary caching (#4298) 2025-07-05 10:11:35 -03:00
interfaces.go feat(agents): add ID field to Artist and Song structs with direct matching 2026-01-11 17:06:25 -05:00
local_agent.go Get album info (when available) from Last.fm, add getAlbumInfo endpoint (#2061) 2023-01-17 20:22:54 -05:00
README.md Add local agent, only for images 2023-01-13 22:18:34 -05:00
session_keys.go Listenbrainz scrobbling (#1424) 2021-10-30 12:17:42 -04:00
session_keys_test.go Upgrade Ginkgo to V2 2022-07-26 16:53:17 -04:00

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:

  1. Implement the AgentName() method. It just returns the name of the agent for logging purposes.
  2. Implement one or more of the *Retriever() interfaces. That's where the agent's logic resides.
  3. 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.