{"action":"closed","issue":{"url":"https://api.github.com/repos/masmu/pulseaudio-dlna/issues/85","labels_url":"https://api.github.com/repos/masmu/pulseaudio-dlna/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/masmu/pulseaudio-dlna/issues/85/comments","events_url":"https://api.github.com/repos/masmu/pulseaudio-dlna/issues/85/events","html_url":"https://github.com/masmu/pulseaudio-dlna/issues/85","id":105258968,"number":85,"title":"Exception when returned sinks end with an comma","user":{"login":"kifj","id":1328482,"avatar_url":"https://avatars.githubusercontent.com/u/1328482?v=3","gravatar_id":"","url":"https://api.github.com/users/kifj","html_url":"https://github.com/kifj","followers_url":"https://api.github.com/users/kifj/followers","following_url":"https://api.github.com/users/kifj/following{/other_user}","gists_url":"https://api.github.com/users/kifj/gists{/gist_id}","starred_url":"https://api.github.com/users/kifj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kifj/subscriptions","organizations_url":"https://api.github.com/users/kifj/orgs","repos_url":"https://api.github.com/users/kifj/repos","events_url":"https://api.github.com/users/kifj/events{/privacy}","received_events_url":"https://api.github.com/users/kifj/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-07T19:11:04Z","updated_at":"2015-09-20T13:56:21Z","closed_at":"2015-09-20T13:56:21Z","body":"Hi,\r\n\r\nI've a Yamaha RX-671 Audio Receiver. The answer send by the device is\r\n\r\n09-07 21:07:01 pulseaudio_dlna.plugins.upnp.renderer          DEBUG    sending GET_PROTOCOL_INFO to http://192.168.1.3:49154/ConnectionManager/ctrl:\r\n - headers:\r\n{u'SOAPAction': u'\"urn:schemas-upnp-org:service:ConnectionManager:1#GetProtocolInfo\"', u'Content-Type': u'text/xml; charset=\"utf-8\"'}\r\n - data:\r\n<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>\r\n<s:Envelope s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">\r\n    <s:Body>\r\n        <u:GetProtocolInfo xmlns:u=\"urn:schemas-upnp-org:service:ConnectionManager:1\">\r\n        </u:GetProtocolInfo>\r\n    </s:Body>\r\n</s:Envelope>\r\n - result: 200\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:GetProtocolInfoResponse xmlns:u=\"urn:schemas-upnp-org:service:ConnectionManager:1\"><Source></Source><Sink>http-get:*:audio/L16;channels=2;rate=44100:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=1;rate=44100:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=2;rate=48000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=1;rate=48000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=2;rate=32000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=1;rate=32000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=2;rate=88200:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=1;rate=88200:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=2;rate=96000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=1;rate=96000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=2;rate=64000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=1;rate=64000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=2;rate=22050:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=1;rate=22050:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=2;rate=24000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=1;rate=24000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=2;rate=16000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=1;rate=16000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=2;rate=11025:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=1;rate=11025:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=2;rate=12000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=1;rate=12000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=2;rate=8000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16;channels=1;rate=8000:DLNA.ORG_PN=LPCM,http-get:*:audio/L16:DLNA.ORG_PN=LPCM,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAFULL,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMDRM_WMABASE,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMDRM_WMAFULL,http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO,http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO_192,http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO_320,http-get:*:audio/3gpp:DLNA.ORG_PN=AAC_ISO,http-get:*:audio/3gpp:DLNA.ORG_PN=AAC_ISO_192,http-get:*:audio/3gpp:DLNA.ORG_PN=AAC_ISO_320,http-get:*:audio/x-ms-wma:*,http-get:*:audio/x-flac:*,http-get:*:audio/x-mpeg:*,http-get:*:audio/x-aac:*,http-get:*:audio/x-mp3:*,http-get:*:audio/x-mp4:*,http-get:*:audio/x-mpg:*,http-get:*:audio/x-wav:*,http-get:*:audio/3gpp:*,http-get:*:audio/aacp:*,http-get:*:audio/flac:*,http-get:*:audio/mpeg:*,http-get:*:audio/aac:*,http-get:*:audio/m4a:*,http-get:*:audio/mp3:*,http-get:*:audio/mp4:*,http-get:*:audio/wav:*,</Sink></u:GetProtocolInfoResponse></s:Body></s:Envelope>\r\n\r\nAs you see the list of sinks ends with ',' (which may be nasty), but this causes an exception in renderer.py line 250, which can be fixed with an additional check, if the sink is empty:\r\n\r\n                for sink in sinks.split(','):\r\n                    if sink:\r\n                        http_get, w1, mime_type, w2 = sink.strip().split(':')\r\n                        if mime_type.startswith('audio/'):\r\n                           self.protocols.append(mime_type)\r\n\r\nRegards\r\nJoe"}}