During this week I moved the file settings from the DlgPrefMetadataDlg class to a separate class so it is easier to mantain (single responsibility principle) and add new settings. Unfortunately, it is not possible to create an interface because the DlgPrefMetadataDlg object needs to know the subclass, which defeats the purpose.
I also deleted the table view from the dialog, because I thought about it and it makes no sense to make it so extensible early. Better to use a working solution and easier solution than thinking 10 steps ahead.
I added a work in progress concurrency solution for the file listener, which needs to be improved to a dedicated thread. Since the new options already give you the metadata format string, there's no longer need for a template and factory pattern so I removed the hierarchy. Now it simply loads the string from settings.
Unfortunately, I'm delayed regarding the original planning. Which means I'll have to put extra hours to compensate.
martes, 26 de junio de 2018
lunes, 18 de junio de 2018
Week 5: 11th June - 17th June
This week I started designing a new tab in the user settings for metadata broadcast. The file listener has been refactored to use these new settings. This tab will also use a singleton that I've created that will hold all the listener services, for now. Perhaps I will move it to some class in the scrobbling manager. I also have refactored the scrobbling manager again. My goal for next week is to have the interface finished and start implementing the Last.fm scrobbler.
miércoles, 13 de junio de 2018
Week 4: 4th June - 10th June
This week I transformed the File listener into a factory and template so it can accommodate for the various file formats that broadcasting apps can use. I also modified the metadata broadcaster to only broadcast tracks that have spent 5 minutes or more unloaded, to avoid unnecessary repetitive scrobblings. I refactored the scrobbling manager class to both make it more readable (still working on this) and to allow for dependency injection. The latter is necessary to write automatic tests, to be able to introduce timer mocks. I also changed the isTrackAudible function to a strategy pattern to be able to change it at runtime. I don't know if this will be necessary but since I had to include dependency injection anyway why not make it an interface. I also wrote google tests for the scrobbling manager. I might write more tests if deemed necessary.
martes, 5 de junio de 2018
Week 3: 28th May - 3rd June
So, this week I fixed a bug that was delaying me thanks to my mentor, Daniel. This has allowed me to progress and the first tests of the scrobbling manager worked. It needs further refining but the first version is working. I've also started working on the file listener that will allow RDS apps to scrobble the metadata information. Next week I need to finish the file listener as well as thouroughly test the manager and perhaps introduce some automatic tests. This will be a bit annoying because I'll have to create interfaces to mock up elements. Overall, I'm happier about my work this week.
domingo, 27 de mayo de 2018
Week 2: 21st May - 27th May
I solved the problem I had with test headers not including the gmock headers. However, the listener that tracks the songs is taking a lot more time than expected. This is because, initially, my idea was very simple, to scrobble only one song out of every deck. However, it has been sophisticated a bit and it now takes into account which volume the track is playing at, and the duration. I feel like this will be the hardest part of the project because interacting with APIs is relatively straightforward.
domingo, 20 de mayo de 2018
Week 1: 14th May - 20th May
This week has been a bit clunky. With my german examinations going on and my bachelor's thesis, it's been a bit hard to work. But I've started to write the code that will listen for songs and send the information to any scrobblers. The details can be seen in my branch, but basically I had to modify the PlayerManager class to listen for the tracks being paused, resumed or loaded. I also had to add new functionality to the Track class, now it keeps score on its played time. This is because most scrobbling services ask that you only send the listen when the song is halfway finished, to ensure that it is a true listen.
Also, I've run into an obstacle. I've created some tests for this new functionality in Track but I have to configure SCons to include gmock when compiling moc cpp files, because it doesn't right now.
Next week I intent to solve this problem and implement the file text listener, if everything goes smoothly.
Also, I've run into an obstacle. I've created some tests for this new functionality in Track but I have to configure SCons to include gmock when compiling moc cpp files, because it doesn't right now.
Next week I intent to solve this problem and implement the file text listener, if everything goes smoothly.
Suscribirse a:
Entradas (Atom)