diff --git a/Jellyfin.Plugin.SmartPlaylist/Lisp/Interpreter.cs b/Jellyfin.Plugin.SmartPlaylist/Lisp/Interpreter.cs index 340cde0..d16f46d 100644 --- a/Jellyfin.Plugin.SmartPlaylist/Lisp/Interpreter.cs +++ b/Jellyfin.Plugin.SmartPlaylist/Lisp/Interpreter.cs @@ -62,6 +62,18 @@ namespace Jellyfin.Plugin.SmartPlaylist.Lisp { (rev-helper lst '()))) """ ); + this["split"] = e.eval( + """ + (lambda + (lst n) + (if + (or (= n 0) (null lst)) + (cons '() lst) + (let + (s (split (cdr lst) (- n 1))) + (cons (cons (car lst) (car s)) (cdr s))))) + """ + ); this["qsort"] = e.eval( """ (lambda