From 05742dd17c9e2fe6d831c7bbaf52486c6ce63153 Mon Sep 17 00:00:00 2001 From: redxef Date: Sun, 24 Nov 2024 22:42:44 +0100 Subject: [PATCH] feat: add all-genres and any-genres convenience definitions. --- Jellyfin.Plugin.SmartPlaylist/PluginConfiguration.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jellyfin.Plugin.SmartPlaylist/PluginConfiguration.cs b/Jellyfin.Plugin.SmartPlaylist/PluginConfiguration.cs index df85ba9..a6635a2 100644 --- a/Jellyfin.Plugin.SmartPlaylist/PluginConfiguration.cs +++ b/Jellyfin.Plugin.SmartPlaylist/PluginConfiguration.cs @@ -35,7 +35,9 @@ namespace Jellyfin.Plugin.SmartPlaylist { (define name-contains (lambda (x) (invoke (lower (car (getitems item "Name"))) "Contains" (list (lower x))))) - (define is-favourite is-favorite)) + (define is-favourite is-favorite) + (define all-genres (lambda (want have) (all (lambda (x) (is-genre x have)) want))) + (define any-genres (lambda (want have) (any (lambda (x) (is-genre x have)) want)))) """; } public string InitialProgram { get; set; }