Merge branch '2322-troi-frontend' into 'develop'

draft : Build troi frontend radio (#2322)

See merge request funkwhale/funkwhale!2789
This commit is contained in:
petitminion 2025-05-24 13:30:15 +00:00
commit 07f67266ee
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
# Troi Frontend
## The issue
We have troi implemented in the backend. We need a way for user to use the radio through the ui. The troi radio takes a patch name and a list of argument for this patch. But this can change a lot depending on the troi version and maintaining this manually could cost a lot of efforts.
## Proposed solution
Gather the list of available patch and the description theirs arguments from troi dyanmically. Diplay them in the UI, allowing the users to generate their own radios for any troi version.
On top of this add two built-in troi radio using periodic-jam patch :
- One in the "Explore" section with this arguments : {"type": "weekly-exploration", "jam_date": "today"}
- One in the "My library" section with this arguments : {"type": "daily-jams", "jam_date": "today"}
## Feature behavior
### Frontend
Add a new division in `/library/radios/build` for building troi radios.
It should containt a list of avalainle patchs. When a patch is selected, a list of arguments should be displayed
### Backend
Add a new Troi radio endpoint GET `/api/v1/radios/radios/troi/`. Should return a dict containing the list of patchs and related arguments :
`[{"patch": "daily-jams", "patch_argument": "patch_arguement_value"}]`