Tracks with empty title were completely
ignored before. Allow them to be inserted
into the database and display them
Note that there are two issues with this patch:
- Loading the all tracks view seems to take longer
- Restoring of the playlist for tracks with empty title does not work
I would like to fix 1. before landing this patch. @mgallien any ideas? something with sql?
I would like to defer 2. as there are also issues with tracks having empty albums etc.
Thanks for your work.
This sounds a good plan for me.
With respect to the slowness, please have a look at my inline comment and let me know if it works.
Management of this new role is increasing the size of data exported by database to the model and possibly read by the view. This can be a real cause of slowdown in particular if the filename text can be quite long.
You can handle the filename call in the model and only when it is strictly needed to display a track without title (if I understand correctly). That may be enough to keep the same performance level but I cannot be sure.
It would be probably wiser to reduce the size of the data instead of increasing them.
I will try to provide a good review as soon as I can. Sorry for the delay.
Did you try to see if it is database requests that are slow by activating the database logging (especially about slow requests) ?
Sorry for the lack of info.
I could not get the current code to output some execution time values, so I've added some QElapsedTimers, which are probably not that accurate, but show the problem anyways. I've tracked it down to the actual sql query . Adding "tracks.Title IS NULL OR ..." here increases the runtime of this query from approximately 150ms to 850 ms. Any ideas?
I spent some time on this. It should be possible to at least cover the no metadata case with requests only on TracksData. What do you think?
If you want, I can try to do that on gitlab?
It should be easier to extend it to the full solution by working together on it and using your work as a basis.