jacquesh / foo_openlyrics

An open-source lyric display panel for foobar2000
MIT License
449 stars 26 forks source link

Default SKIP filter does not work for multivalue tags #307

Closed regorxxx closed 1 year ago

regorxxx commented 1 year ago

Steps to reproduce

  1. Use a track with multiple genres like: Instrumental\Rock
  2. Use default filter (with https://github.com/jacquesh/foo_openlyrics/issues/306 fixed) $stricmp(%genre%,instrumental)$stricmp(%genre%,classical) image

Expected behavior

Track should be skipped.

Versions

Additional information

Filter should not use $stricmp but $strstr $if($or($strstr($lower(%genre%),instrumental),$strstr($lower(%genre%),classical)),skip,)

image

jacquesh commented 1 year ago

Good idea, thanks for suggesting it. I'll add this in the bugfix release for #306.

...Can you tell I don't use titleformat strings all that often? >_<

jacquesh commented 1 year ago

I opted to just concatenate single $if() statements, rather than use $or() because that gets clumsy really quickly when you add more options (since fb2k's $or() doesn't support more than two arguments, or at least so says the documentation). This way you can just keep tacking new $if()s to the end.

This is also why the scheme is "empty string to search" rather than "this particular string".