feat: Extend default preamble to contain get-name and find-parent.

This commit is contained in:
redxef 2024-12-17 18:02:43 +01:00
parent 18136e0fa6
commit e180b397c6
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921

View file

@ -37,7 +37,9 @@ namespace Jellyfin.Plugin.SmartPlaylist {
(invoke (lower (car (getitems item "Name"))) "Contains" (list (lower 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 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; } public string InitialProgram { get; set; }