Posts: 5,245
Joined: Jul 2012
Reputation:
339
I was looking at this, and realized that this property is defined using a SQL of "count(distinct strAlbum)" on songview. I don't understand why the distinct qualifier is used? Granted, there could be extra albums with same strAlbum due to tagging errors, but I have numerous albums with the same title. I guess because that SQL will operate on songs, but there must be a better way to do this which doesn't ignore albums with the same title.
scott s.
.
Posts: 4,545
Joined: Jun 2015
Reputation:
269
Do you mean in the query used by CRecentlyAddedJob::UpdateTotal()? I don't even know what uses those totals result, skins?
That bit of SQL predates me and is an aspect of music data use that I have never considered. Reasoning will be lost in time and relate to when music tagging was way more basic. I would not get the album count that way, if that is what is wanted, totally agree there is a better way to do this.
Posts: 5,245
Joined: Jul 2012
Reputation:
339
Yes, that's it. It dates at least to Gotham. The intent seemed to be to populate a bunch of home window property keys that skins can use to display library status. So for music, number of artists and albums in the library. I was comparing a couple different Kodi installs with the same sources but different values in those properties, and realized that the key value was a bit off from what I get from the album node container.numitems. But I have many examples of same-titled albums with different album artist, and there's also the possibility of different albums in an album group.
scott s.
.