{"action":"created","issue":{"url":"https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/issues/493","labels_url":"https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/issues/493/labels{/name}","comments_url":"https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/issues/493/comments","events_url":"https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/issues/493/events","html_url":"https://github.com/UniversalMediaServer/UniversalMediaServer/issues/493","id":59351395,"number":493,"title":"Malformed ContentFeatures.DLNA.ORG header sent to renderer","user":{"login":"master-nevi","id":987706,"avatar_url":"https://avatars.githubusercontent.com/u/987706?v=3","gravatar_id":"","url":"https://api.github.com/users/master-nevi","html_url":"https://github.com/master-nevi","followers_url":"https://api.github.com/users/master-nevi/followers","following_url":"https://api.github.com/users/master-nevi/following{/other_user}","gists_url":"https://api.github.com/users/master-nevi/gists{/gist_id}","starred_url":"https://api.github.com/users/master-nevi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/master-nevi/subscriptions","organizations_url":"https://api.github.com/users/master-nevi/orgs","repos_url":"https://api.github.com/users/master-nevi/repos","events_url":"https://api.github.com/users/master-nevi/events{/privacy}","received_events_url":"https://api.github.com/users/master-nevi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-28T18:09:41Z","updated_at":"2015-02-28T20:54:55Z","closed_at":null,"body":"This is my 3rd attempt trying to report and provide a fix for this bug, I hope somebody sees this.\r\n\r\nBasically when there's a 3rd party control point coordinating the render and server, the DLNA-compliant renderer fails to request a video due to a malformed header coming back from UMS which contains a mixture of \"null\" strings and is partially incorrect in format.\r\n\r\nI've already debugged the server and put together a code fix here: e201a4eb46801138aafec01f9a53a82d2be80f68\r\n\r\nBasically there's a method called getDidlString() which, although it's a getter, oddly sets the instance variables \"dlnaspec\" and \"dlnaOrgOpFlags\" which are needed to ensure getDlnaContentFeatures() creates and returns the correct header string. So I had to call it before the return. Having a getter set instance variables is certainly a code smell to me but I didn't want to attempt a refactor without somebody agreeing with the bug and willing to accept the pull request."},"comment":{"url":"https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/issues/comments/76545549","html_url":"https://github.com/UniversalMediaServer/UniversalMediaServer/issues/493#issuecomment-76545549","issue_url":"https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/issues/493","id":76545549,"user":{"login":"master-nevi","id":987706,"avatar_url":"https://avatars.githubusercontent.com/u/987706?v=3","gravatar_id":"","url":"https://api.github.com/users/master-nevi","html_url":"https://github.com/master-nevi","followers_url":"https://api.github.com/users/master-nevi/followers","following_url":"https://api.github.com/users/master-nevi/following{/other_user}","gists_url":"https://api.github.com/users/master-nevi/gists{/gist_id}","starred_url":"https://api.github.com/users/master-nevi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/master-nevi/subscriptions","organizations_url":"https://api.github.com/users/master-nevi/orgs","repos_url":"https://api.github.com/users/master-nevi/repos","events_url":"https://api.github.com/users/master-nevi/events{/privacy}","received_events_url":"https://api.github.com/users/master-nevi/received_events","type":"User","site_admin":false},"created_at":"2015-02-28T20:54:55Z","updated_at":"2015-02-28T20:54:55Z","body":"Cool, I appreciate you looking at this. Here is my previous attempt at refactoring the problem area: https://github.com/UniversalMediaServer/UniversalMediaServer/commit/82f48e0efaa778707daed94ca7396ab9fcc68e5f\r\n\r\nThe only issue is that it's a refactor from last Nov so it may be missing other fixes. I could apply it to a more recent version such as the above fix if you agree with the changes. I basically get rid of the \"dlnaspec\" and \"dlnaOrgOpFlags\" string ivars and made the methods getDlnaOrgPnFlags() and getDlnaOrgOpFlags() for creating their values (dlnaspec was renamed to dlnaOrgPnFlags); this was especially necessary since both require the RendererConfiguration in order for both to be created anyways. As a result and added bonus, this change cuts the mile-long method getDidlString() in half as a large portion of that method was used to generate those two values."}}