Michael, the following section in the albumsQuery function in Queries.pm
could be the cause of what afriend are seeing:

Code:
--------------------
    
  
  if (defined $libraryID) {
                        push @{$w}, 'albums.id IN (SELECT library_album.album 
FROM library_album WHERE library_album.library = ?)';
                        push @{$p}, $libraryID;
                }
  
  
--------------------


For genres the same join instead looks like this:

Code:
--------------------
    
  
  if (defined $genreID) {
                        my @genreIDs = split(/,/, $genreID);
                        $sql .= 'JOIN tracks ON tracks.album = albums.id ' 
unless $sql =~ /JOIN tracks/;
                        $sql .= 'JOIN genre_track ON genre_track.track = 
tracks.id ';
                        push @{$w}, 'genre_track.genre IN (' . join(', ', map 
{'?'} @genreIDs) . ')';
                        push @{$p}, @genreIDs;
                }
  
  
--------------------


So libraries are joined in via library_album which I guess mean that an
album would be shown in the album level even if it doesn’t have any
tracks for the selected artist in the library. The genre are on the
other hand joined via genre_track which I think means that there has to
exist at least one track in the album for the selected artis to make the
album appear. 

I guess the reason libraries are joined via library_album instead of
library_track is to improve performance. Since the case we are talking
about is an edge case there might be a need to support both if you want
a solution for this. In this case the behavior should probably be
specified when registering the menu in a plugin.



Erland Isaksson ('My homepage' (http://erland.isaksson.info))
Developer of 'many plugins/applets'
(https://wiki.slimdevices.com/index.php/User_Erland.html)
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=113417

_______________________________________________
Squeezecenter mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/squeezecenter

Reply via email to