Create a testing environment in production for ListenBrainz recommendation engine (troi-recommendation-playground)
There is various commits implementing various things :
- a task to match fw tracks to mb
- a new radio system for troi patches (base on the config attribute of the radio model, and following the logic of the radios filters)
- a modification of the lb pluging to allow to add a user name. A way to retreive the user name for the radio generation
- cache the queryset in redis. (if this proove efficient I will implement this for all radio by changing direction the SessionRadio class
- use https://github.com/metabrainz/listenbrainz-matching-tools for better matching (see https://forum.funkwhale.audio/d/286-troi-recommendation-system/69 )
Note : The goal of this mr is to implement only the backend solution of this implementation to be able to test if this work with the music tracks of the fw network or not.
To test :
curl --user y:y -H "Content-Type: application/json" -X POST "https://node1.funkwhale.test/api/v1/radios/sessions" -d '{"radio_type":"troi_multiple", "config":"{ \"patch\":\"new_jams\", \"user_name\":\"lb_user_name\"}"}'
curl --user y:y -H "Content-Type: application/json" -X POST "https://node1.funkwhale.test/api/v1/radios/tracks" -d '{"session": $session_number}'
note : the user_name can be set in the listenbrainz pluging. If set in pluging, priority is given to the it and not to the http request
part of #1861 (closed)