{"action":"created","issue":{"url":"https://api.github.com/repos/SoCo/SoCo/issues/280","labels_url":"https://api.github.com/repos/SoCo/SoCo/issues/280/labels{/name}","comments_url":"https://api.github.com/repos/SoCo/SoCo/issues/280/comments","events_url":"https://api.github.com/repos/SoCo/SoCo/issues/280/events","html_url":"https://github.com/SoCo/SoCo/issues/280","id":55060887,"number":280,"title":"album compalition","user":{"login":"clemenstyp","id":1587123,"avatar_url":"https://avatars.githubusercontent.com/u/1587123?v=3","gravatar_id":"","url":"https://api.github.com/users/clemenstyp","html_url":"https://github.com/clemenstyp","followers_url":"https://api.github.com/users/clemenstyp/followers","following_url":"https://api.github.com/users/clemenstyp/following{/other_user}","gists_url":"https://api.github.com/users/clemenstyp/gists{/gist_id}","starred_url":"https://api.github.com/users/clemenstyp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clemenstyp/subscriptions","organizations_url":"https://api.github.com/users/clemenstyp/orgs","repos_url":"https://api.github.com/users/clemenstyp/repos","events_url":"https://api.github.com/users/clemenstyp/events{/privacy}","received_events_url":"https://api.github.com/users/clemenstyp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-21T18:54:29Z","updated_at":"2015-02-10T10:46:06Z","closed_at":"2015-02-10T10:45:47Z","body":"Hello, \r\ni had an error in the data_structures.py file:\r\n  File \"/Library/Python/2.7/site-packages/soco/data_structures.py\", line 48, in get_didl_object\r\n    cls = DIDL_CLASS_TO_CLASS[xml.find(ns_tag('upnp', 'class')).text]\r\nKeyError: 'object.container.album.musicAlbum.compilation'\r\n\r\nI think it's because the data structure for album compilitons aren't defined. I think it's because I set the album grouping in the sonos settings to \"itunes compalitions\",\r\n\r\n![bildschirmfoto 2015-01-21 um 19 50 56](https://cloud.githubusercontent.com/assets/1587123/5842668/f53c381c-a1a6-11e4-945b-421f5f73cb53.png)\r\n \r\nI solved it by adding an DidlMusicAlbumCompilation class after the DidlMusicAlbum class definition. It is the same as the DidlMusicAlbum but with an item_class = 'object.container.album.musicAlbum.compilation'\r\n\r\nPerhaps you can add this to the next version of soco.\r\n\r\nI don't know if there is an easier way to do so. \r\n\r\nMy new class declaration:\r\n\r\n\r\n    class DidlMusicAlbumCompilation(DidlAlbum):\r\n    \r\n    \"\"\"Class that represents a music library compalition album.\r\n\r\n    :ivar item_class: The item_class for DidlMusicTrack is\r\n        'object.container.album.musicAlbum.compilation'\r\n    :ivar _translation: The dictionary-key-to-xml-tag-and-namespace-\r\n        translation used when instantiating a DidlAlbum from XML. The value is\r\n        shown below\r\n\r\n        .. code-block :: python\r\n\r\n            # key: (ns, tag)\r\n            _translation = {\r\n                'title': ('dc', 'title'),\r\n                'creator': ('dc', 'creator'),\r\n                'album_art_uri': ('upnp', 'albumArtURI'),\r\n                'uri': ('', 'res')\r\n            }\r\n\r\n    \"\"\"\r\n\r\n    item_class = 'object.container.album.musicAlbum.compilation'\r\n    # name: (ns, tag)\r\n    _translation = {\r\n        'title': ('dc', 'title'),\r\n        'creator': ('dc', 'creator'),\r\n        'album_art_uri': ('upnp', 'albumArtURI'),\r\n        'uri': ('', 'res')\r\n    }\r\n\r\n    @property\r\n    def album_art_uri(self):\r\n        \"\"\"Get and set the album art URI as an unicode object.\"\"\"\r\n        return self.content.get('album_art_uri')\r\n\r\n    @album_art_uri.setter\r\n    def album_art_uri(self, album_art_uri):  # pylint: disable=C0111\r\n        self.content['album_art_uri'] = album_art_uri\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/SoCo/SoCo/issues/comments/73679547","html_url":"https://github.com/SoCo/SoCo/issues/280#issuecomment-73679547","issue_url":"https://api.github.com/repos/SoCo/SoCo/issues/280","id":73679547,"user":{"login":"lawrenceakka","id":5252441,"avatar_url":"https://avatars.githubusercontent.com/u/5252441?v=3","gravatar_id":"","url":"https://api.github.com/users/lawrenceakka","html_url":"https://github.com/lawrenceakka","followers_url":"https://api.github.com/users/lawrenceakka/followers","following_url":"https://api.github.com/users/lawrenceakka/following{/other_user}","gists_url":"https://api.github.com/users/lawrenceakka/gists{/gist_id}","starred_url":"https://api.github.com/users/lawrenceakka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lawrenceakka/subscriptions","organizations_url":"https://api.github.com/users/lawrenceakka/orgs","repos_url":"https://api.github.com/users/lawrenceakka/repos","events_url":"https://api.github.com/users/lawrenceakka/events{/privacy}","received_events_url":"https://api.github.com/users/lawrenceakka/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T10:46:06Z","updated_at":"2015-02-10T10:46:06Z","body":"Thanks @clemenstyp "}}