From e52728a299524c544a8b3d7864a735beac814bdd Mon Sep 17 00:00:00 2001 From: redxef Date: Mon, 11 Nov 2024 14:12:35 +0100 Subject: [PATCH] fix!: default program configuration. also add new name-contains definition. --- Jellyfin.Plugin.SmartPlaylist/PluginConfiguration.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jellyfin.Plugin.SmartPlaylist/PluginConfiguration.cs b/Jellyfin.Plugin.SmartPlaylist/PluginConfiguration.cs index 09473da..258d67a 100644 --- a/Jellyfin.Plugin.SmartPlaylist/PluginConfiguration.cs +++ b/Jellyfin.Plugin.SmartPlaylist/PluginConfiguration.cs @@ -9,10 +9,11 @@ namespace Jellyfin.Plugin.SmartPlaylist { (define is-genre (lambda (g g-list) (any (lambda (x) (invoke (lower x) "Contains" (list (lower g)))) g-list))) (define is-genre-exact (lambda (g g-list) (find g g-list))) (define genre-list (lambda nil (let (_g (getitems item "Genres")) (if (null _g) nil (car _g))))) - (define is-favorite (lambda nil (invoke item "IsFavoriteOrLiked" (list user))))) + (define is-favorite (lambda nil (invoke item "IsFavoriteOrLiked" (list user)))) (define is-type (lambda (x) (and (haskeys item "GetClientTypeName") (invoke (invoke item "GetClientTypeName" nil) "Equals" (list x))))) + (define name-contains (lambda (x) (invoke (lower (car (getkeys item "Name"))) "Contains" (list (lower x))))) - (define is-favourite is-favorite) + (define is-favourite is-favorite)) """; } public string InitialProgram { get; set; }