qt: save genre cover in medialibrary
Aim
the main goal of this MR is qt/mlgenremodel: remove index usage from cover generation
. This would be helpful to generalize the MlBaseModel::data function to only take MLItem ptr (basically omit the knowledge of source index to the function). I need that for a new async API in MLBaseModel i.e MLBaseModel::loadData(indices, callback)
which can be used at places where we need to access the MLItem
with certainty like when dropping items into the playlist.
Implementation
The cost of removal of index usage for cover generation is a linear search which shouldn't be a problem since something like that is already being done for handling ml cover generation signal but to minimize it I now save the cover directly into the media library so that removes the further need of cover generation.
Something similar would need to be implemented for PlayListModel and GroupListModel as well.