From e180b397c665e98034d36dd12a1a3ba310951379 Mon Sep 17 00:00:00 2001 From: redxef Date: Tue, 17 Dec 2024 18:02:43 +0100 Subject: [PATCH] feat: Extend default preamble to contain get-name and find-parent. --- 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 a6635a2..a5802c1 100644 --- a/Jellyfin.Plugin.SmartPlaylist/PluginConfiguration.cs +++ b/Jellyfin.Plugin.SmartPlaylist/PluginConfiguration.cs @@ -37,7 +37,9 @@ namespace Jellyfin.Plugin.SmartPlaylist { (invoke (lower (car (getitems item "Name"))) "Contains" (list (lower x))))) (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)))) + (define any-genres (lambda (want have) (any (lambda (x) (is-genre x have)) want))) + (define get-name (lambda (x) (car (getitems x "Name")))) + (define find-parent (lambda (typename) (invoke-generic item "FindParent" nil (list typename))))) """; } public string InitialProgram { get; set; }