Tag-based dynamically-generated playlists

Hello! Looking for some advice on how to make playlists from tags.
Here's what I got:


  1. Using KM 10.1.1 on macOS 10.15.7
  2. Have tagged media
  3. Use KM macros to search for specific tags in a specific folder, compile an m3u playlist, save it, and pass it to either IINA or mpv.

With my current playlist-making macros, I have to make a new playlist-making macro for every combination of tags, ie,

PLmacro01 - tagChristmas && tagComedy && tagCinema
PLmacro02 - tagChristmas && tagDrama && tagCinema
PLmacro03 - tagChristmas && tagComedy && tagSeries [see example code]
PLmacro04 - (tagCinema || tagSeries) && tagChristmas
PLmacro05 - tagChristmas && tagMusic
PLmacro06 - tagChristmas && tagMusic && tagSoft

I'd like to write 1 macro that can dynamically generate a playlist based on whatever tag(s) I throw at it. I'd also like to just type hotkeys rather than doing a UserInput dropdown list.

I want tag-based dynamically generated playlists.

What concept(s) should I research?

thesoniqExamples Macros (v10.1.1)

thesoniqExamples Macros.kmmacros (7.6 KB)

Keyboard Maestro Export