From 11393c242ba7917794db1be54943bf06213ef265 Mon Sep 17 00:00:00 2001 From: nixo Date: Fri, 17 May 2019 20:48:13 +0200 Subject: [PATCH] fix crash with empty artist name --- JlSonic/api.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/JlSonic/api.jl b/JlSonic/api.jl index 8901f2c..b030da9 100644 --- a/JlSonic/api.jl +++ b/JlSonic/api.jl @@ -93,7 +93,8 @@ function getArtists() artists = unique(beetsdb) # albums = group_albums_as_artists() # .|> does not work in a macro. What to do? - for index in unique(first.(getfield.(artists, Ref(:name))) .|> uppercase) + for index in unique(first.(filter(isempty, + getfield.(artists, Ref(:name)))) .|> uppercase) indexXML = new_child(indexes, "index") set_attribute(indexXML, "name", string(index)) for artist in filter(x -> startswith(x.name, string(index)), artists)