Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Senior Member
    Join Date
    Jul 2010
    Posts
    200

    Additional browse modes: filter not working?

    Hey.

    Short version:
    When I create an artists menu using Additional Browse Modes it will show me false positives on the second level down (albums for artists). How do I get rid of them?

    Check it out:

    Take a library with 3 music files by 2 artists:

    artist A -> album A -> song1 (rated)
    artist A -> album B -> song2 (unrated)
    artist B -> album B -> song3 (rated)

    1. Create a library view using Advanced search for all rated tracks. Save as "Rated". Contents = song1 & song3.
    2. Create an artists menu using Additional Browse Modes for this library view.
    3. In this new artist menu click on artist A.

    What you should get for artist A:
    artist A -> regular album A -> song1

    But what you actually get is:
    artist A -> regular album A -> song1
    artist A -> compilation album B -> song2

    The album B with the unrated song2 shouldn't be there, no? (because this artist did not contribute a rated song to this album)

    This behavior is not related to the compilations flag I think.

    To put it in another way:
    if you have any artist (like in this example artist A) with a rated track on at least one album who has also contributed an unrated track to any other album on which there are rated tracks by other artists
    then these other albums will (incorrectly) show up on in the artists menu listed under this artist (A). But it should only show the one album to which this artist actually contributed a rated track though.

    How do I fix this? Is this a limitation of additional browse modes? Or is there a workaround of some sort?

    I'd really like get rid of these empty false positives so I can offer such menus in my plugin.

    Thank you for your help.

    P.S.
    - tested with latest 7.9 and 8.1.0 - 1608064080
    - the virtual library contains the correct tracks, so that's ok.
    - also affects the genre browsing menu (not a standard option in LMS but supported):
    • song2 and song3 have the same genre KX (as often in a compilation)
    • in the genre menu "Genres with rated tracks" under genre "KX":
    • you should see in this example: only artist B
    • you will see: artist A and artist B - even though artist A has only has an unrated track in this genre
Last edited by afriend; 2020-12-17 at 09:03.

  • #2
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,229
    Quote Originally Posted by afriend View Post
    Hey.

    Short version:
    When I create an artists menu using Additional Browse Modes it will show me false positives on the second level down (albums for artists). How do I get rid of them?

    Check it out:

    Take a library with 3 music files by 2 artists:

    artist A -> regular album A -> song1 (rated 4 stars)
    artist A -> compilation album B -> song2 (unrated)
    artist B -> compilation album B -> song3 (rated 5 stars)

    1. Create a library view using Advanced search for all tracks rated > 2 (stars). Save as "Rated". Contents = song1 & song3.
    2. Create an artists menu using Additional Browse Modes for this library view.
    3. In this new artist menu click on artist A.

    What you should get for artist A:
    artist A -> regular album A -> song1

    But what you actually get is:
    artist A -> regular album A -> song1
    artist A -> compilation album B -> song2

    The compilation album with the unrated song2 shouldn't be there, no? (because it's unrated and not featured in the library view)

    - I can play around with the compilation settings, artists list or contributor filter in settings -> my music all I want I never get the desired result.
    - Tracks of compilation album B are tagged album artist = Various Artists and compilation flag = 1. However, LMS assign contributor role "Artist" to all tracks on the compilation and not TRACKARTIST. If that matters.

    How do I fix this? Is this a limitation of additional browse modes? Or is there a workaround of some sort?

    I'd really like get rid of these empty false positives so I can offer such menus in my plugin.

    Thank you for your help.

    P.S. LMS latest v7.9
    I suspect you need to get Michael (mherger) interested in this to find out if it’s a bug or not.

    However, the first thing I’d suggest is to verify if it works correctly in latest 8.1 nightly build of LMS because Michael have done a lot of changes in this code for the music streaming integration and I can imagine that he don’t want to go back and hunt bugs in this code in the 7.9 release now when 8.0 is officially released.

    Have you identified that it’s only compilation album that behaves correctly ?
    Have you checked the database to ensure the track isn’t part of the virtual library ?
    Have you verified that the problem only exists in artists menu and not also in albums menu ?
    Erland Isaksson (My homepage)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

  • #3
    Senior Member
    Join Date
    Jul 2010
    Posts
    200
    I've updated my first post.

    I did test this with 8.0 at some point. Just now now I did with 8.1.0 - 1608064080. Nothing's changed.
    The virtual libraries always contains the correct number of tracks. Doesn't matter if I create them using my own sql code or as a saved the advanced search library view. The library_* tables reflect that.

    I thought I'd keep this final thread on this subject (there were others over the years under different titles) very simple so nothing distracts from the core issue. That's why I only mentioned the artists menu. The albums menu is ok as far as I can tell.
    But it also affects the genres menu that I use in Ratings Light.

    Quote Originally Posted by erland View Post
    Have you identified that itís only compilation album that behaves correctly?
    At first I thought I was a compilation issue. But now I'm not so sure anymore. It happens a lot with compilations because there you usually have several track artists and "Various Artists" as the album artist. Which is
    But I also tested a non-compilation album where you have "artist A" as album artist and track artists like "Artist A & Artist B". It doesn't seem to be tied to the compilation flag.

    Quote Originally Posted by erland View Post
    I suspect you need to get Michael (mherger) interested in this to find out if itís a bug or not.
    I've mentioned this several times over the years. So far no luck. I assume it's too much of a niche use case, sadly. So I though I make one final thread and that's it.

  • #4
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,521

    Additional browse modes: filternot working?

    > I've mentioned this several times over the years. So far no luck. I
    > assume it's too much of a niche use case, sadly. So I though I make one
    > final thread and that's it.


    I must admit that I did see this thread. But I can't remember this being
    reported several times. I admittedly do sometimes skip on topics before
    I see it gather some traction. I have to prioritize...

    I haven't been able to easily reproduce the issue. Or I didn't get it
    right. You believe that if you browse "artists in my library" -> artist
    -> artist's albums, there should only be albums which actually are part
    of that library, but not the others?

    --

    Michael

  • #5
    Senior Member
    Join Date
    Jul 2010
    Posts
    200
    Quote Originally Posted by mherger View Post
    I must admit that I did see this thread. But I can't remember this being
    reported several times. I admittedly do sometimes skip on topics before
    I see it gather some traction. I have to prioritize...
    I understand. Certainly no reproach or sth like that from me. It's just that I'd kind of given up on solving this issue and filed it under things I've got to live with. I only started this last thread because I thought I if there's ever going to be people besides me using the Ratings Light plugin maybe I owe them one more try. That's all. :-)

    Quote Originally Posted by mherger View Post
    I haven't been able to easily reproduce the issue. Or I didn't get it
    right. You believe that if you browse "artists in my library" -> artist
    -> artist's albums, there should only be albums which actually are part
    of that library, but not the others?
    Not quite. The artists menu shows only albums that are part of the virtual library. That's as it should be.

    The problem in terms of my example from the first post is:

    if you have any artist (A) with a rated track on at least one album who has also contributed an unrated track to any other album on which there are rated tracks by other artists
    then these other albums will (incorrectly) show up on in the artists menu listed under this artist (A). But it should only show the one album to which this artist actually contributed a rated track though.

    I don't know how to describe it any better. Maybe some screenshots can help illustrate the problem: link.
    The browse menus in the screenshots are created by the Ratings Light plugin but the artists menu from Additional Browse Modes gives the same results.
    Last edited by afriend; 2020-12-17 at 09:25.

  • #6
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,229
    Quote Originally Posted by afriend View Post
    The problem in terms of my example from the first post is:

    if you have any artist (A) with a rated track on at least one album who has also contributed an unrated track to any other album on which there are rated tracks by other artists
    then these other albums will (incorrectly) show up on in the artists menu listed under this artist (A). But it should only show the one album to which this artist actually contributed a rated track though.
    So if I understand this correctly you are seeing two issues:

    1. The list of albums shown after selecting an artist doesnít take artist role into account, it lists an album even if the artist was only featured (track artist) on that album, but you would like the album list to be limited to albums where the artist was album artist (same as main Artists menu works).

    2. The list of songs after selecting first and artist and then an album isnít limited to songs in the virtual library, it shows all sons on the selected album where the selected artist have performed (independent of its role)

    First issue does not occur for compilation albums but as I understand from your response on my previous post you have also seen it for non compilation albums ? Or doesnít the first issue exist at all ? If it does exist, do you also see it in the standard Genres menu (it might not be related to virtual libraries at all)

    Is it correct that itís the above two issues you are seeing ?
    Erland Isaksson (My homepage)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

  • #7
    Senior Member
    Join Date
    Jul 2010
    Posts
    200
    Quote Originally Posted by erland View Post
    So if I understand this correctly you are seeing two issues:

    1. The list of albums shown after selecting an artist doesnít take artist role into account, it lists an album even if the artist was only featured (track artist) on that album, but you would like the album list to be limited to albums where the artist was album artist (same as main Artists menu works).

    2. The list of songs after selecting first and artist and then an album isnít limited to songs in the virtual library, it shows all sons on the selected album where the selected artist have performed (independent of its role)

    First issue does not occur for compilation albums but as I understand from your response on my previous post you have also seen it for non compilation albums ? Or doesnít the first issue exist at all ? If it does exist, do you also see it in the standard Genres menu (it might not be related to virtual libraries at all)

    Is it correct that itís the above two issues you are seeing ?
    I'm sorry, Erland. With my English I just don't know how to describe it any better than post #1 and #5. Maybe the screenshots in #5 help more than my words.

    The virtual library and the artists menu contain all the correct artists, tracks and albums. That's all good.
    It's just a problem browsing artists within this VL.
    If an artist has a rated track on one album and an unrated track on another album (which features rated tracks by other artists), this second album shows up under his artist name even though this artist only contributed an unrated track to it.
    This unrated track is not part of the VL and therefore the album shows "empty". But this album is part of the VL because other artists do have rated tracks on it. It just shouldn't show under his name but exclusively under the name of those artists who contributed rated tracks to it.

    So in short: if I click artist A in the "artist with rated tracks" browse menu, I only expect to see the album(s) to which this artist contributed a rated track. Albums which have an unrated track by this artist and rated tracks by other artists shouldn't be listed here.
    You see, everytime I try to explain this it ends in a total mess. :-) That's why I made these screenshots.
    Last edited by afriend; 2020-12-17 at 09:24.

  • #8
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,229
    Quote Originally Posted by afriend View Post
    If an artist has a rated track on one album and an unrated track on another album (which features rated tracks by other artists), this second album shows up under his artist name even though this artist only contributed an unrated track to it.
    This unrated track is not part of the VL and therefore the album shows "empty". But this album is part of the VL because other artists do have rated tracks on it. It just shouldn't show under his name but exclusively under the name of those artists who contributed rated tracks to it.
    I believe the content of the albums level is implemented in https://github.com/Logitech/slimserv...rol/Queries.pm in the albumsQuery function if you like to dig into the code yourself.

    There are a number of settings in LMS Settings/My Music that controls which contributor roles that are shown in artists menu and I suspect some of these might affect the albums level also. To be able to reproduce the issue I suspect it would help to know the settings under the captions ďComposer, Band and Orchestra in ArtistsĒ, ďCompilationsĒ, ďFilter genres at the album & track level.Ē. It would probably also help Michael if he wants to look into this to get a dump of the relevant database tables (albums, tracks, contributors, contributor_track, contributor_album).

    I suspect your issue isnít related to virtual libraries at all itís just that itís very unusual when you have a full library so nobody might have noticed it before. Itís probably possible to reproduce in standard Genres menu with the right tagging to cause the same scenario. Basically selecting a genre and artist and it will probably list all albums that have a matching combination but result in empty track level for some of the albums. However, the description of the ďFilter genres at the album & track level.Ē setting kind of indicate that there is something implemented to support genres so maybe code for this is just missing for virtual library. Or possibly this setting can be changed to give you what you want also for virtual libraries.

    Sorry Iím not able to help troubleshooting more but Iím currently only able to look at this via an iPad so itís hard to do much more than give people ideas.
    Erland Isaksson (My homepage)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

  • #9
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,229
    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)
    Developer of many plugins/applets
    Starting with LMS 8.0 I no longer support my plugins/applets (see here for more information )

  • #10
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,521

    Additional browse modes: filternot working?

    > I don't know how to describe it any better. Maybe some screenshots can
    > help illustrate the problem: 'link' (https://we.tl/t-hfWzS2pxtQ).
    > The browse menus in the screenshots are created by the Ratings Light
    > plugin but the artists menu from Additional Browse Modes gives the same
    > results.


    Thanks for the analysis. Would you mind sharing your library.db (from
    the cache folder) and virtualLibraries.prefs (from the prefs folder)?

    https://www.dropbox.com/request/T3RctyzGgNg0oFDubq6a

    --

    Michael

  • Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •