{"action":"created","issue":{"url":"https://api.github.com/repos/mikebrady/shairport-sync-metadata-reader/issues/5","labels_url":"https://api.github.com/repos/mikebrady/shairport-sync-metadata-reader/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/mikebrady/shairport-sync-metadata-reader/issues/5/comments","events_url":"https://api.github.com/repos/mikebrady/shairport-sync-metadata-reader/issues/5/events","html_url":"https://github.com/mikebrady/shairport-sync-metadata-reader/issues/5","id":105705776,"number":5,"title":"How to associate cover with meta?","user":{"login":"luckydonald","id":2737108,"avatar_url":"https://avatars.githubusercontent.com/u/2737108?v=3","gravatar_id":"","url":"https://api.github.com/users/luckydonald","html_url":"https://github.com/luckydonald","followers_url":"https://api.github.com/users/luckydonald/followers","following_url":"https://api.github.com/users/luckydonald/following{/other_user}","gists_url":"https://api.github.com/users/luckydonald/gists{/gist_id}","starred_url":"https://api.github.com/users/luckydonald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luckydonald/subscriptions","organizations_url":"https://api.github.com/users/luckydonald/orgs","repos_url":"https://api.github.com/users/luckydonald/repos","events_url":"https://api.github.com/users/luckydonald/events{/privacy}","received_events_url":"https://api.github.com/users/luckydonald/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-09T23:50:39Z","updated_at":"2015-09-12T11:35:00Z","closed_at":null,"body":"Hi Mike,\r\n\r\nI have trouble detecting when a new song starts.\r\nIn my tests the Cover Arts (```PICT```) were sent before the metadata begin (```pbeg```).\r\nIs there a secure way to associate the image with the metadata?\r\n\r\n\r\nBecause already opening an issue, what do shairports extra codes\r\n```pfls``` (doc says play stream flush), ```daid``` and ```acre``` do?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/mikebrady/shairport-sync-metadata-reader/issues/comments/139750516","html_url":"https://github.com/mikebrady/shairport-sync-metadata-reader/issues/5#issuecomment-139750516","issue_url":"https://api.github.com/repos/mikebrady/shairport-sync-metadata-reader/issues/5","id":139750516,"user":{"login":"mikebrady","id":4265913,"avatar_url":"https://avatars.githubusercontent.com/u/4265913?v=3","gravatar_id":"","url":"https://api.github.com/users/mikebrady","html_url":"https://github.com/mikebrady","followers_url":"https://api.github.com/users/mikebrady/followers","following_url":"https://api.github.com/users/mikebrady/following{/other_user}","gists_url":"https://api.github.com/users/mikebrady/gists{/gist_id}","starred_url":"https://api.github.com/users/mikebrady/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikebrady/subscriptions","organizations_url":"https://api.github.com/users/mikebrady/orgs","repos_url":"https://api.github.com/users/mikebrady/repos","events_url":"https://api.github.com/users/mikebrady/events{/privacy}","received_events_url":"https://api.github.com/users/mikebrady/received_events","type":"User","site_admin":false},"created_at":"2015-09-12T11:35:00Z","updated_at":"2015-09-12T11:35:00Z","body":"Yes, @roblan puts it well, and let me give you my take on it:\r\n1. Some sources can accept remote control commands – they advertise this by providing a DACP-ID string. The existence of the string indicates that the source can accept commands and the string itself is a unique identifier.\r\n2. To send commands, you need to get the source's IP number and the port number it is listening on. There are various ways of getting the IP number, but the only way to get the port number is to look at mDNS packets that contain the DACP-ID string and the port number.\r\n3. Reading through mDNS packets programatically requires using extra facilities provided by Avahi, but they are not present in the `tinysvcmdns` package. That would restrict Shairport Sync to using Avahi only, which is IMHO undesirable. \r\n4. Hence, the thought was to provide the DACP-ID as metadata so that people could write a separate app that, e.g. drives a screen, puts artwork and track information up and accepts commands that can be sent back to the source. Maybe @roblan is up to something similar???\r\n\r\nRegarding the rest of your questions:\r\n\r\n**Answer to Edit 2**: I'm afraid I don't know too much about the metadata provided by iTunes. It looks like the dates might have been set wrongly on the iTunes computer.\r\n\r\n**Answer to Edit 3**: AFAIR Shairport Sync never closes that pipe, so there shouldn't be an EOF..."}}