diff --git a/Jellyfin.Plugin.SmartPlaylist/Lisp/Compiler/Parser.cs b/Jellyfin.Plugin.SmartPlaylist/Lisp/Compiler/Parser.cs index 7dda9c4..e093266 100644 --- a/Jellyfin.Plugin.SmartPlaylist/Lisp/Compiler/Parser.cs +++ b/Jellyfin.Plugin.SmartPlaylist/Lisp/Compiler/Parser.cs @@ -211,7 +211,7 @@ namespace Jellyfin.Plugin.SmartPlaylist.Lisp.Compiler { public override string ToString() { return _value.ToString(); } - public static Atom FromBase(object o) { + public static Expression FromBase(object o) { switch (o) { case bool b: return new Boolean(b); @@ -219,6 +219,8 @@ namespace Jellyfin.Plugin.SmartPlaylist.Lisp.Compiler { return new Integer(i); case string s: return new String(s); + case IEnumerable e: + return new List(e.Select(x => Object.FromBase(x)).ToList()); default: return new Object(o); } @@ -267,6 +269,9 @@ namespace Jellyfin.Plugin.SmartPlaylist.Lisp.Compiler { public Parser(StringTokenStream tokens) { _sts = tokens; } + public Parser(string s) { + _sts = StringTokenStream.generate(s); + } public Expression parse() { Token token = _sts.Get();