Skip to content

Commit 4744fe7

Browse files
committed
fix: Handle albumArtURI when extra attributes are given
When extra attributes are given to upnp:albumArtURI, the "main" value of albumArtURI is assigned to '_' inside a dict. This seems to happen for tracks played over DLNA. Handle this case so albumArtURI and consequently albumArtURL is parsed correctly and doesn't error out.
1 parent 7d6eaaa commit 4744fe7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/helpers.js

+3
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@ Helpers.dropIDNamespace = function (value) {
275275

276276
Helpers.ParseDIDLItem = function (item, host, port, trackUri) {
277277
let albumArtURI = item['upnp:albumArtURI'] || null
278+
if (albumArtURI && albumArtURI.constructor === Object) {
279+
albumArtURI = albumArtURI['_']
280+
}
278281
if (albumArtURI && Array.isArray(albumArtURI)) {
279282
albumArtURI = albumArtURI.length > 0 ? albumArtURI[0] : null
280283
}

0 commit comments

Comments
 (0)