Add 'Contains' as a smart playlist verb for Genre

Right now, when creating a smart playlist, the only verbs available for Genre are “is” and “is not”. In my situation, say I wanted to create a smart playlist for Christmas music. Of course, Christmas music, in addition to being a genre of its own, comes in various other genres. There are pop Christmas songs, for example.

In my library, the permutations of track genre that contain ‘Christmas’ number 26, so while I could create a smart playlist of all 26 possibilities, that’s tremendously unwieldy. Att to that the possibility of my adding another Christmas permutation without realizing it, resulting in an incomplete smart playlist!

We use commas to separate multiple genres, so adding ‘contains’ as a verb would work wonderfully to indicate a large number of comma delimited genre lists containing the genres we’re looking for.

This would make such a huge difference! Right now, my making (and maintaining!) a Christmas smart playlist is too complex to be worth it.

How about using the genre “Cristmas” plus the genre “Pop”, instead of “Christmas Pop”?

Sorry, that was my mistake. That genre would be “Christmas, Pop” in the genre field of the song. But the problem is still the same. If there were also a song with “Christmas, Jazz” as the genre, I would have to have two lines in the smart playlist configuration to get them both. And as I mentioned in may initial post, I have more than twenty permutations of Christmas in my library.

My point is to have two or more genres on an item, instead of one amalgamated. Plex has support for that.
Then you can filter by “Christmas” and get a match on all music items that have one of their genres as “Christmas”.

How would I do that? Because when I create the smart playlist, I choose “Track Genre” as the field, “is” as the verb, and I type “christmas” in the field. I’m presented with a dropdown of all the permutations that contain christmas. I can’t have just christmas. If I just press enter, I get the first item in the dropdown.

I figured the only way to get a christmas playlist (without having to create a separate line with every genre containing Christmas) is to introduce a ‘contains’ verb. Am I missing something obvious? I hope I am!

That is my point. You can indeed, if you do away with all the permutations which are all just combinations of “Christmas” with yet another genre.
Instead tag your items not with one genre, but two or more.

Sorry, I think we have a misunderstanding.

I made a typo in my initial message. The examples in the subsequent posts are what I use. Like “christmas, pop” and “christmas, jazz”. Two genres each. But then I can’t choose only “christmas” as the genre to search for. If I try, I’m presented with a drop down that contains “christmas, pop” and “christmas, jazz” and I have to choose one or the other.

I think they understand that. They are suggesting you not make genres like that any more

Plex

do this instead


so you can just filter on “christmas” and get everything that has it.

1 Like

That is to say we are not saying “no” to your feature sugegstion. just presenting an alternate solution

The problem with your suggestion is how genres are stored in the database.
Once they are ingested, each genre is stored in a special place, where its name is paired with a unique number as its ID.
All the items in your library itself only get these numerical ID’s added.
So if you wanted to perform a string search within the genre names, you would have to perform a rather complicated database query, which first collects all the IDs of genre names which contain a certain string. Then filter the media items which have these IDs.
Not impossible, but certainly more involved (and computationally expensive) than a simple genre ID match.

1 Like

I get that we’re discussing a certain use case here. But still, “contain” or “starts with” or similar is still invaluable and should exist for filtering.

Splitting complex labels (or in this case genres) does not always make sense.

In my main movie library, I labelled all movies with awards and even with nominations.

In my use case, I labelled the movie “Mary Poppins” like that:

You can see, there’s info on the award label itself, on the nomination/winning and on the category in just one label - plus the fact that a movie can be the source or object of many awards as well as nominations.

How do you split that?

And I want smart collections / playlists like:

  • Oscar nominees/winners
  • German Awards movies
  • Oscar Winners Best Movie
  • etc, etc

At the moment, I need to have huge rulesets for some types of smart playlists or collections - and each change or addition causes lots of work.

Therefore, I can understand the wish for these types of filters.

In addition, I’d have collections like IMDB TOP 250 movies.

In these, I would LOVE to use a certain label pattern as a sorting mechanism.

Like “IMDB TOP 250 #xyz”.

or “Criterion Collection #abcd” (for the spine number)…

I don’t want to hijack the thread (sorry for the side path). I just want to make clear that advises like “oh, just split genres” are fine for few use cases, not general instructions which are always possible (not saying that somebody said this).

But maybe it’s worth a look into all this filter systems to make the better (ie more flexible/powerful) by allowing wildcards and by allowing more type of filtering methods plus sorting elements.

tags like labels are not the same a strings such as a title. and as @OttoKerner described doing that for tags would cause a significant hit when actually trying to do the filter or load the smart collection then folks will report that inevitable slowness as a bug even though we are saying right now what will likely happen.

I understand the desire but I don’t think performance will be what you are thinking it will be and there will just be complaints it does not work as well as folks hope it to be.

Again I am not saying “no”. It is not up to me.

I thank everyone for their patience. I thought you were not understanding what I was saying and goodness knows what you thought of me! But I understand what is going wrong now.

I make sure all the metadata in my files are set before importing the files into plex. This is because I make backups of the files and should anything go wrong, I can set everything up again, import the files, and I’m ready to go.

So given the screenshots in this thread, I thought I’d better look at mine to make sure everything looks right. Well, it’s not right!

On import, plex sees my multiple genres in each file as a single giant genre. That is, the commas are seen as part of the genre and not genre delimiters!

So that’s why it wasn’t working as you all were describing! The only thing I’ve done remotely unusual is configure the library to use the metadata and graphic in the files and not fetch them from elsewhere. Not sure if that matters. But it looks like this has become a bug report rather than a feature request.

Thank you all!

1 Like

Ok, cool. Thx for explaining, @BigWheel
Maybe there’s a way of implementing it as “complex filter” which works exactly as the other filters, but only is “executed” during maintainance or once you hit a button :slight_smile:

I am pretty sure that this way, you could measure the usage and time consumption better than before. I could live with filter usage in smart collections/playlists take time to show the newest results.

On the other hands, with labels, titles, genres and such, we are speaking about small pieces of texts. Having developed quick search and index routines myself for these kinds of information using indexed arrays and tables work seemlessly even with tens of thousands of entries. Plex did probably the same with their real-time search…

But it’s not up to me. Just throwing my suggestions at you guys.

Thank you to the thread opener for bringing this up.

Depending on which ID3tag version you are using in your files, the delimiter between genres should be either a semicolon, or a NULL byte.

I have no idea which ID3 version my files use, unfortunately. At the same time however, I’m surprised you’re not overrun by this problem as I’ve never seen anything but a comma used…and I can’t imagine many end-users separating genres with null characters!

Meta tag editors take care of that automatically, if they sense ID3v2.4 tags.

Any suggestions for a Mac tag editor that will get this right? Mine seems to use the vorbis format. I can add an ID3 format with it, but vorbis is always included and the tags always come in as one giant tag.

That means you are not talking about mp3 files, but rather flac?
Within these, you can add actually several genre tags. Not just one that uses a special separation character between the genres.
I thought Subler was kinda the go-to app on Mac for that kind of thing. Though I think mp3tag is also available on Mac.

That means you are not talking about mp3 files, but rather flac?

Correct. FLAC.

I thought Subler was kinda the go-to app on Mac for that kind of thing. Though I think mp3tag is also available on Mac.

Unfortunately, Subler doesn’t support FLAC, to my surprise. I had no idea. I’ve tried MP3Tag, Page Editor, Meta, and I think Music Tag Editor. All of them being in multiple tags as a single huge tag.

Within these, you can add actually several genre tags. Not just one that uses a special separation character between the genres.

I’m not sure if it’s these apps or the Plex import, but it’s not working as it should.