Closed redrun45 closed 2 months ago
RR - that's probably a discussion for all the admins. In the old days, it used to just have "LibriVox volunteers" when it was a group project (I'm not sure how it was determined programmatically; if it was all group projects or a certain number of readers). But admins might want to list all readers once, or like you say, cut it off at a certain number. That's a forum question.
Sounds good. I'm trying to limit how much I ask at any given time, and I do still need to work out tests, so I'll let this one lie in the meantime.
Meanwhile: I see in the more detailed notes on previous commits, that the project_readers table itself is only a view... which happens to use SELECT DISTINCT
!
Perhaps a GROUP BY
in the reader list instead. Apparently it's better at dropping extra columns sometimes, but I'll have to see if that's the case here. Sorry to waste your time on reading my musings, Artom. I'll be back when both questions are answered. :grin:
As discussed with MCs, solo projects should show the first database result as the reader name, and group projects (no matter how many readers) should elide as "LibriVox Volunteers". That's exactly how the catalog pages work, and it's how we want things on Archive.
Soon-ish (I'm hoping for this evening), I'll send in a tested PR. We can avoid any DISTINCT
or GROUP BY
calls, since we only need a single name.
Per discussion here: since we moved away from 'select DISTINCT', which was slowing things down, we now get duplicates of reader names on the Archive pages.
Someone reading a book solo would have their name repeated for each section, like so: Read in English by ThisReader; ThisReader; ThisReader; ThisReader; ThisReader; ThisReader;
Looking at the database tables, I think we can 'select from project_readers', and get only one listing per reader. I'll be testing that on my dev machine, as and when I work out how best to do that. :laughing:
@twinkietoes-on - for solo projects, showing the reader name only once is obviously an improvement. But for group projects, do we want to list all the readers on Archive? It might make sense to name both readers for a duet, where a project with a dozen readers probably ought to say 'read by LibriVox Volunteers'. Is there a particular number we should cut off at - 1, 2, ...5? :thinking: