You are browsing as a guest. Sign up (or log in) to start making projects!

32h 31m 53s logged

After a development pause, here are the various changes made.

Also, I never mentioned it, but this project was made by students focused on the school environment.

(This time I finally got around to writing the devlog myself):

Structure

  • Moved main.py to the root
  • Replaced mysql-connector with the official version: The added library was a version I didn’t recognize; I added the official one instead.

Cleanup

  • Removed some Code that wasnt being used.

Backend

  • Change the return value of the SQL cursor: Previously, the cursor returned an array, but for code readability and security, I opted to change it to an array.
  • Structured Error 404: The backend used abort in certain parts, but it returns HTML and certain parts of the frontend expected JSON, so I formatted the abort to JSON. This caused a headache, I hadn’t tested it (again lol) and when I saw it, it was time to present the project at school and I was having this error.

frontend

  • Fixed the CoverFlow component: An error went unnoticed in the creation of the component, this made the size and spacing of the images look strange, it was fixed to a certain extent.

  • I implemented a new playback policy: The text about it got so long that I decided to open an extra topic.

Playback Policy

Now it search for the requested emotion + genre that the user choose, If It fails It search Just for the genre, if It fails again it search for anything.
Now it falls into a fallback:

This policy change was motivated by having to find a song to show in a presentation and failing. I reflected that if it was annoying for me, it would be for the end user (students) as well.

Database

  • Added new songs: I added 50 extras and their respective genres/emotions. (Also i wrote some helpers in python to help me categorize and search for the musics in youtube and get and structured sql output, that took quite a while)
  • Saved the songs locally: Topic local saving

Local saving

But why would saving the songs in the cloud be a problem?
Nothing comes for free, the server we were using to host the music had a monthly access limit, which was a silent problem that, thankfully, was noticed before it happened.

My mistake, I didn’t even think about the possibility of saving locally and went straight to saving in the cloud, it must have been due to haste and inattention (always plan well what you are going to do before you do it, weigh the risks and benefits).
Now, how it works

  • The audios are saved inside the /storage folder.
  • The database still saves the location, but this time it saves the relative path (e.g., /explication_audiis/fun_audio.extension). Why save the folder path as well? Won’t the audios always be there?

Yes, but at some point the path might change (e.g., explication_source/youtube/audio_legal.extension).

Future plans

  • I’m going to improve my devlogs lol, this one got huge
0
9

Comments 0

No comments yet. Be the first!