diff --git a/Jellyfin.Plugin.SmartPlaylist/Lisp/Compiler/Parser.cs b/Jellyfin.Plugin.SmartPlaylist/Lisp/Compiler/Parser.cs index 97e6918..80a20ae 100644 --- a/Jellyfin.Plugin.SmartPlaylist/Lisp/Compiler/Parser.cs +++ b/Jellyfin.Plugin.SmartPlaylist/Lisp/Compiler/Parser.cs @@ -77,6 +77,13 @@ namespace Jellyfin.Plugin.SmartPlaylist.Lisp.Compiler { _sts.Commit(); break; } + if (t is SpaceToken) { + // need this here because those tokens can never + // return an expression and trying to parse the last + // expression will not work if its only spaces and a + // closing parentheses. + continue; + } _sts.Rewind(1); expressions.Add(parse()); }