* feat: Add listenbrainz base url configuration
- ListenBrainz.BaseURL config value
* Don't need to store baseUrl
* Use `url.JoinPath` to concatenate url paths
* Replace url.JoinPath (Go 1.19 only) with custom function
Co-authored-by: Deluan <deluan@navidrome.org>
* None is deprecated and will fallback to Lax in the future.
* Using Strict is future proof and provides additional CSR protection
Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com>
Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com>
* Adding 'x-content-duratin' and 'x-total-count' to CORS exposed headers
* Moving cors setup to middlewares.go
* adding x-nd-authorization to exposed headers
* Refactor session_keys to its own package
* Adjust play_tracker
- Don't send external NowPlaying/Scrobble for tracks with unknown artist
- Continue to the next agent on error
* Implement ListenBrainz Agent and Auth Router
* Implement frontend for ListenBrainz linking
* Update listenBrainzRequest
- Don't marshal Player to json
- Rename Track to Title
* Return ErrRetryLater on ListenBrainz server errors
* Add tests for listenBrainzAgent
* Add tests for ListenBrainz Client
* Adjust ListenBrainzTokenDialog to handle errors better
* Refactor listenbrainz.formatListen and listenBrainzRequest structs
* Refactor agent auth_routers
* Refactor session_keys to agents package
* Add test for listenBrainzResponse
* Add tests for ListenBrainz auth_router
* Update ListenBrainzTokenDialog and auth_router
* Adjust player scrobble toggle
* Add function 'isSynced' that identifies if lyrics are synced or not and add tests for the same
* implement 'getLyrics' which returns lyrics if they exist
Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>
* remove timestamps frorom the the lyrics if they are synced, fix filters & clean up code
Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>
* add snapshot tests for the 'Lyrics' response & add some clean up
Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>
* add tests for 'GetLyrics' function
Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>
* update the snapshot test & the test for 'GetLyrics' function
Signed-off-by: Dheeraj Lalwani <lalwanidheeraj1234@gmail.com>