16 Commits

Author SHA1 Message Date
Deluan
6e59060a01 fix: prevent double initialization of agents
Modify the createAgents function to call each agent constructor only once.\n\nPreviously, the constructor (init(ds)) was called first to check if the\nagent could be initialized, and then called again when appending the agent\nto the result slice. This caused unnecessary work and duplicate log messages.\n\nThe fix stores the result of the first call in the 'agent' variable and\nreuses this instance when appending, ensuring each constructor runs only once.
2025-04-19 13:01:41 -04:00
Deluan
0372339e1b fix(server): only build core.Agents once
Signed-off-by: Deluan <deluan@navidrome.org>
2025-03-05 14:18:27 -08:00
Deluan
a04167672c fix(server): remove misleading "Agent not available" warning.
Signed-off-by: Deluan <deluan@navidrome.org>
2025-03-05 14:11:44 -08:00
Deluan
51e07d4cb5 Add log.IsGreaterOrEqualTo, that take into consideration path-scoped log levels 2023-12-25 16:35:16 -05:00
Deluan
3ce3185118 Don't retrieve Various Artists and Unknown Artist info from Last.fm 2023-02-04 21:18:51 -05:00
Deluan
cf04db7a98 Don't try to connect to external services if artist is Unknown 2023-02-02 10:57:37 -05:00
Kendall Garner
93adda66d9
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>
2023-01-17 20:22:54 -05:00
Deluan
bf461473ef Add local agent, only for images 2023-01-13 22:18:34 -05:00
Deluan
f82df70302 Add nilerr linter 2022-09-30 20:18:14 -04:00
Deluan
20cdd38fc4 Better logging for agents configuration 2021-11-25 15:48:32 -05:00
Deluan
d3a2f769b7 Better logging of GetSimilar call 2021-11-03 15:59:16 -04:00
Deluan
b0fc684cb6 Fix small lint errors found by gocritic 2021-07-15 13:43:03 -04:00
Deluan
d5461d0ae9 Refactor Agents to be singleton
Initial work for Last.fm scrobbler
2021-06-23 11:01:58 -04:00
Deluan
f9eec5e4dc Refactored agents calling into its own struct 2021-06-08 17:00:02 -04:00
Deluan
28cdf1e693 Add a cached http client 2021-02-08 16:54:51 -05:00
Deluan
9d24106066 Incomplete implementation of agents 2021-02-08 16:54:51 -05:00