diff --git a/Jellyfin.Plugin.SmartPlaylist/Lisp/Interpreter.cs b/Jellyfin.Plugin.SmartPlaylist/Lisp/Interpreter.cs index b9db4d5..495c46a 100644 --- a/Jellyfin.Plugin.SmartPlaylist/Lisp/Interpreter.cs +++ b/Jellyfin.Plugin.SmartPlaylist/Lisp/Interpreter.cs @@ -188,7 +188,20 @@ namespace Jellyfin.Plugin.SmartPlaylist.Lisp { if (mi == null) { throw new ApplicationException($"{o.Value()} has not method {s.Value()}"); } - return Object.FromBase(mi.Invoke(o.Value(), (object?[]?) l.ToList().ToArray())); + object?[]? l_ = l.ToList().Select(x => { + switch (x) { + case Integer s: + return s.Value(); + case Boolean b: + return b.Value(); + case Object o: + return o.Value(); + case Cons c: + return c.ToList().ToList(); + } + return null; + }).ToArray(); + return Object.FromBase(mi.Invoke(o.Value(), l_)); } }