Smart playlist filtering on genre ignores tracks with missing genre

Issue description:

I have a smart playlist showing my favourite (4+ stars) non-Christmas songs, using these rules:

User rating greater than 6
&
Genre does not contain Christmas

This has been working fine, but today I noticed that a highly-rated track was missing from the playlist. It turns out this track didn’t have a genre defined. If I remove the ‘Genre does not contain Christmas’ rule, the file does appear in the playlist.

I would expect the ‘Genre does not contain Christmas’ to exclude all tracks with a ‘Christmas’ genre. Instead, it seems to exclude all tracks with a ‘Christmas’ genre and in addition all tracks that don’t have a genre set (empty genre field). This is very surprising behaviour (and I consider it a bug).

Logs:

Upload description: huftis

Additional information:

 

 

Reproduction steps:

 
Steps to reproduce:

  1. Add a song with missing genre and that have four or more stars as the user rating.
  2. Create smart playlist with rules ‘User rating greater than 6’ & ‘Genre does not contain Christmas’ (where ‘Christmas’ can be any string).
  3. Open the playlist.
  4. Observe that the playlist does not contain the song.
  5. Duplicate the playlist and remove the genre rule.
  6. Open the new/duplicated playlist.
  7. Observe that the playlist does contain the song.
     

Media provider:

Local device

Screenshots:

     

Do you not have an applicable genre you can add to these tracks to solve this issue?

While I can manually add a genre to this specific track, this doesn’t solve the overall issue. I’ll be getting new music over time, and I can’t guarantee that all my music files will have a genre field filled in. But I still want to see the tracks in my playlist.

If you generally use genre tags in your library I think it would be advantageous to ensure those tags do exist on every track in your library. You can always utilize tagging softwares to automate this but if you only have a handful manual entry works just as well.

In this way you’d ensure no tracks get skipped in your playlists & that all tracks are grouped with some sort of genre.

I don’t know the extent of your issue though if you have a large library & alot of missing genre tags then that may take some time to fix. If that’s the case though you are loosing functionality in any music player by missing those tags. In Symfonium you can use the smart queue to populate your queue automatically based on a few tags, one being Genre.

Tweaking the rule(s) definitely works & Fixes your issue but I think in the long run having those genre tags wouldn’t hurt.

Unless your whole library would need reworking I think it’s worth it. Either way we’ll have to wait to see what the dev decides

Is / is not handles missing values. Contains currently does not to avoid so edge cases issues.