{"action":"created","issue":{"url":"https://api.github.com/repos/postlund/pyatv/issues/106","repository_url":"https://api.github.com/repos/postlund/pyatv","labels_url":"https://api.github.com/repos/postlund/pyatv/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/postlund/pyatv/issues/106/comments","events_url":"https://api.github.com/repos/postlund/pyatv/issues/106/events","html_url":"https://github.com/postlund/pyatv/issues/106","id":254429066,"number":106,"title":"`tag_definition` `cang` for genre of currently playing media","user":{"login":"jmery","id":17205200,"avatar_url":"https://avatars0.githubusercontent.com/u/17205200?v=4","gravatar_id":"","url":"https://api.github.com/users/jmery","html_url":"https://github.com/jmery","followers_url":"https://api.github.com/users/jmery/followers","following_url":"https://api.github.com/users/jmery/following{/other_user}","gists_url":"https://api.github.com/users/jmery/gists{/gist_id}","starred_url":"https://api.github.com/users/jmery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmery/subscriptions","organizations_url":"https://api.github.com/users/jmery/orgs","repos_url":"https://api.github.com/users/jmery/repos","events_url":"https://api.github.com/users/jmery/events{/privacy}","received_events_url":"https://api.github.com/users/jmery/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-31T18:35:59Z","updated_at":"2017-09-01T05:37:42Z","closed_at":null,"author_association":"NONE","body":"Raspberry Pi 3b\r\nHassbian 1.23\r\nHA 0.52.1\r\n\r\nI'm seeing warnings in the HA logs like this:\r\n```\r\nWARNING (MainThread) [pyatv.tag_definitions] Unknown data: b'cang\\x00\\x00\\x00\\nSoundtrackcanl\\x00\\x00\\x001'\r\n```\r\n\r\nA little research shows that `cang` clearly ties to the genre of the currently playing song.  E.G. the above is from tracks on the \"Tron:Legacy\" album.  \"Tron:Legacy Reconfigured\" then changes this to `Unknown data: b'cang\\x00\\x00\\x00\\nElectroniccanl\\x00\\x00\\x00\\x19'` which follows the album genre.  Etc, etc...\r\n\r\nI can submit a PR to add this to `tag_definitions.py` if someone can point me to where I can find the correct corresponding mapping value."},"comment":{"url":"https://api.github.com/repos/postlund/pyatv/issues/comments/326493345","html_url":"https://github.com/postlund/pyatv/issues/106#issuecomment-326493345","issue_url":"https://api.github.com/repos/postlund/pyatv/issues/106","id":326493345,"user":{"login":"postlund","id":5982179,"avatar_url":"https://avatars3.githubusercontent.com/u/5982179?v=4","gravatar_id":"","url":"https://api.github.com/users/postlund","html_url":"https://github.com/postlund","followers_url":"https://api.github.com/users/postlund/followers","following_url":"https://api.github.com/users/postlund/following{/other_user}","gists_url":"https://api.github.com/users/postlund/gists{/gist_id}","starred_url":"https://api.github.com/users/postlund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postlund/subscriptions","organizations_url":"https://api.github.com/users/postlund/orgs","repos_url":"https://api.github.com/users/postlund/repos","events_url":"https://api.github.com/users/postlund/events{/privacy}","received_events_url":"https://api.github.com/users/postlund/received_events","type":"User","site_admin":false},"created_at":"2017-09-01T05:37:42Z","updated_at":"2017-09-01T05:37:42Z","author_association":"OWNER","body":"Definitely looks like a missing tag, for sure. Also seems easy enough to just be a string as well, it should be decoded like this:\r\n```\r\nb'cang\\x00\\x00\\x00\\nElectroniccanl\\x00\\x00\\x00\\x19'\r\n-> tag: cang, length: \\x00\\x00\\x00\\n = 0x000000A = 10, value: Electronic\r\n-> tag: canl, length: \\x00\\x00\\x00\\x1 = 0x0000001 = 1, value: 9\r\n```\r\nSo I guess the output is not really complete here. If you just try adding it to ``tag_definitions.py`` using ``read_str``, it should hopefully work. Would also be nice to add ``genre`` to the metadata API. It requires a bit more work, extending ``interface.py``, adding tests, documentation and so on. If you are up for the challenge, I welcome a PR 👍 (should be straight-forward by looking at for example ``artist`` as a template but I can help you out if you need any help)"}}
{"actor":{"display_login":"postlund"}}