Another day, another restructuring I guess. 😅
I’ve decided to give each album an id instead of relying on it’s name as the identifier as I did previously. Also I’ve changed the Play function to work with song ids and album ids instead of names. This is because if the name of the song or the album had any of these 2 characters: ’ or “ it would mess up with the HTML structure and the song would not play if the user clicked on it.
Not gonna lie, I think that my code now is a little spaghetti and for sure someone with more experience and knowledge on how to structure a music player would have done a much better job than me at this, but still.
The main caveat that I think could appear in the future is that the Play function can’t take numbered ids for playlists and I have to rely in the playlist’s name because the function would have no way to distinguish between them at the moment and I don’t want to make another spaghetti to fix this. 😅
In other news, I have successfully changed the backend to update the DB version for the user of the older version of the app and to add the new “lyrics” column and also the app can read the embedded lyrics from the music files.
Now the “only” thing remaining is to add the lyrics to the UI and to parse the strings and make the verses synchronize with the song and this feature would be fully implemented.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.