navidrome/core/agents
Deluan 6260927074 Serve artist placeholder directly, instead of using LastFM's CDN 2022-12-30 20:14:03 -05:00
..
lastfm Refactor file type functions 2022-12-28 15:31:56 -05:00
listenbrainz Rename log.LevelCritical to log.LevelFatal 2022-12-21 14:53:36 -05:00
spotify Rename log.LevelCritical to log.LevelFatal 2022-12-21 14:53:36 -05:00
README.md Some cleanup, fixes typos and grammar errors 2022-12-06 20:09:03 -05:00
agents.go Add nilerr linter 2022-09-30 20:18:14 -04:00
agents_suite_test.go Rename log.LevelCritical to log.LevelFatal 2022-12-21 14:53:36 -05:00
agents_test.go Upgrade Ginkgo to V2 2022-07-26 16:53:17 -04:00
interfaces.go Refactor Agents to be singleton 2021-06-23 11:01:58 -04:00
placeholders.go Serve artist placeholder directly, instead of using LastFM's CDN 2022-12-30 20:14:03 -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

README.md

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 placeholders agent source code.