Some data will not show unless it’s in a child node in list view.
On the left, you can see the track has the additional columns populated.
On the right you can see where the additional columns are also populated.
…but they will only populate IF they are within a child node. Meaning you’ve got an exposure triangle available to expand/collapse that tree branch.
There’s three tracks on the right:
The first one has two files associated with it and it’s columns are populated.
The second one also has two files associated with it. The columns are not populated, probably it should be in this case since those columns could have different values. Fine.
The third one has only one track associated with it and it’s columns are not visible. You can see there is another copy of the same track on the left that does have the columns populated. Let’s move that one over to the right:
Now you can see both tracks have the columns populated. But if I remove additional tracks to where there is only a single track listed, the other that shows the populated column no longer will have that data visible. Let’s remove a track from the second position:
As you see now, the data is no longer showing for the remaining track.
I’m sure this is related to the code setup where values do change. So the question begs, in the code for listing column data, how can I differentiate between these so that I can get that data to list?
elif column == 'albumtracks':
# text = '(%d/%d' % (linked_tracks, len(self.tracks))
# text = '%s\u200E (%d/%d' % (title, linked_tracks, len(self.tracks))
if self.tracks:
linked_tracks = 0
for track in self.tracks:
if track.is_linked():
linked_tracks += 1
text = '%d' % (len(self.tracks))
# text = '%d' % (linked_tracks)
return text
elif column == '~completed':
trackcount = len(self.tracks)
if not trackcount:
return ''
return '{:03.0f}%'.format(self.get_num_matched_tracks() / trackcount * 100)
elif column == 'artcount':
# CoverArt.set_metadata uses the orig_metadata.images if metadata.images is empty
# in order to show existing cover art if there's no cover art for a release. So
# we do the same here in order to show the number of images consistently.
if self.metadata.images:
metadata = self.metadata
else:
metadata = self.orig_metadata
number_of_images = len(metadata.images)
if getattr(metadata, 'has_common_images', True):
# text += ngettext("; %i image", "; %i images",
# number_of_images) % number_of_images
text = ngettext("%i img", "%i imgs",
number_of_images) % number_of_images
return text
else:
text = "..."
return text