Skip to content

Make more database entries optional

Alexander Stippich requested to merge astippich/elisa:trackMetaDataBase into master

Basically all that is left from !19 (closed) is the database upgrade and allowing tracks with empty titles in the database. Everything else just works! Also fixes an error in the database upgrade mechanism, which only previously worked because the V16 upgrade function was empty.

This patch also makes the rating and year entries optional, so that they are only inserted into the QMaps when actually available. This seems to save 2-3 MB of ram usage when browsing all tracks.

Additionally, this adds a new lyrics field to the database so that this can be fetched from the database, which is not yet implemented. I opted to add this here to keep the number of database upgrades limited. To reduce the memory usage in the future, I plan to implement a function that fetches "basic" data, e.g. only what is needed in the browsing views, and a function that fetches everything for the metadata view.

Edited by Alexander Stippich

Merge request reports