diff --git a/source/app.d b/source/app.d index d055f23..530a585 100644 --- a/source/app.d +++ b/source/app.d @@ -68,7 +68,13 @@ int main(string[] args) num = track["track_number"].integer.text; discNum = track["media_number"].integer.text; trackName = track["title"].str; - trackArtist = track["performer"]["name"].str; + try { + trackArtist = track["performer"]["name"].str; + } catch (Exception e) { + // Qobuz doesn't return a "performer" for all albums, and I'm not sure about + // the best way to deal with this. Leaving blank for now.A + trackArtist = ""; + } if (num.length < 2) num = "0"~num; writef(" [%s/%s] %s... ", discNum, num, trackName); diff --git a/source/qobuz/api.d b/source/qobuz/api.d index d58f31d..699579c 100644 --- a/source/qobuz/api.d +++ b/source/qobuz/api.d @@ -91,3 +91,5 @@ string getArtUrl(string id) { string b = id[9..11]; return "http://static.qobuz.com/images/covers/"~a~"/"~b~"/"~id~"_max.jpg"; } + +// ex: set tabstop=2 expandtab: