Style fixes
Working on refactoring the album module
Some fixes on the overall structure, almost ready to test the changes to watch for bugs and then implement the showing policies
Massive cleanup + reimplementing some stuff to get along with the new application model
Initial behavior working now, it shows the albums on the screen. It takes a while to fully load the albums but it works
Added some changes to allow the album to insert itself in a determined position
Removed the sort_by parameter since it's not used anywhere. Gotta keep working on fixing all the other functionalitty with the new managers model.
Fixed filtering
Rewrote the Album class to be more small and don't work with things that aren't related to it (for instance, working with the model). Added a Track class to wrap the rhythmbox entry and make it more accesible. Initial draft of the AlbumsCoversModel that will intend to abstract the tree store
Removed model definition from ui file
Added an utility module to put there whatever we could need that isn't related with the plugin perse, but that are aditions that we use on different parts of it
Refined the module:
- The Album listen to changes on it's Tracks and informs when gets modified. This way there's no need to follow each specific change; instead, we update the model when the album gets updated. Neverthless, the managers are responsible of emiting the tracks signals (given that is more cost effective to listen to db changes in a centralized way).
- Fixed some issues with the album filters.
- Refined the AlbumsModel. Now it takes care of a couple more things, principally, updating corresponding treestore row when an album or it's cover gets changed. Added the posibility to add filters and sorting (although not fully tested yet).
- Changed the purpouse of the ShowingPolicy. For now it just takes care of some workarounds concerning the cover_view: it takes care of updating it when necesary. After some changes, there seems that there's no need to use a progressive strategy since it's working faster now.
- The TextManager now takes care of prividing the tooltip and markups for the model.
- Made some changes on the CoverManager and AlbumLoader, but idk if they will be permanent yet, just testing stuff.
- There's still tons of stuff to test and fix, but so far it's working better than before and is waay more organized.
Some more modifications/refinements:
- Removed all the prop changed functions and just inform that the track is modified, so the album cleans itself and is readded to the model.
- Made the album_loading asynchronous and added progress information. In total there are three phases to the loading: album loading, model loading and cover loading.
- Made the duration property of the albums precalculated, to avoid recalculation each time it's selected. This implies that we should listen to changes on track duration too to update the album, but is not that hard with the new events model.
Added check before changing visible paths. Changed the filtering procedure using signals now
Fixed issue of loading images when the model is filtered, now the images updated even in that case
Back to old default_load_chunk. Change the direction of the progress for the second bar to make it more pretty
Fixed some typos on Album's properties. Added a param to the remove_filter method of the AlbumsModel class to determine if this should fire a refilter or not; this is because in some cases, you want to remove a filter to add another one, which causes two refilters.
Fixed filters. It allows multiples filters e.g: genre + another filter
Removed the covers_model from the source. It now should be accesed from the manager
Fixed play/queue album