elliotttate / beatsaver-laravel

Rewrite of beatsaver.com (https://github.com/beatsaver/beatsaver) using the laravel framework
https://discord.gg/8B44zqM
MIT License
39 stars 19 forks source link

Add song genre field #35

Closed razzeee closed 9 months ago

razzeee commented 6 years ago

Based on @sorianog work.

I've added a table with genres, a list of those can be fetched via it's own api endpoint. Endpoints responding with a song should now also respond with a genreId and a text genre.

Frontend has been updated to ask for an genre on upload, which has to be set. Will default to the first item at the moment.

Genres will also be shown on each song item in the frontend.

I did not test what happens with songs that have no genre set, so that might cause problems at the moment.

There is also no way to change a genre on an already uploaded song.

sorianog commented 6 years ago

@razzeee Thank you so much for picking this back up and doing a lot of work with it as well! I'll keep looking at what you've done so far.

razzeee commented 6 years ago

Fixed the layout and added editing for already created songs.

We do need to figure out how to migrate the old songs. Give them a genre "None" by default and don't let anyone save new Songs with that genre.

razzeee commented 5 years ago

Rebased and added another commit that handles the migration from not having any genres on songs to having to add them. We initially set the values in our database to null, but enforce setting genre via all the frontends.

I've tested this locally migrating a database with a song from development to this version. I was able to successfully do that and add a genre on that song.

As far as I know this should be everything that's needed.

razzeee commented 5 years ago

Conflict resolved.

razzeee commented 5 years ago

Should I close this?