From 301ce666ca65e2218d30244e5822f1b4d4e91dbc Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 14 Aug 2017 00:24:01 -0700 Subject: [PATCH] Proper fix --- pysonic/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pysonic/api.py b/pysonic/api.py index dae583f..61a7de5 100644 --- a/pysonic/api.py +++ b/pysonic/api.py @@ -186,8 +186,8 @@ class PysonicApi(object): type="music") if "." in item["name"]: child.attrs["suffix"] = item["name"].split(".")[-1] - if "type" in item_meta: - child.attrs["contentType"] = item_meta["type"] + if item["type"]: + child.attrs["contentType"] = item["type"] if 'cover' in item_meta: child.attrs["coverArt"] = item_meta["cover"] elif 'cover' in dir_meta: