'Replace queue with playlist represented by src.
Playlists can\'t be played directly with the self._player.play_uri
API as they are actually composed of mulitple URLs. Until soco has
suppport for playing a playlist, we\'ll need to parse the playlist item
and replace the current queue in order to play it.'

def _replace_queue_with_playlist(self, src):

    import soco
    import xml.etree.ElementTree as ET
    root = ET.fromstring(src['meta'])
    namespaces = {'item': 'urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/', 'desc': 'urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/'}
    desc = root.find('item:item', namespaces).find('desc:desc', namespaces).text
    res = [soco.data_structures.DidlResource(uri=src['uri'], protocol_info='DUMMY')]
    didl = soco.data_structures.DidlItem(title='DUMMY', parent_id='DUMMY', item_id=src['uri'], desc=desc, resources=res)
    self._player.stop()
    self._player.clear_queue()
    self._player.play_mode = 'NORMAL'
    self._player.add_to_queue(didl)
